ZAP Scanning Report

Summary of Alerts

Risk LevelNumber of Alerts
High1
Medium6
Low28
Informational5

Alert Detail

High (Medium)Falla por Inyección SQL
Description

Inyección SQL puede ser posible.

URLhttps://siscoca.ruralytierras.gob.bo/api/mercado
MethodPOST
Parameterlatitud
Attack-15.65477566515968 OR 1=1 --
URLhttps://siscoca.ruralytierras.gob.bo/api/persona
MethodPOST
Parameterprimer_apellido
Attackadsa AND 1=1
Instances2
Solution

No confíe en los valores de entrada del lado del cliente, incluso si en el lado del cliente se realice una validación.

En general, comprobar todos los datos de entrado en el servidor.

Si la aplicación usa JDBC, usar PreparedStatement o CallableStatement, con parámetros pasados por '?'

Si la aplicación utiliza ASP, usar ADO Command Objects con una fuerte comprobación de tipos de consultas y parámetros.

Si la Base de Datos puede usar Stored Procedures (Procedimientos Almacenados), úselos.

¡NO concatenar cadenas en los query (consultas) en el procedimientos almacenados, o utilizar 'exec', 'exec immediate', o su funcionalidad equivalente!

No crear consultas SQL dinámicas usando una sencilla concatenación de cadenas.

Aplique aun lista blanca (whitelist) de caracteres permitidos, o una lista negra (blacklist) de caracteres no permitidos en la entrada (input) del usuario.

Aplique el privilegio mínimo posible al usuario de la base de datos de los privilegios usados.

En particular evitar el uso de los usuario de base de datos 'sa' o 'db-owner'. Esto no elimina la inyección SQL, pero minimiza su impacto.

Conceder el mínimo acceso de base de datos que es necesario para la aplicación.

Other information

Los resultados de la página se manipularon con éxito utilizando las condiciones booleanas [-15.65477566515968 AND 1=1 -- ] y [-15.65477566515968 OR 1=1 -- ]

El valor de parámetro que está modificado fue NOT eliminado de la salida HTML para fines de la comparación

Los datos NO fueron revueltos por el parámetro original.

La vulnerabilidad fue detectada con éxito recuperando mas datos retornados originalmente, por la manipulación del parámetro

Reference

https://www.owasp.org/index.php/Top_10_2010-a1 https://www.owasp.org/index.php/SQL_Injection_Prevention_Cheat_Sheet

CWE Id89
WASC Id19
Source ID1
Medium (Medium)Buffer Overflow
Description

Los errores de Buffer Overflow se caracterizan por la sobrescritura de espacios de memoria del proceso web en segundo plano, que no deberían haber sido modificados, intencionadamente o no. Sobrescribir los valores de IP (Instruction Pointer), BP (Base Pointer) y otros registros causan excepciones, violaciones del segmento y otros errores. Normalmente estos errores terminan la ejecución de la aplicación de manera inseperada.

URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta
MethodPOST
Parameterlocalidad_id
AttackPOST https://siscoca.ruralytierras.gob.bo/api/hoja_ruta HTTP/1.1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Firefox/78.0 Accept: application/json, text/plain, */* Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3 X-Requested-With: XMLHttpRequest X-CSRF-TOKEN: undefined Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3Npc2NvY2EucnVyYWx5dGllcnJhcy5nb2IuYm8vYXBpL2xvZ2luIiwiaWF0IjoxNTk2MTc0NDUwLCJleHAiOjE1OTYxNzgwNTAsIm5iZiI6MTU5NjE3NDQ1MCwianRpIjoiQ0RhSjR2aTNzN2ltZWJVTyIsInN1YiI6MTcsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.Aff9TyYeqInKi5dn-cXwD3AyKZZHrgJjeOo78Rd3LMc Content-Type: application/json;charset=utf-8 Content-Length: 5919 Origin: https://siscoca.ruralytierras.gob.bo Connection: keep-alive Referer: https://siscoca.ruralytierras.gob.bo/hojas_de_ruta Host: siscoca.ruralytierras.gob.bo
URLhttps://siscoca.ruralytierras.gob.bo/api/user
MethodPOST
Parameteremail
AttackPOST https://siscoca.ruralytierras.gob.bo/api/user HTTP/1.1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Firefox/78.0 Accept: application/json, text/plain, */* Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3 X-Requested-With: XMLHttpRequest X-CSRF-TOKEN: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3Npc2NvY2EucnVyYWx5dGllcnJhcy5nb2IuYm8vYXBpL2xvZ2luIiwiaWF0IjoxNTk2MTQyMjQ4LCJleHAiOjE1OTYxNDU4NDgsIm5iZiI6MTU5NjE0MjI0OCwianRpIjoibWduNTBFWWVrWG92WkJtTCIsInN1YiI6MTcsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.DPLPOVQ815zgPpv2RoMcli59LS5cDM3shr9DUvmoGeg Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3Npc2NvY2EucnVyYWx5dGllcnJhcy5nb2IuYm8vYXBpL2xvZ2luIiwiaWF0IjoxNTk2MTcwMTI2LCJleHAiOjE1OTYxNzM3MjYsIm5iZiI6MTU5NjE3MDEyNiwianRpIjoiSzgzMDVQb2xuc3JRTUJuTiIsInN1YiI6MTcsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.b8g1bDwCnCusZ-ovSxaELvq1OMi54pw1oNFylXPPTuE Content-Type: application/json;charset=utf-8 Content-Length: 2244 Origin: https://siscoca.ruralytierras.gob.bo Connection: keep-alive Referer: https://siscoca.ruralytierras.gob.bo/usuarios Host: siscoca.ruralytierras.gob.bo
URLhttps://siscoca.ruralytierras.gob.bo/api/puesto_de_control
MethodPOST
Parameterdescripcion
AttackPOST https://siscoca.ruralytierras.gob.bo/api/puesto_de_control HTTP/1.1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Firefox/78.0 Accept: application/json, text/plain, */* Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3 X-Requested-With: XMLHttpRequest X-CSRF-TOKEN: undefined Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3Npc2NvY2EucnVyYWx5dGllcnJhcy5nb2IuYm8vYXBpL2xvZ2luIiwiaWF0IjoxNTk2MTcwMTI2LCJleHAiOjE1OTYxNzM3MjYsIm5iZiI6MTU5NjE3MDEyNiwianRpIjoiSzgzMDVQb2xuc3JRTUJuTiIsInN1YiI6MTcsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.b8g1bDwCnCusZ-ovSxaELvq1OMi54pw1oNFylXPPTuE Content-Type: application/json;charset=utf-8 Content-Length: 2243 Origin: https://siscoca.ruralytierras.gob.bo Connection: keep-alive Referer: https://siscoca.ruralytierras.gob.bo/puestos_de_control Host: siscoca.ruralytierras.gob.bo
URLhttps://siscoca.ruralytierras.gob.bo/api/solicitud
MethodPOST
Parameterconvocatoria_id
AttackPOST https://siscoca.ruralytierras.gob.bo/api/solicitud HTTP/1.1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Firefox/78.0 Accept: application/json, text/plain, */* Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3 X-Requested-With: XMLHttpRequest X-CSRF-TOKEN: undefined Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3Npc2NvY2EucnVyYWx5dGllcnJhcy5nb2IuYm8vYXBpL2xvZ2luIiwiaWF0IjoxNTk2MTcwMTI2LCJleHAiOjE1OTYxNzM3MjYsIm5iZiI6MTU5NjE3MDEyNiwianRpIjoiSzgzMDVQb2xuc3JRTUJuTiIsInN1YiI6MTcsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.b8g1bDwCnCusZ-ovSxaELvq1OMi54pw1oNFylXPPTuE Content-Type: application/json;charset=utf-8 Content-Length: 2208 Origin: https://siscoca.ruralytierras.gob.bo Connection: keep-alive Referer: https://siscoca.ruralytierras.gob.bo/recepcion_solicitud_oii Host: siscoca.ruralytierras.gob.bo
URLhttps://siscoca.ruralytierras.gob.bo/api/retencion
MethodPOST
Parameterlugar
AttackPOST https://siscoca.ruralytierras.gob.bo/api/retencion HTTP/1.1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Firefox/78.0 Accept: application/json, text/plain, */* Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3 X-Requested-With: XMLHttpRequest X-CSRF-TOKEN: undefined Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3Npc2NvY2EucnVyYWx5dGllcnJhcy5nb2IuYm8vYXBpL2xvZ2luIiwiaWF0IjoxNTk2MTcwMTI2LCJleHAiOjE1OTYxNzM3MjYsIm5iZiI6MTU5NjE3MDEyNiwianRpIjoiSzgzMDVQb2xuc3JRTUJuTiIsInN1YiI6MTcsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.b8g1bDwCnCusZ-ovSxaELvq1OMi54pw1oNFylXPPTuE Content-Type: application/json;charset=utf-8 Content-Length: 2334 Origin: https://siscoca.ruralytierras.gob.bo Connection: keep-alive Referer: https://siscoca.ruralytierras.gob.bo/retenciones Host: siscoca.ruralytierras.gob.bo
URLhttps://siscoca.ruralytierras.gob.bo/api/convocatoria
MethodPOST
Parametercodigo_referencia
AttackPOST https://siscoca.ruralytierras.gob.bo/api/convocatoria HTTP/1.1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Firefox/78.0 Accept: application/json, text/plain, */* Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3 X-Requested-With: XMLHttpRequest X-CSRF-TOKEN: undefined Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3Npc2NvY2EucnVyYWx5dGllcnJhcy5nb2IuYm8vYXBpL2xvZ2luIiwiaWF0IjoxNTk2MTcwMTI2LCJleHAiOjE1OTYxNzM3MjYsIm5iZiI6MTU5NjE3MDEyNiwianRpIjoiSzgzMDVQb2xuc3JRTUJuTiIsInN1YiI6MTcsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.b8g1bDwCnCusZ-ovSxaELvq1OMi54pw1oNFylXPPTuE Content-Type: application/json;charset=utf-8 Content-Length: 2287 Origin: https://siscoca.ruralytierras.gob.bo Connection: keep-alive Referer: https://siscoca.ruralytierras.gob.bo/convocatorias_oii Host: siscoca.ruralytierras.gob.bo
URLhttps://siscoca.ruralytierras.gob.bo/api/infraccion
MethodPOST
Parameterseveridad
AttackPOST https://siscoca.ruralytierras.gob.bo/api/infraccion HTTP/1.1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Firefox/78.0 Accept: application/json, text/plain, */* Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3 X-Requested-With: XMLHttpRequest X-CSRF-TOKEN: undefined Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3Npc2NvY2EucnVyYWx5dGllcnJhcy5nb2IuYm8vYXBpL2xvZ2luIiwiaWF0IjoxNTk2MTcwMTI2LCJleHAiOjE1OTYxNzM3MjYsIm5iZiI6MTU5NjE3MDEyNiwianRpIjoiSzgzMDVQb2xuc3JRTUJuTiIsInN1YiI6MTcsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.b8g1bDwCnCusZ-ovSxaELvq1OMi54pw1oNFylXPPTuE Content-Type: application/json;charset=utf-8 Content-Length: 2182 Origin: https://siscoca.ruralytierras.gob.bo Connection: keep-alive Referer: https://siscoca.ruralytierras.gob.bo/infracciones Host: siscoca.ruralytierras.gob.bo
URLhttps://siscoca.ruralytierras.gob.bo/api/puesto_de_control
MethodPOST
Parameterlongitud
AttackPOST https://siscoca.ruralytierras.gob.bo/api/puesto_de_control HTTP/1.1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Firefox/78.0 Accept: application/json, text/plain, */* Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3 X-Requested-With: XMLHttpRequest X-CSRF-TOKEN: undefined Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3Npc2NvY2EucnVyYWx5dGllcnJhcy5nb2IuYm8vYXBpL2xvZ2luIiwiaWF0IjoxNTk2MTcwMTI2LCJleHAiOjE1OTYxNzM3MjYsIm5iZiI6MTU5NjE3MDEyNiwianRpIjoiSzgzMDVQb2xuc3JRTUJuTiIsInN1YiI6MTcsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.b8g1bDwCnCusZ-ovSxaELvq1OMi54pw1oNFylXPPTuE Content-Type: application/json;charset=utf-8 Content-Length: 2234 Origin: https://siscoca.ruralytierras.gob.bo Connection: keep-alive Referer: https://siscoca.ruralytierras.gob.bo/puestos_de_control Host: siscoca.ruralytierras.gob.bo
URLhttps://siscoca.ruralytierras.gob.bo/api/role
MethodPOST
Parametername
AttackPOST https://siscoca.ruralytierras.gob.bo/api/role HTTP/1.1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Firefox/78.0 Accept: application/json, text/plain, */* Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3 X-Requested-With: XMLHttpRequest X-CSRF-TOKEN: undefined Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3Npc2NvY2EucnVyYWx5dGllcnJhcy5nb2IuYm8vYXBpL2xvZ2luIiwiaWF0IjoxNTk2MTcwMTI2LCJleHAiOjE1OTYxNzM3MjYsIm5iZiI6MTU5NjE3MDEyNiwianRpIjoiSzgzMDVQb2xuc3JRTUJuTiIsInN1YiI6MTcsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.b8g1bDwCnCusZ-ovSxaELvq1OMi54pw1oNFylXPPTuE Content-Type: application/json;charset=utf-8 Content-Length: 2175 Origin: https://siscoca.ruralytierras.gob.bo Connection: keep-alive Referer: https://siscoca.ruralytierras.gob.bo/roles Host: siscoca.ruralytierras.gob.bo
URLhttps://siscoca.ruralytierras.gob.bo/api/ruta
MethodPOST
Parameterorigenla
AttackPOST https://siscoca.ruralytierras.gob.bo/api/ruta HTTP/1.1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Firefox/78.0 Accept: application/json, text/plain, */* Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3 X-Requested-With: XMLHttpRequest X-CSRF-TOKEN: undefined Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3Npc2NvY2EucnVyYWx5dGllcnJhcy5nb2IuYm8vYXBpL2xvZ2luIiwiaWF0IjoxNTk2MTcwMTI2LCJleHAiOjE1OTYxNzM3MjYsIm5iZiI6MTU5NjE3MDEyNiwianRpIjoiSzgzMDVQb2xuc3JRTUJuTiIsInN1YiI6MTcsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.b8g1bDwCnCusZ-ovSxaELvq1OMi54pw1oNFylXPPTuE Content-Type: application/json;charset=utf-8 Content-Length: 2330 Origin: https://siscoca.ruralytierras.gob.bo Connection: keep-alive Referer: https://siscoca.ruralytierras.gob.bo/rutas Host: siscoca.ruralytierras.gob.bo
URLhttps://siscoca.ruralytierras.gob.bo/api/firmas
MethodPOST
Parametercargo
AttackPOST https://siscoca.ruralytierras.gob.bo/api/firmas HTTP/1.1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Firefox/78.0 Accept: application/json, text/plain, */* Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3 X-Requested-With: XMLHttpRequest X-CSRF-TOKEN: undefined Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3Npc2NvY2EucnVyYWx5dGllcnJhcy5nb2IuYm8vYXBpL2xvZ2luIiwiaWF0IjoxNTk2MTcwMTI2LCJleHAiOjE1OTYxNzM3MjYsIm5iZiI6MTU5NjE3MDEyNiwianRpIjoiSzgzMDVQb2xuc3JRTUJuTiIsInN1YiI6MTcsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.b8g1bDwCnCusZ-ovSxaELvq1OMi54pw1oNFylXPPTuE Content-Type: application/json;charset=utf-8 Content-Length: 2192 Origin: https://siscoca.ruralytierras.gob.bo Connection: keep-alive Referer: https://siscoca.ruralytierras.gob.bo/firmas Host: siscoca.ruralytierras.gob.bo
URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta
MethodPOST
Parameternumero_placa
AttackPOST https://siscoca.ruralytierras.gob.bo/api/hoja_ruta HTTP/1.1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Firefox/78.0 Accept: application/json, text/plain, */* Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3 X-Requested-With: XMLHttpRequest X-CSRF-TOKEN: undefined Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3Npc2NvY2EucnVyYWx5dGllcnJhcy5nb2IuYm8vYXBpL2xvZ2luIiwiaWF0IjoxNTk2MTcwMTI2LCJleHAiOjE1OTYxNzM3MjYsIm5iZiI6MTU5NjE3MDEyNiwianRpIjoiSzgzMDVQb2xuc3JRTUJuTiIsInN1YiI6MTcsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.b8g1bDwCnCusZ-ovSxaELvq1OMi54pw1oNFylXPPTuE Content-Type: application/json;charset=utf-8 Content-Length: 2402 Origin: https://siscoca.ruralytierras.gob.bo Connection: keep-alive Referer: https://siscoca.ruralytierras.gob.bo/hojas_ruta_trueque Host: siscoca.ruralytierras.gob.bo
URLhttps://siscoca.ruralytierras.gob.bo/api/notificaciones/eventos
MethodPOST
Parametertitulo
AttackPOST https://siscoca.ruralytierras.gob.bo/api/notificaciones/eventos HTTP/1.1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Firefox/78.0 Accept: application/json, text/plain, */* Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3 X-Requested-With: XMLHttpRequest X-CSRF-TOKEN: undefined Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3Npc2NvY2EucnVyYWx5dGllcnJhcy5nb2IuYm8vYXBpL2xvZ2luIiwiaWF0IjoxNTk2MTcwMTI2LCJleHAiOjE1OTYxNzM3MjYsIm5iZiI6MTU5NjE3MDEyNiwianRpIjoiSzgzMDVQb2xuc3JRTUJuTiIsInN1YiI6MTcsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.b8g1bDwCnCusZ-ovSxaELvq1OMi54pw1oNFylXPPTuE Content-Type: application/json;charset=utf-8 Content-Length: 2156 Origin: https://siscoca.ruralytierras.gob.bo Connection: keep-alive Referer: https://siscoca.ruralytierras.gob.bo/notificaciones Host: siscoca.ruralytierras.gob.bo
URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta
MethodPOST
Parameterruta_id
AttackPOST https://siscoca.ruralytierras.gob.bo/api/hoja_ruta HTTP/1.1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Firefox/78.0 Accept: application/json, text/plain, */* Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3 X-Requested-With: XMLHttpRequest X-CSRF-TOKEN: undefined Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3Npc2NvY2EucnVyYWx5dGllcnJhcy5nb2IuYm8vYXBpL2xvZ2luIiwiaWF0IjoxNTk2MTcwMTI2LCJleHAiOjE1OTYxNzM3MjYsIm5iZiI6MTU5NjE3MDEyNiwianRpIjoiSzgzMDVQb2xuc3JRTUJuTiIsInN1YiI6MTcsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.b8g1bDwCnCusZ-ovSxaELvq1OMi54pw1oNFylXPPTuE Content-Type: application/json;charset=utf-8 Content-Length: 2409 Origin: https://siscoca.ruralytierras.gob.bo Connection: keep-alive Referer: https://siscoca.ruralytierras.gob.bo/hojas_ruta_trueque Host: siscoca.ruralytierras.gob.bo
URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta
MethodPOST
Parameterpuesto_venta_id
AttackPOST https://siscoca.ruralytierras.gob.bo/api/hoja_ruta HTTP/1.1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Firefox/78.0 Accept: application/json, text/plain, */* Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3 X-Requested-With: XMLHttpRequest X-CSRF-TOKEN: undefined Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3Npc2NvY2EucnVyYWx5dGllcnJhcy5nb2IuYm8vYXBpL2xvZ2luIiwiaWF0IjoxNTk2MTc0NDUwLCJleHAiOjE1OTYxNzgwNTAsIm5iZiI6MTU5NjE3NDQ1MCwianRpIjoiQ0RhSjR2aTNzN2ltZWJVTyIsInN1YiI6MTcsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.Aff9TyYeqInKi5dn-cXwD3AyKZZHrgJjeOo78Rd3LMc Content-Type: application/json;charset=utf-8 Content-Length: 5918 Origin: https://siscoca.ruralytierras.gob.bo Connection: keep-alive Referer: https://siscoca.ruralytierras.gob.bo/hojas_de_ruta Host: siscoca.ruralytierras.gob.bo
URLhttps://siscoca.ruralytierras.gob.bo/api/upload/base64_image
MethodPOST
Parameterbase64
AttackPOST https://siscoca.ruralytierras.gob.bo/api/upload/base64_image HTTP/1.1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Firefox/78.0 Accept: application/json, text/plain, */* Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3 X-Requested-With: XMLHttpRequest X-CSRF-TOKEN: undefined Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3Npc2NvY2EucnVyYWx5dGllcnJhcy5nb2IuYm8vYXBpL2xvZ2luIiwiaWF0IjoxNTk2MTcwMTI2LCJleHAiOjE1OTYxNzM3MjYsIm5iZiI6MTU5NjE3MDEyNiwianRpIjoiSzgzMDVQb2xuc3JRTUJuTiIsInN1YiI6MTcsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.b8g1bDwCnCusZ-ovSxaELvq1OMi54pw1oNFylXPPTuE Content-Type: application/json;charset=utf-8 Content-Length: 2113 Origin: https://siscoca.ruralytierras.gob.bo Connection: keep-alive Referer: https://siscoca.ruralytierras.gob.bo/poderes Host: siscoca.ruralytierras.gob.bo
URLhttps://siscoca.ruralytierras.gob.bo/api/puesto_de_control
MethodPOST
Parametermunicipio_id
AttackPOST https://siscoca.ruralytierras.gob.bo/api/puesto_de_control HTTP/1.1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Firefox/78.0 Accept: application/json, text/plain, */* Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3 X-Requested-With: XMLHttpRequest X-CSRF-TOKEN: undefined Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3Npc2NvY2EucnVyYWx5dGllcnJhcy5nb2IuYm8vYXBpL2xvZ2luIiwiaWF0IjoxNTk2MTcwMTI2LCJleHAiOjE1OTYxNzM3MjYsIm5iZiI6MTU5NjE3MDEyNiwianRpIjoiSzgzMDVQb2xuc3JRTUJuTiIsInN1YiI6MTcsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.b8g1bDwCnCusZ-ovSxaELvq1OMi54pw1oNFylXPPTuE Content-Type: application/json;charset=utf-8 Content-Length: 2251 Origin: https://siscoca.ruralytierras.gob.bo Connection: keep-alive Referer: https://siscoca.ruralytierras.gob.bo/puestos_de_control Host: siscoca.ruralytierras.gob.bo
URLhttps://siscoca.ruralytierras.gob.bo/api/solicitud
MethodPOST
Parameterfecha_recepcion
AttackPOST https://siscoca.ruralytierras.gob.bo/api/solicitud HTTP/1.1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Firefox/78.0 Accept: application/json, text/plain, */* Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3 X-Requested-With: XMLHttpRequest X-CSRF-TOKEN: undefined Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3Npc2NvY2EucnVyYWx5dGllcnJhcy5nb2IuYm8vYXBpL2xvZ2luIiwiaWF0IjoxNTk2MTcwMTI2LCJleHAiOjE1OTYxNzM3MjYsIm5iZiI6MTU5NjE3MDEyNiwianRpIjoiSzgzMDVQb2xuc3JRTUJuTiIsInN1YiI6MTcsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.b8g1bDwCnCusZ-ovSxaELvq1OMi54pw1oNFylXPPTuE Content-Type: application/json;charset=utf-8 Content-Length: 2194 Origin: https://siscoca.ruralytierras.gob.bo Connection: keep-alive Referer: https://siscoca.ruralytierras.gob.bo/recepcion_solicitud_oii Host: siscoca.ruralytierras.gob.bo
URLhttps://siscoca.ruralytierras.gob.bo/api/user
MethodPOST
Parametermothers_last_name
AttackPOST https://siscoca.ruralytierras.gob.bo/api/user HTTP/1.1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Firefox/78.0 Accept: application/json, text/plain, */* Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3 X-Requested-With: XMLHttpRequest X-CSRF-TOKEN: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3Npc2NvY2EucnVyYWx5dGllcnJhcy5nb2IuYm8vYXBpL2xvZ2luIiwiaWF0IjoxNTk2MTQyMjQ4LCJleHAiOjE1OTYxNDU4NDgsIm5iZiI6MTU5NjE0MjI0OCwianRpIjoibWduNTBFWWVrWG92WkJtTCIsInN1YiI6MTcsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.DPLPOVQ815zgPpv2RoMcli59LS5cDM3shr9DUvmoGeg Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3Npc2NvY2EucnVyYWx5dGllcnJhcy5nb2IuYm8vYXBpL2xvZ2luIiwiaWF0IjoxNTk2MTQyMjQ4LCJleHAiOjE1OTYxNDU4NDgsIm5iZiI6MTU5NjE0MjI0OCwianRpIjoibWduNTBFWWVrWG92WkJtTCIsInN1YiI6MTcsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.DPLPOVQ815zgPpv2RoMcli59LS5cDM3shr9DUvmoGeg Content-Type: application/json;charset=utf-8 Content-Length: 2255 Origin: https://siscoca.ruralytierras.gob.bo Connection: keep-alive Referer: https://siscoca.ruralytierras.gob.bo/usuarios Host: siscoca.ruralytierras.gob.bo
URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta
MethodPOST
Parametertaques
AttackPOST https://siscoca.ruralytierras.gob.bo/api/hoja_ruta HTTP/1.1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Firefox/78.0 Accept: application/json, text/plain, */* Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3 X-Requested-With: XMLHttpRequest X-CSRF-TOKEN: undefined Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3Npc2NvY2EucnVyYWx5dGllcnJhcy5nb2IuYm8vYXBpL2xvZ2luIiwiaWF0IjoxNTk2MTc0NDUwLCJleHAiOjE1OTYxNzgwNTAsIm5iZiI6MTU5NjE3NDQ1MCwianRpIjoiQ0RhSjR2aTNzN2ltZWJVTyIsInN1YiI6MTcsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.Aff9TyYeqInKi5dn-cXwD3AyKZZHrgJjeOo78Rd3LMc Content-Type: application/json;charset=utf-8 Content-Length: 5912 Origin: https://siscoca.ruralytierras.gob.bo Connection: keep-alive Referer: https://siscoca.ruralytierras.gob.bo/hojas_de_ruta Host: siscoca.ruralytierras.gob.bo
Instances165
Solution

Reescribir el programa en segundo plano realizando una correcta comprobación de la longitud de retorno. Esto requerirá el recompilado del ejecutable en segundo plano.

Other information

Potencial desbordamiento de buffer. El script ha cerrado la conexión y ha lanzado un error interno del servidor 500

Reference

https://www.owasp.org/index.php/Buffer_overflow_attack

CWE Id120
WASC Id7
Source ID1
Medium (Medium)Error de formato de cadena
Description

Un error de formato de cadena ocurre cuando los datos de una cadena de entrada es evaluada como un comando por la aplicación.

URLhttps://siscoca.ruralytierras.gob.bo/api/infraccion
MethodPOST
Parameterseveridad
AttackZAP%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s
URLhttps://siscoca.ruralytierras.gob.bo/api/infraccion
MethodPOST
Parametercodigo
AttackZAP%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s
URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta
MethodPOST
Parametercodigo_comercializador
AttackZAP %1!s%2!s%3!s%4!s%5!s%6!s%7!s%8!s%9!s%10!s%11!s%12!s%13!s%14!s%15!s%16!s%17!s%18!s%19!s%20!s%21!n%22!n%23!n%24!n%25!n%26!n%27!n%28!n%29!n%30!n%31!n%32!n%33!n%34!n%35!n%36!n%37!n%38!n%39!n%40!n
URLhttps://siscoca.ruralytierras.gob.bo/api/mercado
MethodPOST
Parameternombre
AttackZAP %1!s%2!s%3!s%4!s%5!s%6!s%7!s%8!s%9!s%10!s%11!s%12!s%13!s%14!s%15!s%16!s%17!s%18!s%19!s%20!s%21!n%22!n%23!n%24!n%25!n%26!n%27!n%28!n%29!n%30!n%31!n%32!n%33!n%34!n%35!n%36!n%37!n%38!n%39!n%40!n
URLhttps://siscoca.ruralytierras.gob.bo/api/retencion
MethodPOST
Parameterinicial_embalaje
AttackZAP%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s
URLhttps://siscoca.ruralytierras.gob.bo/api/ruta
MethodPOST
Parameternombre
AttackZAP %1!s%2!s%3!s%4!s%5!s%6!s%7!s%8!s%9!s%10!s%11!s%12!s%13!s%14!s%15!s%16!s%17!s%18!s%19!s%20!s%21!n%22!n%23!n%24!n%25!n%26!n%27!n%28!n%29!n%30!n%31!n%32!n%33!n%34!n%35!n%36!n%37!n%38!n%39!n%40!n
URLhttps://siscoca.ruralytierras.gob.bo/api/sindicato
MethodPOST
Parameternombre
AttackZAP %1!s%2!s%3!s%4!s%5!s%6!s%7!s%8!s%9!s%10!s%11!s%12!s%13!s%14!s%15!s%16!s%17!s%18!s%19!s%20!s%21!n%22!n%23!n%24!n%25!n%26!n%27!n%28!n%29!n%30!n%31!n%32!n%33!n%34!n%35!n%36!n%37!n%38!n%39!n%40!n
URLhttps://siscoca.ruralytierras.gob.bo/api/sindicato
MethodPOST
Parametercodigo
AttackZAP%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s
URLhttps://siscoca.ruralytierras.gob.bo/api/puesto_de_control
MethodPOST
Parameternombre
AttackZAP %1!s%2!s%3!s%4!s%5!s%6!s%7!s%8!s%9!s%10!s%11!s%12!s%13!s%14!s%15!s%16!s%17!s%18!s%19!s%20!s%21!n%22!n%23!n%24!n%25!n%26!n%27!n%28!n%29!n%30!n%31!n%32!n%33!n%34!n%35!n%36!n%37!n%38!n%39!n%40!n
URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta
MethodPOST
Parameternumero_placa
AttackZAP%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s
URLhttps://siscoca.ruralytierras.gob.bo/api/puesto_de_control
MethodPOST
Parametercodigo
AttackZAP%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s
URLhttps://siscoca.ruralytierras.gob.bo/api/infraccion
MethodPOST
Parameternombre
AttackZAP %1!s%2!s%3!s%4!s%5!s%6!s%7!s%8!s%9!s%10!s%11!s%12!s%13!s%14!s%15!s%16!s%17!s%18!s%19!s%20!s%21!n%22!n%23!n%24!n%25!n%26!n%27!n%28!n%29!n%30!n%31!n%32!n%33!n%34!n%35!n%36!n%37!n%38!n%39!n%40!n
URLhttps://siscoca.ruralytierras.gob.bo/api/central
MethodPOST
Parametercodigo
AttackZAP%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s
URLhttps://siscoca.ruralytierras.gob.bo/api/solicitud
MethodPOST
Parameterrazon_social
AttackZAP %1!s%2!s%3!s%4!s%5!s%6!s%7!s%8!s%9!s%10!s%11!s%12!s%13!s%14!s%15!s%16!s%17!s%18!s%19!s%20!s%21!n%22!n%23!n%24!n%25!n%26!n%27!n%28!n%29!n%30!n%31!n%32!n%33!n%34!n%35!n%36!n%37!n%38!n%39!n%40!n
URLhttps://siscoca.ruralytierras.gob.bo/api/central
MethodPOST
Parameternombre
AttackZAP %1!s%2!s%3!s%4!s%5!s%6!s%7!s%8!s%9!s%10!s%11!s%12!s%13!s%14!s%15!s%16!s%17!s%18!s%19!s%20!s%21!n%22!n%23!n%24!n%25!n%26!n%27!n%28!n%29!n%30!n%31!n%32!n%33!n%34!n%35!n%36!n%37!n%38!n%39!n%40!n
URLhttps://siscoca.ruralytierras.gob.bo/api/mercado
MethodPOST
Parametercodigo
AttackZAP%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s
URLhttps://siscoca.ruralytierras.gob.bo/api/ruta
MethodPOST
Parametercodigo
AttackZAP%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s%n%s
Instances17
Solution

Reescribir el programa en segundo plano usando un borrado apropiado de las cadenas de caracteres erróneas. Esto requerirá el recompilado del ejecutable en segundo plano.

Other information

Potencial error de formato de cadena. El script cerró la conexión en /%s

Reference

https://www.owasp.org/index.php/Format_string_attack

CWE Id134
WASC Id6
Source ID1
Medium (Medium)Encabezado X-Frame-Options no establecido
Description

El encabezado X-Frame_options no está incluido en la respuesta HTTP para proteger ante ataques 'ClickJacking'.

URLhttps://siscoca.ruralytierras.gob.bo/api/upload/file
MethodPOST
ParameterX-Frame-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/zona_autorizada/show_fill/%7B%22codigo%22:%22mlk%22%7D
MethodGET
ParameterX-Frame-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/convocatoria/cierreobrafill
MethodGET
ParameterX-Frame-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/zona_autorizada/show_fill/%7B%22codigo%22:%228889998908989%22%7D
MethodGET
ParameterX-Frame-Options
URLhttps://siscoca.ruralytierras.gob.bo/home
MethodGET
ParameterX-Frame-Options
URLhttps://siscoca.ruralytierras.gob.bo/capacitaciones
MethodGET
ParameterX-Frame-Options
URLhttps://siscoca.ruralytierras.gob.bo/comercializadores
MethodGET
ParameterX-Frame-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/zona_autorizada/show_fill/%7B%22codigo%22:%22cofhjj%22%7D
MethodGET
ParameterX-Frame-Options
URLhttps://siscoca.ruralytierras.gob.bo/profile
MethodGET
ParameterX-Frame-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/zona_autorizada/show_fill/%7B%22codigo%22:%22jhjhjkhjkhjkhjkhjhk%22%7D
MethodGET
ParameterX-Frame-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/upload/base64_image
MethodPOST
ParameterX-Frame-Options
Instances11
Solution

Los navegadores de web mas modernos apoyan la cabecera HTTP X-Frame-Options. Asegúrese que está establecido en todas las páginas web devuelta por su sitio (si usted espera que la página este enmarcada solo por páginas en su servidor (por ejemplo, es parte de un FRAMESET) entonces usted querrá usar SAMEORIGIN, de otras forma si usted nunca espera que la página esté enmarcada, debería usar DENY. ALLOW-FROM permite a sitios web específicos enmarcar la página web en navegadores web compatibles).

Reference

http://blogs.msdn.com/b/ieinternals/archive/2010/03/30/combating-clickjacking-with-x-frame-options.aspx

CWE Id16
WASC Id15
Source ID3
Medium (Medium)X-Frame-Options Header Not Set
Description

X-Frame-Options header is not included in the HTTP response to protect against 'ClickJacking' attacks.

URLhttps://siscoca.ruralytierras.gob.bo/firmas
MethodGET
ParameterX-Frame-Options
URLhttps://siscoca.ruralytierras.gob.bo/productores
MethodGET
ParameterX-Frame-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/upload/base64_image
MethodPOST
ParameterX-Frame-Options
URLhttps://siscoca.ruralytierras.gob.bo/profile
MethodGET
ParameterX-Frame-Options
URLhttps://siscoca.ruralytierras.gob.bo/capacitaciones
MethodGET
ParameterX-Frame-Options
URLhttps://siscoca.ruralytierras.gob.bo/proyecto_obras
MethodGET
ParameterX-Frame-Options
Instances6
Solution

Most modern Web browsers support the X-Frame-Options HTTP header. Ensure it's set on all web pages returned by your site (if you expect the page to be framed only by pages on your server (e.g. it's part of a FRAMESET) then you'll want to use SAMEORIGIN, otherwise if you never expect the page to be framed, you should use DENY. ALLOW-FROM allows specific websites to frame the web page in supported web browsers).

Reference

http://blogs.msdn.com/b/ieinternals/archive/2010/03/30/combating-clickjacking-with-x-frame-options.aspx

CWE Id16
WASC Id15
Source ID3
Medium (Medium)Cross-Domain Misconfiguration
Description

Web browser data loading may be possible, due to a Cross Origin Resource Sharing (CORS) misconfiguration on the web server

URLhttps://location.services.mozilla.com/v1/country?key=7e40f68c-7938-4c5d-9f95-e61647c213eb
MethodGET
EvidenceAccess-Control-Allow-Origin: *
Instances1
Solution

Ensure that sensitive data is not available in an unauthenticated manner (using IP address white-listing, for instance).

Configure the "Access-Control-Allow-Origin" HTTP header to a more restrictive set of domains, or remove all CORS headers entirely, to allow the web browser to enforce the Same Origin Policy (SOP) in a more restrictive manner.

Other information

The CORS misconfiguration on the web server permits cross-domain read requests from arbitrary third party domains, using unauthenticated APIs on this domain. Web browser implementations do not permit arbitrary third parties to read the response from authenticated APIs, however. This reduces the risk somewhat. This misconfiguration could be used by an attacker to access data that is available in an unauthenticated manner, but which uses some other form of security, such as IP address white-listing.

Reference

http://www.hpenterprisesecurity.com/vulncat/en/vulncat/vb/html5_overly_permissive_cors_policy.html

CWE Id264
WASC Id14
Source ID3
Medium (Medium)Cross-Domain Misconfiguration
Description

Web browser data loading may be possible, due to a Cross Origin Resource Sharing (CORS) misconfiguration on the web server

URLhttps://firefox.settings.services.mozilla.com/v1/buckets/monitor/collections/changes/records
MethodGET
EvidenceAccess-Control-Allow-Origin: *
Instances1
Solution

Ensure that sensitive data is not available in an unauthenticated manner (using IP address white-listing, for instance).

Configure the "Access-Control-Allow-Origin" HTTP header to a more restrictive set of domains, or remove all CORS headers entirely, to allow the web browser to enforce the Same Origin Policy (SOP) in a more restrictive manner.

Other information

The CORS misconfiguration on the web server permits cross-domain read requests from arbitrary third party domains, using unauthenticated APIs on this domain. Web browser implementations do not permit arbitrary third parties to read the response from authenticated APIs, however. This reduces the risk somewhat. This misconfiguration could be used by an attacker to access data that is available in an unauthenticated manner, but which uses some other form of security, such as IP address white-listing.

Reference

http://www.hpenterprisesecurity.com/vulncat/en/vulncat/vb/html5_overly_permissive_cors_policy.html

CWE Id264
WASC Id14
Source ID3
Low (Medium)No se encuentra encabezado X-Content-Type-Options Header
Description

El encabezado Anti-MIME-Sniffing X-Content-Type-Options no estaba configurado para 'nosniff'. Esto permite versiones antiguas de Internet Explores y Chrome ejecutar MIME-sniffing en el cuerpo de la respuesta, causando potencialmente que el cuerpo de respuesta sea interpretado y desarrollado como un tipo de contenido diferente que el tipo de contenido declarado. Estos (principios de 2014) y versiones antiguas de Firefox preferiblemente usarán el tipo de contenido declarado (si hay uno establecido), antes que ejecutar el MIME-Sniffing.

URLhttp://detectportal.firefox.com/success.txt?ipv4
MethodGET
ParameterX-Content-Type-Options
Instances1
Solution

Asegúrese que el servidor de la aplicación/web establezca el encabezado Content-Type apropiadamente, y que esté establecido el encabezado X-Content-Type-Options en 'nosniff' para todas las páginas web.

Si es posible, asegúrese que el último usuario usa un navegador web complatible con los estándares y moderno que no ejecute MIME-sniffing en absoluto, o que pueda ser dirigida por el servidor de la aplicación/web para no ejecutar MIME-sniffing.

Other information

Este inconveniente aún aplica para páginas de error (401, 403, 500, etc) ya que esas páginas a menudo todavía están afectadas por problemas de inyección, en cuyos casos aún hay preocupación de buscadores rastreando páginas fuera de su tipo de contenido verídico. En límite 'alto' este escáner no alertará sobre las respuestas de error al cliente o servidor.

Reference

http://msdn.Microsoft.com/en-us/library/Ie/gg622941%28v=vs.85%29.aspx https://www.owasp.org/index.php/List_of_useful_HTTP_headers

CWE Id16
WASC Id15
Source ID3
Low (Medium)X-Content-Type-Options Header Missing
Description

The Anti-MIME-Sniffing header X-Content-Type-Options was not set to 'nosniff'. This allows older versions of Internet Explorer and Chrome to perform MIME-sniffing on the response body, potentially causing the response body to be interpreted and displayed as a content type other than the declared content type. Current (early 2014) and legacy versions of Firefox will use the declared content type (if one is set), rather than performing MIME-sniffing.

URLhttp://detectportal.firefox.com/success.txt?ipv4
MethodGET
ParameterX-Content-Type-Options
Instances1
Solution

Ensure that the application/web server sets the Content-Type header appropriately, and that it sets the X-Content-Type-Options header to 'nosniff' for all web pages.

If possible, ensure that the end user uses a standards-compliant and modern web browser that does not perform MIME-sniffing at all, or that can be directed by the web application/web server to not perform MIME-sniffing.

Other information

This issue still applies to error type pages (401, 403, 500, etc.) as those pages are often still affected by injection issues, in which case there is still concern for browsers sniffing pages away from their actual content type.

At "High" threshold this scanner will not alert on client or server error responses.

Reference

http://msdn.microsoft.com/en-us/library/ie/gg622941%28v=vs.85%29.aspx

https://www.owasp.org/index.php/List_of_useful_HTTP_headers

CWE Id16
WASC Id15
Source ID3
Low (Medium)Protección de buscador de web XSS no disponible
Description

La protección del buscador de web XSS no está disponible, o está deshabilitada por la configuración de la cabecera de respuesta de HTTP 'X-XSS-Protection' en el servidor de web

URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEawW8h
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEanEZy
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEZeEzR
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEZsfUf
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEZJ9T3
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEatqhm
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEZR_Rd
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEa-Idb
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEaevpJ
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEZyLhS
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEaUrOp
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEaQhIo
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEaNAJV
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEZ7Trm
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEaAmEt
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEZ8Kak
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEZ_95s
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEa1OoV
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEZeyNb
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEZu6q2
MethodGET
ParameterX-XSS-Protection
Instances7466
Solution

Asegúrese que el filtro XSS del navegador web está habilitado, estableciendo el encabezado de respuesta HTTP X-XSS-Protection en '1'.

Other information

El encabezado de respuesta HTTP X-XSS-Protection le permite al servidor web habilitar o deshabilitar el mecanismo de protección del navegador web XSS. Los siguientes valores intentan habilitarlo:

X-XSS-Protection: 1; mode=bloqueo

X-XSS-Protection:1; reporte=http://www.example.com/xss

Los siguiente valores lo deshabilitarían:

X-XSS-Protection: 0

El encabezado de respuesta HTTP X-XSS-Protection es actualmente compatible en Internet Explorer, Chrome y Safari (WebKit). Tenga en cuenta que esta alerta solo se produce si el cuerpo de respuesta podría pontecialmente contener una carga útil XSS (con un tipo de contenido basado en texto, con una longitud distinta de cero).

Reference

https://www.OWASP.org/index.php/XSS _ (Cross_Site_Scripting) _Prevention_Cheat_Sheet https://blog.veracode.com/2014/03/guidelines-for-setting-security-headers/

CWE Id933
WASC Id14
Source ID3
Low (Medium)Web Browser XSS Protection Not Enabled
Description

Web Browser XSS Protection is not enabled, or is disabled by the configuration of the 'X-XSS-Protection' HTTP response header on the web server

URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEYoBEn
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEYoCkU
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEYr2FK
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEYgIk_
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEXzLZA
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEYpUjC
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEY8K1X
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEYim5S
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEXxq-t
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEYFSXn
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEYgUne
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEYl7jJ
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEY9C59
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEYD_iA
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEY17d5
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEYsKYm
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEX-tPe
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEXwkvp
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEY5yK4
MethodGET
ParameterX-XSS-Protection
URLhttps://ws.ruralytierras.gob.bo/socket.io/?EIO=3&transport=polling&t=NEYomui
MethodGET
ParameterX-XSS-Protection
Instances2324
Solution

Ensure that the web browser's XSS filter is enabled, by setting the X-XSS-Protection HTTP response header to '1'.

Other information

The X-XSS-Protection HTTP response header allows the web server to enable or disable the web browser's XSS protection mechanism. The following values would attempt to enable it:

X-XSS-Protection: 1; mode=block

X-XSS-Protection: 1; report=http://www.example.com/xss

The following values would disable it:

X-XSS-Protection: 0

The X-XSS-Protection HTTP response header is currently supported on Internet Explorer, Chrome and Safari (WebKit).

Note that this alert is only raised if the response body could potentially contain an XSS payload (with a text-based content type, with a non-zero length).

Reference

https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet

https://www.veracode.com/blog/2014/03/guidelines-for-setting-security-headers/

CWE Id933
WASC Id14
Source ID3
Low (Medium)Incompleto o no Cache-control y sistema de encabezado HTTP Pragma
Description

El cache-control y encabezado HTTP Pragma no han sido establecidos apropiadamente o faltan, permitiendo al navegador y servidores proxy almacenar contenido.

URLhttps://siscoca.ruralytierras.gob.bo/api/role/fill/%7B%22id%22:9%7D
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta/fill/%7B%22tipo_hoja_ruta%22:1%7D
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta/fill/%7B%22ruta_id%22:266%7D
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/infraccion
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta/fill/%7B%22ruta_id%22:115%7D
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/models/face_recognition_model-weights_manifest.json
MethodGET
ParameterCache-Control
URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta/fill/%7B%22ruta_id%22:123%7D
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta/fill/%7B%22ruta_id%22:5%7D
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/mercado
MethodPOST
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/normativa
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta/fill/%7B%22ruta_id%22:258%7D
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/proyectos/search?arg=jbkbkj
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/zona_autorizada/show_fill/%7B%22codigo%22:%228889998908989%22%7D
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta/fill/%7B%22ruta_id%22:371%7D
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta/fill/%7B%22tipo_hoja_ruta%22:2%7D
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/sancion/showfill/2845
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta/fill/%7B%22ruta_id%22:267%7D
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/reporte/excel?tipo=infoben&fechaini=2020-07-31&fechafin=2020-07-31
MethodGET
ParameterCache-Control
Evidencepublic
URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta/fill/%7B%22ruta_id%22:380%7D
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/puesto_venta
MethodGET
ParameterCache-Control
Evidenceno-cache, private
Instances276
Solution

Siempre que sea posible asegurarse que el encabezado HTTP cache-control está establecido con no-cache, no-store, must-revalidate, y que el encabezado HTTP pragma esté establecido con no-cache.

Reference

https://www.owasp.org/index.php/Session_Management_Cheat_Sheet#Web_Content_Caching

CWE Id525
WASC Id13
Source ID3
Low (Medium)No se encuentra encabezado X-Content-Type-Options Header
Description

El encabezado Anti-MIME-Sniffing X-Content-Type-Options no estaba configurado para 'nosniff'. Esto permite versiones antiguas de Internet Explores y Chrome ejecutar MIME-sniffing en el cuerpo de la respuesta, causando potencialmente que el cuerpo de respuesta sea interpretado y desarrollado como un tipo de contenido diferente que el tipo de contenido declarado. Estos (principios de 2014) y versiones antiguas de Firefox preferiblemente usarán el tipo de contenido declarado (si hay uno establecido), antes que ejecutar el MIME-Sniffing.

URLhttps://siscoca.ruralytierras.gob.bo/api/tipo_proy_obra
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta/fill/%7B%22ruta_id%22:492%7D
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/proyecto/showfill
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/autorizacion_cpv
MethodPOST
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta/fill/%7B%22ruta_id%22:395%7D
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta/fill/%7B%22ruta_id%22:405%7D
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/veedor
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/reporte/excel?tipo=hojaruta&fechaini=2020-07-31&fechafin=2020-07-31
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/localidad/fill/%7B%22nombre%22:%22l%22%7D
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta/fill/%7B%22ruta_id%22:324%7D
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta/fill/%7B%22ruta_id%22:146%7D
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/localidad/fill/%7B%22nombre%22:%22l;lm;%22%7D
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/tipo_sancion
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/zona_autorizada/show_fill/%7B%22codigo%22:%22cofhjj%22%7D
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/ruta/5
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/capacitaciones
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta/fill/%7B%22ruta_id%22:139%7D
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta/fill/%7B%22ruta_id%22:154%7D
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/convocatoria
MethodPOST
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/persona/fill/%7B%22id%22:2845%7D
MethodGET
ParameterX-Content-Type-Options
Instances290
Solution

Asegúrese que el servidor de la aplicación/web establezca el encabezado Content-Type apropiadamente, y que esté establecido el encabezado X-Content-Type-Options en 'nosniff' para todas las páginas web.

Si es posible, asegúrese que el último usuario usa un navegador web complatible con los estándares y moderno que no ejecute MIME-sniffing en absoluto, o que pueda ser dirigida por el servidor de la aplicación/web para no ejecutar MIME-sniffing.

Other information

Este inconveniente aún aplica para páginas de error (401, 403, 500, etc) ya que esas páginas a menudo todavía están afectadas por problemas de inyección, en cuyos casos aún hay preocupación de buscadores rastreando páginas fuera de su tipo de contenido verídico. En límite 'alto' este escáner no alertará sobre las respuestas de error al cliente o servidor.

Reference

http://msdn.Microsoft.com/en-us/library/Ie/gg622941%28v=vs.85%29.aspx https://www.owasp.org/index.php/List_of_useful_HTTP_headers

CWE Id16
WASC Id15
Source ID3
Low (Medium)Web Browser XSS Protection Not Enabled
Description

Web Browser XSS Protection is not enabled, or is disabled by the configuration of the 'X-XSS-Protection' HTTP response header on the web server

URLhttps://siscoca.ruralytierras.gob.bo/api/upload/base64_image
MethodPOST
ParameterX-XSS-Protection
URLhttps://siscoca.ruralytierras.gob.bo/proyecto_obras
MethodGET
ParameterX-XSS-Protection
URLhttps://siscoca.ruralytierras.gob.bo/capacitaciones
MethodGET
ParameterX-XSS-Protection
URLhttps://siscoca.ruralytierras.gob.bo/firmas
MethodGET
ParameterX-XSS-Protection
URLhttps://siscoca.ruralytierras.gob.bo/profile
MethodGET
ParameterX-XSS-Protection
URLhttps://siscoca.ruralytierras.gob.bo/productores
MethodGET
ParameterX-XSS-Protection
Instances6
Solution

Ensure that the web browser's XSS filter is enabled, by setting the X-XSS-Protection HTTP response header to '1'.

Other information

The X-XSS-Protection HTTP response header allows the web server to enable or disable the web browser's XSS protection mechanism. The following values would attempt to enable it:

X-XSS-Protection: 1; mode=block

X-XSS-Protection: 1; report=http://www.example.com/xss

The following values would disable it:

X-XSS-Protection: 0

The X-XSS-Protection HTTP response header is currently supported on Internet Explorer, Chrome and Safari (WebKit).

Note that this alert is only raised if the response body could potentially contain an XSS payload (with a text-based content type, with a non-zero length).

Reference

https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet

https://www.veracode.com/blog/2014/03/guidelines-for-setting-security-headers/

CWE Id933
WASC Id14
Source ID3
Low (Medium)Incomplete or No Cache-control and Pragma HTTP Header Set
Description

The cache-control and pragma HTTP header have not been set properly or are missing allowing the browser and proxies to cache content.

URLhttps://siscoca.ruralytierras.gob.bo/api/evento/index
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/consulta
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/puesto_de_control
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/tipo_normativa
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/resolucion_administrativa
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/firmas
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/login
MethodPOST
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/tipo_convocatoria
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/motivoactualizacion
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/central
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/prod_autorizado
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/tipo_persona
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/persona
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/zona_autorizada
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/mercado
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/tipo_prioridad
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/capacitaciones
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/permission
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/control_hoja_ruta/fill/%7B%22hoja_ruta_id%22:37%7D
MethodGET
ParameterCache-Control
Evidenceno-cache, private
URLhttps://siscoca.ruralytierras.gob.bo/api/upload/base64_image
MethodPOST
ParameterCache-Control
Evidenceno-cache, private
Instances72
Solution

Whenever possible ensure the cache-control HTTP header is set with no-cache, no-store, must-revalidate; and that the pragma HTTP header is set with no-cache.

Reference

https://www.owasp.org/index.php/Session_Management_Cheat_Sheet#Web_Content_Caching

CWE Id525
WASC Id13
Source ID3
Low (Medium)X-Content-Type-Options Header Missing
Description

The Anti-MIME-Sniffing header X-Content-Type-Options was not set to 'nosniff'. This allows older versions of Internet Explorer and Chrome to perform MIME-sniffing on the response body, potentially causing the response body to be interpreted and displayed as a content type other than the declared content type. Current (early 2014) and legacy versions of Firefox will use the declared content type (if one is set), rather than performing MIME-sniffing.

URLhttps://siscoca.ruralytierras.gob.bo/api/control_hoja_ruta/fill/%7B%22hoja_ruta_id%22:36%7D
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/municipio/fill/%7B%7D
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/capacitaciones
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/proy_obra
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/firmas
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/control_hoja_ruta/fill/%7B%22hoja_ruta_id%22:37%7D
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/proyecto_obras
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/callcenter
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/central
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/login
MethodPOST
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/tipo_persona
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/localidad
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/entidad_investigacion
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/evento/index
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta/fill/%7B%22ruta_id%22:2%7D
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/consulta
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/provincia/fill/%7B%22departamento_id%22:null%7D
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/fonts/vendor/material-design-icons-icondist/MaterialIcons-Regular.woff2?0509ab09c1b0d2200a4135803c91d6ce
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/pais
MethodGET
ParameterX-Content-Type-Options
URLhttps://siscoca.ruralytierras.gob.bo/api/enlace_institucional
MethodGET
ParameterX-Content-Type-Options
Instances74
Solution

Ensure that the application/web server sets the Content-Type header appropriately, and that it sets the X-Content-Type-Options header to 'nosniff' for all web pages.

If possible, ensure that the end user uses a standards-compliant and modern web browser that does not perform MIME-sniffing at all, or that can be directed by the web application/web server to not perform MIME-sniffing.

Other information

This issue still applies to error type pages (401, 403, 500, etc.) as those pages are often still affected by injection issues, in which case there is still concern for browsers sniffing pages away from their actual content type.

At "High" threshold this scanner will not alert on client or server error responses.

Reference

http://msdn.microsoft.com/en-us/library/ie/gg622941%28v=vs.85%29.aspx

https://www.owasp.org/index.php/List_of_useful_HTTP_headers

CWE Id16
WASC Id15
Source ID3
Low (Medium)Protección de buscador de web XSS no disponible
Description

La protección del buscador de web XSS no está disponible, o está deshabilitada por la configuración de la cabecera de respuesta de HTTP 'X-XSS-Protection' en el servidor de web

URLhttps://siscoca.ruralytierras.gob.bo/api/upload/file
MethodPOST
ParameterX-XSS-Protection
URLhttps://siscoca.ruralytierras.gob.bo/profile
MethodGET
ParameterX-XSS-Protection
URLhttps://siscoca.ruralytierras.gob.bo/api/zona_autorizada/show_fill/%7B%22codigo%22:%22jhjhjkhjkhjkhjkhjhk%22%7D
MethodGET
ParameterX-XSS-Protection
URLhttps://siscoca.ruralytierras.gob.bo/home
MethodGET
ParameterX-XSS-Protection
URLhttps://siscoca.ruralytierras.gob.bo/api/zona_autorizada/show_fill/%7B%22codigo%22:%22cofhjj%22%7D
MethodGET
ParameterX-XSS-Protection
URLhttps://siscoca.ruralytierras.gob.bo/api/zona_autorizada/show_fill/%7B%22codigo%22:%22mlk%22%7D
MethodGET
ParameterX-XSS-Protection
URLhttps://siscoca.ruralytierras.gob.bo/comercializadores
MethodGET
ParameterX-XSS-Protection
URLhttps://siscoca.ruralytierras.gob.bo/capacitaciones
MethodGET
ParameterX-XSS-Protection
URLhttps://siscoca.ruralytierras.gob.bo/api/upload/base64_image
MethodPOST
ParameterX-XSS-Protection
URLhttps://siscoca.ruralytierras.gob.bo/api/zona_autorizada/show_fill/%7B%22codigo%22:%228889998908989%22%7D
MethodGET
ParameterX-XSS-Protection
URLhttps://siscoca.ruralytierras.gob.bo/api/convocatoria/cierreobrafill
MethodGET
ParameterX-XSS-Protection
Instances11
Solution

Asegúrese que el filtro XSS del navegador web está habilitado, estableciendo el encabezado de respuesta HTTP X-XSS-Protection en '1'.

Other information

El encabezado de respuesta HTTP X-XSS-Protection le permite al servidor web habilitar o deshabilitar el mecanismo de protección del navegador web XSS. Los siguientes valores intentan habilitarlo:

X-XSS-Protection: 1; mode=bloqueo

X-XSS-Protection:1; reporte=http://www.example.com/xss

Los siguiente valores lo deshabilitarían:

X-XSS-Protection: 0

El encabezado de respuesta HTTP X-XSS-Protection es actualmente compatible en Internet Explorer, Chrome y Safari (WebKit). Tenga en cuenta que esta alerta solo se produce si el cuerpo de respuesta podría pontecialmente contener una carga útil XSS (con un tipo de contenido basado en texto, con una longitud distinta de cero).

Reference

https://www.OWASP.org/index.php/XSS _ (Cross_Site_Scripting) _Prevention_Cheat_Sheet https://blog.veracode.com/2014/03/guidelines-for-setting-security-headers/

CWE Id933
WASC Id14
Source ID3
Low (Medium)Falta de encabezado Content-Type
Description

El encabezado Content-Type se encuentra faltante o vacío.

URLhttps://siscoca.ruralytierras.gob.bo/models/tiny_face_detector_model-shard1
MethodGET
URLhttps://siscoca.ruralytierras.gob.bo/models/face_landmark_68_tiny_model-shard1
MethodGET
URLhttps://siscoca.ruralytierras.gob.bo/models/face_landmark_68_model-shard1
MethodGET
URLhttps://siscoca.ruralytierras.gob.bo/models/face_recognition_model-shard1
MethodGET
URLhttps://siscoca.ruralytierras.gob.bo/models/face_recognition_model-shard2
MethodGET
URLhttps://siscoca.ruralytierras.gob.bo/models/ssd_mobilenetv1_model-shard2
MethodGET
URLhttps://siscoca.ruralytierras.gob.bo/models/ssd_mobilenetv1_model-shard1
MethodGET
URLhttps://siscoca.ruralytierras.gob.bo/fonts/vendor/material-design-icons-icondist/MaterialIcons-Regular.woff2?0509ab09c1b0d2200a4135803c91d6ce
MethodGET
Instances8
Solution

Asegúrese que cada página establece el correcto y específico valor content-type para que el contenido sea impartido.

Reference

http://msdn.microsoft.com/en-us/library/ie/gg622941%28v=vs.85%29.aspx

CWE Id345
WASC Id12
Source ID3
Low (Medium)Private IP Disclosure
Description

A private IP (such as 10.x.x.x, 172.x.x.x, 192.168.x.x) or an Amazon EC2 private hostname (for example, ip-10-0-56-78) has been found in the HTTP response body. This information might be helpful for further attacks targeting internal systems.

URLhttps://siscoca.ruralytierras.gob.bo/api/role/fill/%7B%22id%22:9%7D
MethodGET
Evidence192.168.10.70
Instances1
Solution

Remove the private IP address from the HTTP response body. For comments, use JSP/ASP/PHP comment instead of HTML/JavaScript comment which can be seen by client browsers.

Other information

192.168.10.70

192.168.70.101

192.168.70.1

Reference

https://tools.ietf.org/html/rfc1918

CWE Id200
WASC Id13
Source ID3
Low (Medium)Divulgación de error de aplicación
Description

Esta página contiene un mensaje de error/advertencia que podría revelar información sensible como la ubicación del archivo que produjo la excepción no controlada. Esta información puede ser usada para lanzas futuros ataques contra la aplicación web. La alerta podría ser una falso positivo si el mensaje de error es encontrado dentro de una página de documentación.

URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta/print/69
MethodGET
EvidenceHTTP/1.1 500 Internal Server Error
Instances1
Solution

Revisar el código de fuente de esta página. Implementación de páginas de error personalizadas. Considerar implementar un mecanismos para proveer una única referencia/identificación de error para el cliente (navegador) mientras insertando los detalles en el sitio del navegador y no exponiéndolos al usuario.

Reference

CWE Id200
WASC Id13
Source ID3
Low (Medium)Application Error Disclosure
Description

This page contains an error/warning message that may disclose sensitive information like the location of the file that produced the unhandled exception. This information can be used to launch further attacks against the web application. The alert could be a false positive if the error message is found inside a documentation page.

URLhttps://siscoca.ruralytierras.gob.bo/api/persona
MethodPOST
EvidenceHTTP/1.1 500 Internal Server Error
Instances1
Solution

Review the source code of this page. Implement custom error pages. Consider implementing a mechanism to provide a unique error reference/identifier to the client (browser) while logging the details on the server side and not exposing them to the user.

Reference

CWE Id200
WASC Id13
Source ID3
Low (Medium)Content-Type Header Missing
Description

The Content-Type header was either missing or empty.

URLhttps://siscoca.ruralytierras.gob.bo/fonts/vendor/material-design-icons-icondist/MaterialIcons-Regular.woff2?0509ab09c1b0d2200a4135803c91d6ce
MethodGET
Instances1
Solution

Ensure each page is setting the specific and appropriate content-type value for the content being delivered.

Reference

http://msdn.microsoft.com/en-us/library/ie/gg622941%28v=vs.85%29.aspx

CWE Id345
WASC Id12
Source ID3
Low (Medium)No se encuentra encabezado X-Content-Type-Options Header
Description

El encabezado Anti-MIME-Sniffing X-Content-Type-Options no estaba configurado para 'nosniff'. Esto permite versiones antiguas de Internet Explores y Chrome ejecutar MIME-sniffing en el cuerpo de la respuesta, causando potencialmente que el cuerpo de respuesta sea interpretado y desarrollado como un tipo de contenido diferente que el tipo de contenido declarado. Estos (principios de 2014) y versiones antiguas de Firefox preferiblemente usarán el tipo de contenido declarado (si hay uno establecido), antes que ejecutar el MIME-Sniffing.

URLhttps://search.services.mozilla.com/1/firefox/78.0.2/release/es-ES/BO/default/default
MethodGET
ParameterX-Content-Type-Options
Instances1
Solution

Asegúrese que el servidor de la aplicación/web establezca el encabezado Content-Type apropiadamente, y que esté establecido el encabezado X-Content-Type-Options en 'nosniff' para todas las páginas web.

Si es posible, asegúrese que el último usuario usa un navegador web complatible con los estándares y moderno que no ejecute MIME-sniffing en absoluto, o que pueda ser dirigida por el servidor de la aplicación/web para no ejecutar MIME-sniffing.

Other information

Este inconveniente aún aplica para páginas de error (401, 403, 500, etc) ya que esas páginas a menudo todavía están afectadas por problemas de inyección, en cuyos casos aún hay preocupación de buscadores rastreando páginas fuera de su tipo de contenido verídico. En límite 'alto' este escáner no alertará sobre las respuestas de error al cliente o servidor.

Reference

http://msdn.Microsoft.com/en-us/library/Ie/gg622941%28v=vs.85%29.aspx https://www.owasp.org/index.php/List_of_useful_HTTP_headers

CWE Id16
WASC Id15
Source ID3
Low (Medium)X-Content-Type-Options Header Missing
Description

The Anti-MIME-Sniffing header X-Content-Type-Options was not set to 'nosniff'. This allows older versions of Internet Explorer and Chrome to perform MIME-sniffing on the response body, potentially causing the response body to be interpreted and displayed as a content type other than the declared content type. Current (early 2014) and legacy versions of Firefox will use the declared content type (if one is set), rather than performing MIME-sniffing.

URLhttps://search.services.mozilla.com/1/firefox/78.0.2/release/es-ES/BO/default/default
MethodGET
ParameterX-Content-Type-Options
Instances1
Solution

Ensure that the application/web server sets the Content-Type header appropriately, and that it sets the X-Content-Type-Options header to 'nosniff' for all web pages.

If possible, ensure that the end user uses a standards-compliant and modern web browser that does not perform MIME-sniffing at all, or that can be directed by the web application/web server to not perform MIME-sniffing.

Other information

This issue still applies to error type pages (401, 403, 500, etc.) as those pages are often still affected by injection issues, in which case there is still concern for browsers sniffing pages away from their actual content type.

At "High" threshold this scanner will not alert on client or server error responses.

Reference

http://msdn.microsoft.com/en-us/library/ie/gg622941%28v=vs.85%29.aspx

https://www.owasp.org/index.php/List_of_useful_HTTP_headers

CWE Id16
WASC Id15
Source ID3
Low (Medium)Incomplete or No Cache-control and Pragma HTTP Header Set
Description

The cache-control and pragma HTTP header have not been set properly or are missing allowing the browser and proxies to cache content.

URLhttps://search.services.mozilla.com/1/firefox/78.0.2/release/es-ES/BO/default/default
MethodGET
ParameterCache-Control
Instances1
Solution

Whenever possible ensure the cache-control HTTP header is set with no-cache, no-store, must-revalidate; and that the pragma HTTP header is set with no-cache.

Reference

https://www.owasp.org/index.php/Session_Management_Cheat_Sheet#Web_Content_Caching

CWE Id525
WASC Id13
Source ID3
Low (Medium)Incompleto o no Cache-control y sistema de encabezado HTTP Pragma
Description

El cache-control y encabezado HTTP Pragma no han sido establecidos apropiadamente o faltan, permitiendo al navegador y servidores proxy almacenar contenido.

URLhttps://search.services.mozilla.com/1/firefox/78.0.2/release/es-ES/BO/default/default
MethodGET
ParameterCache-Control
Instances1
Solution

Siempre que sea posible asegurarse que el encabezado HTTP cache-control está establecido con no-cache, no-store, must-revalidate, y que el encabezado HTTP pragma esté establecido con no-cache.

Reference

https://www.owasp.org/index.php/Session_Management_Cheat_Sheet#Web_Content_Caching

CWE Id525
WASC Id13
Source ID3
Low (Medium)X-Content-Type-Options Header Missing
Description

The Anti-MIME-Sniffing header X-Content-Type-Options was not set to 'nosniff'. This allows older versions of Internet Explorer and Chrome to perform MIME-sniffing on the response body, potentially causing the response body to be interpreted and displayed as a content type other than the declared content type. Current (early 2014) and legacy versions of Firefox will use the declared content type (if one is set), rather than performing MIME-sniffing.

URLhttps://tracking-protection.cdn.mozilla.net/block-flashsubdoc-digest256/1512160865
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/mozstd-trackwhite-digest256/1596062327
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/social-tracking-protection-linkedin-digest256/1564526481
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/social-track-digest256/78.0/1594235398
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/except-flashsubdoc-digest256/1517935265
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/analytics-track-digest256/1595889526
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/base-cryptomining-track-digest256/1559142673
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/social-tracking-protection-linkedin-digest256/78.0/1591202430
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/ads-track-digest256/1595893235
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/base-cryptomining-track-digest256/78.0/1591202430
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/block-flash-digest256/1496263270
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/base-fingerprinting-track-digest256/1595893235
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/mozstd-trackwhite-digest256/78.0/1596064216
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/social-tracking-protection-twitter-digest256/1564526481
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/social-tracking-protection-facebook-digest256/1564526481
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/analytics-track-digest256/78.0/1595891357
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/social-tracking-protection-facebook-digest256/78.0/1591202430
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/ads-track-digest256/78.0/1595891357
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/social-tracking-protection-twitter-digest256/78.0/1591202430
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/content-track-digest256/78.0/1594235398
MethodGET
ParameterX-Content-Type-Options
Instances25
Solution

Ensure that the application/web server sets the Content-Type header appropriately, and that it sets the X-Content-Type-Options header to 'nosniff' for all web pages.

If possible, ensure that the end user uses a standards-compliant and modern web browser that does not perform MIME-sniffing at all, or that can be directed by the web application/web server to not perform MIME-sniffing.

Other information

This issue still applies to error type pages (401, 403, 500, etc.) as those pages are often still affected by injection issues, in which case there is still concern for browsers sniffing pages away from their actual content type.

At "High" threshold this scanner will not alert on client or server error responses.

Reference

http://msdn.microsoft.com/en-us/library/ie/gg622941%28v=vs.85%29.aspx

https://www.owasp.org/index.php/List_of_useful_HTTP_headers

CWE Id16
WASC Id15
Source ID3
Low (Medium)No se encuentra encabezado X-Content-Type-Options Header
Description

El encabezado Anti-MIME-Sniffing X-Content-Type-Options no estaba configurado para 'nosniff'. Esto permite versiones antiguas de Internet Explores y Chrome ejecutar MIME-sniffing en el cuerpo de la respuesta, causando potencialmente que el cuerpo de respuesta sea interpretado y desarrollado como un tipo de contenido diferente que el tipo de contenido declarado. Estos (principios de 2014) y versiones antiguas de Firefox preferiblemente usarán el tipo de contenido declarado (si hay uno establecido), antes que ejecutar el MIME-Sniffing.

URLhttps://tracking-protection.cdn.mozilla.net/social-tracking-protection-linkedin-digest256/78.0/1591202430
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/block-flash-digest256/1496263270
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/social-tracking-protection-linkedin-digest256/1564526481
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/except-flashsubdoc-digest256/1517935265
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/social-track-digest256/1594235398
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/base-cryptomining-track-digest256/1559142673
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/ads-track-digest256/78.0/1595891357
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/google-trackwhite-digest256/1591202430
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/base-fingerprinting-track-digest256/78.0/1595891357
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/except-flash-digest256/1494877265
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/social-tracking-protection-facebook-digest256/78.0/1591202430
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/social-tracking-protection-twitter-digest256/78.0/1591202430
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/allow-flashallow-digest256/1490633678
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/mozstd-trackwhite-digest256/1596062327
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/block-flashsubdoc-digest256/1512160865
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/base-fingerprinting-track-digest256/1595893235
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/except-flashallow-digest256/1490633678
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/social-tracking-protection-facebook-digest256/1564526481
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/mozstd-trackwhite-digest256/78.0/1596064216
MethodGET
ParameterX-Content-Type-Options
URLhttps://tracking-protection.cdn.mozilla.net/social-tracking-protection-twitter-digest256/1564526481
MethodGET
ParameterX-Content-Type-Options
Instances25
Solution

Asegúrese que el servidor de la aplicación/web establezca el encabezado Content-Type apropiadamente, y que esté establecido el encabezado X-Content-Type-Options en 'nosniff' para todas las páginas web.

Si es posible, asegúrese que el último usuario usa un navegador web complatible con los estándares y moderno que no ejecute MIME-sniffing en absoluto, o que pueda ser dirigida por el servidor de la aplicación/web para no ejecutar MIME-sniffing.

Other information

Este inconveniente aún aplica para páginas de error (401, 403, 500, etc) ya que esas páginas a menudo todavía están afectadas por problemas de inyección, en cuyos casos aún hay preocupación de buscadores rastreando páginas fuera de su tipo de contenido verídico. En límite 'alto' este escáner no alertará sobre las respuestas de error al cliente o servidor.

Reference

http://msdn.Microsoft.com/en-us/library/Ie/gg622941%28v=vs.85%29.aspx https://www.owasp.org/index.php/List_of_useful_HTTP_headers

CWE Id16
WASC Id15
Source ID3
Low (Medium)X-Content-Type-Options Header Missing
Description

The Anti-MIME-Sniffing header X-Content-Type-Options was not set to 'nosniff'. This allows older versions of Internet Explorer and Chrome to perform MIME-sniffing on the response body, potentially causing the response body to be interpreted and displayed as a content type other than the declared content type. Current (early 2014) and legacy versions of Firefox will use the declared content type (if one is set), rather than performing MIME-sniffing.

URLhttps://content-signature-2.cdn.mozilla.net/chains/pinning-preload.content-signature.mozilla.org-2020-09-04-17-16-12.chain
MethodGET
ParameterX-Content-Type-Options
URLhttps://content-signature-2.cdn.mozilla.net/chains/onecrl.content-signature.mozilla.org-2020-09-04-17-16-07.chain
MethodGET
ParameterX-Content-Type-Options
URLhttps://content-signature-2.cdn.mozilla.net/chains/remote-settings.content-signature.mozilla.org-2020-09-04-17-16-15.chain
MethodGET
ParameterX-Content-Type-Options
Instances3
Solution

Ensure that the application/web server sets the Content-Type header appropriately, and that it sets the X-Content-Type-Options header to 'nosniff' for all web pages.

If possible, ensure that the end user uses a standards-compliant and modern web browser that does not perform MIME-sniffing at all, or that can be directed by the web application/web server to not perform MIME-sniffing.

Other information

This issue still applies to error type pages (401, 403, 500, etc.) as those pages are often still affected by injection issues, in which case there is still concern for browsers sniffing pages away from their actual content type.

At "High" threshold this scanner will not alert on client or server error responses.

Reference

http://msdn.microsoft.com/en-us/library/ie/gg622941%28v=vs.85%29.aspx

https://www.owasp.org/index.php/List_of_useful_HTTP_headers

CWE Id16
WASC Id15
Source ID3
Low (Medium)No se encuentra encabezado X-Content-Type-Options Header
Description

El encabezado Anti-MIME-Sniffing X-Content-Type-Options no estaba configurado para 'nosniff'. Esto permite versiones antiguas de Internet Explores y Chrome ejecutar MIME-sniffing en el cuerpo de la respuesta, causando potencialmente que el cuerpo de respuesta sea interpretado y desarrollado como un tipo de contenido diferente que el tipo de contenido declarado. Estos (principios de 2014) y versiones antiguas de Firefox preferiblemente usarán el tipo de contenido declarado (si hay uno establecido), antes que ejecutar el MIME-Sniffing.

URLhttps://content-signature-2.cdn.mozilla.net/chains/remote-settings.content-signature.mozilla.org-2020-09-04-17-16-15.chain
MethodGET
ParameterX-Content-Type-Options
Instances1
Solution

Asegúrese que el servidor de la aplicación/web establezca el encabezado Content-Type apropiadamente, y que esté establecido el encabezado X-Content-Type-Options en 'nosniff' para todas las páginas web.

Si es posible, asegúrese que el último usuario usa un navegador web complatible con los estándares y moderno que no ejecute MIME-sniffing en absoluto, o que pueda ser dirigida por el servidor de la aplicación/web para no ejecutar MIME-sniffing.

Other information

Este inconveniente aún aplica para páginas de error (401, 403, 500, etc) ya que esas páginas a menudo todavía están afectadas por problemas de inyección, en cuyos casos aún hay preocupación de buscadores rastreando páginas fuera de su tipo de contenido verídico. En límite 'alto' este escáner no alertará sobre las respuestas de error al cliente o servidor.

Reference

http://msdn.Microsoft.com/en-us/library/Ie/gg622941%28v=vs.85%29.aspx https://www.owasp.org/index.php/List_of_useful_HTTP_headers

CWE Id16
WASC Id15
Source ID3
Low (Medium)Incompleto o no Cache-control y sistema de encabezado HTTP Pragma
Description

El cache-control y encabezado HTTP Pragma no han sido establecidos apropiadamente o faltan, permitiendo al navegador y servidores proxy almacenar contenido.

URLhttps://firefox.settings.services.mozilla.com/v1/buckets/blocklists/collections/gfx?_expected=1480349135384
MethodGET
ParameterCache-Control
Evidenceno-cache, no-store
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/blocklists/collections/addons/changeset?_expected=1595258518841&_since=%221593783156743%22
MethodGET
ParameterCache-Control
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/search-config/changeset?_expected=1595254832070&_since=%221593025575021%22
MethodGET
ParameterCache-Control
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/normandy-recipes-capabilities/changeset?_expected=1596067265849
MethodGET
ParameterCache-Control
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/sites-classification?_expected=1544035467383
MethodGET
ParameterCache-Control
Evidenceno-cache, no-store
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/fxmonitor-breaches/changeset?_expected=1595956649786
MethodGET
ParameterCache-Control
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/language-dictionaries?_expected=1569410800356
MethodGET
ParameterCache-Control
Evidenceno-cache, no-store
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/hijack-blocklists?_expected=1572620201554
MethodGET
ParameterCache-Control
Evidenceno-cache, no-store
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/monitor/collections/changes/records?collection=whats-new-panel&bucket=main
MethodGET
ParameterCache-Control
Evidencemax-age=60
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/url-classifier-skip-urls/changeset?_expected=1594765026508&_since=%221590784809268%22
MethodGET
ParameterCache-Control
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/anti-tracking-url-decoration?_expected=1564511755134
MethodGET
ParameterCache-Control
Evidenceno-cache, no-store
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/whats-new-panel/changeset?_expected=1593530372996
MethodGET
ParameterCache-Control
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/search-default-override-allowlist/changeset?_expected=1595254618540
MethodGET
ParameterCache-Control
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/cfr/changeset?_expected=1595618527799
MethodGET
ParameterCache-Control
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/monitor/collections/changes/records
MethodGET
ParameterCache-Control
Evidencemax-age=60
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/messaging-experiments/changeset?_expected=1595952946159
MethodGET
ParameterCache-Control
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/monitor/collections/changes/records?collection=messaging-experiments&bucket=main
MethodGET
ParameterCache-Control
Evidencemax-age=60
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/blocklists/collections/plugins/changeset?_expected=1594658825158&_since=%221584379093300%22
MethodGET
ParameterCache-Control
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/cfr-fxa/changeset?_expected=1585237415718
MethodGET
ParameterCache-Control
Instances19
Solution

Siempre que sea posible asegurarse que el encabezado HTTP cache-control está establecido con no-cache, no-store, must-revalidate, y que el encabezado HTTP pragma esté establecido con no-cache.

Reference

https://www.owasp.org/index.php/Session_Management_Cheat_Sheet#Web_Content_Caching

CWE Id525
WASC Id13
Source ID3
Low (Medium)Incomplete or No Cache-control and Pragma HTTP Header Set
Description

The cache-control and pragma HTTP header have not been set properly or are missing allowing the browser and proxies to cache content.

URLhttps://firefox.settings.services.mozilla.com/v1/buckets/blocklists/collections/gfx?_expected=1480349135384
MethodGET
ParameterCache-Control
Evidenceno-cache, no-store
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/normandy-recipes-capabilities/changeset?_expected=1596067265849
MethodGET
ParameterCache-Control
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/sites-classification?_expected=1544035467383
MethodGET
ParameterCache-Control
Evidenceno-cache, no-store
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/fxmonitor-breaches/changeset?_expected=1595956649786
MethodGET
ParameterCache-Control
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/hijack-blocklists?_expected=1572620201554
MethodGET
ParameterCache-Control
Evidenceno-cache, no-store
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/cfr/changeset?_expected=1595618527799
MethodGET
ParameterCache-Control
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/messaging-experiments/changeset?_expected=1595952946159
MethodGET
ParameterCache-Control
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/security-state/collections/onecrl?_expected=1591722356162
MethodGET
ParameterCache-Control
Evidenceno-cache, no-store
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/pinning/collections/pins/changeset?_expected=1485794868067
MethodGET
ParameterCache-Control
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/language-dictionaries?_expected=1569410800356
MethodGET
ParameterCache-Control
Evidenceno-cache, no-store
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/search-default-override-allowlist/changeset?_expected=1595254618540
MethodGET
ParameterCache-Control
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/security-state/collections/cert-revocations/changeset?_expected=1595915891792
MethodGET
ParameterCache-Control
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/monitor/collections/changes/records?collection=whats-new-panel&bucket=main
MethodGET
ParameterCache-Control
Evidencemax-age=60
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/url-classifier-skip-urls/changeset?_expected=1594765026508&_since=%221590784809268%22
MethodGET
ParameterCache-Control
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/whats-new-panel/changeset?_expected=1593530372996
MethodGET
ParameterCache-Control
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/monitor/collections/changes/records?collection=messaging-experiments&bucket=main
MethodGET
ParameterCache-Control
Evidencemax-age=60
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/blocklists/collections/addons/changeset?_expected=1595258518841&_since=%221593783156743%22
MethodGET
ParameterCache-Control
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/public-suffix-list/changeset?_expected=1575468539758
MethodGET
ParameterCache-Control
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/monitor/collections/changes/records
MethodGET
ParameterCache-Control
Evidencemax-age=60
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/search-config/changeset?_expected=1595254832070&_since=%221593025575021%22
MethodGET
ParameterCache-Control
Instances24
Solution

Whenever possible ensure the cache-control HTTP header is set with no-cache, no-store, must-revalidate; and that the pragma HTTP header is set with no-cache.

Reference

https://www.owasp.org/index.php/Session_Management_Cheat_Sheet#Web_Content_Caching

CWE Id525
WASC Id13
Source ID3
Low (Medium)X-Content-Type-Options Header Missing
Description

The Anti-MIME-Sniffing header X-Content-Type-Options was not set to 'nosniff'. This allows older versions of Internet Explorer and Chrome to perform MIME-sniffing on the response body, potentially causing the response body to be interpreted and displayed as a content type other than the declared content type. Current (early 2014) and legacy versions of Firefox will use the declared content type (if one is set), rather than performing MIME-sniffing.

URLhttps://shavar.services.mozilla.com/downloads?client=navclient-auto-ffox&appver=78.0&pver=2.2
MethodPOST
ParameterX-Content-Type-Options
Instances1
Solution

Ensure that the application/web server sets the Content-Type header appropriately, and that it sets the X-Content-Type-Options header to 'nosniff' for all web pages.

If possible, ensure that the end user uses a standards-compliant and modern web browser that does not perform MIME-sniffing at all, or that can be directed by the web application/web server to not perform MIME-sniffing.

Other information

This issue still applies to error type pages (401, 403, 500, etc.) as those pages are often still affected by injection issues, in which case there is still concern for browsers sniffing pages away from their actual content type.

At "High" threshold this scanner will not alert on client or server error responses.

Reference

http://msdn.microsoft.com/en-us/library/ie/gg622941%28v=vs.85%29.aspx

https://www.owasp.org/index.php/List_of_useful_HTTP_headers

CWE Id16
WASC Id15
Source ID3
Low (Medium)No se encuentra encabezado X-Content-Type-Options Header
Description

El encabezado Anti-MIME-Sniffing X-Content-Type-Options no estaba configurado para 'nosniff'. Esto permite versiones antiguas de Internet Explores y Chrome ejecutar MIME-sniffing en el cuerpo de la respuesta, causando potencialmente que el cuerpo de respuesta sea interpretado y desarrollado como un tipo de contenido diferente que el tipo de contenido declarado. Estos (principios de 2014) y versiones antiguas de Firefox preferiblemente usarán el tipo de contenido declarado (si hay uno establecido), antes que ejecutar el MIME-Sniffing.

URLhttps://shavar.services.mozilla.com/downloads?client=navclient-auto-ffox&appver=78.0&pver=2.2
MethodPOST
ParameterX-Content-Type-Options
Instances1
Solution

Asegúrese que el servidor de la aplicación/web establezca el encabezado Content-Type apropiadamente, y que esté establecido el encabezado X-Content-Type-Options en 'nosniff' para todas las páginas web.

Si es posible, asegúrese que el último usuario usa un navegador web complatible con los estándares y moderno que no ejecute MIME-sniffing en absoluto, o que pueda ser dirigida por el servidor de la aplicación/web para no ejecutar MIME-sniffing.

Other information

Este inconveniente aún aplica para páginas de error (401, 403, 500, etc) ya que esas páginas a menudo todavía están afectadas por problemas de inyección, en cuyos casos aún hay preocupación de buscadores rastreando páginas fuera de su tipo de contenido verídico. En límite 'alto' este escáner no alertará sobre las respuestas de error al cliente o servidor.

Reference

http://msdn.Microsoft.com/en-us/library/Ie/gg622941%28v=vs.85%29.aspx https://www.owasp.org/index.php/List_of_useful_HTTP_headers

CWE Id16
WASC Id15
Source ID3
Low (Low)Cross Site Scripting Weakness (Reflected in JSON Response)
Description

A XSS attack was reflected in a JSON response, this might leave content consumers vulnerable to attack if they don't appropriately handle the data (response).

URLhttps://siscoca.ruralytierras.gob.bo/api/infraccion
MethodPOST
Parameterseveridad
Attack<script>alert(1);</script>
URLhttps://siscoca.ruralytierras.gob.bo/api/user
MethodPOST
Parameteruser_name
Attack<script>alert(1);</script>
URLhttps://siscoca.ruralytierras.gob.bo/api/role
MethodPOST
Parameterdisplay_name
Attack<script>alert(1);</script>
URLhttps://siscoca.ruralytierras.gob.bo/api/persona
MethodPOST
Parameterfecha_nacimiento
Attack<script>alert(1);</script>
URLhttps://siscoca.ruralytierras.gob.bo/api/persona
MethodPOST
Parameterdomicilio
Attack<script>alert(1);</script>
URLhttps://siscoca.ruralytierras.gob.bo/api/retencion
MethodPOST
Parameterresponsable
Attack<script>alert(1);</script>
URLhttps://siscoca.ruralytierras.gob.bo/api/infraccion
MethodPOST
Parametercodigo
Attack<script>alert(1);</script>
URLhttps://siscoca.ruralytierras.gob.bo/api/user
MethodPOST
Parameterlast_name
Attack<script>alert(1);</script>
URLhttps://siscoca.ruralytierras.gob.bo/api/reporte/excel/?tipo=%3Cscript%3Ealert%281%29%3B%3C%2Fscript%3E&fechaini=2020-07-31&fechafin=2020-07-31
MethodGET
Parametertipo
Attack<script>alert(1);</script>
URLhttps://siscoca.ruralytierras.gob.bo/api/persona
MethodPOST
Parameterdomicilio
Attack<script>alert(1);</script>
URLhttps://siscoca.ruralytierras.gob.bo/api/notificaciones/registro_eventos
MethodPOST
Parameterhora_inicio
Attack<script>alert(1);</script>
URLhttps://siscoca.ruralytierras.gob.bo/api/reporte/excel?tipo=proyecto&fechaini=%3Cscript%3Ealert%281%29%3B%3C%2Fscript%3E&fechafin=2020-07-31
MethodGET
Parameterfechaini
Attack<script>alert(1);</script>
URLhttps://siscoca.ruralytierras.gob.bo/api/persona
MethodPOST
Parameterfotografia
Attack<script>alert(1);</script>
URLhttps://siscoca.ruralytierras.gob.bo/api/central
MethodPOST
Parametercodigo
Attack<script>alert(1);</script>
URLhttps://siscoca.ruralytierras.gob.bo/api/reporte/pdf?tipo=%3Cscript%3Ealert%281%29%3B%3C%2Fscript%3E&fechaini=2020-07-31&fechafin=2020-07-31
MethodGET
Parametertipo
Attack<script>alert(1);</script>
URLhttps://siscoca.ruralytierras.gob.bo/api/persona
MethodPOST
Parametergenero
Attack<script>alert(1);</script>
URLhttps://siscoca.ruralytierras.gob.bo/api/reporte/excel?tipo=%3Cscript%3Ealert%281%29%3B%3C%2Fscript%3E&fechaini=2020-07-31&fechafin=2020-07-31
MethodGET
Parametertipo
Attack<script>alert(1);</script>
URLhttps://siscoca.ruralytierras.gob.bo/api/user
MethodPOST
Parameteruser_name
Attack<script>alert(1);</script>
URLhttps://siscoca.ruralytierras.gob.bo/api/user
MethodPOST
Parametermothers_last_name
Attack<script>alert(1);</script>
URLhttps://siscoca.ruralytierras.gob.bo/api/role
MethodPOST
Parameterdescription
Attack<script>alert(1);</script>
Instances61
Solution

Frase: Arquitectura y Diseño

Utilice una biblioteca o marco comprobado que no acepte que ocura esta debilidad o que proporcione construcciones que permitan que esta debilidad sea mas sencilla de evitar.

Los ejemplos de las bibliotecas y marcos que facilitan el origen de resultados que son codificados de forma correcta incluyen la biblioteca Anti-XSS de Microsoft, el módulo de codificación OWASP ESAPI y Apache Wicket.

Fases: Implementación; Arquitectura y Diseño

Comprenda el contexto en el que se va a utilizar sus datos y la condificación que se va a esperar. Esto es fundamentalmente importante cuando se transmiten los datos entre diferentes componentes o cuando se generan las salidas que pueden comprender múltiples codificaciones al mismo tiempo, como paginas web o mensajes de correos de varias zonas. Estudie todos los protocolos de comunicacón y representaciones de los datos que son esperadas para poder determinar las estrategias de codificación que son necesarias.

Por cualquier dato que se enviará a otra página web, en especial cualquier dato recibido de las entradas externas, utiice la codificación que sea conveniente en todos los caracteres que no sean alfanuméricos.

Consulte la hoja de referencia de prevención de CSS para poder obtener más información detallada de los diferentes tipos de condificación y escape que se requieren.

Fase: Arquitectura y Diseño

Cualquier comprobación de seguridad que se vaya a realizar en el lado del cliente, asegúrese de que estas comprobaciones se encuentre duplicadas en el lado del servidor, para evitar el CWE-602. Los atacantes pueden eludir las comprobaciones del lado del cliente modificando los valores después de que se hayan realizado las comprobaciones, o cambiando al cliente para poder eliminar de forma completa las comprobaciones del lado del cliente. Después, estos valores que fueron modificados serán enviados al servidor.

Si se encuentra disponible, utilice los mecanismos estructurados que apliquen de forma automática la separación entre los datos y códigos. Estos mecanismos pueden otorgar la cotización, codificación y validación relevantes de manera automática, en lugar de confiar en que el desarrollador proporcione esta capacidad en cada uno de los puntos donde se origina la salida.

Fase: Implementación

Para cada una de las páginas web que se origina, utilice y especifique una codificación de caracteres como ISO-8859 o UTF-8. Cuando no se puede especificar una condificación, el navegador web podría selaccionar una codificación distinta adivinando que codificiación está siendo utilizada en verdad por la página web. Esto puede permitir que el navegador web trate varias secuencias como especiales, abriendo al cliente a leves ataques XSS. Consulte CWE-116 para conseguir más mitigaciones con respecto a la codificación/escape.

Para ayudar a mitigar los ataques XSS contra las cookies de la sesión del usuario, es necesario establecer que la cookie de la sesión sea HttpOnly. En navegadores que son compatibles con la característica HttpOnly (como las versiones más actualizadas de internet explorer y firefox), esta característica puede prevenir que la cookie de sesión del usuario sea accesible para las secuencias de comandos del lado del cliente malignas que utilizan document.cookie. Esta no es una solución muy completa, ya que HttpOnly no es compatible con todos los navegadores que hay. Más importante aún, XMLHTTPRequest y otras tecnologías poderosas de navegador otorgan acceso de lectura a los encabezados HTTP, incluido el encabezado Set-Cookie en el cual se establece el indicador HttpOnly.

Asuma que toda la entrada es maliciosa. Utilice una estrategia de validación de entrada "aceptar bien conocidos", es decir, utilice alguna lista blanca de entradas aceptables que se ajuste de forma estricta a las especificaciones. Rechace cualquier entrada que no se adapte de forma estricta a las especificaciones, o cambielas por algo que sí lo haga. No confíe solamente en la búsqueda de entradas maliciosas o malformadas (es decir, no confíe en una lista negra). Sin embargo, las listas negras pueden ser muy útiles para detectar posibles ataques o diagnosticar que entradas están tan malformadas que se deberían rechazar directamente.

Al realizar la validación de entrada, usted debe considerar todas las propiedades potencialmente destacadas, incluida la longitud, el tipo de entrada, el rango completo de valores aceptables, las entradas faltantes o adicionales, la sintaxis, el sentido entre los campos que se encuentran relacionados y la conformidad con todas las reglas comerciales. Como un ejemplo de lógica de las reglas comerciales, "boat"quizás sintácticamente puede ser válido porque solo posee caracteres alfanúmericos, pero no es válido si está esperando como "rojo" o "azul".

Asegurese de hacer la aceptación de las entradas en interfaces que se encuentren bien definidas dentro de la aplicación. Esto ayudará a cuidar la aplicación, incluso si un elemento se utiliza de nuevo o traslada a otro sitio.

Other information

Iniciado con POCA confianza, puesto que el contenido (Content-Type) no es HTML

Reference

http://projects.webappsec.org/Cross-Site-Scripting

http://cwe.mitre.org/data/definitions/79.html

CWE Id79
WASC Id8
Source ID1
Informational (Medium)Information Disclosure - Suspicious Comments
Description

The response appears to contain suspicious comments which may help an attacker.

URLhttps://siscoca.ruralytierras.gob.bo/js/app.js
MethodGET
Instances1
Solution

Remove all comments that return information that may help an attacker and fix any underlying problems they refer to.

Other information

!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=400)}([function(t,e){t.exports=function(t,e,n,r,i,a){var o,s=t=t||{},c=typeof t.default;"object"!==c&&"function"!==c||(o=t,s=t.default);var u,l="function"==typeof s?s.options:s;if(e&&(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0),n&&(l.functional=!0),i&&(l._scopeId=i),a?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},l._ssrRegister=u):r&&(u=r),u){var d=l.functional,f=d?l.render:l.beforeCreate;d?(l._injectStyles=u,l.render=function(t,e){return u.call(e),f(t,e)}):l.beforeCreate=f?[].concat(f,u):[u]}return{esModule:o,exports:s,options:l}}},function(t,e,n){t.exports=n(607)},function(t,e,n){t.exports=n(604)},function(t,e,n){t.exports=n(611)},function(t,e,n){var r=n(12),i=n(37),a=n(27),o=n(28),s=n(38),c=function(t,e,n){var u,l,d,f,h=t&c.F,p=t&c.G,m=t&c.S,v=t&c.P,_=t&c.B,g=p?r:m?r[e]||(r[e]={}):(r[e]||{}).prototype,b=p?i:i[e]||(i[e]={}),y=b.prototype||(b.prototype={});for(u in p&&(n=e),n)d=((l=!h&&g&&void 0!==g[u])?g:n)[u],f=_&&l?s(d,r):v&&"function"==typeof d?s(Function.call,d):d,g&&o(g,u,d,t&c.U),b[u]!=d&&a(b,u,f),v&&y[u]!=d&&(y[u]=d)};r.core=i,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){(function(t){var e;e=function(){"use strict";var e,r;function i(){return e.apply(null,arguments)}function a(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function o(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function s(t){return void 0===t}function c(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function u(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function l(t,e){var n,r=[];for(n=0;n<t.length;++n)r.push(e(t[n],n));return r}function d(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function f(t,e){for(var n in e)d(e,n)&&(t[n]=e[n]);return d(e,"toString")&&(t.toString=e.toString),d(e,"valueOf")&&(t.valueOf=e.valueOf),t}function h(t,e,n,r){return De(t,e,n,r,!0).utc()}function p(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function m(t){if(null==t._isValid){var e=p(t),n=r.call(e.parsedDateParts,function(t){return null!=t}),i=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n);if(t._strict&&(i=i&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return i;t._isValid=i}return t._isValid}function v(t){var e=h(NaN);return null!=t?f(p(e),t):p(e).userInvalidated=!0,e}r=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,r=0;r<n;r++)if(r in e&&t.call(this,e[r],r,e))return!0;return!1};var _=i.momentProperties=[];function g(t,e){var n,r,i;if(s(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),s(e._i)||(t._i=e._i),s(e._f)||(t._f=e._f),s(e._l)||(t._l=e._l),s(e._strict)||(t._strict=e._strict),s(e._tzm)||(t._tzm=e._tzm),s(e._isUTC)||(t._isUTC=e._isUTC),s(e._offset)||(t._offset=e._offset),s(e._pf)||(t._pf=p(e)),s(e._locale)||(t._locale=e._locale),_.length>0)for(n=0;n<_.length;n++)s(i=e[r=_[n]])||(t[r]=i);return t}var b=!1;function y(t){g(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,i.updateOffset(this),b=!1)}function x(t){return t instanceof y||null!=t&&null!=t._isAMomentObject}function w(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function k(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=w(e)),n}function C(t,e,n){var r,i=Math.min(t.length,e.length),a=Math.abs(t.length-e.length),o=0;for(r=0;r<i;r++)(n&&t[r]!==e[r]||!n&&k(t[r])!==k(e[r]))&&o++;return o+a}function E(t){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function S(t,e){var n=!0;return f(function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,t),n){for(var r,a=[],o=0;o<arguments.length;o++){if(r="","object"==typeof arguments[o]){for(var s in r+="\n["+o+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[o];a.push(r)}E(t+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)},e)}var I,M={};function T(t,e){null!=i.deprecationHandler&&i.deprecationHandler(t,e),M[t]||(E(e),M[t]=!0)}function D(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function R(t,e){var n,r=f({},t);for(n in e)d(e,n)&&(o(t[n])&&o(e[n])?(r[n]={},f(r[n],t[n]),f(r[n],e[n])):null!=e[n]?r[n]=e[n]:delete r[n]);for(n in t)d(t,n)&&!d(e,n)&&o(t[n])&&(r[n]=f({},r[n]));return r}function P(t){null!=t&&this.set(t)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,I=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)d(t,e)&&n.push(e);return n};var O={};function L(t,e){var n=t.toLowerCase();O[n]=O[n+"s"]=O[e]=t}function A(t){return"string"==typeof t?O[t]||O[t.toLowerCase()]:void 0}function N(t){var e,n,r={};for(n in t)d(t,n)&&(e=A(n))&&(r[e]=t[n]);return r}var B={};function j(t,e){B[t]=e}function F(t,e,n){var r=""+Math.abs(t),i=e-r.length;return(t>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var Y=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,$=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,z={},V={};function H(t,e,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),t&&(V[t]=i),e&&(V[e[0]]=function(){return F(i.apply(this,arguments),e[1],e[2])}),n&&(V[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function q(t,e){return t.isValid()?(e=W(e,t.localeData()),z[e]=z[e]||function(t){var e,n,r,i=t.match(Y);for(e=0,n=i.length;e<n;e++)V[i[e]]?i[e]=V[i[e]]:i[e]=(r=i[e]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(e){var r,a="";for(r=0;r<n;r++)a+=D(i[r])?i[r].call(e,t):i[r];return a}}(e),z[e](t)):t.localeData().invalidDate()}function W(t,e){var n=5;function r(t){return e.longDateFormat(t)||t}for($.lastIndex=0;n>=0&&$.test(t);)t=t.replace($,r),$.lastIndex=0,n-=1;return t}var U=/\d/,G=/\d\d/,K=/\d{3}/,X=/\d{4}/,J=/[+-]?\d{6}/,Z=/\d\d?/,Q=/\d\d\d\d?/,tt=/\d\d\d\d\d\d?/,et=/\d{1,3}/,nt=/\d{1,4}/,rt=/[+-]?\d{1,6}/,it=/\d+/,at=/[+-]?\d+/,ot=/Z|[+-]\d\d:?\d\d/gi,st=/Z|[+-]\d\d(?::?\d\d)?/gi,ct=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ut={};function lt(t,e,n){ut[t]=D(e)?e:function(t,r){return t&&n?n:e}}function dt(t,e){return d(ut,t)?ut[t](e._strict,e._locale):new RegExp(ft(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,r,i){return e||n||r||i})))}function ft(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var ht={};function pt(t,e){var n,r=e;for("string"==typeof t&&(t=[t]),c(e)&&(r=function(t,n){n[e]=k(t)}),n=0;n<t.length;n++)ht[t[n]]=r}function mt(t,e){pt(t,function(t,n,r,i){r._w=r._w||{},e(t,r._w,r,i)})}function vt(t,e,n){null!=e&&d(ht,t)&&ht[t](e,n._a,n,t)}var _t=0,gt=1,bt=2,yt=3,xt=4,wt=5,kt=6,Ct=7,Et=8;function St(t){return It(t)?366:365}function It(t){return t%4==0&&t%100!=0||t%400==0}H("Y",0,0,function(){var t=this.year();return t<=9999?""+t:"+"+t}),H(0,["YY",2],0,function(){return this.year()%100}),H(0,["YYYY",4],0,"year"),H(0,["YYYYY",5],0,"year"),H(0,["YYYYYY",6,!0],0,"year"),L("year","y"),j("year",1),lt("Y",at),lt("YY",Z,G),lt("YYYY",nt,X),lt("YYYYY",rt,J),lt("YYYYYY",rt,J),pt(["YYYYY","YYYYYY"],_t),pt("YYYY",function(t,e){e[_t]=2===t.length?i.parseTwoDigitYear(t):k(t)}),pt("YY",function(t,e){e[_t]=i.parseTwoDigitYear(t)}),pt("Y",function(t,e){e[_t]=parseInt(t,10)}),i.parseTwoDigitYear=function(t){return k(t)+(k(t)>68?1900:2e3)};var Mt,Tt=Dt("FullYear",!0);function Dt(t,e){return function(n){return null!=n?(Pt(this,t,n),i.updateOffset(this,e),this):Rt(this,t)}}function Rt(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function Pt(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&It(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),Ot(n,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](n))}function Ot(t,e){if(isNaN(t)||isNaN(e))return NaN;var n,r=(e%(n=12)+n)%n;return t+=(e-r)/12,1===r?It(t)?29:28:31-r%7%2}Mt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},H("M",["MM",2],"Mo",function(){return this.month()+1}),H("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),H("MMMM",0,0,function(t){return this.localeData().months(this,t)}),L("month","M"),j("month",8),lt("M",Z),lt("MM",Z,G),lt("MMM",function(t,e){return e.monthsShortRegex(t)}),lt("MMMM",function(t,e){return e.monthsRegex(t)}),pt(["M","MM"],function(t,e){e[gt]=k(t)-1}),pt(["MMM","MMMM"],function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[gt]=i:p(n).invalidMonth=t});var Lt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,At="January_February_March_April_May_June_July_August_September_October_November_December".split("_");var Nt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Bt(t,e){var n;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=k(e);else if(!c(e=t.localeData().monthsParse(e)))return t;return n=Math.min(t.date(),Ot(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function jt(t){return null!=t?(Bt(this,t),i.updateOffset(this,!0),this):Rt(this,"Month")}var Ft=ct;var Yt=ct;function $t(){function t(t,e){return e.length-t.length}var e,n,r=[],i=[],a=[];for(e=0;e<12;e++)n=h([2e3,e]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(r.sort(t),i.sort(t),a.sort(t),e=0;e<12;e++)r[e]=ft(r[e]),i[e]=ft(i[e]);for(e=0;e<24;e++)a[e]=ft(a[e]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function zt(t){var e;if(t<100&&t>=0){var n=Array.prototype.slice.call(arguments);n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)}else e=new Date(Date.UTC.apply(null,arguments));return e}function Vt(t,e,n){var r=7+e-n;return-((7+zt(t,0,r).getUTCDay()-e)%7)+r-1}function Ht(t,e,n,r,i){var a,o,s=1+7*(e-1)+(7+n-r)%7+Vt(t,r,i);return s<=0?o=St(a=t-1)+s:s>St(t)?(a=t+1,o=s-St(t)):(a=t,o=s),{year:a,dayOfYear:o}}function qt(t,e,n){var r,i,a=Vt(t.year(),e,n),o=Math.floor((t.dayOfYear()-a-1)/7)+1;return o<1?r=o+Wt(i=t.year()-1,e,n):o>Wt(t.year(),e,n)?(r=o-Wt(t.year(),e,n),i=t.year()+1):(i=t.year(),r=o),{week:r,year:i}}function Wt(t,e,n){var r=Vt(t,e,n),i=Vt(t+1,e,n);return(St(t)-r+i)/7}H("w",["ww",2],"wo","week"),H("W",["WW",2],"Wo","isoWeek"),L("week","w"),L("isoWeek","W"),j("week",5),j("isoWeek",5),lt("w",Z),lt("ww",Z,G),lt("W",Z),lt("WW",Z,G),mt(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=k(t)});function Ut(t,e){return t.slice(e,7).concat(t.slice(0,e))}H("d",0,"do","day"),H("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),H("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),H("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),H("e",0,0,"weekday"),H("E",0,0,"isoWeekday"),L("day","d"),L("weekday","e"),L("isoWeekday","E"),j("day",11),j("weekday",11),j("isoWeekday",11),lt("d",Z),lt("e",Z),lt("E",Z),lt("dd",function(t,e){return e.weekdaysMinRegex(t)}),lt("ddd",function(t,e){return e.weekdaysShortRegex(t)}),lt("dddd",function(t,e){return e.weekdaysRegex(t)}),mt(["dd","ddd","dddd"],function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);null!=i?e.d=i:p(n).invalidWeekday=t}),mt(["d","e","E"],function(t,e,n,r){e[r]=k(t)});var Gt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Kt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Xt="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var Jt=ct;var Zt=ct;var Qt=ct;function te(){function t(t,e){return e.length-t.length}var e,n,r,i,a,o=[],s=[],c=[],u=[];for(e=0;e<7;e++)n=h([2e3,1]).day(e),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),a=this.weekdays(n,""),o.push(r),s.push(i),c.push(a),u.push(r),u.push(i),u.push(a);for(o.sort(t),s.sort(t),c.sort(t),u.sort(t),e=0;e<7;e++)s[e]=ft(s[e]),c[e]=ft(c[e]),u[e]=ft(u[e]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function ee(){return this.hours()%12||12}function ne(t,e){H(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function re(t,e){return e._meridiemParse}H("H",["HH",2],0,"hour"),H("h",["hh",2],0,ee),H("k",["kk",2],0,function(){return this.hours()||24}),H("hmm",0,0,function(){return""+ee.apply(this)+F(this.minutes(),2)}),H("hmmss",0,0,function(){return""+ee.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)}),H("Hmm",0,0,function(){return""+this.hours()+F(this.minutes(),2)}),H("Hmmss",0,0,function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)}),ne("a",!0),ne("A",!1),L("hour","h"),j("hour",13),lt("a",re),lt("A",re),lt("H",Z),lt("h",Z),lt("k",Z),lt("HH",Z,G),lt("hh",Z,G),lt("kk",Z,G),lt("hmm",Q),lt("hmmss",tt),lt("Hmm",Q),lt("Hmmss",tt),pt(["H","HH"],yt),pt(["k","kk"],function(t,e,n){var r=k(t);e[yt]=24===r?0:r}),pt(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),pt(["h","hh"],function(t,e,n){e[yt]=k(t),p(n).bigHour=!0}),pt("hmm",function(t,e,n){var r=t.length-2;e[yt]=k(t.substr(0,r)),e[xt]=k(t.substr(r)),p(n).bigHour=!0}),pt("hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[yt]=k(t.substr(0,r)),e[xt]=k(t.substr(r,2)),e[wt]=k(t.substr(i)),p(n).bigHour=!0}),pt("Hmm",function(t,e,n){var r=t.length-2;e[yt]=k(t.substr(0,r)),e[xt]=k(t.substr(r))}),pt("Hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[yt]=k(t.substr(0,r)),e[xt]=k(t.substr(r,2)),e[wt]=k(t.substr(i))});var ie,ae=Dt("Hours",!0),oe={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:At,monthsShort:Nt,week:{dow:0,doy:6},weekdays:Gt,weekdaysMin:Xt,weekdaysShort:Kt,meridiemParse:/[ap]\.?m?\.?/i},se={},ce={};function ue(t){return t?t.toLowerCase().replace("_","-"):t}function le(e){var r=null;if(!se[e]&&void 0!==t&&t&&t.exports)try{r=ie._abbr;n(836)("./"+e),de(r)}catch(t){}return se[e]}function de(t,e){var n;return t&&((n=s(e)?he(t):fe(t,e))?ie=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),ie._abbr}function fe(t,e){if(null!==e){var n,r=oe;if(e.abbr=t,null!=se[t])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."),r=se[t]._config;else if(null!=e.parentLocale)if(null!=se[e.parentLocale])r=se[e.parentLocale]._config;else{if(null==(n=le(e.parentLocale)))return ce[e.parentLocale]||(ce[e.parentLocale]=[]),ce[e.parentLocale].push({name:t,config:e}),null;r=n._config}return se[t]=new P(R(r,e)),ce[t]&&ce[t].forEach(function(t){fe(t.name,t.config)}),de(t),se[t]}return delete se[t],null}function he(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return ie;if(!a(t)){if(e=le(t))return e;t=[t]}return function(t){for(var e,n,r,i,a=0;a<t.length;){for(e=(i=ue(t[a]).split("-")).length,n=(n=ue(t[a+1]))?n.split("-"):null;e>0;){if(r=le(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&C(i,n,!0)>=e-1)break;e--}a++}return ie}(t)}function pe(t){var e,n=t._a;return n&&-2===p(t).overflow&&(e=n[gt]<0||n[gt]>11?gt:n[bt]<1||n[bt]>Ot(n[_t],n[gt])?bt:n[yt]<0||n[yt]>24||24===n[yt]&&(0!==n[xt]||0!==n[wt]||0!==n[kt])?yt:n[xt]<0||n[xt]>59?xt:n[wt]<0||n[wt]>59?wt:n[kt]<0||n[kt]>999?kt:-1,p(t)._overflowDayOfYear&&(e<_t||e>bt)&&(e=bt),p(t)._overflowWeeks&&-1===e&&(e=Ct),p(t)._overflowWeekday&&-1===e&&(e=Et),p(t).overflow=e),t}function me(t,e,n){return null!=t?t:null!=e?e:n}function ve(t){var e,n,r,a,o,s=[];if(!t._d){for(r=function(t){var e=new Date(i.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}(t),t._w&&null==t._a[bt]&&null==t._a[gt]&&function(t){var e,n,r,i,a,o,s,c;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)a=1,o=4,n=me(e.GG,t._a[_t],qt(Re(),1,4).year),r=me(e.W,1),((i=me(e.E,1))<1||i>7)&&(c=!0);else{a=t._locale._week.dow,o=t._locale._week.doy;var u=qt(Re(),a,o);n=me(e.gg,t._a[_t],u.year),r=me(e.w,u.week),null!=e.d?((i=e.d)<0||i>6)&&(c=!0):null!=e.e?(i=e.e+a,(e.e<0||e.e>6)&&(c=!0)):i=a}r<1||r>Wt(n,a,o)?p(t)._overflowWeeks=!0:null!=c?p(t)._overflowWeekday=!0:(s=Ht(n,r,i,a,o),t._a[_t]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(o=me(t._a[_t],r[_t]),(t._dayOfYear>St(o)||0===t._dayOfYear)&&(p(t)._overflowDayOfYear=!0),n=zt(o,0,t._dayOfYear),t._a[gt]=n.getUTCMonth(),t._a[bt]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=r[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[yt]&&0===t._a[xt]&&0===t._a[wt]&&0===t._a[kt]&&(t._nextDay=!0,t._a[yt]=0),t._d=(t._useUTC?zt:function(t,e,n,r,i,a,o){var s;return t<100&&t>=0?(s=new Date(t+400,e,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,r,i,a,o),s}).apply(null,s),a=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[yt]=24),t._w&&void 0!==t._w.d&&t._w.d!==a&&(p(t).weekdayMismatch=!0)}}var _e=/^\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)?)?$/,ge=/^\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)?)?$/,be=/Z|[+-]\d\d(?::?\d\d)?/,ye=[["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}/]],xe=[["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/]],we=/^\/?Date\((\-?\d+)/i;function ke(t){var e,n,r,i,a,o,s=t._i,c=_e.exec(s)||ge.exec(s);if(c){for(p(t).iso=!0,e=0,n=ye.length;e<n;e++)if(ye[e][1].exec(c[1])){i=ye[e][0],r=!1!==ye[e][2];break}if(null==i)return void(t._isValid=!1);if(c[3]){for(e=0,n=xe.length;e<n;e++)if(xe[e][1].exec(c[3])){a=(c[2]||" ")+xe[e][0];break}if(null==a)return void(t._isValid=!1)}if(!r&&null!=a)return void(t._isValid=!1);if(c[4]){if(!be.exec(c[4]))return void(t._isValid=!1);o="Z"}t._f=i+(a||"")+(o||""),Me(t)}else t._isValid=!1}var Ce=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function Ee(t,e,n,r,i,a){var o=[function(t){var e=parseInt(t,10);if(e<=49)return 2e3+e;if(e<=999)return 1900+e;return e}(t),Nt.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&o.push(parseInt(a,10)),o}var Se={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ie(t){var e=Ce.exec(t._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(e){var n=Ee(e[4],e[3],e[2],e[5],e[6],e[7]);if(!function(t,e,n){return!t||Kt.indexOf(t)===new Date(e[0],e[1],e[2]).getDay()||(p(n).weekdayMismatch=!0,n._isValid=!1,!1)}(e[1],n,t))return;t._a=n,t._tzm=function(t,e,n){if(t)return Se[t];if(e)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(e[8],e[9],e[10]),t._d=zt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),p(t).rfc2822=!0}else t._isValid=!1}function Me(t){if(t._f!==i.ISO_8601)if(t._f!==i.RFC_2822){t._a=[],p(t).empty=!0;var e,n,r,a,o,s=""+t._i,c=s.length,u=0;for(r=W(t._f,t._locale).match(Y)||[],e=0;e<r.length;e++)a=r[e],(n=(s.match(dt(a,t))||[])[0])&&((o=s.substr(0,s.indexOf(n))).length>0&&p(t).unusedInput.push(o),s=s.slice(s.indexOf(n)+n.length),u+=n.length),V[a]?(n?p(t).empty=!1:p(t).unusedTokens.push(a),vt(a,n,t)):t._strict&&!n&&p(t).unusedTokens.push(a);p(t).charsLeftOver=c-u,s.length>0&&p(t).unusedInput.push(s),t._a[yt]<=12&&!0===p(t).bigHour&&t._a[yt]>0&&(p(t).bigHour=void 0),p(t).parsedDateParts=t._a.slice(0),p(t).meridiem=t._meridiem,t._a[yt]=function(t,e,n){var r;if(null==n)return e;return null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?((r=t.isPM(n))&&e<12&&(e+=12),r||12!==e||(e=0),e):e}(t._locale,t._a[yt],t._meridiem),ve(t),pe(t)}else Ie(t);else ke(t)}function Te(t){var e=t._i,n=t._f;return t._locale=t._locale||he(t._l),null===e||void 0===n&&""===e?v({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),x(e)?new y(pe(e)):(u(e)?t._d=e:a(n)?function(t){var e,n,r,i,a;if(0===t._f.length)return p(t).invalidFormat=!0,void(t._d=new Date(NaN));for(i=0;i<t._f.length;i++)a=0,e=g({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[i],Me(e),m(e)&&(a+=p(e).charsLeftOver,a+=10*p(e).unusedTokens.length,p(e).score=a,(null==r||a<r)&&(r=a,n=e));f(t,n||e)}(t):n?Me(t):function(t){var e=t._i;s(e)?t._d=new Date(i.now()):u(e)?t._d=new Date(e.valueOf()):"string"==typeof e?function(t){var e=we.exec(t._i);null===e?(ke(t),!1===t._isValid&&(delete t._isValid,Ie(t),!1===t._isValid&&(delete t._isValid,i.createFromInputFallback(t)))):t._d=new Date(+e[1])}(t):a(e)?(t._a=l(e.slice(0),function(t){return parseInt(t,10)}),ve(t)):o(e)?function(t){if(!t._d){var e=N(t._i);t._a=l([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),ve(t)}}(t):c(e)?t._d=new Date(e):i.createFromInputFallback(t)}(t),m(t)||(t._d=null),t))}function De(t,e,n,r,i){var s,c={};return!0!==n&&!1!==n||(r=n,n=void 0),(o(t)&&function(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}(t)||a(t)&&0===t.length)&&(t=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=i,c._l=n,c._i=t,c._f=e,c._strict=r,(s=new y(pe(Te(c))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Re(t,e,n,r){return De(t,e,n,r,!1)}i.createFromInputFallback=S("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),i.ISO_8601=function(){},i.RFC_2822=function(){};var Pe=S("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Re.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:v()}),Oe=S("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Re.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:v()});function Le(t,e){var n,r;if(1===e.length&&a(e[0])&&(e=e[0]),!e.length)return Re();for(n=e[0],r=1;r<e.length;++r)e[r].isValid()&&!e[r][t](n)||(n=e[r]);return n}var Ae=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ne(t){var e=N(t),n=e.year||0,r=e.quarter||0,i=e.month||0,a=e.week||e.isoWeek||0,o=e.day||0,s=e.hour||0,c=e.minute||0,u=e.second||0,l=e.millisecond||0;this._isValid=function(t){for(var e in t)if(-1===Mt.call(Ae,e)||null!=t[e]&&isNaN(t[e]))return!1;for(var n=!1,r=0;r<Ae.length;++r)if(t[Ae[r]]){if(n)return!1;parseFloat(t[Ae[r]])!==k(t[Ae[r]])&&(n=!0)}return!0}(e),this._milliseconds=+l+1e3*u+6e4*c+1e3*s*60*60,this._days=+o+7*a,this._months=+i+3*r+12*n,this._data={},this._locale=he(),this._bubble()}function Be(t){return t instanceof Ne}function je(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Fe(t,e){H(t,0,0,function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+F(~~(t/60),2)+e+F(~~t%60,2)})}Fe("Z",":"),Fe("ZZ",""),lt("Z",st),lt("ZZ",st),pt(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=$e(st,t)});var Ye=/([\+\-]|\d\d)/gi;function $e(t,e){var n=(e||"").match(t);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(Ye)||["-",0,0],i=60*r[1]+k(r[2]);return 0===i?0:"+"===r[0]?i:-i}function ze(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(x(t)||u(t)?t.valueOf():Re(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),i.updateOffset(n,!1),n):Re(t).local()}function Ve(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function He(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}i.updateOffset=function(){};var qe=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,We=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ue(t,e){var n,r,i,a=t,o=null;return Be(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:c(t)?(a={},e?a[e]=t:a.milliseconds=t):(o=qe.exec(t))?(n="-"===o[1]?-1:1,a={y:0,d:k(o[bt])*n,h:k(o[yt])*n,m:k(o[xt])*n,s:k(o[wt])*n,ms:k(je(1e3*o[kt]))*n}):(o=We.exec(t))?(n="-"===o[1]?-1:1,a={y:Ge(o[2],n),M:Ge(o[3],n),w:Ge(o[4],n),d:Ge(o[5],n),h:Ge(o[6],n),m:Ge(o[7],n),s:Ge(o[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=function(t,e){var n;if(!t.isValid()||!e.isValid())return{milliseconds:0,months:0};e=ze(e,t),t.isBefore(e)?n=Ke(t,e):((n=Ke(e,t)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(Re(a.from),Re(a.to)),(a={}).ms=i.milliseconds,a.M=i.months),r=new Ne(a),Be(t)&&d(t,"_locale")&&(r._locale=t._locale),r}function Ge(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Ke(t,e){var n={};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Xe(t,e){return function(n,r){var i;return null===r||isNaN(+r)||(T(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),Je(this,Ue(n="string"==typeof n?+n:n,r),t),this}}function Je(t,e,n,r){var a=e._milliseconds,o=je(e._days),s=je(e._months);t.isValid()&&(r=null==r||r,s&&Bt(t,Rt(t,"Month")+s*n),o&&Pt(t,"Date",Rt(t,"Date")+o*n),a&&t._d.setTime(t._d.valueOf()+a*n),r&&i.updateOffset(t,o||s))}Ue.fn=Ne.prototype,Ue.invalid=function(){return Ue(NaN)};var Ze=Xe(1,"add"),Qe=Xe(-1,"subtract");function tn(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,"months");return-(n+(e-r<0?(e-r)/(r-t.clone().add(n-1,"months")):(e-r)/(t.clone().add(n+1,"months")-r)))||0}function en(t){var e;return void 0===t?this._locale._abbr:(null!=(e=he(t))&&(this._locale=e),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var nn=S("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});function rn(){return this._locale}var an=1e3,on=60*an,sn=60*on,cn=3506328*sn;function un(t,e){return(t%e+e)%e}function ln(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-cn:new Date(t,e,n).valueOf()}function dn(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-cn:Date.UTC(t,e,n)}function fn(t,e){H(0,[t,t.length],0,e)}function hn(t,e,n,r,i){var a;return null==t?qt(this,r,i).year:(e>(a=Wt(t,r,i))&&(e=a),function(t,e,n,r,i){var a=Ht(t,e,n,r,i),o=zt(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}.call(this,t,e,n,r,i))}H(0,["gg",2],0,function(){return this.weekYear()%100}),H(0,["GG",2],0,function(){return this.isoWeekYear()%100}),fn("gggg","weekYear"),fn("ggggg","weekYear"),fn("GGGG","isoWeekYear"),fn("GGGGG","isoWeekYear"),L("weekYear","gg"),L("isoWeekYear","GG"),j("weekYear",1),j("isoWeekYear",1),lt("G",at),lt("g",at),lt("GG",Z,G),lt("gg",Z,G),lt("GGGG",nt,X),lt("gggg",nt,X),lt("GGGGG",rt,J),lt("ggggg",rt,J),mt(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,r){e[r.substr(0,2)]=k(t)}),mt(["gg","GG"],function(t,e,n,r){e[r]=i.parseTwoDigitYear(t)}),H("Q",0,"Qo","quarter"),L("quarter","Q"),j("quarter",7),lt("Q",U),pt("Q",function(t,e){e[gt]=3*(k(t)-1)}),H("D",["DD",2],"Do","date"),L("date","D"),j("date",9),lt("D",Z),lt("DD",Z,G),lt("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),pt(["D","DD"],bt),pt("Do",function(t,e){e[bt]=k(t.match(Z)[0])});var pn=Dt("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear"),L("dayOfYear","DDD"),j("dayOfYear",4),lt("DDD",et),lt("DDDD",K),pt(["DDD","DDDD"],function(t,e,n){n._dayOfYear=k(t)}),H("m",["mm",2],0,"minute"),L("minute","m"),j("minute",14),lt("m",Z),lt("mm",Z,G),pt(["m","mm"],xt);var mn=Dt("Minutes",!1);H("s",["ss",2],0,"second"),L("second","s"),j("second",15),lt("s",Z),lt("ss",Z,G),pt(["s","ss"],wt);var vn,_n=Dt("Seconds",!1);for(H("S",0,0,function(){return~~(this.millisecond()/100)}),H(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),H(0,["SSS",3],0,"millisecond"),H(0,["SSSS",4],0,function(){return 10*this.millisecond()}),H(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),H(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),H(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),H(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),H(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),L("millisecond","ms"),j("millisecond",16),lt("S",et,U),lt("SS",et,G),lt("SSS",et,K),vn="SSSS";vn.length<=9;vn+="S")lt(vn,it);function gn(t,e){e[kt]=k(1e3*("0."+t))}for(vn="S";vn.length<=9;vn+="S")pt(vn,gn);var bn=Dt("Milliseconds",!1);H("z",0,0,"zoneAbbr"),H("zz",0,0,"zoneName");var yn=y.prototype;function xn(t){return t}yn.add=Ze,yn.calendar=function(t,e){var n=t||Re(),r=ze(n,this).startOf("day"),a=i.calendarFormat(this,r)||"sameElse",o=e&&(D(e[a])?e[a].call(this,n):e[a]);return this.format(o||this.localeData().calendar(a,this,Re(n)))},yn.clone=function(){return new y(this)},yn.diff=function(t,e,n){var r,i,a;if(!this.isValid())return NaN;if(!(r=ze(t,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),e=A(e)){case"year":a=tn(this,r)/12;break;case"month":a=tn(this,r);break;case"quarter":a=tn(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-i)/864e5;break;case"week":a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:w(a)},yn.endOf=function(t){var e;if(void 0===(t=A(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?dn:ln;switch(t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=sn-un(e+(this._isUTC?0:this.utcOffset()*on),sn)-1;break;case"minute":e=this._d.valueOf(),e+=on-un(e,on)-1;break;case"second":e=this._d.valueOf(),e+=an-un(e,an)-1}return this._d.setTime(e),i.updateOffset(this,!0),this},yn.format=function(t){t||(t=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var e=q(this,t);return this.localeData().postformat(e)},yn.from=function(t,e){return this.isValid()&&(x(t)&&t.isValid()||Re(t).isValid())?Ue({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},yn.fromNow=function(t){return this.from(Re(),t)},yn.to=function(t,e){return this.isValid()&&(x(t)&&t.isValid()||Re(t).isValid())?Ue({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},yn.toNow=function(t){return this.to(Re(),t)},yn.get=function(t){return D(this[t=A(t)])?this[t]():this},yn.invalidAt=function(){return p(this).overflow},yn.isAfter=function(t,e){var n=x(t)?t:Re(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=A(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())},yn.isBefore=function(t,e){var n=x(t)?t:Re(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=A(e)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())},yn.isBetween=function(t,e,n,r){var i=x(t)?t:Re(t),a=x(e)?e:Re(e);return!!(this.isValid()&&i.isValid()&&a.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(a,n):!this.isAfter(a,n))},yn.isSame=function(t,e){var n,r=x(t)?t:Re(t);return!(!this.isValid()||!r.isValid())&&("millisecond"===(e=A(e)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))},yn.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},yn.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},yn.isValid=function(){return m(this)},yn.lang=nn,yn.locale=en,yn.localeData=rn,yn.max=Oe,yn.min=Pe,yn.parsingFlags=function(){return f({},p(this))},yn.set=function(t,e){if("object"==typeof t)for(var n=function(t){var e=[];for(var n in t)e.push({unit:n,priority:B[n]});return e.sort(function(t,e){return t.priority-e.priority}),e}(t=N(t)),r=0;r<n.length;r++)this[n[r].unit](t[n[r].unit]);else if(D(this[t=A(t)]))return this[t](e);return this},yn.startOf=function(t){var e;if(void 0===(t=A(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?dn:ln;switch(t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=un(e+(this._isUTC?0:this.utcOffset()*on),sn);break;case"minute":e=this._d.valueOf(),e-=un(e,on);break;case"second":e=this._d.valueOf(),e-=un(e,an)}return this._d.setTime(e),i.updateOffset(this,!0),this},yn.subtract=Qe,yn.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},yn.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},yn.toDate=function(){return new Date(this.valueOf())},yn.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,n=e?this.clone().utc():this;return n.year()<0||n.year()>9999?q(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):D(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",q(n,"Z")):q(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},yn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=e+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)},yn.toJSON=function(){return this.isValid()?this.toISOString():null},yn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},yn.unix=function(){return Math.floor(this.valueOf()/1e3)},yn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},yn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},yn.year=Tt,yn.isLeapYear=function(){return It(this.year())},yn.weekYear=function(t){return hn.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},yn.isoWeekYear=function(t){return hn.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},yn.quarter=yn.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},yn.month=jt,yn.daysInMonth=function(){return Ot(this.year(),this.month())},yn.week=yn.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},yn.isoWeek=yn.isoWeeks=function(t){var e=qt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},yn.weeksInYear=function(){var t=this.localeData()._week;return Wt(this.year(),t.dow,t.doy)},yn.isoWeeksInYear=function(){return Wt(this.year(),1,4)},yn.date=pn,yn.day=yn.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=function(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}(t,this.localeData()),this.add(t-e,"d")):e},yn.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},yn.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=function(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7},yn.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},yn.hour=yn.hours=ae,yn.minute=yn.minutes=mn,yn.second=yn.seconds=_n,yn.millisecond=yn.milliseconds=bn,yn.utcOffset=function(t,e,n){var r,a=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=$e(st,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(r=Ve(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),a!==t&&(!e||this._changeInProgress?Je(this,Ue(t-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?a:Ve(this)},yn.utc=function(t){return this.utcOffset(0,t)},yn.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ve(this),"m")),this},yn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=$e(ot,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},yn.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?Re(t).utcOffset():0,(this.utcOffset()-t)%60==0)},yn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},yn.isLocal=function(){return!!this.isValid()&&!this._isUTC},yn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},yn.isUtc=He,yn.isUTC=He,yn.zoneAbbr=function(){return this._isUTC?"UTC":""},yn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},yn.dates=S("dates accessor is deprecated. Use date instead.",pn),yn.months=S("months accessor is deprecated. Use month instead",jt),yn.years=S("years accessor is deprecated. Use year instead",Tt),yn.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}),yn.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={};if(g(t,this),(t=Te(t))._a){var e=t._isUTC?h(t._a):Re(t._a);this._isDSTShifted=this.isValid()&&C(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted});var wn=P.prototype;function kn(t,e,n,r){var i=he(),a=h().set(r,e);return i[n](a,t)}function Cn(t,e,n){if(c(t)&&(e=t,t=void 0),t=t||"",null!=e)return kn(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=kn(t,r,n,"month");return i}function En(t,e,n,r){"boolean"==typeof t?(c(e)&&(n=e,e=void 0),e=e||""):(n=e=t,t=!1,c(e)&&(n=e,e=void 0),e=e||"");var i,a=he(),o=t?a._week.dow:0;if(null!=n)return kn(e,(n+o)%7,r,"day");var s=[];for(i=0;i<7;i++)s[i]=kn(e,(i+o)%7,r,"day");return s}wn.calendar=function(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return D(r)?r.call(e,n):r},wn.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])},wn.invalidDate=function(){return this._invalidDate},wn.ordinal=function(t){return this._ordinal.replace("%d",t)},wn.preparse=xn,wn.postformat=xn,wn.relativeTime=function(t,e,n,r){var i=this._relativeTime[n];return D(i)?i(t,e,n,r):i.replace(/%d/i,t)},wn.pastFuture=function(t,e){var n=this._relativeTime[t>0?"future":"past"];return D(n)?n(e):n.replace(/%s/i,e)},wn.set=function(t){var e,n;for(n in t)D(e=t[n])?this[n]=e:this["_"+n]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},wn.months=function(t,e){return t?a(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Lt).test(e)?"format":"standalone"][t.month()]:a(this._months)?this._months:this._months.standalone},wn.monthsShort=function(t,e){return t?a(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Lt.test(e)?"format":"standalone"][t.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},wn.monthsParse=function(t,e,n){var r,i,a;if(this._monthsParseExact)return function(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=h([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(i=Mt.call(this._shortMonthsParse,o))?i:null:-1!==(i=Mt.call(this._longMonthsParse,o))?i:null:"MMM"===e?-1!==(i=Mt.call(this._shortMonthsParse,o))?i:-1!==(i=Mt.call(this._longMonthsParse,o))?i:null:-1!==(i=Mt.call(this._longMonthsParse,o))?i:-1!==(i=Mt.call(this._shortMonthsParse,o))?i:null}.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=h([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}},wn.monthsRegex=function(t){return this._monthsParseExact?(d(this,"_monthsRegex")||$t.call(this),t?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=Yt),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},wn.monthsShortRegex=function(t){return this._monthsParseExact?(d(this,"_monthsRegex")||$t.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=Ft),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},wn.week=function(t){return qt(t,this._week.dow,this._week.doy).week},wn.firstDayOfYear=function(){return this._week.doy},wn.firstDayOfWeek=function(){return this._week.dow},wn.weekdays=function(t,e){var n=a(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Ut(n,this._week.dow):t?n[t.day()]:n},wn.weekdaysMin=function(t){return!0===t?Ut(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},wn.weekdaysShort=function(t){return!0===t?Ut(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},wn.weekdaysParse=function(t,e,n){var r,i,a;if(this._weekdaysParseExact)return function(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=h([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(i=Mt.call(this._weekdaysParse,o))?i:null:"ddd"===e?-1!==(i=Mt.call(this._shortWeekdaysParse,o))?i:null:-1!==(i=Mt.call(this._minWeekdaysParse,o))?i:null:"dddd"===e?-1!==(i=Mt.call(this._weekdaysParse,o))?i:-1!==(i=Mt.call(this._shortWeekdaysParse,o))?i:-1!==(i=Mt.call(this._minWeekdaysParse,o))?i:null:"ddd"===e?-1!==(i=Mt.call(this._shortWeekdaysParse,o))?i:-1!==(i=Mt.call(this._weekdaysParse,o))?i:-1!==(i=Mt.call(this._minWeekdaysParse,o))?i:null:-1!==(i=Mt.call(this._minWeekdaysParse,o))?i:-1!==(i=Mt.call(this._weekdaysParse,o))?i:-1!==(i=Mt.call(this._shortWeekdaysParse,o))?i:null}.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=h([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[r].test(t))return r;if(n&&"ddd"===e&&this._shortWeekdaysParse[r].test(t))return r;if(n&&"dd"===e&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}},wn.weekdaysRegex=function(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||te.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=Jt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},wn.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||te.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Zt),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},wn.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||te.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Qt),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},wn.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},wn.meridiem=function(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"},de("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===k(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),i.lang=S("moment.lang is deprecated. Use moment.locale instead.",de),i.langData=S("moment.langData is deprecated. Use moment.localeData instead.",he);var Sn=Math.abs;function In(t,e,n,r){var i=Ue(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function Mn(t){return t<0?Math.floor(t):Math.ceil(t)}function Tn(t){return 4800*t/146097}function Dn(t){return 146097*t/4800}function Rn(t){return function(){return this.as(t)}}var Pn=Rn("ms"),On=Rn("s"),Ln=Rn("m"),An=Rn("h"),Nn=Rn("d"),Bn=Rn("w"),jn=Rn("M"),Fn=Rn("Q"),Yn=Rn("y");function $n(t){return function(){return this.isValid()?this._data[t]:NaN}}var zn=$n("milliseconds"),Vn=$n("seconds"),Hn=$n("minutes"),qn=$n("hours"),Wn=$n("days"),Un=$n("months"),Gn=$n("years");var Kn=Math.round,Xn={ss:44,s:45,m:45,h:22,d:26,M:11};var Jn=Math.abs;function Zn(t){return(t>0)-(t<0)||+t}function Qn(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n=Jn(this._milliseconds)/1e3,r=Jn(this._days),i=Jn(this._months);e=w((t=w(n/60))/60),n%=60,t%=60;var a=w(i/12),o=i%=12,s=r,c=e,u=t,l=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var f=d<0?"-":"",h=Zn(this._months)!==Zn(d)?"-":"",p=Zn(this._days)!==Zn(d)?"-":"",m=Zn(this._milliseconds)!==Zn(d)?"-":"";return f+"P"+(a?h+a+"Y":"")+(o?h+o+"M":"")+(s?p+s+"D":"")+(c||u||l?"T":"")+(c?m+c+"H":"")+(u?m+u+"M":"")+(l?m+l+"S":"")}var tr=Ne.prototype;return tr.isValid=function(){return this._isValid},tr.abs=function(){var t=this._data;return this._milliseconds=Sn(this._milliseconds),this._days=Sn(this._days),this._months=Sn(this._months),t.milliseconds=Sn(t.milliseconds),t.seconds=Sn(t.seconds),t.minutes=Sn(t.minutes),t.hours=Sn(t.hours),t.months=Sn(t.months),t.years=Sn(t.years),this},tr.add=function(t,e){return In(this,t,e,1)},tr.subtract=function(t,e){return In(this,t,e,-1)},tr.as=function(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if("month"===(t=A(t))||"quarter"===t||"year"===t)switch(e=this._days+r/864e5,n=this._months+Tn(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(Dn(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 1440*e+r/6e4;case"second":return 86400*e+r/1e3;case"millisecond":return Math.floor(864e5*e)+r;default:throw new Error("Unknown unit "+t)}},tr.asMilliseconds=Pn,tr.asSeconds=On,tr.asMinutes=Ln,tr.asHours=An,tr.asDays=Nn,tr.asWeeks=Bn,tr.asMonths=jn,tr.asQuarters=Fn,tr.asYears=Yn,tr.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},tr._bubble=function(){var t,e,n,r,i,a=this._milliseconds,o=this._days,s=this._months,c=this._data;return a>=0&&o>=0&&s>=0||a<=0&&o<=0&&s<=0||(a+=864e5*Mn(Dn(s)+o),o=0,s=0),c.milliseconds=a%1e3,t=w(a/1e3),c.seconds=t%60,e=w(t/60),c.minutes=e%60,n=w(e/60),c.hours=n%24,s+=i=w(Tn(o+=w(n/24))),o-=Mn(Dn(i)),r=w(s/12),s%=12,c.days=o,c.months=s,c.years=r,this},tr.clone=function(){return Ue(this)},tr.get=function(t){return t=A(t),this.isValid()?this[t+"s"]():NaN},tr.milliseconds=zn,tr.seconds=Vn,tr.minutes=Hn,tr.hours=qn,tr.days=Wn,tr.weeks=function(){return w(this.days()/7)},tr.months=Un,tr.years=Gn,tr.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),n=function(t,e,n){var r=Ue(t).abs(),i=Kn(r.as("s")),a=Kn(r.as("m")),o=Kn(r.as("h")),s=Kn(r.as("d")),c=Kn(r.as("M")),u=Kn(r.as("y")),l=i<=Xn.ss&&["s",i]||i<Xn.s&&["ss",i]||a<=1&&["m"]||a<Xn.m&&["mm",a]||o<=1&&["h"]||o<Xn.h&&["hh",o]||s<=1&&["d"]||s<Xn.d&&["dd",s]||c<=1&&["M"]||c<Xn.M&&["MM",c]||u<=1&&["y"]||["yy",u];return l[2]=e,l[3]=+t>0,l[4]=n,function(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}.apply(null,l)}(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)},tr.toISOString=Qn,tr.toString=Qn,tr.toJSON=Qn,tr.locale=en,tr.localeData=rn,tr.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Qn),tr.lang=nn,H("X",0,0,"unix"),H("x",0,0,"valueOf"),lt("x",at),lt("X",/[+-]?\d+(\.\d{1,3})?/),pt("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),pt("x",function(t,e,n){n._d=new Date(k(t))}),i.version="2.24.0",e=Re,i.fn=yn,i.min=function(){return Le("isBefore",[].slice.call(arguments,0))},i.max=function(){return Le("isAfter",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=h,i.unix=function(t){return Re(1e3*t)},i.months=function(t,e){return Cn(t,e,"months")},i.isDate=u,i.locale=de,i.invalid=v,i.duration=Ue,i.isMoment=x,i.weekdays=function(t,e,n){return En(t,e,n,"weekdays")},i.parseZone=function(){return Re.apply(null,arguments).parseZone()},i.localeData=he,i.isDuration=Be,i.monthsShort=function(t,e){return Cn(t,e,"monthsShort")},i.weekdaysMin=function(t,e,n){return En(t,e,n,"weekdaysMin")},i.defineLocale=fe,i.updateLocale=function(t,e){if(null!=e){var n,r,i=oe;null!=(r=le(t))&&(i=r._config),(n=new P(e=R(i,e))).parentLocale=se[t],se[t]=n,de(t)}else null!=se[t]&&(null!=se[t].parentLocale?se[t]=se[t].parentLocale:null!=se[t]&&delete se[t]);return se[t]},i.locales=function(){return I(se)},i.weekdaysShort=function(t,e,n){return En(t,e,n,"weekdaysShort")},i.normalizeUnits=A,i.relativeTimeRounding=function(t){return void 0===t?Kn:"function"==typeof t&&(Kn=t,!0)},i.relativeTimeThreshold=function(t,e){return void 0!==Xn[t]&&(void 0===e?Xn[t]:(Xn[t]=e,"s"===t&&(Xn.ss=e-1),!0))},i.calendarFormat=function(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=yn,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i},t.exports=e()}).call(e,n(340)(t))},function(t,e,n){var r=n(0)(n(704),n(705),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";e.c=function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},n.d(e,"a",function(){return i}),e.b=function(t,e,n,r){return new(n||(n=Promise))(function(i,a){function o(t){try{c(r.next(t))}catch(t){a(t)}}function s(t){try{c(r.throw(t))}catch(t){a(t)}}function c(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(o,s)}c((r=r.apply(t,e||[])).next())})},e.d=function(t,e){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}};var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)}},function(t,e,n){var r=n(14);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){"use strict";(function(t,r,i,a){n.d(e,"e",function(){return Cl}),n.d(e,"a",function(){return ht}),n.d(e,"n",function(){return Su}),n.d(e,"d",function(){return Xo}),n.d(e,"g",function(){return fa}),n.d(e,"h",function(){return hs}),n.d(e,"i",function(){return vs}),n.d(e,"w",function(){return _s}),n.d(e,"o",function(){return bs}),n.d(e,"q",function(){return Ts}),n.d(e,"c",function(){return Ds}),n.d(e,"y",function(){return Ps}),n.d(e,"z",function(){return As}),n.d(e,"f",function(){return ho}),n.d(e,"k",function(){return _o}),n.d(e,"s",function(){return ko}),n.d(e,"x",function(){return Io}),n.d(e,"p",function(){return Vs}),n.d(e,"b",function(){return sc}),n.d(e,"j",function(){return dc}),n.d(e,"r",function(){return yc}),n.d(e,"C",function(){return Sc}),n.d(e,"t",function(){return Bc}),n.d(e,"l",function(){return La}),n.d(e,"u",function(){return Wa}),n.d(e,"B",function(){return Ka}),n.d(e,"I",function(){return Xa}),n.d(e,"K",function(){return Za}),n.d(e,"m",function(){return Ae}),n.d(e,"v",function(){return Me}),n.d(e,"D",function(){return Te}),n.d(e,"E",function(){return De}),n.d(e,"F",function(){return Re}),n.d(e,"G",function(){return Pe}),n.d(e,"L",function(){return Le}),n.d(e,"J",function(){return Fc}),n.d(e,"A",function(){return we}),n.d(e,"H",function(){return Gt});var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function s(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var c=function(){return(c=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function u(t,e,n,r){return new(n||(n=Promise))(function(i,a){function o(t){try{c(r.next(t))}catch(t){a(t)}}function s(t){try{c(r.throw(t))}catch(t){a(t)}}function c(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(o,s)}c((r=r.apply(t,e||[])).next())})}function l(t,e){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}var d={},f={alpha:!1,antialias:!1,premultipliedAlpha:!1,preserveDrawingBuffer:!1,depth:!1,stencil:!1,failIfMajorPerformanceCaveat:!0};function h(t){t in d||(d[t]=function(t){if(1!==t&&2!==t)throw new Error("Cannot get WebGL rendering context, WebGL is disabled.");var e=document.createElement("canvas");return e.addEventListener("webglcontextlost",function(e){e.preventDefault(),delete d[t]},!1),1===t?e.getContext("webgl",f)||e.getContext("experimental-webgl",f):e.getContext("webgl2",f)}(t));var e=d[t];return e.isContextLost()?(delete d[t],h(t)):(e.disable(e.DEPTH_TEST),e.disable(e.STENCIL_TEST),e.disable(e.BLEND),e.disable(e.DITHER),e.disable(e.POLYGON_OFFSET_FILL),e.disable(e.SAMPLE_COVERAGE),e.enable(e.SCISSOR_TEST),e.enable(e.CULL_FACE),e.cullFace(e.BACK),d[t])}function p(t){for(var e=t.length,n=0,r=0;e>0;)r=Math.random()*e|0,n=t[--e],t[e]=t[r],t[r]=n}function m(t,e,n){return Math.max(t,Math.min(e,n))}function v(t){return t%2==0?t:t+1}function _(t){for(var e=0,n=0;n<t.length;n++)e+=t[n];return e}function g(t,e){var n=Math.random();return e*n+(1-n)*t}function b(t,e){if(!t)throw new Error("string"==typeof e?e:e())}function y(t,e,n){void 0===n&&(n=""),b(C(t,e),function(){return n+" Shapes "+t+" and "+e+" must match"})}function x(t){b(null!=t,function(){return"The input to the tensor constructor must be a non-null value."})}function w(t,e){if(void 0===e&&(e=[]),null==e&&(e=[]),Array.isArray(t)||j(t))for(var n=0;n<t.length;++n)w(t[n],e);else e.push(t);return e}function k(t){if(0===t.length)return 1;for(var e=t[0],n=1;n<t.length;n++)e*=t[n];return e}function C(t,e){if(t===e)return!0;if(null==t||null==e)return!1;if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function E(t){return t%1==0}function S(t){if(null!=Math.tanh)return Math.tanh(t);if(t===1/0)return 1;if(t===-1/0)return-1;var e=Math.exp(2*t);return(e-1)/(e+1)}function I(t){var e=Math.ceil(Math.sqrt(t));return[e,Math.ceil(t/e)]}function M(t,e){return e<=t.length?t:t+" ".repeat(e-t.length)}function T(t,e,n){return void 0===e&&(e=function(t){return 0}),new Promise(function(r,i){var a=0,o=function(){if(t())r();else{var s=e(++a);null!=n&&a>=n?i():setTimeout(o,s)}};o()})}function D(t,e){for(var n=1,r=-1,i=0;i<t.length;++i)if(t[i]>=0)n*=t[i];else if(-1===t[i]){if(-1!==r)throw Error("Shapes can only have 1 implicit size. Found -1 at dim "+r+" and dim "+i);r=i}else if(t[i]<0)throw Error("Shapes can not be < 0. Found "+t[i]+" at dim "+i);if(-1===r){if(e>0&&e!==n)throw Error("Size("+e+") must match the product of shape "+t);return t}if(0===n)throw Error("Cannot infer the missing size in ["+t+"] when there are 0 elements");if(e%n!=0)throw Error("The implicit shape can't be a fractional number. Got "+e+" / "+n);var a=t.slice();return a[r]=e/n,a}function R(t,e){var n=e.length;return b((t=null==t?e.map(function(t,e){return e}):[].concat(t)).every(function(t){return t>=-n&&t<n}),function(){return"All values in axis param must be in range [-"+n+", "+n+") but got axis "+t}),b(t.every(function(t){return E(t)}),function(){return"All values in axis param must be integers but got axis "+t}),t.map(function(t){return t<0?n+t:t})}function P(t,e){for(var n=[],r=[],i=null==e?null:R(e,t).sort(),a=0,o=0;o<t.length;++o){if(null!=i){if(i[a]===o&&1!==t[o])throw new Error("Can't squeeze axis "+o+" since its dim '"+t[o]+"' is not 1");(null==i[a]||i[a]>o)&&1===t[o]&&(n.push(t[o]),r.push(o)),i[a]<=o&&a++}1!==t[o]&&(n.push(t[o]),r.push(o))}return{newShape:n,keptDims:r}}function O(t,e){var n=null;if(null==t||"float32"===t)n=new Float32Array(e);else if("int32"===t)n=new Int32Array(e);else{if("bool"!==t)throw new Error("Unknown data type "+t);n=new Uint8Array(e)}return n}function L(t,e){var n=null;if(null==t||"float32"===t)n=new Float32Array(e);else if("int32"===t)n=new Int32Array(e);else if("bool"===t)n=new Uint8Array(e);else{if("string"!==t)throw new Error("Unknown data type "+t);n=new Array(e)}return n}function A(t,e,n){if("float32"===e)for(var r=0;r<t.length;r++){var i=t[r];if(isNaN(i)||!isFinite(i))throw Error("The result of the '"+n+"' is "+i+".")}}function N(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(isNaN(r)||!isFinite(r))throw Error("A tensor of type "+e+" being uploaded contains "+r+".")}}function B(t,e){return!("complex64"===e||"float32"===e&&"complex64"!==t||"int32"===e&&"float32"!==t&&"complex64"!==t||"bool"===e&&"bool"===t)}function j(t){return t instanceof Float32Array||t instanceof Int32Array||t instanceof Uint8Array}function F(t){if("float32"===t||"int32"===t)return 4;if("complex64"===t)return 8;if("bool"===t)return 1;throw new Error("Unknown dtype "+t)}function Y(t){if(null==t)return 0;var e=0;return t.forEach(function(t){return e+=2*t.length}),e}function $(t){return"string"==typeof t||t instanceof String}function z(t){return"boolean"==typeof t}function V(t){return"number"==typeof t}function H(t){return Array.isArray(t)?H(t[0]):t instanceof Float32Array?"float32":t instanceof Int32Array||t instanceof Uint8Array?"int32":V(t)?"float32":$(t)?"string":z(t)?"bool":"float32"}function q(t){return!!(t&&t.constructor&&t.call&&t.apply)}function W(t,e){for(var n=e;n<t;++n)if(t%n==0)return n;return t}function U(t){var e=t.length;if(e<2)return[];var n=new Array(e-1);n[e-2]=t[e-1];for(var r=e-3;r>=0;--r)n[r]=n[r+1]*t[r+1];return n}function G(t,e,n){if("string"===e)throw new Error("Cannot convert a string[] to a TypedArray");if(Array.isArray(t)&&(t=w(t)),n&&N(t,e),function(t,e){return t instanceof Float32Array&&"float32"===e||t instanceof Int32Array&&"int32"===e||t instanceof Uint8Array&&"bool"===e}(t,e))return t;if(null==e||"float32"===e||"complex64"===e)return new Float32Array(t);if("int32"===e)return new Int32Array(t);if("bool"===e){for(var r=new Uint8Array(t.length),i=0;i<r.length;++i)0!==Math.round(t[i])&&(r[i]=1);return r}throw new Error("Unknown data type "+e)}function K(t,e){if(0===t.length)return e[0];var n=t.reduce(function(t,e){return t*e});if(0===n)return[];if(n!==e.length)throw new Error("["+t+"] does not match the input size.");return function t(e,n,r){var i=new Array;if(1===n.length)for(var a=n[0],o=0;o<a;o++)i[o]=r[e+o];else{a=n[0];var s=n.slice(1),c=s.reduce(function(t,e){return t*e});for(o=0;o<a;o++)i[o]=t(e+o*c,s,r)}return i}(0,t,e)}function X(t,e){for(var n=J(t,e),r=0;r<n.length;r++)n[r]=1;return n}function J(t,e){if(null==e||"float32"===e||"complex64"===e)return new Float32Array(t);if("int32"===e)return new Int32Array(t);if("bool"===e)return new Uint8Array(t);throw new Error("Unknown data type "+e)}function Z(){if("undefined"!=typeof performance)return performance.now();if(void 0!==t){var e=t.hrtime();return 1e3*e[0]+e[1]/1e6}throw new Error("Cannot measure time in this environment. You should run tf.js in the browser or in Node.js")}function Q(t){t.forEach(function(e){b(Number.isInteger(e)&&e>=0,function(){return"Tensor must have a shape comprised of positive integers but got shape ["+t+"]."})})}Object.freeze({shuffle:p,clamp:m,nearestLargerEven:v,sum:_,randUniform:g,distSquared:function(t,e){for(var n=0,r=0;r<t.length;r++){var i=Number(t[r])-Number(e[r]);n+=i*i}return n},assert:b,assertShapesMatch:y,assertNonNull:x,flatten:w,sizeFromShape:k,isScalarShape:function(t){return 0===t.length},arraysEqual:C,isInt:E,tanh:S,sizeToSquarishShape:I,createShuffledIndices:function(t){for(var e=new Uint32Array(t),n=0;n<t;++n)e[n]=n;return p(e),e},rightPad:M,repeatedTry:T,inferFromImplicitShape:D,parseAxisParam:R,squeezeShape:P,getTypedArrayFromDType:O,getArrayFromDType:L,checkComputationForErrors:A,checkConversionForErrors:N,hasEncodingLoss:B,isTypedArray:j,bytesPerElement:F,bytesFromStringArray:Y,isString:$,isBoolean:z,isNumber:V,inferDtype:H,isFunction:q,nearestDivisor:W,computeStrides:U,toTypedArray:G,toNestedArray:K,makeOnesTypedArray:X,makeZerosTypedArray:J,now:Z,assertNonNegativeIntegerDimensions:Q});var tt=function(){function t(t,e){this.backendTimer=t,this.logger=e,null==e&&(this.logger=new et)}return t.prototype.profileKernel=function(t,e){var n,r=this,i=this.backendTimer.time(function(){n=e()});return(Array.isArray(n)?n:[n]).forEach(function(e){var n=e.dataSync();A(n,e.dtype,t),i.then(function(i){var a="";null!=i.getExtraProfileInfo&&(a=i.getExtraProfileInfo()),r.logger.logKernelProfile(t,e,n,i.kernelMs,a)})}),n},t}(),et=function(){function t(){}return t.prototype.logKernelProfile=function(t,e,n,r,i){var a=M(r+"ms",9),o=M(t,25),s=e.rank,c=e.size,u=M(e.shape.toString(),14);console.log("%c"+o+"\t%c"+a+"\t%c"+s+"D "+u+"\t%c"+c+"\t%c"+i,"font-weight:bold","color:red","color:blue","color: orange","color: green")},t}(),nt=20,rt=3,it=7;function at(t,e,n,r){var i=U(e),a=function(t,e,n,r){var i=k(e),a=r[r.length-1],o=new Array(a).fill(0),s=e.length,c="complex64"===n?ct(t):t;if(s>1)for(var u=0;u<i/a;u++)for(var l=u*a,d=0;d<a;d++)o[d]=Math.max(o[d],ot(c[l+d],0,n).length);return o}(t,e,n,i),o=e.length,s=function t(e,n,r,i,a,o){void 0===o&&(o=!0);var s="complex64"===r?2:1,c=n[0],u=n.length;if(0===u)return"complex64"===r?[ot(ct(e)[0],0,r)]:"bool"===r?[st(e[0])]:[e[0].toString()];if(1===u){if(c>nt){var l=rt*s,d=Array.from(e.slice(0,l)),f=Array.from(e.slice(c-rt*s,c));return"complex64"===r&&(d=ct(d),f=ct(f)),["["+d.map(function(t,e){return ot(t,a[e],r)}).join(", ")+", ..., "+f.map(function(t,e){return ot(t,a[c-rt+e],r)}).join(", ")+"]"]}return["["+("complex64"===r?ct(e):Array.from(e)).map(function(t,e){return ot(t,a[e],r)}).join(", ")+"]"]}var h=n.slice(1),p=i.slice(1),m=i[0]*s,v=[];if(c>nt){for(var _=0;_<rt;_++){var g=(b=_*m)+m;v.push.apply(v,t(e.slice(b,g),h,r,p,a,!1))}for(v.push("..."),_=c-rt;_<c;_++)g=(b=_*m)+m,v.push.apply(v,t(e.slice(b,g),h,r,p,a,_===c-1))}else for(_=0;_<c;_++){var b;g=(b=_*m)+m,v.push.apply(v,t(e.slice(b,g),h,r,p,a,_===c-1))}var y=2===u?",":"";v[0]="["+v[0]+y;for(_=1;_<v.length-1;_++)v[_]=" "+v[_]+y;var x=",\n";for(_=2;_<u;_++)x+="\n";return v[v.length-1]=" "+v[v.length-1]+"]"+(o?"":x),v}(t,e,n,i,a),c=["Tensor"];return r&&(c.push(" dtype: "+n),c.push(" rank: "+o),c.push(" shape: ["+e+"]"),c.push(" values:")),c.push(s.map(function(t){return" "+t}).join("\n")),c.join("\n")}function ot(t,e,n){return M(Array.isArray(t)?parseFloat(t[0].toFixed(it))+" + "+parseFloat(t[1].toFixed(it))+"j":$(t)?"'"+t+"'":"bool"===n?st(t):parseFloat(t.toFixed(it)).toString(),e)}function st(t){return 0===t?"false":"true"}function ct(t){for(var e=[],n=0;n<t.length;n+=2)e.push([t[n],t[n+1]]);return e}var ut=function(){function t(t,e,n){var r=this;if(this.dtype=e,this.shape=t.slice(),this.size=k(t),null!=n){var i=n.length;b(i===this.size,function(){return"Length of values '"+i+"' does not match the size inferred by the shape '"+r.size+"'."})}if("complex64"===e)throw new Error("complex64 dtype TensorBuffers are not supported. Please create a TensorBuffer for the real and imaginary parts separately and call tf.complex(real, imag).");this.values=n||L(e,this.size),this.strides=U(t)}return t.prototype.set=function(t){for(var e=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];0===n.length&&(n=[0]),b(n.length===this.rank,function(){return"The number of provided coordinates ("+n.length+") must match the rank ("+e.rank+")"});var i=this.locToIndex(n);this.values[i]=t},t.prototype.get=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];0===t.length&&(t=[0]);for(var n=0,r=0,i=t;r<i.length;r++){var a=i[r];if(a<0||a>=this.shape[n]){var o="Requested out of range element at "+t+". Buffer shape="+this.shape;throw new Error(o)}n++}for(var s=t[t.length-1],c=0;c<t.length-1;++c)s+=this.strides[c]*t[c];return this.values[s]},t.prototype.locToIndex=function(t){if(0===this.rank)return 0;if(1===this.rank)return t[0];for(var e=t[t.length-1],n=0;n<t.length-1;++n)e+=this.strides[n]*t[n];return e},t.prototype.indexToLoc=function(t){if(0===this.rank)return[];if(1===this.rank)return[t];for(var e=new Array(this.shape.length),n=0;n<e.length-1;++n)e[n]=Math.floor(t/this.strides[n]),t-=e[n]*this.strides[n];return e[e.length-1]=t,e},Object.defineProperty(t.prototype,"rank",{get:function(){return this.shape.length},enumerable:!0,configurable:!0}),t.prototype.toTensor=function(){return ht.make(this.shape,{values:this.values},this.dtype)},t}(),lt=null,dt=null,ft=null;var ht=function(){function t(t,e,n,r,i){this.kept=!1,this.isDisposedInternal=!1,this.shape=t.slice(),this.dtype=e||"float32",this.size=k(t),this.strides=U(t),this.dataId=null!=r?r:{},this.id=lt().nextTensorId(),this.rankType=this.rank<5?this.rank.toString():"higher",lt().registerTensor(this,i),null!=n&&lt().write(this.dataId,n)}return t.make=function(e,n,r,i){return new t(e,r,n.values,n.dataId,i)},t.prototype.flatten=function(){return this.throwIfDisposed(),this.as1D()},t.prototype.asScalar=function(){return this.throwIfDisposed(),b(1===this.size,function(){return"The array must have only 1 element."}),this.reshape([])},t.prototype.as1D=function(){return this.throwIfDisposed(),this.reshape([this.size])},t.prototype.as2D=function(t,e){return this.throwIfDisposed(),this.reshape([t,e])},t.prototype.as3D=function(t,e,n){return this.throwIfDisposed(),this.reshape([t,e,n])},t.prototype.as4D=function(t,e,n,r){return this.throwIfDisposed(),this.reshape([t,e,n,r])},t.prototype.as5D=function(t,e,n,r,i){return this.throwIfDisposed(),this.reshape([t,e,n,r,i])},t.prototype.asType=function(t){return this.throwIfDisposed(),dt.cast(this,t)},Object.defineProperty(t.prototype,"rank",{get:function(){return this.shape.length},enumerable:!0,configurable:!0}),t.prototype.buffer=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return[4,this.data()];case 1:return t=e.sent(),[2,dt.buffer(this.shape,this.dtype,t)]}})})},t.prototype.bufferSync=function(){return dt.buffer(this.shape,this.dtype,this.dataSync())},t.prototype.array=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return[4,this.data()];case 1:return t=e.sent(),[2,K(this.shape,t)]}})})},t.prototype.arraySync=function(){return K(this.shape,this.dataSync())},t.prototype.data=function(){return u(this,void 0,void 0,function(){return l(this,function(t){return this.throwIfDisposed(),[2,lt().read(this.dataId)]})})},t.prototype.dataSync=function(){return this.throwIfDisposed(),lt().readSync(this.dataId)},t.prototype.dispose=function(){this.isDisposed||(lt().disposeTensor(this),this.isDisposedInternal=!0)},Object.defineProperty(t.prototype,"isDisposed",{get:function(){return this.isDisposedInternal},enumerable:!0,configurable:!0}),t.prototype.throwIfDisposed=function(){if(this.isDisposed)throw new Error("Tensor is disposed.")},t.prototype.toFloat=function(){return this.asType("float32")},t.prototype.toInt=function(){return this.asType("int32")},t.prototype.toBool=function(){return this.asType("bool")},t.prototype.print=function(t){return void 0===t&&(t=!1),dt.print(this,t)},t.prototype.reshape=function(t){return this.throwIfDisposed(),dt.reshape(this,t)},t.prototype.reshapeAs=function(t){return this.throwIfDisposed(),this.reshape(t.shape)},t.prototype.expandDims=function(t){return void 0===t&&(t=0),dt.expandDims(this,t)},t.prototype.cumsum=function(t,e,n){return void 0===t&&(t=0),void 0===e&&(e=!1),void 0===n&&(n=!1),dt.cumsum(this,t,e,n)},t.prototype.squeeze=function(t){return this.throwIfDisposed(),dt.squeeze(this,t)},t.prototype.clone=function(){return this.throwIfDisposed(),dt.clone(this)},t.prototype.oneHot=function(t,e,n){return this.throwIfDisposed(),dt.oneHot(this,t,e,n)},t.prototype.toString=function(t){return void 0===t&&(t=!1),at(this.dataSync(),this.shape,this.dtype,t)},t.prototype.tile=function(t){return this.throwIfDisposed(),dt.tile(this,t)},t.prototype.gather=function(t,e){return void 0===e&&(e=0),this.throwIfDisposed(),dt.gather(this,t,e)},t.prototype.matMul=function(t,e,n){return void 0===e&&(e=!1),void 0===n&&(n=!1),this.throwIfDisposed(),dt.matMul(this,t,e,n)},t.prototype.dot=function(t){return this.throwIfDisposed(),dt.dot(this,t)},t.prototype.norm=function(t,e,n){return void 0===t&&(t="euclidean"),void 0===e&&(e=null),void 0===n&&(n=!1),this.throwIfDisposed(),dt.norm(this,t,e,n)},t.prototype.slice=function(t,e){return this.throwIfDisposed(),dt.slice(this,t,e)},t.prototype.reverse=function(t){return this.throwIfDisposed(),dt.reverse(this,t)},t.prototype.concat=function(e,n){return void 0===n&&(n=0),this.throwIfDisposed(),e instanceof t&&(e=[e]),dt.concat([this].concat(e),n)},t.prototype.split=function(t,e){return void 0===e&&(e=0),this.throwIfDisposed(),dt.split(this,t,e)},t.prototype.stack=function(t,e){return void 0===e&&(e=0),dt.stack([this,t],e)},t.prototype.unstack=function(t){return void 0===t&&(t=0),dt.unstack(this,t)},t.prototype.pad=function(t,e){return void 0===e&&(e=0),dt.pad(this,t,e)},t.prototype.batchNormalization=function(t,e,n,r,i){return void 0===n&&(n=.001),ft("tf.batchNormalization() is going away. Use tf.batchNorm() instead, and note the positional argument change of scale, offset, and varianceEpsilon"),this.batchNorm(t,e,i,r,n)},t.prototype.batchNorm=function(t,e,n,r,i){return void 0===i&&(i=.001),this.throwIfDisposed(),dt.batchNorm(this,t,e,n,r,i)},t.prototype.all=function(t,e){return void 0===t&&(t=null),void 0===e&&(e=!1),this.throwIfDisposed(),dt.all(this,t,e)},t.prototype.any=function(t,e){return void 0===t&&(t=null),void 0===e&&(e=!1),this.throwIfDisposed(),dt.any(this,t,e)},t.prototype.logSumExp=function(t,e){return void 0===t&&(t=null),void 0===e&&(e=!1),this.throwIfDisposed(),dt.logSumExp(this,t,e)},t.prototype.sum=function(t,e){return void 0===t&&(t=null),void 0===e&&(e=!1),this.throwIfDisposed(),dt.sum(this,t,e)},t.prototype.prod=function(t,e){return void 0===t&&(t=null),void 0===e&&(e=!1),this.throwIfDisposed(),dt.prod(this,t,e)},t.prototype.mean=function(t,e){return void 0===t&&(t=null),void 0===e&&(e=!1),this.throwIfDisposed(),dt.mean(this,t,e)},t.prototype.min=function(t,e){return void 0===t&&(t=null),void 0===e&&(e=!1),this.throwIfDisposed(),dt.min(this,t,e)},t.prototype.max=function(t,e){return void 0===t&&(t=null),void 0===e&&(e=!1),this.throwIfDisposed(),dt.max(this,t,e)},t.prototype.argMin=function(t){return void 0===t&&(t=null),this.throwIfDisposed(),dt.argMin(this,t)},t.prototype.argMax=function(t){return void 0===t&&(t=null),this.throwIfDisposed(),dt.argMax(this,t)},t.prototype.cast=function(t){return this.throwIfDisposed(),dt.cast(this,t)},t.prototype.add=function(t){return this.throwIfDisposed(),dt.add(this,t)},t.prototype.addStrict=function(t){return this.throwIfDisposed(),dt.addStrict(this,t)},t.prototype.atan2=function(t){return this.throwIfDisposed(),dt.atan2(this,t)},t.prototype.sub=function(t){return this.throwIfDisposed(),dt.sub(this,t)},t.prototype.subStrict=function(t){return this.throwIfDisposed(),dt.subStrict(this,t)},t.prototype.pow=function(t){return this.throwIfDisposed(),dt.pow(this,t)},t.prototype.powStrict=function(t){return this.throwIfDisposed(),dt.powStrict(this,t)},t.prototype.mul=function(t){return this.throwIfDisposed(),dt.mul(this,t)},t.prototype.mulStrict=function(t){return this.throwIfDisposed(),dt.mulStrict(this,t)},t.prototype.div=function(t){return this.throwIfDisposed(),dt.div(this,t)},t.prototype.floorDiv=function(t){return this.throwIfDisposed(),dt.floorDiv(this,t)},t.prototype.divStrict=function(t){return this.throwIfDisposed(),dt.divStrict(this,t)},t.prototype.minimum=function(t){return this.throwIfDisposed(),dt.minimum(this,t)},t.prototype.minimumStrict=function(t){return this.throwIfDisposed(),dt.minimumStrict(this,t)},t.prototype.maximum=function(t){return this.throwIfDisposed(),dt.maximum(this,t)},t.prototype.maximumStrict=function(t){return this.throwIfDisposed(),dt.maximumStrict(this,t)},t.prototype.mod=function(t){return this.throwIfDisposed(),dt.mod(this,t)},t.prototype.modStrict=function(t){return this.throwIfDisposed(),dt.modStrict(this,t)},t.prototype.squaredDifference=function(t){return this.throwIfDisposed(),dt.squaredDifference(this,t)},t.prototype.squaredDifferenceStrict=function(t){return this.throwIfDisposed(),dt.squaredDifferenceStrict(this,t)},t.prototype.transpose=function(t){return this.throwIfDisposed(),dt.transpose(this,t)},t.prototype.notEqual=function(t){return this.throwIfDisposed(),dt.notEqual(this,t)},t.prototype.notEqualStrict=function(t){return this.throwIfDisposed(),dt.notEqualStrict(this,t)},t.prototype.less=function(t){return this.throwIfDisposed(),dt.less(this,t)},t.prototype.lessStrict=function(t){return this.throwIfDisposed(),dt.lessStrict(this,t)},t.prototype.equal=function(t){return this.throwIfDisposed(),dt.equal(this,t)},t.prototype.equalStrict=function(t){return this.throwIfDisposed(),dt.equalStrict(this,t)},t.prototype.lessEqual=function(t){return this.throwIfDisposed(),dt.lessEqual(this,t)},t.prototype.lessEqualStrict=function(t){return this.throwIfDisposed(),dt.lessEqualStrict(this,t)},t.prototype.greater=function(t){return this.throwIfDisposed(),dt.greater(this,t)},t.prototype.greaterStrict=function(t){return this.throwIfDisposed(),dt.greaterStrict(this,t)},t.prototype.greaterEqual=function(t){return this.throwIfDisposed(),dt.greaterEqual(this,t)},t.prototype.greaterEqualStrict=function(t){return this.throwIfDisposed(),dt.greaterEqualStrict(this,t)},t.prototype.logicalAnd=function(t){return this.throwIfDisposed(),dt.logicalAnd(this,t)},t.prototype.logicalOr=function(t){return this.throwIfDisposed(),dt.logicalOr(this,t)},t.prototype.logicalNot=function(){return this.throwIfDisposed(),dt.logicalNot(this)},t.prototype.logicalXor=function(t){return this.throwIfDisposed(),dt.logicalXor(this,t)},t.prototype.where=function(t,e){return this.throwIfDisposed(),dt.where(t,this,e)},t.prototype.neg=function(){return this.throwIfDisposed(),dt.neg(this)},t.prototype.ceil=function(){return this.throwIfDisposed(),dt.ceil(this)},t.prototype.floor=function(){return this.throwIfDisposed(),dt.floor(this)},t.prototype.sign=function(){return this.throwIfDisposed(),dt.sign(this)},t.prototype.exp=function(){return this.throwIfDisposed(),dt.exp(this)},t.prototype.expm1=function(){return this.throwIfDisposed(),dt.expm1(this)},t.prototype.log=function(){return this.throwIfDisposed(),dt.log(this)},t.prototype.log1p=function(){return this.throwIfDisposed(),dt.log1p(this)},t.prototype.sqrt=function(){return this.throwIfDisposed(),dt.sqrt(this)},t.prototype.rsqrt=function(){return this.throwIfDisposed(),dt.rsqrt(this)},t.prototype.square=function(){return this.throwIfDisposed(),dt.square(this)},t.prototype.reciprocal=function(){return this.throwIfDisposed(),dt.reciprocal(this)},t.prototype.abs=function(){return this.throwIfDisposed(),dt.abs(this)},t.prototype.clipByValue=function(t,e){return this.throwIfDisposed(),dt.clipByValue(this,t,e)},t.prototype.relu=function(){return this.throwIfDisposed(),dt.relu(this)},t.prototype.elu=function(){return this.throwIfDisposed(),dt.elu(this)},t.prototype.selu=function(){return this.throwIfDisposed(),dt.selu(this)},t.prototype.leakyRelu=function(t){return void 0===t&&(t=.2),this.throwIfDisposed(),dt.leakyRelu(this,t)},t.prototype.prelu=function(t){return this.throwIfDisposed(),dt.prelu(this,t)},t.prototype.sigmoid=function(){return this.throwIfDisposed(),dt.sigmoid(this)},t.prototype.logSigmoid=function(){return this.throwIfDisposed(),dt.logSigmoid(this)},t.prototype.softplus=function(){return this.throwIfDisposed(),dt.softplus(this)},t.prototype.zerosLike=function(){return this.throwIfDisposed(),dt.zerosLike(this)},t.prototype.onesLike=function(){return this.throwIfDisposed(),dt.onesLike(this)},t.prototype.sin=function(){return this.throwIfDisposed(),dt.sin(this)},t.prototype.cos=function(){return this.throwIfDisposed(),dt.cos(this)},t.prototype.tan=function(){return this.throwIfDisposed(),dt.tan(this)},t.prototype.asin=function(){return this.throwIfDisposed(),dt.asin(this)},t.prototype.acos=function(){return this.throwIfDisposed(),dt.acos(this)},t.prototype.atan=function(){return this.throwIfDisposed(),dt.atan(this)},t.prototype.sinh=function(){return this.throwIfDisposed(),dt.sinh(this)},t.prototype.cosh=function(){return this.throwIfDisposed(),dt.cosh(this)},t.prototype.tanh=function(){return this.throwIfDisposed(),dt.tanh(this)},t.prototype.asinh=function(){return this.throwIfDisposed(),dt.asinh(this)},t.prototype.acosh=function(){return this.throwIfDisposed(),dt.acosh(this)},t.prototype.atanh=function(){return this.throwIfDisposed(),dt.atanh(this)},t.prototype.erf=function(){return this.throwIfDisposed(),dt.erf(this)},t.prototype.round=function(){return this.throwIfDisposed(),dt.round(this)},t.prototype.step=function(t){return void 0===t&&(t=0),this.throwIfDisposed(),dt.step(this,t)},t.prototype.softmax=function(t){return void 0===t&&(t=-1),this.throwIfDisposed(),dt.softmax(this,t)},t.prototype.logSoftmax=function(t){return void 0===t&&(t=-1),this.throwIfDisposed(),dt.logSoftmax(this,t)},t.prototype.resizeBilinear=function(t,e){return void 0===e&&(e=!1),this.throwIfDisposed(),dt.image.resizeBilinear(this,t,e)},t.prototype.resizeNearestNeighbor=function(t,e){return void 0===e&&(e=!1),this.throwIfDisposed(),dt.image.resizeNearestNeighbor(this,t,e)},t.prototype.conv1d=function(t,e,n,r,i,a){return void 0===r&&(r="NWC"),void 0===i&&(i=1),this.throwIfDisposed(),dt.conv1d(this,t,e,n,r,i,a)},t.prototype.conv2d=function(t,e,n,r,i,a){return void 0===r&&(r="NHWC"),void 0===i&&(i=[1,1]),this.throwIfDisposed(),dt.conv2d(this,t,e,n,r,i,a)},t.prototype.conv2dTranspose=function(t,e,n,r,i){return this.throwIfDisposed(),dt.conv2dTranspose(this,t,e,n,r,i)},t.prototype.depthwiseConv2D=function(t,e,n,r,i,a){return void 0===r&&(r="NHWC"),void 0===i&&(i=[1,1]),this.throwIfDisposed(),dt.depthwiseConv2d(this,t,e,n,r,i,a)},t.prototype.separableConv2d=function(t,e,n,r,i,a){return void 0===i&&(i=[1,1]),void 0===a&&(a="NHWC"),this.throwIfDisposed(),dt.separableConv2d(this,t,e,n,r,i,a)},t.prototype.avgPool=function(t,e,n,r){return this.throwIfDisposed(),dt.avgPool(this,t,e,n,r)},t.prototype.maxPool=function(t,e,n,r){return this.throwIfDisposed(),dt.maxPool(this,t,e,n,r)},t.prototype.localResponseNormalization=function(t,e,n,r){return void 0===t&&(t=5),void 0===e&&(e=1),void 0===n&&(n=1),void 0===r&&(r=.5),dt.localResponseNormalization(this,t,e,n,r)},t.prototype.pool=function(t,e,n,r,i){return this.throwIfDisposed(),dt.pool(this,t,e,n,r,i)},t.prototype.variable=function(t,e,n){return void 0===t&&(t=!0),this.throwIfDisposed(),pt.variable(this,t,e,n)},t.prototype.unsortedSegmentSum=function(t,e){return this.throwIfDisposed(),dt.unsortedSegmentSum(this,t,e)},t.prototype.batchToSpaceND=function(t,e){return this.throwIfDisposed(),dt.batchToSpaceND(this,t,e)},t.prototype.spaceToBatchND=function(t,e){return this.throwIfDisposed(),dt.spaceToBatchND(this,t,e)},t.prototype.topk=function(t,e){return void 0===t&&(t=1),void 0===e&&(e=!0),this.throwIfDisposed(),dt.topk(this,t,e)},t.prototype.stridedSlice=function(t,e,n,r,i,a,o,s){return void 0===r&&(r=0),void 0===i&&(i=0),void 0===a&&(a=0),void 0===o&&(o=0),void 0===s&&(s=0),this.throwIfDisposed(),dt.stridedSlice(this,t,e,n,r,i,a,o,s)},t.prototype.depthToSpace=function(t,e){return this.throwIfDisposed(),dt.depthToSpace(this,t,e)},t.prototype.fft=function(){return this.throwIfDisposed(),dt.spectral.fft(this)},t.prototype.ifft=function(){return this.throwIfDisposed(),dt.spectral.ifft(this)},t.prototype.rfft=function(){return this.throwIfDisposed(),dt.spectral.rfft(this)},t.prototype.irfft=function(){return this.throwIfDisposed(),dt.spectral.irfft(this)},t}();Object.defineProperty(ht,Symbol.hasInstance,{value:function(t){return!!t&&null!=t.dataId&&null!=t.shape&&null!=t.dtype}});var pt=function(t){function e(e,n,r){void 0===n&&(n=!0);var i=t.call(this,e.shape,e.dtype,null,e.dataId)||this;i.trainable=n,i.name=r,null==i.name&&(i.name=lt().nextVariableId().toString());try{lt().registerVariable(i)}catch(t){throw lt().disposeTensor(i),t}return i}return s(e,t),e.variable=function(t,n,r,i){return void 0===n&&(n=!0),null!=i&&i!==t.dtype&&(t=t.asType(i)),new e(t,n,r)},e.prototype.assign=function(t){if(t.dtype!==this.dtype)throw new Error("dtype of the new value ("+t.dtype+") and previous value ("+this.dtype+") must match");if(!C(t.shape,this.shape))throw new Error("shape of the new value ("+t.shape+") and previous value ("+this.shape+") must match");lt().disposeTensor(this),this.dataId=t.dataId,lt().registerTensor(this)},e}(ht);Object.defineProperty(pt,Symbol.hasInstance,{value:function(t){return t instanceof ht&&null!=t.assign&&t.assign instanceof Function}});var mt,vt,_t,gt,bt,yt;pt.variable;(yt=mt||(mt={})).R0="R0",yt.R1="R1",yt.R2="R2",yt.R3="R3",yt.R4="R4",yt.R5="R5",yt.R6="R6",function(t){t.float32="float32",t.int32="int32",t.bool="int32",t.complex64="complex64"}(vt||(vt={})),function(t){t.float32="float32",t.int32="int32",t.bool="bool",t.complex64="complex64"}(_t||(_t={})),function(t){t.float32="float32",t.int32="float32",t.bool="float32",t.complex64="complex64"}(gt||(gt={})),function(t){t.float32="complex64",t.int32="complex64",t.bool="complex64",t.complex64="complex64"}(bt||(bt={}));var xt={float32:gt,int32:vt,bool:_t,complex64:bt};function wt(t,e){if("string"===t||"string"===e){if("string"===t&&"string"===e)return"string";throw new Error("Can not upcast "+t+" with "+e)}return xt[t][e]}function kt(t){return wt(t,"int32")}function Ct(t,e){if(t.dtype===e.dtype)return[t,e];var n=wt(t.dtype,e.dtype);return[t.cast(n),e.cast(n)]}function Et(t,e){b(t.dtype===e.dtype,function(){return"The dtypes of the first("+t.dtype+") and second("+e.dtype+") input must match"})}function St(t){var e=[];return function t(e,n,r){if(null!=e)if(e instanceof ht)n.push(e);else if(function(t){return Array.isArray(t)||"object"==typeof t}(e)){var i=e;for(var a in i){var o=i[a];r.has(o)||(r.add(o),t(o,n,r))}}}(t,e,new Set),e}Object.freeze({makeTypesMatch:Ct,assertTypesMatch:Et,isTensorInList:function(t,e){for(var n=0;n<e.length;n++)if(e[n].id===t.id)return!0;return!1},getTensorsInContainer:St});var It,Mt=function(){function t(t,e,n){this.backend=t,this.safeMode=e,this.debugMode=n,this.registeredVariables={},this.nextTapeNodeId=0,this.numBytes=0,this.numTensors=0,this.numStringTensors=0,this.numDataBuffers=0,this.profiling=!1,this.gradientDepth=0,this.kernelDepth=0,this.scopeStack=[],this.nextScopeId=0,this.tensorInfo=new WeakMap,this.profiler=new tt(t),this.activeProfile={newBytes:0,newTensors:0,peakBytes:0,kernels:[],result:null}}return t.prototype.moveData=function(t){this.write(t,this.readSync(t))},t.prototype.tidy=function(t,e){var n,r=this,i=null;if(null==e){if("function"!=typeof t)throw new Error("Please provide a function to tidy()");e=t}else{if("string"!=typeof t&&!(t instanceof String))throw new Error("When calling with two arguments, the first argument to tidy() must be a string");if("function"!=typeof e)throw new Error("When calling with two arguments, the 2nd argument to tidy() must be a function");i=t}return this.scopedRun(function(){return r.startScope(i)},function(){return r.endScope(n)},function(){return(n=e())instanceof Promise&&console.error("Cannot return a Promise inside of tidy."),n})},t.prototype.scopedRun=function(t,e,n){t();try{var r=n();return e(),r}catch(t){throw e(),t}},t.prototype.nextTensorId=function(){return t.nextTensorId++},t.prototype.nextVariableId=function(){return t.nextVariableId++},t.prototype.clone=function(t){var e=ht.make(t.shape,{dataId:t.dataId},t.dtype);return this.addTapeNode([t],e,function(t){return[t.toFloat()]}),e},t.prototype.runKernel=function(t,e,n){var r,i=this,a=[],o=this.isTapeOn(),s=null!=this.activeScope?this.activeScope.name:"",c=function(t){o&&(a=t.map(function(t){return i.keep(i.clone(t))}))},u=this.numBytes,l=this.numTensors;if(this.scopedRun(function(){return i.kernelDepth++},function(){return i.kernelDepth--},function(){r=i.debugMode()?i.profiler.profileKernel(s,function(){return t(i.backend,c)}):t(i.backend,c)}),o){var d={id:this.nextTapeNodeId++,name:s,inputs:e,outputs:Array.isArray(r)?r:[r],saved:a};null!=n&&(d.gradient=function(t){return n(t,a)}),this.activeTape.push(d)}return this.profiling&&this.activeProfile.kernels.push({name:s,bytesAdded:this.numBytes-u,totalBytesSnapshot:this.numBytes,tensorsAdded:this.numTensors-l,totalTensorsSnapshot:this.numTensors,inputShapes:Object.keys(e).map(function(t){return e[t].shape}),outputShape:Array.isArray(r)?r.map(function(t){return t.shape}):r.shape}),r},t.prototype.registerTensor=function(t,e){var n=this.tensorInfo.has(t.dataId)?this.tensorInfo.get(t.dataId).refCount:0;if(this.numTensors++,"string"===t.dtype&&this.numStringTensors++,0===n){this.numDataBuffers++;var r=0;"complex64"!==t.dtype&&"string"!==t.dtype&&(r=t.size*F(t.dtype)),this.tensorInfo.set(t.dataId,{backend:null!=e?e:this.backend,dtype:t.dtype,shape:t.shape,bytes:r,refCount:0}),this.numBytes+=r,null!=e?e.register(t.dataId,t.shape,t.dtype):this.backend.register(t.dataId,t.shape,t.dtype)}this.tensorInfo.get(t.dataId).refCount++,t instanceof pt||this.track(t)},t.prototype.registerVariable=function(t){if(null!=this.registeredVariables[t.name])throw new Error("Variable with name "+t.name+" was already registered");this.registeredVariables[t.name]=t},t.prototype.disposeTensor=function(t){if(this.tensorInfo.has(t.dataId)){this.numTensors--,"string"===t.dtype&&this.numStringTensors--;var e=this.tensorInfo.get(t.dataId);e.refCount<=1?("complex64"!==t.dtype&&(this.numBytes-=e.bytes),this.numDataBuffers--,e.backend.disposeData(t.dataId),this.tensorInfo.delete(t.dataId)):this.tensorInfo.get(t.dataId).refCount--}},t.prototype.disposeVariables=function(){for(var t in this.registeredVariables){var e=this.registeredVariables[t];this.disposeTensor(e),delete this.registeredVariables[t]}},t.prototype.memory=function(){var t=this.backend.memory();return t.numTensors=this.numTensors,t.numDataBuffers=this.numDataBuffers,t.numBytes=this.numBytes,this.numStringTensors>0&&(t.unreliable=!0,null==t.reasons&&(t.reasons=[]),t.reasons.push("Memory usage by string tensors is approximate (2 bytes per character)")),t},t.prototype.profile=function(t){return u(this,void 0,void 0,function(){var e,n;return l(this,function(r){return this.profiling=!0,e=this.numBytes,n=this.numTensors,this.activeProfile.kernels=[],this.activeProfile.result=t(),this.profiling=!1,this.activeProfile.peakBytes=Math.max.apply(Math,this.activeProfile.kernels.map(function(t){return t.totalBytesSnapshot})),this.activeProfile.newBytes=this.numBytes-e,this.activeProfile.newTensors=this.numTensors-n,[2,this.activeProfile]})})},t.prototype.isTapeOn=function(){return this.gradientDepth>0&&0===this.kernelDepth},t.prototype.addTapeNode=function(t,e,n){var r={};t.forEach(function(t,e){r[e]=t});var i={id:this.nextTapeNodeId++,name:this.activeScope.name,inputs:r,outputs:[e],gradient:function(t){var e={};return n(t).forEach(function(t,n){e[n]=function(){return t}}),e}};this.activeTape.push(i)},t.prototype.keep=function(t){if(1===this.scopeStack.length&&this.safeMode)throw new Error("Safe mode is ON. Enclose all tensor operations inside tf.tidy(): tf.tidy(() => {...}) to avoid memory leaks.");return t.kept=!0,t},t.prototype.startTape=function(){0===this.gradientDepth&&(this.activeTape=[]),this.gradientDepth++},t.prototype.endTape=function(){this.gradientDepth--},t.prototype.startScope=function(t){var e={track:[],name:"unnamed scope",id:this.nextScopeId++};t&&(e.name=t),this.scopeStack.push(e),this.activeScope=e},t.prototype.endScope=function(t){for(var e=this,n=St(t),r=new Set(n.map(function(t){return t.id})),i=0;i<this.activeScope.track.length;i++){var a=this.activeScope.track[i];a.kept||r.has(a.id)||a.dispose()}var o=this.scopeStack.pop();this.activeScope=0===this.scopeStack.length?null:this.scopeStack[this.scopeStack.length-1],n.forEach(function(t){t.kept||t.scopeId!==o.id||e.track(t)})},t.prototype.gradients=function(t,e,n,r){var i=this;if(void 0===r&&(r=!1),b(e.length>0,function(){return"gradients() received an empty list of xs."}),null!=n&&"float32"!==n.dtype)throw new Error("dy must have 'float32' dtype, but has '"+n.dtype+"'");var a=this.scopedRun(function(){return i.startTape()},function(){return i.endTape()},function(){return i.tidy("forward",t)});b(a instanceof ht,function(){return"The result y returned by f() must be a tensor."});var o=function(t,e,n){for(var r={},i={},a=0;a<e.length;a++)r[e[a].id]=!0;for(a=0;a<t.length;a++){var o=(p=t[a]).inputs;for(var s in o){for(var c=o[s],u=!1,l=0;l<e.length;l++)if(r[c.id]){p.outputs.forEach(function(t){return r[t.id]=!0}),u=!0,i[p.id]=!0;break}if(u)break}}var d={};d[n.id]=!0;var f={};for(a=t.length-1;a>=0;a--)for(o=(p=t[a]).inputs,l=0;l<p.outputs.length;l++)if(d[p.outputs[l].id]){for(var s in o)d[o[s].id]=!0,f[p.id]=!0;break}var h=[];for(a=0;a<t.length;a++){var p;if(i[(p=t[a]).id]&&f[p.id]){var m={};for(var s in p.inputs){var v=p.inputs[s];r[v.id]&&(m[s]=v)}var _=Object.assign({},p);_.inputs=m,_.outputs=p.outputs,h.push(_)}}return h}(this.activeTape,e,a);if(!r&&0===o.length&&e.length>0)throw new Error("Cannot compute gradient of y=f(x) with respect to x. Make sure that the f you passed encloses all operations that lead from x to y.");return this.tidy("backward",function(){var t={};t[a.id]=null==n?function(t){var e=X(k(t),"float32");return ht.make(t,{values:e})}(a.shape):n,function(t,e,n){for(var r=function(r){var i=e[r],a=[];if(i.outputs.forEach(function(e){var n=t[e.id];if(null!=n)a.push(n);else{var r=ht.make(e.shape,{values:J(e.size,e.dtype)},e.dtype);a.push(r)}}),null==i.gradient)throw new Error("Cannot compute gradient: gradient function not found for "+i.name+".");var o=i.gradient(1===i.outputs.length?a[0]:a),s=function(e){if(!(e in o))throw new Error("Cannot backprop through input "+e+". Available gradients found: "+Object.keys(o)+".");var r=n(function(){return o[e]()});if("float32"!==r.dtype)throw new Error("Error in gradient for op "+i.name+". The gradient of input "+e+" must have 'float32' dtype, but has '"+r.dtype+"'");var a=i.inputs[e];if(!C(r.shape,a.shape))throw new Error("Error in gradient for op "+i.name+". The gradient of input '"+e+"' has shape '"+r.shape+"', which does not match the shape of the input '"+a.shape+"'");if(null==t[a.id])t[a.id]=r;else{var s=t[a.id];t[a.id]=s.add(r),s.dispose()}};for(var c in i.inputs)s(c)},i=e.length-1;i>=0;i--)r(i)}(t,o,function(t){return i.tidy(t)});var r=e.map(function(e){return t[e.id]});return 0===i.gradientDepth&&(i.activeTape.forEach(function(t){for(var e in t.saved)t.saved[e].dispose()}),i.activeTape=null),{value:a,grads:r}})},t.prototype.customGrad=function(t){var e=this;return b(q(t),function(){return"The f passed in customGrad(f) must be a function."}),function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];b(r.every(function(t){return t instanceof ht}),function(){return"The args passed in customGrad(f)(x1, x2,...) must all be tensors"});var a={};return r.forEach(function(t,e){a[e]=t}),e.runKernel(function(e,i){return b((n=t.apply(void 0,r.concat([i]))).value instanceof ht,function(){return"The function f passed in customGrad(f) must return an object where `obj.value` is a tensor"}),b(q(n.gradFunc),function(){return"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function."}),n.value},a,function(t,e){var i=n.gradFunc(t,e),a=Array.isArray(i)?i:[i];b(a.length===r.length,function(){return"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns the same number of tensors as inputs passed to f(...)."}),b(a.every(function(t){return t instanceof ht}),function(){return"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns a list of only tensors."});var o={};return a.forEach(function(t,e){o[e]=function(){return t}}),o})}},t.prototype.write=function(t,e){var n=this.tensorInfo.get(t);if("string"===n.dtype){var r=Y(e);this.numBytes+=r-n.bytes,n.bytes=r}this.backend!==n.backend&&(n.backend.disposeData(t),n.backend=this.backend,this.backend.register(t,n.shape,n.dtype)),this.backend.write(t,e)},t.prototype.readSync=function(t){return this.tensorInfo.get(t).backend.readSync(t)},t.prototype.read=function(t){return this.tensorInfo.get(t).backend.read(t)},t.prototype.fromPixels=function(t,e){return this.backend.fromPixels(t,e)},t.prototype.time=function(t){return u(this,void 0,void 0,function(){var e,n;return l(this,function(r){switch(r.label){case 0:return e=Z(),[4,this.backend.time(t)];case 1:return(n=r.sent()).wallMs=Z()-e,[2,n]}})})},t.prototype.track=function(t){if(1===this.scopeStack.length&&this.safeMode)throw new Error("Safe mode is ON. Enclose all tensor operations inside tf.tidy(): tf.tidy(() => {op();...}); to avoid memory leaks.");return null!=this.activeScope&&(t.scopeId=this.activeScope.id,this.activeScope.track.push(t)),t},t.nextTensorId=0,t.nextVariableId=0,t}();!function(t){t[t.NUMBER=0]="NUMBER",t[t.BOOLEAN=1]="BOOLEAN",t[t.STRING=2]="STRING"}(It||(It={}));var Tt,Dt,Rt=[{name:"DEBUG",type:It.BOOLEAN},{name:"IS_BROWSER",type:It.BOOLEAN},{name:"WEBGL_LAZILY_UNPACK",type:It.BOOLEAN},{name:"WEBGL_CPU_FORWARD",type:It.BOOLEAN},{name:"WEBGL_PACK",type:It.BOOLEAN},{name:"WEBGL_PACK_BATCHNORMALIZATION",type:It.BOOLEAN},{name:"WEBGL_PACK_CLIP",type:It.BOOLEAN},{name:"WEBGL_PACK_DEPTHWISECONV",type:It.BOOLEAN},{name:"WEBGL_PACK_BINARY_OPERATIONS",type:It.BOOLEAN},{name:"WEBGL_PACK_ARRAY_OPERATIONS",type:It.BOOLEAN},{name:"WEBGL_PACK_IMAGE_OPERATIONS",type:It.BOOLEAN},{name:"WEBGL_PACK_REDUCE",type:It.BOOLEAN},{name:"WEBGL_CONV_IM2COL",type:It.BOOLEAN},{name:"WEBGL_MAX_TEXTURE_SIZE",type:It.NUMBER},{name:"WEBGL_NUM_MB_BEFORE_PAGING",type:It.NUMBER},{name:"WEBGL_MAX_TEXTURES_IN_SHADER",type:It.NUMBER},{name:"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION",type:It.NUMBER},{name:"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE",type:It.BOOLEAN},{name:"WEBGL_VERSION",type:It.NUMBER},{name:"WEBGL_RENDER_FLOAT32_ENABLED",type:It.BOOLEAN},{name:"WEBGL_DOWNLOAD_FLOAT_ENABLED",type:It.BOOLEAN},{name:"WEBGL_FENCE_API_ENABLED",type:It.BOOLEAN},{name:"WEBGL_SIZE_UPLOAD_UNIFORM",type:It.NUMBER},{name:"BACKEND",type:It.STRING},{name:"EPSILON",type:It.NUMBER},{name:"PROD",type:It.BOOLEAN},{name:"TENSORLIKE_CHECK_SHAPE_CONSISTENCY",type:It.BOOLEAN},{name:"DEPRECATION_WARNINGS_ENABLED",type:It.BOOLEAN}];function Pt(t){try{if(null!=h(t))return!0}catch(t){return!1}return!1}var Ot="tfjsflags";function Lt(){var t={};if("undefined"==typeof window||void 0===window.location||void 0===window.location.search)return t;var e=function(t){var e={};return t.replace(/[?&]([^=?&]+)(?:=([^&]*))?/g,function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return function(t,e,n){t[decodeURIComponent(e)]=decodeURIComponent(n||"")}(e,n[0],n[1]),n.join("=")}),e}(window.location.search);if(Ot in e){var n={};e[Ot].split(",").forEach(function(t){var e=t.split(":"),r=e[0],i=e[1];n[r]=i}),Rt.forEach(function(e){e.name in n&&(console.log("Setting feature override from URL "+e.name+": "+n[e.name]),e.type===It.NUMBER?t[e.name]=+n[e.name]:e.type===It.BOOLEAN?t[e.name]="true"===n[e.name]:e.type===It.STRING?t[e.name]=n[e.name]:console.warn("Unknown URL param: "+e.name+"."))})}return t}function At(t,e){return null!=t.getExtension(e)}function Nt(t,e){var n=t.createFramebuffer(),r=t.createTexture();t.bindTexture(t.TEXTURE_2D,r);var i=2===e?t.RGBA32F:t.RGBA;t.texImage2D(t.TEXTURE_2D,0,i,1,1,0,t.RGBA,t.FLOAT,null),t.bindFramebuffer(t.FRAMEBUFFER,n),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,r,0);var a=t.checkFramebufferStatus(t.FRAMEBUFFER)===t.FRAMEBUFFER_COMPLETE;return t.bindTexture(t.TEXTURE_2D,null),t.bindFramebuffer(t.FRAMEBUFFER,null),t.deleteTexture(r),t.deleteFramebuffer(n),a}var Bt=600;var jt,Ft=function(){function e(t){this.features={},this.registry={},this.registryFactory={},null!=t&&(this.features=t),this.get("DEBUG")&&console.warn("Debugging mode is ON. The output of every math call will be downloaded to CPU and checked for NaNs. This significantly impacts performance.")}return e.setBackend=function(t,e){if(void 0===e&&(e=!1),!(t in zt.registry))throw new Error("Backend name '"+t+"' not found in registry");zt.engine.backend=zt.findBackend(t),zt.backendName=t},e.getBackend=function(){return zt.initEngine(),zt.backendName},e.disposeVariables=function(){zt.engine.disposeVariables()},e.memory=function(){return zt.engine.memory()},e.profile=function(t){return zt.engine.profile(t)},e.tidy=function(t,e){return zt.engine.tidy(t,e)},e.dispose=function(t){St(t).forEach(function(t){return t.dispose()})},e.keep=function(t){return zt.engine.keep(t)},e.time=function(t){return zt.engine.time(t)},e.prototype.get=function(t){return t in this.features?this.features[t]:(this.features[t]=this.evaluateFeature(t),this.features[t])},e.prototype.getFeatures=function(){return this.features},e.prototype.set=function(t,e){this.features[t]=e},e.prototype.getBestBackendName=function(){var t=this;if(0===Object.keys(this.registry).length)throw new Error("No backend found in registry.");return Object.keys(this.registry).map(function(e){return{name:e,entry:t.registry[e]}}).sort(function(t,e){return e.entry.priority-t.entry.priority})[0].name},e.prototype.evaluateFeature=function(e){if("DEBUG"===e)return!1;if("IS_BROWSER"===e)return"undefined"!=typeof window;if("IS_NODE"===e)return void 0!==t&&void 0!==t.versions&&void 0!==t.versions.node;if("IS_CHROME"===e)return"undefined"!=typeof navigator&&null!=navigator&&null!=navigator.userAgent&&/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor);if("WEBGL_CPU_FORWARD"===e)return!0;if("WEBGL_PACK"===e)return 0!==this.get("WEBGL_VERSION");if("WEBGL_PACK_BATCHNORMALIZATION"===e)return this.get("WEBGL_PACK");if("WEBGL_PACK_CLIP"===e)return this.get("WEBGL_PACK");if("WEBGL_PACK_DEPTHWISECONV"===e)return this.get("WEBGL_PACK");if("WEBGL_PACK_BINARY_OPERATIONS"===e)return this.get("WEBGL_PACK");if("WEBGL_PACK_ARRAY_OPERATIONS"===e)return this.get("WEBGL_PACK");if("WEBGL_PACK_IMAGE_OPERATIONS"===e)return this.get("WEBGL_PACK");if("WEBGL_PACK_REDUCE"===e)return this.get("WEBGL_PACK");if("WEBGL_LAZILY_UNPACK"===e)return this.get("WEBGL_PACK");if("WEBGL_CONV_IM2COL"===e)return this.get("WEBGL_PACK");if("WEBGL_NUM_MB_BEFORE_PAGING"===e)return this.get("PROD")||!this.get("IS_BROWSER")?Number.POSITIVE_INFINITY:window.screen.height*window.screen.width*window.devicePixelRatio*Bt/1024;if("WEBGL_MAX_TEXTURE_SIZE"===e)return function(t){if(null==Tt){var e=h(t);Tt=e.getParameter(e.MAX_TEXTURE_SIZE)}return Tt}(this.get("WEBGL_VERSION"));if("WEBGL_MAX_TEXTURES_IN_SHADER"===e)return function(t){if(null==Dt){var e=h(t);Dt=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)}return Math.min(16,Dt)}(this.get("WEBGL_VERSION"));if("IS_TEST"===e)return!1;if("BACKEND"===e)return this.getBestBackendName();if("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"===e){var n=this.get("WEBGL_VERSION");return 0===n?0:function(t){if(0===t)return 0;var e=h(t);return At(e,"EXT_disjoint_timer_query_webgl2")&&2===t?2:At(e,"EXT_disjoint_timer_query")?1:0}(n)}if("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE"===e)return this.get("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0&&!function(){var t=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))}();if("HAS_WEBGL"===e)return this.get("WEBGL_VERSION")>0;if("WEBGL_VERSION"===e)return Pt(2)?2:Pt(1)?1:0;if("WEBGL_RENDER_FLOAT32_ENABLED"===e)return function(t){if(0===t)return!1;var e=h(t);if(1===t){if(!At(e,"OES_texture_float"))return!1}else if(!At(e,"EXT_color_buffer_float"))return!1;return Nt(e,t)}(this.get("WEBGL_VERSION"));if("WEBGL_DOWNLOAD_FLOAT_ENABLED"===e)return function(t){if(0===t)return!1;var e=h(t);if(1===t){if(!At(e,"OES_texture_float"))return!1;if(!At(e,"WEBGL_color_buffer_float"))return!1}else if(!At(e,"EXT_color_buffer_float"))return!1;return Nt(e,t)}(this.get("WEBGL_VERSION"));if("WEBGL_FENCE_API_ENABLED"===e)return function(t){return 2===t&&null!=h(t).fenceSync}(this.get("WEBGL_VERSION"));if("WEBGL_SIZE_UPLOAD_UNIFORM"===e)return this.get("WEBGL_RENDER_FLOAT32_ENABLED")?4:0;if("TEST_EPSILON"===e)return 32===this.backend.floatPrecision()?.001:.1;if("EPSILON"===e)return 32===this.backend.floatPrecision()?1e-7:1e-4;if("PROD"===e)return!1;if("TENSORLIKE_CHECK_SHAPE_CONSISTENCY"===e)return!this.get("PROD");if("DEPRECATION_WARNINGS_ENABLED"===e)return!0;throw new Error("Unknown feature "+e+".")},e.prototype.setFeatures=function(t){this.features=Object.assign({},t)},e.prototype.reset=function(){this.features=Lt(),null!=this.globalEngine&&(this.globalEngine=null)},Object.defineProperty(e.prototype,"backend",{get:function(){return this.engine.backend},enumerable:!0,configurable:!0}),e.prototype.findBackend=function(t){return t in this.registry?this.registry[t].backend:null},e.prototype.findBackendFactory=function(t){return t in this.registryFactory?this.registryFactory[t]:null},e.prototype.registerBackend=function(t,e,n){var r=this;if(void 0===n&&(n=1),t in this.registry)return console.warn(t+" backend was already registered. Reusing existing backend"),!1;try{var i=e();return i.setDataMover({moveData:function(t){return r.engine.moveData(t)}}),this.registry[t]={backend:i,priority:n},this.registryFactory[t]=e,!0}catch(e){return console.warn("Registration of backend "+t+" failed"),console.warn(e.stack||e.message),!1}},e.prototype.removeBackend=function(t){if(!(t in this.registry))throw new Error(t+" backend not found in registry");this.registry[t].backend.dispose(),delete this.registry[t]},Object.defineProperty(e.prototype,"engine",{get:function(){return this.initEngine(),this.globalEngine},enumerable:!0,configurable:!0}),e.prototype.initEngine=function(){var t=this;if(null==this.globalEngine){this.backendName=this.get("BACKEND");var e=this.findBackend(this.backendName);this.globalEngine=new Mt(e,!1,function(){return t.get("DEBUG")})}},Object.defineProperty(e.prototype,"global",{get:function(){return Yt()},enumerable:!0,configurable:!0}),e}();function Yt(){if(null==jt){var e=void 0;if("undefined"!=typeof window)e=window;else if(void 0!==r)e=r;else{if(void 0===t)throw new Error("Could not find a global object");e=t}jt=e}return jt}function $t(t){zt.get("DEPRECATION_WARNINGS_ENABLED")&&console.warn(t+" You can disable deprecation warnings with tf.disableDeprecationWarnings().")}!function(t){ft=t}($t);var zt=function(){var t=Yt();return null==t.ENV&&(t.ENV=new Ft(Lt())),function(t){lt=t}(function(){return t.ENV.engine}),t.ENV}();Object.freeze({EPSILON_FLOAT16:1e-4,EPSILON_FLOAT32:1e-7,Environment:Ft,enableProdMode:function(){zt.set("PROD",!0)},enableDebugMode:function(){zt.set("DEBUG",!0)},disableDeprecationWarnings:function(){zt.set("DEPRECATION_WARNINGS_ENABLED",!1),console.warn("TensorFlow.js deprecation warnings have been disabled.")},deprecationWarn:$t,ENV:zt});function Vt(t){var e=t;if(j(t))return[t.length];if(!Array.isArray(t))return[];for(var n=[];Array.isArray(e)||j(e);)n.push(e.length),e=e[0];return Array.isArray(t)&&zt.get("TENSORLIKE_CHECK_SHAPE_CONSISTENCY")&&function t(e,n,r){if(r=r||[],Array.isArray(e)||j(e)){b(n.length>0,function(){return"Element arr["+r.join("][")+"] should be a primitive, but is an array of "+e.length+" elements"}),b(e.length===n[0],function(){return"Element arr["+r.join("][")+"] should have "+n[0]+" elements, but has "+e.length+" elements"});for(var i=n.slice(1),a=0;a<e.length;++a)t(e[a],i,r.concat(a))}else b(0===n.length,function(){return"Element arr["+r.join("][")+"] is a primitive, but should be an array/TypedArray of "+n[0]+" elements"})}(t,n,[]),n}function Ht(t,e,n,r){if(null!=t&&("numeric"!==t&&t!==e||"numeric"===t&&"string"===e))throw new Error("Argument '"+n+"' passed to '"+r+"' must be "+t+" tensor, but got "+e+" tensor")}function qt(t,e,n,r){if(void 0===r&&(r="numeric"),t instanceof ht)return Ht(r,t.dtype,e,n),t;var i=H(t);if("string"!==i&&["bool","int32","float32"].indexOf(r)>=0&&(i=r),Ht(r,i,e,n),null==t||!j(t)&&!Array.isArray(t)&&"number"!=typeof t&&"boolean"!=typeof t&&"string"!=typeof t){var a=null==t?"null":t.constructor.name;throw new Error("Argument '"+e+"' passed to '"+n+"' must be a Tensor or TensorLike, but got '"+a+"'")}var o=Vt(t);j(t)||Array.isArray(t)||(t=[t]);var s="string"!==i?G(t,i,zt.get("DEBUG")):w(t);return ht.make(o,{values:s},i)}function Wt(t,e,n,r){if(void 0===r&&(r="numeric"),!Array.isArray(t))throw new Error("Argument "+e+" passed to "+n+" must be a `Tensor[]` or `TensorLike[]`");return t.map(function(t,r){return qt(t,e+"["+r+"]",n)},r)}function Ut(t){return zt.engine.customGrad(t)}var Gt=Ft.tidy,Kt=Ft.keep,Xt=Ft.dispose;Ft.time,Ft.profile;function Jt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];zt.get("IS_TEST")||console.warn.apply(console,t)}function Zt(t,e,n,r){void 0===r&&(r=!0);var i=[];if(r)(i=i.concat(e.slice(0))).push(t[0]/n),i=i.concat(t.slice(1));else{i=i.concat(t[0]);for(var a=e.length,o=0;o<a;++o)i=i.concat([t[o+1]/e[o],e[o]]);i=i.concat(t.slice(a+1))}return i}function Qt(t,e,n){void 0===n&&(n=!0);var r=[];if(n){r.push(e);for(var i=e+1;i<t;++i)i<=2*e?(r.push(i),r.push(i-(e+1))):r.push(i)}else{var a=[],o=[];for(i=1;i<t;++i)i>=2*e+1||i%2==1?o.push(i):a.push(i);r.push.apply(r,a),r.push(0),r.push.apply(r,o)}return r}function te(t,e,n,r){void 0===r&&(r=!0);var i=[];r?i.push(t[0]/n):i.push(t[0]*n);for(var a=1;a<t.length;++a)a<=e.length?r?i.push(e[a-1]*t[a]):i.push(t[a]/e[a-1]):i.push(t[a]);return i}function ee(t,e){for(var n=[0],r=0;r<e;++r)n.push(t[r][0]);return n}function ne(t,e,n){for(var r=t.slice(0,1),i=0;i<n;++i)r.push(t[i+1]-e[i][0]-e[i][1]);return r}function re(t,e){for(var n=0;n<t.length;++n)if(t[t.length-n-1]!==e-1-n)return!1;return!0}function ie(t,e){for(var n=[],r=t.length,i=0;i<r;i++)-1===e.indexOf(i)&&n.push(t[i]);return[n,e.map(function(e){return t[e]})]}function ae(t,e){return function(t,e,n){for(var r=t.length+e.length,i=[],a=0,o=0,s=0;s<r;s++)-1===n.indexOf(s)?i.push(t[a++]):i.push(e[o++]);return i}(t,e.map(function(t){return 1}),e)}function oe(t,e,n){b(re(e,n),function(){return t+" supports only inner-most axes for now. Got axes "+e+" and rank-"+n+" input."})}function se(t,e){if(re(t,e))return null;for(var n=[],r=0;r<e;++r)-1===t.indexOf(r)&&n.push(r);return t.forEach(function(t){return n.push(t)}),n}function ce(t){return t.map(function(t,e){return[e,t]}).sort(function(t,e){return t[1]-e[1]}).map(function(t){return t[0]})}function ue(t,e){for(var n=[],r=e-t;r<e;++r)n.push(r);return n}function le(t,e){for(var n=t[0].slice(),r=1;r<t.length;r++)n[e]+=t[r][e];return n}function de(t,e){if(t.rank<1)throw new Error("tf.gatherND() expects the input to be rank 1 or higher, but the rank was "+t.rank+".");if(e.rank<1)throw new Error("tf.gatherND() expects the indices to be rank 1 or higher, but the rank was "+e.rank+".");if("int32"!==e.dtype)throw new Error("tf.gatherND() expects the indices to be int32 type, but the dtype was "+e.dtype+".");if(e.shape[e.rank-1]>t.rank)throw new Error("index innermost dimension length must be <= tensor rank; saw: "+e.shape[e.rank-1]+" vs. "+t.rank);if(0===t.size)throw new Error("Requested more than 0 entries, but input is empty. Input shape: "+t.shape+".");for(var n=e.shape,r=n[n.length-1],i=1,a=0;a<n.length-1;++a)i*=n[a];var o=t.shape,s=n.slice();s.pop();var c=1;for(a=r;a<t.rank;++a)c*=o[a],s.push(o[a]);var u=U(t.shape).map(function(t){return t/c}).concat([1]).slice(0,r);return[s,i,c,u]}var fe=30;function he(t){return t<=fe?t:W(t,Math.floor(Math.sqrt(t)))}function pe(t,e,n){if(e.rank<1)throw new Error("tf.scatterND() expects the indices to be rank 1 or higher, but the rank was "+e.rank+".");if(t.rank<1)throw new Error("tf.scatterND() expects the updates to be rank 1 or higher, but the rank was "+t.rank+".");if("int32"!==e.dtype)throw new Error("The dtype of 'indices' should be int32, but got dtype: "+e.dtype);if(n.length<1)throw new Error("Output rank must be greater or equal to 1, but got shape: "+n);if(0===n.length){if(0===e.size)throw new Error("Indices specified for empty output. indices shape: "+e.shape);if(0===t.size)throw new Error("Updates specified for empty output. updates shape: "+t.shape)}!function(t,e,n){var r=e.rank>1?e.shape[e.rank-1]:1,i=e.rank>1?e.rank-1:1,a="Must have updates.shape = indices.shape[:batchDim] + shape[sliceDim:], got updates.shape: "+n.shape+", indices.shape: "+e.shape+", shape: "+t+", sliceDim: "+r+", and batchDim: "+i+".";if(n.rank<i)throw new Error(a+" update.rank < "+i+". ");if(t.length<r+(n.rank-i))throw new Error(a+" Output shape length < "+(r+(n.rank-i)));if(n.rank!==i+t.length-r)throw new Error(a+" update.rank != "+(i+t.length-r));for(var o=0;o<i;++o)if(n.shape[o]!==e.shape[o])throw new Error(a+" updates.shape["+o+"] ("+n.shape[o]+") != indices.shape["+o+"] ("+e.shape[o]+").");for(o=0;o<n.rank-i;++o)if(n.shape[o+i]!==t[o+r])throw new Error(a+" updates.shape["+(o+i)+"] ("+n.shape[o+i]+") != shape["+(o+i)+"] ("+t[o+i]+")")}(n,e,t)}function me(t,e,n){for(var r=e.rank>1?e.shape[e.rank-1]:1,i=n.length,a=1,o=r;o<i;++o)a*=n[o];var s=r<1?1:r;return{sliceRank:r,numUpdates:e.size/s,sliceSize:a,strides:U(n.slice(0,r)).concat([1]),outputSize:k(n)}}function ve(t,e,n,r,i,a,o,s,c){if(void 0===i&&(i=0),void 0===a&&(a=0),void 0===o&&(o=0),void 0===s&&(s=0),void 0===c&&(c=0),0!==o)throw new Error("ellipsis mask is not yet supported");if(0!==s)throw new Error("new axis mask is not yet supported");for(var u=[],l=[],d=[],f=0;f<t.length;f++)u[f]=_e(i,e,r,t,f),l[f]=ge(a,n,r,t,f),c&1<<f&&(l[f]=u[f]+1,d.push(f));var h=new Array(t.length).fill(0);return h=h.map(function(t,e){for(var n=0,i=r[e]||1,a=u[e];!(i>0?a>=l[e]:a<=l[e]);a+=i)n+=1;return n}),[u,h,d]}function _e(t,e,n,r,i){var a=e[i],o=n[i]||1;(t&1<<i||null==a)&&(a=o>0?Number.MIN_SAFE_INTEGER:Number.MAX_SAFE_INTEGER);var s=r[i];return a<0&&(a+=s),m(0,a,s-1)}function ge(t,e,n,r,i){var a=e[i],o=n[i]||1;(t&1<<i||null==a)&&(a=o>0?Number.MAX_SAFE_INTEGER:Number.MIN_SAFE_INTEGER);var s=r[i];return a<0&&(a+=s),o>0?m(0,a,s):m(-1,a,s-1)}function be(t,e,n){for(var r=n.length,i=0;i<n.length;i++)if(n[i]>1){r=i;break}for(i=r+1;i<n.length;i++)if(e[i]>0||n[i]!==t[i])return!1;return!0}function ye(t,e){for(var n=t.length>0?t[t.length-1]:1,r=0;r<t.length-1;r++)n+=t[r]*e[r];return n}function xe(t){var e=Object.keys(t);if(1!==e.length)throw new Error("Please provide an object with a single key (operation name) mapping to a function. Got an object with "+e.length+" keys.");var n=e[0],r=t[n];n.endsWith("_")&&(n=n.substring(0,n.length-1));var i=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];zt.engine.startScope(n);try{var i=r.apply(void 0,t);return i instanceof Promise&&console.error("Cannot return a Promise inside of tidy."),zt.engine.endScope(i),i}catch(t){throw zt.engine.endScope(null),t}};return Object.defineProperty(i,"name",{value:n,configurable:!0}),i}var we=xe({softmax_:function(t,e){void 0===e&&(e=-1);var n=qt(t,"logits","softmax");if(-1===e&&(e=n.rank-1),e!==n.rank-1)throw Error("Softmax along a non-last dimension is not yet supported. Logits was rank "+n.rank+" and dim was "+e);return Ut(function(t,n){var r=t.logSumExp([e],!0),i=t.toFloat().sub(r).exp();return n([i]),{value:i,gradFunc:function(t,n){var r=n[0],i=t.mul(r);return i.sub(i.sum([e],!0).mul(r))}}})(n)}}),ke=xe({logSoftmax_:function(t,e){void 0===e&&(e=-1);var n=qt(t,"logits","logSoftmax");if(-1===e&&(e=n.rank-1),e!==n.rank-1)throw Error("Log Softmax along a non-last dimension is not yet supported. Logits was rank "+n.rank+" and axis was "+e);return Ut(function(t,n){var r=t.max(e,!0),i=t.sub(r),a=i.toFloat().sub(i.exp().sum(e,!0).log());return n([a]),{value:a,gradFunc:function(t,n){var r=n[0].exp();return t.sub(t.sum(e,!0).mul(r))}}})(n)}});var Ce=xe({complex_:function(t,e){var n=qt(t,"real","complex"),r=qt(e,"imag","complex");return y(n.shape,r.shape,"real and imag shapes, "+n.shape+" and "+r.shape+", must match in call to tf.complex()."),zt.engine.runKernel(function(t){return t.complex(n,r)},{$real:n,$imag:r})}}),Ee=xe({real_:function(t){var e=qt(t,"input","real");return zt.engine.runKernel(function(t){return t.real(e)},{$input:e})}}),Se=xe({imag_:function(t){var e=qt(t,"input","imag");return zt.engine.runKernel(function(t){return t.imag(e)},{$input:e})}});function Ie(t,e,n){if(null==n&&(n=H(t)),"complex64"===n)throw new Error("Cannot construct a complex64 tensor directly. Please use tf.complex(real, imag).");if(!j(t)&&!Array.isArray(t)&&"number"!=typeof t&&"boolean"!=typeof t&&"string"!=typeof t)throw new Error("values passed to tensor(values) must be a number/boolean/string or an array of numbers/booleans/strings, or a TypedArray");var r=Vt(t);if(null!=e){Q(e);var i=k(e),a=k(r);b(i===a,function(){return"Based on the provided shape, ["+e+"], the tensor should have "+i+" values but has "+a});for(var o=0;o<r.length;++o){var s=r[o],c=o!==r.length-1||s!==k(e.slice(o));b(r[o]===e[o]||!c,function(){return"Error creating a new Tensor. Inferred shape ("+r+") does not match the provided shape ("+e+"). "})}}return j(t)||Array.isArray(t)||(t=[t]),e=e||r,t="string"!==n?G(t,n,zt.get("DEBUG")):w(t),ht.make(e,{values:t},n)}function Me(t,e){if((j(t)||Array.isArray(t))&&"complex64"!==e)throw new Error("Error creating a new Scalar: value must be a primitive (number|boolean|string)");return Ie(t,[],e)}function Te(t,e){x(t);var n=Vt(t);if(1!==n.length)throw new Error("tensor1d() requires values to be a flat/TypedArray");return Ie(t,n,e)}function De(t,e,n){if(x(t),null!=e&&2!==e.length)throw new Error("tensor2d() requires shape to have two numbers");var r=Vt(t);if(2!==r.length&&1!==r.length)throw new Error("tensor2d() requires values to be number[][] or flat/TypedArray");if(1===r.length&&null==e)throw new Error("tensor2d() requires shape to be provided when `values` are a flat/TypedArray");return Ie(t,e=e||r,n)}function Re(t,e,n){if(x(t),null!=e&&3!==e.length)throw new Error("tensor3d() requires shape to have three numbers");var r=Vt(t);if(3!==r.length&&1!==r.length)throw new Error("tensor3d() requires values to be number[][][] or flat/TypedArray");if(1===r.length&&null==e)throw new Error("tensor3d() requires shape to be provided when `values` are a flat array");return Ie(t,e=e||r,n)}function Pe(t,e,n){if(x(t),null!=e&&4!==e.length)throw new Error("tensor4d() requires shape to have four numbers");var r=Vt(t);if(4!==r.length&&1!==r.length)throw new Error("tensor4d() requires values to be number[][][][] or flat/TypedArray");if(1===r.length&&null==e)throw new Error("tensor4d() requires shape to be provided when `values` are a flat array");return Ie(t,e=e||r,n)}function Oe(t,e){if(void 0===e&&(e="float32"),"complex64"===e){var n=Oe(t,"float32"),r=Oe(t,"float32");return Ce(n,r)}var i=X(k(t),e);return ht.make(t,{values:i},e)}function Le(t,e){if(void 0===e&&(e="float32"),"complex64"===e){var n=Le(t,"float32"),r=Le(t,"float32");return Ce(n,r)}var i=J(k(t),e);return ht.make(t,{values:i},e)}function Ae(t,e,n){return zt.engine.runKernel(function(r){return r.fill(t,e,n)},{})}function Ne(t,e,n,r){if(void 0===n&&(n=1),void 0===r&&(r="float32"),0===n)throw new Error("Cannot have a step of zero");if(t===e||t<e&&n<0||e<t&&n>1)return Le([0],r);var i=J(Math.abs(Math.ceil((e-t)/n)),r);e<t&&1===n&&(n=-1),i[0]=t;for(var a=1;a<i.length;a++)i[a]=i[a-1]+n;return Te(i,r)}var Be=xe({onesLike_:function(t){var e=qt(t,"x","onesLike");if("complex64"===e.dtype){var n=Be(Ee(e)),r=je(Se(e));return Ce(n,r)}return zt.engine.runKernel(function(t){return t.onesLike(e)},{$x:e},null)}}),je=xe({zerosLike_:function(t){var e=qt(t,"x","zerosLike");return zt.engine.runKernel(function(t){return t.zerosLike(e)},{$x:e},null)}}),Fe=function(){function t(t){this.dataMover=t,this.data=new WeakMap}return t.prototype.get=function(t){return this.data.has(t)||this.dataMover.moveData(t),this.data.get(t)},t.prototype.set=function(t,e){this.data.set(t,e)},t.prototype.has=function(t){return this.data.has(t)},t.prototype.delete=function(t){return this.data.delete(t)},t}();!function(){function t(){}t.prototype.time=function(t){throw new Error("Not yet implemented.")},t.prototype.read=function(t){throw new Error("Not yet implemented.")},t.prototype.readSync=function(t){throw new Error("Not yet implemented.")},t.prototype.disposeData=function(t){throw new Error("Not yet implemented.")},t.prototype.write=function(t,e){throw new Error("Not yet implemented.")},t.prototype.fromPixels=function(t,e){throw new Error("Not yet implemented.")},t.prototype.register=function(t,e,n){throw new Error("Not yet implemented.")},t.prototype.memory=function(){throw new Error("Not yet implemented.")},t.prototype.floatPrecision=function(){throw new Error("Not yet implemented")},t.prototype.batchMatMul=function(t,e,n,r){throw new Error("Not yet implemented")},t.prototype.fusedBatchMatMul=function(t,e,n,r,i,a){throw new Error("Not yet implemented")},t.prototype.slice=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.stridedSlice=function(t,e,n,r,i,a,o,s,c){throw new Error("Not yet implemented")},t.prototype.unstack=function(t,e){throw new Error("Not yet implemented")},t.prototype.reverse=function(t,e){throw new Error("Not yet implemented")},t.prototype.concat=function(t,e){throw new Error("Not yet implemented")},t.prototype.neg=function(t){throw new Error("Not yet implemented")},t.prototype.add=function(t,e){throw new Error("Not yet implemented")},t.prototype.addN=function(t){throw new Error("Not yet implemented")},t.prototype.subtract=function(t,e){throw new Error("Not yet implemented")},t.prototype.multiply=function(t,e){throw new Error("Not yet implemented")},t.prototype.realDivide=function(t,e){throw new Error("Not yet implemented")},t.prototype.floorDiv=function(t,e){throw new Error("Not yet implemented")},t.prototype.sum=function(t,e){throw new Error("Not yet implemented")},t.prototype.prod=function(t,e){throw new Error("Not yet implemented")},t.prototype.unsortedSegmentSum=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.argMin=function(t,e){throw new Error("Not yet implemented")},t.prototype.argMax=function(t,e){throw new Error("Not yet implemented")},t.prototype.equal=function(t,e){throw new Error("Not yet implemented")},t.prototype.notEqual=function(t,e){throw new Error("Not yet implemented")},t.prototype.less=function(t,e){throw new Error("Not yet implemented")},t.prototype.lessEqual=function(t,e){throw new Error("Not yet implemented")},t.prototype.greater=function(t,e){throw new Error("Not yet implemented")},t.prototype.greaterEqual=function(t,e){throw new Error("Not yet implemented")},t.prototype.logicalNot=function(t){throw new Error("Not yet implemented")},t.prototype.logicalAnd=function(t,e){throw new Error("Not yet implemented")},t.prototype.logicalOr=function(t,e){throw new Error("Not yet implemented")},t.prototype.where=function(t){throw new Error("Not yet implemented")},t.prototype.select=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.topk=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.min=function(t,e){throw new Error("Not yet implemented")},t.prototype.minimum=function(t,e){throw new Error("Not yet implemented")},t.prototype.mod=function(t,e){throw new Error("Not yet implemented")},t.prototype.max=function(t,e){throw new Error("Not yet implemented")},t.prototype.maximum=function(t,e){throw new Error("Not yet implemented")},t.prototype.all=function(t,e){throw new Error("Not yet implemented")},t.prototype.any=function(t,e){throw new Error("Not yet implemented")},t.prototype.squaredDifference=function(t,e){throw new Error("Not yet implemented")},t.prototype.ceil=function(t){throw new Error("Not yet implemented")},t.prototype.floor=function(t){throw new Error("Not yet implemented")},t.prototype.round=function(t){throw new Error("Not yet implemented")},t.prototype.sign=function(t){throw new Error("Not yet implemented")},t.prototype.isNaN=function(t){throw new Error("Not yet implemented")},t.prototype.isInf=function(t){throw new Error("Not yet implemented")},t.prototype.isFinite=function(t){throw new Error("Not yet implemented")},t.prototype.pow=function(t,e){throw new Error("Not yet implemented")},t.prototype.exp=function(t){throw new Error("Not yet implemented")},t.prototype.expm1=function(t){throw new Error("Not yet implemented")},t.prototype.log=function(t){throw new Error("Not yet implemented")},t.prototype.log1p=function(t){throw new Error("Not yet implemented")},t.prototype.sqrt=function(t){throw new Error("Not yet implemented")},t.prototype.rsqrt=function(t){throw new Error("Not yet implemented")},t.prototype.square=function(t){throw new Error("Not yet implemented")},t.prototype.reciprocal=function(t){throw new Error("Not yet implemented")},t.prototype.relu=function(t){throw new Error("Not yet implemented")},t.prototype.prelu=function(t,e){throw new Error("Not yet implemented")},t.prototype.elu=function(t){throw new Error("Not yet implemented")},t.prototype.eluDer=function(t,e){throw new Error("Not yet implemented")},t.prototype.selu=function(t){throw new Error("Not yet implemented")},t.prototype.int=function(t){throw new Error("Not yet implemented")},t.prototype.clip=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.abs=function(t){throw new Error("Not yet implemented")},t.prototype.complexAbs=function(t){throw new Error("Not yet implemented")},t.prototype.sigmoid=function(t){throw new Error("Not yet implemented")},t.prototype.softplus=function(t){throw new Error("Not yet implemented")},t.prototype.sin=function(t){throw new Error("Not yet implemented")},t.prototype.cos=function(t){throw new Error("Not yet implemented")},t.prototype.tan=function(t){throw new Error("Not yet implemented")},t.prototype.asin=function(t){throw new Error("Not yet implemented")},t.prototype.acos=function(t){throw new Error("Not yet implemented")},t.prototype.atan=function(t){throw new Error("Not yet implemented")},t.prototype.atan2=function(t,e){throw new Error("Not yet implemented")},t.prototype.sinh=function(t){throw new Error("Not yet implemented")},t.prototype.cosh=function(t){throw new Error("Not yet implemented")},t.prototype.tanh=function(t){throw new Error("Not yet implemented")},t.prototype.asinh=function(t){throw new Error("Not yet implemented")},t.prototype.acosh=function(t){throw new Error("Not yet implemented")},t.prototype.atanh=function(t){throw new Error("Not yet implemented")},t.prototype.erf=function(t){throw new Error("Not yet implemented")},t.prototype.step=function(t,e){throw new Error("Not yet implemented")},t.prototype.conv2d=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.conv2dDerInput=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.conv2dDerFilter=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.depthwiseConv2D=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.depthwiseConv2DDerInput=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.depthwiseConv2DDerFilter=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.conv3d=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.conv3dDerInput=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.conv3dDerFilter=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.maxPool=function(t,e){throw new Error("Not yet implemented")},t.prototype.maxPoolBackprop=function(t,e,n,r){throw new Error("Not yet implemented")},t.prototype.avgPool=function(t,e){throw new Error("Not yet implemented")},t.prototype.avgPoolBackprop=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.reshape=function(t,e){throw new Error("Not yet implemented")},t.prototype.cast=function(t,e){throw new Error("Not yet implemented")},t.prototype.tile=function(t,e){throw new Error("Not yet implemented")},t.prototype.pad=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.transpose=function(t,e){throw new Error("Not yet implemented")},t.prototype.gather=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.gatherND=function(t,e){throw new Error("Not yet implemented")},t.prototype.scatterND=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.batchToSpaceND=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.spaceToBatchND=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.resizeBilinear=function(t,e,n,r){throw new Error("Not yet implemented")},t.prototype.resizeBilinearBackprop=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.resizeNearestNeighbor=function(t,e,n,r){throw new Error("Not yet implemented")},t.prototype.resizeNearestNeighborBackprop=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.batchNormalization=function(t,e,n,r,i,a){throw new Error("Not yet implemented")},t.prototype.localResponseNormalization4D=function(t,e,n,r,i){throw new Error("Not yet implemented")},t.prototype.LRNGrad=function(t,e,n,r,i,a,o){throw new Error("Not yet implemented")},t.prototype.multinomial=function(t,e,n,r){throw new Error("Not yet implemented")},t.prototype.oneHot=function(t,e,n,r){throw new Error("Not yet implemented")},t.prototype.cumsum=function(t,e,n,r){throw new Error("Not yet implemented")},t.prototype.nonMaxSuppression=function(t,e,n,r,i){throw new Error("Not yet implemented")},t.prototype.fft=function(t){throw new Error("Not yet implemented")},t.prototype.ifft=function(t){throw new Error("Not yet implemented")},t.prototype.complex=function(t,e){throw new Error("Not yet implemented")},t.prototype.real=function(t){throw new Error("Not yet implemented")},t.prototype.imag=function(t){throw new Error("Not yet implemented")},t.prototype.cropAndResize=function(t,e,n,r,i,a){throw new Error("Not yet implemented")},t.prototype.depthToSpace=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.split=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.sparseToDense=function(t,e,n,r){throw new Error("Not yet implemented")},t.prototype.fill=function(t,e,n){throw new Error("Not yet implemented.")},t.prototype.onesLike=function(t){throw new Error("Not yet implemented")},t.prototype.zerosLike=function(t){throw new Error("Not yet implemented")},t.prototype.setDataMover=function(t){throw new Error("Not yet implemented")},t.prototype.dispose=function(){throw new Error("Not yet implemented")}}();function Ye(t,e,n){if("complex64"===e){if("complex64"===t.dtype)return t.clone();var r=Le(t.shape),i=t.toFloat(),a=n.complex(i,r);return r.dispose(),i.dispose(),a}if(!B(t.dtype,e))return ht.make(t.shape,{dataId:t.dataId},e);if("complex64"===t.dtype){var o=n.real(t);return a=o.cast(e),o.dispose(),a}if("int32"===e)return n.int(t);if("bool"===e){var s=Me(0,t.dtype);return a=n.notEqual(t,s),s.dispose(),a}throw new Error("Error in Cast: unknown dtype argument ("+e+")")}function $e(t,e){return ht.make(e,{dataId:t.dataId},t.dtype)}function ze(t,e){if(t.length!==e.length)throw new Error("Cannot merge real and imag arrays of different lengths. real:"+t.length+", imag: "+e.length+".");for(var n=new Float32Array(2*t.length),r=0;r<n.length;r+=2)n[r]=t[r/2],n[r+1]=e[r/2];return n}function Ve(t,e){return{real:t[2*e],imag:t[2*e+1]}}function He(t,e,n,r){t[2*r]=e,t[2*r+1]=n}function qe(t,e,n){var r=(n?2:-2)*Math.PI*(t/e);return{real:Math.cos(r),imag:Math.sin(r)}}function We(t,e,n,r,i){for(var a=Array.from(e).map(function(t,e){return{score:t,boxIndex:e}}).filter(function(t){return t.score>i}).sort(function(t,e){return e.score-t.score}),o=[],s=0;s<a.length;s++){var c=a[s],u=c.score,l=c.boxIndex;if(u<i)break;for(var d=!1,f=o.length-1;f>=0;--f)if(Ue(t,l,o[f])>=r){d=!0;break}if(!d&&(o.push(l),o.length>=n))break}return Te(o,"int32")}function Ue(t,e,n){var r=t.subarray(4*e,4*e+4),i=t.subarray(4*n,4*n+4),a=Math.min(r[0],r[2]),o=Math.min(r[1],r[3]),s=Math.max(r[0],r[2]),c=Math.max(r[1],r[3]),u=Math.min(i[0],i[2]),l=Math.min(i[1],i[3]),d=Math.max(i[0],i[2]),f=Math.max(i[1],i[3]),h=(s-a)*(c-o),p=(d-u)*(f-l);if(h<=0||p<=0)return 0;var m=Math.max(a,u),v=Math.max(o,l),_=Math.min(s,d),g=Math.min(c,f),b=Math.max(_-m,0)*Math.max(g-v,0);return b/(h+p-b)}function Ge(t,e,n){var r=new Array(t.rank).fill(0),i=t.shape.slice();return e.map(function(e){i[n]=e;var a=t.slice(r,i);return r[n]+=e,a})}function Ke(t,e,n,r,i){for(var a=e[e.length-1],o=[t.length/a,a],s=o[0],c=o[1],u=O(n,s*r),l=O("int32",s*r),d=0;d<s;d++){for(var f=d*c,h=t.subarray(f,f+c),p=[],m=0;m<h.length;m++)p.push({value:h[m],index:m});p.sort(function(t,e){return e.value-t.value});var v=d*r,_=u.subarray(v,v+r),g=l.subarray(v,v+r);for(m=0;m<r;m++)_[m]=p[m].value,g[m]=p[m].index}var b=e.slice();return b[b.length-1]=r,[Ie(u,b,n),Ie(l,b,"int32")]}var Xe=function(t,e,n){this.variableNames=["A"];var r=t.windowSize,i=t.batchSize,a=t.inSize,o=Math.ceil(a/r);n||this.variableNames.push("bestIndicesA"),this.outputShape=[i,o];var s="max"===e?">":"<",c=n?"inOffset + i;":"round(getBestIndicesA(batch, inOffset + i));";this.userCode="\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = outIdx * "+r+";\n\n int bestIndex = inOffset;\n float bestValue = getA(batch, bestIndex);\n\n for (int i = 0; i < "+r+"; i++) {\n int inIdx = "+c+";\n float candidate = getA(batch, inIdx);\n if (candidate "+s+" bestValue) {\n bestValue = candidate;\n bestIndex = inIdx;\n }\n }\n setOutput(float(bestIndex));\n }\n "};function Je(t,e){return["x","y","z","w","u","v"].slice(0,e).map(function(e){return t+"."+e})}function Ze(t,e){return 1===e?[t]:Je(t,e)}function Qe(t,e){for(var n=t.length,r=[],i=0;i<n;i++){var a=n-1-i,o=t[a]||1;(e[e.length-1-i]||1)>1&&1===o&&r.unshift(a)}return r}function tn(t,e){for(var n=[],r=0;r<e.length;r++){var i=t[t.length-r-1],a=e.length-r-1,o=e[a];(null==i||1===i&&o>1)&&n.unshift(a)}return n}function en(t,e){for(var n=[],r=Math.max(t.length,e.length),i=0;i<r;i++){var a=t[t.length-i-1];null==a&&(a=1);var o=e[e.length-i-1];if(null==o&&(o=1),1===a)n.unshift(o);else if(1===o)n.unshift(a);else{if(a!==o)throw Error("Operands could not be broadcast together with shapes "+t+" and "+e+".");n.unshift(a)}}return n}function nn(){var t,e,n,r,i,a,o,s,c,u;return 2===zt.get("WEBGL_VERSION")?(t="#version 300 es",e="in",n="out",r="in",i="texture",a="outputColor",o="out vec4 outputColor;",s="\n const float NAN = uintBitsToFloat(uint(0x7fc00000));\n ",c="\n const float INFINITY = uintBitsToFloat(uint(0x7f800000));\n ",u="\n #define round(value) newRound(value)\n int newRound(float value) {\n return int(floor(value + 0.5));\n }\n\n ivec4 newRound(vec4 value) {\n return ivec4(floor(value + vec4(0.5)));\n }\n "):(t="",e="attribute",n="varying",r="varying",i="texture2D",a="gl_FragColor",o="",s="\n uniform float NAN;\n\n bool isnan(float val) {\n return (val < 1.0 || 0.0 < val || val == 0.0) ? false : true;\n }\n bvec4 isnan(vec4 val) {\n return bvec4(isnan(val.x), isnan(val.y), isnan(val.z), isnan(val.w));\n }\n ",c="\n uniform float INFINITY;\n\n bool isinf(float val) {\n return abs(val) == INFINITY;\n }\n bvec4 isinf(vec4 val) {\n return equal(abs(val), vec4(INFINITY));\n }\n ",u="\n int round(float value) {\n return int(floor(value + 0.5));\n }\n\n ivec4 round(vec4 value) {\n return ivec4(floor(value + vec4(0.5)));\n }\n "),{version:t,attribute:e,varyingVs:n,varyingFs:r,texture2D:i,output:a,defineOutput:o,defineSpecialNaN:s,defineSpecialInf:c,defineRound:u}}function rn(t,e,n){void 0===n&&(n="index");var r=U(e);return r.map(function(e,i){return"int "+t[i]+" = "+n+" / "+e+"; "+(i===r.length-1?"int "+t[i+1]+" = "+n+" - "+t[i]+" * "+e:"index -= "+t[i]+" * "+e)+";"}).join("")}function an(t){return 1===t.length?""+t[0]:"vec"+t.length+"("+t.join(",")+")"}function on(t,e,n,r){var i=[];t.forEach(function(t){var e=k(t.shapeInfo.logicalShape);t.shapeInfo.isUniform?i.push("uniform float "+t.name+(e>1?"["+e+"]":"")+";"):(i.push("uniform sampler2D "+t.name+";"),i.push("uniform int offset"+t.name+";"))});var a,o,s=i.join("\n"),c=t.map(function(t){return function(t,e,n){void 0===n&&(n=!1);var r="";r+=n?cn(t):sn(t);var i=t.shapeInfo.logicalShape,a=e.logicalShape;return i.length<=a.length&&(r+=n?function(t,e){var n,r=t.name,i=r.charAt(0).toUpperCase()+r.slice(1),a="get"+i+"AtOutCoords",o=t.shapeInfo.logicalShape.length,s=e.logicalShape.length,c=Qe(t.shapeInfo.logicalShape,e.logicalShape),u=mn(s),l=s-o,d=["x","y","z","w","u","v"];n=0===o?"":s<2&&c.length>=1?"coords = 0;":c.map(function(t){return"coords."+d[t+l]+" = 0;"}).join("\n");var f="";f=s<2&&o>0?"coords":t.shapeInfo.logicalShape.map(function(t,e){return"coords."+d[e+l]}).join(", ");var h="return outputValue;";if(1===o&&s>1)h="\n return vec4(outputValue.xy, outputValue.xy);\n ";else if(0===o&&s>0)h=1===s?"\n return vec4(outputValue.x, outputValue.x, 0., 0.);\n ":"\n return vec4(outputValue.x);\n ";else if(c.length){var p=o-2,m=o-1;c.indexOf(p)>-1&&c.indexOf(m)>-1?h="return vec4(outputValue.x);":c.indexOf(p)>-1?h="return vec4(outputValue.x, outputValue.y, outputValue.x, outputValue.y);":c.indexOf(m)>-1&&(h="return vec4(outputValue.xx, outputValue.zz);")}return"\n vec4 "+a+"() {\n "+u+" coords = getOutputCoords();\n "+n+"\n vec4 outputValue = get"+i+"("+f+");\n "+h+"\n }\n "}(t,e):function(t,e){var n=t.name,r=n.charAt(0).toUpperCase()+n.slice(1),i="get"+r+"AtOutCoords",a=e.texShape,o=t.shapeInfo.texShape,s=t.shapeInfo.logicalShape.length,c=e.logicalShape.length;if(!t.shapeInfo.isUniform&&s===c&&null==t.shapeInfo.flatOffset&&C(o,a))return"\n float "+i+"() {\n return sampleTexture("+n+", resultUV);\n }\n ";var u=mn(c),l=Qe(t.shapeInfo.logicalShape,e.logicalShape),d=c-s,f=["x","y","z","w","u","v"];return"\n float "+i+"() {\n "+u+" coords = getOutputCoords();\n "+(0===s?"":c<2&&l.length>=1?"coords = 0;":l.map(function(t){return"coords."+f[t+d]+" = 0;"}).join("\n"))+"\n return get"+r+"("+(c<2&&s>0?"coords":t.shapeInfo.logicalShape.map(function(t,e){return"coords."+f[e+d]}).join(", "))+");\n }\n "}(t,e)),r}(t,e,r)}).join("\n"),u=e.texShape,l=nn(),d=function(t){return"\n float sampleTexture(sampler2D textureSampler, vec2 uv) {\n return "+t.texture2D+"(textureSampler, uv).r;\n }\n "}(l),f=function(t){return t.version+"\n precision highp float;\n precision highp int;\n precision highp sampler2D;\n "+t.varyingFs+" vec2 resultUV;\n "+t.defineOutput+"\n const vec2 halfCR = vec2(0.5, 0.5);\n\n struct ivec5\n {\n int x;\n int y;\n int z;\n int w;\n int u;\n };\n\n struct ivec6\n {\n int x;\n int y;\n int z;\n int w;\n int u;\n int v;\n };\n\n "+t.defineSpecialNaN+"\n "+t.defineSpecialInf+"\n "+t.defineRound+"\n\n int imod(int x, int y) {\n return x - y * (x / y);\n }\n\n //Based on the work of Dave Hoskins\n //https://www.shadertoy.com/view/4djSRW\n #define HASHSCALE1 443.8975\n float random(float seed){\n vec2 p = resultUV * seed;\n vec3 p3 = fract(vec3(p.xyx) * HASHSCALE1);\n p3 += dot(p3, p3.yzx + 19.19);\n return fract((p3.x + p3.y) * p3.z);\n }\n\n "+un+"\n "+ln+"\n "+dn+"\n "}(l);return e.isPacked?(a=function(t,e){switch(t.length){case 0:return"\n int getOutputCoords() {\n return 0;\n }\n ";case 1:return function(t,e){var n=[Math.ceil(e[0]/2),Math.ceil(e[1]/2)];return 1===n[0]?"\n int getOutputCoords() {\n return 2 * int(resultUV.x * "+n[1]+".0);\n }\n ":1===n[1]?"\n int getOutputCoords() {\n return 2 * int(resultUV.y * "+n[0]+".0);\n }\n ":"\n int getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+n[0]+", "+n[1]+"));\n return resTexRC.x * "+n[1]+" + resTexRC.y;\n }\n "}(0,e);case 2:return function(t,e){var n=[Math.ceil(e[0]/2),Math.ceil(e[1]/2)];if(C(t,e))return"\n ivec2 getOutputCoords() {\n return 2 * ivec2(resultUV.yx * vec2("+n[0]+", "+n[1]+"));\n }\n ";var r=Math.ceil(t[1]/2);return"\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+n[0]+", "+n[1]+"));\n\n int index = resTexRC.x * "+n[1]+" + resTexRC.y;\n int r = 2 * (index / "+r+");\n int c = imod(index, "+r+") * 2;\n\n return ivec2(r, c);\n }\n "}(t,e);case 3:return function(t,e){var n=[Math.ceil(e[0]/2),Math.ceil(e[1]/2)],r=Math.ceil(t[2]/2),i=r*Math.ceil(t[1]/2);return"\n ivec3 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+n[0]+", "+n[1]+"));\n int index = resTexRC.x * "+n[1]+" + resTexRC.y;\n\n int b = index / "+i+";\n index -= b * "+i+";\n\n int r = 2 * (index / "+r+");\n int c = imod(index, "+r+") * 2;\n\n return ivec3(b, r, c);\n }\n "}(t,e);default:return function(t,e){for(var n=[Math.ceil(e[0]/2),Math.ceil(e[1]/2)],r=Math.ceil(t[t.length-1]/2),i=r*Math.ceil(t[t.length-2]/2),a=i,o="",s="b, r, c",c=2;c<t.length-1;c++)o="\n int b"+c+" = index / "+(a*=t[t.length-c-1])+";\n index -= b"+c+" * "+a+";\n "+o,s="b"+c+", "+s;return"\n ivec"+t.length+" getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+n[0]+", "+n[1]+"));\n int index = resTexRC.x * "+n[1]+" + resTexRC.y;\n\n "+o+"\n\n int b = index / "+i+";\n index -= b * "+i+";\n\n int r = 2 * (index / "+r+");\n int c = imod(index, "+r+") * 2;\n\n return ivec"+t.length+"("+s+");\n }\n "}(t,e)}}(e.logicalShape,u),o=function(t){return"\n void setOutput(vec4 val) {\n "+t.output+" = val;\n }\n "}(l)):(a=function(t,e){switch(t.length){case 0:return"\n int getOutputCoords() {\n return 0;\n }\n ";case 1:return function(t,e){return 1===e[0]?"\n int getOutputCoords() {\n return int(resultUV.x * "+e[1]+".0);\n }\n ":1===e[1]?"\n int getOutputCoords() {\n return int(resultUV.y * "+e[0]+".0);\n }\n ":"\n int getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+e[0]+", "+e[1]+"));\n return resTexRC.x * "+e[1]+" + resTexRC.y;\n }\n "}(0,e);case 2:return function(t,e){return C(t,e)?"\n ivec2 getOutputCoords() {\n return ivec2(resultUV.yx * vec2("+e[0]+", "+e[1]+"));\n }\n ":1===t[1]?"\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+e[0]+", "+e[1]+"));\n int index = resTexRC.x * "+e[1]+" + resTexRC.y;\n return ivec2(index, 0);\n }\n ":1===t[0]?"\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+e[0]+", "+e[1]+"));\n int index = resTexRC.x * "+e[1]+" + resTexRC.y;\n return ivec2(0, index);\n }\n ":"\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+e[0]+", "+e[1]+"));\n int index = resTexRC.x * "+e[1]+" + resTexRC.y;\n int r = index / "+t[1]+";\n int c = index - r * "+t[1]+";\n return ivec2(r, c);\n }\n "}(t,e);case 3:return function(t,e){var n=rn(["r","c","d"],t);return"\n ivec3 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+e[0]+", "+e[1]+"));\n int index = resTexRC.x * "+e[1]+" + resTexRC.y;\n "+n+"\n return ivec3(r, c, d);\n }\n "}(t,e);case 4:return function(t,e){var n=rn(["r","c","d","d2"],t);return"\n ivec4 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+e[0]+", "+e[1]+"));\n int index = resTexRC.x * "+e[1]+" + resTexRC.y;\n "+n+"\n return ivec4(r, c, d, d2);\n }\n "}(t,e);case 5:return function(t,e){var n=rn(["r","c","d","d2","d3"],t);return"\n ivec5 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx * vec2("+e[0]+",\n "+e[1]+"));\n\n int index = resTexRC.x * "+e[1]+" + resTexRC.y;\n\n "+n+"\n\n ivec5 outShape = ivec5(r, c, d, d2, d3);\n return outShape;\n }\n "}(t,e);case 6:return function(t,e){var n=rn(["r","c","d","d2","d3","d4"],t);return"\n ivec6 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+e[0]+", "+e[1]+"));\n int index = resTexRC.x * "+e[1]+" + resTexRC.y;\n\n "+n+"\n\n ivec6 result = ivec6(r, c, d, d2, d3, d4);\n return result;\n }\n "}(t,e);default:throw new Error(t.length+"-D output sampling is not yet supported")}}(e.logicalShape,u),o=function(t){return"\n void setOutput(float val) {\n "+t.output+" = vec4(val, 0, 0, 0);\n }\n "}(l)),r&&(f+=fn),[f,d,o,s,a,c,n].join("\n")}function sn(t){var e=t.shapeInfo.logicalShape;switch(e.length){case 0:return function(t){var e=t.name,n="get"+e.charAt(0).toUpperCase()+e.slice(1);if(t.shapeInfo.isUniform)return"float "+n+"() {return "+e+";}";var r=t.shapeInfo.texShape,i=r[0],a=r[1];if(1===i&&1===a)return"\n float "+n+"() {\n return sampleTexture("+e+", halfCR);\n }\n ";var o=t.shapeInfo.texShape;return"\n float "+n+"() {\n vec2 uv = uvFromFlat("+o[0]+", "+o[1]+", "+hn(e)+");\n return sampleTexture("+e+", uv);\n }\n "}(t);case 1:return function(t){var e=t.name,n="get"+e.charAt(0).toUpperCase()+e.slice(1);if(t.shapeInfo.isUniform)return"\n float "+n+"(int index) {\n "+pn(t)+"\n }\n ";var r=t.shapeInfo.texShape,i=r[0],a=r[1];if(1===a&&1===i)return"\n float "+n+"(int index) {\n return sampleTexture("+e+", halfCR);\n }\n ";var o=hn(e);return 1===a?"\n float "+n+"(int index) {\n vec2 uv = vec2(0.5, (float(index + "+o+") + 0.5) / "+i+".0);\n return sampleTexture("+e+", uv);\n }\n ":1===i?"\n float "+n+"(int index) {\n vec2 uv = vec2((float(index + "+o+") + 0.5) / "+a+".0, 0.5);\n return sampleTexture("+e+", uv);\n }\n ":"\n float "+n+"(int index) {\n vec2 uv = uvFromFlat("+i+", "+a+", index + "+o+");\n return sampleTexture("+e+", uv);\n }\n "}(t);case 2:return function(t){var e=t.shapeInfo.logicalShape,n=t.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),i=t.shapeInfo.texShape;if(null!=i&&C(e,i)){var a=i[0];return"\n float "+r+"(int row, int col) {\n vec2 uv = (vec2(col, row) + halfCR) / vec2("+i[1]+".0, "+a+".0);\n return sampleTexture("+n+", uv);\n }\n "}var o=P(e),s=o.newShape,c=o.keptDims,u=s;if(u.length<e.length)return"\n "+sn(vn(t,u))+"\n float "+r+"(int row, int col) {\n return "+r+"("+_n(["row","col"],c)+");\n }\n ";if(t.shapeInfo.isUniform)return"\n float "+r+"(int row, int col) {\n int index = round(dot(vec2(row, col), vec2("+e[1]+", 1)));\n "+pn(t)+"\n }\n ";var l=i[0],d=i[1],f=hn(n);return 1===d?"\n float "+r+"(int row, int col) {\n float index = dot(vec3(row, col, "+f+"), vec3("+e[1]+", 1, 1));\n vec2 uv = vec2(0.5, (index + 0.5) / "+l+".0);\n return sampleTexture("+n+", uv);\n }\n ":1===l?"\n float "+r+"(int row, int col) {\n float index = dot(vec3(row, col, "+f+"), vec3("+e[1]+", 1, 1));\n vec2 uv = vec2((index + 0.5) / "+d+".0, 0.5);\n return sampleTexture("+n+", uv);\n }\n ":"\n float "+r+"(int row, int col) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * "+e[1]+" + col + "+f+";\n vec2 uv = uvFromFlat("+l+", "+d+", index);\n return sampleTexture("+n+", uv);\n }\n"}(t);case 3:return function(t){var e=t.shapeInfo.logicalShape,n=t.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),i=e[1]*e[2],a=e[2],o=P(e),s=o.newShape,c=o.keptDims,u=s;if(u.length<e.length)return"\n "+sn(vn(t,u))+"\n float "+r+"(int row, int col, int depth) {\n return "+r+"("+_n(["row","col","depth"],c)+");\n }\n ";if(t.shapeInfo.isUniform)return"\n float "+r+"(int row, int col, int depth) {\n int index = round(dot(vec3(row, col, depth),\n vec3("+i+", "+a+", 1)));\n "+pn(t)+"\n }\n ";var l=t.shapeInfo.texShape,d=l[0],f=l[1],h=t.shapeInfo.flatOffset;return f===i&&null==h?"\n float "+r+"(int row, int col, int depth) {\n float texR = float(row);\n float texC = dot(vec2(col, depth), vec2("+a+", 1));\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+f+".0, "+d+".0);\n return sampleTexture("+n+", uv);\n }\n ":f===a&&null==h?"\n float "+r+"(int row, int col, int depth) {\n float texR = dot(vec2(row, col), vec2("+e[1]+", 1));\n float texC = float(depth);\n vec2 uv = (vec2(texC, texR) + halfCR) / vec2("+f+".0, "+d+".0);\n return sampleTexture("+n+", uv);\n }\n ":"\n float "+r+"(int row, int col, int depth) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * "+i+" + col * "+a+" + depth + "+hn(n)+";\n vec2 uv = uvFromFlat("+d+", "+f+", index);\n return sampleTexture("+n+", uv);\n }\n "}(t);case 4:return function(t){var e=t.shapeInfo.logicalShape,n=t.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),i=e[3],a=e[2]*i,o=e[1]*a,s=P(e),c=s.newShape,u=s.keptDims;if(c.length<e.length)return"\n "+sn(vn(t,c))+"\n float "+r+"(int row, int col, int depth, int depth2) {\n return "+r+"("+_n(["row","col","depth","depth2"],u)+");\n }\n ";if(t.shapeInfo.isUniform)return"\n float "+r+"(int row, int col, int depth, int depth2) {\n int index = round(dot(vec4(row, col, depth, depth2),\n vec4("+o+", "+a+", "+i+", 1)));\n "+pn(t)+"\n }\n ";var l=t.shapeInfo.flatOffset,d=t.shapeInfo.texShape,f=d[0],h=d[1];return h===o&&null==l?"\n float "+r+"(int row, int col, int depth, int depth2) {\n float texR = float(row);\n float texC =\n dot(vec3(col, depth, depth2),\n vec3("+a+", "+i+", 1));\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+h+".0, "+f+".0);\n return sampleTexture("+n+", uv);\n }\n ":h===i&&null==l?"\n float "+r+"(int row, int col, int depth, int depth2) {\n float texR = dot(vec3(row, col, depth),\n vec3("+e[1]*e[2]+", "+e[2]+", 1));\n float texC = float(depth2);\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+h+".0, "+f+".0);\n return sampleTexture("+n+", uv);\n }\n ":"\n float "+r+"(int row, int col, int depth, int depth2) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * "+o+" + col * "+a+" +\n depth * "+i+" + depth2;\n vec2 uv = uvFromFlat("+f+", "+h+", index + "+hn(n)+");\n return sampleTexture("+n+", uv);\n }\n "}(t);case 5:return function(t){var e=t.shapeInfo.logicalShape,n=t.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),i=e[4],a=e[3]*i,o=e[2]*a,s=e[1]*o,c=P(e),u=c.newShape,l=c.keptDims;if(u.length<e.length)return"\n "+sn(vn(t,u))+"\n float "+r+"(int row, int col, int depth, int depth2, int depth3) {\n return "+r+"("+_n(["row","col","depth","depth2","depth3"],l)+");\n }\n ";if(t.shapeInfo.isUniform)return"\n float "+r+"(int row, int col, int depth, int depth2, int depth3) {\n float index = dot(\n vec4(row, col, depth, depth2),\n vec4("+s+", "+o+", "+a+", "+i+")) +\n depth3;\n "+pn(t)+"\n }\n ";var d=t.shapeInfo.flatOffset,f=t.shapeInfo.texShape,h=f[0],p=f[1];return p===s&&null==d?"\n float "+r+"(int row, int col, int depth, int depth2, int depth3) {\n int texR = row;\n float texC = dot(vec4(col, depth, depth2, depth3),\n vec4("+o+", "+a+", "+i+", 1));\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+p+".0, "+h+".0);\n return sampleTexture("+n+", uv);\n }\n ":p===i&&null==d?"\n float "+r+"(int row, int col, int depth, int depth2, int depth3) {\n float texR = dot(\n vec4(row, col, depth, depth2),\n vec4("+e[1]*e[2]*e[3]+",\n "+e[2]*e[3]+", "+e[3]+", 1));\n int texC = depth3;\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+p+".0, "+h+".0);\n return sampleTexture("+n+", uv);\n }\n ":"\n float "+r+"(int row, int col, int depth, int depth2, int depth3) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * "+s+" + col * "+o+" + depth * "+a+" +\n depth2 * "+i+" + depth3 + "+hn(n)+";\n vec2 uv = uvFromFlat("+h+", "+p+", index);\n return sampleTexture("+n+", uv);\n }\n "}(t);case 6:return function(t){var e=t.shapeInfo.logicalShape,n=t.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),i=P(e),a=i.newShape,o=i.keptDims;if(a.length<e.length)return"\n "+sn(vn(t,a))+"\n float "+r+"(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n return "+r+"("+_n(["row","col","depth","depth2","depth3","depth4"],o)+");\n }\n ";var s=e[5],c=e[4]*s,u=e[3]*c,l=e[2]*u,d=e[1]*l;if(t.shapeInfo.isUniform)return"\n float "+r+"(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n int index = round(dot(\n vec4(row, col, depth, depth2),\n vec4("+d+", "+l+", "+u+", "+c+")) +\n dot(\n vec2(depth3, depth4),\n vec2("+s+", 1)));\n "+pn(t)+"\n }\n ";var f=t.shapeInfo.flatOffset,h=t.shapeInfo.texShape,p=h[0],m=h[1];return m===d&&null==f?"\n float "+r+"(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n int texR = row;\n float texC = dot(vec4(col, depth, depth2, depth3),\n vec4("+l+", "+u+", "+c+", "+s+")) +\n float(depth4);\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+m+".0, "+p+".0);\n return sampleTexture("+n+", uv);\n }\n ":m===s&&null==f?"\n float "+r+"(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n float texR = dot(vec4(row, col, depth, depth2),\n vec4("+e[1]*e[2]*e[3]*e[4]+",\n "+e[2]*e[3]*e[4]+",\n "+e[3]*e[4]+",\n "+e[4]+")) + float(depth3);\n int texC = depth4;\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+m+".0, "+p+".0);\n return sampleTexture("+n+", uv);\n }\n ":"\n float "+r+"(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * "+d+" + col * "+l+" + depth * "+u+" +\n depth2 * "+c+" + depth3 * "+s+" + depth4 + "+hn(n)+";\n vec2 uv = uvFromFlat("+p+", "+m+", index);\n return sampleTexture("+n+", uv);\n }\n "}(t);default:throw new Error(e.length+"-D input sampling is not yet supported")}}function cn(t){switch(t.shapeInfo.logicalShape.length){case 0:return function(t){var e=t.name;return"\n vec4 get"+e.charAt(0).toUpperCase()+e.slice(1)+"() {\n return "+nn().texture2D+"("+e+", halfCR);\n }\n "}(t);case 1:return function(t){var e=t.name,n="get"+e.charAt(0).toUpperCase()+e.slice(1),r=t.shapeInfo.texShape,i=[Math.ceil(r[0]/2),Math.ceil(r[1]/2)],a=nn();return"\n vec4 "+n+"(int index) {\n vec2 uv = packedUVfrom1D(\n "+i[0]+", "+i[1]+", index);\n return "+a.texture2D+"("+e+", uv);\n }\n "}(t);case 2:return function(t){var e=t.shapeInfo.logicalShape,n=t.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),i=t.shapeInfo.texShape,a=i[0],o=i[1],s=nn();if(null!=i&&C(e,i))return"\n vec4 "+r+"(int row, int col) {\n vec2 uv = (vec2(col, row) + halfCR) / vec2("+o+".0, "+a+".0);\n\n return "+s.texture2D+"("+n+", uv);\n }\n ";var c=[Math.ceil(i[0]/2),Math.ceil(i[1]/2)];return"\n vec4 "+r+"(int row, int col) {\n vec2 uv = packedUVfrom2D("+Math.ceil(e[1]/2)+", "+c[0]+", "+c[1]+", row, col);\n return "+s.texture2D+"("+n+", uv);\n }\n "}(t);case 3:return function(t){var e=t.shapeInfo.logicalShape,n=t.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),i=t.shapeInfo.texShape,a=[Math.ceil(i[0]/2),Math.ceil(i[1]/2)];if(1===e[0])return"\n "+cn(vn(t,e.slice(1)))+"\n vec4 "+r+"(int b, int row, int col) {\n return "+r+"("+_n(["b","row","col"],[1,2])+");\n }\n ";var o=a[0],s=a[1],c=Math.ceil(e[2]/2);return"\n vec4 "+r+"(int b, int row, int col) {\n vec2 uv = packedUVfrom3D(\n "+o+", "+s+", "+c*Math.ceil(e[1]/2)+", "+c+", b, row, col);\n return "+nn().texture2D+"("+n+", uv);\n }\n "}(t);default:return function(t){for(var e=t.shapeInfo.logicalShape,n=e.length,r=t.name,i="get"+r.charAt(0).toUpperCase()+r.slice(1),a=t.shapeInfo.texShape,o=[Math.ceil(a[0]/2),Math.ceil(a[1]/2)],s=o[0],c=o[1],u=Math.ceil(e[n-1]/2),l=u*Math.ceil(e[n-2]/2),d="int b, int row, int col",f="b * "+l+" + (row / 2) * "+u+" + (col / 2)",h=2;h<n-1;h++)d="int b"+h+", "+d,f="b"+h+" * "+(l*=e[n-h-1])+" + "+f;return"\n vec4 "+i+"("+d+") {\n int index = "+f+";\n int texR = index / "+c+";\n int texC = index - texR * "+c+";\n vec2 uv = (vec2(texC, texR) + halfCR) / vec2("+c+", "+s+");\n return "+nn().texture2D+"("+r+", uv);\n }\n "}(t)}}var un="\nvec2 uvFromFlat(int texNumR, int texNumC, int index) {\n int texR = index / texNumC;\n int texC = index - texR * texNumC;\n return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\nvec2 packedUVfrom1D(int texNumR, int texNumC, int index) {\n int texelIndex = index / 2;\n int texR = texelIndex / texNumC;\n int texC = texelIndex - texR * texNumC;\n return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\n",ln="\nvec2 packedUVfrom2D(int texelsInLogicalRow, int texNumR,\n int texNumC, int row, int col) {\n int texelIndex = (row / 2) * texelsInLogicalRow + (col / 2);\n int texR = texelIndex / texNumC;\n int texC = texelIndex - texR * texNumC;\n return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\n",dn="\nvec2 packedUVfrom3D(int texNumR, int texNumC,\n int texelsInBatch, int texelsInLogicalRow, int b,\n int row, int col) {\n int index = b * texelsInBatch + (row / 2) * texelsInLogicalRow + (col / 2);\n int texR = index / texNumC;\n int texC = index - texR * texNumC;\n return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\n",fn="\n float getChannel(vec4 frag, vec2 innerDims) {\n vec2 modCoord = mod(innerDims, 2.);\n return modCoord.x == 0. ?\n (modCoord.y == 0. ? frag.r : frag.g) :\n (modCoord.y == 0. ? frag.b : frag.a);\n }\n float getChannel(vec4 frag, int dim) {\n float modCoord = mod(float(dim), 2.);\n return modCoord == 0. ? frag.r : frag.g;\n }\n";function hn(t){return"offset"+t}function pn(t){var e=t.name,n=k(t.shapeInfo.logicalShape);return n<2?"return "+e+";":"\n for (int i = 0; i < "+n+"; i++) {\n if (i == index) {\n return "+e+"[i];\n }\n }\n "}function mn(t){if(t<=1)return"int";if(2===t)return"ivec2";if(3===t)return"ivec3";if(4===t)return"ivec4";if(5===t)return"ivec5";if(6===t)return"ivec6";throw Error("GPU for rank "+t+" is not yet supported")}function vn(t,e){var n=JSON.parse(JSON.stringify(t));return n.shapeInfo.logicalShape=e,n}function _n(t,e){return e.map(function(e){return t[e]}).join(", ")}var gn=function(t,e,n,r){this.variableNames=["A"],this.usesPackedTextures=!0,b(t.length>2,function(){return"Packed arg"+(n.charAt(0).toUpperCase()+n.slice(1))+" supports only inputs with rank above 2."});var i=t[t.length-1],a=Math.ceil(i/e);this.outputShape=t.slice(0,-1),a>1&&this.outputShape.push(a),r||this.variableNames.push("bestIndicesA");var o,s,c=this.outputShape,u=c.length,l=mn(u),d=Ze("coords",u);if(1===a){var f=mn(s=u+1);o="\n "+f+" sourceLocR = "+f+"("+d.join()+", 0);\n ++"+d[u-1]+";\n "+f+" sourceLocG = "+f+"("+d.join()+", 0);\n ++"+d[u-2]+";\n "+f+" sourceLocA = "+f+"("+d.join()+", 0);\n --"+d[u-1]+";\n "+f+" sourceLocB = "+f+"("+d.join()+", 0);\n --"+d[u-2]+";"}else s=u,o="\n "+l+" sourceLocR = coords;\n ++"+d[u-1]+";\n "+l+" sourceLocG = coords;\n ++"+d[u-2]+";\n "+l+" sourceLocA = coords;\n --"+d[u-1]+";\n "+l+" sourceLocB = coords;\n --"+d[u-2]+";";var h=["x","y","z","w","u","v"].slice(0,s),p="."+h[s-1],m=h.map(function(t){return"int "+t}),v=Ze("sourceLocR",s-1).concat("inIdx.r"),_=Ze("sourceLocG",s-1).concat("inIdx.g"),g=Ze("sourceLocB",s-1).concat("inIdx.b"),y=Ze("sourceLocA",s-1).concat("inIdx.a"),x="max"===n?"greaterThan":"lessThan",w=r?"":"\n inIdx = round(vec4(getBestIndicesAChannel("+v.join()+"),\n getBestIndicesAChannel("+_.join()+"),\n getBestIndicesAChannel("+g.join()+"),\n getBestIndicesAChannel("+y.join()+")));",k="vec4(\n getAChannel("+v.join()+"),\n hasNextCol ? getAChannel("+_.join()+") : 0.,\n hasNextRow ? getAChannel("+g.join()+") : 0.,\n hasNextRow && hasNextCol ? getAChannel("+y.join()+") : 0.)",C=r?"":"\n float getBestIndicesAChannel("+m.join()+") {\n return getChannel(getBestIndicesA("+h.join()+"),\n vec2("+h.slice(-2).join()+"));\n }";this.userCode="\n float getAChannel("+m.join()+") {\n return getChannel(getA("+h.join()+"),\n vec2("+h.slice(-2).join()+"));\n }\n "+C+"\n void main() {\n "+l+" coords = getOutputCoords();\n bool hasNextCol = "+d[u-1]+" < "+(c[u-1]-1)+";\n bool hasNextRow = "+d[u-2]+" < "+(c[u-2]-1)+";\n "+o+"\n ivec4 srcIdx = ivec4(sourceLocR"+p+", sourceLocG"+p+",\n sourceLocB"+p+", sourceLocA"+p+") * "+e+";\n ivec4 inIdx = srcIdx;\n vec4 bestIndex = vec4(inIdx);\n vec4 bestValue = "+k+";\n\n for (int i = 0; i < "+e+"; i++) {\n inIdx = srcIdx;\n "+w+"\n vec4 candidate = "+k+";\n bvec4 nan = isnan(candidate);\n bvec4 replace = bvec4(\n vec4("+x+"(candidate, bestValue)) * (vec4(1.0) - vec4(nan)));\n\n bestValue = vec4(replace.x ? candidate.x : bestValue.x,\n replace.y ? candidate.y : bestValue.y,\n replace.z ? candidate.z : bestValue.z,\n replace.w ? candidate.w : bestValue.w);\n bestIndex = mix(bestIndex, vec4(inIdx), vec4(replace));\n srcIdx++;\n }\n setOutput(bestIndex);\n }\n "},bn=function(t){this.variableNames=["dy"],this.outputShape=t.inShape;var e=t.filterHeight,n=t.filterWidth,r=t.strideHeight,i=t.strideWidth,a=t.dilationHeight,o=t.dilationWidth,s=t.effectiveFilterHeight,c=t.effectiveFilterWidth,u=s-1-t.padInfo.top,l=c-1-t.padInfo.left,d=1/(e*n);this.userCode="\n const ivec2 pads = ivec2("+u+", "+l+");\n const float avgMultiplier = float("+d+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n\n ivec2 dyRCCorner = coords.yz - pads;\n int dyRCorner = dyRCCorner.x;\n int dyCCorner = dyRCCorner.y;\n\n // Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < "+s+";\n wR += "+a+") {\n float dyR = float(dyRCorner + wR) / "+r+".0;\n\n if (dyR < 0.0 || dyR >= "+t.outHeight+".0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < "+c+";\n wC+= "+o+") {\n float dyC = float(dyCCorner + wC) / "+i+".0;\n\n if (dyC < 0.0 || dyC >= "+t.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(b, idyR, idyC, d);\n\n dotProd += dyValue * avgMultiplier;\n }\n }\n setOutput(dotProd);\n }\n "},yn=function(t,e,n,r,i,a){this.outputShape=[],this.variableNames=["x","mean","variance"],en(t,e),en(t,n);var o="0.0";null!=r&&(en(t,r),this.variableNames.push("offset"),o="getOffsetAtOutCoords()");var s="1.0";null!=i&&(en(t,i),this.variableNames.push("scale"),s="getScaleAtOutCoords()"),this.outputShape=t,this.userCode="\n void main() {\n float x = getXAtOutCoords();\n float mean = getMeanAtOutCoords();\n float variance = getVarianceAtOutCoords();\n float offset = "+o+";\n float scale = "+s+";\n float inv = scale * inversesqrt(variance + float("+a+"));\n setOutput(dot(vec3(x, -mean, offset), vec3(inv, inv, 1)));\n }\n "},xn=function(t,e,n,r,i,a){this.usesPackedTextures=!0,this.variableNames=["x","mean","variance"],en(t,e),en(t,n);var o="vec4(0.0)";null!=r&&(en(t,r),this.variableNames.push("offset"),o="getOffsetAtOutCoords()");var s="vec4(1.0)";null!=i&&(en(t,i),this.variableNames.push("scale"),s="getScaleAtOutCoords()"),this.outputShape=t,this.userCode="\n void main() {\n vec4 offset = "+o+";\n vec4 scale = "+s+";\n\n vec4 x = getXAtOutCoords();\n vec4 mean = getMeanAtOutCoords();\n vec4 variance = getVarianceAtOutCoords();\n\n vec4 inv = scale * inversesqrt(variance + vec4("+a+"));\n\n setOutput((x - mean) * inv + offset);\n }\n "},wn="return areal * breal - aimag * bimag;",kn="return areal * bimag + aimag * breal;",Cn=function(t,e,n){this.variableNames=["AReal","AImag","BReal","BImag"],this.outputShape=en(e,n),this.userCode="\n float binaryOpComplex(\n float areal, float aimag, float breal, float bimag) {\n "+t+"\n }\n\n void main() {\n float areal = getARealAtOutCoords();\n float aimag = getAImagAtOutCoords();\n float breal = getBRealAtOutCoords();\n float bimag = getBImagAtOutCoords();\n setOutput(binaryOpComplex(areal, aimag, breal, bimag));\n }\n "},En="return a + b;",Sn="return a - b;",In="return a * b;",Mn=function(t,e,n){this.variableNames=["A","B"],this.outputShape=en(e,n),this.userCode="\n float binaryOperation(float a, float b) {\n "+t+"\n }\n\n void main() {\n float a = getAAtOutCoords();\n float b = getBAtOutCoords();\n setOutput(binaryOperation(a, b));\n }\n "},Tn=function(t,e,n){this.variableNames=["A","B"],this.supportsBroadcasting=!0,this.usesPackedTextures=!0,this.outputShape=en(e,n),this.userCode="\n vec4 binaryOperation(vec4 a, vec4 b) {\n "+t+"\n }\n\n void main() {\n vec4 a = getAAtOutCoords();\n vec4 b = getBAtOutCoords();\n setOutput(binaryOperation(a, b));\n }\n "},Dn=function(){function t(t){this.variableNames=["A"],this.outputShape=t,this.userCode="\n uniform float min;\n uniform float max;\n\n void main() {\n float value = getAAtOutCoords();\n if (isnan(value)) {\n setOutput(value);\n return;\n }\n\n setOutput(clamp(value, min, max));\n }\n "}return t.prototype.getCustomSetupFunc=function(t,e){var n=this;return function(r,i){null==n.minLoc&&(n.minLoc=r.getUniformLocationNoThrow(i,"min"),n.maxLoc=r.getUniformLocationNoThrow(i,"max")),r.gl.uniform1f(n.minLoc,t),r.gl.uniform1f(n.maxLoc,e)}},t}(),Rn=function(){function t(t){this.variableNames=["A"],this.usesPackedTextures=!0,this.outputShape=t,this.userCode="\n uniform float min;\n uniform float max;\n\n void main() {\n vec4 value = getAAtOutCoords();\n\n if (any(isnan(value))) {\n setOutput(value);\n return;\n }\n\n setOutput(clamp(value, vec4(min), vec4(max)));\n }\n "}return t.prototype.getCustomSetupFunc=function(t,e){var n=this;return function(r,i){null==n.minLoc&&(n.minLoc=r.getUniformLocationNoThrow(i,"min"),n.maxLoc=r.getUniformLocationNoThrow(i,"max")),r.gl.uniform1f(n.minLoc,t),r.gl.uniform1f(n.maxLoc,e)}},t}(),Pn=function(t){this.variableNames=["real","imag"],this.outputShape=t,this.userCode="\n void main() {\n float re = abs(getRealAtOutCoords());\n float im = abs(getImagAtOutCoords());\n float mx = max(re, im);\n\n // sadly the length function in glsl is not underflow-safe\n // (at least not on Intel GPUs). So the safe solution is\n // to ensure underflow-safety in all cases.\n setOutput(\n mx == 0.0 ? 0.0 : mx * length(vec2(1, min(re, im)/mx))\n );\n }\n "},On=function(t){this.outputShape=[],this.outputShape=le(t,1),this.variableNames=t.map(function(t,e){return"T"+e});var e=new Array(t.length-1);e[0]=t[0][1];for(var n=1;n<e.length;n++)e[n]=e[n-1]+t[n][1];var r=["if (yC < "+e[0]+") setOutput(getT0(yR, yC));"];for(n=1;n<e.length;n++){var i=e[n-1];r.push("else if (yC < "+e[n]+") setOutput(getT"+n+"(yR, yC-"+i+"));")}var a=e.length,o=e[e.length-1];r.push("else setOutput(getT"+a+"(yR, yC-"+o+"));"),this.userCode="\n void main() {\n ivec2 coords = getOutputCoords();\n int yR = coords.x;\n int yC = coords.y;\n\n "+r.join("\n ")+"\n }\n "},Ln=function(t,e){this.usesPackedTextures=!0,this.outputShape=[],this.outputShape=le(t,e);var n=this.outputShape,r=n.length,i=mn(r),a=Ze("coords",r),o=["x","y","z","w","u","v"].slice(0,r);this.variableNames=t.map(function(t,e){return"T"+e});var s=new Array(t.length-1);s[0]=t[0][e];for(var c=1;c<s.length;c++)s[c]=s[c-1]+t[c][e];var u=o[e],l="vec2("+o.slice(-2).join()+")",d=o.join(),f="if ("+u+" < "+s[0]+")\n return getChannel(getT0("+d+"), "+l+");";for(c=1;c<s.length;c++){var h=s[c-1];f+="\n else if ("+u+" < "+s[c]+") {\n "+u+" -= "+h+";\n return getChannel(getT"+c+"("+d+"), "+l+");\n }"}var p=s.length;f+="\n else {\n "+u+" -= "+s[s.length-1]+";\n return getChannel(getT"+p+"("+d+"), "+l+");\n }",this.userCode="\n float getValue("+o.map(function(t){return"int "+t})+") {\n "+f+"\n }\n\n void main() {\n "+i+" coords = getOutputCoords();\n vec4 result = vec4(getValue("+a+"), 0., 0., 0.);\n if (++"+a[r-1]+" < "+n[r-1]+") {\n result.g = getValue("+a+");\n }\n if (++"+a[r-2]+" < "+n[r-2]+") {\n result.a = getValue("+a+");\n }\n if ("+a[r-2]+" < "+n[r-2]+" &&\n --"+a[r-1]+" < "+n[r-1]+") {\n result.b = getValue("+a+");\n }\n setOutput(result);\n }\n "},An=function(t){this.variableNames=["x","dy"],this.outputShape=t.filterShape;var e=t.strideHeight,n=t.strideWidth,r=t.padInfo.top,i=t.padInfo.left;this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int wR = coords.x;\n int wC = coords.y;\n int d1 = coords.z;\n int d2 = coords.w;\n\n // Convolve x(?, ?, d1) with dy(:, :, d2) to get dw(wR, wC, d1, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n\n for (int b = 0; b < "+t.batchSize+"; b++) {\n for (int yR = 0; yR < "+t.outHeight+"; yR++) {\n int xR = wR + yR * "+e+" - "+r+";\n\n if (xR < 0 || xR >= "+t.inHeight+") {\n continue;\n }\n\n for (int yC = 0; yC < "+t.outWidth+"; yC++) {\n int xC = wC + yC * "+n+" - "+i+";\n\n if (xC < 0 || xC >= "+t.inWidth+") {\n continue;\n }\n\n float dyValue = getDy(b, yR, yC, d2);\n float xValue = getX(b, xR, xC, d1);\n dotProd += (xValue * dyValue);\n }\n }\n }\n setOutput(dotProd);\n }\n "},Nn=function(t){this.variableNames=["dy","W"],this.outputShape=t.inShape;var e=t.filterHeight,n=t.filterWidth,r=t.strideHeight,i=t.strideWidth,a=e-1-t.padInfo.top,o=n-1-t.padInfo.left;this.userCode="\n const ivec2 pads = ivec2("+a+", "+o+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d1 = coords[3];\n\n ivec2 dyCorner = coords.yz - pads;\n int dyRCorner = dyCorner.x;\n int dyCCorner = dyCorner.y;\n\n // Convolve dy(?, ?, d2) with w(:, :, d1, d2) to compute dx(xR, xC, d1).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < "+e+"; wR++) {\n float dyR = float(dyRCorner + wR) / "+r+".0;\n\n if (dyR < 0.0 || dyR >= "+t.outHeight+".0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n int wRPerm = "+e+" - 1 - wR;\n\n for (int wC = 0; wC < "+n+"; wC++) {\n float dyC = float(dyCCorner + wC) / "+i+".0;\n\n if (dyC < 0.0 || dyC >= "+t.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n int wCPerm = "+n+" - 1 - wC;\n\n for (int d2 = 0; d2 < "+t.outChannels+"; d2++) {\n float xValue = getDy(batch, idyR, idyC, d2);\n float wValue = getW(wRPerm, wCPerm, d1, d2);\n dotProd += xValue * wValue;\n }\n }\n }\n setOutput(dotProd);\n }\n "},Bn=function(t){this.variableNames=["x","dy"],this.outputShape=t.filterShape;var e=t.strideDepth,n=t.strideHeight,r=t.strideWidth,i=t.padInfo.front,a=t.padInfo.top,o=t.padInfo.left;this.userCode="\n void main() {\n ivec5 coords = getOutputCoords();\n int wF = coords.x;\n int wR = coords.y;\n int wC = coords.z;\n int d1 = coords.w;\n int d2 = coords.u;\n\n float dotProd = 0.0;\n\n for (int b = 0; b < "+t.batchSize+"; b++) {\n for (int yF = 0; yF < "+t.outDepth+"; yF++) {\n int xF = wF + yF * "+e+" - "+i+";\n\n if (xF < 0 || xF >= "+t.inDepth+") {\n continue;\n }\n\n for (int yR = 0; yR < "+t.outHeight+"; yR++) {\n int xR = wR + yR * "+n+" - "+a+";\n\n if (xR < 0 || xR >= "+t.inHeight+") {\n continue;\n }\n\n for (int yC = 0; yC < "+t.outWidth+"; yC++) {\n int xC = wC + yC * "+r+" - "+o+";\n\n if (xC < 0 || xC >= "+t.inWidth+") {\n continue;\n }\n\n float dyValue = getDy(b, yF, yR, yC, d2);\n float xValue = getX(b, xF, xR, xC, d1);\n dotProd += (xValue * dyValue);\n }\n }\n }\n }\n setOutput(dotProd);\n }\n "},jn=function(t){this.variableNames=["dy","W"],this.outputShape=t.inShape;var e=t.filterDepth,n=t.filterHeight,r=t.filterWidth,i=t.strideDepth,a=t.strideHeight,o=t.strideWidth,s=e-1-t.padInfo.front,c=n-1-t.padInfo.top,u=r-1-t.padInfo.left;this.userCode="\n const ivec3 pads = ivec3("+s+", "+c+", "+u+");\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int d1 = coords.u;\n\n\n ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n int dyFCorner = dyCorner.x;\n int dyRCorner = dyCorner.y;\n int dyCCorner = dyCorner.z;\n\n float dotProd = 0.0;\n for (int wF = 0; wF < "+e+"; wF++) {\n float dyF = float(dyFCorner + wF) / "+i+".0;\n\n if (dyF < 0.0 || dyF >= "+t.outDepth+".0 || fract(dyF) > 0.0) {\n continue;\n }\n int idyF = int(dyF);\n\n int wFPerm = "+e+" - 1 - wF;\n\n for (int wR = 0; wR < "+n+"; wR++) {\n float dyR = float(dyRCorner + wR) / "+a+".0;\n\n if (dyR < 0.0 || dyR >= "+t.outHeight+".0 ||\n fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n int wRPerm = "+n+" - 1 - wR;\n\n for (int wC = 0; wC < "+r+"; wC++) {\n float dyC = float(dyCCorner + wC) / "+o+".0;\n\n if (dyC < 0.0 || dyC >= "+t.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n int wCPerm = "+r+" - 1 - wC;\n\n for (int d2 = 0; d2 < "+t.outChannels+"; d2++) {\n float xValue = getDy(batch, idyF, idyR, idyC, d2);\n float wValue = getW(wFPerm, wRPerm, wCPerm, d1, d2);\n dotProd += xValue * wValue;\n }\n }\n }\n }\n setOutput(dotProd);\n }\n "},Fn=function(t){this.variableNames=["x","dy"],this.outputShape=t.filterShape;var e=t.strideHeight,n=t.strideWidth,r=t.padInfo.top,i=t.padInfo.left,a=t.outChannels/t.inChannels;this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int wR = coords.x;\n int wC = coords.y;\n int d1 = coords.z;\n int dm = coords.w;\n int d2 = d1 * "+a+" + dm;\n\n float dotProd = 0.0;\n\n // TODO: Vec4 over the batch size\n for (int b = 0; b < "+t.batchSize+"; b++) {\n for (int yR = 0; yR < "+t.outHeight+"; yR++) {\n int xR = wR + yR * "+e+" - "+r+";\n\n if (xR < 0 || xR >= "+t.inHeight+") {\n continue;\n }\n\n for (int yC = 0; yC < "+t.outWidth+"; yC++) {\n int xC = wC + yC * "+n+" - "+i+";\n\n if (xC < 0 || xC >= "+t.inWidth+") {\n continue;\n }\n\n float dyValue = getDy(b, yR, yC, d2);\n float xValue = getX(b, xR, xC, d1);\n dotProd += (xValue * dyValue);\n }\n }\n }\n setOutput(dotProd);\n }\n "},Yn=function(t){this.variableNames=["dy","W"],this.outputShape=t.inShape;var e=t.filterHeight,n=t.filterWidth,r=t.strideHeight,i=t.strideWidth,a=e-1-t.padInfo.top,o=n-1-t.padInfo.left,s=t.outChannels/t.inChannels;this.userCode="\n const ivec2 pads = ivec2("+a+", "+o+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d1 = coords[3];\n ivec2 dyCorner = coords.yz - pads;\n int dyRCorner = dyCorner.x;\n int dyCCorner = dyCorner.y;\n\n float dotProd = 0.0;\n\n for (int wR = 0; wR < "+e+"; wR++) {\n float dyR = float(dyRCorner + wR) / "+r+".0;\n\n if (dyR < 0.0 || dyR >= "+t.outHeight+".0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n int wRPerm = "+e+" - 1 - wR;\n\n for (int wC = 0; wC < "+n+"; wC++) {\n float dyC = float(dyCCorner + wC) / "+i+".0;\n\n if (dyC < 0.0 || dyC >= "+t.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n int wCPerm = "+n+" - 1 - wC;\n\n // TODO: Vec4 over the channelMul\n for (int dm = 0; dm < "+s+"; dm++) {\n int d2 = d1 * "+s+" + dm;\n float xValue = getDy(batch, idyR, idyC, d2);\n float wValue = getW(wRPerm, wCPerm, d1, dm);\n dotProd += xValue * wValue;\n }\n }\n }\n setOutput(dotProd);\n }\n "},$n=function(t){this.variableNames=["x","W"],this.outputShape=t.outShape;var e=t.padInfo.top,n=t.padInfo.left,r=t.strideHeight,i=t.strideWidth,a=t.dilationHeight,o=t.dilationWidth,s=t.filterHeight,c=t.filterWidth,u=4*Math.floor(t.inChannels/4),l=t.inChannels%4;this.userCode="\n const ivec2 strides = ivec2("+r+", "+i+");\n const ivec2 pads = ivec2("+e+", "+n+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d2 = coords[3];\n\n ivec2 xRCCorner = coords.yz * strides - pads;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // Convolve x(?, ?, d1) with w(:, :, d1, d2) to get y(yR, yC, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < "+s+"; wR++) {\n int xR = xRCorner + wR * "+a+";\n\n if (xR < 0 || xR >= "+t.inHeight+") {\n continue;\n }\n\n for (int wC = 0; wC < "+c+"; wC++) {\n int xC = xCCorner + wC * "+o+";\n\n if (xC < 0 || xC >= "+t.inWidth+") {\n continue;\n }\n\n for (int d1 = 0; d1 < "+u+"; d1 += 4) {\n vec4 xValues = vec4(\n getX(batch, xR, xC, d1),\n getX(batch, xR, xC, d1 + 1),\n getX(batch, xR, xC, d1 + 2),\n getX(batch, xR, xC, d1 + 3)\n );\n vec4 wValues = vec4(\n getW(wR, wC, d1, d2),\n getW(wR, wC, d1 + 1, d2),\n getW(wR, wC, d1 + 2, d2),\n getW(wR, wC, d1 + 3, d2)\n );\n\n dotProd += dot(xValues, wValues);\n }\n\n if ("+(1===l)+") {\n dotProd +=\n getX(batch, xR, xC, "+u+") *\n getW(wR, wC, "+u+", d2);\n } else if ("+(2===l)+") {\n vec2 xValues = vec2(\n getX(batch, xR, xC, "+u+"),\n getX(batch, xR, xC, "+u+" + 1)\n );\n vec2 wValues = vec2(\n getW(wR, wC, "+u+", d2),\n getW(wR, wC, "+u+" + 1, d2)\n );\n dotProd += dot(xValues, wValues);\n } else if ("+(3===l)+") {\n vec3 xValues = vec3(\n getX(batch, xR, xC, "+u+"),\n getX(batch, xR, xC, "+u+" + 1),\n getX(batch, xR, xC, "+u+" + 2)\n );\n vec3 wValues = vec3(\n getW(wR, wC, "+u+", d2),\n getW(wR, wC, "+u+" + 1, d2),\n getW(wR, wC, "+u+" + 2, d2)\n );\n dotProd += dot(xValues, wValues);\n }\n }\n }\n setOutput(dotProd);\n }\n "},zn=function(t){this.variableNames=["x","W"],this.outputShape=t.outShape;var e=t.padInfo.front,n=t.padInfo.top,r=t.padInfo.left,i=t.strideDepth,a=t.strideHeight,o=t.strideWidth,s=t.dilationDepth,c=t.dilationHeight,u=t.dilationWidth,l=t.filterDepth,d=t.filterHeight,f=t.filterWidth,h=4*Math.floor(t.inChannels/4),p=t.inChannels%4;this.userCode="\n const ivec3 strides = ivec3("+i+", "+a+", "+o+");\n const ivec3 pads = ivec3("+e+", "+n+", "+r+");\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int d2 = coords.u;\n\n ivec3 xFRCCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n int xFCorner = xFRCCorner.x;\n int xRCorner = xFRCCorner.y;\n int xCCorner = xFRCCorner.z;\n\n // Convolve x(?, ?, ?, d1) with w(:, :, :, d1, d2) to get\n // y(yF, yR, yC, d2). ? = to be determined. : = across all\n // values in that axis.\n float dotProd = 0.0;\n for (int wF = 0; wF < "+l+"; wF++) {\n int xF = xFCorner + wF * "+s+";\n\n if (xF < 0 || xF >= "+t.inDepth+") {\n continue;\n }\n\n for (int wR = 0; wR < "+d+"; wR++) {\n int xR = xRCorner + wR * "+c+";\n\n if (xR < 0 || xR >= "+t.inHeight+") {\n continue;\n }\n\n for (int wC = 0; wC < "+f+"; wC++) {\n int xC = xCCorner + wC * "+u+";\n\n if (xC < 0 || xC >= "+t.inWidth+") {\n continue;\n }\n\n for (int d1 = 0; d1 < "+h+"; d1 += 4) {\n vec4 xValues = vec4(\n getX(batch, xF, xR, xC, d1),\n getX(batch, xF, xR, xC, d1 + 1),\n getX(batch, xF, xR, xC, d1 + 2),\n getX(batch, xF, xR, xC, d1 + 3)\n );\n vec4 wValues = vec4(\n getW(wF, wR, wC, d1, d2),\n getW(wF, wR, wC, d1 + 1, d2),\n getW(wF, wR, wC, d1 + 2, d2),\n getW(wF, wR, wC, d1 + 3, d2)\n );\n\n dotProd += dot(xValues, wValues);\n }\n\n if ("+(1===p)+") {\n dotProd +=\n getX(batch, xF, xR, xC, "+h+") *\n getW(wF, wR, wC, "+h+", d2);\n } else if ("+(2===p)+") {\n vec2 xValues = vec2(\n getX(batch, xF, xR, xC, "+h+"),\n getX(batch, xF, xR, xC, "+h+" + 1)\n );\n vec2 wValues = vec2(\n getW(wF, wR, wC, "+h+", d2),\n getW(wF, wR, wC, "+h+" + 1, d2)\n );\n dotProd += dot(xValues, wValues);\n } else if ("+(3===p)+") {\n vec3 xValues = vec3(\n getX(batch, xF, xR, xC, "+h+"),\n getX(batch, xF, xR, xC, "+h+" + 1),\n getX(batch, xF, xR, xC, "+h+" + 2)\n );\n vec3 wValues = vec3(\n getW(wF, wR, wC, "+h+", d2),\n getW(wF, wR, wC, "+h+" + 1, d2),\n getW(wF, wR, wC, "+h+" + 2, d2)\n );\n dotProd += dot(xValues, wValues);\n }\n }\n }\n }\n setOutput(dotProd);\n }\n "},Vn=function(t){this.variableNames=["x","W"],this.outputShape=t.outShape;var e=t.inHeight,n=t.inWidth,r=t.padInfo.top,i=t.padInfo.left,a=t.strideHeight,o=t.strideWidth,s=t.dilationHeight,c=t.dilationWidth,u=t.filterHeight,l=t.filterWidth,d=t.outChannels/t.inChannels;this.userCode="\n const ivec2 strides = ivec2("+a+", "+o+");\n const ivec2 pads = ivec2("+r+", "+i+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords.x;\n ivec2 xRCCorner = coords.yz * strides - pads;\n int d2 = coords.w;\n int d1 = d2 / "+d+";\n int q = d2 - d1 * "+d+";\n\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // Convolve x(?, ?, d1) with w(:, :, d1, q) to get y(yR, yC, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n // TODO(dsmilkov): Flatten the two for loops and vec4 the operations.\n for (int wR = 0; wR < "+u+"; wR++) {\n int xR = xRCorner + wR * "+s+";\n\n if (xR < 0 || xR >= "+e+") {\n continue;\n }\n\n for (int wC = 0; wC < "+l+"; wC++) {\n int xC = xCCorner + wC * "+c+";\n\n if (xC < 0 || xC >= "+n+") {\n continue;\n }\n\n float xVal = getX(batch, xR, xC, d1);\n float wVal = getW(wR, wC, d1, q);\n dotProd += xVal * wVal;\n }\n }\n setOutput(dotProd);\n }\n "},Hn=function(t){this.variableNames=["x","W"],this.usesPackedTextures=!0,this.outputShape=t.outShape;for(var e=t.inHeight,n=t.inWidth,r=t.padInfo.top,i=t.padInfo.left,a=t.strideHeight,o=t.strideWidth,s=t.dilationHeight,c=t.dilationWidth,u=t.filterHeight,l=t.filterWidth,d=l,f="int xR; int xC; int xCOffset;",h=0;h<u;h++)for(var p=0;p<l;p++)f+="\n vec4 xTexelR"+h+"C"+2*p+" = vec4(0.);\n vec4 wR"+h+"C"+p+" = vec4(0.);\n vec4 xR"+h+"C"+p+" = vec4(0.);";for(h=0;h<u;h++)for(var m=0;m<d;m++){if(f+="\n xR = xRCorner + "+h*s+";\n xC = xCCorner + "+(p=2*m)*c+";\n ",1===o){if(p<l&&(f+=i%2==1?"\n xCOffset = xC + 1;\n if(xR >= 0 && xR < "+e+" && xCOffset >= 0 && xCOffset < "+n+") {\n xTexelR"+h+"C"+p+" = getX(batch, xR, xCOffset, d1);\n } else {\n xTexelR"+h+"C"+p+" = vec4(0.);\n }\n\n xCOffset = xC + 1 - 2;\n if(xR >= 0 && xR < "+e+" && xCOffset >= 0 && xCOffset < "+n+") {\n vec4 previous = getX(batch, xR, xCOffset, d1);\n xR"+h+"C"+p+" = vec4(previous.zw, xTexelR"+h+"C"+p+".xy);\n } else {\n xR"+h+"C"+p+" = vec4(0, 0, xTexelR"+h+"C"+p+".xy);\n }\n ":"\n if(xR >= 0 && xR < "+e+" && xC >= 0 && xC < "+n+") {\n xTexelR"+h+"C"+p+" = getX(batch, xR, xC, d1);\n } else {\n xTexelR"+h+"C"+p+" = vec4(0.);\n }\n\n xR"+h+"C"+p+" = xTexelR"+h+"C"+p+";\n ",p+1<l)){var _=i%2==0?v(c):c;c%2==0&&i%2==1||c%2!=0&&i%2!=1?(f+="\n xCOffset = xC + "+i%2+" + "+_+";\n\n if(xR >= 0 && xR < "+e+" &&\n xCOffset >= 0 && xCOffset < "+n+") {\n xTexelR"+h+"C"+(p+2)+" = getX(batch, xR, xCOffset, d1);\n }\n ",c>1&&(f+="\n xCOffset -= 2;\n if(xR >= 0 && xR < "+e+" &&\n xCOffset >= 0 && xCOffset < "+n+") {\n xTexelR"+h+"C"+p+" = getX(batch, xR, xCOffset, d1);\n } else {\n xTexelR"+h+"C"+p+" = vec4(0.);\n }\n "),f+="\n xR"+h+"C"+(p+1)+" = vec4(\n xTexelR"+h+"C"+p+".zw, xTexelR"+h+"C"+(p+2)+".xy);\n "):f+="\n xCOffset = xC + "+_+";\n\n if(xR >= 0 && xR < "+e+" &&\n xCOffset >= 0 && xCOffset < "+n+") {\n xTexelR"+h+"C"+(p+2)+" = getX(batch, xR, xCOffset, d1);\n }\n\n xR"+h+"C"+(p+1)+" = xTexelR"+h+"C"+(p+2)+";\n "}}else p<l&&(f+="\n if(xR >= 0 && xR < "+e+") {\n ",i%2==1?(f+="\n xCOffset = xC + 1 - "+o+";\n if(xCOffset >= 0 && xCOffset < "+n+") {\n xTexelR"+h+"C"+p+" = getX(batch, xR, xCOffset, d1);\n } else {\n xTexelR"+h+"C"+p+" = vec4(0.);\n }\n\n if(xC + 1 >= 0 && xC + 1 < "+n+") {\n xTexelR"+h+"C"+(p+2)+" = getX(batch, xR, xC + 1, d1);\n } else {\n xTexelR"+h+"C"+(p+2)+" = vec4(0.);\n }\n\n xR"+h+"C"+p+" = vec4(\n xTexelR"+h+"C"+p+".zw, xTexelR"+h+"C"+(p+2)+".zw);\n ",p+1<l&&(f+="\n vec4 final = vec4(0.);\n xCOffset = xC + 1 + "+o+";\n if(xCOffset >= 0 && xCOffset < "+n+") {\n final = getX(batch, xR, xCOffset, d1);\n }\n xR"+h+"C"+(p+1)+" = vec4(xTexelR"+h+"C"+(p+2)+".xy, final.xy);\n ")):(f+="\n if(xC >= 0 && xC < "+n+") {\n xTexelR"+h+"C"+p+" = getX(batch, xR, xC, d1);\n } else {\n xTexelR"+h+"C"+p+" = vec4(0.);\n }\n\n xCOffset = xC + "+o+";\n if(xCOffset >= 0 && xCOffset < "+n+") {\n xTexelR"+h+"C"+(p+2)+" = getX(batch, xR, xCOffset, d1);\n } else {\n xTexelR"+h+"C"+(p+2)+" = vec4(0.);\n }\n\n xR"+h+"C"+p+" = vec4(\n xTexelR"+h+"C"+p+".xy, xTexelR"+h+"C"+(p+2)+".xy);\n ",p+1<l&&(f+="\n xR"+h+"C"+(p+1)+" = vec4(\n xTexelR"+h+"C"+p+".zw, xTexelR"+h+"C"+(p+2)+".zw);\n ")),f+="}");p<l&&(f+="\n vec4 wTexelR"+h+"C"+p+" = getW("+h+", "+p+", d1, q);\n wR"+h+"C"+p+" = vec4(wTexelR"+h+"C"+p+".xz, wTexelR"+h+"C"+p+".xz);\n ",p+1<l&&(f+="\n vec4 wTexelR"+h+"C"+(p+1)+" = getW("+h+", "+(p+1)+", d1, q);\n wR"+h+"C"+(p+1)+" =\n vec4(wTexelR"+h+"C"+(p+1)+".xz, wTexelR"+h+"C"+(p+1)+".xz);"))}for(h=0;h<u;h++)for(p=0;p<l;p++)f+="result += xR"+h+"C"+p+" * wR"+h+"C"+p+";";this.userCode="\n const ivec2 strides = ivec2("+a+", "+o+");\n const ivec2 pads = ivec2("+r+", "+i+");\n\n void main() {\n\n ivec4 coords = getOutputCoords();\n int batch = coords.x;\n ivec2 xRCCorner = coords.yz * strides - pads;\n int d2 = coords.w;\n int d1 = d2;\n int q = 0;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n vec4 result = vec4(0.);\n\n "+f+"\n\n setOutput(result);\n }\n "},qn=function(t,e,n,r,i){this.variableNames=["Image","Boxes","BoxInd"],this.outputShape=[];var a=t[0],o=t[1],s=t[2],c=t[3],u=e[0],l=n[0],d=n[1];this.outputShape=[u,l,d,c];var f="bilinear"===r?1:0,h=[o-1+".0",s-1+".0"],p=h[0],m=h[1],v=l>1?[""+(o-1)/(l-1),"(y2-y1) * height_ratio","y1*"+p+" + float(y)*(height_scale)"]:["0.0","0.0","0.5 * (y1+y2) * "+p],_=v[0],g=v[1],b=v[2],y=d>1?[""+(s-1)/(d-1),"(x2-x1) * width_ratio","x1*"+m+" + float(x)*(width_scale)"]:["0.0","0.0","0.5 * (x1+x2) * "+m],x=y[0],w=y[1],k=y[2];this.userCode="\n const float height_ratio = float("+_+");\n const float width_ratio = float("+x+");\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int y = coords[1];\n int x = coords[2];\n int d = coords[3];\n\n // get box vals\n float y1 = getBoxes(b,0);\n float x1 = getBoxes(b,1);\n float y2 = getBoxes(b,2);\n float x2 = getBoxes(b,3);\n\n // get image in batch index\n int bInd = round(getBoxInd(b));\n if(bInd < 0 || bInd >= "+a+") {\n return;\n }\n\n float height_scale = "+g+";\n float width_scale = "+w+";\n\n float in_y = "+b+";\n if( in_y < 0.0 || in_y > "+p+" ) {\n setOutput(float("+i+"));\n return;\n }\n float in_x = "+k+";\n if( in_x < 0.0 || in_x > "+m+" ) {\n setOutput(float("+i+"));\n return;\n }\n\n vec2 sourceFracIndexCR = vec2(in_x,in_y);\n if("+f+" == 1) {\n // Compute the four integer indices.\n ivec2 sourceFloorCR = ivec2(sourceFracIndexCR);\n ivec2 sourceCeilCR = ivec2(ceil(sourceFracIndexCR));\n\n float topLeft = getImage(b, sourceFloorCR.y, sourceFloorCR.x, d);\n float bottomLeft = getImage(b, sourceCeilCR.y, sourceFloorCR.x, d);\n float topRight = getImage(b, sourceFloorCR.y, sourceCeilCR.x, d);\n float bottomRight = getImage(b, sourceCeilCR.y, sourceCeilCR.x, d);\n\n vec2 fracCR = sourceFracIndexCR - vec2(sourceFloorCR);\n\n float top = topLeft + (topRight - topLeft) * fracCR.x;\n float bottom = bottomLeft + (bottomRight - bottomLeft) * fracCR.x;\n float newValue = top + (bottom - top) * fracCR.y;\n setOutput(newValue);\n } else {\n // Compute the coordinators of nearest neighbor point.\n ivec2 sourceNearestCR = ivec2(floor(\n sourceFracIndexCR + vec2(0.5,0.5)));\n float newValue = getImage(b, sourceNearestCR.y, sourceNearestCR.x, d);\n setOutput(newValue);\n }\n }\n "},Wn=function(t,e,n){this.variableNames=["x"],this.outputShape=t;var r=t.length,i=t[t.length-1],a=n?"<":">";this.userCode="\n int getIndex(int i) {\n "+(n?"return "+i+" -i - 1;":"return i;")+"\n }\n\n void main() {\n "+mn(r)+" coords = getOutputCoords();\n int end = "+Un(r,"coords")+";\n float val = 0.0;\n for (int i = "+i+" - 1; i >= 0; i -= 1) {\n int idx = getIndex(i);\n if (idx "+a+" end) {\n continue;\n }\n if (idx == end && "+e+") {\n continue;\n }\n "+Un(r,"coords")+" = idx;\n val += getX("+function(t,e){if(1===t)return""+e;if(2===t)return e+".x, "+e+".y";if(3===t)return e+".x, "+e+".y, "+e+".z";if(4===t)return e+".x, "+e+".y, "+e+".z, "+e+".w";throw Error("Cumulative sum for rank "+t+" is not yet supported")}(r,"coords")+");\n }\n setOutput(val);\n }\n "};function Un(t,e){if(1===t)return""+e;if(2===t)return e+".y";if(3===t)return e+".z";if(4===t)return e+".w";throw Error("Cumulative sum for rank "+t+" is not yet supported")}var Gn=function(){function t(t,e,n){this.variableNames=["x"],this.outputShape=[],this.outputShape=t,this.blockSize=e,this.dataFormat=n,this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int h = "+this.getHeightCoordString()+";\n int w = "+this.getWidthCoordString()+";\n int d = "+this.getDepthCoordString()+";\n\n int in_h = h / "+e+";\n int offset_h = imod(h, "+e+");\n int in_w = w / "+e+";\n int offset_w = imod(w, "+e+");\n int offset_d = (offset_h * "+e+" + offset_w) *\n "+this.getOutputDepthSize()+";\n int in_d = d + offset_d;\n\n float result = "+this.getInputSamplingString()+";\n setOutput(result);\n }\n "}return t.prototype.getHeightCoordString=function(){return"NHWC"===this.dataFormat?"coords[1]":"coords[2]"},t.prototype.getWidthCoordString=function(){return"NHWC"===this.dataFormat?"coords[2]":"coords[3]"},t.prototype.getDepthCoordString=function(){return"NHWC"===this.dataFormat?"coords[3]":"coords[1]"},t.prototype.getOutputDepthSize=function(){return"NHWC"===this.dataFormat?this.outputShape[3]:this.outputShape[1]},t.prototype.getInputSamplingString=function(){return"NHWC"===this.dataFormat?"getX(b, in_h, in_w, in_d)":"getX(b, in_d, in_h, in_w)"},t}(),Kn=function(t){this.variableNames=["A"];var e=nn();this.outputShape=t,this.userCode="\n const float FLOAT_MAX = 1.70141184e38;\n const float FLOAT_MIN = 1.17549435e-38;\n\n lowp vec4 encode_float(highp float v) {\n if (isnan(v)) {\n return vec4(255, 255, 255, 255);\n }\n\n highp float av = abs(v);\n\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(0.0, 0.0, 128.0, 127.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(0.0, 0.0, 128.0, 255.0) / 255.0;\n }\n\n highp vec4 c = vec4(0,0,0,0);\n\n highp float e = floor(log2(av));\n highp float m = exp2(fract(log2(av))) - 1.0;\n\n c[2] = floor(128.0 * m);\n m -= c[2] / 128.0;\n c[1] = floor(32768.0 * m);\n m -= c[1] / 32768.0;\n c[0] = floor(8388608.0 * m);\n\n highp float ebias = e + 127.0;\n c[3] = floor(ebias / 2.0);\n ebias -= c[3] * 2.0;\n c[2] += floor(ebias) * 128.0;\n\n c[3] += 128.0 * step(0.0, -v);\n\n return c / 255.0;\n }\n\n void main() {\n float x = getAAtOutCoords();\n "+e.output+" = encode_float(x);\n }\n "},Xn="return real * expR - imag * expI;",Jn="return real * expI + imag * expR;",Zn=function(t,e,n){this.variableNames=["real","imag"];var r=e[1];this.outputShape=e;var i=n?"2.0 * "+Math.PI:"-2.0 * "+Math.PI,a=n?r+".0":"1.0";this.userCode="\n const float exponentMultiplier = "+i+";\n\n float unaryOpComplex(float real, float expR, float imag, float expI) {\n "+t+"\n }\n\n float mulMatDFT(int batch, int index) {\n float indexRatio = float(index) / float("+r+");\n float exponentMultiplierTimesIndexRatio =\n exponentMultiplier * indexRatio;\n\n float result = 0.0;\n\n for (int i = 0; i < "+r+"; i++) {\n // x = (-2|2 * PI / N) * index * i;\n float x = exponentMultiplierTimesIndexRatio * float(i);\n float expR = cos(x);\n float expI = sin(x);\n float real = getReal(batch, i);\n float imag = getImag(batch, i);\n\n result +=\n unaryOpComplex(real, expR, imag, expI) / "+a+";\n }\n\n return result;\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n setOutput(mulMatDFT(coords[0], coords[1]));\n }\n "},Qn=function(){function t(t,e){this.outputShape=[],this.variableNames=["x"],this.outputShape=t,this.userCode="\n uniform float value;\n void main() {\n // Input can be obtained from uniform value.\n setOutput(value);\n }\n "}return t.prototype.getCustomSetupFunc=function(t){var e=this;return function(n,r){null==e.valueLoc&&(e.valueLoc=n.getUniformLocationNoThrow(r,"value")),n.gl.uniform1f(e.valueLoc,t)}},t}(),tr=function(t){this.variableNames=["A"];var e=nn(),n=t[0],r=t[1];this.outputShape=t,this.userCode="\n void main() {\n ivec3 coords = getOutputCoords();\n int texR = coords[0];\n int texC = coords[1];\n int depth = coords[2];\n vec2 uv = (vec2(texC, texR) + halfCR) / vec2("+r+".0, "+n+".0);\n\n vec4 values = "+e.texture2D+"(A, uv);\n float value;\n if (depth == 0) {\n value = values.r;\n } else if (depth == 1) {\n value = values.g;\n } else if (depth == 2) {\n value = values.b;\n } else if (depth == 3) {\n value = values.a;\n }\n\n setOutput(floor(value * 255.0 + 0.5));\n }\n "},er=function(t,e,n){this.variableNames=["A","indices"];var r=t.slice();r[n]=e,this.outputShape=r,this.rank=r.length;var i=mn(this.rank),a=function(t,e){var n=t.length;if(n>4)throw Error("Gather for rank "+n+" is not yet supported");if(1===n)return"int(getIndices(resRC))";for(var r=["resRC.x","resRC.y","resRC.z","resRC.w"],i=[],a=0;a<t.length;a++)a===e?i.push("int(getIndices("+r[a]+"))"):i.push(""+r[a]);return i.join()}(t,n);this.userCode="\n void main() {\n "+i+" resRC = getOutputCoords();\n setOutput(getA("+a+"));\n }\n "};var nr,rr,ir=function(t,e,n){this.sliceDim=t,this.strides=e,this.variableNames=["x","indices"],this.outputShape=n;var r=mn(e.length),i=mn(n.length),a=this.sliceDim>1?"strides[j]":"strides";this.userCode="\n "+r+" strides = "+r+"("+this.strides+");\n void main() {\n "+i+" coords = getOutputCoords();\n int flattenIndex = 0;\n for (int j = 0; j < "+this.sliceDim+"; j++) {\n int index = round(getIndices(coords[0], j));\n flattenIndex += index * "+a+";\n }\n setOutput(getX(flattenIndex, coords[1]));\n }\n "};function ar(t,e){return[e,t]}function or(t,e){return t*e}function sr(t,e,n){var r=function(t,e){if(t%e!=0)throw new Error("unpackedSize ("+t+") must be a multiple of "+e);return t/e}(t.length,n);if(e.length<r)throw new Error("matrix length ("+e.length+") must be >= "+r);for(var i=0,a=0;a<t.length;a+=n)e[i++]=t[a]}function cr(t,e){return[Math.max(1,Math.ceil(e/2)),Math.max(1,Math.ceil(t/2))]}function ur(t,e){var n=cr(t,e);return n[0]*n[1]*4}function lr(t,e,n,r,i){var a=n*r;if(i.length<a)throw new Error("matrix length ("+i.length+") must be >= "+a);for(var o=r%2==1,s=n%2==1,c=Math.floor(r/2),u=Math.floor(n/2),l=Math.ceil(r/2),d=l*Math.ceil(n/2),f=v(n)*v(r),h=0;h<e;h++){for(var p=h*n*r,m=h*f,_=o?4:0,g=r+(o?1:0),b=m,y=p,x=p+r,w=0;w<u;++w){for(var k=0;k<c;++k)i[y++]=t[b++],i[y++]=t[b++],i[x++]=t[b++],i[x++]=t[b++];b+=_,y+=g,x+=g}if(o){b=m+4*(l-1);var C=p+r-1;for(_=4*l,g=2*r,w=0;w<u;++w)i[C]=t[b],i[C+r]=t[b+2],b+=_,C+=g}if(s){for(b=m+4*(d-l),C=p+(n-1)*r,k=0;k<c;++k)i[C++]=t[b++],i[C++]=t[b++],b+=2;o&&(i[p+n*r-1]=t[b])}}return i}function dr(t,e,n){var r=n();return e&&function(t){var e=t.getError();if(e!==t.NO_ERROR)throw new Error("WebGL Error: "+mr(t,e))}(t),r}!function(t){t[t.RENDER=0]="RENDER",t[t.UPLOAD=1]="UPLOAD",t[t.PIXELS=2]="PIXELS",t[t.DOWNLOAD=3]="DOWNLOAD"}(nr||(nr={})),function(t){t[t.UNPACKED_FLOAT16=0]="UNPACKED_FLOAT16",t[t.UNPACKED_FLOAT32=1]="UNPACKED_FLOAT32",t[t.PACKED_4X1_UNSIGNED_BYTE=2]="PACKED_4X1_UNSIGNED_BYTE",t[t.PACKED_2X2_FLOAT32=3]="PACKED_2X2_FLOAT32",t[t.PACKED_2X2_FLOAT16=4]="PACKED_2X2_FLOAT16"}(rr||(rr={}));var fr=5.96e-8,hr=65504;function pr(t){return!!(zt.get("WEBGL_RENDER_FLOAT32_ENABLED")||0===t||fr<Math.abs(t)&&Math.abs(t)<hr)}function mr(t,e){switch(e){case t.NO_ERROR:return"NO_ERROR";case t.INVALID_ENUM:return"INVALID_ENUM";case t.INVALID_VALUE:return"INVALID_VALUE";case t.INVALID_OPERATION:return"INVALID_OPERATION";case t.INVALID_FRAMEBUFFER_OPERATION:return"INVALID_FRAMEBUFFER_OPERATION";case t.OUT_OF_MEMORY:return"OUT_OF_MEMORY";case t.CONTEXT_LOST_WEBGL:return"CONTEXT_LOST_WEBGL";default:return"Unknown error code "+e}}function vr(t,e,n){return jr(t,e,function(){return t.getExtension(n)},'Extension "'+n+'" not supported on this browser.')}function _r(t,e,n){var r=jr(t,e,function(){return t.createShader(t.VERTEX_SHADER)},"Unable to create vertex WebGLShader.");if(dr(t,e,function(){return t.shaderSource(r,n)}),dr(t,e,function(){return t.compileShader(r)}),!1===t.getShaderParameter(r,t.COMPILE_STATUS))throw console.log(t.getShaderInfoLog(r)),new Error("Failed to compile vertex shader.");return r}function gr(t,e,n){var r=jr(t,e,function(){return t.createShader(t.FRAGMENT_SHADER)},"Unable to create fragment WebGLShader.");if(dr(t,e,function(){return t.shaderSource(r,n)}),dr(t,e,function(){return t.compileShader(r)}),!1===t.getShaderParameter(r,t.COMPILE_STATUS))throw function(t,e){var n=br.exec(e);if(null==n)return console.log("Couldn't parse line number in error: "+e),void console.log(t);for(var r=+n[1],i=t.split("\n"),a=i.length.toString().length+2,o=i.map(function(t,e){return M((e+1).toString(),a)+t}),s=0,c=0;c<o.length;c++)s=Math.max(o[c].length,s);var u=o.slice(0,r-1),l=o.slice(r-1,r),d=o.slice(r);console.log(u.join("\n")),console.log(e.split("\n")[0]),console.log("%c "+M(l[0],s),"border:1px solid red; background-color:#e3d2d2; color:#a61717"),console.log(d.join("\n"))}(n,t.getShaderInfoLog(r)),new Error("Failed to compile fragment shader.");return r}var br=/ERROR: [0-9]+:([0-9]+):/g;function yr(t,e){return jr(t,e,function(){return t.createProgram()},"Unable to create WebGLProgram.")}function xr(t,e,n){if(dr(t,e,function(){return t.linkProgram(n)}),!1===t.getProgramParameter(n,t.LINK_STATUS))throw console.log(t.getProgramInfoLog(n)),new Error("Failed to link vertex and fragment shaders.")}function wr(t,e,n){if(dr(t,e,function(){return t.validateProgram(n)}),!1===t.getProgramParameter(n,t.VALIDATE_STATUS))throw console.log(t.getProgramInfoLog(n)),new Error("Shader program validation failed.")}function kr(t,e,n){var r=jr(t,e,function(){return t.createBuffer()},"Unable to create WebGLBuffer");return dr(t,e,function(){return t.bindBuffer(t.ARRAY_BUFFER,r)}),dr(t,e,function(){return t.bufferData(t.ARRAY_BUFFER,n,t.STATIC_DRAW)}),r}function Cr(t,e,n){var r=jr(t,e,function(){return t.createBuffer()},"Unable to create WebGLBuffer");return dr(t,e,function(){return t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,r)}),dr(t,e,function(){return t.bufferData(t.ELEMENT_ARRAY_BUFFER,n,t.STATIC_DRAW)}),r}function Er(){return 2===zt.get("WEBGL_VERSION")?1:4}function Sr(t,e){return jr(t,e,function(){return t.createTexture()},"Unable to create WebGLTexture.")}function Ir(t,e){var n=zt.get("WEBGL_MAX_TEXTURE_SIZE");if(t<=0||e<=0){var r="["+t+"x"+e+"]";throw new Error("Requested texture size "+r+" is invalid.")}if(t>n||e>n)throw r="["+t+"x"+e+"]",new Error("Requested texture size "+r+" greater than WebGL maximum on this browser / GPU ["+n+"x"+n+"].")}function Mr(t,e){return jr(t,e,function(){return t.createFramebuffer()},"Unable to create WebGLFramebuffer.")}function Tr(t,e,n,r,i,a,o,s){var c=t.getAttribLocation(n,r);return-1!==c&&(dr(t,e,function(){return t.bindBuffer(t.ARRAY_BUFFER,i)}),dr(t,e,function(){return t.vertexAttribPointer(c,a,t.FLOAT,!1,o,s)}),dr(t,e,function(){return t.enableVertexAttribArray(c)}),!0)}function Dr(t,e,n,r){Fr(t,r),dr(t,e,function(){return t.activeTexture(t.TEXTURE0+r)}),dr(t,e,function(){return t.bindTexture(t.TEXTURE_2D,n)})}function Rr(t,e,n,r){return jr(t,e,function(){return t.getUniformLocation(n,r)},'uniform "'+r+'" not present in program.')}function Pr(t,e,n){return t.getUniformLocation(e,n)}function Or(t,e,n,r,i,a){dr(t,e,function(){return Dr(t,e,r,a)}),dr(t,e,function(){return t.uniform1i(i,a)})}function Lr(t,e,n,r){dr(t,e,function(){return t.bindFramebuffer(t.FRAMEBUFFER,r)}),dr(t,e,function(){return t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,n,0)})}function Ar(t,e,n){dr(t,e,function(){return t.bindFramebuffer(t.FRAMEBUFFER,n)}),dr(t,e,function(){return t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,null,0)})}function Nr(t){var e=t.checkFramebufferStatus(t.FRAMEBUFFER);if(e!==t.FRAMEBUFFER_COMPLETE)throw new Error("Error binding framebuffer: "+Br(t,e))}function Br(t,e){switch(e){case t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_ATTACHMENT";case t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";case t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:return"FRAMEBUFFER_INCOMPLETE_DIMENSIONS";case t.FRAMEBUFFER_UNSUPPORTED:return"FRAMEBUFFER_UNSUPPORTED";default:return"unknown error "+e}}function jr(t,e,n,r){var i=dr(t,e,function(){return n()});if(null==i)throw new Error(r);return i}function Fr(t,e){var n=t.MAX_COMBINED_TEXTURE_IMAGE_UNITS-1,r=e+t.TEXTURE0;if(r<t.TEXTURE0||r>n)throw new Error("textureUnit must be in [gl.TEXTURE0, gl.TEXTURE"+n+"].")}function Yr(t,e){return void 0===e&&(e=2),k(t.slice(0,t.length-e))}function $r(t){if(0===t.length)throw Error("Cannot get rows and columns of an empty shape array.");return[t.length>1?t[t.length-2]:1,t[t.length-1]]}function zr(t,e){var n;void 0===e&&(e=!1);var r=zt.get("WEBGL_MAX_TEXTURE_SIZE");if(e&&(r*=2,1===(t=t.map(function(e,n){return n>=t.length-2?v(t[n]):t[n]})).length&&(t=[2,t[0]])),2!==t.length){var i=P(t);t=i.newShape}var a=k(t);if(t.length<=1&&a<=r)return[1,a];if(2===t.length&&t[0]<=r&&t[1]<=r)return t;if(3===t.length&&t[0]*t[1]<=r&&t[2]<=r)return[t[0]*t[1],t[2]];if(3===t.length&&t[0]<=r&&t[1]*t[2]<=r)return[t[0],t[1]*t[2]];if(4===t.length&&t[0]*t[1]*t[2]<=r&&t[3]<=r)return[t[0]*t[1]*t[2],t[3]];if(4===t.length&&t[0]<=r&&t[1]*t[2]*t[3]<=r)return[t[0],t[1]*t[2]*t[3]];if(e){var o=Yr(t),s=2,c=2;return t.length&&(s=(n=$r(t))[0],c=n[1]),I(a=o*(s/2)*(c/2)).map(function(t){return 2*t})}return I(a)}function Vr(t){return t%2==0}function Hr(t,e){if(C(t=t.slice(-2),e=e.slice(-2)))return!0;if(!t.length||!e.length)return!0;if(0===t[0]||0===t[1]||0===e[0]||0===e[1])return!0;if(t.length!==e.length){var n=t.slice(-1)[0],r=e.slice(-1)[0];if(n===r)return!0;if(Vr(n)&&Vr(r)&&(1===t[0]||1===e[0]))return!0}return t[1]===e[1]&&Vr(t[0])&&Vr(e[0])}var qr=Object.freeze({callAndCheck:dr,canBeRepresented:pr,getWebGLErrorMessage:mr,getExtensionOrThrow:vr,createVertexShader:_r,createFragmentShader:gr,createProgram:yr,linkProgram:xr,validateProgram:wr,createStaticVertexBuffer:kr,createStaticIndexBuffer:Cr,getNumChannels:Er,createTexture:Sr,validateTextureSize:Ir,createFramebuffer:Mr,bindVertexBufferToProgramAttribute:Tr,bindTextureUnit:Dr,unbindTextureUnit:function(t,e,n){Fr(t,n),dr(t,e,function(){return t.activeTexture(t.TEXTURE0+n)}),dr(t,e,function(){return t.bindTexture(t.TEXTURE_2D,null)})},getProgramUniformLocationOrThrow:Rr,getProgramUniformLocation:Pr,bindTextureToProgramUniformSampler:Or,bindCanvasToFramebuffer:function(t,e){dr(t,e,function(){return t.bindFramebuffer(t.FRAMEBUFFER,null)}),dr(t,e,function(){return t.viewport(0,0,t.canvas.width,t.canvas.height)}),dr(t,e,function(){return t.scissor(0,0,t.canvas.width,t.canvas.height)})},bindColorTextureToFramebuffer:Lr,unbindColorTextureFromFramebuffer:Ar,validateFramebuffer:Nr,getFramebufferErrorMessage:Br,getBatchDim:Yr,getRowsCols:$r,getTextureShapeFromLogicalShape:zr,isReshapeFree:Hr});function Wr(t,e){var n=nn();return _r(t,e,n.version+"\n precision highp float;\n "+n.attribute+" vec3 clipSpacePos;\n "+n.attribute+" vec2 uv;\n "+n.varyingVs+" vec2 resultUV;\n\n void main() {\n gl_Position = vec4(clipSpacePos, 1);\n resultUV = uv;\n }")}function Ur(t,e){return kr(t,e,new Float32Array([-1,1,0,0,1,-1,-1,0,0,0,1,1,0,1,1,1,-1,0,1,0]))}function Gr(t,e){return Cr(t,e,new Uint16Array([0,1,2,2,1,3]))}function Kr(t,e){var n,r,i,a,o,s,c,u,l=t;return 2===zt.get("WEBGL_VERSION")?(n=l.R32F,r=l.R16F,i=l.RGBA16F,a=l.RGBA32F,o=l.RED,s=4,c=1,u=l.HALF_FLOAT):(n=t.RGBA,r=t.RGBA,i=t.RGBA,a=l.RGBA,o=t.RGBA,s=4,c=4,u=null!=e?e.HALF_FLOAT_OES:null),{internalFormatFloat:n,internalFormatHalfFloat:r,internalFormatPackedHalfFloat:i,internalFormatPackedFloat:a,textureFormatFloat:o,downloadTextureFormat:t.RGBA,downloadUnpackNumChannels:s,defaultNumChannels:c,textureTypeHalfFloat:u}}function Xr(t,e,n,r,i,a,o){Ir(n,r);var s=Sr(t,e),c=t.TEXTURE_2D;return dr(t,e,function(){return t.bindTexture(c,s)}),dr(t,e,function(){return t.texParameteri(c,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE)}),dr(t,e,function(){return t.texParameteri(c,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE)}),dr(t,e,function(){return t.texParameteri(c,t.TEXTURE_MIN_FILTER,t.NEAREST)}),dr(t,e,function(){return t.texParameteri(c,t.TEXTURE_MAG_FILTER,t.NEAREST)}),dr(t,e,function(){return t.texImage2D(c,0,i,n,r,0,a,o,null)}),dr(t,e,function(){return t.bindTexture(t.TEXTURE_2D,null)}),s}function Jr(t,e,n,r,i){var a=ar(n,r);return Xr(t,e,a[0],a[1],i.internalFormatFloat,i.textureFormatFloat,t.FLOAT)}function Zr(t,e,n,r,i){var a=ar(n,r);return Xr(t,e,a[0],a[1],i.internalFormatHalfFloat,i.textureFormatFloat,i.textureTypeHalfFloat)}function Qr(t,e,n,r,i){var a=ar(n,r);return Xr(t,e,a[0],a[1],t.RGBA,t.RGBA,t.UNSIGNED_BYTE)}function ti(t,e,n,r,i){var a=cr(n,r);return Xr(t,e,a[0],a[1],i.internalFormatPackedFloat,t.RGBA,t.FLOAT)}function ei(t,e,n,r,i){var a=cr(n,r);return Xr(t,e,a[0],a[1],i.internalFormatPackedHalfFloat,t.RGBA,i.textureTypeHalfFloat)}function ni(t,e,n,r){return dr(t,e,function(){return t.bindBuffer(t.ARRAY_BUFFER,r)}),Tr(t,e,n,"clipSpacePos",r,3,20,0)&&Tr(t,e,n,"uv",r,2,20,12)}function ri(t,e,n,r){dr(t,e,function(){return t.bindTexture(t.TEXTURE_2D,n)}),dr(t,e,function(){return t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,r)}),dr(t,e,function(){return t.bindTexture(t.TEXTURE_2D,null)})}function ii(t,e,n,r,i,a,o){Ir(r,i),dr(t,e,function(){return t.bindTexture(t.TEXTURE_2D,n)}),dr(t,e,function(){return t.texSubImage2D(t.TEXTURE_2D,0,0,0,r,i,o,t.FLOAT,a)}),dr(t,e,function(){return t.bindTexture(t.TEXTURE_2D,null)})}function ai(t,e,n,r,i,a,o,s){var c,u=ar(r,i),l=u[0],d=u[1],f=r*i;1===s.defaultNumChannels&&f===a.length?c=a:function(t,e,n){var r=or(t.length,n);if(e.length<r)throw new Error("unpackedArray length ("+e.length+") must be >= "+r);for(var i=0,a=0;a<t.length;++a)e[i]=t[a],i+=n}(a,c=new Float32Array(f*o),o),ii(t,e,n,l,d,c,s.textureFormatFloat)}function oi(t,e,n,r,i,a,o,s,c,u){var l=cr(o,s),d=l[0],f=l[1],h=new Float32Array(ur(o,s));(function(t,e,n,r,i){for(var a=r%2==1,o=n%2==1,s=Math.floor(r/2),c=Math.floor(n/2),u=Math.ceil(r/2),l=u*Math.ceil(n/2),d=v(n)*v(r),f=0;f<e;f++){for(var h=f*n*r,p=f*d,m=a?4:0,_=r,g=p,b=0;b<c;++b){for(var y=2*b*r,x=0;x<s;++x){var w=h+y+2*x;i[g]=t[w],i[g+1]=t[w+1],i[g+2]=t[w+_],i[g+3]=t[w+_+1],g+=4}g+=m}if(a){w=h+r-1,g=p+4*(u-1);var k=2*r;for(m=4*u,b=0;b<c;++b)i[g]=t[w],i[g+2]=t[w+r],w+=k,g+=m}if(o){for(w=h+(n-1)*r,g=p+4*(l-u),x=0;x<s;++x)i[g++]=t[w++],i[g++]=t[w++],g+=2;a&&o&&(i[p+d-4]=t[w])}}})(c,r,i,a,h),ii(t,e,n,d,f,h,t.RGBA)}function si(t,e,n,r,i,a){var o=n;if(2===zt.get("WEBGL_VERSION")){var s=t,c=s.createBuffer();dr(t,e,function(){return t.bindBuffer(s.PIXEL_PACK_BUFFER,c)});var u=4*or(r*i,a.downloadUnpackNumChannels);dr(t,e,function(){return t.bufferData(s.PIXEL_PACK_BUFFER,u,s.STREAM_READ)}),dr(t,e,function(){return s.readPixels(0,0,i,r,t.RGBA,t.FLOAT,0)}),dr(t,e,function(){return t.bindBuffer(s.PIXEL_PACK_BUFFER,null)}),o=c}return o}function ci(t,e,n,r,i){var a=t,o=new Float32Array(or(n*r,i.downloadUnpackNumChannels));a.bindBuffer(a.PIXEL_PACK_BUFFER,e),a.getBufferSubData(a.PIXEL_PACK_BUFFER,0,o),a.bindBuffer(a.PIXEL_PACK_BUFFER,null);var s=new Float32Array(n*r);return sr(o,s,i.downloadUnpackNumChannels),s}function ui(t,e,n,r,i){var a=ar(n,r),o=a[0],s=a[1],c=new Float32Array(or(n*r,i.downloadUnpackNumChannels));dr(t,e,function(){return t.readPixels(0,0,o,s,i.downloadTextureFormat,t.FLOAT,c)});var u=new Float32Array(n*r);return sr(c,u,i.downloadUnpackNumChannels),u}function li(t,e,n,r,i){var a=ar(n,r),o=a[0],s=a[1],c=new Uint8Array(or(n*r,4));return dr(t,e,function(){return t.readPixels(0,0,o,s,i.downloadTextureFormat,t.UNSIGNED_BYTE,c)}),new Float32Array(c.buffer)}function di(t,e,n,r,i,a,o,s){var c=t,u=new Float32Array(ur(a,o));c.bindBuffer(c.PIXEL_PACK_BUFFER,e),c.getBufferSubData(c.PIXEL_PACK_BUFFER,0,u),c.bindBuffer(c.PIXEL_PACK_BUFFER,null);var l=new Float32Array(k([n,r,i]));return lr(u,n,r,i,l),l}function fi(t,e,n,r,i,a,o,s){var c=cr(a,o),u=c[0],l=c[1],d=new Float32Array(ur(a,o));dr(t,e,function(){return t.readPixels(0,0,u,l,t.RGBA,t.FLOAT,d)});var f=new Float32Array(k([n,r,i]));return lr(d,n,r,i,f)}var hi=Object.freeze({createVertexShader:Wr,createVertexBuffer:Ur,createIndexBuffer:Gr,getTextureConfig:Kr,createFloat32MatrixTexture:Jr,createFloat16MatrixTexture:Zr,createUnsignedBytesMatrixTexture:Qr,createPackedMatrixTexture:ti,createFloat16PackedMatrixTexture:ei,bindVertexProgramAttributeStreams:ni,uploadPixelDataToTexture:ri,uploadMatrixToTexture:ai,uploadMatrixToPackedTexture:oi,maybeCreateBufferFromOutputTexture:si,downloadFloat32MatrixFromBuffer:ci,downloadFloat32MatrixFromOutputTexture:ui,downloadByteEncodedFloatMatrixFromOutputTexture:li,downloadPackedMatrixFromBuffer:di,downloadMatrixFromPackedOutputTexture:fi}),pi=function(){function t(t){this.outputTexture=null,this.program=null,this.disposed=!1,this.vertexAttrsAreBound=!1,this.itemsToPoll=[];var e=zt.get("WEBGL_VERSION");null!=t?(this.gl=t,function(t,e){d[t]=e}(e,t)):this.gl=h(e),1===zt.get("WEBGL_VERSION")?(this.textureFloatExtension=vr(this.gl,this.debug,"OES_texture_float"),this.colorBufferFloatExtension=this.gl.getExtension("WEBGL_color_buffer_float"),zt.get("WEBGL_RENDER_FLOAT32_ENABLED")||(this.textureHalfFloatExtension=vr(this.gl,this.debug,"OES_texture_half_float"),this.colorBufferHalfFloatExtension=this.gl.getExtension("EXT_color_buffer_half_float"))):this.colorBufferFloatExtension=vr(this.gl,this.debug,"EXT_color_buffer_float"),this.vertexBuffer=Ur(this.gl,this.debug),this.indexBuffer=Gr(this.gl,this.debug),this.framebuffer=Mr(this.gl,this.debug),this.textureConfig=Kr(this.gl,this.textureHalfFloatExtension)}return Object.defineProperty(t.prototype,"debug",{get:function(){return zt.get("DEBUG")},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){var t=this;if(!this.disposed){null!=this.program&&console.warn("Disposing a GPGPUContext that still has a bound WebGLProgram. This is probably a resource leak, delete the program with GPGPUContext.deleteProgram before disposing."),null!=this.outputTexture&&console.warn("Disposing a GPGPUContext that still has a bound output matrix texture. This is probably a resource leak, delete the output matrix texture with GPGPUContext.deleteMatrixTexture before disposing.");var e=this.gl;dr(e,this.debug,function(){return e.finish()}),dr(e,this.debug,function(){return e.bindFramebuffer(e.FRAMEBUFFER,null)}),dr(e,this.debug,function(){return e.deleteFramebuffer(t.framebuffer)}),dr(e,this.debug,function(){return e.bindBuffer(e.ARRAY_BUFFER,null)}),dr(e,this.debug,function(){return e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null)}),dr(e,this.debug,function(){return e.deleteBuffer(t.indexBuffer)}),this.disposed=!0}},t.prototype.createFloat32MatrixTexture=function(t,e){return this.throwIfDisposed(),Jr(this.gl,this.debug,t,e,this.textureConfig)},t.prototype.createFloat16MatrixTexture=function(t,e){return this.throwIfDisposed(),Zr(this.gl,this.debug,t,e,this.textureConfig)},t.prototype.createUnsignedBytesMatrixTexture=function(t,e){return this.throwIfDisposed(),Qr(this.gl,this.debug,t,e,this.textureConfig)},t.prototype.uploadPixelDataToTexture=function(t,e){this.throwIfDisposed(),ri(this.gl,this.debug,t,e)},t.prototype.createFloat16PackedMatrixTexture=function(t,e){return this.throwIfDisposed(),ei(this.gl,this.debug,t,e,this.textureConfig)},t.prototype.createPackedMatrixTexture=function(t,e){return this.throwIfDisposed(),ti(this.gl,this.debug,t,e,this.textureConfig)},t.prototype.deleteMatrixTexture=function(t){var e=this;this.throwIfDisposed(),this.outputTexture===t&&(Ar(this.gl,this.debug,this.framebuffer),this.outputTexture=null),dr(this.gl,this.debug,function(){return e.gl.deleteTexture(t)})},t.prototype.uploadMatrixToTexture=function(t,e,n,r){this.throwIfDisposed();var i=Er();return ai(this.gl,this.debug,t,e,n,r,i,this.textureConfig)},t.prototype.uploadMatrixToPackedTexture=function(t,e,n,r,i,a,o){return this.throwIfDisposed(),oi(this.gl,this.debug,t,e,n,r,i,a,o,this.textureConfig)},t.prototype.downloadFloat32MatrixFromOutputTexture=function(t,e,n){var r=this;return this.downloadMatrixDriver(t,function(){return ui(r.gl,r.debug,e,n,r.textureConfig)})},t.prototype.downloadByteEncodedFloatMatrixFromOutputTexture=function(t,e,n){var r=this;return this.downloadMatrixDriver(t,function(){return li(r.gl,r.debug,e,n,r.textureConfig)})},t.prototype.downloadPackedMatrixFromBuffer=function(t,e,n,r,i,a){return di(this.gl,t,e,n,r,i,a,this.textureConfig)},t.prototype.downloadFloat32MatrixFromBuffer=function(t,e,n){return ci(this.gl,t,e,n,this.textureConfig)},t.prototype.maybeCreateBufferFromTexture=function(t,e,n){this.bindTextureToFrameBuffer(t);var r=si(this.gl,this.debug,t,e,n,this.textureConfig);return this.unbindTextureToFrameBuffer(),r},t.prototype.createAndWaitForFence=function(){var t=this.createFence(this.gl);return this.pollFence(t)},t.prototype.createFence=function(t){var e,n,r=this;if(zt.get("WEBGL_FENCE_API_ENABLED")){var i=t,a=i.fenceSync(i.SYNC_GPU_COMMANDS_COMPLETE,0);t.flush(),n=function(){var t=i.clientWaitSync(a,0,0);return t===i.ALREADY_SIGNALED||t===i.CONDITION_SATISFIED},e=a}else zt.get("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0?(e=this.beginQuery(),this.endQuery(),n=function(){return r.isQueryAvailable(e,zt.get("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))}):n=function(){return!0};return{query:e,isFencePassed:n}},t.prototype.downloadMatrixFromPackedTexture=function(t,e,n,r,i,a){var o=this;return this.downloadMatrixDriver(t,function(){return fi(o.gl,o.debug,e,n,r,i,a,o.textureConfig)})},t.prototype.createProgram=function(t){this.throwIfDisposed();var e=this.gl,n=gr(e,this.debug,t),r=Wr(e,this.debug),i=yr(e,this.debug);return dr(e,this.debug,function(){return e.attachShader(i,r)}),dr(e,this.debug,function(){return e.attachShader(i,n)}),xr(e,this.debug,i),this.debug&&wr(e,this.debug,i),this.vertexAttrsAreBound||(this.setProgram(i),this.vertexAttrsAreBound=ni(e,this.debug,this.program,this.vertexBuffer)),i},t.prototype.deleteProgram=function(t){var e=this;this.throwIfDisposed(),t===this.program&&(this.program=null),null!=t&&dr(this.gl,this.debug,function(){return e.gl.deleteProgram(t)})},t.prototype.setProgram=function(t){var e=this;this.throwIfDisposed(),this.program=t,null!=this.program&&this.debug&&wr(this.gl,this.debug,this.program),dr(this.gl,this.debug,function(){return e.gl.useProgram(t)})},t.prototype.getUniformLocation=function(t,e,n){return void 0===n&&(n=!0),this.throwIfDisposed(),n?Rr(this.gl,this.debug,t,e):Pr(this.gl,t,e)},t.prototype.getAttributeLocation=function(t,e){var n=this;return this.throwIfDisposed(),dr(this.gl,this.debug,function(){return n.gl.getAttribLocation(t,e)})},t.prototype.getUniformLocationNoThrow=function(t,e){return this.throwIfDisposed(),this.gl.getUniformLocation(t,e)},t.prototype.setInputMatrixTexture=function(t,e,n){this.throwIfDisposed(),this.throwIfNoProgram(),Or(this.gl,this.debug,this.program,t,e,n)},t.prototype.setOutputMatrixTexture=function(t,e,n){this.setOutputMatrixTextureDriver(t,n,e)},t.prototype.setOutputPackedMatrixTexture=function(t,e,n){this.throwIfDisposed();var r=cr(e,n),i=r[0],a=r[1];this.setOutputMatrixTextureDriver(t,i,a)},t.prototype.setOutputMatrixWriteRegion=function(t,e,n,r){this.setOutputMatrixWriteRegionDriver(n,t,r,e)},t.prototype.setOutputPackedMatrixWriteRegion=function(t,e,n,r){throw new Error("setOutputPackedMatrixWriteRegion not implemented.")},t.prototype.debugValidate=function(){null!=this.program&&wr(this.gl,this.debug,this.program),Nr(this.gl)},t.prototype.executeProgram=function(){this.throwIfDisposed(),this.throwIfNoProgram();var t=this.gl;this.debug&&this.debugValidate(),dr(t,this.debug,function(){return t.drawElements(t.TRIANGLES,6,t.UNSIGNED_SHORT,0)})},t.prototype.blockUntilAllProgramsCompleted=function(){var t=this;this.throwIfDisposed(),dr(this.gl,this.debug,function(){return t.gl.finish()})},t.prototype.getQueryTimerExtension=function(){return null==this.disjointQueryTimerExtension&&(this.disjointQueryTimerExtension=vr(this.gl,this.debug,2===zt.get("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")?"EXT_disjoint_timer_query_webgl2":"EXT_disjoint_timer_query")),this.disjointQueryTimerExtension},t.prototype.getQueryTimerExtensionWebGL2=function(){return this.getQueryTimerExtension()},t.prototype.getQueryTimerExtensionWebGL1=function(){return this.getQueryTimerExtension()},t.prototype.beginQuery=function(){if(2===zt.get("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")){var t=this.gl,e=this.getQueryTimerExtensionWebGL2(),n=t.createQuery();return t.beginQuery(e.TIME_ELAPSED_EXT,n),n}var r=this.getQueryTimerExtensionWebGL1(),i=r.createQueryEXT();return r.beginQueryEXT(r.TIME_ELAPSED_EXT,i),i},t.prototype.endQuery=function(){if(2!==zt.get("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")){var t=this.getQueryTimerExtensionWebGL1();t.endQueryEXT(t.TIME_ELAPSED_EXT)}else{var e=this.gl,n=this.getQueryTimerExtensionWebGL2();e.endQuery(n.TIME_ELAPSED_EXT)}},t.prototype.waitForQueryAndGetTime=function(t){return u(this,void 0,void 0,function(){var e=this;return l(this,function(n){switch(n.label){case 0:return[4,T(function(){return e.disposed||e.isQueryAvailable(t,zt.get("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))})];case 1:return n.sent(),[2,this.getQueryTime(t,zt.get("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))]}})})},t.prototype.getQueryTime=function(t,e){if(0===e)return null;if(2===e){var n=this.gl;return n.getQueryParameter(t,n.QUERY_RESULT)/1e6}var r=this.getQueryTimerExtensionWebGL1();return r.getQueryObjectEXT(t,r.QUERY_RESULT_EXT)/1e6},t.prototype.isQueryAvailable=function(t,e){if(0===e)return!0;if(2===e){var n=this.gl,r=this.getQueryTimerExtensionWebGL2(),i=n.getQueryParameter(t,n.QUERY_RESULT_AVAILABLE);return null==this.disjoint&&(this.disjoint=this.gl.getParameter(r.GPU_DISJOINT_EXT)),i&&!this.disjoint}return i=(r=this.getQueryTimerExtensionWebGL1()).getQueryObjectEXT(t,r.QUERY_RESULT_AVAILABLE_EXT),null==this.disjoint&&(this.disjoint=this.gl.getParameter(r.GPU_DISJOINT_EXT)),i&&!this.disjoint},t.prototype.pollFence=function(t){var e=this;return new Promise(function(n){e.addItemToPoll(function(){return t.isFencePassed()},function(){return n()})})},t.prototype.pollItems=function(){for(var t=function(t){for(var e=0;e<t.length&&t[e]();++e);return e-1}(this.itemsToPoll.map(function(t){return t.isDoneFn})),e=0;e<=t;++e)(0,this.itemsToPoll[e].resolveFn)();this.itemsToPoll=this.itemsToPoll.slice(t+1)},t.prototype.addItemToPoll=function(t,e){var n=this;this.itemsToPoll.push({isDoneFn:t,resolveFn:e}),this.itemsToPoll.length>1||T(function(){return n.pollItems(),0===n.itemsToPoll.length})},t.prototype.bindTextureToFrameBuffer=function(t){this.throwIfDisposed(),Lr(this.gl,this.debug,t,this.framebuffer),this.debug&&Nr(this.gl)},t.prototype.unbindTextureToFrameBuffer=function(){null!=this.outputTexture?(Lr(this.gl,this.debug,this.outputTexture,this.framebuffer),this.debug&&Nr(this.gl)):Ar(this.gl,this.debug,this.framebuffer)},t.prototype.downloadMatrixDriver=function(t,e){this.bindTextureToFrameBuffer(t);var n=e();return this.unbindTextureToFrameBuffer(),n},t.prototype.setOutputMatrixTextureDriver=function(t,e,n){this.throwIfDisposed();var r=this.gl;Lr(r,this.debug,t,this.framebuffer),this.debug&&Nr(r),this.outputTexture=t,dr(r,this.debug,function(){return r.viewport(0,0,e,n)}),dr(r,this.debug,function(){return r.scissor(0,0,e,n)})},t.prototype.setOutputMatrixWriteRegionDriver=function(t,e,n,r){var i=this;this.throwIfDisposed(),dr(this.gl,this.debug,function(){return i.gl.scissor(t,e,n,r)})},t.prototype.throwIfDisposed=function(){if(this.disposed)throw new Error("Attempted to use disposed GPGPUContext.")},t.prototype.throwIfNoProgram=function(){if(null==this.program)throw new Error("No GPU program is currently set.")},t}();function mi(t,e){if(t.length!==e.length)throw Error("Binary was compiled with "+t.length+" inputs, but was executed with "+e.length+" inputs");t.forEach(function(t,n){var r=t.logicalShape,i=e[n],a=i.shape;if(!C(r,a))throw Error("Binary was compiled with different shapes than the current args. Shapes "+r+" and "+a+" must match");if(!t.isUniform||!i.isUniform){var o=t.texShape,s=i.isUniform?null:i.texData.texShape;if(!C(o,s))throw Error("Binary was compiled with different texture shapes than the current args. Shape "+o+" and "+s+" must match")}})}var vi=function(t,e,n){this.variableNames=["A"],this.usesPackedTextures=!0,this.outputShape=t;var r=n.filterWidth,i=n.inChannels,a=n.strideWidth,o=n.strideHeight,s=n.padInfo,c=n.outWidth,u=n.dilationWidth,l=n.dilationHeight,d=s.left,f=s.top,h=i*r,p=nn();this.userCode="\n void main() {\n ivec2 rc = getOutputCoords();\n\n vec4 result = vec4(0);\n\n for(int row=0; row<=1; row++) {\n for(int col=0; col<=1; col++) {\n int blockIndex = rc.y + col;\n int pos = rc.x + row;\n\n if(blockIndex >= "+t[1]+" || pos >= "+t[0]+") continue;\n\n int offsetY = int(blockIndex / ("+c+")) * "+o+" - "+f+";\n int d0 = offsetY + "+l+" * (pos / "+h+");\n\n if(d0 >= "+e[0]+" || d0 < 0) continue;\n\n int offsetX = int(mod(float(blockIndex), "+c+".) * "+a+". - "+d+".);\n int d1 = offsetX + "+u+" * (int(mod(float(pos), "+h+".) / "+i+".));\n\n if(d1 >= "+e[1]+" || d1 < 0) continue;\n\n vec2 innerDims = vec2(d1, int(mod(float(pos), "+i+".)));\n result[row * 2 + col] = getChannel(getA(d0, int(innerDims.x),\n int(innerDims.y)), innerDims);\n }\n }\n\n "+p.output+" = result;\n }\n "},_i=function(t,e,n,r,i){this.variableNames=["x"],this.outputShape=[];var a,o=e,s=t[3]-1;this.outputShape=t;var c="float("+n+") + float("+r+") * sum";a=.5===i?"inversesqrt("+c+")":1===i?"1.0/("+c+")":"exp(log("+c+") * float(-"+i+"));",this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int r = coords[1];\n int c = coords[2];\n int d = coords[3];\n float x = getX(b, r, c, d);\n float sum = 0.0;\n for (int j = -"+o+"; j <= "+o+"; j++) {\n int idx = d + j;\n if (idx >= 0 && idx <= "+s+") {\n float z = getX(b, r, c, idx);\n sum += z * z;\n }\n }\n float val = x * "+a+";\n setOutput(val);\n }\n "},gi=function(t,e,n,r,i){this.variableNames=["inputImage","outputImage","dy"],this.outputShape=[],this.outputShape=t,this.depth=t[3],this.depthRadius=e,this.bias=n,this.alpha=r,this.beta=i,this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int r = coords[1];\n int c = coords[2];\n\n float result = 0.0;\n for (int d = 0; d < "+this.depth+"; ++d) {\n int depthBegin = int(max(0.0, float(d - "+e+")));\n int depthEnd = int(min(float("+this.depth+"),\n float(d + "+e+" + 1)));\n\n const int MIN_DEPTH_BEGIN = 0;\n const int MAX_DEPTH_END = "+this.depth+";\n\n float norm = 0.0;\n for (int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k) {\n if (k < depthBegin){\n continue;\n }\n else if (k >= depthBegin && k < depthEnd) {\n norm += getInputImage(b, r, c, k) * getInputImage(b, r, c, k);\n }\n else {\n break;\n }\n }\n\n norm = float("+r+") * norm + float("+n+");\n\n for(int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k){\n if (k < depthBegin){\n continue;\n }\n else if (k >= depthBegin && k < depthEnd){\n float dyi = -2.0 * float("+r+")\n * float("+i+")\n * getInputImage(b ,r ,c, k) * getOutputImage(b, r, c, d)\n / norm;\n if (k == d) {\n dyi += pow(norm, -1.0 * "+i+");\n }\n if (k == coords[3]) {\n dyi *= getDy(b, r, c, d);\n result += dyi;\n }\n }\n else {\n break;\n }\n }\n }\n setOutput(result);\n }\n "},bi=function(t){this.variableNames=["dy","maxPos"],this.outputShape=t.inShape;var e=t.strideHeight,n=t.strideWidth,r=t.dilationHeight,i=t.effectiveFilterHeight,a=t.effectiveFilterWidth,o=i-1-t.padInfo.top,s=a-1-t.padInfo.left,c=i*a-1;this.userCode="\n const ivec2 pads = ivec2("+o+", "+s+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n\n ivec2 dyRCCorner = coords.yz - pads;\n int dyRCorner = dyRCCorner.x;\n int dyCCorner = dyRCCorner.y;\n\n // Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < "+i+";\n wR += "+r+") {\n float dyR = float(dyRCorner + wR) / "+e+".0;\n\n if (dyR < 0.0 || dyR >= "+t.outHeight+".0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < "+a+"; wC++) {\n float dyC = float(dyCCorner + wC) / "+n+".0;\n\n if (dyC < 0.0 || dyC >= "+t.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(b, idyR, idyC, d);\n int maxPosValue = "+c+" - int(getMaxPos(b, idyR, idyC, d));\n\n // Get the current value, check it against the value from the\n // position matrix.\n int curPosValue = wR * "+a+" + wC;\n float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);\n\n dotProd += dyValue * mask;\n }\n }\n setOutput(dotProd);\n }\n "},yi=function(t,e,n,r,i,a){void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===i&&(i=!1),void 0===a&&(a=null),this.variableNames=["matrixA","matrixB"],this.usesPackedTextures=!0,this.outputShape=e;var o=n?t[1]:t[2],s=Math.ceil(o/2),c=n?"i * 2, rc.y":"rc.y, i * 2",u=r?"rc.z, i * 2":"i * 2, rc.z",l=n?["a.xxyy","a.zzww"]:["a.xxzz","a.yyww"],d=r?["b.xzxz","b.ywyw"]:["b.xyxy","b.zwzw"],f="",h="";a&&(f="vec4 activation(vec4 x) {\n "+a+"\n }",h="result = activation(result);");var p=i?"result += getBiasAtOutCoords();":"";i&&this.variableNames.push("bias"),this.userCode="\n "+f+"\n\n const float sharedDimension = "+s+".0;\n\n vec4 dot2x2ARowBCol(ivec3 rc) {\n vec4 result = vec4(0);\n for (int i = 0; i < "+s+"; i++) {\n vec4 a = getMatrixA(rc.x, "+c+");\n vec4 b = getMatrixB(rc.x, "+u+");\n\n result += ("+l[0]+" * "+d[0]+") + ("+l[1]+" * "+d[1]+");\n }\n return result;\n }\n\n void main() {\n ivec3 rc = getOutputCoords();\n vec4 result = dot2x2ARowBCol(rc);\n\n "+p+"\n\n "+h+"\n\n setOutput(result);\n }\n "},xi=function(){function t(t,e,n){this.variableNames=["probs"],this.outputShape=[t,n],this.userCode="\n uniform float seed;\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n\n float r = random(seed);\n float cdf = 0.0;\n\n for (int i = 0; i < "+(e-1)+"; i++) {\n cdf += getProbs(batch, i);\n\n if (r < cdf) {\n setOutput(float(i));\n return;\n }\n }\n\n // If no other event happened, last event happened.\n setOutput(float("+(e-1)+"));\n }\n "}return t.prototype.getCustomSetupFunc=function(t){var e=this;return function(n,r){null==e.seedLoc&&(e.seedLoc=n.getUniformLocation(r,"seed")),n.gl.uniform1f(e.seedLoc,t)}},t}(),wi=function(t,e,n,r){this.variableNames=["indices"],this.outputShape=[t,e],this.userCode="\n void main() {\n ivec2 coords = getOutputCoords();\n int index = round(getIndices(coords.x));\n setOutput(mix(float("+r+"), float("+n+"),\n float(index == coords.y)));\n }\n "},ki=function(t){this.variableNames=["A"],this.isPackShader=!0,this.outputShape=t;var e=t.length;if(0===e)this.userCode="\n void main() {\n setOutput(vec4(getA(), 0., 0., 0.));\n }\n ";else{var n=Ze("rc",e),r=mn(e),i=function(t,e,n){if(1===t)return"rc > "+e[0];for(var r="",i=t-2;i<t;i++)r+=n[i]+" >= "+e[i],i<t-1&&(r+="||");return r}(e,t,n),a=function(t,e,n,r){if(1===t)return"";var i=r.slice(-2);return"\n int r = "+i[0]+";\n int c = "+i[1]+";\n int rp1 = r + 1;\n int cp1 = c + 1;\n\n bool cEdge = cp1 >= "+e+";\n bool rEdge = rp1 >= "+n+";\n "}(e,t[t.length-1],t[t.length-2],n),o=function(t,e){var n=t.length,r=function(t,e){for(var n=[],r=0;r<=1;r++)for(var i=0;i<=1;i++){for(var a=(0===r?"r":"rp1")+", "+(0===i?"c":"cp1"),o=2;o<t;o++)a=e[e.length-1-o]+","+a;n.push(a)}return n}(n,e);return 1===n?"getA(rc),\n rc + 1 >= "+t[0]+" ? 0. : getA(rc + 1),\n 0, 0":"getA("+r[0]+"),\n cEdge ? 0. : getA("+r[1]+"),\n rEdge ? 0. : getA("+r[2]+"),\n rEdge || cEdge ? 0. : getA("+r[3]+")"}(t,n);this.userCode="\n void main() {\n "+r+" rc = getOutputCoords();\n\n if("+i+") {\n setOutput(vec4(0));\n } else {\n "+a+"\n\n setOutput(vec4("+o+"));\n }\n }\n "}};var Ci=function(t,e,n){this.variableNames=["x"],this.outputShape=e.map(function(e,n){return e[0]+t[n]+e[1]});var r=t.length,i=mn(r),a=e.map(function(t){return t[0]}).join(","),o=e.map(function(e,n){return e[0]+t[n]}).join(","),s=["coords[0]","coords[1]","coords[2]","coords[3]"].slice(0,r);this.userCode=1!==r?"\n "+i+" start = "+i+"("+a+");\n "+i+" end = "+i+"("+o+");\n\n void main() {\n "+i+" outC = getOutputCoords();\n if (any(lessThan(outC, start)) || any(greaterThanEqual(outC, end))) {\n setOutput(float("+n+"));\n } else {\n "+i+" coords = outC - start;\n setOutput(getX("+s+"));\n }\n }\n ":"\n int start = "+a+";\n int end = "+o+";\n\n void main() {\n int outC = getOutputCoords();\n if (outC < start || outC >= end) {\n setOutput(float("+n+"));\n } else {\n setOutput(getX(outC - start));\n }\n }\n "},Ei=function(t,e,n){this.variableNames=["x"],this.usesPackedTextures=!0,this.outputShape=e.map(function(e,n){return e[0]+t[n]+e[1]});for(var r=t.length,i=mn(r),a=e.map(function(t){return t[0]}).join(","),o=e.map(function(e,n){return e[0]+t[n]}).join(","),s=Ze("rc",r),c=Ze("source",r),u=s[r-1]+" < "+this.outputShape[r-1],l=1===r?"source":"vec2("+c.slice(-2).join()+")",d=[i+" rc = outputLoc;",s[r-1]+" += 1;\n if("+u+") {\n ",1===r?"":"}\n rc = outputLoc;\n "+s[r-2]+" += 1;\n if("+s[r-2]+" < "+this.outputShape[r-2]+") {",1===r?"":" "+s[r-1]+" += 1;\n if("+u+") {"],f=1===r?"rc < start || rc >= end":"any(lessThan(rc, start)) || any(greaterThanEqual(rc, end))",h="",p=0,m=1===r?2:4;p<m;p++)h+="\n "+d[p]+"\n if ("+f+") {\n result["+p+"] = float("+n+");\n } else {\n "+i+" source = rc - start;\n result["+p+"] = getChannel(getX("+c.join()+"), "+l+");\n }\n ";h+=1===r?"} ":"}}",this.userCode="\n const "+i+" start = "+i+"("+a+");\n const "+i+" end = "+i+"("+o+");\n\n void main() {\n "+i+" outputLoc = getOutputCoords();\n vec4 result = vec4(0.);\n "+h+"\n setOutput(result);\n }\n "},Si=function(t,e,n){if(this.variableNames=["x"],"avg"===e&&n)throw new Error("Cannot compute positions for average pool.");var r=t.filterWidth,i=t.strideHeight,a=t.strideWidth,o=t.dilationHeight,s=t.dilationWidth,c=t.effectiveFilterHeight,u=t.effectiveFilterWidth,l=t.padInfo.top,d=t.padInfo.left;this.outputShape=t.outShape;var f="avg"===e,h="0.0";if(f||(h="-1.0 / 1e-20"),n)this.userCode="\n const ivec2 strides = ivec2("+i+", "+a+");\n const ivec2 pads = ivec2("+l+", "+d+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d = coords[3];\n\n ivec2 xRCCorner = coords.yz * strides - pads;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // max/min x(?, ?, d) to get y(yR, yC, d).\n // ? = to be determined\n float minMaxValue = 0.0;\n float minMaxValueFound = 0.0;\n int minMaxPosition = 0;\n float avgValue = 0.0;\n\n for (int wR = 0; wR < "+c+";\n wR += "+o+") {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= "+t.inHeight+") {\n continue;\n }\n\n for (int wC = 0; wC < "+u+";\n wC += "+s+") {\n int xC = xCCorner + wC;\n\n if (xC < 0 || xC >= "+t.inWidth+") {\n continue;\n }\n\n float value = getX(batch, xR, xC, d);\n\n // If a min / max value has already been found, use it. If not,\n // use the current value.\n float currMinMaxValue = mix(\n value, minMaxValue, minMaxValueFound);\n if (value >= currMinMaxValue) {\n minMaxValue = value;\n minMaxValueFound = 1.0;\n minMaxPosition = wR * "+u+" + wC;\n }\n }\n }\n setOutput(float(minMaxPosition));\n }\n ";else{var p=e+"("+e+"("+e+"(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])";"avg"===e&&(p="avgValue / count");var m=4*Math.floor(r/4),v=r%4,_="\n if ("+f+") {\n avgValue += dot(values, ones);\n } else {\n minMaxValue = max(values, minMaxValue);\n }\n ";this.userCode="\n const ivec2 strides = ivec2("+i+", "+a+");\n const ivec2 pads = ivec2("+l+", "+d+");\n const float initializationValue = "+h+";\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float count = 0.0;\n\n float getValue(int batch, int xR, int xC, int d) {\n if (xC < 0 || xC >= "+t.inWidth+") {\n return initializationValue;\n }\n count += 1.0;\n return getX(batch, xR, xC, d);\n }\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d = coords[3];\n\n ivec2 xRCCorner = coords.yz * strides - pads;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // max/min x(?, ?, d) to get y(yR, yC, d).\n // ? = to be determined\n vec4 minMaxValue = vec4("+h+");\n float avgValue = 0.0;\n count = 0.0;\n\n for (int wR = 0; wR < "+c+";\n wR += "+o+") {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= "+t.inHeight+") {\n continue;\n }\n\n for (int wC = 0; wC < "+m+"; wC += 4) {\n int xC = xCCorner + wC * "+s+";\n\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n getValue(batch, xR, xC + "+s+", d),\n getValue(batch, xR, xC + 2 * "+s+", d),\n getValue(batch, xR, xC + 3 * "+s+", d)\n );\n\n "+_+"\n }\n\n int xC = xCCorner + "+m+";\n if ("+(1===v)+") {\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n "+_+"\n } else if ("+(2===v)+") {\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n getValue(batch, xR, xC + "+s+", d),\n initializationValue,\n initializationValue\n );\n\n "+_+"\n } else if ("+(3===v)+") {\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n getValue(batch, xR, xC + "+s+", d),\n getValue(batch, xR, xC + 2 * "+s+", d),\n initializationValue\n );\n\n "+_+"\n }\n }\n setOutput("+p+");\n }\n "}},Ii=function(t,e){this.variableNames=["x"];var n=t.windowSize,r=t.batchSize,i=t.inSize,a=Math.ceil(i/n);this.outputShape=[r,a];var o="0.0",s="";"prod"===e?o="1.0":"min"===e?(o="1.0 / 1e-20",s="min"):"max"===e&&(o="-1.0 / 1e-20",s="max");var c=e+"("+e+"("+e+"(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])";"sum"===e?c="sumValue":"prod"===e?c="prodValue":"all"===e?c="allValue":"any"===e&&(c="anyValue");var u=4*Math.floor(n/4),l=n%4,d="\n if ("+("sum"===e)+") {\n sumValue += dot(values, ones);\n } else if ("+("prod"===e)+") {\n vec2 tmp = vec2(values[0], values[1]) * vec2(values[2], values[3]);\n prodValue *= tmp[0] * tmp[1];\n } else {\n minMaxValue = "+s+"(values, minMaxValue);\n }\n ",f="vec4";"all"===e?(o="1.0",d="\n bool reducedAllValue = all(values);\n float floatedReducedAllValue = float(reducedAllValue);\n allValue = float(allValue >= 1.0 && floatedReducedAllValue >= 1.0);\n ",f="bvec4"):"any"===e&&(o="0.0",d="\n bool reducedAnyValue = any(values);\n float floatedReducedAnyValue = float(reducedAnyValue);\n anyValue = float(anyValue >= 1.0 || floatedReducedAnyValue >= 1.0);\n ",f="bvec4");var h="";i%n>0&&(h="\n if (inIdx < 0 || inIdx >= "+i+") {\n return initializationValue;\n }\n "),this.userCode="\n const float initializationValue = "+o+";\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float getValue(int batch, int inIdx) {\n "+h+"\n return getX(batch, inIdx);\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = outIdx * "+n+";\n\n vec4 minMaxValue = vec4("+o+");\n float prodValue = 1.0;\n float sumValue = 0.0;\n float allValue = 1.0;\n float anyValue = 0.0;\n\n for (int i = 0; i < "+u+"; i += 4) {\n int inIdx = inOffset + i;\n "+f+" values = "+f+"(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n getValue(batch, inIdx + 3)\n );\n\n "+d+"\n }\n\n int inIdx = inOffset + "+u+";\n if ("+(1===l)+") {\n "+f+" values = "+f+"(\n getValue(batch, inIdx),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n "+d+"\n } else if ("+(2===l)+") {\n "+f+" values = "+f+"(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n initializationValue,\n initializationValue\n );\n\n "+d+"\n } else if ("+(3===l)+") {\n "+f+" values = "+f+"(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n initializationValue\n );\n\n "+d+"\n }\n setOutput("+c+");\n }\n "},Mi=function(t,e){this.variableNames=["A"],this.usesPackedTextures=!0,this.outputShape=t;for(var n="",r=0;r<4;r++){var i="thisRC = rc;";r%2==1&&(i+="thisRC.z += 1;"),r>1&&(i+="thisRC.y += 1;"),n+="\n "+i+"\n "+(r>0?"if(thisRC.y < rows && thisRC.z < cols){":"")+"\n int flatIndex = getFlatIndex(thisRC);\n\n ivec3 inputRC = inputCoordsFromReshapedOutCoords(flatIndex);\n vec2 inputRCInnerDims = vec2(float(inputRC.y),float(inputRC.z));\n\n result["+r+"] =\n getChannel(getA(inputRC.x, inputRC.y, inputRC.z), inputRCInnerDims);\n "+(r>0?"}":"")+"\n "}this.userCode="\n "+function(t){return"\n ivec3 inputCoordsFromReshapedOutCoords(int index) {\n "+rn(["r","c","d"],t)+"\n return ivec3(r, c, d);\n }\n "}(e)+"\n "+function(t){return"\n int getFlatIndex(ivec3 coords) {\n return round("+function(t,e){if(t.length!==e.length)throw new Error("Vectors to be dotted must be of the same length -got "+t.length+" and "+e.length);for(var n=[],r=Math.floor(t.length/4),i=t.length%4,a=0;a<r;a++){var o=t.slice(4*a,4*a+4),s=e.slice(4*a,4*a+4);n.push(an(o)+", "+an(s))}return 0!==i&&(o=t.slice(4*r),s=e.slice(4*r),1===o.length&&(o=o.map(function(t){return"float("+t+")"}),s=s.map(function(t){return"float("+t+")"})),n.push(an(o)+", "+an(s))),n.map(function(t,e){return"dot("+t+")"}).join("+")}(["coords.x","coords.y","coords.z"],U(t).map(function(t){return t.toString()}).concat(["1."]))+");\n }\n "}(t)+"\n\n void main() {\n ivec3 rc = getOutputCoords();\n\n vec4 result = vec4(0.);\n\n ivec3 thisRC;\n int rows = "+t[1]+";\n int cols = "+t[2]+";\n\n "+n+"\n\n setOutput(result);\n }\n "};var Ti=function(t,e,n){this.variableNames=["dy"],this.outputShape=[],this.outputShape=e.shape;var r=e.shape,i=r[1],a=r[2],o=t.shape,s=o[1],c=o[2],u=[n&&s>1?i-1:i,n&&c>1?a-1:a],l=[n&&s>1?s-1:s,n&&c>1?c-1:c],d=u[0]/l[0],f=u[1]/l[1],h=1/d,p=1/f,m=2*Math.ceil(h)+2,v=2*Math.ceil(p)+2;this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n int r = coords[1];\n int c = coords[2];\n\n float accumulator = 0.0;\n\n const float heightScale = float("+d+");\n const float widthScale = float("+f+");\n\n const float invHeightScale = float("+h+");\n const float invWidthScale = float("+p+");\n\n const int winHeight = int("+m+");\n const int winWidth = int("+v+");\n\n // Compute bounds for where in dy we will look\n float startRLerp = floor(float(r) * invHeightScale);\n int startDyR = int(startRLerp - float(winHeight / 2));\n\n float startCLerp = floor(float(c) * invWidthScale);\n int startDyC = int(startCLerp - float(winWidth / 2));\n\n // Loop over dy\n for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {\n int dyR = dyROffset + startDyR;\n\n // Guard against the window exceeding the bounds of dy\n if (dyR < 0 || dyR >= "+s+") {\n continue;\n }\n\n for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {\n int dyC = dyCOffset + startDyC;\n\n // Guard against the window exceeding the bounds of dy\n if (dyC < 0 || dyC >= "+c+") {\n continue;\n }\n\n float dxR = float(dyR) * heightScale;\n int topDxRIndex = int(floor(dxR));\n int bottomDxRIndex = int(min(ceil(dxR), "+(i-1)+".0));\n float dxRLerp = dxR - float(topDxRIndex);\n float inverseDxRLerp = 1.0 - dxRLerp;\n\n float dxC = float(dyC) * widthScale;\n int leftDxCIndex = int(floor(dxC));\n int rightDxCIndex = int(min(ceil(dxC), "+(a-1)+".0));\n float dxCLerp = dxC - float(leftDxCIndex);\n float inverseDxCLerp = 1.0 - dxCLerp;\n\n if (r == topDxRIndex && c == leftDxCIndex) {\n // topLeft\n accumulator +=\n getDy(b, dyR, dyC, d) * inverseDxRLerp * inverseDxCLerp;\n }\n\n if (r == topDxRIndex && c == rightDxCIndex) {\n // topRight\n accumulator += getDy(b, dyR, dyC, d) * inverseDxRLerp * dxCLerp;\n }\n\n if (r == bottomDxRIndex && c == leftDxCIndex) {\n // bottomLeft\n accumulator += getDy(b, dyR, dyC, d) * dxRLerp * inverseDxCLerp;\n }\n\n if (r == bottomDxRIndex && c == rightDxCIndex) {\n // bottomRight\n accumulator += getDy(b, dyR, dyC, d) * dxRLerp * dxCLerp;\n }\n }\n }\n // End loop over dy\n\n setOutput(accumulator);\n }\n "},Di=function(t,e,n,r){this.variableNames=["A"],this.outputShape=[];var i=t[0],a=t[1],o=t[2],s=t[3];this.outputShape=[i,e,n,s];var c=[r&&e>1?a-1:a,r&&n>1?o-1:o],u=[r&&e>1?e-1:e,r&&n>1?n-1:n];this.userCode="\n const vec2 effectiveInputOverOutputRatioRC = vec2(\n "+c[0]/u[0]+",\n "+c[1]/u[1]+");\n const vec2 inputShapeRC = vec2("+a+".0, "+o+".0);\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n ivec2 yRC = coords.yz;\n\n // Fractional source index.\n vec2 sourceFracIndexRC = vec2(yRC) * effectiveInputOverOutputRatioRC;\n\n // Compute the four integer indices.\n ivec2 sourceFloorRC = ivec2(sourceFracIndexRC);\n ivec2 sourceCeilRC = ivec2(\n min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));\n\n float topLeft = getA(b, sourceFloorRC.x, sourceFloorRC.y, d);\n float bottomLeft = getA(b, sourceCeilRC.x, sourceFloorRC.y, d);\n float topRight = getA(b, sourceFloorRC.x, sourceCeilRC.y, d);\n float bottomRight = getA(b, sourceCeilRC.x, sourceCeilRC.y, d);\n\n vec2 fracRC = sourceFracIndexRC - vec2(sourceFloorRC);\n\n float top = topLeft + (topRight - topLeft) * fracRC.y;\n float bottom = bottomLeft + (bottomRight - bottomLeft) * fracRC.y;\n float newValue = top + (bottom - top) * fracRC.x;\n\n setOutput(newValue);\n }\n "},Ri=function(t,e,n,r){this.variableNames=["A"],this.usesPackedTextures=!0,this.outputShape=[];var i=t[0],a=t[1],o=t[2],s=t[3];this.outputShape=[i,e,n,s];var c=[r&&e>1?a-1:a,r&&n>1?o-1:o],u=[r&&e>1?e-1:e,r&&n>1?n-1:n];this.userCode="\n const vec3 effectiveInputOverOutputRatioRC = vec3(\n "+c[0]/u[0]+",\n "+c[1]/u[1]+",\n "+c[1]/u[1]+");\n const vec3 inputShapeRC = vec3("+a+".0, "+o+".0,\n "+o+".0);\n\n float getAValue(int b, int r, int c, int d) {\n return getChannel(getA(b, r, c, d), vec2(c, d));\n }\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n // Calculate values for next column in yRC.z.\n ivec3 yRC = coords.yzz + ivec3(0, 0, 1);\n\n // Fractional source index.\n vec3 sourceFracIndexRC = vec3(yRC) * effectiveInputOverOutputRatioRC;\n\n // Compute the four integer indices.\n ivec3 sourceFloorRC = ivec3(sourceFracIndexRC);\n ivec3 sourceCeilRC = ivec3(\n min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));\n \n // Should we calculate next column and row elements in 2x2 packed cell.\n bool hasNextCol = d < "+(s-1)+"; \n bool hasNextRow = coords.z < "+(n-1)+";\n\n // In parallel, construct four corners for all four components in\n // packed 2x2 cell.\n vec4 topLeft = vec4(\n getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d),\n hasNextCol ? getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d + 1) : 0.0);\n\n vec4 bottomLeft = vec4(\n getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d),\n hasNextCol ? getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d + 1) : 0.0);\n\n vec4 topRight = vec4(\n getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d),\n hasNextCol ? getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d + 1) : 0.0);\n\n vec4 bottomRight = vec4(\n getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d),\n hasNextCol ? getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d + 1) : 0.0);\n\n vec3 fracRC = sourceFracIndexRC - vec3(sourceFloorRC);\n\n vec4 top = mix(topLeft, topRight, fracRC.yyzz);\n vec4 bottom = mix(bottomLeft, bottomRight, fracRC.yyzz);\n vec4 newValue = mix(top, bottom, fracRC.x);\n\n setOutput(newValue);\n }\n "},Pi=function(t,e,n){this.variableNames=["dy"],this.outputShape=[],this.outputShape=e.shape;var r=e.shape,i=r[1],a=r[2],o=t.shape,s=o[1],c=o[2],u=[n&&s>1?i-1:i,n&&c>1?a-1:a],l=[n&&s>1?s-1:s,n&&c>1?c-1:c],d=u[0]/l[0],f=u[1]/l[1],h=1/d,p=1/f,m=2*Math.ceil(h)+2,v=2*Math.ceil(p)+2;this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n int r = coords[1];\n int c = coords[2];\n\n float accumulator = 0.0;\n\n const float heightScale = float("+d+");\n const float widthScale = float("+f+");\n\n const float invHeightScale = float("+h+");\n const float invWidthScale = float("+p+");\n\n const int winHeight = int("+m+");\n const int winWidth = int("+v+");\n\n // Compute bounds for where in dy we will look\n float startRLerp = floor(float(r) * invHeightScale);\n int startDyR = int(floor(startRLerp - float(winHeight / 2)));\n\n float startCLerp = floor(float(c) * invWidthScale);\n int startDyC = int(floor(startCLerp - float(winWidth / 2)));\n\n // Loop over dy\n for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {\n int dyR = dyROffset + startDyR;\n\n // Guard against the window exceeding the bounds of dy\n if (dyR < 0 || dyR >= "+s+") {\n continue;\n }\n\n for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {\n int dyC = dyCOffset + startDyC;\n\n // Guard against the window exceeding the bounds of dy\n if (dyC < 0 || dyC >= "+c+") {\n continue;\n }\n\n float sourceFracRow =\n float("+u[0]+") *\n (float(dyR) / float("+l[0]+"));\n\n float sourceFracCol =\n float("+u[1]+") *\n (float(dyC) / float("+l[1]+"));\n\n int sourceNearestRow = int(min(\n float(int("+i+") - 1),\n "+n+" ? float(round(sourceFracRow)) :\n float(floor(sourceFracRow))));\n\n int sourceNearestCol = int(min(\n float(int("+a+") - 1),\n "+n+" ? float(round(sourceFracCol)) :\n float(floor(sourceFracCol))));\n\n if (r == sourceNearestRow && c == sourceNearestCol) {\n accumulator += getDy(b, dyR, dyC, d);\n }\n }\n }\n // End loop over dy\n\n setOutput(accumulator);\n }\n "},Oi=function(t,e,n,r){this.variableNames=["A"],this.outputShape=[];var i=t[0],a=t[1],o=t[2],s=t[3];this.outputShape=[i,e,n,s];var c=[r&&e>1?a-1:a,r&&n>1?o-1:o],u=[r&&e>1?e-1:e,r&&n>1?n-1:n],l=r?"0.5":"0.0";this.userCode="\n const vec2 effectiveInputOverOutputRatioRC = vec2(\n "+c[0]/u[0]+",\n "+c[1]/u[1]+");\n const vec2 inputShapeRC = vec2("+a+".0, "+o+".0);\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n ivec2 yRC = coords.yz;\n\n // Fractional source index.\n vec2 sourceFracIndexRC = vec2(yRC) * effectiveInputOverOutputRatioRC;\n\n // Compute the coordinators of nearest neighbor point.\n ivec2 sourceNearestRC = ivec2(\n min(inputShapeRC - 1.0, floor(sourceFracIndexRC + "+l+")));\n\n float newValue = getA(b, sourceNearestRC.x, sourceNearestRC.y, d);\n\n setOutput(newValue);\n }\n "},Li=function(t,e){this.variableNames=["x"];var n=t.length;if(n>4)throw new Error("WebGL backend: Reverse of rank-"+n+" tensor is not yet supported");if(this.outputShape=t,1!==n){var r=t.map(function(n,r){return function(n){return-1!==e.indexOf(n)&&1!==t[n]?t[n]+" - coords["+n+"] - 1":"coords["+n+"]"}(r)}).join(","),i=mn(n);this.userCode="\n void main() {\n "+i+" coords = getOutputCoords();\n setOutput(getX("+r+"));\n }\n "}else this.userCode="\n void main() {\n int coord = getOutputCoords();\n setOutput(getX("+t[0]+" - coord - 1));\n }\n "},Ai=function(t,e){this.variableNames=["x"],this.usesPackedTextures=!0;var n=t.length;if(n>4)throw new Error("WebGL backend: Reverse of rank-"+n+" tensor is not yet supported");this.outputShape=t;var r=Ze("rc",n),i=r[n-1]+" + 1 < "+this.outputShape[n-1],a=r[n-2]+" + 1 < "+this.outputShape[n-2],o=mn(n);function s(n){var r=t.map(function(r,i){return function(n,r){return-1!==e.indexOf(n)&&1!==t[n]?t[n]+" - "+r[n]+" - 1":""+r[n]}(i,n)});return"getChannel(getX("+r.join(",")+"), vec2("+r.slice(-2).join(",")+"))"}this.userCode=1===n?"\n void main(){\n int rc = getOutputCoords();\n vec4 result = vec4(0.);\n result.r = getChannel(getX("+t[0]+" - rc - 1), rc);\n if("+i+"){\n result.g = getChannel(getX("+t[0]+" - (rc + 1) - 1), rc + 1);\n }\n setOutput(result);\n }\n ":"\n void main() {\n "+o+" rc = getOutputCoords();\n vec4 result = vec4(0.);\n result.r = "+s(r.slice())+";\n if("+i+"){\n result.g = "+function(t){return t[n-1]="("+t[n-1]+" + 1)",s(t)}(r.slice())+";\n }\n if("+a+") {\n result.b = "+function(t){return t[n-2]="("+t[n-2]+" + 1)",s(t)}(r.slice())+";\n if("+i+") {\n result.a = "+function(t){return t[n-1]="("+t[n-1]+" + 1)",t[n-2]="("+t[n-2]+" + 1)",s(t)}(r.slice())+";\n }\n }\n setOutput(result);\n }\n "},Ni=function(t,e,n,r,i,a,o){void 0===o&&(o=!0),this.variableNames=["updates","indices","defaultValue"],this.outputShape=a;var s=mn(i.length),c=mn(a.length),u="";1===n?u="i":2===n&&(u="i, j");var l="getIndices("+u+")",d="";1===r?d="i":2===r&&(d="i, coords[1]");var f="getUpdates("+d+")",h=e>1?"strides[j]":"strides";this.userCode="\n "+s+" strides = "+s+"("+i+");\n\n void main() {\n "+c+" coords = getOutputCoords();\n float sum = 0.0;\n bool found = false;\n for (int i = 0; i < "+t+"; i++) {\n int flattenedIndex = 0;\n for (int j = 0; j < "+e+"; j++) {\n int index = round("+l+");\n flattenedIndex += index * "+h+";\n }\n if (flattenedIndex == coords[0]) {\n sum += "+f+";\n found = true;\n }\n }\n setOutput(mix(getDefaultValue(), sum, float(found)));\n }\n "},Bi=function(t,e){this.variableNames=["x","segmentIds"];var n=t.windowSize,r=t.batchSize,i=t.inSize,a=t.numSegments,o=a*Math.ceil(i/n);this.outputShape=[r,o];var s=4*Math.floor(n/4),c=n%4,u="\n sumValue += dot(values, segFilter);\n ",l="";i%n>0&&(l="\n if (inIdx < 0 || inIdx >= "+i+") {\n return initializationValue;\n }\n ");var d="";i%n>0&&(d="\n if (inIdx < 0 || inIdx >= "+i+") {\n return -1.0;\n }\n "),this.userCode="\n const float initializationValue = 0.0;\n\n float getValue(int batch, int inIdx) {\n "+l+"\n return getX(batch, inIdx);\n }\n\n float getSegmentIdAtIndex(int inIdx) {\n "+d+"\n return getSegmentIds(inIdx);\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = int(floor(float(outIdx) / float(\n "+a+")) * float("+n+"));\n int currentSeg = int(mod(float(outIdx), float("+a+")));\n\n float sumValue = 0.0;\n\n for (int i = 0; i < "+s+"; i += 4) {\n int inIdx = inOffset + i;\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n getValue(batch, inIdx + 3)\n );\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 3)) == currentSeg ? 1 : 0\n );\n\n "+u+"\n }\n\n int inIdx = inOffset + "+s+";\n if ("+(1===c)+") {\n vec4 values = vec4(\n getValue(batch, inIdx),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n int inIdxSeg = int(getSegmentIdAtIndex(inIdx));\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n 0,\n 0,\n 0\n );\n\n "+u+"\n } else if ("+(2===c)+") {\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n initializationValue,\n initializationValue\n );\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n 0,\n 0\n );\n\n "+u+"\n } else if ("+(3===c)+") {\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n initializationValue\n );\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,\n 0\n );\n\n "+u+"\n }\n setOutput(sumValue);\n }\n "},ji=function(t,e,n){var r,i;if(this.variableNames=["c","a","b"],this.outputShape=e,n>4)throw Error("Where for rank "+n+" is not yet supported");if(1===n)i="resRC",r="resRC";else{for(var a=["resRC.x","resRC.y","resRC.z","resRC.w"],o=[],s=[],c=0;c<e.length;c++)s.push(""+a[c]),c<t&&o.push(""+a[c]);r=o.join(),i=s.join()}var u=mn(n);this.userCode="\n void main() {\n "+u+" resRC = getOutputCoords();\n float cVal = getC("+r+");\n if (cVal >= 1.0) {\n setOutput(getA("+i+"));\n } else {\n setOutput(getB("+i+"));\n }\n }\n "},Fi=function(){function t(t){this.variableNames=["source"],this.outputShape=t,this.rank=t.length;var e,n=mn(this.rank),r="uniform int start["+this.rank+"];",i=function(t){if(1===t)return"sourceLoc";if(t<=6)return Yi.slice(0,t).map(function(t){return"sourceLoc."+t}).join(",");throw Error("Slicing for rank "+t+" is not yet supported")}(this.rank);e="\n "+n+" sourceLoc;\n "+n+" coords = getOutputCoords();\n "+t.map(function(t,e){return"sourceLoc."+Yi[e]+" = start["+e+"] + coords."+Yi[e]+";"}).join("\n")+"\n ",this.userCode="\n "+r+"\n void main() {\n "+e+"\n setOutput(getSource("+i+"));\n }\n "}return t.prototype.getCustomSetupFunc=function(t){var e=this;if(t.length!==this.rank)throw Error("The rank ("+this.rank+") of the program must match the length of start ("+t.length+")");return function(n,r){null==e.startLoc&&(e.startLoc=n.getUniformLocationNoThrow(r,"start"),null==e.startLoc)||n.gl.uniform1iv(e.startLoc,t)}},t}(),Yi=["x","y","z","w","u","v"];var $i=function(){function t(t){this.variableNames=["source"],this.usesPackedTextures=!0,this.outputShape=t,this.rank=t.length;var e=mn(this.rank),n=Ze("coords",this.rank),r=Ze("sourceLoc",this.rank),i=1===this.rank?"sourceLoc":"vec2("+r.slice(-2).join()+")",a="getChannel(getSource("+r.join()+"), "+i+")",o="\n result.x = "+a+";\n if (++"+n[this.rank-1]+" < "+t[this.rank-1]+") {\n ++"+r[this.rank-1]+";\n result.y = "+a+";\n --"+r[this.rank-1]+";\n }\n ",s=1===this.rank?"":"\n --"+n[this.rank-1]+";\n if (++"+n[this.rank-2]+" < "+t[this.rank-2]+") {\n ++"+r[this.rank-2]+";\n result.z = "+a+";\n if (++"+n[this.rank-1]+" < "+t[this.rank-1]+") {\n ++"+r[this.rank-1]+";\n result.w = "+a+";\n }\n }\n ",c=this.rank<=4?"sourceLoc = coords +\n "+e+"("+t.map(function(t,e){return"start["+e+"]"}).join()+");":t.map(function(t,e){return r[e]+" = "+n[e]+" + start["+e+"];"}).join("\n");this.userCode="\n uniform int start["+this.rank+"];\n void main() {\n "+e+" coords = getOutputCoords();\n "+e+" sourceLoc;\n "+c+" \n vec4 result = vec4(0.);\n "+o+"\n "+s+"\n setOutput(result);\n }\n "}return t.prototype.getCustomSetupFunc=function(t){var e=this;if(t.length!==this.rank)throw Error("The rank ("+this.rank+") of the program must match the length of start ("+t.length+")");return function(n,r){null==e.startLoc&&(e.startLoc=n.getUniformLocationNoThrow(r,"start"),null==e.startLoc)||n.gl.uniform1iv(e.startLoc,t)}},t}(),zi=function(t,e,n,r){this.variableNames=["x"];var i=n.filter(function(t,e){return-1===r.indexOf(e)});this.outputShape=i;var a=n.length,o=mn(n.length),s=mn(i.length),c="";if(1===a)c="coords * strides + begin";else{var u=0;c=n.map(function(t,e){return-1===r.indexOf(e)?(u++,1===i.length?"coords * strides["+e+"] + begin["+e+"]":"coords["+(u-1)+"] * strides["+e+"] + begin["+e+"]"):"begin["+e+"]"}).join(",")}this.userCode="\n "+o+" begin = "+o+"("+t+");\n "+o+" strides = "+o+"("+e+");\n\n void main() {\n "+s+" coords = getOutputCoords();\n setOutput(getX("+c+"));\n }\n "},Vi=function(){function t(t){this.gpgpu=t,this.numUsedTextures=0,this.numFreeTextures=0,this.freeTextures={},this.logEnabled=!1,this.usedTextures={}}return t.prototype.acquireTexture=function(t,e,n){var r,i=Hi(e,n),a=qi(t,i,n);if(a in this.freeTextures||(this.freeTextures[a]=[]),a in this.usedTextures||(this.usedTextures[a]=[]),this.freeTextures[a].length>0){this.numFreeTextures--,this.numUsedTextures++,this.log();var o=this.freeTextures[a].shift();return this.usedTextures[a].push(o),o}return this.numUsedTextures++,this.log(),i===rr.PACKED_2X2_FLOAT32?r=this.gpgpu.createPackedMatrixTexture(t[0],t[1]):i===rr.PACKED_2X2_FLOAT16?r=this.gpgpu.createFloat16PackedMatrixTexture(t[0],t[1]):i===rr.UNPACKED_FLOAT32?r=this.gpgpu.createFloat32MatrixTexture(t[0],t[1]):i===rr.UNPACKED_FLOAT16?r=this.gpgpu.createFloat16MatrixTexture(t[0],t[1]):i===rr.PACKED_4X1_UNSIGNED_BYTE&&(r=this.gpgpu.createUnsignedBytesMatrixTexture(t[0],t[1])),this.usedTextures[a].push(r),r},t.prototype.releaseTexture=function(t,e,n,r){if(null!=this.freeTextures){var i=qi(e,Hi(n,r),r);i in this.freeTextures||(this.freeTextures[i]=[]),this.freeTextures[i].push(t),this.numFreeTextures++,this.numUsedTextures--;var a=this.usedTextures[i],o=a.indexOf(t);if(o<0)throw new Error("Cannot release a texture that was never provided by this texture manager");a.splice(o,1),this.log()}},t.prototype.log=function(){if(this.logEnabled){var t=this.numFreeTextures+this.numUsedTextures;console.log("Free/Used",this.numFreeTextures+" / "+this.numUsedTextures,"("+t+")")}},t.prototype.getNumUsedTextures=function(){return this.numUsedTextures},t.prototype.getNumFreeTextures=function(){return this.numFreeTextures},t.prototype.dispose=function(){var t=this;if(null!=this.freeTextures){for(var e in this.freeTextures)this.freeTextures[e].forEach(function(e){t.gpgpu.deleteMatrixTexture(e)});for(var e in this.usedTextures)this.usedTextures[e].forEach(function(e){t.gpgpu.deleteMatrixTexture(e)});this.freeTextures=null,this.usedTextures=null,this.numUsedTextures=0,this.numFreeTextures=0}},t}();function Hi(t,e){if(t===nr.UPLOAD)return e?rr.PACKED_2X2_FLOAT32:rr.UNPACKED_FLOAT32;if(t===nr.RENDER||null==t)return e?zt.get("WEBGL_RENDER_FLOAT32_ENABLED")?rr.PACKED_2X2_FLOAT32:rr.PACKED_2X2_FLOAT16:zt.get("WEBGL_RENDER_FLOAT32_ENABLED")?rr.UNPACKED_FLOAT32:rr.UNPACKED_FLOAT16;if(t===nr.DOWNLOAD||t===nr.PIXELS)return rr.PACKED_4X1_UNSIGNED_BYTE;throw new Error("Unknown logical texture type "+t)}function qi(t,e,n){return t[0]+"_"+t[1]+"_"+e+"_"+n}var Wi=function(t,e){this.variableNames=["A"];for(var n=new Array(t.length),r=0;r<n.length;r++)n[r]=t[r]*e[r];this.outputShape=n,this.rank=n.length;var i=mn(this.rank),a=function(t){var e=t.length;if(e>5)throw Error("Tile for rank "+e+" is not yet supported");if(1===e)return"imod(resRC, "+t[0]+")";for(var n=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u"],r=[],i=0;i<t.length;i++)r.push("imod("+n[i]+", "+t[i]+")");return r.join()}(t);this.userCode="\n void main() {\n "+i+" resRC = getOutputCoords();\n setOutput(getA("+a+"));\n }\n "};var Ui=function(t,e){this.variableNames=["A"];for(var n=new Array(t.length),r=0;r<n.length;r++)n[r]=t[e[r]];this.outputShape=n,this.rank=n.length;var i=mn(this.rank),a=function(t){var e=t.length;if(e>6)throw Error("Transpose for rank "+e+" is not yet supported");for(var n=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u","resRC.v"],r=new Array(e),i=0;i<t.length;i++)r[t[i]]=n[i];return r.join()}(e);this.userCode="\n void main() {\n "+i+" resRC = getOutputCoords();\n setOutput(getA("+a+"));\n }\n "};var Gi=function(t,e){this.variableNames=["A"],this.usesPackedTextures=!0;for(var n=new Array(t.length),r=0;r<n.length;r++)n[r]=t[e[r]];if(this.outputShape=n,this.rank=n.length,this.rank>6)throw Error("Packed transpose for rank "+this.rank+" is not yet supported.");var i=mn(this.rank),a=Je("rc",this.rank),o=new Array(this.rank);for(r=0;r<e.length;r++)o[e[r]]=a[r];var s="vec2("+o.slice(-2).join()+")",c="++"+a[this.rank-1]+" < "+n[this.rank-1],u="getChannel(getA("+o.join()+"), "+s+")";this.userCode="\n void main() {\n "+i+" rc = getOutputCoords();\n vec4 result = vec4(0.);\n result[0] = "+u+";\n if("+c+") {\n result[1] = "+u+";\n }\n --"+a[this.rank-1]+";\n if(++"+a[this.rank-2]+" < "+n[this.rank-2]+") {\n result[2] = "+u+";\n if("+c+") {\n result[3] = "+u+";\n }\n } \n setOutput(result);\n }\n "},Ki=1.7580993408473768,Xi=1.0507009873554805,Ji=function(t,e){this.variableNames=["A"],this.outputShape=t,this.userCode="\n float unaryOperation(float x) {\n "+e+"\n }\n\n void main() {\n float x = getAAtOutCoords();\n float y = unaryOperation(x);\n\n setOutput(y);\n }\n "},Zi="if (isnan(x)) return x;",Qi="return x;",ta=Zi+"\n return (x < 0.0) ? 0.0 : x;\n",ea="\n // Stable and Attracting Fixed Point (0, 1) for Normalized Weights.\n // see: https://arxiv.org/abs/1706.02515\n float scaleAlpha = "+Ki+";\n float scale = "+Xi+";\n return (x >= 0.0) ? scale * x : scaleAlpha * (exp(x) - 1.0);\n";var na="return exp(x);",ra=Zi+"\n return sin(x);\n",ia=Zi+"\n return cos(x);\n",aa=Zi+"\n return atan(x);\n",oa=Zi+"\n if (x < 1.0) return NAN;\n return log(x + sqrt(x * x - 1.0));",sa=Zi+"\n if ((x < -1.0) || (x > 1.0)) return NAN;\n return (log(1.0 + x) - log(1.0 - x)) / 2.0;",ca="return x;",ua="\n vec4 result = x * vec4(greaterThanEqual(x, vec4(0.0)));\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n",la=function(t,e){this.variableNames=["A"],this.usesPackedTextures=!0,this.outputShape=t,this.userCode="\n vec4 unaryOperation(vec4 x) {\n "+e+"\n }\n\n void main() {\n vec4 x = getAAtOutCoords();\n vec4 y = unaryOperation(x);\n\n setOutput(y);\n }\n "},da=function(t){this.variableNames=["A"],this.usesPackedTextures=!0,this.outputShape=t;var e=t.length,n=Ze("rc",e),r=mn(e),i=function(t,e){if(1===t)return"rc";for(var n="",r=0;r<t;r++)n+=e[r],r<t-1&&(n+=",");return n}(e,n),a=n.slice(-2),o=e<=1?"rc":"vec2("+a.join(",")+")";this.userCode="\n void main() {\n "+r+" rc = getOutputCoords();\n vec4 packedInput = getA("+i+");\n\n setOutput(getChannel(packedInput, "+o+"));\n }\n "};var fa=xe({concat_:function(t,e){void 0===e&&(e=0),b(t.length>=1,function(){return"Pass at least one tensor to concat"});var n=Wt(t,"tensors","concat");e=R(e,n[0].shape)[0];var r=le(n.map(function(t){return t.shape}),e);if(0===k(r))return Ie([],r);if(1===(n=n.filter(function(t){return t.size>0})).length)return n[0];var i=n.map(function(t){return t.shape});!function(t,e){var n=t[0].length;t.forEach(function(t,e){b(t.length===n,function(){return"Error in concat"+n+"D: rank of tensors["+e+"] must be the same as the rank of the rest ("+n+")"})}),b(e>=0&&e<n,function(){return"Error in concat"+n+"D: axis must be between 0 and "+(n-1)+"."});var r=t[0];t.forEach(function(t,i){for(var a=0;a<n;a++)b(a===e||t[a]===r[a],function(){return"Error in concat"+n+"D: Shape of tensors["+i+"] ("+t+") does not match the shape of the rest ("+r+") along the non-concatenated axis "+i+"."})})}(i,e);var a=n;return zt.engine.runKernel(function(t){return t.concat(n,e)},a,function(t){var n=i.map(function(t){return t[e]});return _a(t,n,e).map(function(t){return function(){return t}})})}}),ha=xe({concat1d_:function(t){return fa(t,0)}}),pa=xe({concat2d_:function(t,e){return fa(t,e)}}),ma=xe({concat3d_:function(t,e){return fa(t,e)}}),va=xe({concat4d_:function(t,e){return fa(t,e)}}),_a=xe({split_:function(t,e,n){void 0===n&&(n=0);var r,i=qt(t,"x","split");return n=R(n,i.shape)[0],"number"==typeof e?(b(i.shape[n]%e==0,function(){return"Number of splits must evenly divide the axis."}),r=new Array(e).fill(i.shape[n]/e)):(b(i.shape[n]===e.reduce(function(t,e){return t+e}),function(){return"The sum of sizes must match the size of the axis dimension."}),r=e),zt.engine.runKernel(function(t){return t.split(i,r,n)},{$x:i},function(t){return{$x:function(){return fa(t,n)}}})}});"undefined"!=typeof window?window:void 0!==r||"undefined"!=typeof self&&self;function ga(t,e){return t(e={exports:{}},e.exports),e.exports}var ba=ga(function(t){!function(t,e,n){function r(t,e){return e.c=t.c,e.s0=t.s0,e.s1=t.s1,e.s2=t.s2,e}function i(t,e){var n=new function(t){var e,n=this,r=(e=4022871197,function(t){t=t.toString();for(var n=0;n<t.length;n++){var r=.02519603282416938*(e+=t.charCodeAt(n));r-=e=r>>>0,e=(r*=e)>>>0,e+=4294967296*(r-=e)}return 2.3283064365386963e-10*(e>>>0)});n.next=function(){var t=2091639*n.s0+2.3283064365386963e-10*n.c;return n.s0=n.s1,n.s1=n.s2,n.s2=t-(n.c=0|t)},n.c=1,n.s0=r(" "),n.s1=r(" "),n.s2=r(" "),n.s0-=r(t),n.s0<0&&(n.s0+=1),n.s1-=r(t),n.s1<0&&(n.s1+=1),n.s2-=r(t),n.s2<0&&(n.s2+=1),r=null}(t),i=e&&e.state,a=n.next;return a.int32=function(){return 4294967296*n.next()|0},a.double=function(){return a()+1.1102230246251565e-16*(2097152*a()|0)},a.quick=a,i&&("object"==typeof i&&r(i,n),a.state=function(){return r(n,{})}),a}e&&e.exports?e.exports=i:this.alea=i}(0,t)}),ya=ga(function(t){!function(t,e,n){function r(t,e){return e.x=t.x,e.y=t.y,e.z=t.z,e.w=t.w,e}function i(t,e){var n=new function(t){var e=this,n="";e.x=0,e.y=0,e.z=0,e.w=0,e.next=function(){var t=e.x^e.x<<11;return e.x=e.y,e.y=e.z,e.z=e.w,e.w^=e.w>>>19^t^t>>>8},t===(0|t)?e.x=t:n+=t;for(var r=0;r<n.length+64;r++)e.x^=0|n.charCodeAt(r),e.next()}(t),i=e&&e.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var t=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},a.int32=n.next,a.quick=a,i&&("object"==typeof i&&r(i,n),a.state=function(){return r(n,{})}),a}e&&e.exports?e.exports=i:this.xor128=i}(0,t)}),xa=ga(function(t){!function(t,e,n){function r(t,e){return e.x=t.x,e.y=t.y,e.z=t.z,e.w=t.w,e.v=t.v,e.d=t.d,e}function i(t,e){var n=new function(t){var e=this,n="";e.next=function(){var t=e.x^e.x>>>2;return e.x=e.y,e.y=e.z,e.z=e.w,e.w=e.v,(e.d=e.d+362437|0)+(e.v=e.v^e.v<<4^t^t<<1)|0},e.x=0,e.y=0,e.z=0,e.w=0,e.v=0,t===(0|t)?e.x=t:n+=t;for(var r=0;r<n.length+64;r++)e.x^=0|n.charCodeAt(r),r==n.length&&(e.d=e.x<<10^e.x>>>4),e.next()}(t),i=e&&e.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var t=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},a.int32=n.next,a.quick=a,i&&("object"==typeof i&&r(i,n),a.state=function(){return r(n,{})}),a}e&&e.exports?e.exports=i:this.xorwow=i}(0,t)}),wa=ga(function(t){!function(t,e,n){function r(t,e){return e.x=t.x.slice(),e.i=t.i,e}function i(t,e){null==t&&(t=+new Date);var n=new function(t){var e=this;e.next=function(){var t,n,r=e.x,i=e.i;return t=r[i],n=(t^=t>>>7)^t<<24,n^=(t=r[i+1&7])^t>>>10,n^=(t=r[i+3&7])^t>>>3,n^=(t=r[i+4&7])^t<<7,t=r[i+7&7],n^=(t^=t<<13)^t<<9,r[i]=n,e.i=i+1&7,n},function(t,e){var n,r=[];if(e===(0|e))r[0]=e;else for(e=""+e,n=0;n<e.length;++n)r[7&n]=r[7&n]<<15^e.charCodeAt(n)+r[n+1&7]<<13;for(;r.length<8;)r.push(0);for(n=0;n<8&&0===r[n];++n);for(8==n?r[7]=-1:r[n],t.x=r,t.i=0,n=256;n>0;--n)t.next()}(e,t)}(t),i=e&&e.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var t=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},a.int32=n.next,a.quick=a,i&&(i.x&&r(i,n),a.state=function(){return r(n,{})}),a}e&&e.exports?e.exports=i:this.xorshift7=i}(0,t)}),ka=ga(function(t){!function(t,e,n){function r(t,e){return e.i=t.i,e.w=t.w,e.X=t.X.slice(),e}function i(t,e){null==t&&(t=+new Date);var n=new function(t){var e=this;e.next=function(){var t,n,r=e.w,i=e.X,a=e.i;return e.w=r=r+1640531527|0,n=i[a+34&127],t=i[a=a+1&127],n^=n<<13,t^=t<<17,n^=n>>>15,t^=t>>>12,n=i[a]=n^t,e.i=a,n+(r^r>>>16)|0},function(t,e){var n,r,i,a,o,s=[],c=128;for(e===(0|e)?(r=e,e=null):(e+="\0",r=0,c=Math.max(c,e.length)),i=0,a=-32;a<c;++a)e&&(r^=e.charCodeAt((a+32)%e.length)),0===a&&(o=r),r^=r<<10,r^=r>>>15,r^=r<<4,r^=r>>>13,a>=0&&(o=o+1640531527|0,i=0==(n=s[127&a]^=r+o)?i+1:0);for(i>=128&&(s[127&(e&&e.length||0)]=-1),i=127,a=512;a>0;--a)r=s[i+34&127],n=s[i=i+1&127],r^=r<<13,n^=n<<17,r^=r>>>15,n^=n>>>12,s[i]=r^n;t.w=o,t.X=s,t.i=i}(e,t)}(t),i=e&&e.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var t=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},a.int32=n.next,a.quick=a,i&&(i.X&&r(i,n),a.state=function(){return r(n,{})}),a}e&&e.exports?e.exports=i:this.xor4096=i}(0,t)}),Ca=ga(function(t){!function(t,e,n){function r(t,e){return e.a=t.a,e.b=t.b,e.c=t.c,e.d=t.d,e}function i(t,e){var n=new function(t){var e=this,n="";e.next=function(){var t=e.b,n=e.c,r=e.d,i=e.a;return t=t<<25^t>>>7^n,n=n-r|0,r=r<<24^r>>>8^i,i=i-t|0,e.b=t=t<<20^t>>>12^n,e.c=n=n-r|0,e.d=r<<16^n>>>16^i,e.a=i-t|0},e.a=0,e.b=0,e.c=-1640531527,e.d=1367130551,t===Math.floor(t)?(e.a=t/4294967296|0,e.b=0|t):n+=t;for(var r=0;r<n.length+20;r++)e.b^=0|n.charCodeAt(r),e.next()}(t),i=e&&e.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var t=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},a.int32=n.next,a.quick=a,i&&("object"==typeof i&&r(i,n),a.state=function(){return r(n,{})}),a}e&&e.exports?e.exports=i:this.tychei=i}(0,t)}),Ea=ga(function(t){!function(e,r){var i,a=this,o=256,s=6,c="random",u=r.pow(o,s),l=r.pow(2,52),d=2*l,f=o-1;function h(t,n,h){var _=[],g=m(function t(e,n){var r,i=[],a=typeof e;if(n&&"object"==a)for(r in e)try{i.push(t(e[r],n-1))}catch(t){}return i.length?i:"string"==a?e:e+"\0"}((n=1==n?{entropy:!0}:n||{}).entropy?[t,v(e)]:null==t?function(){try{var t;return i&&(t=i.randomBytes)?t=t(o):(t=new Uint8Array(o),(a.crypto||a.msCrypto).getRandomValues(t)),v(t)}catch(t){var n=a.navigator,r=n&&n.plugins;return[+new Date,a,r,a.screen,v(e)]}}():t,3),_),b=new function(t){var e,n=t.length,r=this,i=0,a=r.i=r.j=0,s=r.S=[];for(n||(t=[n++]);i<o;)s[i]=i++;for(i=0;i<o;i++)s[i]=s[a=f&a+t[i%n]+(e=s[i])],s[a]=e;(r.g=function(t){for(var e,n=0,i=r.i,a=r.j,s=r.S;t--;)e=s[i=f&i+1],n=n*o+s[f&(s[i]=s[a=f&a+e])+(s[a]=e)];return r.i=i,r.j=a,n})(o)}(_),y=function(){for(var t=b.g(s),e=u,n=0;t<l;)t=(t+n)*o,e*=o,n=b.g(1);for(;t>=d;)t/=2,e/=2,n>>>=1;return(t+n)/e};return y.int32=function(){return 0|b.g(4)},y.quick=function(){return b.g(4)/4294967296},y.double=y,m(v(b.S),e),(n.pass||h||function(t,e,n,i){return i&&(i.S&&p(i,b),t.state=function(){return p(b,{})}),n?(r[c]=t,e):t})(y,g,"global"in n?n.global:this==r,n.state)}function p(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function m(t,e){for(var n,r=t+"",i=0;i<r.length;)e[f&i]=f&(n^=19*e[f&i])+r.charCodeAt(i++);return v(e)}function v(t){return String.fromCharCode.apply(0,t)}if(r["seed"+c]=h,m(r.random(),e),t.exports){t.exports=h;try{i=n(86)}catch(t){}}}([],Math)});Ea.alea=ba,Ea.xor128=ya,Ea.xorwow=xa,Ea.xorshift7=wa,Ea.xor4096=ka,Ea.tychei=Ca;var Sa=Ea.alea,Ia=function(){function t(t,e,n,r,i){this.mean=t,this.stdDev=e,this.dtype=n,this.nextVal=NaN,this.truncated=r,this.truncated&&(this.upper=this.mean+2*this.stdDev,this.lower=this.mean-2*this.stdDev);var a=i||Math.random();this.random=Sa(a.toString())}return t.prototype.nextValue=function(){if(!isNaN(this.nextVal)){var t=this.nextVal;return this.nextVal=NaN,t}for(var e,n,r=!1;!r;){var i=void 0,a=void 0,o=void 0;do{o=(i=2*this.random()-1)*i+(a=2*this.random()-1)*a}while(o>=1||0===o);var s=Math.sqrt(-2*Math.log(o)/o);e=this.mean+this.stdDev*i*s,n=this.mean+this.stdDev*a*s,this.truncated&&!this.isValidTruncated(e)||(r=!0)}return this.truncated&&!this.isValidTruncated(n)||(this.nextVal=this.convertValue(n)),this.convertValue(e)},t.prototype.convertValue=function(t){return null==this.dtype||"float32"===this.dtype?t:Math.round(t)},t.prototype.isValidTruncated=function(t){return t<=this.upper&&t>=this.lower},t}();function Ma(t,e,n){return void 0===e&&(e="float32"),e=e||"float32",Q(t),new ut(t,e,n)}var Ta=xe({batchToSpaceND_:function(t,e,n){var r=qt(t,"x","batchToSpaceND"),i=e.reduce(function(t,e){return t*e});return b(r.rank>=1+e.length,function(){return"input rank is "+r.rank+" but should be > than blockShape.length "+e.length}),b(n.length===e.length,function(){return"crops.length is "+n.length+" but should be equal to blockShape.length "+e.length}),b(r.shape[0]%i==0,function(){return"input tensor batch is "+r.shape[0]+" but is not divisible by the product of the elements of blockShape "+e.join(" * ")+" === "+i}),zt.engine.runKernel(function(t){return t.batchToSpaceND(r,e,n)},{$x:r},function(t){return{$x:function(){return t.spaceToBatchND(e,n)}}})}}),Da=xe({cast_:function(t,e){var n=qt(t,"x","cast");return zt.engine.runKernel(function(t){return t.cast(n,e)},{$x:n},function(t){return{$x:function(){return t.clone()}}})}}),Ra=xe({clone_:function(t){var e=qt(t,"x","clone",null);return zt.engine.runKernel(function(t){return ht.make(e.shape,{dataId:e.dataId},e.dtype)},{$x:e},function(t){return{$x:function(){return t.toFloat()}}})}}),Pa=xe({cumsum_:function(t,e,n,r){void 0===e&&(e=0),void 0===n&&(n=!1),void 0===r&&(r=!1);var i=qt(t,"x","cumsum"),a=se([e|=0],i.rank),o=i;null!=a&&(o=i.transpose(a));var s=ue(1,i.rank)[0],c=zt.engine.runKernel(function(t){return t.cumsum(o,s,n,r)},{permutedX:o},function(t){return{permutedX:function(){return t.cumsum(e,n,!r)}}});return null!=a&&(c=c.transpose(a)),c}}),Oa=xe({depthToSpace_:function(t,e,n){void 0===n&&(n="NHWC");var r=qt(t,"x","depthToSpace"),i="NHWC"===n?r.shape[1]:r.shape[2],a="NHWC"===n?r.shape[2]:r.shape[3],o="NHWC"===n?r.shape[3]:r.shape[1];return b(i*e>=0,function(){return"Negative dimension size caused by overflow when multiplying\n "+i+" and "+e+" for depthToSpace with input shape\n "+r.shape}),b(a*e>=0,function(){return"Negative dimension size caused by overflow when multiplying\n "+a+" and "+e+" for depthToSpace with input shape\n "+r.shape}),b(o%(e*e)==0,function(){return"Dimension size must be evenly divisible by "+e*e+" but is "+o+" for depthToSpace with input shape "+r.shape}),zt.engine.runKernel(function(t){return t.depthToSpace(r,e,n)},{$x:r})}}),La=xe({expandDims_:function(t,e){void 0===e&&(e=0);var n=qt(t,"x","expandDims");b(e<=n.rank,function(){return"Axis must be <= rank of the tensor"});var r=n.shape.slice();return e<0&&(b(-(n.rank+1)<=e,function(){return"Axis must be in the interval ["+-(n.rank+1)+", "+n.rank+"]"}),e=n.rank+e+1),r.splice(e,0,1),Wa(n,r)}}),Aa=xe({eye_:function(t,e,n,r){void 0===r&&(r="float32"),null==e&&(e=t);for(var i=Ma([t,e],r),a=t<=e?t:e,o=0;o<a;++o)i.set(1,o,o);var s=i.toTensor().as2D(t,e);if(null==n)return s;if(1===n.length)return Xa(La(s,0),[n[0],1,1]);if(2===n.length)return Xa(La(La(s,0),0),[n[0],n[1],1,1]);if(3===n.length)return Xa(La(La(La(s,0),0),0),[n[0],n[1],n[2],1,1]);throw new Error("eye() currently supports only 1D and 2D batchShapes, but received "+n.length+"D.")}}),Na=xe({multinomial_:function(t,e,n,r){void 0===r&&(r=!1);var i=qt(t,"logits","multinomial"),a=i.size,o=i.rank;if(a<2)throw new Error("Error in multinomial: you need at least 2 outcomes, but got "+a+".");if(o>2)throw new Error("Rank of probabilities must be 1 or 2, but is "+o);n=n||Math.random();var s=1===o?i.as2D(1,-1):i,c=zt.engine.runKernel(function(t){return t.multinomial(s,r,e,n)},{logits2D:s});return 1===o?c.as1D():c}}),Ba=xe({oneHot_:function(t,e,n,r){if(void 0===n&&(n=1),void 0===r&&(r=0),e<2)throw new Error("Error in oneHot: depth must be >=2, but it is "+e);var i=qt(t,"indices","oneHot","int32"),a=i.shape.concat([e]);return i=i.flatten(),zt.engine.runKernel(function(t){return t.oneHot(i,e,n,r)},{$indices:i},function(t){return{$indices:function(){return Le(i.shape,"float32")}}}).reshape(a)}}),ja=xe({pad_:function(t,e,n){void 0===n&&(n=0);var r=qt(t,"x","pad");if(0===r.rank)throw new Error("pad(scalar) is not defined. Pass non-scalar to pad");var i=e.map(function(t){return t[0]});return zt.engine.runKernel(function(t){return t.pad(r,e,n)},{$x:r},function(t){return{$x:function(){return t.slice(i,r.shape)}}})}}),Fa=xe({pad1d_:function(t,e,n){return void 0===n&&(n=0),b(2===e.length,function(){return"Invalid number of paddings. Must be length of 2."}),ja(t,[e],n)}}),Ya=xe({pad2d_:function(t,e,n){return void 0===n&&(n=0),b(2===e.length&&2===e[0].length&&2===e[1].length,function(){return"Invalid number of paddings. Must be length of 2 each."}),ja(t,e,n)}}),$a=xe({pad3d_:function(t,e,n){return void 0===n&&(n=0),b(3===e.length&&2===e[0].length&&2===e[1].length&&2===e[2].length,function(){return"Invalid number of paddings. Must be length of 2 each."}),ja(t,e,n)}}),za=xe({pad4d_:function(t,e,n){return void 0===n&&(n=0),b(4===e.length&&2===e[0].length&&2===e[1].length&&2===e[2].length&&2===e[3].length,function(){return"Invalid number of paddings. Must be length of 2 each."}),ja(t,e,n)}}),Va=xe({rand_:function(t,e,n){var r=k(t),i=null;if(null==n||"float32"===n)i=new Float32Array(r);else if("int32"===n)i=new Int32Array(r);else{if("bool"!==n)throw new Error("Unknown data type "+n);i=new Uint8Array(r)}for(var a=0;a<r;a++)i[a]=e();return ht.make(t,{values:i},n)}}),Ha=xe({randomNormal_:function(t,e,n,r,i){if(void 0===e&&(e=0),void 0===n&&(n=1),null!=r&&"bool"===r)throw new Error("Unsupported data type "+r);for(var a=new Ia(e,n,r,!1,i),o=Ma(t,r),s=0;s<o.values.length;s++)o.values[s]=a.nextValue();return o.toTensor()}}),qa=xe({randomUniform_:function(t,e,n,r){void 0===e&&(e=0),void 0===n&&(n=1),void 0===r&&(r="float32");for(var i=Ma(t,r),a=0;a<i.values.length;a++)i.values[a]=g(e,n);return i.toTensor()}}),Wa=xe({reshape_:function(t,e){var n=qt(t,"x","reshape",null);return e=D(e,n.size),b(n.size===k(e),function(){return"new shape and old shape must have the same number of elements."}),zt.engine.runKernel(function(t){return t.reshape(n,e)},{$x:n},function(t){return{$x:function(){return t.reshape(n.shape)}}})}}),Ua=xe({spaceToBatchND_:function(t,e,n){var r=qt(t,"x","spaceToBatchND");return b(r.rank>=1+e.length,function(){return"input rank "+r.rank+" should be > than [blockShape] "+e.length}),b(n.length===e.length,function(){return"paddings.shape[0] "+n.length+" must be equal to [blockShape] "+e.length}),b(r.shape.reduce(function(t,r,i){return i>0&&i<=e.length?t&&(r+n[i-1][0]+n[i-1][1])%e[i-1]==0:t},!0),function(){return"input spatial dimensions "+r.shape.slice(1)+" with paddings "+n.toString()+" must be divisible by blockShapes "+e.toString()}),zt.engine.runKernel(function(t){return t.spaceToBatchND(r,e,n)},{$x:r},function(t){return{$x:function(){return t.batchToSpaceND(e,n)}}})}}),Ga=xe({squeeze_:function(t,e){var n=qt(t,"x","squeeze");return Wa(n,P(n.shape,e).newShape)}}),Ka=xe({stack_:function(t,e){void 0===e&&(e=0);var n=Wt(t,"tensors","stack");if(b(n.length>=1,function(){return"Pass at least one tensor to tf.stack"}),1===n.length)return n[0].expandDims(e);var r=n[0].rank,i=n[0].shape,a=n[0].dtype;b(e<=r,function(){return"Axis must be <= rank of the tensor"}),n.forEach(function(t){y(i,t.shape,"All tensors passed to stack must have matching shapes")}),n.forEach(function(t){b(a===t.dtype,function(){return"All tensors passed to stack must have matching dtypes"})});var o=n.map(function(t){return t.expandDims(e)});return fa(o,e)}}),Xa=xe({tile_:function(t,e){var n=qt(t,"x","tile");return b(n.rank===e.length,function(){return"Error in transpose: rank of input "+n.rank+" must match length of reps "+e+"."}),zt.engine.runKernel(function(t,r){var i=t.tile(n,e);return r([n]),i},{$x:n},function(t,n){var r=n[0];return{$x:function(){var n=je(r);if(1===r.rank)for(var i=0;i<e[0];++i)n=n.add(t.slice([i*r.shape[0]],[r.shape[0]]));else if(2===r.rank)for(i=0;i<e[0];++i)for(var a=0;a<e[1];++a)n=n.add(t.slice([i*r.shape[0],a*r.shape[1]],[r.shape[0],r.shape[1]]));else if(3===r.rank)for(i=0;i<e[0];++i)for(a=0;a<e[1];++a)for(var o=0;o<e[2];++o)n=n.add(t.slice([i*r.shape[0],a*r.shape[1],o*r.shape[2]],[r.shape[0],r.shape[1],r.shape[2]]));else{if(4!==r.rank)throw new Error("Gradient for tile operation is not implemented for rank-"+r.rank+" tensors yet.");for(i=0;i<e[0];++i)for(a=0;a<e[1];++a)for(o=0;o<e[2];++o)for(var s=0;s<e[3];++s)n=n.add(t.slice([i*r.shape[0],a*r.shape[1],o*r.shape[2],s*r.shape[3]],[r.shape[0],r.shape[1],r.shape[2],r.shape[3]]))}return n}}})}}),Ja=xe({truncatedNormal_:function(t,e,n,r,i){if(void 0===e&&(e=0),void 0===n&&(n=1),null!=r&&"bool"===r)throw new Error("Unsupported data type "+r);for(var a=new Ia(e,n,r,!0,i),o=Ma(t,r),s=0;s<o.values.length;s++)o.values[s]=a.nextValue();return o.toTensor()}}),Za=xe({unstack_:function(t,e){void 0===e&&(e=0),e=e||0;var n=qt(t,"x","unstack");return b(e>=-n.shape.length&&e<n.shape.length,function(){return"Axis = "+e+" is not in [-"+n.shape.length+", "+n.shape.length+")"}),e<0&&(e+=n.shape.length),zt.engine.runKernel(function(t){return t.unstack(n,e)},{$x:n},function(t){return{$x:function(){return Ka(t,e)}}})}}),Qa=function(t,e){return u(this,void 0,void 0,function(){var n,r,i,a,o,s,c,u,d,f;return l(this,function(l){switch(l.label){case 0:return n=qt(t,"x","setdiff1d"),r=qt(e,"y","setdiff1d"),b(n.dtype===r.dtype,function(){return"x and y should have the same dtype, but got x ("+n.dtype+") and y ("+r.dtype+")."}),b(1===n.rank,function(){return"x should be 1D tensor, but got x ("+n.shape+")."}),b(1===r.rank,function(){return"y should be 1D tensor, but got y ("+r.shape+")."}),[4,n.data()];case 1:return i=l.sent(),[4,r.data()];case 2:for(a=l.sent(),o=new Set(a),s=0,d=0;d<i.length;d++)o.has(i[d])||s++;for(c=new ut([s],n.dtype),u=new ut([s],"int32"),d=0,f=0;d<i.length;d++)o.has(i[d])||(c.values[f]=i[d],u.values[f]=d,f++);return[2,[c.toTensor(),u.toTensor()]]}})})};function to(t,e){for(var n=[],r=0;r<e.length;r++)e[r]&&n.push(r);var i=Ma(t,"int32"),a=Ma([n.length,t.length],"int32");for(r=0;r<n.length;r++){var o=i.indexToLoc(n[r]),s=r*t.length;a.values.set(o,s)}return a.toTensor()}var eo={};var no=function(){function t(t){if(this.gpgpu=t,this.pendingRead=new WeakMap,this.pendingDisposal=new WeakSet,this.dataRefCount=new WeakMap,this.lruDataGPU=[],this.numBytesInGPU=0,this.uploadWaitMs=0,this.downloadWaitMs=0,this.disposed=!1,zt.get("WEBGL_VERSION")<1)throw new Error("WebGL is not supported on this device");if(null==t){var e=h(zt.get("WEBGL_VERSION"));this.binaryCache=function(t){return t in eo?eo[t]:(eo[t]={},eo[t])}(zt.get("WEBGL_VERSION")),this.gpgpu=new pi(e),this.canvas=e.canvas,this.gpgpuCreatedLocally=!0}else this.binaryCache={},this.gpgpuCreatedLocally=!1,this.canvas=t.gl.canvas;this.textureManager=new Vi(this.gpgpu)}return t.prototype.register=function(t,e,n){if(this.texData.has(t))throw new Error("Data buffer is already registered");this.texData.set(t,{shape:e,dtype:n})},t.prototype.setDataMover=function(t){this.texData=new Fe(t)},t.prototype.fromPixels=function(t,e){if(null==t)throw new Error("pixels passed to tf.browser.fromPixels() can not be null");var n=[t.height,t.width],r=[t.height,t.width,e];if(zt.get("IS_BROWSER")){if(!(t instanceof HTMLVideoElement||t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageData))throw new Error("pixels passed to tf.browser.fromPixels() must be either an HTMLVideoElement, HTMLImageElement, HTMLCanvasElement or ImageData, but was "+t.constructor.name);if(t instanceof HTMLVideoElement){if(null==this.fromPixels2DContext){if("complete"!==document.readyState)throw new Error("The DOM is not ready yet. Please call tf.browser.fromPixels() once the DOM is ready. One way to do that is to add an event listener for `DOMContentLoaded` on the document object");this.fromPixels2DContext=document.createElement("canvas").getContext("2d")}this.fromPixels2DContext.canvas.width=t.width,this.fromPixels2DContext.canvas.height=t.height,this.fromPixels2DContext.drawImage(t,0,0,t.width,t.height),t=this.fromPixels2DContext.canvas}}var i=this.makeTensorHandle(n,"int32");this.texData.get(i.dataId).usage=nr.PIXELS,this.gpgpu.uploadPixelDataToTexture(this.getTexture(i.dataId),t);var a=new tr(r),o=this.compileAndRun(a,[i]);return this.disposeData(i.dataId),o},t.prototype.makeTensorHandle=function(t,e){var n={};return this.register(n,t,e),{dataId:n,shape:t,dtype:e}},t.prototype.write=function(t,e){if(null==e)throw new Error("MathBackendWebGL.write(): values can not be null");if(zt.get("DEBUG"))for(var n=0;n<e.length;n++){var r=e[n];if(!pr(r))throw Error("The value "+r+" cannot be represented on this device.")}var i=this.texData.get(t),a=i.texture,o=i.texShape,s=i.usage,c=i.dtype,u=i.isPacked;if("complex64"===c)throw new Error("Cannot write to a complex64 dtype. Please use tf.complex(real, imag).");null!=a&&(this.releaseTexture(t,a,o,s,c,u),i.texture=null,i.texShape=null),i.usage=nr.UPLOAD,i.values=e},t.prototype.readSync=function(t){var e=this.texData.get(t),n=e.values,r=e.dtype,i=e.complexTensors,a=e.slice,o=e.shape;if(null!=a){var s=new Ji(o,"return x;"),c=this.compileAndRun(s,[{dataId:t,shape:o,dtype:r}]),u=this.readSync(c.dataId);return c.dispose(),u}if(null!=n)return this.convertAndCacheOnCPU(t);if("string"===r)return n;var l,d,f=null!=this.activeTimers;return f&&(l=performance.now()),d="complex64"===r?ze(i.real.dataSync(),i.imag.dataSync()):this.getValuesFromTexture(t),f&&(this.downloadWaitMs+=performance.now()-l),this.convertAndCacheOnCPU(t,d)},t.prototype.read=function(t){return u(this,void 0,void 0,function(){var e,n,r,i,a,o,s,c,u,d,f,h,p,m,v,_,g,b,y,x,w,C,E,S;return l(this,function(l){switch(l.label){case 0:if(this.pendingRead.has(t))return r=this.pendingRead.get(t),[2,new Promise(function(t){return r.push(t)})];if(i=this.texData.get(t),a=i.texture,o=i.values,s=i.texShape,c=i.isPacked,u=i.shape,d=i.slice,f=i.dtype,null!=d)return h=new Ji(u,"return x;"),p=this.compileAndRun(h,[{dataId:t,shape:u,dtype:f}]),m=this.read(p.dataId),p.dispose(),[2,m];if(null!=o)return[2,this.convertAndCacheOnCPU(t)];if(this.pendingRead.set(t,[]),!zt.get("WEBGL_DOWNLOAD_FLOAT_ENABLED")&&2===zt.get("WEBGL_VERSION"))throw new Error("tensor.data() with WEBGL_DOWNLOAD_FLOAT_ENABLED=false and WEBGL_VERSION=2 not yet supported.");return v=s[1],_=s[0],c&&(e=cr(s[0],s[1]),v=e[0],_=e[1]),g=this.gpgpu.maybeCreateBufferFromTexture(a,_,v),[4,this.gpgpu.createAndWaitForFence()];case 1:return l.sent(),g instanceof WebGLTexture?b=this.getValuesFromTexture(t):(y=k(u),c?(x=Yr(u),w=1,C=1,u.length&&(n=$r(u),w=n[0],C=n[1]),b=this.gpgpu.downloadPackedMatrixFromBuffer(g,x,w,C,s[0],s[1]).subarray(0,y)):b=this.gpgpu.downloadFloat32MatrixFromBuffer(g,s[0],s[1]).subarray(0,y)),E=this.convertAndCacheOnCPU(t,b),S=this.pendingRead.get(t),this.pendingRead.delete(t),S.forEach(function(t){return t(E)}),this.pendingDisposal.has(t)&&(this.pendingDisposal.delete(t),this.disposeData(t)),[2,E]}})})},t.prototype.getValuesFromTexture=function(t){var e,n=this,r=this.texData.get(t),i=r.shape,a=r.dtype,o=r.texture,s=r.texShape,c=k(i);if(zt.get("WEBGL_DOWNLOAD_FLOAT_ENABLED")){if(this.texData.get(t).isPacked){var u=Yr(i),l=1,d=1;return i.length&&(l=(e=$r(i))[0],d=e[1]),this.gpgpu.downloadMatrixFromPackedTexture(o,u,l,d,s[0],s[1]).subarray(0,c)}return this.gpgpu.downloadFloat32MatrixFromOutputTexture(o,s[0],s[1]).subarray(0,c)}var f=this.makeTensorHandle(i,"float32");f.size=k(i),this.texData.get(f.dataId).usage=nr.DOWNLOAD;var h=Gt(function(){var e=new Kn(i);return n.compileAndRun(e,[{shape:i,dtype:a,dataId:t}],f,null,!1)}),p=this.texData.get(h.dataId),m=this.gpgpu.downloadByteEncodedFloatMatrixFromOutputTexture(p.texture,p.texShape[0],p.texShape[1]).subarray(0,c);return this.disposeData(f.dataId),m},t.prototype.time=function(t){return u(this,void 0,void 0,function(){var e,n,r,i,a,o,s;return l(this,function(c){switch(c.label){case 0:return e=this.activeTimers,n=[],r=!1,null==this.programTimersStack?(this.programTimersStack=n,r=!0):this.activeTimers.push(n),this.activeTimers=n,t(),i=w(this.activeTimers.map(function(t){return t.query})).filter(function(t){return null!=t}),a=w(this.activeTimers.map(function(t){return t.name})).filter(function(t){return null!=t}),this.activeTimers=e,r&&(this.programTimersStack=null),[4,Promise.all(i)];case 1:return o=c.sent(),s={uploadWaitMs:this.uploadWaitMs,downloadWaitMs:this.downloadWaitMs,kernelMs:_(o),getExtraProfileInfo:function(){return o.map(function(t,e){return{name:a[e],ms:t}}).map(function(t){return t.name+": "+t.ms}).join(", ")},wallMs:null},this.uploadWaitMs=0,this.downloadWaitMs=0,[2,s]}})})},t.prototype.memory=function(){return{unreliable:!1,numBytesInGPU:this.numBytesInGPU}},t.prototype.startTimer=function(){return zt.get("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0?this.gpgpu.beginQuery():{startMs:performance.now(),endMs:null}},t.prototype.endTimer=function(t){return zt.get("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0?(this.gpgpu.endQuery(),t):(t.endMs=performance.now(),t)},t.prototype.getQueryTime=function(t){return u(this,void 0,void 0,function(){var e;return l(this,function(n){return zt.get("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0?[2,this.gpgpu.waitForQueryAndGetTime(t)]:[2,(e=t).endMs-e.startMs]})})},t.prototype.disposeData=function(t){if(!this.pendingDisposal.has(t))if(this.pendingRead.has(t))this.pendingDisposal.add(t);else if(this.texData.has(t)){var e=this.texData.get(t),n=e.texture,r=e.dtype,i=e.texShape,a=e.usage,o=e.complexTensors,s=e.isPacked,c=e.slice;if(null!=n){var u=c&&c.origDataId||t,l=this.dataRefCount.get(u);l>1?this.dataRefCount.set(u,l-1):(this.dataRefCount.delete(u),this.releaseTexture(t,n,i,a,r,s),this.texData.delete(t))}null!=o&&(o.real.dispose(),o.imag.dispose())}},t.prototype.getTexture=function(t){return this.uploadToGPU(t),this.texData.get(t).texture},t.prototype.getCPUBackend=function(){return zt.get("WEBGL_CPU_FORWARD")?(null==this.cpuBackend&&(this.cpuBackend=zt.findBackend("cpu")),this.cpuBackend):null},t.prototype.shouldExecuteOnCPU=function(t,e){var n=this;return void 0===e&&(e=128),null!=this.getCPUBackend()&&t.every(function(t){return null==n.texData.get(t.dataId).texture&&t.size<e})},t.prototype.getGPGPUContext=function(){return this.gpgpu},t.prototype.getCanvas=function(){return this.canvas},t.prototype.complex=function(t,e){var n=this.makeOutputArray(t.shape,"complex64");return this.texData.get(n.dataId).complexTensors={real:zt.engine.keep(t.clone()),imag:zt.engine.keep(e.clone())},n},t.prototype.real=function(t){return this.texData.get(t.dataId).complexTensors.real.clone()},t.prototype.imag=function(t){return this.texData.get(t.dataId).complexTensors.imag.clone()},t.prototype.slice=function(t,e,n){if(this.shouldExecuteOnCPU([t]))return this.cpuBackend.slice(t,e,n);var r=this.texData.get(t.dataId).isPacked,i=be(t.shape,e,n);if(r||!i){var a=zt.get("WEBGL_PACK_ARRAY_OPERATIONS")?new $i(n):new Fi(n),o=a.getCustomSetupFunc(e);return this.compileAndRun(a,[t],null,o)}return this.uploadToGPU(t.dataId),this.shallowSlice(t,e,n)},t.prototype.shallowSlice=function(t,e,n){var r=this.texData.get(t.dataId),i=ht.make(n,{},t.dtype,this),a=this.texData.get(i.dataId);Object.assign(a,r),a.shape=n,a.dtype=t.dtype;var o=ye(e,t.strides);r.slice&&(o+=r.slice.flatOffset),a.slice={flatOffset:o,origDataId:r.slice&&r.slice.origDataId||t.dataId};var s=this.dataRefCount.get(a.slice.origDataId)||1;return this.dataRefCount.set(a.slice.origDataId,s+1),i},t.prototype.stridedSlice=function(t,e,n,r,i,a,o,s,c){if(this.shouldExecuteOnCPU([t]))return this.cpuBackend.stridedSlice(t,e,n,r,i,a,o,s,c);var u=ve(t.shape,e,n,r,i,a,o,s,c),l=u[0],d=u[1],f=u[2],h=d.filter(function(t,e){return-1===f.indexOf(e)});if(h.some(function(t){return 0===t}))return Ie([],h);var p=new zi(l,r,d,f);return this.compileAndRun(p,[t])},t.prototype.reverse=function(t,e){var n=zt.get("WEBGL_PACK_ARRAY_OPERATIONS")?new Ai(t.shape,e):new Li(t.shape,e);return this.compileAndRun(n,[t])},t.prototype.concat=function(t,e){if(this.shouldExecuteOnCPU(t))return this.cpuBackend.concat(t,e);if(1===t.length)return t[0];if(t.length>zt.get("WEBGL_MAX_TEXTURES_IN_SHADER")){var n=Math.floor(t.length/2),r=this.concat(t.slice(0,n),e),i=this.concat(t.slice(n),e);return this.concat([r,i],e)}if(zt.get("WEBGL_PACK_ARRAY_OPERATIONS")&&t[0].rank>1){var a=new Ln(t.map(function(t){return t.shape}),e);return this.compileAndRun(a,t)}var o=le(t.map(function(t){return t.shape}),e),s=t.map(function(t){return t.as2D(-1,k(t.shape.slice(e)))}),c=new On(s.map(function(t){return t.shape}));return this.compileAndRun(c,s).reshape(o)},t.prototype.neg=function(t){var e=new Ji(t.shape,"return -x;");return this.compileAndRun(e,[t])},t.prototype.batchMatMul=function(t,e,n,r){var i=n?t.shape[2]:t.shape[1],a=r?e.shape[1]:e.shape[2],o=n?t.shape[1]:t.shape[2],s=t.shape[0];if((1===i||1===a)&&o>1e3){n&&(t=t.transpose([0,2,1])),r&&(e=e.transpose([0,2,1]));var c=1===a?t:t.as3D(s,o,1),u=1===a?2:1,l=1===a?e.as3D(s,1,o):e;return this.multiply(c,l).sum(u,!0)}var d=wt(t.dtype,e.dtype),f=new yi(t.shape,[s,i,a],n,r),h=this.makePackedTensor(f.outputShape,d);return this.compileAndRun(f,[t,e],h)},t.prototype.fusedBatchMatMul=function(t,e,n,r,i,a){var o=n?t.shape[2]:t.shape[1],s=r?e.shape[1]:e.shape[2],c=t.shape[0],u=wt(t.dtype,e.dtype),l=new yi(t.shape,[c,o,s],n,r,!!i,a?function(t,e){if(void 0===e&&(e=!1),"linear"===t)return e?ca:Qi;if("relu"===t)return e?ua:ta;throw new Error("Activation "+t+" has not been implemented for the WebGL backend.")}(a,!0):null),d=this.makePackedTensor(l.outputShape,u),f=[t,e];return i&&f.push(i),this.compileAndRun(l,f,d)},t.prototype.multiply=function(t,e){if("complex64"===t.dtype){var n=this.texData.get(t.dataId),r=this.texData.get(e.dataId),i=new Cn(wn,t.shape,e.shape),a=new Cn(kn,t.shape,e.shape),o=[this.makeComplexComponentTensorHandle(t,n.complexTensors.real),this.makeComplexComponentTensorHandle(t,n.complexTensors.imag),this.makeComplexComponentTensorHandle(e,r.complexTensors.real),this.makeComplexComponentTensorHandle(e,r.complexTensors.imag)],s=this.compileAndRun(i,o),c=this.compileAndRun(a,o),u=this.complex(s,c);return s.dispose(),c.dispose(),u}if(this.shouldExecuteOnCPU([t,e]))return this.cpuBackend.multiply(t,e);if(zt.get("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(t,e,In,t.dtype);var l=new Mn(In,t.shape,e.shape),d=this.makeOutputArray(l.outputShape,t.dtype);return this.compileAndRun(l,[t,e],d)},t.prototype.batchNormalization=function(t,e,n,r,i,a){var o=[t,e,n],s=null;null!=a&&(s=a.shape,o.push(a));var c=null;if(null!=i&&(c=i.shape,o.push(i)),zt.get("WEBGL_PACK_BATCHNORMALIZATION")){var u=new xn(t.shape,e.shape,n.shape,s,c,r);return this.compileAndRun(u,o)}var l=new yn(t.shape,e.shape,n.shape,s,c,r);return this.compileAndRun(l,o)},t.prototype.localResponseNormalization4D=function(t,e,n,r,i){var a=new _i(t.shape,e,n,r,i);return this.compileAndRun(a,[t])},t.prototype.LRNGrad=function(t,e,n,r,i,a,o){var s=new gi(e.shape,r,i,a,o);return this.compileAndRun(s,[e,n,t])},t.prototype.tile=function(t,e){var n=new Wi(t.shape,e);return this.compileAndRun(n,[t])},t.prototype.pad=function(t,e,n){var r=zt.get("WEBGL_PACK_ARRAY_OPERATIONS")?new Ei(t.shape,e,n):new Ci(t.shape,e,n);return this.compileAndRun(r,[t])},t.prototype.transpose=function(t,e){if(this.shouldExecuteOnCPU([t]))return this.cpuBackend.transpose(t,e);var n=zt.get("WEBGL_PACK_ARRAY_OPERATIONS")?new Gi(t.shape,e):new Ui(t.shape,e);return this.compileAndRun(n,[t])},t.prototype.gather=function(t,e,n){if(this.shouldExecuteOnCPU([t,e]))return this.cpuBackend.gather(t,e,n);var r=new er(t.shape,e.size,n);return this.compileAndRun(r,[t,e])},t.prototype.batchToSpaceND=function(t,e,n){b(t.rank<=4,function(){return"batchToSpaceND for rank > 4 with a WebGL backend not implemented yet"});var r=e.reduce(function(t,e){return t*e}),i=Zt(t.shape,e,r),a=Qt(i.length,e.length),o=te(t.shape,e,r),s=ee(n,e.length),c=ne(o,n,e.length);return t.reshape(i).transpose(a).reshape(o).slice(s,c)},t.prototype.spaceToBatchND=function(t,e,n){b(t.rank<=4,function(){return"spaceToBatchND for rank > 4 with a WebGL backend not implemented yet"});var r=e.reduce(function(t,e){return t*e}),i=[[0,0]];i.push.apply(i,n);for(var a=1+e.length;a<t.shape.length;++a)i.push([0,0]);var o=t.pad(i),s=Zt(o.shape,e,r,!1),c=Qt(s.length,e.length,!1),u=te(o.shape,e,r,!1);return o.reshape(s).transpose(c).reshape(u)},t.prototype.reduce=function(t,e,n){var r=t.shape[0],i=t.shape[1],a=he(i),o=new Ii({windowSize:a,inSize:i,batchSize:r},e),s=o.outputShape,c=s[0],u=s[1],l=this.makeOutputArray([c,u],n);return this.compileAndRun(o,[t],l),1===l.shape[1]?l:this.reduce(l,e,n)},t.prototype.argReduce=function(t,e,n){void 0===n&&(n=null);var r=t.shape[0],i=t.shape[1];null!=n&&(r=n.shape[0],i=n.shape[1]);var a=he(i),o=new Xe({windowSize:a,inSize:i,batchSize:r},e,null==n),s=o.outputShape,c=s[0],u=s[1],l=this.makeOutputArray([c,u],"int32"),d=[t];return null!=n&&d.push(n),this.compileAndRun(o,d,l),1===l.shape[1]?l:this.argReduce(t,e,l)},t.prototype.argReducePacked=function(t,e,n){void 0===n&&(n=null);var r=null!=n?n.shape:t.shape,i=he(r[r.length-1]),a=new gn(r,i,e,null==n),o=this.makePackedTensor(a.outputShape,"int32"),s=null==n?[t]:[t,n];return this.compileAndRun(a,s,o),o.rank===t.rank?this.argReducePacked(t,e,o):o},t.prototype.sum=function(t,e){oe("sum",e,t.rank);var n=ie(t.shape,e),r=n[0],i=k(n[1]),a=t.as2D(-1,i),o=kt(t.dtype);return this.reduce(a,"sum",o).reshape(r)},t.prototype.prod=function(t,e){if(this.shouldExecuteOnCPU([t]))return this.cpuBackend.prod(t,e);var n=ie(t.shape,e),r=n[0],i=k(n[1]),a=t.as2D(-1,i),o=kt(t.dtype);return this.reduce(a,"prod",o).reshape(r)},t.prototype.unsortedSegmentSum=function(t,e,n){var r=0,i=se([r],t.rank),a=t;null!=i&&(a=t.transpose(i),r=ue(1,t.rank)[0]);var o=function(t,e,n){for(var r=[],i=t.length,a=0;a<i;a++)a!==e?r.push(t[a]):r.push(n);return r}(a.shape,r,n),s=k([a.shape[r]]),c=a.as2D(-1,s),u=kt(t.dtype),l=this.segOpCompute(c,"unsortedSegmentSum",e,u,n).reshape(o);return null!=i&&(l=l.transpose(ce(i))),l},t.prototype.segOpCompute=function(t,e,n,r,i){var a=t.shape[0],o=t.shape[1],s=function(t,e){var n,r=!1;for(t<=fe?(n=t,r=!0):n=W(t,Math.floor(Math.sqrt(t)));!r;)n>e||n===t?r=!0:n=W(t,n+1);return n}(o,i),c=new Bi({windowSize:s,inSize:o,batchSize:a,numSegments:i},e),u=c.outputShape,l=u[0],d=u[1],f=this.makeOutputArray([l,d],r);return this.compileAndRun(c,[t,n],f),f.shape[1]===i?f:(n=Ne(0,i).tile([o/s]),this.segOpCompute(f,e,n,r,i))},t.prototype.argMinMaxReduce=function(t,e,n){var r=[e];if(oe("arg"+n.charAt(0).toUpperCase()+n.slice(1),r,t.rank),!zt.get("WEBGL_PACK_REDUCE")||t.rank<=2){var i=ie(t.shape,r),a=i[0],o=k(i[1]),s=t.as2D(-1,o);return this.argReduce(s,n).reshape(a)}return this.argReducePacked(t,n)},t.prototype.argMin=function(t,e){return this.argMinMaxReduce(t,e,"min")},t.prototype.argMax=function(t,e){return this.argMinMaxReduce(t,e,"max")},t.prototype.cumsum=function(t,e,n,r){if(e!==t.rank-1)throw new Error("WebGL cumsum shader expects an inner-most axis="+(t.rank-1)+" but got axis="+e);var i=new Wn(t.shape,n,r);return this.compileAndRun(i,[t])},t.prototype.equal=function(t,e){if(zt.get("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(t,e,"\n return vec4(equal(a, b));\n","bool");var n=new Mn("return float(a == b);",t.shape,e.shape),r=this.makeOutputArray(n.outputShape,"bool");return this.compileAndRun(n,[t,e],r)},t.prototype.notEqual=function(t,e){if(zt.get("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(t,e,"\n return vec4(notEqual(a, b));\n","bool");var n=new Mn("return float(a != b);",t.shape,e.shape),r=this.makeOutputArray(n.outputShape,"bool");return this.compileAndRun(n,[t,e],r)},t.prototype.less=function(t,e){if(this.shouldExecuteOnCPU([t,e]))return this.cpuBackend.less(t,e);if(zt.get("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(t,e,"\n return vec4(lessThan(a, b));\n","bool");var n=new Mn("return float(a < b);",t.shape,e.shape),r=this.makeOutputArray(n.outputShape,"bool");return this.compileAndRun(n,[t,e],r)},t.prototype.lessEqual=function(t,e){if(zt.get("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(t,e,"\n return vec4(lessThanEqual(a, b));\n","bool");var n=new Mn("return float(a <= b);",t.shape,e.shape),r=this.makeOutputArray(n.outputShape,"bool");return this.compileAndRun(n,[t,e],r)},t.prototype.greater=function(t,e){if(this.shouldExecuteOnCPU([t,e]))return this.cpuBackend.greater(t,e);if(zt.get("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(t,e,"\n return vec4(greaterThan(a, b));\n","bool");var n=new Mn("return float(a > b);",t.shape,e.shape),r=this.makeOutputArray(n.outputShape,"bool");return this.compileAndRun(n,[t,e],r)},t.prototype.greaterEqual=function(t,e){if(zt.get("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(t,e,"\n return vec4(greaterThanEqual(a, b));\n","bool");var n=new Mn("return float(a >= b);",t.shape,e.shape),r=this.makeOutputArray(n.outputShape,"bool");return this.compileAndRun(n,[t,e],r)},t.prototype.logicalNot=function(t){var e=new Ji(t.shape,"return float(!(x >= 1.0));");return this.compileAndRun(e,[t])},t.prototype.logicalAnd=function(t,e){if(zt.get("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(t,e,"\n return vec4(\n vec4(greaterThanEqual(a, vec4(1.0))) *\n vec4(greaterThanEqual(b, vec4(1.0))));\n","bool");var n=new Mn("return float(a >= 1.0 && b >= 1.0);",t.shape,e.shape),r=this.makeOutputArray(n.outputShape,"bool");return this.compileAndRun(n,[t,e],r)},t.prototype.logicalOr=function(t,e){if(zt.get("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(t,e,"\n return min(\n vec4(greaterThanEqual(a, vec4(1.0))) +\n vec4(greaterThanEqual(b, vec4(1.0))),\n vec4(1.0));\n","bool");var n=new Mn("return float(a >= 1.0 || b >= 1.0);",t.shape,e.shape),r=this.makeOutputArray(n.outputShape,"bool");return this.compileAndRun(n,[t,e],r)},t.prototype.select=function(t,e,n){var r=new ji(t.rank,e.shape,e.rank),i=this.makeOutputArray(r.outputShape,wt(e.dtype,n.dtype));return this.compileAndRun(r,[t,e,n],i)},t.prototype.where=function(t){Jt("tf.where() in webgl locks the UI thread. Call tf.whereAsync() instead");var e=t.dataSync();return to(t.shape,e)},t.prototype.topk=function(t,e,n){return Ke(t.dataSync(),t.shape,t.dtype,e)},t.prototype.min=function(t,e){oe("min",e,t.rank);var n=ie(t.shape,e),r=n[0],i=k(n[1]),a=t.as2D(-1,i);return this.reduce(a,"min",a.dtype).reshape(r)},t.prototype.minimum=function(t,e){if(this.shouldExecuteOnCPU([t,e]))return this.cpuBackend.minimum(t,e);var n=zt.get("WEBGL_PACK_BINARY_OPERATIONS")?new Tn("\n vec4 result = vec4(min(a, b));\n vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));\n \n result.r = isNaN.r > 0. ? NAN : result.r;\n result.g = isNaN.g > 0. ? NAN : result.g;\n result.b = isNaN.b > 0. ? NAN : result.b;\n result.a = isNaN.a > 0. ? NAN : result.a;\n\n return result;\n",t.shape,e.shape):new Mn("\n if (isnan(a)) return a;\n if (isnan(b)) return b;\n\n return min(a, b);\n",t.shape,e.shape);return this.compileAndRun(n,[t,e])},t.prototype.mod=function(t,e){var n=zt.get("WEBGL_PACK_BINARY_OPERATIONS")?new Tn("\n vec4 result = mod(a, b);\n vec4 isNaN = vec4(equal(b, vec4(0.0)));\n \n result.r = isNaN.r > 0. ? NAN : result.r;\n result.g = isNaN.g > 0. ? NAN : result.g;\n result.b = isNaN.b > 0. ? NAN : result.b;\n result.a = isNaN.a > 0. ? NAN : result.a;\n\n return result;\n",t.shape,e.shape):new Mn("if (b == 0.0) return NAN;\n return mod(a, b);",t.shape,e.shape);return this.compileAndRun(n,[t,e])},t.prototype.max=function(t,e){if(this.shouldExecuteOnCPU([t]))return this.cpuBackend.max(t,e);oe("max",e,t.rank);var n=ie(t.shape,e),r=n[0],i=k(n[1]),a=t.as2D(-1,i);return this.reduce(a,"max",a.dtype).reshape(r)},t.prototype.maximum=function(t,e){if(this.shouldExecuteOnCPU([t,e]))return this.cpuBackend.maximum(t,e);var n=zt.get("WEBGL_PACK_BINARY_OPERATIONS")?new Tn("\n vec4 result = vec4(max(a, b));\n vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));\n \n result.r = isNaN.r > 0. ? NAN : result.r;\n result.g = isNaN.g > 0. ? NAN : result.g;\n result.b = isNaN.b > 0. ? NAN : result.b;\n result.a = isNaN.a > 0. ? NAN : result.a;\n\n return result;\n",t.shape,e.shape):new Mn("\n if (isnan(a)) return a;\n if (isnan(b)) return b;\n\n return max(a, b);\n",t.shape,e.shape);return this.compileAndRun(n,[t,e])},t.prototype.all=function(t,e){oe("all",e,t.rank);var n=ie(t.shape,e),r=n[0],i=k(n[1]),a=t.as2D(-1,i);return this.reduce(a,"all",a.dtype).reshape(r)},t.prototype.any=function(t,e){oe("any",e,t.rank);var n=ie(t.shape,e),r=n[0],i=k(n[1]),a=t.as2D(-1,i);return this.reduce(a,"any",a.dtype).reshape(r)},t.prototype.squaredDifference=function(t,e){var n=zt.get("WEBGL_PACK_BINARY_OPERATIONS")?new Tn("return (a - b) * (a - b);",t.shape,e.shape):new Mn("return (a - b) * (a - b);",t.shape,e.shape);return this.compileAndRun(n,[t,e])},t.prototype.realDivide=function(t,e){var n=new Mn("if (a == b) return 1.0;\n return a / b;",t.shape,e.shape),r=this.makeOutputArray(n.outputShape,"float32");return this.compileAndRun(n,[t,e],r)},t.prototype.floorDiv=function(t,e){if(zt.get("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(t,e,"\n vec4 resultSign = sign(a) * sign(b);\n ivec4 ia = round(a);\n ivec4 ib = round(b);\n ivec4 result = ia / ib;\n ivec4 amodb = ia - ib * result;\n\n // Vectorize INT_DIV\n // if (resultSign < 0.0 && amodb != 0) result -= 1;\n // return float(result);\n return vec4(result -\n ivec4(lessThan(resultSign, vec4(0.0))) * ivec4(notEqual(amodb, ivec4(0))));\n","int32");var n=new Mn("\n float resultSign = sign(a) * sign(b);\n int ia = round(a);\n int ib = round(b);\n int result = ia / ib;\n int amodb = ia - ib * result;\n\n if (resultSign < 0.0 && amodb != 0) {\n result -= 1;\n }\n return float(result);\n",t.shape,e.shape),r=this.makeOutputArray(n.outputShape,"int32");return this.compileAndRun(n,[t,e],r)},t.prototype.add=function(t,e){if("complex64"===t.dtype&&"complex64"===e.dtype)return this.complexSeparableBinaryOp(t,e,En);if(this.shouldExecuteOnCPU([t,e]))return this.cpuBackend.add(t,e);var n=wt(t.dtype,e.dtype);if(zt.get("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(t,e,En,n);var r=new Mn(En,t.shape,e.shape),i=this.makeOutputArray(r.outputShape,n);return this.compileAndRun(r,[t,e],i)},t.prototype.packedBinaryOp=function(t,e,n,r){var i=new Tn(n,t.shape,e.shape),a=this.makePackedTensor(i.outputShape,r);return this.compileAndRun(i,[t,e],a)},t.prototype.complexSeparableBinaryOp=function(t,e,n){var r=this,i=this.texData.get(t.dataId),a=this.texData.get(e.dataId),o=[[i.complexTensors.real,a.complexTensors.real],[i.complexTensors.imag,a.complexTensors.imag]].map(function(i){var a=i[0],o=i[1],s=r.makeComplexComponentTensorHandle(t,a),c=r.makeComplexComponentTensorHandle(e,o),u=new Mn(n,t.shape,e.shape),l=r.makeOutputArray(u.outputShape,wt(a.dtype,o.dtype));return r.compileAndRun(u,[s,c],l)}),s=o[0],c=o[1],u=this.complex(s,c);return s.dispose(),c.dispose(),u},t.prototype.makeComplexComponentTensorHandle=function(t,e){return{dataId:e.dataId,dtype:e.dtype,shape:t.shape}},t.prototype.addN=function(t){for(var e=t[0],n=1;n<t.length;n++)e=this.add(e,t[n]);return e},t.prototype.subtract=function(t,e){if("complex64"===t.dtype&&"complex64"===e.dtype)return this.complexSeparableBinaryOp(t,e,Sn);if(this.shouldExecuteOnCPU([t,e]))return this.cpuBackend.subtract(t,e);var n=wt(t.dtype,e.dtype);if(zt.get("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(t,e,Sn,t.dtype);var r=new Mn(Sn,t.shape,e.shape),i=this.makeOutputArray(r.outputShape,n);return this.compileAndRun(r,[t,e],i)},t.prototype.pow=function(t,e){var n=zt.get("WEBGL_PACK_BINARY_OPERATIONS"),r=n?new Tn("\n // isModRound1 has 1 for components with round(mod(b, 2.0)) == 1, 0 otherwise.\n vec4 isModRound1 = vec4(equal(round(mod(b, 2.0)), ivec4(1)));\n vec4 multiplier = sign(a) * isModRound1 + (vec4(1.0) - isModRound1);\n vec4 result = multiplier * pow(abs(a), b);\n\n vec4 isNaN = vec4(lessThan(a, vec4(0.0))) * vec4(lessThan(floor(b), b));\n \n result.r = isNaN.r > 0. ? NAN : result.r;\n result.g = isNaN.g > 0. ? NAN : result.g;\n result.b = isNaN.b > 0. ? NAN : result.b;\n result.a = isNaN.a > 0. ? NAN : result.a;\n\n return result;\n",t.shape,e.shape):new Mn("\nif(a < 0.0 && floor(b) < b){\n return NAN;\n}\nreturn (round(mod(b, 2.0)) != 1) ?\n pow(abs(a), b) : sign(a) * pow(abs(a), b);\n",t.shape,e.shape),i=wt(t.dtype,e.dtype),a=n?this.makePackedTensor(r.outputShape,i):this.makeOutputArray(r.outputShape,i);return this.compileAndRun(r,[t,e],a)},t.prototype.ceil=function(t){var e=new Ji(t.shape,"return ceil(x);");return this.compileAndRun(e,[t])},t.prototype.floor=function(t){var e=new Ji(t.shape,"return floor(x);");return this.compileAndRun(e,[t])},t.prototype.sign=function(t){var e=new Ji(t.shape,"\n if (isnan(x)) { return 0.0; }\n return sign(x);\n");return this.compileAndRun(e,[t])},t.prototype.isNaN=function(t){var e=new Ji(t.shape,"return float(isnan(x));"),n=this.makeOutputArray(e.outputShape,"bool");return this.compileAndRun(e,[t],n)},t.prototype.isInf=function(t){var e=new Ji(t.shape,"return float(isinf(x));"),n=this.makeOutputArray(e.outputShape,"bool");return this.compileAndRun(e,[t],n)},t.prototype.isFinite=function(t){var e=new Ji(t.shape,"return float(!isnan(x) && !isinf(x));"),n=this.makeOutputArray(e.outputShape,"bool");return this.compileAndRun(e,[t],n)},t.prototype.round=function(t){var e=new Ji(t.shape,"\n // OpenGL ES does not support round function.\n // The algorithm is based on banker's rounding.\n float base = floor(x);\n if ((x - base) < 0.5) {\n return floor(x);\n } else if ((x - base) > 0.5) {\n return ceil(x);\n } else {\n if (mod(base, 2.0) == 0.0) {\n return base;\n } else {\n return base + 1.0;\n }\n }\n");return this.compileAndRun(e,[t])},t.prototype.exp=function(t){var e;return e=zt.get("WEBGL_PACK")?new la(t.shape,na):new Ji(t.shape,na),this.compileAndRun(e,[t])},t.prototype.expm1=function(t){var e=new Ji(t.shape,"return exp(x) - 1.0;");return this.compileAndRun(e,[t])},t.prototype.log=function(t){var e;return e=zt.get("WEBGL_PACK")?new la(t.shape,"\n vec4 result = log(x);\n vec4 isNaN = vec4(lessThan(x, vec4(0.0)));\n result.r = isNaN.r == 1.0 ? NAN : result.r;\n result.g = isNaN.g == 1.0 ? NAN : result.g;\n result.b = isNaN.b == 1.0 ? NAN : result.b;\n result.a = isNaN.a == 1.0 ? NAN : result.a;\n\n return result;\n"):new Ji(t.shape,"if (x < 0.0) return NAN;\n return log(x);"),this.compileAndRun(e,[t])},t.prototype.log1p=function(t){var e=new Ji(t.shape,"return log(1.0 + x);");return this.compileAndRun(e,[t])},t.prototype.sqrt=function(t){var e=new Ji(t.shape,"return sqrt(x);");return this.compileAndRun(e,[t])},t.prototype.rsqrt=function(t){if(this.shouldExecuteOnCPU([t]))return this.cpuBackend.rsqrt(t);var e=new Ji(t.shape,"return inversesqrt(x);");return this.compileAndRun(e,[t])},t.prototype.square=function(t){var e=new Ji(t.shape,"return x * x;");return this.compileAndRun(e,[t])},t.prototype.reciprocal=function(t){var e=new Ji(t.shape,"return 1.0 / x;");return this.compileAndRun(e,[t])},t.prototype.relu=function(t){var e;return e=zt.get("WEBGL_PACK")?new la(t.shape,ua):new Ji(t.shape,ta),this.compileAndRun(e,[t])},t.prototype.prelu=function(t,e){var n=zt.get("WEBGL_PACK_BINARY_OPERATIONS")?new Tn("\n vec4 aLessThanZero = vec4(lessThan(a, vec4(0.)));\n return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a);\n",t.shape,e.shape):new Mn("return (a < 0.) ? b * a : a;",t.shape,e.shape);return this.compileAndRun(n,[t,e])},t.prototype.elu=function(t){var e=new Ji(t.shape,"return (x >= 0.0) ? x : (exp(x) - 1.0);");return this.compileAndRun(e,[t])},t.prototype.eluDer=function(t,e){var n=zt.get("WEBGL_PACK_BINARY_OPERATIONS")?new Tn("\n vec4 bGTEZero = vec4(greaterThanEqual(b, vec4(0.)));\n return (bGTEZero * a) + ((vec4(1.0) - bGTEZero) * (a * (b + vec4(1.0))));\n",t.shape,e.shape):new Mn("return (b >= 1.0) ? a : a * (b + 1.0);",t.shape,e.shape);return this.compileAndRun(n,[t,e])},t.prototype.selu=function(t){var e=new Ji(t.shape,ea);return this.compileAndRun(e,[t])},t.prototype.int=function(t){var e=new Ji(t.shape,"return float(int(x));"),n=this.makeOutputArray(e.outputShape,"int32");return this.compileAndRun(e,[t],n)},t.prototype.clip=function(t,e,n){var r,i=(r=zt.get("WEBGL_PACK_CLIP")?new Rn(t.shape):new Dn(t.shape)).getCustomSetupFunc(e,n);return this.compileAndRun(r,[t],null,i)},t.prototype.abs=function(t){var e=new Ji(t.shape,"return abs(x);");return this.compileAndRun(e,[t])},t.prototype.complexAbs=function(t){var e=this.texData.get(t.dataId),n=new Pn(t.shape),r=[this.makeComplexComponentTensorHandle(t,e.complexTensors.real),this.makeComplexComponentTensorHandle(t,e.complexTensors.imag)];return this.compileAndRun(n,r)},t.prototype.sigmoid=function(t){var e=new Ji(t.shape,"return 1.0 / (1.0 + exp(-1.0 * x));");return this.compileAndRun(e,[t])},t.prototype.softplus=function(t){var e=new Ji(t.shape,"\n float epsilon = 1.1920928955078125e-7;\n float threshold = log(epsilon) + 2.0;\n\n bool too_large = x > -threshold;\n bool too_small = x < threshold;\n\n float result;\n float exp_x = exp(x);\n\n if (too_large){\n result = x;\n }\n else if (too_small){\n result = exp_x;\n }\n else{\n result = log(exp_x + 1.0);\n }\n return result;\n");return this.compileAndRun(e,[t])},t.prototype.sin=function(t){var e=new Ji(t.shape,ra);return this.compileAndRun(e,[t])},t.prototype.cos=function(t){var e=new Ji(t.shape,ia);return this.compileAndRun(e,[t])},t.prototype.tan=function(t){var e=new Ji(t.shape,"return tan(x);");return this.compileAndRun(e,[t])},t.prototype.asin=function(t){var e=new Ji(t.shape,"return asin(x);");return this.compileAndRun(e,[t])},t.prototype.acos=function(t){var e=new Ji(t.shape,"return acos(x);");return this.compileAndRun(e,[t])},t.prototype.atan=function(t){var e=new Ji(t.shape,aa);return this.compileAndRun(e,[t])},t.prototype.atan2=function(t,e){var n=zt.get("WEBGL_PACK_BINARY_OPERATIONS")?new Tn("\n vec4 result = atan(a, b);\n vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));\n \n result.r = isNaN.r > 0. ? NAN : result.r;\n result.g = isNaN.g > 0. ? NAN : result.g;\n result.b = isNaN.b > 0. ? NAN : result.b;\n result.a = isNaN.a > 0. ? NAN : result.a;\n\n return result;\n",t.shape,e.shape):new Mn("\n if (isnan(a)) return a;\n if (isnan(b)) return b;\n\n return atan(a, b);\n",t.shape,e.shape);return this.compileAndRun(n,[t,e])},t.prototype.sinh=function(t){var e=new Ji(t.shape,"\n float e2x = exp(x);\n return (e2x - 1.0 / e2x) / 2.0;\n");return this.compileAndRun(e,[t])},t.prototype.cosh=function(t){var e=new Ji(t.shape,"\n float e2x = exp(-x);\n return (e2x + 1.0 / e2x) / 2.0;\n");return this.compileAndRun(e,[t])},t.prototype.tanh=function(t){var e=new Ji(t.shape,"\n float e2x = exp(-2.0 * abs(x));\n return sign(x) * (1.0 - e2x) / (1.0 + e2x);\n");return this.compileAndRun(e,[t])},t.prototype.asinh=function(t){var e=new Ji(t.shape,"return log(x + sqrt(x * x + 1.0));");return this.compileAndRun(e,[t])},t.prototype.acosh=function(t){var e=new Ji(t.shape,oa);return this.compileAndRun(e,[t])},t.prototype.atanh=function(t){var e=new Ji(t.shape,sa);return this.compileAndRun(e,[t])},t.prototype.erf=function(t){var e=new Ji(t.shape,'\n // Error function is calculated approximately with elementary function.\n // See "Handbook of Mathematical Functions with Formulas,\n // Graphs, and Mathematical Tables", Abramowitz and Stegun.\n float p = 0.3275911;\n float a1 = 0.254829592;\n float a2 = -0.284496736;\n float a3 = 1.421413741;\n float a4 = -1.453152027;\n float a5 = 1.061405429;\n\n float t = 1.0 / (1.0 + p * x);\n return 1.0 - (((((a5*t + a4)*t) + a3)*t + a2)*t + a1)*t*exp(-x*x);\n');return this.compileAndRun(e,[t])},t.prototype.step=function(t,e){var n=new Ji(t.shape,function(t){return void 0===t&&(t=0),Zi+"\n return x > 0.0 ? 1.0 : float("+t+");\n "}(e));return this.compileAndRun(n,[t])},t.prototype.conv2dByMatMul=function(t,e,n){var r=t.shape,i=this.texData.get(t.dataId),a=n.inChannels,o=r[0]*r[1]*r[2],s=n.outChannels,c=(1===o||1===s)&&a>1e3,u=r[2]%2!=0&&!!i.isPacked;if(c||!zt.get("WEBGL_LAZILY_UNPACK")||!zt.get("WEBGL_PACK_BINARY_OPERATIONS")||!u){var l=this.reshape(t,[1,r[0]*r[1]*r[2],n.inChannels]),d=this.reshape(e,[1,n.inChannels,n.outChannels]);return this.reshape(this.batchMatMul(l,d,!1,!1),n.outShape)}var f=ht.make([1,r[0]*r[1]*(r[2]+1),n.inChannels],{dataId:t.dataId},t.dtype,this),h=i.shape;i.shape=i.shape.slice(),i.shape[i.shape.length-2]++,b(Hr(i.shape,f.shape),function(){return"packed reshape "+i.shape+" to "+f.shape+" isn't free"});var p=this.reshape(e,[1,n.inChannels,n.outChannels]),m=this.batchMatMul(f,p,!1,!1),v=this.texData.get(m.dataId);return b(v.isPacked,function(){return"batchMatMul result is expected to be packed"}),i.shape=h,v.shape=n.outShape,ht.make(n.outShape,{dataId:m.dataId},m.dtype,this)},t.prototype.conv2dWithIm2Row=function(t,e,n){var r=n.filterWidth,i=n.filterHeight,a=n.inChannels,o=n.outWidth,s=n.outHeight,c=r*i*a,u=s*o,l=[c,u],d=t.squeeze([0]),f=e.reshape([1,c,-1]),h=new vi(l,d.shape,n),p=this.compileAndRun(h,[d]).reshape([1,l[0],l[1]]),m=new yi(p.shape,[1,u,n.outChannels],!0,!1);return this.compileAndRun(m,[p,f]).reshape([1,s,o,n.outChannels])},t.prototype.conv2d=function(t,e,n){if(1===n.filterHeight&&1===n.filterWidth&&1===n.dilationHeight&&1===n.dilationWidth&&1===n.strideHeight&&1===n.strideWidth&&("SAME"===n.padInfo.type||"VALID"===n.padInfo.type))return this.conv2dByMatMul(t,e,n);if(zt.get("WEBGL_CONV_IM2COL")&&1===t.shape[0])return this.conv2dWithIm2Row(t,e,n);var r=new $n(n);return this.compileAndRun(r,[t,e])},t.prototype.conv2dDerInput=function(t,e,n){var r=new Nn(n);return this.compileAndRun(r,[t,e])},t.prototype.conv2dDerFilter=function(t,e,n){var r=new An(n);return this.compileAndRun(r,[t,e])},t.prototype.depthwiseConv2D=function(t,e,n){var r;return zt.get("WEBGL_PACK_DEPTHWISECONV")&&n.strideWidth<=2&&n.outChannels/n.inChannels==1?(r=new Hn(n),this.compileAndRun(r,[t,e],this.makePackedTensor(n.outShape,t.dtype))):(r=new Vn(n),this.compileAndRun(r,[t,e]))},t.prototype.depthwiseConv2DDerInput=function(t,e,n){var r=new Yn(n);return this.compileAndRun(r,[t,e])},t.prototype.depthwiseConv2DDerFilter=function(t,e,n){var r=new Fn(n);return this.compileAndRun(r,[t,e])},t.prototype.conv3d=function(t,e,n){var r=new zn(n);return this.compileAndRun(r,[t,e])},t.prototype.conv3dDerInput=function(t,e,n){var r=new jn(n);return this.compileAndRun(r,[t,e])},t.prototype.conv3dDerFilter=function(t,e,n){var r=new Bn(n);return this.compileAndRun(r,[t,e])},t.prototype.maxPool=function(t,e){var n=new Si(e,"max",!1),r=this.makeOutputArray(n.outputShape,t.dtype);return this.compileAndRun(n,[t],r)},t.prototype.avgPool=function(t,e){var n=new Si(e,"avg",!1),r=this.makeOutputArray(n.outputShape,"float32");return this.compileAndRun(n,[t],r)},t.prototype.maxPoolBackprop=function(t,e,n,r){var i=new Si(r,"max",!0),a=this.compileAndRun(i,[e]),o=new bi(r),s=this.makeOutputArray(o.outputShape,e.dtype),c=this.compileAndRun(o,[t,a],s);return a.dispose(),c},t.prototype.avgPoolBackprop=function(t,e,n){var r=new bn(n),i=this.makeOutputArray(r.outputShape,e.dtype);return this.compileAndRun(r,[t],i)},t.prototype.cast=function(t,e){return Ye(t,e,this)},t.prototype.unstack=function(t,e){for(var n=t.shape[e],r=new Array(t.rank-1),i=0,a=0;a<t.rank;a++)a!==e&&(r[i++]=t.shape[a]);var o=new Array(t.rank).fill(0),s=t.shape.slice();s[e]=1;var c=new Array(n);for(a=0;a<c.length;a++)o[e]=a,c[a]=this.slice(t,o,s).reshape(r);return c},t.prototype.reshape=function(t,e){var n=this.texData.get(t.dataId);return!n.isPacked||Hr(t.shape,e)||null!==n.texture&&Hr(n.shape,e)?$e(t,e):this.packedReshape(t,e)},t.prototype.resizeBilinear=function(t,e,n,r){var i=zt.get("WEBGL_PACK_IMAGE_OPERATIONS")?new Ri(t.shape,e,n,r):new Di(t.shape,e,n,r);return this.compileAndRun(i,[t])},t.prototype.resizeBilinearBackprop=function(t,e,n){var r=new Ti(t,e,n);return this.compileAndRun(r,[t])},t.prototype.resizeNearestNeighbor=function(t,e,n,r){var i=new Oi(t.shape,e,n,r);return this.compileAndRun(i,[t])},t.prototype.resizeNearestNeighborBackprop=function(t,e,n){var r=new Pi(t,e,n);return this.compileAndRun(r,[t])},t.prototype.multinomial=function(t,e,n,r){var i=e?t:we(t),a=i.shape[0],o=i.shape[1],s=new xi(a,o,n),c=this.makeOutputArray(s.outputShape,"int32"),u=s.getCustomSetupFunc(r);return this.compileAndRun(s,[i],c,u)},t.prototype.oneHot=function(t,e,n,r){var i=new wi(t.size,e,n,r);return this.compileAndRun(i,[t])},t.prototype.nonMaxSuppression=function(t,e,n,r,i){return Jt("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead"),We(t.dataSync(),e.dataSync(),n,r,i)},t.prototype.cropAndResize=function(t,e,n,r,i,a){var o=new qn(t.shape,e.shape,r,i,a);return this.compileAndRun(o,[t,e,n])},t.prototype.depthToSpace=function(t,e,n){b(e>1,function(){return"blockSize should be > 1 for depthToSpace, but was: "+e});var r=t.shape[0],i="NHWC"===n?t.shape[1]:t.shape[2],a="NHWC"===n?t.shape[2]:t.shape[3],o="NHWC"===n?t.shape[3]:t.shape[1],s=i*e,c=a*e,u=o/(e*e),l=new Gn("NHWC"===n?[r,s,c,u]:[r,u,s,c],e,n);return this.compileAndRun(l,[t])},t.prototype.split=function(t,e,n){return Ge(t,e,n)},t.prototype.scatterND=function(t,e,n){var r=me(0,t,n),i=r.sliceRank,a=r.numUpdates,o=r.sliceSize,s=r.strides,c=r.outputSize,u=[c/o,o],l=t.reshape([a,i]),d=e.reshape([a,o]);if(0===c)return $e(Ie([]),n);var f=Me(0),h=new Ni(a,i,l.rank,d.rank,s,u);return this.compileAndRun(h,[d,l,f]).reshape(n)},t.prototype.sparseToDense=function(t,e,n,r){var i=me(0,t,n),a=i.sliceRank,o=i.numUpdates,s=i.strides,c=i.outputSize,u=new Ni(o,a,t.rank,e.rank,s,[c,1],!1);return this.compileAndRun(u,[e,t,r]).reshape(n)},t.prototype.fft=function(t){return this.fftImpl(t,!1)},t.prototype.ifft=function(t){return this.fftImpl(t,!0)},t.prototype.fftImpl=function(t,e){var n=this.texData.get(t.dataId),r=new Zn(Xn,t.shape,e),i=new Zn(Jn,t.shape,e),a=[this.makeComplexComponentTensorHandle(t,n.complexTensors.real),this.makeComplexComponentTensorHandle(t,n.complexTensors.imag)],o=this.compileAndRun(r,a),s=this.compileAndRun(i,a),c=this.complex(o,s).as2D(t.shape[0],t.shape[1]);return o.dispose(),s.dispose(),c},t.prototype.gatherND=function(t,e){var n=e.shape,r=n[n.length-1],i=de(t,e),a=i[0],o=i[1],s=i[2],c=i[3],u=e.reshape([o,r]),l=t.reshape([t.size/s,s]),d=new ir(r,c,[o,s]);return this.compileAndRun(d,[l,u]).reshape(a)},t.prototype.fill=function(t,e,n){if("string"===(n=n||H(e))){var r=L(n,k(t));return r.fill(e),ht.make(t,{values:r},n)}var i=new Qn(t,e),a=i.getCustomSetupFunc(e),o=this.makeOutputArray(t,n);return this.compileAndRun(i,[],o,a)},t.prototype.onesLike=function(t){if("string"===t.dtype)throw new Error("onesLike is not supported under string dtype");return this.fill(t.shape,1,t.dtype)},t.prototype.zerosLike=function(t){return this.fill(t.shape,"string"===t.dtype?"":0,t.dtype)},t.prototype.makeOutputArray=function(t,e){return ht.make(t,{},e,this)},t.prototype.makePackedTensor=function(t,e){var n=ht.make(t,{},e,this);return this.texData.get(n.dataId).isPacked=!0,n},t.prototype.unpackTensor=function(t){var e=new da(t.shape);return this.compileAndRun(e,[t],ht.make(e.outputShape,{},t.dtype,this))},t.prototype.packTensor=function(t){var e=new ki(t.shape);return this.compileAndRun(e,[t],this.makePackedTensor(t.shape,t.dtype))},t.prototype.packedReshape=function(t,e){var n=t.reshape([Yr(t.shape)].concat($r(t.shape))),r=[Yr(e)].concat($r(e)),i=new Mi(r,n.shape);return this.compileAndRun(i,[n]).reshape(e)},t.prototype.compileAndRun=function(t,e,n,r,i){var a=this;if(void 0===i&&(i=!0),null==n&&(n=t.usesPackedTextures?this.makePackedTensor(t.outputShape,e[0].dtype):this.makeOutputArray(t.outputShape,e[0].dtype)),0===n.size)return this.texData.get(n.dataId).values=O(n.dtype,0),n;var o=e.map(function(e){if("complex64"===e.dtype)throw new Error("GPGPUProgram does not support complex64 input. For complex64 dtypes, please separate the program into real and imaginary parts.");var n=a.texData.get(e.dataId);if(null==n.texture){if(!t.usesPackedTextures&&k(e.shape)<=zt.get("WEBGL_SIZE_UPLOAD_UNIFORM"))return{shape:e.shape,texData:null,isUniform:!0,uniformValues:a.readSync(e.dataId)};t.usesPackedTextures&&(n.isPacked=!0,n.shape=e.shape)}else if(!!n.isPacked!=!!t.usesPackedTextures)e=n.isPacked?a.unpackTensor(e):a.packTensor(e),n=a.texData.get(e.dataId);else if(n.isPacked&&!Hr(n.shape,e.shape)){var r=e,i=e.shape;e.shape=n.shape,e=a.packedReshape(e,i),n=a.texData.get(e.dataId),r.shape=i}return a.uploadToGPU(e.dataId),{shape:e.shape,texData:n,isUniform:!1}});this.uploadToGPU(n.dataId);var s,c={shape:n.shape,texData:this.texData.get(n.dataId),isUniform:!1},u=function(t,e,n){var r="";e.concat(n).forEach(function(t){var e=null!=t.texData&&null!=t.texData.slice&&t.texData.slice.flatOffset>0,n=t.isUniform?"uniform":t.texData.texShape;r+=t.shape+"_"+n+"_"+e});var i=t.userCode;return t.constructor.name+"_"+r+"_"+i}(t,o,c),l=this.getAndSaveBinary(u,function(){return function(t,e,n,r){var i=e.userCode,a=n.map(function(t,n){var r={logicalShape:t.shape,texShape:t.isUniform?null:t.texData.texShape,isUniform:t.isUniform,isPacked:!t.isUniform&&t.texData.isPacked,flatOffset:null};return null!=t.texData&&null!=t.texData.slice&&t.texData.slice.flatOffset>0&&(r.flatOffset=t.texData.slice.flatOffset),{name:e.variableNames[n],shapeInfo:r}}),o=a.map(function(t){return t.shapeInfo}),s={logicalShape:r.shape,texShape:r.texData.texShape,isUniform:!1,isPacked:r.texData.isPacked,flatOffset:null},c=on(a,s,i,e.usesPackedTextures),u=t.createProgram(c),l=null,d=null;1===zt.get("WEBGL_VERSION")&&(l=t.getUniformLocation(u,"INFINITY",!1),d=t.getUniformLocation(u,"NAN",!1));for(var f={},h=0;h<e.variableNames.length;h++){var p=e.variableNames[h];f[p]=t.getUniformLocation(u,p,!1),f["offset"+p]=t.getUniformLocation(u,"offset"+p,!1)}return{program:e,source:c,webGLProgram:u,uniformLocations:f,inShapeInfos:o,outShapeInfo:s,infLoc:l,nanLoc:d}}(a.gpgpu,t,o,c)}),d=null!=this.activeTimers;d&&(s=this.startTimer()),function(t,e,n,r,i){mi(e.inShapeInfos,n),mi([e.outShapeInfo],[r]);var a=r.texData.texture,o=r.texData.texShape;r.texData.isPacked?t.setOutputPackedMatrixTexture(a,o[0],o[1]):t.setOutputMatrixTexture(a,o[0],o[1]),t.setProgram(e.webGLProgram),1===zt.get("WEBGL_VERSION")&&(null!==e.infLoc&&t.gl.uniform1f(e.infLoc,1/0),null!==e.nanLoc&&t.gl.uniform1f(e.nanLoc,NaN)),n.forEach(function(n,r){var i=e.program.variableNames[r],a=e.uniformLocations[i],o=e.uniformLocations["offset"+i];if(null!=a)if(n.isUniform)if(k(n.shape)<2)t.gl.uniform1f(a,n.uniformValues[0]);else{var s=n.uniformValues;s instanceof Float32Array||(s=new Float32Array(s)),t.gl.uniform1fv(a,s)}else null!=n.texData.slice&&null!=o&&t.gl.uniform1i(o,n.texData.slice.flatOffset),t.setInputMatrixTexture(n.texData.texture,a,r)}),null!=i&&i(t,e.webGLProgram),t.executeProgram()}(this.gpgpu,l,o,c,r);var f=1024*zt.get("WEBGL_NUM_MB_BEFORE_PAGING");if(i&&this.numBytesInGPU>f)for(var h=this.numBytesInGPU-f;h>0&&this.lruDataGPU.length>0;){var p=this.lruDataGPU.shift(),m=this.texData.get(p),v=m.texShape,_=m.dtype;h-=this.computeBytes(v,_),this.read(p)}return d&&(s=this.endTimer(s),this.activeTimers.push({name:t.constructor.name,query:this.getQueryTime(s)})),zt.get("WEBGL_LAZILY_UNPACK")||!this.texData.get(n.dataId).isPacked||t.isPackShader?n:this.unpackTensor(n)},t.prototype.getAndSaveBinary=function(t,e){return t in this.binaryCache||(this.binaryCache[t]=e()),this.binaryCache[t]},t.prototype.getTextureManager=function(){return this.textureManager},t.prototype.dispose=function(){this.disposed||(this.textureManager.dispose(),this.canvas.remove(),null!=this.fromPixels2DContext&&this.fromPixels2DContext.canvas.remove(),this.gpgpuCreatedLocally&&(this.gpgpu.program=null,this.gpgpu.dispose()),this.disposed=!0)},t.prototype.floatPrecision=function(){var t=this;return Gt(function(){var e=zt.get("DEBUG");zt.set("DEBUG",!1);var n=t.abs(Me(1e-8)).dataSync()[0];return zt.set("DEBUG",e),n>0?32:16})},t.prototype.uploadToGPU=function(t){var e,n=this.texData.get(t),r=n.shape,i=n.dtype,a=n.values,o=n.texture,s=n.usage,c=n.isPacked;if(null==o){var u,l=null!=this.activeTimers;l&&(u=performance.now());var d=zr(r,c);n.texShape=d;var f=this.acquireTexture(t,d,s,i,c);if(n.texture=f,null!=a){if(c){var h=Yr(r),p=1,m=1;r.length&&(p=(e=$r(r))[0],m=e[1]),this.gpgpu.uploadMatrixToPackedTexture(f,h,p,m,d[0],d[1],ro(a))}else this.gpgpu.uploadMatrixToTexture(f,d[0],d[1],ro(a));n.values=null,l&&(this.uploadWaitMs+=performance.now()-u)}}else zt.get("WEBGL_NUM_MB_BEFORE_PAGING")<Number.POSITIVE_INFINITY&&this.lruDataGPU.indexOf(t)>=0&&(this.lruDataGPU.splice(this.lruDataGPU.indexOf(t),1),this.lruDataGPU.push(t))},t.prototype.convertAndCacheOnCPU=function(t,e){var n=this.texData.get(t),r=n.texture,i=n.texShape,a=n.dtype,o=n.usage,s=n.isPacked;return null!=r&&(this.releaseTexture(t,r,i,o,a,s),n.texture=null,n.texShape=null,n.isPacked=!1),n.usage=nr.UPLOAD,null!=e&&(n.values=function(t,e){if("float32"===e||"complex64"===e)return t;if("int32"===e||"bool"===e){for(var n="int32"===e?new Int32Array(t.length):new Uint8Array(t.length),r=0;r<n.length;++r)n[r]=Math.round(t[r]);return n}throw new Error("Unknown dtype "+e)}(e,a)),n.values},t.prototype.releaseTexture=function(t,e,n,r,i,a){if(zt.get("WEBGL_NUM_MB_BEFORE_PAGING")<Number.POSITIVE_INFINITY){var o=this.lruDataGPU.indexOf(t);o>=0&&this.lruDataGPU.splice(o,1)}this.numBytesInGPU-=this.computeBytes(n,i),this.textureManager.releaseTexture(e,n,r,a)},t.prototype.acquireTexture=function(t,e,n,r,i){return zt.get("WEBGL_NUM_MB_BEFORE_PAGING")<Number.POSITIVE_INFINITY&&this.lruDataGPU.push(t),this.numBytesInGPU+=this.computeBytes(e,r),this.textureManager.acquireTexture(e,n,i)},t.prototype.computeBytes=function(t,e){return t[0]*t[1]*F(e)},t}();function ro(t){return t instanceof Float32Array?t:new Float32Array(t)}zt.get("IS_BROWSER")&&zt.registerBackend("webgl",function(){return new no},2);var io=xe({abs_:function(t){var e=qt(t,"x","abs");return"complex64"===e.dtype?zt.engine.runKernel(function(t){return t.complexAbs(e)},{$x:e}):zt.engine.runKernel(function(t,n){var r=t.abs(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.mul(n.toFloat().step(-1))}}})}}),ao=xe({acos_:function(t){var e=qt(t,"x","acos");return zt.engine.runKernel(function(t,n){var r=t.acos(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.divStrict(Me(1).sub(n.toFloat().square()).sqrt()).neg()}}})}}),oo=xe({acosh_:function(t){var e=qt(t,"x","acosh");return zt.engine.runKernel(function(t,n){var r=t.acosh(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.divStrict(n.toFloat().square().sub(1).sqrt())}}})}}),so=xe({asin_:function(t){var e=qt(t,"x","asin");return zt.engine.runKernel(function(t,n){var r=t.asin(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.divStrict(Me(1).sub(n.toFloat().square()).sqrt())}}})}}),co=xe({asinh_:function(t){var e=qt(t,"x","asinh");return zt.engine.runKernel(function(t,n){var r=t.asinh(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.divStrict(Me(1).add(n.toFloat().square()).sqrt())}}})}}),uo=xe({atan_:function(t){var e=qt(t,"x","atan");return zt.engine.runKernel(function(t,n){var r=t.atan(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.div(n.toFloat().square().add(1))}}})}}),lo=xe({atanh_:function(t){var e=qt(t,"x","atanh");return zt.engine.runKernel(function(t,n){var r=t.atanh(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.div(Me(1).sub(n.toFloat().square()))}}})}}),fo=xe({ceil_:function(t){var e=qt(t,"x","ceil");return zt.engine.runKernel(function(t){return t.ceil(e)},{$x:e},function(t){return{$x:function(){return je(t)}}})}}),ho=xe({clipByValue_:function(t,e,n){var r=qt(t,"x","clipByValue");return b(e<=n,function(){return"Error in clip: min ("+e+") must be less than or equal to max ("+n+")."}),zt.engine.runKernel(function(t,i){var a=t.clip(r,e,n);return i([r]),a},{$x:r},function(t,r){var i=r[0];return{$x:function(){return t.where(i.greaterEqual(e).logicalAnd(i.lessEqual(n)),je(t))}}})}}),po=xe({cos_:function(t){var e=qt(t,"x","cos");return zt.engine.runKernel(function(t,n){var r=t.cos(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return n.toFloat().sin().neg().mul(t)}}})}}),mo=xe({cosh_:function(t){var e=qt(t,"x","cosh");return zt.engine.runKernel(function(t,n){var r=t.cosh(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return n.toFloat().sinh().mulStrict(t)}}})}}),vo=xe({erf_:function(t){var e=qt(t,"x","erf");return b("int32"===e.dtype||"float32"===e.dtype,function(){return"Input dtype must be `int32` or `float32`."}),"int32"===e.dtype&&(e=e.toFloat()),zt.engine.runKernel(function(t,n){var r=t.erf(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.mul(n.square().neg().exp().mul(2/Math.sqrt(Math.PI)))}}})}}),_o=xe({exp_:function(t){var e=qt(t,"x","exp");return zt.engine.runKernel(function(t,n){var r=t.exp(e);return n([r]),r},{$x:e},function(t,e){return{$x:function(){return t.mulStrict(e[0])}}})}}),go=xe({expm1_:function(t){var e=qt(t,"x","expm1");return zt.engine.runKernel(function(t,n){var r=t.expm1(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.mul(n.exp())}}})}}),bo=xe({floor_:function(t){var e=qt(t,"x","floor");return zt.engine.runKernel(function(t){return t.floor(e)},{$x:e},function(t){return{$x:function(){return je(t)}}})}}),yo=xe({log_:function(t){var e=qt(t,"x","log");return zt.engine.runKernel(function(t,n){var r=t.log(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.div(n.toFloat())}}})}}),xo=xe({log1p_:function(t){var e=qt(t,"x","log1p");return zt.engine.runKernel(function(t,n){var r=t.log1p(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.div(n.add(1))}}})}}),wo=xe({logSigmoid_:function(t){var e=qt(t,"x","logSigmoid");return zt.engine.runKernel(function(t,n){var r=t.softplus(e.neg()).neg();return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.mul(n.neg().sigmoid())}}})}}),ko=xe({neg_:function(t){var e=qt(t,"x","neg");return zt.engine.runKernel(function(t){return t.neg(e)},{$x:e},function(t){return{$x:function(){return t.neg()}}})}}),Co=xe({reciprocal_:function(t){var e=qt(t,"x","reciprocal");return zt.engine.runKernel(function(t,n){var r=t.reciprocal(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.div(n.square().neg())}}})}}),Eo=xe({round_:function(t){var e=qt(t,"x","round");return zt.engine.runKernel(function(t){return t.round(e)},{$x:e},function(t){return{$x:function(){return je(t)}}})}}),So=xe({rsqrt_:function(t){var e=qt(t,"x","rsqrt");return zt.engine.runKernel(function(t,n){var r=t.rsqrt(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.div(n.pow(1.5).mul(2)).neg()}}})}}),Io=xe({sigmoid_:function(t){var e=qt(t,"x","sigmoid");return zt.engine.runKernel(function(t,n){var r=t.sigmoid(e);return n([r]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.mul(n.mul(Me(1).sub(n)))}}})}}),Mo=xe({sign_:function(t){var e=qt(t,"x","sign");return zt.engine.runKernel(function(t){return t.sign(e)},{$x:e},function(t){return{$x:function(){return je(t)}}})}}),To=xe({isNaN_:function(t){var e=qt(t,"x","isNaN");return zt.engine.runKernel(function(t){return t.isNaN(e)},{$x:e},function(t){return{$x:function(){return je(t)}}})}}),Do=xe({isInf_:function(t){var e=qt(t,"x","isInf");return zt.engine.runKernel(function(t){return t.isInf(e)},{$x:e},function(t){return{$x:function(){return je(t)}}})}}),Ro=xe({isFinite_:function(t){var e=qt(t,"x","isFinite");return zt.engine.runKernel(function(t){return t.isFinite(e)},{$x:e},function(t){return{$x:function(){return je(t)}}})}}),Po=xe({sin_:function(t){var e=qt(t,"x","sin");return zt.engine.runKernel(function(t,n){var r=t.sin(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return n.toFloat().cos().mul(t)}}})}}),Oo=xe({sinh_:function(t){var e=qt(t,"x","sinh");return zt.engine.runKernel(function(t,n){var r=t.sinh(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return n.toFloat().cosh().mulStrict(t)}}})}}),Lo=xe({softplus_:function(t){var e=qt(t,"x","softplus");return zt.engine.runKernel(function(t,n){var r=t.softplus(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.mul(n.sigmoid())}}})}}),Ao=xe({sqrt_:function(t){var e=qt(t,"x","sqrt");return zt.engine.runKernel(function(t,n){var r=t.sqrt(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.div(n.toFloat().sqrt().mul(2))}}})}}),No=xe({square_:function(t){var e=qt(t,"x","square");return zt.engine.runKernel(function(t,n){return n([e]),t.square(e)},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.mul(n.toFloat().mul(2))}}})}}),Bo=xe({step_:function(t,e){void 0===e&&(e=0);var n=qt(t,"x","step");return zt.engine.runKernel(function(t){return t.step(n,e)},{$x:n},function(t){return{$x:function(){return je(t)}}})}}),jo=xe({tan_:function(t){var e=qt(t,"x","tan");return zt.engine.runKernel(function(t,n){var r=t.tan(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.div(n.cos().square())}}})}}),Fo=xe({tanh_:function(t){var e=qt(t,"x","tanh");return zt.engine.runKernel(function(t,n){var r=t.tanh(e);return n([r]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return Me(1).sub(n.square()).mulStrict(t)}}})}});function Yo(t,e,n,r,i,a){var o,s,c=qt(t,"x","batchNorm"),u=qt(e,"mean","batchNorm"),l=qt(n,"variance","batchNorm");return null!=i&&(o=qt(i,"scale","batchNorm")),null!=r&&(s=qt(r,"offset","batchNorm")),b(2===c.rank,function(){return"Error in batchNorm3D: x must be rank 3 but got rank "+c.rank+"."}),b(2===u.rank||1===u.rank,function(){return"Error in batchNorm2D: mean must be rank 2 or rank 1 but got rank "+u.rank+"."}),b(2===l.rank||1===l.rank,function(){return"Error in batchNorm2D: variance must be rank 2 or rank 1 but got rank "+l.rank+"."}),null!=o&&b(2===o.rank||1===o.rank,function(){return"Error in batchNorm2D: scale must be rank 2 or rank 1 but got rank "+o.rank+"."}),null!=s&&b(2===s.rank||1===s.rank,function(){return"Error in batchNorm2D: offset must be rank 2 or rank 1 but got rank "+s.rank+"."}),Vo(c,u,l,s,o,a)}function $o(t,e,n,r,i,a){var o,s,c=qt(t,"x","batchNorm"),u=qt(e,"mean","batchNorm"),l=qt(n,"variance","batchNorm");return null!=i&&(o=qt(i,"scale","batchNorm")),null!=r&&(s=qt(r,"offset","batchNorm")),b(3===c.rank,function(){return"Error in batchNorm3D: x must be rank 3 but got rank "+c.rank+"."}),b(3===u.rank||1===u.rank,function(){return"Error in batchNorm3D: mean must be rank 3 or rank 1 but got rank "+u.rank+"."}),b(3===l.rank||1===l.rank,function(){return"Error in batchNorm3D: variance must be rank 3 or rank 1 but got rank "+l.rank+"."}),null!=o&&b(3===o.rank||1===o.rank,function(){return"Error in batchNorm3D: scale must be rank 3 or rank 1 but got rank "+o.rank+"."}),null!=s&&b(3===s.rank||1===s.rank,function(){return"Error in batchNorm3D: offset must be rank 3 or rank 1 but got rank "+s.rank+"."}),Vo(c,u,l,s,o,a)}function zo(t,e,n,r,i,a){var o,s,c=qt(t,"x","batchNorm"),u=qt(e,"mean","batchNorm"),l=qt(n,"variance","batchNorm");return null!=i&&(o=qt(i,"scale","batchNorm")),null!=r&&(s=qt(r,"offset","batchNorm")),b(4===c.rank,function(){return"Error in batchNorm4D: x must be rank 4 but got rank "+c.rank+"."}),b(4===u.rank||1===u.rank,function(){return"Error in batchNorm4D: mean must be rank 4 or rank 1 but got rank "+u.rank+"."}),b(4===l.rank||1===l.rank,function(){return"Error in batchNorm4D: variance must be rank 4 or rank 1 but got rank "+l.rank+"."}),null!=o&&b(4===o.rank||1===o.rank,function(){return"Error in batchNorm4D: scale must be rank 4 or rank 1 but got rank "+o.rank+"."}),null!=s&&b(4===s.rank||1===s.rank,function(){return"Error in batchNorm4D: offset must be rank 4 or rank 1 but got rank "+s.rank+"."}),Vo(c,u,l,s,o,a)}function Vo(t,e,n,r,i,a){null==a&&(a=.001);var o,s,c,u=qt(t,"x","batchNorm"),l=qt(e,"mean","batchNorm"),d=qt(n,"variance","batchNorm");return null!=i&&(o=qt(i,"scale","batchNorm")),null!=r&&(s=qt(r,"offset","batchNorm")),b(l.rank===d.rank,function(){return"Batch normalization gradient requires mean and variance to have equal ranks."}),b(null==s||l.rank===s.rank,function(){return"Batch normalization gradient requires mean and offset to have equal ranks."}),b(null==o||l.rank===o.rank,function(){return"Batch normalization gradient requires mean and scale to have equal ranks."}),c=0===u.rank||1===u.rank?u.as4D(1,1,1,u.size):2===u.rank?u.as4D(1,1,u.shape[0],u.shape[1]):3===u.rank?u.as4D(1,u.shape[0],u.shape[1],u.shape[2]):u,zt.engine.runKernel(function(t,e){var n=t.batchNormalization(c,Ho(l),Ho(d),a,Ho(o),Ho(s));return e([u,l,d,o]),n},{$x:u,$mean:l,$variance:d,$scale:o,$offset:s},function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],s=null==o?Me(1):o,u=tn(r.shape,c.shape),l=[];if(1===r.rank){for(var d=0;d<c.shape.length-1;++d)l.push(c.shape[d]);l.push(1)}var f=n.sub(r),h=t.mul(s),p=So(i.add(Me(a))),m=p.mul(p).mul(p).mul(Me(-.5));return{$x:function(){return 1===r.rank?t.mul(Xa(p.as4D(1,1,1,r.shape[0]),l)).mul(s).reshape(n.shape):t.mul(p).mul(s).reshape(n.shape)},$mean:function(){var t=p.mul(Me(-1)).mul(h);return 1===r.rank&&(t=t.sum(u)),t.reshape(r.shape)},$variance:function(){var t=m.mul(f).mul(h);return 1===r.rank&&(t=t.sum(u)),t.reshape(r.shape)},$scale:function(){var e=f.mul(p),n=t.mul(e);return 1===r.rank&&(n=n.sum(u)),n.reshape(r.shape)},$offset:function(){var e=t;return 1===r.rank&&(e=e.sum(u)),e.reshape(r.shape)}}}).reshape(u.shape)}function Ho(t){return null==t?null:0===t.rank?t.as1D():1===t.rank?t:2===t.rank?t.as4D(1,1,t.shape[0],t.shape[1]):3===t.rank?t.as4D(1,t.shape[0],t.shape[1],t.shape[2]):t}function qo(){$t("tf.batchNormalization() is going away. Use tf.batchNorm() instead, and note the positional argument change of scale, offset, and varianceEpsilon")}var Wo=xe({batchNormalization2d_:function(t,e,n,r,i,a){return void 0===r&&(r=.001),qo(),Yo(t,e,n,a,i,r)}}),Uo=xe({batchNormalization3d_:function(t,e,n,r,i,a){return void 0===r&&(r=.001),qo(),$o(t,e,n,a,i,r)}}),Go=xe({batchNormalization4d_:function(t,e,n,r,i,a){return void 0===r&&(r=.001),qo(),zo(t,e,n,a,i,r)}}),Ko=xe({batchNormalization_:function(t,e,n,r,i,a){return void 0===r&&(r=.001),qo(),Vo(t,e,n,a,i,r)}}),Xo=xe({batchNorm_:Vo}),Jo=xe({batchNorm2d_:Yo}),Zo=xe({batchNorm3d_:$o}),Qo=xe({batchNorm4d_:zo});function ts(t,e,n,r,i,a,o){void 0===o&&(o="channelsLast");var s,c=rs(e),u=c[0],l=c[1];if("channelsLast"===o)s=[u,l,t[3],t[3]];else{if("channelsFirst"!==o)throw new Error("Unknown dataFormat "+o);s=[u,l,t[1],t[1]]}return es(t,s,n,r,i,a,!1,o)}function es(t,e,n,r,i,a,o,s){void 0===o&&(o=!1),void 0===s&&(s="channelsLast");var c=[-1,-1,-1,-1],u=c[0],l=c[1],d=c[2],f=c[3];if("channelsLast"===s)u=t[0],l=t[1],d=t[2],f=t[3];else{if("channelsFirst"!==s)throw new Error("Unknown dataFormat "+s);u=t[0],f=t[1],l=t[2],d=t[3]}var h,p=e[0],m=e[1],v=e[3],_=rs(n),g=_[0],y=_[1],x=rs(r),w=x[0],k=x[1],C=as(p,w),S=as(m,k),I=function(t,e,n,r,i,a,o,s){var c,u,l;if("number"==typeof t){c={top:t,bottom:t,left:t,right:t,type:0===t?"VALID":"NUMBER"};var d=function(t,e,n,r,i,a){null==i&&(i=function(t,e,n,r){void 0===r&&(r=1);var i=as(e,r);return Math.floor((t[0]*(n-1)-n+i)/2)}(t,e,r));var o=t[0],s=t[1],c=os((o-e+2*i)/r+1,a);b(E(c),function(){return"The output # of rows ("+c+") must be an integer. Change the stride and/or zero pad parameters"});var u=os((s-e+2*i)/r+1,a);return b(E(u),function(){return"The output # of columns ("+u+") must be an integer. Change the stride and/or zero pad parameters"}),[c,u,n]}([e,n,1],a,1,r,t,s);u=d[0],l=d[1]}else if("same"===t){u=Math.ceil(e/r),l=Math.ceil(n/i);var f=Math.max(0,(u-1)*r+a-e),h=Math.max(0,(l-1)*i+o-n),p=Math.floor(f/2),m=f-p,v=Math.floor(h/2);c={top:p,bottom:m,left:v,right:h-v,type:"SAME"}}else{if("valid"!==t)throw Error("Unknown padding parameter: "+t);c={top:0,bottom:0,left:0,right:0,type:"VALID"},u=Math.ceil((e-a+1)/r),l=Math.ceil((n-o+1)/i)}return{padInfo:c,outHeight:u,outWidth:l}}(i,l,d,g,y,C,S,a),M=I.padInfo,T=I.outHeight,D=I.outWidth,R=o?v*f:v;return"channelsFirst"===s?h=[u,R,T,D]:"channelsLast"===s&&(h=[u,T,D,R]),{batchSize:u,dataFormat:s,inHeight:l,inWidth:d,inChannels:f,outHeight:T,outWidth:D,outChannels:R,padInfo:M,strideHeight:g,strideWidth:y,filterHeight:p,filterWidth:m,effectiveFilterHeight:C,effectiveFilterWidth:S,dilationHeight:w,dilationWidth:k,inShape:t,outShape:h,filterShape:e}}function ns(t,e,n,r,i,a,o){void 0===a&&(a=!1),void 0===o&&(o="channelsLast");var s=[-1,-1,-1,-1,-1],c=s[0],u=s[1],l=s[2],d=s[3],f=s[4];if("channelsLast"===o)c=t[0],u=t[1],l=t[2],d=t[3],f=t[4];else{if("channelsFirst"!==o)throw new Error("Unknown dataFormat "+o);c=t[0],f=t[1],u=t[2],l=t[3],d=t[4]}var h,p=e[0],m=e[1],v=e[2],_=e[4],g=is(n),b=g[0],y=g[1],x=g[2],w=is(r),k=w[0],C=w[1],E=w[2],S=function(t,e,n,r,i,a,o,s,c,u){var l,d,f,h;if("same"===t){var p=((d=Math.ceil(e/i))-1)*i+s-e,m=((f=Math.ceil(n/a))-1)*a+c-n,v=((h=Math.ceil(r/o))-1)*o+u-r,_=Math.floor(p/2),g=p-_,b=Math.floor(m/2),y=m-b,x=Math.floor(v/2);l={top:b,bottom:y,left:x,right:v-x,front:_,back:g,type:"SAME"}}else{if("valid"!==t)throw Error("Unknown padding parameter: "+t);l={top:0,bottom:0,left:0,right:0,front:0,back:0,type:"VALID"},d=Math.ceil((e-s+1)/i),f=Math.ceil((n-c+1)/a),h=Math.ceil((r-u+1)/o)}return{padInfo:l,outDepth:d,outHeight:f,outWidth:h}}(i,u,l,d,b,y,x,as(p,k),as(m,C),as(v,E)),I=S.padInfo,M=S.outDepth,T=S.outHeight,D=S.outWidth,R=a?_*f:_;return"channelsFirst"===o?h=[c,R,M,T,D]:"channelsLast"===o&&(h=[c,M,T,D,R]),{batchSize:c,dataFormat:o,inDepth:u,inHeight:l,inWidth:d,inChannels:f,outDepth:M,outHeight:T,outWidth:D,outChannels:R,padInfo:I,strideDepth:b,strideHeight:y,strideWidth:x,filterDepth:p,filterHeight:m,filterWidth:v,dilationDepth:k,dilationHeight:C,dilationWidth:E,inShape:t,outShape:h,filterShape:e}}function rs(t){return"number"==typeof t?[t,t]:t}function is(t){return"number"==typeof t?[t,t,t]:t}function as(t,e){return e<=1?t:t+(t-1)*(e-1)}function os(t,e){if(!e)return t;switch(e){case"round":return Math.round(t);case"ceil":return Math.ceil(t);case"floor":return Math.floor(t);default:throw new Error("Unknown roundingMode "+e)}}function ss(t){var e=rs(t),n=e[0],r=e[1];return 1===n&&1===r}function cs(t,e){return ss(t)||ss(e)}function us(t,e,n,r,i,a){b(t.length===e.rank,function(){return"Length of inShape ("+t.length+") and rank of dy ("+e.rank+") must match"});var o=t,s=e,c=!1;3===e.rank&&(c=!0,s=e.as4D(1,e.shape[0],e.shape[1],e.shape[2]),o=[1,t[0],t[1],t[2]]);var u=o[3],l=s.shape[3];b(4===o.length,function(){return"Error in conv2dDerInput: inShape must be length 4, but got length "+o.length+"."}),b(4===s.rank,function(){return"Error in conv2dDerInput: dy must be rank 4, but got rank "+s.rank}),b(4===n.rank,function(){return"Error in conv2dDerInput: filter must be rank 4, but got rank "+n.rank}),b(u===n.shape[2],function(){return"Error in conv2dDerInput: depth of input ("+u+") must match input depth for filter "+n.shape[2]+"."}),b(l===n.shape[3],function(){return"Error in conv2dDerInput: depth of output ("+l+") must match output depth for filter "+n.shape[3]+"."}),null!=a&&b(E(i),function(){return"Error in conv2dDerInput: pad must be an integer when using, dimRoundingMode "+a+" but got pad "+i+"."});var d=es(o,n.shape,r,1,i,a),f=zt.engine.runKernel(function(t,e){var r=t.conv2dDerInput(s,n,d);return e([n,s]),r},{dy4D:s,filter:n},function(t,e){var n=e[0],o=e[1];return{dy4D:function(){return hs(t,n,r,i,"NHWC",1,a)},filter:function(){return ms(t,o,n.shape,r,i,a)}}});return c?f.as3D(f.shape[1],f.shape[2],f.shape[3]):f}function ls(t,e,n,r,i,a){var o=t;3===t.rank&&(o=t.as4D(1,t.shape[0],t.shape[1],t.shape[2]));var s=e;3===s.rank&&(s=e.as4D(1,e.shape[0],e.shape[1],e.shape[2])),b(4===o.rank,function(){return"Error in conv2dDerFilter: input must be rank 4, but got shape "+o.shape+"."}),b(4===s.rank,function(){return"Error in conv2dDerFilter: dy must be rank 4, but got shape "+s.shape+"."}),b(4===n.length,function(){return"Error in conv2dDerFilter: filterShape must be length 4, but got "+n+"."}),b(o.shape[3]===n[2],function(){return"Error in conv2dDerFilter: depth of input "+o.shape[3]+") must match input depth in filter ("+n[2]+"."}),b(s.shape[3]===n[3],function(){return"Error in conv2dDerFilter: depth of dy ("+s.shape[3]+") must match output depth for filter ("+n[3]+")."}),null!=a&&b(E(i),function(){return"Error in conv2dDerFilter: pad must be an integer when using, dimRoundingMode "+a+" but got pad "+i+"."});var c=es(o.shape,n,r,1,i,a);return zt.engine.runKernel(function(t){return t.conv2dDerFilter(o,s,c)},{x4D:o,dy4D:s})}function ds(t){var e=function(t){return"number"==typeof t?[t,t,t]:2===t.length?[t[0],t[1],1]:t}(t),n=e[0],r=e[1],i=e[2];return 1===n&&1===r&&1===i}var fs=xe({conv1d_:function(t,e,n,r,i,a,o){void 0===i&&(i="NWC"),void 0===a&&(a=1);var s=qt(t,"x","conv1d"),c=qt(e,"filter","conv1d"),u=s,l=!1;2===s.rank&&(l=!0,u=s.as3D(1,s.shape[0],s.shape[1])),b(3===u.rank,function(){return"Error in conv1d: input must be rank 3, but got rank "+u.rank+"."}),b(3===c.rank,function(){return"Error in conv1d: filter must be rank 3, but got rank "+c.rank+"."}),null!=o&&b(E(r),function(){return"Error in conv1d: pad must be an integer when using, dimRoundingMode "+o+" but got pad "+r+"."}),b(u.shape[2]===c.shape[1],function(){return"Error in conv1d: depth of input ("+u.shape[2]+") must match input depth for filter "+c.shape[1]+"."}),b(cs(n,a),function(){return"Error in conv1D: Either stride or dilation must be 1. Got stride "+n+" and dilation '"+a+"'"}),b("NWC"===i,function(){return"Error in conv1d: got dataFormat of "+i+" but only NWC is currently supported."});var d=c.as4D(1,c.shape[0],c.shape[1],c.shape[2]),f=u.as4D(u.shape[0],1,u.shape[1],u.shape[2]),h=hs(f,d,[1,n],r,"NHWC",[1,a],o);return l?h.as2D(h.shape[2],h.shape[3]):h.as3D(h.shape[0],h.shape[2],h.shape[3])}}),hs=xe({conv2d_:function(t,e,n,r,i,a,o){void 0===i&&(i="NHWC"),void 0===a&&(a=[1,1]);var s=qt(t,"x","conv2d"),c=qt(e,"filter","conv2d"),u=s,l=!1;3===s.rank&&(l=!0,u=s.as4D(1,s.shape[0],s.shape[1],s.shape[2])),b(4===u.rank,function(){return"Error in conv2d: input must be rank 4, but got rank "+u.rank+"."}),b(4===c.rank,function(){return"Error in conv2d: filter must be rank 4, but got rank "+c.rank+"."}),null!=o&&b(E(r),function(){return"Error in conv2d: pad must be an integer when using, dimRoundingMode "+o+" but got pad "+r+"."}),b(u.shape[3]===c.shape[2],function(){return"Error in conv2d: depth of input ("+u.shape[3]+") must match input depth for filter "+c.shape[2]+"."}),b(cs(n,a),function(){return"Error in conv2D: Either strides or dilations must be 1. Got strides "+n+" and dilations '"+a+"'"}),b("NHWC"===i,function(){return"Error in conv2d: got dataFormat of "+i+" but only NHWC is currently supported."});var d=es(u.shape,c.shape,n,a,r,o),f=zt.engine.runKernel(function(t,e){var n=t.conv2d(u,c,d);return e([c,u]),n},{x:u,$filter:c},function(t,e){var i=e,o=i[0],s=i[1];return b(ss(a),function(){return"Error in gradient of conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '"+a+"'"}),{x:function(){return us(s.shape,t,o,n,r)},$filter:function(){return ls(s,t,o.shape,n,r)}}});return l?f.as3D(f.shape[1],f.shape[2],f.shape[3]):f}}),ps=xe({conv3d_:function(t,e,n,r,i,a){void 0===i&&(i="NHWC"),void 0===a&&(a=[1,1,1]);var o=qt(t,"x","conv3d"),s=qt(e,"filter","conv3d"),c=o,u=!1;4===o.rank&&(u=!0,c=o.as5D(1,o.shape[0],o.shape[1],o.shape[2],o.shape[3])),b(5===c.rank,function(){return"Error in conv3d: input must be rank 5, but got rank "+c.rank+"."}),b(5===s.rank,function(){return"Error in conv3d: filter must be rank 5, but got rank "+s.rank+"."}),b(c.shape[4]===s.shape[3],function(){return"Error in conv3d: depth of input ("+c.shape[4]+") must match input depth for filter "+s.shape[3]+"."}),b(function(t,e){return ds(t)||ds(e)}(n,a),function(){return"Error in conv3D: Either strides or dilations must be 1. Got strides "+n+" and dilations '"+a+"'"}),b("NHWC"===i,function(){return"Error in conv3d: got dataFormat of "+i+" but only NHWC is currently supported."});var l=ns(c.shape,s.shape,n,a,r),d=zt.engine.runKernel(function(t,e){var n=t.conv3d(c,s,l);return e([c,s]),n},{x:c,$filter:s},function(t,e){b(ds(a),function(){return"Error in gradient of conv3D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '"+a+"'"});var i=e[0],o=e[1];return{x:function(){return function(t,e,n,r,i){b(t.length===e.rank,function(){return"Length of inShape ("+t.length+") and rank of dy ("+e.rank+") must match"});var a=t,o=e,s=!1;4===e.rank&&(s=!0,o=e.as5D(1,e.shape[0],e.shape[1],e.shape[2],e.shape[3]),a=[1,t[0],t[1],t[2],t[3]]);var c=a[4],u=o.shape[4];b(5===a.length,function(){return"Error in conv3dDerInput: inShape must be length 5, but got length "+a.length+"."}),b(5===o.rank,function(){return"Error in conv3dDerInput: dy must be rank 5, but got rank "+o.rank}),b(5===n.rank,function(){return"Error in conv3dDerInput: filter must be rank 5, but got rank "+n.rank}),b(c===n.shape[3],function(){return"Error in conv3dDerInput: depth of input ("+c+") must match input depth for filter "+n.shape[3]+"."}),b(u===n.shape[4],function(){return"Error in conv3dDerInput: depth of output ("+u+") must match output depth for filter "+n.shape[4]+"."});var l=ns(a,n.shape,r,1,i),d=zt.engine.runKernel(function(t){return t.conv3dDerInput(o,n,l)},{dy5D:o});return s?d.as4D(d.shape[1],d.shape[2],d.shape[3],d.shape[4]):d}(i.shape,t,o,n,r)},$filter:function(){return function(t,e,n,r,i){var a=t;4===t.rank&&(a=t.as5D(1,t.shape[0],t.shape[1],t.shape[2],t.shape[3]));var o=e;4===o.rank&&(o=e.as5D(1,e.shape[0],e.shape[1],e.shape[2],e.shape[3])),b(5===a.rank,function(){return"Error in conv3dDerFilter: input must be rank 5, but got shape "+a.shape+"."}),b(5===o.rank,function(){return"Error in conv3dDerFilter: dy must be rank 5, but got shape "+o.shape+"."}),b(5===n.length,function(){return"Error in conv3dDerFilter: filterShape must be length 5, but got "+n+"."}),b(a.shape[4]===n[3],function(){return"Error in conv3dDerFilter: depth of input "+a.shape[4]+") must match input depth in filter ("+n[3]+"."}),b(o.shape[4]===n[4],function(){return"Error in conv3dDerFilter: depth of dy ("+o.shape[4]+") must match output depth for filter ("+n[4]+")."});var s=ns(a.shape,n,r,1,i);return zt.engine.runKernel(function(t){return t.conv3dDerFilter(a,o,s)},{x5D:a,dy5D:o})}(i,t,o.shape,n,r)}}});return u?d.as4D(d.shape[1],d.shape[2],d.shape[3],d.shape[4]):d}}),ms=xe({conv2dDerFilter_:ls}),vs=xe({depthwiseConv2d_:function(t,e,n,r,i,a,o){void 0===i&&(i="NHWC"),void 0===a&&(a=[1,1]);var s=qt(t,"x","depthwiseConv2d"),c=qt(e,"filter","depthwiseConv2d"),u=s,l=!1;3===s.rank&&(l=!0,u=s.as4D(1,s.shape[0],s.shape[1],s.shape[2])),b(4===u.rank,function(){return"Error in depthwiseConv2d: input must be rank 4, but got rank "+u.rank+"."}),b(4===c.rank,function(){return"Error in depthwiseConv2d: filter must be rank 4, but got rank "+c.rank+"."}),b(u.shape[3]===c.shape[2],function(){return"Error in depthwiseConv2d: number of input channels ("+u.shape[3]+") must match the inChannels dimension in filter "+c.shape[2]+"."}),null==a&&(a=[1,1]),b(cs(n,a),function(){return"Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides "+n+" and dilations '"+a+"'"}),null!=o&&b(E(r),function(){return"Error in depthwiseConv2d: pad must be an integer when using, dimRoundingMode "+o+" but got pad "+r+"."});var d=es(u.shape,c.shape,n,a,r,o,!0),f=zt.engine.runKernel(function(t,e){var n=t.depthwiseConv2D(u,c,d);return e([u,c]),n},{x:u,$filter:c},function(t,e){b(ss(a),function(){return"Error in gradient of depthwiseConv2d: dilation rates greater than 1 are not yet supported. Got dilations '"+a+"'"});var n=e[0],r=e[1];return{x:function(){return function(t,e,n,r){var i=e,a=!1;3===e.rank&&(a=!0,i=e.as4D(1,e.shape[0],e.shape[1],e.shape[2]));var o=zt.engine.runKernel(function(t){return t.depthwiseConv2DDerInput(i,n,r)},{dy4D:i});return a?o.as3D(o.shape[1],o.shape[2],o.shape[3]):o}(n.shape,t,r,d)},$filter:function(){return function(t,e,n,r){var i=t;3===t.rank&&(i=t.as4D(1,t.shape[0],t.shape[1],t.shape[2]));var a=e;return 3===a.rank&&(a=e.as4D(1,e.shape[0],e.shape[1],e.shape[2])),zt.engine.runKernel(function(t){return t.depthwiseConv2DDerFilter(i,a,r)},{x4D:i,dy4D:a})}(n,t,r.shape,d)}}});return l?f.as3D(f.shape[1],f.shape[2],f.shape[3]):f}}),_s=xe({separableConv2d_:function(t,e,n,r,i,a,o){void 0===a&&(a=[1,1]),void 0===o&&(o="NHWC");var s=qt(t,"x","separableConv2d"),c=qt(e,"depthwiseFilter","separableConv2d"),u=qt(n,"pointwiseFilter","separableConv2d"),l=s,d=!1;if(3===s.rank&&(d=!0,l=s.as4D(1,s.shape[0],s.shape[1],s.shape[2])),"NCHW"===o)throw new Error("separableConv2d currently does not support dataFormat NCHW; only NHWC is supported");b(4===l.rank,function(){return"Error in separableConv2d: input must be rank 4, but got rank "+l.rank+"."}),b(4===c.rank,function(){return"Error in separableConv2d: depthwise filter must be rank 4, but got rank "+c.rank+"."}),b(4===u.rank,function(){return"Error in separableConv2d: pointwise filter must be rank 4, but got rank "+c.rank+"."}),b(1===u.shape[0],function(){return"Error in separableConv2d: the first dimension of pointwise filter must be 1, but got "+u.shape[0]+"."}),b(1===u.shape[1],function(){return"Error in separableConv2d: the second dimension of pointwise filter must be 1, but got "+u.shape[1]+"."});var f=c.shape[2],h=c.shape[3];b(u.shape[2]===f*h,function(){return"Error in separableConv2d: the third dimension of pointwise filter must be "+f*h+", but got "+u.shape[2]+"."});var p=vs(l,c,r,i,o,a),m=hs(p,u,1,"valid",o);return d?m.as3D(m.shape[1],m.shape[2],m.shape[3]):m}}),gs=xe({conv2dTranspose_:function(t,e,n,r,i,a){return us(n,qt(t,"x","conv2dTranspose"),qt(e,"filter","conv2dTranspose"),r,i,a)}});var bs=xe({matMul_:function(t,e,n,r){var i;void 0===n&&(n=!1),void 0===r&&(r=!1);var a=qt(t,"a","matMul"),o=qt(e,"b","matMul");i=Ct(a,o),a=i[0],o=i[1];var s=n?a.shape[a.rank-2]:a.shape[a.rank-1],c=r?o.shape[o.rank-1]:o.shape[o.rank-2],u=n?a.shape[a.rank-1]:a.shape[a.rank-2],l=r?o.shape[o.rank-2]:o.shape[o.rank-1],d=a.shape.slice(0,-2),f=o.shape.slice(0,-2),h=k(d),p=k(f);b(a.rank>=2&&o.rank>=2&&a.rank===o.rank,function(){return"Error in matMul: inputs must have the same rank of at least 2, got ranks "+a.rank+" and "+o.rank+"."}),b(C(d,f),function(){return"Error in matMul: outer dimensions ("+d+") and ("+f+") of Tensors with shapes "+a.shape+" and "+o.shape+" must match."}),b(s===c,function(){return"Error in matMul: inner shapes ("+s+") and ("+c+") of Tensors with shapes "+a.shape+" and "+o.shape+" and transposeA="+n+" and transposeB="+r+" must match."});var m=a.shape.slice(0,-2).concat([u,l]),v=n?a.as3D(h,s,u):a.as3D(h,u,s),_=r?o.as3D(p,l,c):o.as3D(p,c,l);return zt.engine.runKernel(function(t,e){var i=t.batchMatMul(v,_,n,r);return e([v,_]),i},{$a:v,$b:_},function(t,e){var i=e,a=i[0],o=i[1];return n||r?!n&&r?{$a:function(){return t.matMul(o,!1,!1)},$b:function(){return t.matMul(a,!0,!1)}}:n&&!r?{$a:function(){return o.matMul(t,!1,!0)},$b:function(){return a.matMul(t,!1,!1)}}:{$a:function(){return o.matMul(t,!0,!0)},$b:function(){return t.matMul(a,!0,!0)}}:{$a:function(){return t.matMul(o,!1,!0)},$b:function(){return a.matMul(t,!0,!1)}}}).reshape(m)}}),ys=xe({dot_:function(t,e){var n=qt(t,"t1","dot"),r=qt(e,"t2","dot");b(!(1!==n.rank&&2!==n.rank||1!==r.rank&&2!==r.rank),function(){return"Error in dot: inputs must all be rank 1 or 2, but got ranks "+n.rank+" and "+r.rank+"."});var i=1===n.rank?n.size:n.shape[1],a=1===r.rank?r.size:r.shape[0];return b(i===a,function(){return"Error in dot: inner dimensions of inputs must match, but got "+i+" and "+a+"."}),1===n.rank&&1===r.rank?n.as2D(1,-1).matMul(r.as2D(-1,1)).asScalar():1===n.rank&&2===r.rank?n.as2D(1,-1).matMul(r.as2D(r.shape[0],r.shape[1])).as1D():2===n.rank&&1===r.rank?n.matMul(r.as2D(-1,1)).as1D():n.matMul(r.as2D(r.shape[0],r.shape[1]))}}),xs=xe({outerProduct_:function(t,e){var n=qt(t,"v1","outerProduct"),r=qt(e,"v2","outerProduct");return b(1===n.rank&&1===r.rank,function(){return"Error in outerProduct: inputs must be rank 1, but got ranks "+n.rank+" and "+r.rank+"."}),n.as2D(-1,1).matMul(r.as2D(1,-1))}});var ws=xe({reverse_:function(t,e){var n=qt(t,"x","reverse");if(0===n.rank)return n.clone();var r=R(e,n.shape);return zt.engine.runKernel(function(t){return t.reverse(n,r)},{$x:n},function(t){return{$x:function(){return t.reverse(r)}}}).reshapeAs(n)}}),ks=xe({reverse1d_:function(t){var e=qt(t,"x","reverse");return b(1===e.rank,function(){return"Error in reverse1D: x must be rank 1 but got rank "+e.rank+"."}),ws(e,0)}}),Cs=xe({reverse2d_:function(t,e){var n=qt(t,"x","reverse");return b(2===n.rank,function(){return"Error in reverse2D: x must be rank 2 but got rank "+n.rank+"."}),ws(n,e)}}),Es=xe({reverse3d_:function(t,e){var n=qt(t,"x","reverse");return b(3===n.rank,function(){return"Error in reverse3D: x must be rank 3 but got rank "+n.rank+"."}),ws(n,e)}}),Ss=xe({reverse4d_:function(t,e){var n=qt(t,"x","reverse");return b(4===n.rank,function(){return"Error in reverse4D: x must be rank 4 but got rank "+n.rank+"."}),ws(n,e)}});function Is(t,e,n,r,i,a){var o=qt(t,"x","maxPool"),s=o,c=!1;3===o.rank&&(c=!0,s=o.as4D(1,o.shape[0],o.shape[1],o.shape[2])),null==r&&(r=[1,1]),b(4===s.rank,function(){return"Error in maxPool: input must be rank 4 but got rank "+s.rank+"."}),b(cs(n,r),function(){return"Error in maxPool: Either strides or dilations must be 1. Got strides "+n+" and dilations '"+r+"'"}),null!=a&&b(E(i),function(){return"Error in maxPool: pad must be an integer when using, dimRoundingMode "+a+" but got pad "+i+"."});var u=ts(s.shape,e,n,r,i,a),l=zt.engine.runKernel(function(t,e){var n=t.maxPool(s,u);return e([s,n]),n},{x:s},function(t,a){var o=a[0],s=a[1];return{x:function(){return function(t,e,n,r,i,a,o,s){var c=qt(t,"dy","maxPoolBackprop"),u=qt(e,"input","maxPoolBackprop"),l=qt(n,"output","maxPoolBackprop");b(u.rank===c.rank,function(){return"Rank of input ("+u.rank+") does not match rank of dy ("+c.rank+")"}),null==a&&(a=[1,1]),b(cs(i,a),function(){return"Error in maxPoolBackProp: Either strides or dilations must be 1. Got strides "+i+" and dilations '"+a+"'"}),b(4===c.rank,function(){return"Error in maxPoolBackprop: dy must be rank 4 but got rank "+c.rank+"."}),b(4===u.rank,function(){return"Error in maxPoolBackprop: input must be rank 4 but got rank "+u.rank+"."}),null!=s&&b(E(o),function(){return"Error in maxPoolBackprop: pad must be an integer when using, dimRoundingMode "+s+" but got pad "+o+"."});var d=ts(u.shape,r,i,a,o,s);return zt.engine.runKernel(function(t){return t.maxPoolBackprop(c,u,l,d)},{$dy:c,$input:u})}(t,o,s,e,n,r,i)}}});return c?l.as3D(l.shape[1],l.shape[2],l.shape[3]):l}function Ms(t,e,n,r,i,a){var o=qt(t,"x","avgPool","float32");null==r&&(r=[1,1]),b(cs(n,r),function(){return"Error in avgPool: Either strides or dilations must be 1. Got strides "+n+" and dilations '"+r+"'"});var s=o,c=!1;3===o.rank&&(c=!0,s=o.as4D(1,o.shape[0],o.shape[1],o.shape[2])),b(4===s.rank,function(){return"Error in avgPool: x must be rank 4 but got rank "+s.rank+"."}),null!=a&&b(E(i),function(){return"Error in avgPool: pad must be an integer when using, dimRoundingMode "+a+" but got pad "+i+"."});var u=ts(s.shape,e,n,r,i,a),l=zt.engine.runKernel(function(t){return t.avgPool(s,u)},{x:s},function(t){return{x:function(){return function(t,e,n,r,i,a){var o=qt(t,"dy","avgPoolBackprop"),s=qt(e,"input","avgPoolBackprop");b(s.rank===o.rank,function(){return"Rank of input ("+s.rank+") does not match rank of dy ("+o.rank+")"}),null==i&&(i=[1,1]),b(cs(r,i),function(){return"Error in avgPoolBackprop: Either strides or dilations must be 1. Got strides "+r+" and dilations '"+i+"'"});var c=s,u=o,l=!1;3===s.rank&&(l=!0,c=s.as4D(1,s.shape[0],s.shape[1],s.shape[2]),u=o.as4D(1,o.shape[0],o.shape[1],o.shape[2])),b(4===u.rank,function(){return"Error in avgPoolBackprop: dy must be rank 4 but got rank "+u.rank+"."}),b(4===c.rank,function(){return"Error in avgPoolBackprop: input must be rank 4 but got rank "+c.rank+"."});var d=ts(c.shape,n,r,i,a),f=zt.engine.runKernel(function(t){return t.avgPoolBackprop(u,c,d)},{dy4D:u,input4D:c});return l?f.as3D(f.shape[1],f.shape[2],f.shape[3]):f}(t,s,e,n,r,i)}}});return l=l.cast(o.dtype),c?l.as3D(l.shape[1],l.shape[2],l.shape[3]):l}var Ts=xe({maxPool_:function(t,e,n,r,i){return Is(t,e,n,1,r,i)}}),Ds=xe({avgPool_:function(t,e,n,r,i){return Ms(t,e,n,1,r,i)}}),Rs=xe({pool_:function(t,e,n,r,i,a){null==i&&(i=[1,1]),null==a&&(a=1),0===r&&(r="valid");var o=qt(t,"x","maxPool"),s=o,c=!1;3===o.rank&&(c=!0,s=o.as4D(1,o.shape[0],o.shape[1],o.shape[2])),b(cs(a,i),function(){return"Error in pool: Either strides or dilations must be 1. Got strides "+a+" and dilations '"+i+"'"});var u,l=ts(s.shape,e,a,i,r),d=[l.dilationHeight,l.dilationWidth];u="same"===r?function(t,e){var n=t.map(function(t,n){return t+(t-1)*(e[n]-1)}).map(function(t){return t-1}),r=n.map(function(t){return Math.floor(t/2)}),i=n.map(function(t,e){return t-r[e]});return n.map(function(t,e){return[r[e],i[e]]})}([l.filterHeight,l.filterWidth],d):[[0,0],[0,0]];var f=1===d[0]&&1===d[1],h=function(t,e,n){var r=n.map(function(t){return t[0]}),i=n.map(function(t){return t[1]}),a=t.concat(r,i),o=e.map(function(t,e){return(t-a[e]%t)%t}),s=i.map(function(t,e){return t+o[e]});return[e.map(function(t,e){return[r[e],s[e]]}),e.map(function(t,e){return[0,o[e]]})]}([l.inHeight,l.inWidth],d,u),p=h[0],m=h[1],v=f?r:"valid",_=f?s:Ua(s,d,p),g=("avg"===n?function(){return Ms(_,e,a,1,v)}:function(){return Is(_,e,a,1,v)})(),y=f?g:Ta(g,d,m);return c?y.as3D(y.shape[1],y.shape[2],y.shape[3]):y}});var Ps=xe({slice_:function(t,e,n){var r,i,a=qt(t,"x","slice");if(0===a.rank)throw new Error("Slicing scalar is not possible");r="number"==typeof e?[e].concat(new Array(a.rank-1).fill(0)):e.length<a.rank?e.concat(new Array(a.rank-e.length).fill(0)):e.slice(),i=(i=null==n?new Array(a.rank).fill(-1):"number"==typeof n?[n].concat(new Array(a.rank-1).fill(-1)):n.length<a.rank?n.concat(new Array(a.rank-n.length).fill(-1)):n).map(function(t,e){return t>=0?t:(b(-1===t,function(){return"Bad value in size"}),a.shape[e]-r[e])}),function(t,e,n){b(t.rank===e.length,function(){return"Error in slice"+t.rank+"D: Length of begin "+e+" must match the rank of the array ("+t.rank+")."}),b(t.rank===n.length,function(){return"Error in slice"+t.rank+"D: Length of size "+n+" must match the rank of the array ("+t.rank+")."});for(var r=function(r){b(e[r]+n[r]<=t.shape[r],function(){return"Error in slice"+t.rank+"D: begin["+r+"] + size["+r+"] ("+(e[r]+n[r])+") would overflow input.shape["+r+"] ("+t.shape[r]+")"})},i=0;i<t.rank;++i)r(i)}(a,r,i);var o=a.shape;return zt.engine.runKernel(function(t){return t.slice(a,r,i)},{$x:a},function(t){for(var e=[],n=0;n<t.rank;n++)e.push([r[n],o[n]-r[n]-i[n]]);return{$x:function(){return t.pad(e)}}})}}),Os=xe({slice1d_:function(t,e,n){var r=qt(t,"x","slice1d");return b(1===r.rank,function(){return"slice1d expects a rank-1 tensor, but got a rank-"+r.rank+" tensor"}),Ps(r,[e],[n])}}),Ls=xe({slice2d_:function(t,e,n){var r=qt(t,"x","slice2d");return b(2===r.rank,function(){return"slice2d expects a rank-2 tensor, but got a rank-"+r.rank+" tensor"}),Ps(r,e,n)}}),As=xe({slice3d_:function(t,e,n){var r=qt(t,"x","slice3d");return b(3===r.rank,function(){return"slice3d expects a rank-3 tensor, but got a rank-"+r.rank+" tensor"}),Ps(r,e,n)}}),Ns=xe({slice4d_:function(t,e,n){var r=qt(t,"x","slice4d");return b(4===r.rank,function(){return"slice4d expects a rank-4 tensor, but got a rank-"+r.rank+" tensor"}),Ps(r,e,n)}});function Bs(t,e,n,r,i){return e.rank<n.rank&&(e=e.reshape(ae(e.shape,r))),t.rank<n.rank&&(t=t.reshape(ae(t.shape,r))),{$x:function(){var r=t.mul(n.equal(e).cast(t.dtype));return null==i?r:r.transpose(i)}}}var js=xe({all_:function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var r=qt(t,"x","all","bool"),i=R(e,r.shape),a=i,o=se(a,r.rank);null!=o&&(r=r.transpose(o),a=ue(a.length,r.rank));var s=zt.engine.runKernel(function(t){return t.all(r,a)},{$x:r});if(n){var c=ae(s.shape,i);return s.reshape(c)}return s}}),Fs=xe({any_:function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var r=qt(t,"x","any","bool"),i=R(e,r.shape),a=i,o=se(a,r.rank);null!=o&&(r=r.transpose(o),a=ue(a.length,r.rank));var s=zt.engine.runKernel(function(t){return t.any(r,a)},{$x:r});if(n){var c=ae(s.shape,i);return s.reshape(c)}return s}}),Ys=xe({argMax_:function(t,e){void 0===e&&(e=0);var n=qt(t,"x","argMax");null==e&&(e=0);var r=R(e,n.shape),i=se(r,n.rank);return null!=i&&(n=n.transpose(i),r=ue(r.length,n.rank)),zt.engine.runKernel(function(t,e){var i=t.argMax(n,r[0]);return e([n]),i},{$x:n},function(t,e){var n=e[0];return{$x:function(){return je(n)}}})}}),$s=xe({argMin_:function(t,e){void 0===e&&(e=0);var n=qt(t,"x","argMin");null==e&&(e=0);var r=R(e,n.shape),i=se(r,n.rank);return null!=i&&(n=n.transpose(i),r=ue(r.length,n.rank)),zt.engine.runKernel(function(t,e){var i=t.argMin(n,r[0]);return e([n]),i},{$x:n},function(t,e){var n=e[0];return{$x:function(){return je(n)}}})}}),zs=xe({logSumExp_:function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var r=qt(t,"x","logSumExp"),i=R(e,r.shape),a=r.max(i,!0),o=r.sub(a).exp().sum(i).log(),s=a.reshape(o.shape).add(o);if(n){var c=ae(s.shape,i);return s.reshape(c)}return s}}),Vs=xe({max_:function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var r=qt(t,"x","max"),i=r,a=R(e,r.shape),o=a,s=se(o,r.rank);null!=s&&(r=r.transpose(s),o=ue(o.length,r.rank));var c=zt.engine.runKernel(function(t,e){var n=t.max(r,o);return e([i,n]),n},{$x:r},function(t,e){return Bs(t,e[1],e[0],a,s)});if(n){var u=ae(c.shape,a);c=c.reshape(u)}return c}}),Hs=xe({mean_:function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var r=qt(t,"x","mean"),i=R(e,r.shape),a=k(ie(r.shape,i)[1]);return Ut(function(t){var r=Me(a);return{value:(r.dtype===t.dtype?t:t.cast(r.dtype)).div(r).sum(e,n),gradFunc:function(e){var n=t.shape.slice();return i.forEach(function(t){n[t]=1}),e.reshape(n).mul(Oe(t.shape,"float32")).div(a)}}})(r)}}),qs=xe({min_:function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var r=qt(t,"x","min"),i=r,a=R(e,r.shape),o=a,s=se(o,r.rank);null!=s&&(r=r.transpose(s),o=ue(o.length,r.rank));var c=zt.engine.runKernel(function(t,e){var n=t.min(r,o);return e([i,n]),n},{$x:r},function(t,e){return Bs(t,e[1],e[0],a,s)});if(n){var u=ae(c.shape,a);c=c.reshape(u)}return c}}),Ws=xe({moments_:function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var r=R(e,(t=qt(t,"x","moments")).shape),i=t.mean(r,n),a=i.shape;return n||(a=ae(i.shape,r)),{mean:i,variance:t.toFloat().sub(i.reshape(a)).square().mean(r,n)}}}),Us=xe({sum_:function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var r=qt(t,"x","sum");"bool"===r.dtype&&(r=r.toInt());var i=R(e,r.shape);return Ut(function(t){var e=se(i,t.rank),r=i,a=t;null!=e&&(a=t.transpose(e),r=ue(r.length,t.rank));var o=zt.engine.runKernel(function(t){return t.sum(a,r)},{permutedX:a});if(n){var s=ae(o.shape,i);o=o.reshape(s)}return{value:o,gradFunc:function(e){var n=t.shape.slice();return i.forEach(function(t){n[t]=1}),e.reshape(n).mul(Oe(t.shape,"float32"))}}})(r)}}),Gs=xe({prod_:function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var r=qt(t,"x","prod");"bool"===r.dtype&&(r=r.toInt());var i=R(e,r.shape),a=se(i,r.rank),o=i,s=r;null!=a&&(s=r.transpose(a),o=ue(o.length,r.rank));var c=zt.engine.runKernel(function(t){return t.prod(s,o)},{permutedX:s});if(n){var u=ae(c.shape,i);c=c.reshape(u)}return c}});var Ks=xe({equal_:function(t,e){var n,r=qt(t,"a","equal"),i=qt(e,"b","equal");return n=Ct(r,i),r=n[0],i=n[1],en(r.shape,i.shape),zt.engine.runKernel(function(t){return t.equal(r,i)},{$a:r,$b:i})}}),Xs=xe({equalStrict_:function(t,e){var n=qt(t,"a","equalStrict"),r=qt(e,"b","equalStrict");return y(n.shape,r.shape,"Error in equalStrict: "),n.equal(r)}}),Js=xe({greater_:function(t,e){var n,r=qt(t,"a","greater"),i=qt(e,"b","greater");return n=Ct(r,i),r=n[0],i=n[1],en(r.shape,i.shape),zt.engine.runKernel(function(t){return t.greater(r,i)},{$a:r,$b:i})}}),Zs=xe({greaterEqual_:function(t,e){var n,r=qt(t,"a","greaterEqual"),i=qt(e,"b","greaterEqual");return n=Ct(r,i),r=n[0],i=n[1],en(r.shape,i.shape),zt.engine.runKernel(function(t,e){var n=t.greaterEqual(r,i);return e([r,i]),n},{$a:r,$b:i},function(t,e){var n=e[0],r=e[1];return{$a:function(){return je(n)},$b:function(){return je(r)}}})}}),Qs=xe({greaterEqualStrict_:function(t,e){var n=qt(t,"a","greaterEqualStrict"),r=qt(e,"b","greaterEqualStrict");return y(n.shape,r.shape,"Error in greaterEqualStrict: "),n.greaterEqual(r)}}),tc=xe({greaterStrict_:function(t,e){var n=qt(t,"a","greaterStrict"),r=qt(e,"b","greaterStrict");return y(n.shape,r.shape,"Error in greaterStrict: "),n.greater(r)}}),ec=xe({less_:function(t,e){var n,r=qt(t,"a","less"),i=qt(e,"b","less");return n=Ct(r,i),r=n[0],i=n[1],en(r.shape,i.shape),zt.engine.runKernel(function(t){return t.less(r,i)},{$a:r,$b:i})}}),nc=xe({lessEqual_:function(t,e){var n,r=qt(t,"a","lessEqual"),i=qt(e,"b","lessEqual");return n=Ct(r,i),r=n[0],i=n[1],en(r.shape,i.shape),zt.engine.runKernel(function(t){return t.lessEqual(r,i)},{$a:r,$b:i})}}),rc=xe({lessEqualStrict_:function(t,e){var n=qt(t,"a","lessEqualStrict"),r=qt(e,"b","lessEqualStrict");return y(n.shape,r.shape,"Error in lessEqualStrict: "),n.lessEqual(r)}}),ic=xe({lessStrict_:function(t,e){var n=qt(t,"a","lessStrict"),r=qt(e,"b","lessStrict");return y(n.shape,r.shape,"Error in lessStrict: "),n.less(r)}}),ac=xe({notEqual_:function(t,e){var n,r=qt(t,"a","notEqual"),i=qt(e,"b","notEqual");return n=Ct(r,i),r=n[0],i=n[1],en(r.shape,i.shape),zt.engine.runKernel(function(t){return t.notEqual(r,i)},{$a:r,$b:i})}}),oc=xe({notEqualStrict_:function(t,e){var n=qt(t,"a","notEqualStrict"),r=qt(e,"b","notEqualStrict");return y(n.shape,r.shape,"Error in notEqualStrict: "),n.notEqual(r)}});var sc=xe({add_:function(t,e){var n,r=qt(t,"a","add"),i=qt(e,"b","add");n=Ct(r,i),r=n[0],i=n[1];var a=en(r.shape,i.shape);return zt.engine.runKernel(function(t){return t.add(r,i)},{$a:r,$b:i},function(t){return{$a:function(){var e=t,n=tn(r.shape,a);return n.length>0&&(e=e.sum(n)),e.reshape(r.shape)},$b:function(){var e=t,n=tn(i.shape,a);return n.length>0&&(e=e.sum(n)),e.reshape(i.shape)}}})}}),cc=xe({addN_:function(t){b(Array.isArray(t),function(){return"The argument passed to tf.addN() must be a list of tensors"}),b(t.length>=1,function(){return"Must pass at least one tensor to tf.addN(), but got "+t.length});var e=t.map(function(t,e){return qt(t,"tensors"+e,"addN")}),n=e[0];e.forEach(function(t){if(t.dtype!==n.dtype)throw new Error("All tensors passed to tf.addN() must have the same dtype")}),e.forEach(function(t){if(!C(t.shape,n.shape))throw new Error("All tensors passed to tf.addN() must have the same shape")});var r=e;return zt.engine.runKernel(function(t){return t.addN(e)},r,function(t){var n={};return e.forEach(function(e,r){n[r]=function(){return t.clone()}}),n})}}),uc=xe({addStrict_:function(t,e){var n=qt(t,"a","addStrict"),r=qt(e,"b","addStrict");return y(n.shape,r.shape,"Error in addStrict: "),n.add(r)}}),lc=xe({atan2_:function(t,e){var n,r=qt(t,"a","atan2"),i=qt(e,"b","atan2");n=Ct(r,i),r=n[0],i=n[1];var a=en(r.shape,i.shape);return zt.engine.runKernel(function(t,e){var n=t.atan2(r,i);return e([r,i]),n},{$a:r,$b:i},function(t,e){var n=e[0],r=e[1];return{$a:function(){var e=sc(n.square(),r.square()),i=t.mul(r.div(e)),o=tn(n.shape,a);return o.length>0&&(i=i.sum(o)),i.reshape(n.shape)},$b:function(){var e=sc(n.square(),r.square()),i=ko(t.mul(n.div(e))),o=tn(r.shape,a);return o.length>0&&(i=i.sum(o)),i.reshape(r.shape)}}})}}),dc=xe({div_:function(t,e){var n,r=qt(t,"a","div"),i=qt(e,"b","div");if(n=Ct(r,i),r=n[0],i=n[1],"int32"===r.dtype&&"int32"===i.dtype)return hc(r,i);var a=en(r.shape,i.shape);return zt.engine.runKernel(function(t,e){var n=t.realDivide(r,i);return e([r,i]),n},{$a:r,$b:i},function(t,e){var n=e[0],r=e[1];return{$a:function(){var e=t.div(r.toFloat()),i=tn(n.shape,a);return i.length>0?e.sum(i).reshape(n.shape):e},$b:function(){var e=t.mul(n.toFloat()),i=tn(r.shape,a);i.length>0&&(e=e.sum(i).reshape(r.shape));var o=r.square();return e.div(o.toFloat()).neg()}}})}}),fc=xe({divStrict_:function(t,e){var n=qt(t,"a","div"),r=qt(e,"b","div");return y(n.shape,r.shape,"Error in divideStrict: "),n.div(r)}}),hc=xe({floorDiv_:function(t,e){var n,r=qt(t,"a","floorDiv"),i=qt(e,"b","floorDiv");n=Ct(r,i),r=n[0],i=n[1];var a=en(r.shape,i.shape);return zt.engine.runKernel(function(t,e){var n=t.floorDiv(r,i);return e([r,i]),n},{$a:r,$b:i},function(t,e){var n=e[0],r=e[1];return{$a:function(){var e=t.div(r.toFloat()),i=tn(n.shape,a);return i.length>0?e.sum(i).reshape(n.shape):e},$b:function(){var e=t.mul(n.toFloat()),i=tn(r.shape,a);i.length>0&&(e=e.sum(i).reshape(r.shape));var o=r.square();return e.div(o.toFloat()).neg()}}})}}),pc=xe({maximum_:function(t,e){var n,r=qt(t,"a","maximum"),i=qt(e,"b","maximum");return n=Ct(r,i),r=n[0],i=n[1],"bool"===r.dtype&&(r=r.toInt(),i=i.toInt()),en(r.shape,i.shape),zt.engine.runKernel(function(t,e){var n=t.maximum(r,i);return e([r,i]),n},{$a:r,$b:i},function(t,e){var n=e[0],r=e[1];return{$a:function(){return t.mul(n.greaterEqual(r).toFloat())},$b:function(){return t.mul(n.less(r).toFloat())}}})}}),mc=xe({maximumStrict_:function(t,e){var n=qt(t,"a","maximumStrict"),r=qt(e,"b","maximumStrict");return y(n.shape,r.shape,"Error in maximumStrict: "),n.maximum(r)}}),vc=xe({minimum_:function(t,e){var n,r=qt(t,"a","minimum"),i=qt(e,"b","minimum");return n=Ct(r,i),r=n[0],i=n[1],"bool"===r.dtype&&(r=r.toInt(),i=i.toInt()),en(r.shape,i.shape),zt.engine.runKernel(function(t,e){var n=t.minimum(r,i);return e([r,i]),n},{$a:r,$b:i},function(t,e){var n=e[0],r=e[1];return{$a:function(){return t.mul(n.lessEqual(r).toFloat())},$b:function(){return t.mul(n.greater(r).toFloat())}}})}}),_c=xe({minimumStrict_:function(t,e){var n=qt(t,"a","minimumStrict"),r=qt(e,"b","minimumStrict");return y(n.shape,r.shape,"Error in minimumStrict: "),n.minimum(r)}}),gc=xe({mod_:function(t,e){var n,r=qt(t,"a","mod"),i=qt(e,"b","mod");n=Ct(r,i),r=n[0],i=n[1];var a=en(r.shape,i.shape);return zt.engine.runKernel(function(t,e){var n=t.mod(r,i);return e([r,i]),n},{$a:r,$b:i},function(t,e){var n=e[0],r=e[1];return{$a:function(){var e=tn(n.shape,a);return e.length>0?t.sum(e).reshape(n.shape):t},$b:function(){var e=t.mul(n.div(r).floor().neg()),i=tn(r.shape,a);return i.length>0?e.sum(i).reshape(r.shape):e}}})}}),bc=xe({modStrict_:function(t,e){var n=qt(t,"a","modStrict"),r=qt(e,"b","modStrict");return y(n.shape,r.shape,"Error in modStrict: "),n.mod(r)}}),yc=xe({mul_:function(t,e){var n,r=qt(t,"a","mul"),i=qt(e,"b","mul");n=Ct(r,i),r=n[0],i=n[1];var a=en(r.shape,i.shape);return zt.engine.runKernel(function(t,e){var n=t.multiply(r,i);return e([r,i]),n},{$a:r,$b:i},function(t,e){var n=e[0],r=e[1];return{$a:function(){var e=t.mul(r.toFloat()),i=tn(n.shape,a);return i.length>0?e.sum(i).reshape(n.shape):e},$b:function(){var e=t.mul(n.toFloat()),i=tn(r.shape,a);return i.length>0?e.sum(i).reshape(r.shape):e}}})}}),xc=xe({mulStrict_:function(t,e){var n=qt(t,"a","mul"),r=qt(e,"b","mul");return y(n.shape,r.shape,"Error in multiplyStrict: "),n.mul(r)}}),wc=xe({pow_:function(t,e){var n=qt(t,"base","pow"),r=qt(e,"exp","pow"),i=en(n.shape,r.shape);return t=n.cast(wt(n.dtype,r.dtype)),e=r.cast(wt(n.dtype,r.dtype)),zt.engine.runKernel(function(t,e){var i=t.pow(n,r);return e([n,r,i]),i},{$base:n,$exp:r},function(t,e){var n=e[0],r=e[1],a=e[2];return{$base:function(){var e=r.toFloat(),a=t.mul(e.mul(n.pow(e.sub(Me(1))))),o=tn(n.shape,i);return o.length>0&&(a=a.sum(o)),a.reshape(n.shape)},$exp:function(){var e=n.greater(0),o=n.log().where(e,je(n)),s=t.mul(a.mul(o)),c=tn(r.shape,i);return c.length>0&&(s=s.sum(c)),s.reshape(r.shape)}}})}}),kc=xe({powStrict_:function(t,e){return y(t.shape,e.shape,"Error in powStrict: "),t.pow(e)}}),Cc=xe({squaredDifference_:function(t,e){var n,r=qt(t,"a","squaredDifference"),i=qt(e,"b","squaredDifference");return n=Ct(r,i),r=n[0],i=n[1],en(r.shape,i.shape),zt.engine.runKernel(function(t,e){var n=t.squaredDifference(r,i);return e([r,i]),n},{$a:r,$b:i},function(t,e){var n=e[0],r=e[1],i=Me(2);return{$a:function(){return t.mul(n.sub(r).mul(i))},$b:function(){return t.mul(r.sub(n).mul(i))}}})}}),Ec=xe({squaredDifferenceStrict_:function(t,e){var n=qt(t,"a","squaredDifferenceStrict"),r=qt(e,"b","squaredDifferenceStrict");return y(n.shape,r.shape,"Error in squaredDifferenceStrict: "),n.squaredDifference(r)}}),Sc=xe({sub_:function(t,e){var n,r=qt(t,"a","sub"),i=qt(e,"b","sub");n=Ct(r,i),r=n[0],i=n[1];var a=en(r.shape,i.shape);return zt.engine.runKernel(function(t){return t.subtract(r,i)},{$a:r,$b:i},function(t){return{$a:function(){var e=t,n=tn(r.shape,a);return n.length>0&&(e=e.sum(n)),e.reshape(r.shape)},$b:function(){var e=t,n=tn(i.shape,a);return n.length>0&&(e=e.sum(n)),e.neg().reshape(i.shape)}}})}}),Ic=xe({subStrict_:function(t,e){var n=qt(t,"a","subStrict"),r=qt(e,"b","subStrict");return y(n.shape,r.shape,"Error in subStrict: "),n.sub(r)}});var Mc=xe({logicalAnd_:function(t,e){var n=qt(t,"a","logicalAnd","bool"),r=qt(e,"b","logicalAnd","bool");return en(n.shape,r.shape),zt.engine.runKernel(function(t){return t.logicalAnd(n,r)},{$a:n,$b:r})}}),Tc=xe({logicalNot_:function(t){var e=qt(t,"x","logicalNot","bool");return zt.engine.runKernel(function(t){return t.logicalNot(e)},{$x:e})}}),Dc=xe({logicalOr_:function(t,e){var n=qt(t,"a","logicalOr","bool"),r=qt(e,"b","logicalOr","bool");return en(n.shape,r.shape),zt.engine.runKernel(function(t){return t.logicalOr(n,r)},{$a:n,$b:r})}}),Rc=xe({logicalXor_:function(t,e){var n=qt(t,"a","logicalXor","bool"),r=qt(e,"b","logicalXor","bool");return en(n.shape,r.shape),Dc(t,e).logicalAnd(Mc(t,e).logicalNot())}}),Pc=xe({where_:function(t,e,n){var r=qt(e,"a","where"),i=qt(n,"b","where"),a=qt(t,"condition","where","bool");return y(r.shape,i.shape,"Error in where: "),1===a.rank?b(a.shape[0]===r.shape[0],function(){return"The first dimension of `a` must match the size of `condition`."}):y(a.shape,i.shape,"Error in where: "),zt.engine.runKernel(function(t,e){var n=t.select(a,r,i);return e([a]),n},{$condition:a,$a:r,$b:i},function(t,e){var n=e[0];return{$condition:function(){return je(n).toFloat()},$a:function(){return t.mul(n.cast(t.dtype))},$b:function(){return t.mul(n.logicalNot().cast(t.dtype))}}})}}),Oc=function(t){return u(this,void 0,void 0,function(){var e,n,r;return l(this,function(i){switch(i.label){case 0:return[4,(e=qt(t,"condition","whereAsync","bool")).data()];case 1:return n=i.sent(),r=to(e.shape,n),t!==e&&e.dispose(),[2,r]}})})};var Lc=xe({elu_:function(t){var e=qt(t,"x","elu");return zt.engine.runKernel(function(t,n){var r=t.elu(e);return n([r]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return zt.engine.runKernel(function(e){return e.eluDer(t,n)},{dy:t,y:n})}}})}}),Ac=xe({leakyRelu_:function(t,e){void 0===e&&(e=.2);var n=qt(t,"x","leakyRelu");return pc(Me(e).mul(n),n)}}),Nc=xe({prelu_:function(t,e){var n=qt(t,"x","prelu"),r=qt(e,"alpha","prelu");return zt.engine.runKernel(function(t,e){var i=t.prelu(n,r);return e([n,r]),i},{$x:n,$alpha:r},function(t,e){var n=e[0],r=e[1],i=n.greater(0);return{$x:function(){return Pc(i,t,t.mul(r))},$alpha:function(){var e=Pc(i,je(t),t.mul(n)),a=tn(r.shape,t.shape);return a.length>0&&(e=e.sum(a)),e.reshape(r.shape)}}})}}),Bc=xe({relu_:function(t){var e=qt(t,"x","relu");return"bool"===e.dtype?e.toInt():zt.engine.runKernel(function(t,n){var r=t.relu(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.mulStrict(n.step().toFloat())}}})}}),jc=xe({selu_:function(t){var e=qt(t,"x","selu");return zt.engine.runKernel(function(t,n){var r=t.selu(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){var e=n.greater(Me(0)),r=Me(Ki),i=Me(Xi),a=t.mul(i),o=t.mul(r).mul(n.toFloat().exp());return Pc(e,a,o)}}})}});var Fc=xe({transpose_:function(t,e){var n=qt(t,"x","transpose");return null==e&&(e=n.shape.map(function(t,e){return e}).reverse()),b(n.rank===e.length,function(){return"Error in transpose: rank of input "+n.rank+" must match length of perm "+e+"."}),e.forEach(function(t){b(t>=0&&t<n.rank,function(){return"All entries in 'perm' must be between 0 and "+(n.rank-1)+" but got "+e})}),n.rank<=1?n.clone():zt.engine.runKernel(function(t){return t.transpose(n,e)},{$x:n},function(t){var n=ce(e);return{$x:function(){return t.transpose(n)}}})}});var Yc=xe({localResponseNormalization_:function(t,e,n,r,i){void 0===e&&(e=5),void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=.5);var a=qt(t,"x","localResponseNormalization");b(4===a.rank||3===a.rank,function(){return"Error in localResponseNormalization: x must be rank 3 or 4 but got\n rank "+a.rank+"."}),b(E(e),function(){return"Error in localResponseNormalization: depthRadius must be an integer but got depthRadius "+e+"."});var o=a,s=!1;3===a.rank&&(s=!0,o=a.as4D(1,a.shape[0],a.shape[1],a.shape[2]));var c=zt.engine.runKernel(function(t,a){var s=t.localResponseNormalization4D(o,e,n,r,i);return a([o,s]),s},{x4D:o},function(t,a){var o=a[0],s=a[1];return{x4D:function(){return zt.engine.runKernel(function(a){return a.LRNGrad(t,o,s,e,n,r,i)},{})}}});return s?c.as3D(c.shape[1],c.shape[2],c.shape[3]):c}});var $c=xe({norm_:function(t,e,n,r){void 0===e&&(e="euclidean"),void 0===n&&(n=null),void 0===r&&(r=!1);var i=function t(e,n,r){if(void 0===r&&(r=null),0===e.rank)return e.abs();if(1!==e.rank&&null===r)return t(e.reshape([-1]),n,r);if(1===e.rank||"number"==typeof r||Array.isArray(r)&&1===r.length){if(1===n)return e.abs().sum(r);if(n===1/0)return e.abs().max(r);if(n===-1/0)return e.abs().min(r);if("euclidean"===n||2===n)return e.abs().pow(Me(2,"int32")).sum(r).sqrt();throw new Error("Error in norm: invalid ord value: "+n)}if(Array.isArray(r)&&2===r.length){if(1===n)return e.abs().sum(r[0]).max(r[1]-1);if(n===1/0)return e.abs().sum(r[1]).max(r[0]);if(n===-1/0)return e.abs().sum(r[1]).min(r[0]);if("fro"===n||"euclidean"===n)return e.square().sum(r).sqrt();throw new Error("Error in norm: invalid ord value: "+n)}throw new Error("Error in norm: invalid axis: "+r)}(t=qt(t,"x","norm"),e,n),a=i.shape;if(r){var o=R(n,t.shape);a=ae(i.shape,o)}return i.reshape(a)}});function zc(t,e){for(var n=[],r=t;r<e;++r)n.push(r);return n}function Vc(t){for(var e=[],n=0;n<t.length;++n)for(var r=0;r<t[n].length;++r)e.push(t[n][r]);return e}var Hc=xe({gather_:function(t,e,n){void 0===n&&(n=0);var r=qt(t,"x","gather"),i=qt(e,"indices","gather","int32");n=R(n,r.shape)[0];var a=function(t,e,n){for(var r=t.shape[n],i=[],a=1,o=1,s=0;s<n;s++)i.push(t.shape[s]),a*=t.shape[s];for(s=0;s<e.rank;s++)i.push(e.shape[s]);for(s=n+1;s<t.rank;s++)i.push(t.shape[s]),o*=t.shape[s];return{batchSize:a,sliceSize:o,dimSize:r,outputShape:i}}(r,i,n);return zt.engine.runKernel(function(t,e){var a=t.gather(r,i.flatten(),n);return e([i]),a},{$x:r},function(t,e){var i=e[0];return{$x:function(){var e=r.shape,a=i.size,o=e.slice(0,n),s=o.length,c=e.slice(n,e.length).slice(1),u=c.length,l=zc(0,s),d=zc(s+1,s+1+u),f=Vc([o,[a],c]),h=t.reshape(f),p=i.reshape([a]),m=Vc([[s],l,d]),v=h.transpose(m),_=qc(v,p,r.shape[n]),g=ce(m);return _.transpose(g)}}}).reshape(a.outputShape)}}),qc=xe({unsortedSegmentSum_:function(t,e,n){var r=qt(t,"x","unsortedSegmentSum"),i=qt(e,"segmentIds","unsortedSegmentSum","int32");return b(E(n),function(){return"numSegments must be of dtype int"}),zt.engine.runKernel(function(t,e){var a=t.unsortedSegmentSum(r,i,n);return e([i]),a},{$x:r},function(t,e){var n=e[0];return{$x:function(){return function(t,e){for(var n=pc(e,je(e)),r=Hc(t,n),i=Zs(e,Me(0,"int32")),a=r.rank-i.rank,o=0;o<a;++o)i=La(i,o+1);i=Mc(i,Oe(r.shape,"bool"));var s=je(r);return Pc(i,r,s)}(t,n)}}})}});var Wc=xe({basicLSTMCell_:function(t,e,n,r,i,a){var o=qt(t,"forgetBias","basicLSTMCell"),s=qt(e,"lstmKernel","basicLSTMCell"),c=qt(n,"lstmBias","basicLSTMCell"),u=qt(r,"data","basicLSTMCell"),l=qt(i,"c","basicLSTMCell"),d=qt(a,"h","basicLSTMCell"),f=u.concat(d,1).matMul(s).add(c),h=f.shape[0],p=f.shape[1]/4,m=[h,p],v=f.slice([0,0],m),_=f.slice([0,p],m),g=f.slice([0,2*p],m),b=f.slice([0,3*p],m),y=v.sigmoid().mulStrict(_.tanh()).addStrict(l.mulStrict(o.add(g).sigmoid()));return[y,y.tanh().mulStrict(b.sigmoid())]}}),Uc=xe({multiRNNCell_:function(t,e,n,r){for(var i=qt(e,"data","multiRNNCell"),a=Wt(n,"c","multiRNNCell"),o=Wt(r,"h","multiRNNCell"),s=i,c=[],u=0;u<t.length;u++){var l=t[u](s,a[u],o[u]);c.push(l[0]),c.push(l[1]),s=l[1]}var d=[],f=[];for(u=0;u<c.length;u+=2)d.push(c[u]),f.push(c[u+1]);return[d,f]}});var Gc=xe({movingAverage_:function(t,e,n,r,i){void 0===i&&(i=!0);var a=qt(t,"v","movingAverage"),o=qt(e,"x","movingAverage"),s=qt(n,"decay","movingAverage");Et(a,o),b(C(a.shape,o.shape),function(){return"Shape mismatch in v and x"});var c=Me(1),u=c.sub(s),l=o.sub(a).mul(u);if(i){b(null!=r,function(){return"When using zeroDebias: true, step is required."});var d=qt(r,"step","movingAverage");l=l.div(c.sub(wc(s,d)))}return a.add(l)}});var Kc=xe({stridedSlice_:function(t,e,n,r,i,a,o,s,c){if(void 0===i&&(i=0),void 0===a&&(a=0),void 0===o&&(o=0),void 0===s&&(s=0),void 0===c&&(c=0),0!==o)throw new Error("ellipsis mask is not yet supported");if(0!==s)throw new Error("new axis mask is not yet supported");var u=qt(t,"x","stridedSlice");if(r.every(function(t){return 1===t})){var l=ve(u.shape,e,n,r,i,a,o,s,c),d=l[0],f=l[1],h=l[2],p=f.filter(function(t,e){return-1===h.indexOf(e)});return Ps(u,d,f).reshape(p)}return zt.engine.runKernel(function(t){return t.stridedSlice(u,e,n,r,i,a,o,s,c)},{$x:u})}});var Xc=xe({topk_:function(t,e,n){void 0===e&&(e=1),void 0===n&&(n=!0);var r=qt(t,"x","topk");if(0===r.rank)throw new Error("topk() expects the input to be of rank 1 or higher");var i=r.shape[r.shape.length-1];if(e>i)throw new Error("'k' passed to topk() must be <= the last dimension ("+i+") but got "+e);var a=zt.engine.runKernel(function(t){return t.topk(r,e,n)},{$x:r});return{values:a[0],indices:a[1]}}});var Jc=xe({scatterND_:function(t,e,n){var r=qt(t,"indices","scatterND","int32"),i=qt(e,"updates","scatterND");return pe(i,r,n),zt.engine.runKernel(function(t){return t.scatterND(r,i,n)},{$indices:r,$updates:i})}});var Zc=xe({fft_:function(t){b("complex64"===t.dtype,function(){return"The dtype for tf.spectral.fft() must be complex64 but got "+t.dtype+"."});var e=t.shape[t.shape.length-1],n=t.size/e,r=t.as2D(n,e);return zt.engine.runKernel(function(t){return t.fft(r)},{input:t}).reshape(t.shape)}}),Qc=xe({ifft_:function(t){b("complex64"===t.dtype,function(){return"The dtype for tf.spectral.ifft() must be complex64 but got "+t.dtype+"."});var e=t.shape[t.shape.length-1],n=t.size/e,r=t.as2D(n,e);return zt.engine.runKernel(function(t){return t.ifft(r)},{input:t}).reshape(t.shape)}}),tu=xe({rfft_:function(t){b("float32"===t.dtype,function(){return"The dtype for rfft() must be real value but got "+t.dtype});var e=t.shape[t.shape.length-1],n=t.size/e,r=t.zerosLike(),i=Ce(t,r).as2D(n,e),a=Zc(i),o=Math.floor(e/2)+1,s=Ee(a),c=Se(a),u=s.split([o,e-o],s.shape.length-1),l=c.split([o,e-o],c.shape.length-1),d=t.shape.slice();return d[t.shape.length-1]=o,Ce(u[0],l[0]).reshape(d)}}),eu=xe({irfft_:function(t){var e=t.shape[t.shape.length-1],n=t.size/e;if(e<=2){var r=t.as2D(n,e),i=Qc(r);return Ee(i)}var a=[n,2*(e-1)],o=Ee(t).as2D(n,e),s=Se(t).as2D(n,e),c=o.slice([0,1],[n,e-2]).reverse(1),u=s.slice([0,1],[n,e-2]).reverse(1).mul(Me(-1)),l=o.concat(c,1),d=s.concat(u,1);return r=Ce(l,d).as2D(a[0],a[1]),i=Qc(r),Ee(i)}}),nu=Object.freeze({fft:Zc,ifft:Qc,rfft:tu,irfft:eu});var ru=xe({sparseToDense_:function(t,e,n,r){void 0===r&&(r=0);var i=qt(t,"sparseIndices","sparseToDense","int32"),a=qt(e,"sparseValues","sparseToDense"),o=qt(r,"defaultValue","sparseToDense",a.dtype);return function(t,e,n,r){if("int32"!==t.dtype)throw new Error("tf.sparseToDense() expects the indices to be int32 type, but the dtype was "+t.dtype+".");if(t.rank>2)throw new Error("sparseIndices should be a scalar, vector, or matrix, but got shape "+t.shape+".");var i=t.rank>0?t.shape[0]:1,a=t.rank>1?t.shape[1]:1;if(n.length!==a)throw new Error("outputShape has incorrect number of elements:, "+n.length+", should be: "+a+".");var o=e.size;if(0!==e.rank&&(1!==e.rank||o!==i))throw new Error("sparseValues has incorrect shape "+e.shape+", should be [] or ["+i+"]");if(e.dtype!==r.dtype)throw new Error("sparseValues.dtype must match defaultValues.dtype")}(i,a,n,o),zt.engine.runKernel(function(t){return t.sparseToDense(i,a,n,o)},{$sparseIndices:i,$sparseValues:a,$defaultValue:o})}});var iu,au=xe({gatherND_:function(t,e){var n=qt(e,"indices","gatherND","int32"),r=qt(t,"x","gatherND");return zt.engine.runKernel(function(t){return t.gatherND(r,n)},{$x:r,$indices:n})}});!function(t){t[t.NONE=0]="NONE",t[t.MEAN=1]="MEAN",t[t.SUM=2]="SUM",t[t.SUM_BY_NONZERO_WEIGHTS=3]="SUM_BY_NONZERO_WEIGHTS"}(iu||(iu={}));var ou=xe({absoluteDifference_:function(t,e,n,r){void 0===r&&(r=iu.SUM_BY_NONZERO_WEIGHTS);var i=qt(t,"labels","absoluteDifference"),a=qt(e,"predictions","absoluteDifference"),o=null;null!=n&&(o=qt(n,"weights","absoluteDifference")),y(i.shape,a.shape,"Error in absoluteDifference: ");var s=i.sub(a).abs();return su(s,o,r)}}),su=xe({computeWeightedLoss_:function(t,e,n){void 0===n&&(n=iu.SUM_BY_NONZERO_WEIGHTS);var r=qt(t,"losses","computeWeightedLoss"),i=null;null!=e&&(i=qt(e,"weights","computeWeightedLoss"));var a=null==i?r:r.mul(i);if(n===iu.NONE)return a;if(n===iu.SUM)return a.sum();if(n===iu.MEAN){if(null==i)return a.mean();var o=r.size/i.size,s=a.sum().div(i.sum());return o>1?s.div(Me(o)):s}if(n===iu.SUM_BY_NONZERO_WEIGHTS){if(null==i)return a.sum().div(Me(r.size));var c=i.mul(Oe(r.shape)).notEqual(Me(0)).sum().toFloat();return a.sum().div(c)}throw Error("Unknown reduction: "+n)}}),cu=xe({cosineDistance_:function(t,e,n,r,i){void 0===i&&(i=iu.SUM_BY_NONZERO_WEIGHTS);var a=qt(t,"labels","cosineDistance"),o=qt(e,"predictions","cosineDistance"),s=null;null!=r&&(s=qt(r,"weights","cosineDistance")),y(a.shape,o.shape,"Error in cosineDistance: ");var c=Me(1).sub(a.mul(o).sum(n,!0));return su(c,s,i)}}),uu=xe({hingeLoss_:function(t,e,n,r){void 0===r&&(r=iu.SUM_BY_NONZERO_WEIGHTS);var i=qt(t,"labels","hingeLoss"),a=qt(e,"predictions","hingeLoss"),o=null;null!=n&&(o=qt(n,"weights","hingeLoss")),y(i.shape,a.shape,"Error in hingeLoss: ");var s=Me(1);i=Me(2).mul(i).sub(s);var c=s.sub(i.mul(a)).relu();return su(c,o,r)}}),lu=xe({huberLoss_:function(t,e,n,r,i){void 0===r&&(r=1),void 0===i&&(i=iu.SUM_BY_NONZERO_WEIGHTS);var a=qt(t,"labels","huberLoss"),o=qt(e,"predictions","huberLoss"),s=null;null!=n&&(s=qt(n,"weights","huberLoss")),y(a.shape,o.shape,"Error in huberLoss: ");var c=Me(r),u=o.sub(a).abs(),l=vc(u,c),d=u.sub(l),f=Me(.5).mul(l.square()).add(c.mul(d));return su(f,s,i)}}),du=xe({logLoss_:function(t,e,n,r,i){void 0===r&&(r=1e-7),void 0===i&&(i=iu.SUM_BY_NONZERO_WEIGHTS);var a=qt(t,"labels","logLoss"),o=qt(e,"predictions","logLoss"),s=null;null!=n&&(s=qt(n,"weights","logLoss")),y(a.shape,o.shape,"Error in logLoss: ");var c=Me(1),u=Me(r),l=a.mul(o.add(u).log()).neg().sub(c.sub(a).mul(c.sub(o).add(u).log()));return su(l,s,i)}}),fu=xe({meanSquaredError_:function(t,e,n,r){void 0===r&&(r=iu.SUM_BY_NONZERO_WEIGHTS);var i=qt(t,"labels","meanSquaredError"),a=qt(e,"predictions","meanSquaredError"),o=null;null!=n&&(o=qt(n,"weights","meanSquaredError")),y(i.shape,a.shape,"Error in meanSquaredError: ");var s=i.squaredDifference(a);return su(s,o,r)}}),hu=xe({sigmoidCrossEntropy_:function(t,e,n,r,i){void 0===r&&(r=0),void 0===i&&(i=iu.SUM_BY_NONZERO_WEIGHTS);var a=qt(t,"multiClassLabels","sigmoidCrossEntropy"),o=qt(e,"logits","sigmoidCrossEntropy"),s=null;if(null!=n&&(s=qt(n,"weights","sigmoidCrossEntropy")),y(a.shape,o.shape,"Error in sigmoidCrossEntropy: "),r>0){var c=Me(r),u=Me(1),l=Me(.5);a=a.mul(u.sub(c)).add(l.mul(c))}var d=function(t,e){var n=qt(t,"labels","sigmoidCrossEntropyWithLogits"),r=qt(e,"logits","sigmoidCrossEntropyWithLogits");y(n.shape,r.shape,"Error in sigmoidCrossEntropyWithLogits: ");var i=r.relu(),a=r.mul(n),o=r.abs().neg().exp().log1p();return i.sub(a).add(o)}(a,o);return su(d,s,i)}}),pu=xe({softmaxCrossEntropy_:function(t,e,n,r,i){void 0===r&&(r=0),void 0===i&&(i=iu.SUM_BY_NONZERO_WEIGHTS);var a=qt(t,"onehotLabels","softmaxCrossEntropy"),o=qt(e,"logits","softmaxCrossEntropy"),s=null;if(null!=n&&(s=qt(n,"weights","softmaxCrossEntropy")),y(a.shape,o.shape,"Error in softmaxCrossEntropy: "),r>0){var c=Me(r),u=Me(1),l=Me(a.shape[1]);a=a.mul(u.sub(c)).add(c.div(l))}var d=function(t,e,n){if(void 0===n&&(n=-1),-1===n&&(n=e.rank-1),n!==e.rank-1)throw Error("Softmax cross entropy along a non-last dimension is not yet supported. Labels / logits was rank "+e.rank+" and dim was "+n);return Ut(function(t,e,r){var i=e.logSumExp([n],!0),a=e.toFloat().sub(i);return r([t,a]),{value:a.mul(t).neg().sum([n]),gradFunc:function(t,e){var r=e[0],i=e[1],a=ae(t.shape,[n]);return[t.reshape(a).mul(r.toFloat().sub(i.exp())),t.reshape(a).mul(i.exp().sub(r.toFloat()))]}}})(t,e)}(a,o);return su(d,s,i)}}),mu=Object.freeze({get Reduction(){return iu},absoluteDifference:ou,computeWeightedLoss:su,cosineDistance:cu,hingeLoss:uu,huberLoss:lu,logLoss:du,meanSquaredError:fu,sigmoidCrossEntropy:hu,softmaxCrossEntropy:pu});function vu(t,e){return void 0===e&&(e=!1),zt.engine.tidy(function(){if(2!==t.shape.length)throw new Error("qr2d() requires a 2D Tensor, but got a "+t.shape.length+"D Tensor.");for(var n=t.shape[0],r=t.shape[1],i=Aa(n),a=t.clone(),o=De([[1]],[1,1]),s=o.clone(),c=n>=r?r:n,u=function(t){var e,c=a,u=s,l=i;e=zt.engine.tidy(function(){var e=a.slice([t,t],[n-t,1]),c=e.norm(),u=a.slice([t,t],[1,1]),l=u.sign().neg(),d=u.sub(l.mul(c)),f=e.div(d);s=1===f.shape[0]?o.clone():o.concat(f.slice([1,0],[f.shape[0]-1,f.shape[1]]),0);var h=l.matMul(d).div(c).neg(),p=a.slice([t,0],[n-t,r]),m=h.mul(s);a=0===t?p.sub(m.matMul(s.transpose().matMul(p))):a.slice([0,0],[t,r]).concat(p.sub(m.matMul(s.transpose().matMul(p))),0);var v=i.slice([0,t],[n,i.shape[1]-t]);return i=0===t?v.sub(v.matMul(s).matMul(m.transpose())):i.slice([0,0],[n,t]).concat(v.sub(v.matMul(s).matMul(m.transpose())),1),[s,a,i]}),s=e[0],a=e[1],i=e[2],Xt([c,u,l])},l=0;l<c;++l)u(l);return!e&&n>r&&(i=i.slice([0,0],[n,r]),a=a.slice([0,0],[r,r])),[i,a]})}var _u=xe({gramSchmidt_:function(t){var e;if(Array.isArray(t)){e=!1,b(null!=t&&t.length>0,function(){return"Gram-Schmidt process: input must not be null, undefined, or empty"});for(var n=t[0].shape[0],r=function(e){b(t[e].shape[0]===n,function(){return"Gram-Schmidt: Non-unique lengths found in the input vectors: ("+t[e].shape[0]+" vs. "+n+")"})},i=1;i<t.length;++i)r(i)}else e=!0,t=_a(t,t.shape[0],0).map(function(t){return Ga(t,[0])});b(t.length<=t[0].shape[0],function(){return"Gram-Schmidt: Number of vectors ("+t.length+") exceeds number of dimensions ("+t[0].shape[0]+")."});var a=[],o=t,s=function(t){a.push(zt.engine.tidy(function(){var e=o[t];if(t>0)for(var n=0;n<t;++n){var r=Us(a[n].mulStrict(e)).mul(a[n]);e=e.sub(r)}return e.div($c(e,"euclidean"))}))};for(i=0;i<t.length;++i)s(i);return e?Ka(a,0):a}}),gu=xe({qr_:function(t,e){if(void 0===e&&(e=!1),t.rank<2)throw new Error("qr() requires input tensor to have a rank >= 2, but got rank "+t.rank);if(2===t.rank)return vu(t,e);var n=t.shape.slice(0,t.shape.length-2).reduce(function(t,e){return t*e}),r=[],i=[];return Za(t.reshape([n,t.shape[t.shape.length-2],t.shape[t.shape.length-1]]),0).forEach(function(t){var n=vu(t,e),a=n[0],o=n[1];r.push(a),i.push(o)}),[Ka(r,0).reshape(t.shape),Ka(i,0).reshape(t.shape)]}}),bu=Object.freeze({gramSchmidt:_u,qr:gu});function yu(t,e,n,r,i){null==r&&(r=.5),null==i&&(i=Number.NEGATIVE_INFINITY);var a=t.shape[0];return n=Math.min(n,a),b(0<=r&&r<=1,function(){return"iouThreshold must be in [0, 1], but was '"+r+"'"}),b(2===t.rank,function(){return"boxes must be a 2D tensor, but was of rank '"+t.rank+"'"}),b(4===t.shape[1],function(){return"boxes must have 4 columns, but 2nd dimension was "+t.shape[1]}),b(1===e.rank,function(){return"scores must be a 1D tensor"}),b(e.shape[0]===a,function(){return"scores has incompatible shape with boxes. Expected "+a+", but was "+e.shape[0]}),{maxOutputSize:n,iouThreshold:r,scoreThreshold:i}}var xu=xe({resizeBilinear_:function(t,e,n){void 0===n&&(n=!1);var r=qt(t,"images","resizeBilinear");b(3===r.rank||4===r.rank,function(){return"Error in resizeBilinear: x must be rank 3 or 4, but got rank "+r.rank+"."}),b(2===e.length,function(){return"Error in resizeBilinear: new shape must 2D, but got shape "+e+"."});var i=r,a=!1;3===r.rank&&(a=!0,i=r.as4D(1,r.shape[0],r.shape[1],r.shape[2]));var o=e[0],s=e[1],c=zt.engine.runKernel(function(t,e){return e([i]),t.resizeBilinear(i,o,s,n)},{batchImages:i},function(t,e){return{batchImages:function(){return zt.engine.runKernel(function(r){return r.resizeBilinearBackprop(t,e[0],n)},{})}}});return a?c.as3D(c.shape[1],c.shape[2],c.shape[3]):c}}),wu=xe({resizeNearestNeighbor_:function(t,e,n){void 0===n&&(n=!1);var r=qt(t,"images","resizeNearestNeighbor");b(3===r.rank||4===r.rank,function(){return"Error in resizeNearestNeighbor: x must be rank 3 or 4, but got rank "+r.rank+"."}),b(2===e.length,function(){return"Error in resizeNearestNeighbor: new shape must 2D, but got shape "+e+"."}),b("float32"===r.dtype||"int32"===r.dtype,function(){return"`images` must have `int32` or `float32` as dtype"});var i=r,a=!1;3===r.rank&&(a=!0,i=r.as4D(1,r.shape[0],r.shape[1],r.shape[2]));var o=e[0],s=e[1],c=zt.engine.runKernel(function(t,e){return e([i]),t.resizeNearestNeighbor(i,o,s,n)},{batchImages:i},function(t,e){return{batchImages:function(){return zt.engine.runKernel(function(r){return r.resizeNearestNeighborBackprop(t,e[0],n)},{})}}});return a?c.as3D(c.shape[1],c.shape[2],c.shape[3]):c}}),ku=xe({nonMaxSuppression_:function(t,e,n,r,i){void 0===r&&(r=.5),void 0===i&&(i=Number.NEGATIVE_INFINITY);var a=qt(t,"boxes","nonMaxSuppression"),o=qt(e,"scores","nonMaxSuppression"),s=yu(a,o,n,r,i);return n=s.maxOutputSize,r=s.iouThreshold,i=s.scoreThreshold,zt.engine.runKernel(function(t){return t.nonMaxSuppression(a,o,n,r,i)},{$boxes:a})}}),Cu=function(t,e,n,r,i){return void 0===r&&(r=.5),void 0===i&&(i=Number.NEGATIVE_INFINITY),u(this,void 0,void 0,function(){var a,o,s,c,u,d;return l(this,function(l){switch(l.label){case 0:return a=qt(t,"boxes","nonMaxSuppressionAsync"),o=qt(e,"scores","nonMaxSuppressionAsync"),s=yu(a,o,n,r,i),n=s.maxOutputSize,r=s.iouThreshold,i=s.scoreThreshold,[4,a.data()];case 1:return c=l.sent(),[4,o.data()];case 2:return u=l.sent(),d=We(c,u,n,r,i),a!==t&&a.dispose(),o!==e&&o.dispose(),[2,d]}})})},Eu=xe({cropAndResize_:function(t,e,n,r,i,a){var o=qt(t,"image","cropAndResize","float32"),s=qt(e,"boxes","cropAndResize","float32"),c=qt(n,"boxInd","cropAndResize","int32");i=i||"bilinear",a=a||0;var u=s.shape[0];return b(4===o.rank,function(){return"Error in cropAndResize: image must be rank 4,but got rank "+o.rank+"."}),b(2===s.rank&&4===s.shape[1],function(){return"Error in cropAndResize: boxes must be have size ["+u+",4] but had shape "+s.shape+"."}),b(1===c.rank&&c.shape[0]===u,function(){return"Error in cropAndResize: boxInd must be have size ["+u+"] but had shape "+s.shape+"."}),b(2===r.length,function(){return"Error in cropAndResize: cropSize must be of length 2, but got length "+r.length+"."}),b(r[0]>=1&&r[1]>=1,function(){return"cropSize must be atleast [1,1], but was "+r}),b("bilinear"===i||"nearest"===i,function(){return"method must be bilinear or nearest, but was "+i}),zt.engine.runKernel(function(t,e){return t.cropAndResize(o,s,c,r,i,a)},{$image:o,$boxes:s})}}),Su=Object.freeze({resizeBilinear:xu,resizeNearestNeighbor:wu,nonMaxSuppression:ku,nonMaxSuppressionAsync:Cu,cropAndResize:Eu});var Iu=xe({matMul_:function(t,e,n,r,i,a){var o;void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===a&&(a="linear");var s=qt(t,"a","fused matMul"),c=qt(e,"b","fused matMul");o=Ct(s,c),s=o[0],c=o[1];var u=n?s.shape[s.rank-2]:s.shape[s.rank-1],l=r?c.shape[c.rank-1]:c.shape[c.rank-2],d=n?s.shape[s.rank-1]:s.shape[s.rank-2],f=r?c.shape[c.rank-2]:c.shape[c.rank-1],h=s.shape.slice(0,-2),p=c.shape.slice(0,-2),m=k(h),v=k(p);b(s.rank>=2&&c.rank>=2&&s.rank===c.rank,function(){return"Error in fused matMul: inputs must have the same rank of at least 2, got ranks "+s.rank+" and "+c.rank+"."}),b(C(h,p),function(){return"Error in fused matMul: outer dimensions ("+h+") and ("+p+") of Tensors with shapes "+s.shape+" and "+c.shape+" must match."}),b(u===l,function(){return"Error in fused matMul: inner shapes ("+u+") and ("+l+") of Tensors with shapes "+s.shape+" and "+c.shape+" and transposeA="+n+" and transposeB="+r+" must match."});var _,g=s.shape.slice(0,-2).concat([d,f]),y=n?s.as3D(m,u,d):s.as3D(m,d,u),x=r?c.as3D(v,f,l):c.as3D(v,l,f);null!=i&&en(g,(_=Ct(_=qt(i,"bias","fused matMul"),s)[0]).shape);var w={$a:y,$b:x};return null!=i&&(w.$bias=_),zt.engine.runKernel(function(t,e){var i=t.fusedBatchMatMul(y,x,n,r,_,a);return e([y,x,i]),i},w,function(t,e){var o,s=e[0],c=e[1],u=e[2];if(null==a||"linear"===a)o=t;else{if("relu"!==a)throw new Error("Gradient for activation "+a+" has not been implemented yet.");o=t.mul(u.step())}var l={};return null!=i&&(l={$bias:function(){var t=o,e=tn(_.shape,o.shape);return e.length>0&&(t=t.sum(e)),t.reshape(_.shape)}}),n||r?!n&&r?Object.assign({$a:function(){return o.matMul(c,!1,!1)},$b:function(){return o.matMul(s,!0,!1)}},l):n&&!r?Object.assign({$a:function(){return c.matMul(o,!1,!0)},$b:function(){return s.matMul(o,!1,!1)}},l):Object.assign({$a:function(){return c.matMul(o,!0,!0)},$b:function(){return o.matMul(s,!0,!0)}},l):Object.assign({$a:function(){return o.matMul(c,!1,!0)},$b:function(){return s.matMul(o,!0,!1)}},l)}).reshape(g)}}),Mu=Object.freeze({matMul:Iu}),Tu=Object.freeze({image:Su,linalg:bu,losses:mu,spectral:nu,fused:Mu,op:xe,batchNormalization2d:Wo,batchNormalization3d:Uo,batchNormalization4d:Go,batchNormalization:Ko,batchNorm:Xo,batchNorm2d:Jo,batchNorm3d:Zo,batchNorm4d:Qo,complex:Ce,real:Ee,imag:Se,concat:fa,concat1d:ha,concat2d:pa,concat3d:ma,concat4d:va,split:_a,conv1d:fs,conv2d:hs,conv3d:ps,conv2dDerFilter:ms,depthwiseConv2d:vs,separableConv2d:_s,conv2dTranspose:gs,matMul:bs,dot:ys,outerProduct:xs,reverse:ws,reverse1d:ks,reverse2d:Cs,reverse3d:Es,reverse4d:Ss,maxPool:Ts,avgPool:Ds,pool:Rs,slice:Ps,slice1d:Os,slice2d:Ls,slice3d:As,slice4d:Ns,abs:io,acos:ao,acosh:oo,asin:so,asinh:co,atan:uo,atanh:lo,ceil:fo,clipByValue:ho,cos:po,cosh:mo,erf:vo,exp:_o,expm1:go,floor:bo,log:yo,log1p:xo,logSigmoid:wo,neg:ko,reciprocal:Co,round:Eo,rsqrt:So,sigmoid:Io,sign:Mo,isNaN:To,isInf:Do,isFinite:Ro,sin:Po,sinh:Oo,softplus:Lo,sqrt:Ao,square:No,step:Bo,tan:jo,tanh:Fo,all:js,any:Fs,argMax:Ys,argMin:$s,logSumExp:zs,max:Vs,mean:Hs,min:qs,moments:Ws,sum:Us,prod:Gs,equal:Ks,equalStrict:Xs,greater:Js,greaterEqual:Zs,greaterEqualStrict:Qs,greaterStrict:tc,less:ec,lessEqual:nc,lessEqualStrict:rc,lessStrict:ic,notEqual:ac,notEqualStrict:oc,add:sc,addN:cc,addStrict:uc,atan2:lc,div:dc,divStrict:fc,floorDiv:hc,maximum:pc,maximumStrict:mc,minimum:vc,minimumStrict:_c,mod:gc,modStrict:bc,mul:yc,mulStrict:xc,pow:wc,powStrict:kc,squaredDifference:Cc,squaredDifferenceStrict:Ec,sub:Sc,subStrict:Ic,elu:Lc,leakyRelu:Ac,prelu:Nc,relu:Bc,selu:jc,logicalAnd:Mc,logicalNot:Tc,logicalOr:Dc,logicalXor:Rc,where:Pc,whereAsync:Oc,buffer:Ma,print:function(t,e){void 0===e&&(e=!1),console.log(t.toString(e))},batchToSpaceND:Ta,cast:Da,clone:Ra,cumsum:Pa,depthToSpace:Oa,expandDims:La,eye:Aa,multinomial:Na,oneHot:Ba,pad:ja,pad1d:Fa,pad2d:Ya,pad3d:$a,pad4d:za,rand:Va,randomNormal:Ha,randomUniform:qa,reshape:Wa,spaceToBatchND:Ua,squeeze:Ga,stack:Ka,tile:Xa,truncatedNormal:Ja,unstack:Za,setdiff1dAsync:Qa,fill:Ae,linspace:function(t,e,n){if(0===n)throw new Error("Cannot request zero samples");var r=(e-t)/(n-1),i=J(n,"float32");i[0]=t;for(var a=1;a<i.length;a++)i[a]=i[a-1]+r;return Te(i,"float32")},ones:Oe,range:Ne,scalar:Me,tensor:Ie,tensor1d:Te,tensor2d:De,tensor3d:Re,tensor4d:Pe,tensor5d:function(t,e,n){if(x(t),null!=e&&5!==e.length)throw new Error("tensor5d() requires shape to have five numbers");var r=Vt(t);if(5!==r.length&&1!==r.length)throw new Error("tensor5d() requires values to be number[][][][][] or flat/TypedArray");if(1===r.length&&null==e)throw new Error("tensor5d() requires shape to be provided when `values` are a flat array");return Ie(t,e=e||r,n)},tensor6d:function(t,e,n){if(x(t),null!=e&&6!==e.length)throw new Error("tensor6d() requires shape to have six numbers");var r=Vt(t);if(6!==r.length&&1!==r.length)throw new Error("tensor6d() requires values to be number[][][][][][] or flat/TypedArray");if(1===r.length&&null==e)throw new Error("tensor6d() requires shape to be provided when `values` are a flat array");return Ie(t,e=e||r,n)},zeros:Le,onesLike:Be,zerosLike:je,transpose:Fc,softmax:we,logSoftmax:ke,localResponseNormalization:Yc,norm:$c,gather:Hc,unsortedSegmentSum:qc,basicLSTMCell:Wc,multiRNNCell:Uc,movingAverage:Gc,stridedSlice:Kc,topk:Xc,scatterND:Jc,fft:Zc,ifft:Qc,rfft:tu,irfft:eu,sparseToDense:ru,gatherND:au});var Du=function(){function t(){this.blockSize=48,this.firstUse=!0,zt.get("IS_BROWSER")&&(this.fromPixels2DContext=document.createElement("canvas").getContext("2d"))}return t.prototype.setDataMover=function(t){this.data=new Fe(t)},t.prototype.register=function(t,e,n){if(this.firstUse&&(this.firstUse=!1,zt.get("IS_NODE")&&Jt("\n============================\nHi there 👋. Looks like you are running TensorFlow.js in Node.js. To speed things up dramatically, install our node backend, which binds to TensorFlow C++, by running npm i @tensorflow/tfjs-node, or npm i @tensorflow/tfjs-node-gpu if you have CUDA. Then call require('@tensorflow/tfjs-node'); (-gpu suffix for CUDA) at the start of your program. Visit https://github.com/tensorflow/tfjs-node for more details.\n============================\n")),this.data.has(t))throw new Error("Data buffer is already registered");this.data.set(t,{dtype:n})},t.prototype.write=function(t,e){if(null==e)throw new Error("MathBackendCPU.write(): values can not be null");this.data.get(t).values=e},t.prototype.fromPixels=function(t,e){if(null==t)throw new Error("pixels passed to tf.browser.fromPixels() can not be null");var n,r;if(zt.get("IS_NODE")&&null==t.getContext)throw new Error("When running in node, pixels must be an HTMLCanvasElement like the one returned by the `canvas` npm package");if(null!=t.getContext)n=t.getContext("2d").getImageData(0,0,t.width,t.height).data;else if(t instanceof ImageData)n=t.data;else{if(!(t instanceof HTMLImageElement||t instanceof HTMLVideoElement))throw new Error("pixels passed to tf.browser.fromPixels() must be either an HTMLVideoElement, HTMLImageElement, HTMLCanvasElement or ImageData, but was "+t.constructor.name);if(null==this.fromPixels2DContext)throw new Error("Can't read pixels from HTMLImageElement outside the browser.");this.fromPixels2DContext.canvas.width=t.width,this.fromPixels2DContext.canvas.height=t.height,this.fromPixels2DContext.drawImage(t,0,0,t.width,t.height),n=this.fromPixels2DContext.getImageData(0,0,t.width,t.height).data}if(4===e)r=new Int32Array(n);else{var i=t.width*t.height;r=new Int32Array(i*e);for(var a=0;a<i;a++)for(var o=0;o<e;++o)r[a*e+o]=n[4*a+o]}return Re(r,[t.height,t.width,e],"int32")},t.prototype.read=function(t){return u(this,void 0,void 0,function(){return l(this,function(e){return[2,this.readSync(t)]})})},t.prototype.readSync=function(t){var e=this.data.get(t),n=e.dtype,r=e.complexTensors;return"complex64"===n?ze(r.real.dataSync(),r.imag.dataSync()):this.data.get(t).values},t.prototype.disposeData=function(t){if(this.data.has(t)){var e=this.data.get(t).complexTensors;null!=e&&(e.real.dispose(),e.imag.dispose()),this.data.delete(t)}},t.prototype.time=function(t){return u(this,void 0,void 0,function(){var e;return l(this,function(n){return e=Z(),t(),[2,{kernelMs:Z()-e}]})})},t.prototype.memory=function(){return{unreliable:!0,reasons:["The reported memory is an upper bound. Due to automatic garbage collection, the true allocated memory may be less."]}},t.prototype.complex=function(t,e){var n=ht.make(t.shape,{},"complex64");return this.data.get(n.dataId).complexTensors={real:zt.engine.keep(t.clone()),imag:zt.engine.keep(e.clone())},n},t.prototype.real=function(t){return this.data.get(t.dataId).complexTensors.real.clone()},t.prototype.imag=function(t){return this.data.get(t.dataId).complexTensors.imag.clone()},t.prototype.assertNotComplex=function(t,e){Array.isArray(t)||(t=[t]),t.forEach(function(t){null!=t&&b("complex64"!==t.dtype,function(){return e+" does not support complex64 tensors."})})},t.prototype.slice=function(t,e,n){if(this.assertNotComplex(t,"slice"),be(t.shape,e,n)){var r=ye(e,t.strides),i=k(n);return Ie(t.dataSync().subarray(r,r+i),n,t.dtype)}for(var a=Ma(n,t.dtype),o=t.bufferSync(),s=0;s<a.size;++s){var c=a.indexToLoc(s).map(function(t,n){return t+e[n]});a.values[s]=o.get.apply(o,c)}return a.toTensor()},t.prototype.stridedSlice=function(t,e,n,r,i,a,o,s,c){this.assertNotComplex(t,"stridedSlice");var u=ve(t.shape,e,n,r,i,a,o,s,c),l=u[0],d=u[1],f=u[2],h=d.filter(function(t,e){return-1===f.indexOf(e)});if(h.some(function(t){return 0===t}))return Ie([],h);for(var p=Ma(d,t.dtype),m=t.bufferSync(),v=0;v<p.size;v++){for(var _=p.indexToLoc(v),g=new Array(_.length),b=0;b<g.length;b++)g[b]=_[b]*r[b]+l[b];p.set.apply(p,[m.get.apply(m,g)].concat(_))}return p.toTensor().reshape(h)},t.prototype.unstack=function(t,e){for(var n=t.shape[e],r=new Array(t.rank-1),i=0,a=0;a<t.rank;a++)a!==e&&(r[i++]=t.shape[a]);var o=new Array(t.rank).fill(0),s=t.shape.slice();s[e]=1;var c=new Array(n);for(a=0;a<c.length;a++)o[e]=a,c[a]=this.slice(t,o,s).reshape(r);return c},t.prototype.reverse=function(t,e){this.assertNotComplex(t,"reverse");for(var n=Ma(t.shape,t.dtype),r=t.bufferSync(),i=function(i){var a=n.indexToLoc(i),o=a.slice();e.forEach(function(e){return o[e]=t.shape[e]-1-o[e]}),n.set.apply(n,[r.get.apply(r,o)].concat(a))},a=0;a<n.size;a++)i(a);return n.toTensor()},t.prototype.concat=function(t,e){this.assertNotComplex(t,"concat");var n=t.map(function(t){var n=k(t.shape.slice(e));return t.as2D(-1,n)}),r=le(n.map(function(t){return t.shape}),1),i=Ma(r,t[0].dtype).values;if(1===n[0].shape[0]){var a=0;n.forEach(function(t){i.set(t.dataSync(),a),a+=t.size})}else{var o=0;n.forEach(function(t){for(var e=t.dataSync(),n=0,a=0;a<t.shape[0];++a)for(var s=a*r[1]+o,c=0;c<t.shape[1];++c)i[s+c]=e[n++];o+=t.shape[1]})}var s=le(t.map(function(t){return t.shape}),e);return Ie(i,s,t[0].dtype)},t.prototype.neg=function(t){return this.assertNotComplex(t,"neg"),this.multiply(Me(-1),t)},t.prototype.add=function(t,e){return"complex64"===t.dtype||"complex64"===e.dtype?this.broadcastedBinaryComplexOp(t.cast("complex64"),e.cast("complex64"),function(t,e,n,r){return{real:t+n,imag:e+r}}):this.broadcastedBinaryOp(t,e,wt(t.dtype,e.dtype),function(t,e){return t+e})},t.prototype.addN=function(t){this.assertNotComplex(t,"addN");for(var e=t.map(function(t){return t.dataSync()}),n=Ma(t[0].shape,t[0].dtype),r=n.values,i=0;i<t.length;i++)for(var a=e[i],o=0;o<r.length;o++)r[o]+=a[o];return n.toTensor()},t.prototype.subtract=function(t,e){return"complex64"===t.dtype||"complex64"===e.dtype?this.broadcastedBinaryComplexOp(t.cast("complex64"),e.cast("complex64"),function(t,e,n,r){return{real:t-n,imag:e-r}}):this.broadcastedBinaryOp(t,e,wt(t.dtype,e.dtype),function(t,e){return t-e})},t.prototype.pow=function(t,e){return this.assertNotComplex([t,e],"pow"),this.broadcastedBinaryOp(t,e,t.dtype,function(t,e){return Math.pow(t,e)})},t.prototype.batchMatMul=function(t,e,n,r){this.assertNotComplex([t,e],"matMul");for(var i=n?t.shape[1]:t.shape[2],a=n?t.shape[2]:t.shape[1],o=r?e.shape[1]:e.shape[2],s=t.shape[0],c=t.dataSync(),u=e.dataSync(),l=n?[t.strides[0],1,t.strides[1]]:[t.strides[0],t.strides[1],1],d=l[0],f=l[1],h=l[2],p=r?[1,e.strides[1],e.strides[0]]:[e.strides[1],1,e.strides[0]],m=p[0],v=p[1],_=p[2],g=a*o,b=Ma([s,a,o],t.dtype),y=b.values,x=this.blockSize,w=0;w<s;w++)for(var k=0;k<a;k+=x)for(var C=0;C<o;C+=x)for(var E=0;E<i;E+=x)for(var S=Math.min(k+x,a),I=Math.min(C+x,o),M=Math.min(E+x,i),T=k;T<S;T++)for(var D=C;D<I;D++){for(var R=0,P=E;P<M;P++)R+=c[w*d+T*f+P*h]*u[P*m+D*v+w*_];y[w*g+(T*o+D)]+=R}return b.toTensor()},t.prototype.fusedBatchMatMul=function(t,e,n,r,i,a){var o=this.batchMatMul(t,e,n,r);return i&&(o=this.add(o,i)),a&&(o=function(t,e,n){if("linear"===e)return t.linear(n);if("relu"===e)return t.relu(n);throw new Error("Activation "+e+" has not been implemented for the CPU backend.")}(this,a,o)),o},t.prototype.multiply=function(t,e){return"complex64"===t.dtype||"complex64"===e.dtype?this.broadcastedBinaryComplexOp(t.cast("complex64"),e.cast("complex64"),function(t,e,n,r){return{real:t*n-e*r,imag:t*r+e*n}}):this.broadcastedBinaryOp(t,e,wt(t.dtype,e.dtype),function(t,e){return t*e})},t.prototype.realDivide=function(t,e){return this.assertNotComplex([t,e],"realDivide"),this.broadcastedBinaryOp(t,e,"float32",function(t,e){return t/e})},t.prototype.floorDiv=function(t,e){return this.assertNotComplex([t,e],"floorDiv"),this.broadcastedBinaryOp(t,e,"int32",function(t,e){return Math.floor(t/e)})},t.prototype.sum=function(t,e){this.assertNotComplex(t,"sum"),oe("sum",e,t.rank);for(var n=ie(t.shape,e),r=n[0],i=n[1],a=Le(r,wt(t.dtype,"int32")),o=k(i),s=a.dataSync(),c=t.dataSync(),u=0;u<s.length;++u){for(var l=u*o,d=0,f=0;f<o;++f)d+=c[l+f];s[u]=d}return a},t.prototype.prod=function(t,e){this.assertNotComplex(t,"sum");for(var n=ie(t.shape,e),r=n[0],i=n[1],a=Le(r,wt(t.dtype,"int32")),o=k(i),s=a.dataSync(),c=t.dataSync(),u=0;u<s.length;++u){for(var l=u*o,d=1,f=0;f<o;++f)d*=c[l+f];s[u]=d}return a},t.prototype.unsortedSegmentSum=function(t,e,n){this.assertNotComplex(t,"unsortedSegmentSum");for(var r=[],i=t.rank-e.rank,a=0;a<i;++a)e=e.expandDims(a+1);for(a=0;a<n;++a){var o=Me(a,"int32"),s=Ks(o,e).asType("float32").mul(t).sum(0);r.push(s)}return Ka(r)},t.prototype.argMin=function(t,e){this.assertNotComplex(t,"argMin");var n=[e];oe("argMin",n,t.rank);for(var r=ie(t.shape,n),i=r[0],a=r[1],o=Le(i,"int32"),s=k(a),c=o.dataSync(),u=t.dataSync(),l=0;l<c.length;++l){for(var d=l*s,f=u[d],h=0,p=0;p<s;++p){var m=u[d+p];m<f&&(f=m,h=p)}c[l]=h}return o},t.prototype.argMax=function(t,e){this.assertNotComplex(t,"argMax");var n=[e];oe("argMax",n,t.rank);for(var r=ie(t.shape,n),i=r[0],a=r[1],o=Le(i,"int32"),s=k(a),c=o.dataSync(),u=t.dataSync(),l=0;l<c.length;++l){for(var d=l*s,f=u[d],h=0,p=0;p<s;++p){var m=u[d+p];m>f&&(f=m,h=p)}c[l]=h}return o},t.prototype.cumsum=function(t,e,n,r){if(this.assertNotComplex(t,"cumsum"),e!==t.rank-1)throw new Error("backend.cumsum in CPU expects an inner-most axis="+(t.rank-1)+" but got axis="+e);for(var i=wt(t.dtype,"int32"),a=Le(t.shape,i),o=a.dataSync(),s=t.dataSync(),c=t.shape[t.rank-1],u=r?function(t,e){return t+c-e-1}:function(t,e){return t+e},l=0;l<s.length;l+=c)for(var d=0;d<c;d++){var f=u(l,d);if(0===d)o[f]=n?0:s[f];else{var h=u(l,d-1);o[f]=n?s[h]+o[h]:s[f]+o[h]}}return a},t.prototype.equal=function(t,e){return this.assertNotComplex([t,e],"equal"),this.broadcastedBinaryOp(t,e,"bool",function(t,e){return t===e?1:0})},t.prototype.notEqual=function(t,e){return this.assertNotComplex([t,e],"notEqual"),this.broadcastedBinaryOp(t,e,"bool",function(t,e){return t!==e?1:0})},t.prototype.less=function(t,e){return this.assertNotComplex([t,e],"less"),this.broadcastedBinaryOp(t,e,"bool",function(t,e){return t<e?1:0})},t.prototype.lessEqual=function(t,e){return this.assertNotComplex([t,e],"lessEqual"),this.broadcastedBinaryOp(t,e,"bool",function(t,e){return t<=e?1:0})},t.prototype.greater=function(t,e){return this.assertNotComplex([t,e],"greater"),this.broadcastedBinaryOp(t,e,"bool",function(t,e){return t>e?1:0})},t.prototype.greaterEqual=function(t,e){return this.assertNotComplex([t,e],"greaterEqual"),this.broadcastedBinaryOp(t,e,"bool",function(t,e){return t>=e?1:0})},t.prototype.logicalNot=function(t){this.assertNotComplex(t,"logicalNot");for(var e=t.dataSync(),n=new Uint8Array(e.length),r=0;r<e.length;++r)n[r]=e[r]?0:1;return ht.make(t.shape,{values:n},"bool")},t.prototype.logicalAnd=function(t,e){return this.assertNotComplex([t,e],"logicalAnd"),this.broadcastedBinaryOp(t,e,"bool",function(t,e){return t&&e})},t.prototype.logicalOr=function(t,e){return this.assertNotComplex([t,e],"logicalOr"),this.broadcastedBinaryOp(t,e,"bool",function(t,e){return t||e})},t.prototype.select=function(t,e,n){this.assertNotComplex([t,e,n],"select");for(var r=t.dataSync(),i=e.dataSync(),a=n.dataSync(),o=Le(e.shape,wt(e.dtype,n.dtype)),s=o.dataSync(),c=0,u=0===t.rank||t.rank>1||1===e.rank?1:e.shape[1],l=0;l<r.length;l++)for(var d=0;d<u;d++)1===r[l]?s[c++]=i[l]:s[c++]=a[l];return o},t.prototype.where=function(t){this.assertNotComplex([t],"where");var e=t.dataSync();return to(t.shape,e)},t.prototype.topk=function(t,e,n){return this.assertNotComplex(t,"topk"),Ke(t.dataSync(),t.shape,t.dtype,e)},t.prototype.min=function(t,e){this.assertNotComplex(t,"min"),oe("min",e,t.rank);for(var n=ie(t.shape,e),r=n[0],i=n[1],a=Le(r,t.dtype),o=k(i),s=a.dataSync(),c=t.dataSync(),u=0;u<s.length;++u){for(var l=u*o,d=c[l],f=0;f<o;++f){var h=c[l+f];h<d&&(d=h)}s[u]=d}return a},t.prototype.minimum=function(t,e){return this.assertNotComplex([t,e],"minimum"),this.broadcastedBinaryOp(t,e,t.dtype,function(t,e){return Math.min(t,e)})},t.prototype.mod=function(t,e){return this.assertNotComplex([t,e],"mod"),this.broadcastedBinaryOp(t,e,t.dtype,function(t,e){var n=t%e;return t<0&&e<0||t>=0&&e>=0?n:(n+e)%e})},t.prototype.max=function(t,e){this.assertNotComplex(t,"max"),oe("max",e,t.rank);for(var n=ie(t.shape,e),r=n[0],i=n[1],a=Le(r,t.dtype),o=k(i),s=a.dataSync(),c=t.dataSync(),u=0;u<s.length;++u){for(var l=u*o,d=c[l],f=0;f<o;++f){var h=c[l+f];h>d&&(d=h)}s[u]=d}return a},t.prototype.maximum=function(t,e){return this.assertNotComplex([t,e],"maximum"),this.broadcastedBinaryOp(t,e,t.dtype,function(t,e){return Math.max(t,e)})},t.prototype.all=function(t,e){this.assertNotComplex(t,"all"),oe("all",e,t.rank);for(var n=ie(t.shape,e),r=n[0],i=n[1],a=Le(r,t.dtype),o=k(i),s=a.dataSync(),c=t.dataSync(),u=0;u<s.length;++u){for(var l=u*o,d=c[l],f=0;f<o;++f){var h=c[l+f];d=d&&h}s[u]=d}return a},t.prototype.any=function(t,e){this.assertNotComplex(t,"any"),oe("any",e,t.rank);for(var n=ie(t.shape,e),r=n[0],i=n[1],a=Le(r,t.dtype),o=k(i),s=a.dataSync(),c=t.dataSync(),u=0;u<s.length;++u){for(var l=u*o,d=c[l],f=0;f<o;++f){var h=c[l+f];d=d||h}s[u]=d}return a},t.prototype.squaredDifference=function(t,e){return this.assertNotComplex([t,e],"squaredDifference"),this.broadcastedBinaryOp(t,e,t.dtype,function(t,e){var n=t-e;return n*n})},t.prototype.ceil=function(t){this.assertNotComplex(t,"ceil");for(var e=t.dataSync(),n=new Float32Array(e.length),r=0;r<e.length;++r)n[r]=Math.ceil(e[r]);return ht.make(t.shape,{values:n})},t.prototype.floor=function(t){this.assertNotComplex(t,"floor");for(var e=t.dataSync(),n=new Float32Array(e.length),r=0;r<e.length;++r)n[r]=Math.floor(e[r]);return ht.make(t.shape,{values:n})},t.prototype.sign=function(t){this.assertNotComplex(t,"x");for(var e=t.dataSync(),n=new Float32Array(e.length),r=0;r<e.length;++r)e[r]<0?n[r]=-1:e[r]>0?n[r]=1:n[r]=0;return ht.make(t.shape,{values:n})},t.prototype.isNaN=function(t){this.assertNotComplex(t,"x");for(var e=t.dataSync(),n=new Uint8Array(e.length),r=0;r<e.length;++r)Number.isNaN(e[r])&&(n[r]=1);return ht.make(t.shape,{values:n},"bool")},t.prototype.isInf=function(t){this.assertNotComplex(t,"x");for(var e=t.dataSync(),n=new Uint8Array(e.length),r=0;r<e.length;++r)Math.abs(e[r])===1/0&&(n[r]=1);return ht.make(t.shape,{values:n},"bool")},t.prototype.isFinite=function(t){this.assertNotComplex(t,"x");for(var e=t.dataSync(),n=new Uint8Array(e.length),r=0;r<e.length;++r)Number.isFinite(e[r])&&(n[r]=1);return ht.make(t.shape,{values:n},"bool")},t.prototype.round=function(t){this.assertNotComplex(t,"round");for(var e=t.dataSync(),n=new Float32Array(e.length),r=0;r<e.length;++r){var i=Math.floor(e[r]);e[r]-i<.5?n[r]=Math.floor(e[r]):e[r]-i>.5?n[r]=Math.ceil(e[r]):n[r]=i%2==0?i:i+1}return ht.make(t.shape,{values:n})},t.prototype.exp=function(t){this.assertNotComplex(t,"exp");for(var e=t.dataSync(),n=new Float32Array(e.length),r=0;r<e.length;++r)n[r]=Math.exp(e[r]);return ht.make(t.shape,{values:n})},t.prototype.expm1=function(t){this.assertNotComplex(t,"expm1");for(var e=t.dataSync(),n=new Float32Array(e.length),r=0;r<e.length;++r)n[r]=Math.expm1(e[r]);return ht.make(t.shape,{values:n})},t.prototype.log=function(t){this.assertNotComplex(t,"log");for(var e=t.dataSync(),n=new Float32Array(e.length),r=0;r<e.length;++r){var i=e[r];n[r]=Math.log(i)}return ht.make(t.shape,{values:n})},t.prototype.log1p=function(t){this.assertNotComplex(t,"log1p");for(var e=t.dataSync(),n=new Float32Array(e.length),r=0;r<e.length;++r){var i=e[r];n[r]=Math.log1p(i)}return ht.make(t.shape,{values:n})},t.prototype.sqrt=function(t){this.assertNotComplex(t,"sqrt");for(var e=t.dataSync(),n=new Float32Array(e.length),r=0;r<e.length;++r){var i=e[r];n[r]=Math.sqrt(i)}return ht.make(t.shape,{values:n})},t.prototype.rsqrt=function(t){this.assertNotComplex(t,"rsqrt");for(var e=t.dataSync(),n=new Float32Array(e.length),r=0;r<e.length;++r){var i=e[r];n[r]=1/Math.sqrt(i)}return ht.make(t.shape,{values:n})},t.prototype.square=function(t){this.assertNotComplex(t,"square");for(var e=t.dataSync(),n=new Float32Array(e.length),r=0;r<e.length;++r){var i=e[r];n[r]=i*i}return ht.make(t.shape,{values:n})},t.prototype.reciprocal=function(t){this.assertNotComplex(t,"reciprocal");for(var e=t.dataSync(),n=new Float32Array(e.length),r=0;r<e.length;++r)n[r]=1/e[r];return ht.make(t.shape,{values:n})},t.prototype.linear=function(t){return t},t.prototype.relu=function(t){this.assertNotComplex(t,"relu");for(var e=Le(t.shape,t.dtype),n=e.dataSync(),r=t.dataSync(),i=0;i<r.length;++i)n[i]=Math.max(0,r[i]);return e},t.prototype.prelu=function(t,e){return this.assertNotComplex([t,e],"prelu"),this.broadcastedBinaryOp(t,e,t.dtype,function(t,e){return t<0?e*t:t})},t.prototype.elu=function(t){this.assertNotComplex(t,"elu");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r){var i=n[r];e[r]=i>=0?i:Math.exp(i)-1}return ht.make(t.shape,{values:e})},t.prototype.eluDer=function(t,e){this.assertNotComplex([t,e],"eluDer");for(var n=new Float32Array(e.size),r=e.dataSync(),i=t.dataSync(),a=0;a<r.length;++a){var o=r[a];n[a]=o>=1?i[a]:i[a]*(o+1)}return ht.make(e.shape,{values:n})},t.prototype.selu=function(t){this.assertNotComplex(t,"selu");for(var e=Ki,n=Xi,r=new Float32Array(t.size),i=t.dataSync(),a=0;a<i.length;++a){var o=i[a];r[a]=o>=0?n*o:e*(Math.exp(o)-1)}return ht.make(t.shape,{values:r})},t.prototype.clip=function(t,e,n){this.assertNotComplex(t,"clip");for(var r=new Float32Array(t.size),i=t.dataSync(),a=0;a<i.length;++a){var o=i[a];r[a]=o>n?n:o<e?e:o}return ht.make(t.shape,{values:r})},t.prototype.abs=function(t){for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=Math.abs(n[r]);return ht.make(t.shape,{values:e})},t.prototype.complexAbs=function(t){for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<t.size;++r){var i=n[2*r],a=n[2*r+1];e[r]=Math.hypot(i,a)}return ht.make(t.shape,{values:e})},t.prototype.int=function(t){this.assertNotComplex(t,"int");for(var e=new Int32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=n[r];return ht.make(t.shape,{values:e},"int32")},t.prototype.sigmoid=function(t){this.assertNotComplex(t,"sigmoid");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=1/(1+Math.exp(-n[r]));return ht.make(t.shape,{values:e})},t.prototype.softplus=function(t){this.assertNotComplex(t,"softplus");for(var e=Math.log(1.1920928955078125e-7)+2,n=new Float32Array(t.size),r=t.dataSync(),i=0;i<r.length;++i){var a,o=r[i]>-e,s=r[i]<e,c=Math.exp(r[i]);a=s?c:o?r[i]:Math.log(1+c),n[i]=a}return ht.make(t.shape,{values:n})},t.prototype.sin=function(t){this.assertNotComplex(t,"sin");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=Math.sin(n[r]);return ht.make(t.shape,{values:e})},t.prototype.cos=function(t){this.assertNotComplex(t,"cos");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=Math.cos(n[r]);return ht.make(t.shape,{values:e})},t.prototype.tan=function(t){this.assertNotComplex(t,"tan");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=Math.tan(n[r]);return ht.make(t.shape,{values:e})},t.prototype.asin=function(t){this.assertNotComplex(t,"asin");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=Math.asin(n[r]);return ht.make(t.shape,{values:e})},t.prototype.acos=function(t){this.assertNotComplex(t,"acos");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=Math.acos(n[r]);return ht.make(t.shape,{values:e})},t.prototype.atan=function(t){this.assertNotComplex(t,"atan");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=Math.atan(n[r]);return ht.make(t.shape,{values:e})},t.prototype.atan2=function(t,e){return this.assertNotComplex([t,e],"atan2"),this.broadcastedBinaryOp(t,e,t.dtype,function(t,e){return Math.atan2(t,e)})},t.prototype.sinh=function(t){this.assertNotComplex(t,"sinh");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=Math.sinh(n[r]);return ht.make(t.shape,{values:e})},t.prototype.cosh=function(t){this.assertNotComplex(t,"cosh");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=Math.cosh(n[r]);return ht.make(t.shape,{values:e})},t.prototype.tanh=function(t){this.assertNotComplex(t,"tanh");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=S(n[r]);return ht.make(t.shape,{values:e})},t.prototype.asinh=function(t){this.assertNotComplex(t,"asinh");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=Math.asinh(n[r]);return ht.make(t.shape,{values:e})},t.prototype.acosh=function(t){this.assertNotComplex(t,"acosh");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=Math.acosh(n[r]);return ht.make(t.shape,{values:e})},t.prototype.atanh=function(t){this.assertNotComplex(t,"atanh");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=Math.atanh(n[r]);return ht.make(t.shape,{values:e})},t.prototype.erf=function(t){this.assertNotComplex(t,"erf");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r){var i=n[r],a=1/(1+.3275911*i);e[r]=1-((((1.061405429*a-1.453152027)*a+1.421413741)*a-.284496736)*a+.254829592)*a*Math.exp(-i*i)}return ht.make(t.shape,{values:e})},t.prototype.step=function(t,e){void 0===e&&(e=0),this.assertNotComplex(t,"step");for(var n=new Float32Array(t.size),r=t.dataSync(),i=0;i<r.length;++i){var a=r[i];isNaN(a)?n[i]=NaN:n[i]=a>0?1:e}return ht.make(t.shape,{values:n})},t.prototype.conv2d=function(t,e,n){this.assertNotComplex([t,e],"conv2d");for(var r=n.filterHeight,i=n.filterWidth,a=n.dilationHeight,o=n.dilationWidth,s=n.padInfo.left,c=n.padInfo.top,u=Ma(n.outShape,t.dtype),l=t.dataSync(),d=e.dataSync(),f=u.values,h=0;h<n.batchSize;++h)for(var p=h*t.strides[0],m=h*u.strides[0],v=0;v<n.outHeight;++v)for(var _=m+v*u.strides[1],g=v*n.strideHeight-s,b=0;b<r;b++){var y=g+b*a;if(!(y<0||y>=n.inHeight))for(var x=b*e.strides[0],w=p+y*t.strides[1],k=0;k<n.outWidth;++k)for(var C=_+k*n.outChannels,E=k*n.strideWidth-c,S=0;S<i;S++){var I=E+S*o;if(!(I<0||I>=n.inWidth))for(var M=x+S*e.strides[1],T=w+I*n.inChannels,D=M,R=0;R<n.inChannels;++R){for(var P=l[T+R],O=0;O<n.outChannels;++O)f[C+O]+=P*d[D+O];D+=n.outChannels}}}return u.toTensor()},t.prototype.conv3d=function(t,e,n){for(var r=n.filterDepth,i=n.filterHeight,a=n.filterWidth,o=n.dilationDepth,s=n.dilationHeight,c=n.dilationWidth,u=n.padInfo.front,l=n.padInfo.left,d=n.padInfo.top,f=Ma(n.outShape,t.dtype),h=t.dataSync(),p=e.dataSync(),m=f.values,v=0;v<n.batchSize;++v)for(var _=v*t.strides[0],g=v*f.strides[0],b=0;b<n.outDepth;++b)for(var y=g+b*f.strides[1],x=b*n.strideDepth-u,w=0;w<r;w++){var k=x+w*o;if(!(k<0||k>=n.inDepth))for(var C=w*e.strides[0],E=_+k*t.strides[1],S=0;S<n.outHeight;++S)for(var I=y+S*f.strides[2],M=S*n.strideHeight-d,T=0;T<i;T++){var D=M+T*s;if(!(D<0||D>=n.inHeight))for(var R=C+T*e.strides[1],P=E+D*t.strides[2],O=0;O<n.outWidth;++O)for(var L=I+O*n.outChannels,A=O*n.strideWidth-l,N=0;N<a;N++){var B=A+N*c;if(!(B<0||B>=n.inWidth))for(var j=R+N*e.strides[2],F=P+B*n.inChannels,Y=j,$=0;$<n.inChannels;++$){for(var z=h[F+$],V=0;V<n.outChannels;++V)m[L+V]+=z*p[Y+V];Y+=n.outChannels}}}}return f.toTensor()},t.prototype.conv2dDerInput=function(t,e,n){this.assertNotComplex([t,e],"conv2dDerInput");for(var r=Ma(n.inShape,"float32"),i=r.values,a=r.strides,o=a[0],s=a[1],c=a[2],u=t.dataSync(),l=t.strides,d=l[0],f=l[1],h=l[2],p=e.dataSync(),m=e.strides,v=m[0],_=m[1],g=m[2],b=n.batchSize,y=n.filterHeight,x=n.filterWidth,w=n.inChannels,k=n.inHeight,C=n.inWidth,E=n.outChannels,S=n.outHeight,I=n.outWidth,M=n.strideHeight,T=n.strideWidth,D=y-1-n.padInfo.top,R=x-1-n.padInfo.left,P=0;P<b;++P)for(var O=0;O<w;++O)for(var L=0;L<k;++L)for(var A=L-D,N=Math.max(0,Math.ceil(A/M)),B=Math.min(S,(y+A)/M),j=0;j<C;++j){for(var F=j-R,Y=Math.max(0,Math.ceil(F/T)),$=Math.min(I,(x+F)/T),z=0,V=N;V<B;++V)for(var H=V*M-A,q=Y;q<$;++q)for(var W=d*P+f*V+h*q,U=v*(y-1-H)+_*(x-1-(q*T-F))+g*O,G=0;G<E;++G)z+=u[W+G]*p[U+G];i[o*P+s*L+c*j+O]=z}return r.toTensor()},t.prototype.conv3dDerInput=function(t,e,n){for(var r=Ma(n.inShape,"float32"),i=r.values,a=r.strides,o=a[0],s=a[1],c=a[2],u=a[3],l=t.dataSync(),d=t.strides,f=d[0],h=d[1],p=d[2],m=d[3],v=e.dataSync(),_=e.strides,g=_[0],b=_[1],y=_[2],x=_[3],w=n.batchSize,k=n.filterDepth,C=n.filterHeight,E=n.filterWidth,S=n.inChannels,I=n.inDepth,M=n.inHeight,T=n.inWidth,D=n.outChannels,R=n.outDepth,P=n.outHeight,O=n.outWidth,L=n.strideDepth,A=n.strideHeight,N=n.strideWidth,B=k-1-n.padInfo.front,j=C-1-n.padInfo.top,F=E-1-n.padInfo.left,Y=0;Y<w;++Y)for(var $=0;$<S;++$)for(var z=0;z<I;++z)for(var V=z-B,H=Math.max(0,Math.ceil(V/L)),q=Math.min(R,(k+V)/L),W=0;W<M;++W)for(var U=W-j,G=Math.max(0,Math.ceil(U/A)),K=Math.min(P,(C+U)/A),X=0;X<T;++X){for(var J=X-F,Z=Math.max(0,Math.ceil(J/N)),Q=Math.min(O,(E+J)/N),tt=0,et=H;et<q;++et)for(var nt=et*L-V,rt=G;rt<K;++rt)for(var it=rt*A-U,at=Z;at<Q;++at)for(var ot=f*Y+h*et+p*rt+m*at,st=g*(k-1-nt)+b*(C-1-it)+y*(E-1-(at*N-J))+x*$,ct=0;ct<D;++ct)tt+=l[ot+ct]*v[st+ct];i[o*Y+s*z+c*W+u*X+$]=tt}return r.toTensor()},t.prototype.conv2dDerFilter=function(t,e,n){this.assertNotComplex([t,e],"conv2dDerFilter");for(var r=n.strideHeight,i=n.strideWidth,a=n.filterHeight,o=n.filterWidth,s=Ma(n.filterShape,"float32"),c=n.padInfo.left,u=n.padInfo.top,l=t.bufferSync(),d=e.bufferSync(),f=0;f<a;++f)for(var h=Math.max(0,Math.ceil((u-f)/r)),p=Math.min(n.outHeight,(n.inHeight+u-f)/r),m=0;m<o;++m)for(var v=Math.max(0,Math.ceil((c-m)/i)),_=Math.min(n.outWidth,(n.inWidth+c-m)/i),g=0;g<n.inChannels;++g)for(var b=0;b<n.outChannels;++b){for(var y=0,x=0;x<n.batchSize;++x)for(var w=h;w<p;++w)for(var k=f+w*r-u,C=v;C<_;++C){var E=m+C*i-c;y+=l.get(x,k,E,g)*d.get(x,w,C,b)}s.set(y,f,m,g,b)}return s.toTensor()},t.prototype.conv3dDerFilter=function(t,e,n){for(var r=n.strideDepth,i=n.strideHeight,a=n.strideWidth,o=n.filterDepth,s=n.filterHeight,c=n.filterWidth,u=Ma(n.filterShape,"float32"),l=u.values,d=u.strides,f=d[0],h=d[1],p=d[2],m=d[3],v=e.dataSync(),_=e.strides,g=_[0],b=_[1],y=_[2],x=_[3],w=t.dataSync(),k=t.strides,C=k[0],E=k[1],S=k[2],I=k[3],M=n.padInfo.front,T=n.padInfo.left,D=n.padInfo.top,R=0;R<o;++R)for(var P=Math.max(0,Math.ceil((M-R)/r)),O=Math.min(n.outDepth,(n.inDepth+M-R)/r),L=R*f,A=0;A<s;++A)for(var N=Math.max(0,Math.ceil((D-A)/i)),B=Math.min(n.outHeight,(n.inHeight+D-A)/i),j=A*h+L,F=0;F<c;++F)for(var Y=Math.max(0,Math.ceil((T-F)/a)),$=Math.min(n.outWidth,(n.inWidth+T-F)/a),z=F*p+j,V=0;V<n.inChannels;++V)for(var H=V*m+z,q=0;q<n.outChannels;++q){for(var W=0,U=0;U<n.batchSize;++U)for(var G=U*C,K=U*g,X=P;X<O;++X)for(var J=(R+X*r-M)*E+G,Z=X*b+K,Q=N;Q<B;++Q)for(var tt=(A+Q*i-D)*S+J,et=Q*y+Z,nt=Y;nt<$;++nt){var rt=nt*x+et;W+=w[(F+nt*a-T)*I+tt+V]*v[rt+q]}l[H+q]=W}return u.toTensor()},t.prototype.depthwiseConv2D=function(t,e,n){this.assertNotComplex([t,e],"depthwiseConv2D");for(var r=n.filterHeight,i=n.filterWidth,a=n.dilationHeight,o=n.dilationWidth,s=n.padInfo.left,c=n.padInfo.top,u=n.outChannels/n.inChannels,l=Ma(n.outShape,t.dtype),d=t.dataSync(),f=e.dataSync(),h=l.values,p=0;p<n.batchSize;++p)for(var m=p*t.strides[0],v=p*l.strides[0],_=0;_<n.outHeight;++_)for(var g=v+_*l.strides[1],b=_*n.strideHeight-s,y=0;y<r;++y){var x=b+y*a;if(!(x<0||x>=n.inHeight))for(var w=y*e.strides[0],k=m+x*t.strides[1],C=0;C<n.outWidth;++C)for(var E=g+C*l.strides[2],S=C*n.strideWidth-c,I=0;I<i;++I){var M=S+I*o;if(!(M<0||M>=n.inWidth))for(var T=w+I*e.strides[1],D=k+M*n.inChannels,R=E,P=T,O=0;O<n.inChannels;++O){for(var L=d[D+O],A=0;A<u;++A)h[R+A]+=L*f[P+A];R+=u,P+=u}}}return l.toTensor()},t.prototype.depthwiseConv2DDerInput=function(t,e,n){this.assertNotComplex([t,e],"depthwiseConv2DDerInput");for(var r=Ma(n.inShape,"float32"),i=r.values,a=r.strides,o=a[0],s=a[1],c=a[2],u=t.dataSync(),l=t.strides,d=l[0],f=l[1],h=l[2],p=e.dataSync(),m=e.strides,v=m[0],_=m[1],g=m[2],b=n.batchSize,y=n.filterHeight,x=n.filterWidth,w=n.inChannels,k=n.inHeight,C=n.inWidth,E=n.outChannels,S=n.outHeight,I=n.outWidth,M=n.strideHeight,T=n.strideWidth,D=y-1-n.padInfo.top,R=x-1-n.padInfo.left,P=E/w,O=0;O<b;++O)for(var L=0;L<w;++L)for(var A=0;A<k;++A)for(var N=A-D,B=Math.max(0,Math.ceil(N/M)),j=Math.min(S,(y+N)/M),F=0;F<C;++F){for(var Y=F-R,$=Math.max(0,Math.ceil(Y/T)),z=Math.min(I,(x+Y)/T),V=0,H=B;H<j;++H)for(var q=H*M-N,W=$;W<z;++W)for(var U=d*O+f*H+h*W,G=v*(y-1-q)+_*(x-1-(W*T-Y))+g*L,K=0;K<P;++K)V+=u[U+(L*P+K)]*p[G+K];i[o*O+s*A+c*F+L]=V}return r.toTensor()},t.prototype.depthwiseConv2DDerFilter=function(t,e,n){this.assertNotComplex([t,e],"depthwiseConv2DDerFilter");for(var r=n.strideHeight,i=n.strideWidth,a=n.filterHeight,o=n.filterWidth,s=Ma(n.filterShape,"float32"),c=n.padInfo.left,u=n.padInfo.top,l=n.outChannels/n.inChannels,d=t.bufferSync(),f=e.bufferSync(),h=0;h<a;++h)for(var p=Math.max(0,Math.ceil((u-h)/r)),m=Math.min(n.outHeight,(n.inHeight+u-h)/r),v=0;v<o;++v)for(var _=Math.max(0,Math.ceil((c-v)/i)),g=Math.min(n.outWidth,(n.inWidth+c-v)/i),b=0;b<n.outChannels;++b){for(var y=Math.trunc(b/l),x=b%l,w=0,k=0;k<n.batchSize;++k)for(var C=p;C<m;++C)for(var E=h+C*r-u,S=_;S<g;++S){var I=v+S*i-c;w+=d.get(k,E,I,y)*f.get(k,C,S,b)}s.set(w,h,v,y,x)}return s.toTensor()},t.prototype.tile=function(t,e){this.assertNotComplex(t,"tile");for(var n=new Array(t.rank),r=0;r<n.length;r++)n[r]=t.shape[r]*e[r];var i=Ma(n,t.dtype),a=t.bufferSync();for(r=0;r<i.values.length;++r){for(var o=i.indexToLoc(r),s=new Array(t.rank),c=0;c<s.length;c++)s[c]=o[c]%t.shape[c];var u=a.locToIndex(s);i.values[r]=a.values[u]}return i.toTensor()},t.prototype.pad=function(t,e,n){this.assertNotComplex(t,"pad");var r=e.map(function(e,n){return e[0]+t.shape[n]+e[1]}),i=e.map(function(t){return t[0]}),a=t.bufferSync(),o=Ma(r,t.dtype);0!==n&&o.values.fill(n);for(var s=0;s<t.size;s++){var c=a.indexToLoc(s),u=c.map(function(t,e){return t+i[e]});o.set.apply(o,[a.get.apply(a,c)].concat(u))}return o.toTensor()},t.prototype.transpose=function(t,e){this.assertNotComplex(t,"transpose");for(var n=new Array(t.rank),r=0;r<n.length;r++)n[r]=t.shape[e[r]];var i=t.dataSync(),a=Ma(n,t.dtype),o=t.bufferSync();for(r=0;r<t.size;++r){for(var s=o.indexToLoc(r),c=new Array(s.length),u=0;u<c.length;u++)c[u]=s[e[u]];var l=a.locToIndex(c);a.values[l]=i[r]}return a.toTensor()},t.prototype.gather=function(t,e,n){this.assertNotComplex([t,e],"gather");var r=t.shape.slice(),i=e.dataSync();r[n]=i.length;for(var a=Ma(r,t.dtype),o=t.bufferSync(),s=0;s<a.size;++s){var c=a.indexToLoc(s),u=c.slice();u[n]=i[c[n]];var l=o.locToIndex(u);a.values[s]=o.values[l]}return a.toTensor()},t.prototype.batchToSpaceND=function(t,e,n){this.assertNotComplex([t],"batchToSpaceND");var r=e.reduce(function(t,e){return t*e}),i=Zt(t.shape,e,r),a=Qt(i.length,e.length),o=te(t.shape,e,r),s=ee(n,e.length),c=ne(o,n,e.length);return t.reshape(i).transpose(a).reshape(o).slice(s,c)},t.prototype.spaceToBatchND=function(t,e,n){this.assertNotComplex([t],"spaceToBatchND");var r=e.reduce(function(t,e){return t*e}),i=[[0,0]];i.push.apply(i,n);for(var a=1+e.length;a<t.shape.length;++a)i.push([0,0]);var o=t.pad(i),s=Zt(o.shape,e,r,!1),c=Qt(s.length,e.length,!1),u=te(o.shape,e,r,!1);return o.reshape(s).transpose(c).reshape(u)},t.prototype.pool=function(t,e,n){this.assertNotComplex(t,"pool");for(var r=e.strideHeight,i=e.strideWidth,a=e.dilationHeight,o=e.dilationWidth,s=e.effectiveFilterHeight,c=e.effectiveFilterWidth,u=e.padInfo.top,l=e.padInfo.left,d="max"===n?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,f=t.dataSync(),h=Ma(e.outShape,t.dtype),p=h.values,m=e.outShape[1]*e.outShape[2]*e.outShape[3],v=e.outShape[2]*e.outShape[3],_=e.outShape[3],g=0;g<e.batchSize;++g)for(var b=g*m,y=g*t.strides[0],x=0;x<e.inChannels;++x)for(var w=0;w<e.outHeight;++w)for(var k=w*r-u,C=Math.max(0,k),E=Math.min(e.inHeight,s+k),S=b+w*v,I=0;I<e.outWidth;++I){for(var M=I*i-l,T=Math.max(0,M),D=Math.min(e.inWidth,c+M),R=d,P=0,O=0,L=C;L<E;L+=a){for(var A=y+L*t.strides[1],N=T;N<D;N+=o){var B=f[A+N*t.strides[2]+x];"max"===n&&B>R?R=B:"avg"===n&&(P+=B,O++)}if(isNaN(R))break}p[S+I*_+x]="avg"===n?P/O:R}return h.toTensor()},t.prototype.maxPool=function(t,e){return this.pool(t,e,"max")},t.prototype.maxPoolPositions=function(t,e){for(var n=Ma(e.outShape,"int32"),r=e.strideHeight,i=e.strideWidth,a=e.dilationHeight,o=e.dilationWidth,s=e.effectiveFilterHeight,c=e.effectiveFilterWidth,u=e.padInfo.top,l=e.padInfo.left,d=t.bufferSync(),f=0;f<e.batchSize;++f)for(var h=0;h<e.inChannels;++h)for(var p=0;p<e.outHeight;++p){for(var m=p*r-u,v=m;v<0;)v+=a;for(var _=Math.min(e.inHeight,s+m),g=0;g<e.outWidth;++g){for(var b=g*i-l,y=b;y<0;)y+=o;for(var x=Math.min(e.inWidth,c+b),w=Number.NEGATIVE_INFINITY,k=-1,C=v;C<_;C+=a)for(var E=C-m,S=y;S<x;S+=o){var I=S-b,M=d.get(f,C,S,h);M>w&&(w=M,k=E*c+I)}n.set(k,f,p,g,h)}}return n.toTensor()},t.prototype.maxPoolBackprop=function(t,e,n,r){this.assertNotComplex([e,n],"maxPoolBackprop");for(var i=this.maxPoolPositions(e,r),a=r.strideHeight,o=r.strideWidth,s=r.dilationHeight,c=r.dilationWidth,u=r.effectiveFilterHeight,l=r.effectiveFilterWidth,d=l-1-r.padInfo.left,f=u-1-r.padInfo.top,h=Ma(e.shape,"float32"),p=i.bufferSync(),m=t.bufferSync(),v=0;v<r.batchSize;++v)for(var _=0;_<r.inChannels;++_)for(var g=0;g<r.inHeight;++g)for(var b=0;b<r.inWidth;++b){for(var y=g-f,x=b-d,w=0,k=0;k<u;k+=s){var C=(y+k)/a;if(!(C<0||C>=r.outHeight||Math.floor(C)!==C))for(var E=0;E<l;E+=c){var S=(x+E)/o;if(!(S<0||S>=r.outWidth||Math.floor(S)!==S)){var I=u*l-1-p.get(v,C,S,_)===k*l+E?1:0;0!==I&&(w+=m.get(v,C,S,_)*I)}}}h.set(w,v,g,b,_)}return h.toTensor()},t.prototype.avgPoolBackprop=function(t,e,n){this.assertNotComplex([t,e],"avgPoolBackprop");for(var r=n.strideHeight,i=n.strideWidth,a=n.filterHeight,o=n.filterWidth,s=n.dilationHeight,c=n.dilationWidth,u=n.effectiveFilterHeight,l=n.effectiveFilterWidth,d=l-1-n.padInfo.left,f=u-1-n.padInfo.top,h=Ma(e.shape,"float32"),p=1/(a*o),m=t.bufferSync(),v=0;v<n.batchSize;++v)for(var _=0;_<n.inChannels;++_)for(var g=0;g<n.inHeight;++g)for(var b=0;b<n.inWidth;++b){for(var y=g-f,x=b-d,w=0,k=0;k<u;k+=s){var C=(y+k)/r;if(!(C<0||C>=n.outHeight||Math.floor(C)!==C))for(var E=0;E<l;E+=c){var S=(x+E)/i;S<0||S>=n.outWidth||Math.floor(S)!==S||(w+=m.get(v,C,S,_))}}h.set(w*p,v,g,b,_)}return h.toTensor()},t.prototype.cast=function(t,e){return Ye(t,e,this)},t.prototype.reshape=function(t,e){return $e(t,e)},t.prototype.avgPool=function(t,e){return this.assertNotComplex(t,"avgPool"),this.pool(t,e,"avg").toFloat()},t.prototype.resizeBilinear=function(t,e,n,r){this.assertNotComplex(t,"resizeBilinear");for(var i=t.shape,a=i[0],o=i[1],s=i[2],c=i[3],u=t.dataSync(),l=new Float32Array(k([a,e,n,c])),d=[r&&e>1?o-1:o,r&&n>1?s-1:s],f=[r&&e>1?e-1:e,r&&n>1?n-1:n],h=0,p=d[0]/f[0],m=d[1]/f[1],v=0;v<a;v++)for(var _=0;_<e;_++)for(var g=p*_,b=Math.floor(g),y=g-b,x=Math.min(o-1,Math.ceil(g)),w=v*t.strides[0]+b*t.strides[1],C=v*t.strides[0]+x*t.strides[1],E=0;E<n;E++)for(var S=m*E,I=Math.floor(S),M=S-I,T=Math.min(s-1,Math.ceil(S)),D=w+I*t.strides[2],R=C+I*t.strides[2],P=w+ +T*t.strides[2],O=C+T*t.strides[2],L=0;L<c;L++){var A=u[D+L],N=u[R+L],B=A+(u[P+L]-A)*M,j=B+(N+(u[O+L]-N)*M-B)*y;l[h++]=j}return Ie(l,[a,e,n,c])},t.prototype.resizeBilinearBackprop=function(t,e,n){this.assertNotComplex([t,e],"resizeBilinearBackprop");for(var r=e.shape,i=r[0],a=r[1],o=r[2],s=r[3],c=t.shape,u=c[1],l=c[2],d=new Float32Array(i*a*o*s),f=[n&&u>1?a-1:a,n&&l>1?o-1:o],h=[n&&u>1?u-1:u,n&&l>1?l-1:l],p=f[0]/h[0],m=f[1]/h[1],v=t.dataSync(),_=0,g=0;g<i;g++)for(var b=g*e.strides[0],y=0;y<u;y++)for(var x=y*p,w=Math.floor(x),k=Math.min(Math.ceil(x),a-1),C=b+w*e.strides[1],E=b+k*e.strides[1],S=x-w,I=1-S,M=0;M<l;M++)for(var T=M*m,D=Math.floor(T),R=Math.min(Math.ceil(T),o-1),P=T-D,O=1-P,L=C+D*e.strides[2],A=C+R*e.strides[2],N=E+D*e.strides[2],B=E+R*e.strides[2],j=I*O,F=I*P,Y=S*O,$=S*P,z=0;z<s;z++){var V=v[_++];d[L+z]+=V*j,d[A+z]+=V*F,d[N+z]+=V*Y,d[B+z]+=V*$}return Pe(d,[i,o,a,s],e.dtype)},t.prototype.resizeNearestNeighbor=function(t,e,n,r){this.assertNotComplex(t,"resizeNearestNeighbor");for(var i=t.shape,a=i[0],o=i[1],s=i[2],c=i[3],u=t.dataSync(),l=new Float32Array(a*e*n*c),d=[r&&e>1?o-1:o,r&&n>1?s-1:s],f=[r&&e>1?e-1:e,r&&n>1?n-1:n],h=d[0]/f[0],p=d[1]/f[1],m=0,v=0;v<a;v++)for(var _=v*t.strides[0],g=0;g<e;g++)for(var b=h*g,y=_+Math.min(o-1,r?Math.round(b):Math.floor(b))*t.strides[1],x=0;x<n;x++)for(var w=p*x,k=y+Math.min(s-1,r?Math.round(w):Math.floor(w))*t.strides[2],C=0;C<c;C++){var E=u[k+C];l[m++]=E}return Ie(l,[a,e,n,c],t.dtype)},t.prototype.resizeNearestNeighborBackprop=function(t,e,n){this.assertNotComplex([t,e],"resizeNearestNeighborBackprop");for(var r=e.shape,i=r[0],a=r[1],o=r[2],s=r[3],c=t.shape,u=c[1],l=c[2],d=new Float32Array(i*a*o*s),f=t.dataSync(),h=[n&&u>1?a-1:a,n&&l>1?o-1:o],p=[n&&u>1?u-1:u,n&&l>1?l-1:l],m=h[0]/p[0],v=h[1]/p[1],_=1/m,g=1/v,b=2*Math.ceil(_)+2,y=2*Math.ceil(g)+2,x=0;x<i;x++)for(var w=x*e.strides[0],k=0;k<a;k++)for(var C=w+k*e.strides[1],E=Math.floor(k*_),S=Math.floor(E-b/2),I=0;I<o;I++)for(var M=C+I*e.strides[2],T=Math.floor(I*g),D=Math.floor(T-y/2),R=0;R<s;R++){for(var P=0,O=0;O<b;O++){var L=O+S;if(!(L<0||L>=u)){var A=w+L*t.strides[1],N=L*m;if(k===Math.min(a-1,n?Math.round(N):Math.floor(N)))for(var B=0;B<y;B++){var j=B+D;if(!(j<0||j>=l)){var F=A+j*t.strides[2],Y=j*v;I===Math.min(o-1,n?Math.round(Y):Math.floor(Y))&&(P+=f[F+R])}}}}d[M+R]=P}return Pe(d,e.shape,e.dtype)},t.prototype.batchNormalization=function(t,e,n,r,i,a){this.assertNotComplex([t,e,n,i,a],"batchNorm");for(var o=t.dataSync(),s=e.dataSync(),c=n.dataSync(),u=i?i.dataSync():new Float32Array([1]),l=a?a.dataSync():new Float32Array([0]),d=new Float32Array(o.length),f=l.length,h=u.length,p=c.length,m=s.length,v=0,_=0,g=0,b=0,y=0;y<o.length;++y)d[y]=l[v++]+(o[y]-s[_++])*u[g++]/Math.sqrt(c[b++]+r),v>=f&&(v=0),_>=m&&(_=0),g>=h&&(g=0),b>=p&&(b=0);return Pe(d,t.shape)},t.prototype.localResponseNormalization4D=function(t,e,n,r,i){this.assertNotComplex(t,"localResponseNormalization4D");var a=t.shape[3],o=a-1,s=t.dataSync(),c=t.size,u=new Float32Array(c);function l(t){for(var n=t%a,r=t-n+Math.max(0,n-e),i=t-n+Math.min(n+e,o),c=0;r<=i;r++){var u=s[r];c+=u*u}return c}for(var d=0;d<c;d++){var f=l(d),h=s[d]*Math.pow(n+r*f,-i);u[d]=h}return Pe(u,t.shape)},t.prototype.LRNGrad=function(t,e,n,r,i,a,o){this.assertNotComplex(t,"LRNGrad");for(var s=t.shape[3],c=t.dataSync(),u=e.dataSync(),l=n.dataSync(),d=new Float32Array(t.size),f=t.size,h=0;h<f;h++){for(var p=h%s,m=h-p+Math.max(0,p-r),v=h-p+Math.min(s,p+r+1),_=0,g=m;g<v;g++)_+=Math.pow(u[g],2);for(_=a*_+i,g=m;g<v;g++){var b=-2*a*o*u[g]*l[h]/_;h===g&&(b+=Math.pow(_,-o)),b*=c[h],d[g]+=b}}return Pe(d,t.shape)},t.prototype.multinomial=function(t,e,n,r){this.assertNotComplex(t,"multinomial");for(var i=e?t:we(t),a=i.shape[0],o=i.shape[1],s=Le([a,n],"int32"),c=s.dataSync(),u=i.dataSync(),l=0;l<a;++l){var d=l*o,f=new Float32Array(o-1);f[0]=u[d];for(var h=1;h<f.length;++h)f[h]=f[h-1]+u[d+h];for(var p=Sa(r.toString()),m=l*n,v=0;v<n;++v){var _=p();c[m+v]=f.length;for(var g=0;g<f.length;g++)if(_<f[g]){c[m+v]=g;break}}}return s},t.prototype.oneHot=function(t,e,n,r){this.assertNotComplex(t,"oneHot");var i=new Float32Array(t.size*e);i.fill(r);for(var a=t.dataSync(),o=0;o<t.size;++o)a[o]>=0&&a[o]<e&&(i[o*e+a[o]]=n);return De(i,[t.size,e],"int32")},t.prototype.nonMaxSuppression=function(t,e,n,r,i){return this.assertNotComplex(t,"nonMaxSuppression"),We(t.dataSync(),e.dataSync(),n,r,i)},t.prototype.fft=function(t){return this.fftBatch(t,!1)},t.prototype.ifft=function(t){return this.fftBatch(t,!0)},t.prototype.fftBatch=function(t,e){for(var n=t.shape[0],r=t.shape[1],i=Ma(t.shape,"float32"),a=Ma(t.shape,"float32"),o=Ee(t).as2D(n,r),s=Se(t).as2D(n,r),c=0;c<n;c++)for(var u=o.slice([c,0],[1,r]),l=s.slice([c,0],[1,r]),d=Ce(u,l),f=this.fftImpl(d,e).dataSync(),h=0;h<r;h++){var p=Ve(f,h);i.values[c*r+h]=p.real,a.values[c*r+h]=p.imag}return Ce(i.toTensor(),a.toTensor()).as2D(n,r)},t.prototype.fftImpl=function(t,e){var n=t.as1D(),r=n.size;if(this.isExponentOf2(r)){var i=this.fftRadix2(n,r,e).as2D(t.shape[0],t.shape[1]);return e&&(i=Ce(Ee(i).div(Me(r)),Se(i).div(Me(r)))),i}var a=t.dataSync(),o=function(t){for(var e=new Float32Array(t.length/2),n=new Float32Array(t.length/2),r=0;r<t.length;r+=2)e[r/2]=t[r],n[r/2]=t[r+1];return{real:e,imag:n}}(this.fourierTransformByMatmul(a,r,e));return Ce(o.real,o.imag).as2D(t.shape[0],t.shape[1])},t.prototype.isExponentOf2=function(t){return 0==(t&t-1)},t.prototype.fftRadix2=function(t,e,n){if(1===e)return t;var r=t.dataSync(),i=e/2,a=function(t){for(var e=Math.ceil(t.length/4),n=new Float32Array(e),r=new Float32Array(e),i=0;i<t.length;i+=4)n[Math.floor(i/4)]=t[i],r[Math.floor(i/4)]=t[i+1];return{real:n,imag:r}}(r),o=Ce(a.real,a.imag).as1D(),s=function(t){for(var e=Math.floor(t.length/4),n=new Float32Array(e),r=new Float32Array(e),i=2;i<t.length;i+=4)n[Math.floor(i/4)]=t[i],r[Math.floor(i/4)]=t[i+1];return{real:n,imag:r}}(r),c=Ce(s.real,s.imag).as1D();o=this.fftRadix2(o,i,n),c=this.fftRadix2(c,i,n);var u=function(t,e){for(var n=new Float32Array(t/2),r=new Float32Array(t/2),i=0;i<Math.ceil(t/2);i++){var a=(e?2:-2)*Math.PI*(i/t);n[i]=Math.cos(a),r[i]=Math.sin(a)}return{real:n,imag:r}}(e,n),l=Ce(u.real,u.imag).mul(c),d=o.add(l),f=o.sub(l),h=Ee(d).concat(Ee(f)),p=Se(d).concat(Se(f));return Ce(h,p).as1D()},t.prototype.fourierTransformByMatmul=function(t,e,n){for(var r=new Float32Array(2*e),i=0;i<e;i++){for(var a=0,o=0,s=0;s<e;s++){var c=qe(i*s,e,n),u=Ve(t,s);a+=u.real*c.real-u.imag*c.imag,o+=u.real*c.imag+u.imag*c.real}n&&(a/=e,o/=e),He(r,a,o,i)}return r},t.prototype.depthToSpace=function(t,e,n){b("NHWC"===n,function(){return"Only NHWC dataFormat supported on CPU for depthToSpace. Got "+n}),b(e>1,function(){return"blockSize should be > 1 for depthToSpace, but was: "+e});for(var r=t.shape[0],i=t.shape[1],a=t.shape[2],o=t.shape[3],s=i*e,c=a*e,u=o/(e*e),l=t.dataSync(),d=new Float32Array(r*s*c*u),f=0,h=0;h<r;++h)for(var p=0;p<s;++p)for(var m=Math.floor(p/e),v=p%e,_=0;_<c;++_)for(var g=Math.floor(_/e),y=(v*e+_%e)*u,x=0;x<u;++x){var w=x+y+o*(g+a*(m+i*h));d[f++]=l[w]}return Pe(d,[r,s,c,u])},t.prototype.broadcastedBinaryOp=function(t,e,n,r){var i=en(t.shape,e.shape),a=Ma(i,n),o=t.dataSync(),s=e.dataSync(),c=Qe(t.shape,i),u=Qe(e.shape,i),l=a.values;if(c.length+u.length===0)for(var d=0;d<l.length;++d)l[d]=r(o[d%o.length],s[d%s.length]);else{var f=t.bufferSync(),h=e.bufferSync(),p=function(n){var i=a.indexToLoc(n),d=i.slice(-t.rank);c.forEach(function(t){return d[t]=0});var p=f.locToIndex(d),m=i.slice(-e.rank);u.forEach(function(t){return m[t]=0});var v=h.locToIndex(m);l[n]=r(o[p],s[v])};for(d=0;d<l.length;++d)p(d)}return a.toTensor()},t.prototype.broadcastedBinaryComplexOp=function(t,e,n){var r=en(t.shape,e.shape),i=Ma(r,"float32"),a=Ma(r,"float32"),o=t.dataSync(),s=e.dataSync(),c=Qe(t.shape,r),u=Qe(e.shape,r),l=i.values,d=a.values;if(c.length+u.length===0)for(var f=0;f<l.length;f++){var h=f%o.length,p=f%s.length,m=n(o[2*h],o[2*h+1],s[2*p],s[2*p+1]);l[f]=m.real,d[f]=m.imag}else{var v=this.data.get(t.dataId).complexTensors.real.bufferSync(),_=this.data.get(e.dataId).complexTensors.real.bufferSync(),g=function(r){var a=i.indexToLoc(r),f=a.slice(-t.rank);c.forEach(function(t){return f[t]=0});var h=v.locToIndex(f),p=a.slice(-e.rank);u.forEach(function(t){return p[t]=0});var m=_.locToIndex(p),g=n(o[2*h],o[2*h+1],s[2*m],s[2*m+1]);l[r]=g.real,d[r]=g.imag};for(f=0;f<l.length;f++)g(f)}return this.complex(i.toTensor(),a.toTensor())},t.prototype.split=function(t,e,n){return Ge(t,e,n)},t.prototype.dispose=function(){},t.prototype.floatPrecision=function(){return 32},t.prototype.cropAndResize=function(t,e,n,r,i,a){for(var o=t.shape,s=o[0],c=o[1],u=o[2],l=o[3],d=e.shape[0],f=r[0],h=r[1],p=Ma([d,f,h,l],t.dtype),m=e.dataSync(),v=n.dataSync(),_=t.dataSync(),g=t.strides,b=p.strides,y=0;y<d;y++){var x=4*y,w=m[x],k=m[x+1],C=m[x+2],E=m[x+3],S=v[y];if(!(S>=s))for(var I=f>1?(C-w)*(c-1)/(f-1):0,M=h>1?(E-k)*(u-1)/(h-1):0,T=0;T<f;T++){var D=f>1?w*(c-1)+T*I:.5*(w+C)*(c-1);if(D<0||D>c-1)for(var R=0;R<h;R++)for(var P=0;P<l;P++){var O=P+R*b[2]+T*b[1]+y*b[0];p.values[O]=a}else if("bilinear"===i){var L=Math.floor(D),A=Math.ceil(D),N=D-L;for(R=0;R<h;R++)if((q=h>1?k*(u-1)+R*M:.5*(k+E)*(u-1))<0||q>u-1)for(P=0;P<l;P++)O=P+R*b[2]+T*b[1]+y*b[0],p.values[O]=a;else{var B=Math.floor(q),j=Math.ceil(q),F=q-B;for(P=0;P<l;P++){var Y=_[O=P+B*g[2]+L*g[1]+S*g[0]],$=_[O=P+j*g[2]+L*g[1]+S*g[0]],z=_[O=P+B*g[2]+A*g[1]+S*g[0]],V=Y+($-Y)*F,H=z+(_[O=P+j*g[2]+A*g[1]+S*g[0]]-z)*F;O=P+R*b[2]+T*b[1]+y*b[0],p.values[O]=V+(H-V)*N}}}else for(R=0;R<h;++R){var q;if((q=h>1?k*(u-1)+R*M:.5*(k+E)*(u-1))<0||q>u-1)for(P=0;P<l;P++)O=P+R*b[2]+T*b[1]+y*b[0],p.values[O]=a;else{var W=Math.round(q),U=Math.round(D);for(P=0;P<l;P++){var G=P+W*g[2]+U*g[1]+S*g[0],K=P+R*b[2]+T*b[1]+y*b[0];p.values[K]=_[G]}}}}}return p.toTensor()},t.prototype.sparseToDense=function(t,e,n,r){var i=me(0,t,n),a=i.sliceRank,o=i.numUpdates,s=i.sliceSize,c=i.strides,u=i.outputSize;return this.scatter(t,e,n,u,s,o,a,c,r,!1)},t.prototype.gatherND=function(t,e){var n=e.shape,r=n[n.length-1],i=de(t,e),a=i[0],o=i[1],s=i[2],c=i[3];if(0===o)return Ie([],a,t.dtype);for(var u=new ut([o,s],t.dtype),l=e.dataSync(),d=t.dataSync(),f=0;f<o;f++){for(var h=[],p=0,m=0;m<r;m++){var v=l[f*r+m];p+=v*c[m],h.push(v)}if(p<0||p>=t.size/s)throw new Error("Invalid indices: "+h+" does not index into "+t.shape);for(var _=0;_<s;_++)u.values[f*s+_]=d[p*s+_]}return u.toTensor().reshape(a)},t.prototype.scatterND=function(t,e,n){var r=me(0,t,n),i=r.sliceRank,a=r.numUpdates,o=r.sliceSize,s=r.strides,c=r.outputSize,u=Me(0);return this.scatter(t,e,n,c,o,a,i,s,u,!0)},t.prototype.fill=function(t,e,n){var r=L(n=n||H(e),k(t));return r.fill(e),ht.make(t,{values:r},n)},t.prototype.onesLike=function(t){if("string"===t.dtype)throw new Error("onesLike is not supported for string tensors");return this.fill(t.shape,1,t.dtype)},t.prototype.zerosLike=function(t){var e=L(t.dtype,k(t.shape));return ht.make(t.shape,{values:e},t.dtype)},t.prototype.scatter=function(t,e,n,r,i,a,o,s,c,u){var l=[r/i,i],d=t.dataSync(),f=e.dataSync();if(0===r)return Ie([],n,e.dtype);var h=new ut(l,e.dtype);h.values.fill(c.dataSync()[0]);for(var p=0;p<a;p++){for(var m=[],v=0,_=0;_<o;_++){var g=d[p*o+_];m.push(g),v+=g*s[_]}if(v<0||v>=r/i)throw new Error("Invalid indices: "+m+" does not index into "+n);for(var b=0;b<i;b++)u?h.values[v*i+b]+=f[p*i+b]:h.values[v*i+b]=0===e.rank?f[0]:f[p*i+b]}return h.toTensor().reshape(n)},t}();zt.registerBackend("cpu",function(){return new Du},1);"undefined"!=typeof requestAnimationFrame&&requestAnimationFrame;var Ru={float32:4,int32:4,uint16:2,uint8:1,bool:1};function Pu(t,e){for(var n={},r=0,i=function(e){var i=e.name,a=e.dtype,o=e.shape,s=k(o),c=void 0;if("quantization"in e){var u=e.quantization;if("uint8"!==u.dtype&&"uint16"!==u.dtype)throw new Error("Weight "+e.name+" has unknown quantization dtype "+u.dtype+". Supported quantization dtypes are: 'uint8' and 'uint16'.");var l=Ru[u.dtype],d=t.slice(r,r+s*l),f="uint8"===u.dtype?new Uint8Array(d):new Uint16Array(d);if("float32"===a)c=Float32Array.from(f,function(t){return t*u.scale+u.min});else{if("int32"!==a)throw new Error("Unsupported dtype in weight '"+i+"': "+a);c=Int32Array.from(f,function(t){return Math.round(t*u.scale+u.min)})}r+=s*l}else{var h=Ru[a];if(d=t.slice(r,r+s*h),"float32"===a)c=new Float32Array(d);else if("int32"===a)c=new Int32Array(d);else{if("bool"!==a)throw new Error("Unsupported dtype in weight '"+i+"': "+a);c=new Uint8Array(d)}r+=s*h}var p=void 0;if("float32"===a)p=Ie(c,o,"float32");else if("int32"===a)p=Ie(c,o,"int32");else{if("bool"!==a)throw new Error("Unsupported dtype in weight '"+i+"': "+a);p=Ie(c,o,"bool")}n[i]=p},a=0,o=e;a<o.length;a++)i(o[a]);return n}var Ou=void 0!==a&&("undefined"==typeof Blob||"undefined"==typeof atob||"undefined"==typeof btoa);function Lu(t){return Ou?a.byteLength(t):new Blob([t]).size}function Au(t){var e=0;t.forEach(function(t){e+=t.byteLength});var n=new Uint8Array(e),r=0;return t.forEach(function(t){n.set(new Uint8Array(t),r),r+=t.byteLength}),n.buffer}function Nu(t){for(t=t.trim();t.endsWith("/");)t=t.slice(0,t.length-1);var e=t.split("/");return e[e.length-1]}function Bu(t){if(t.modelTopology instanceof ArrayBuffer)throw new Error("Expected JSON model topology, received ArrayBuffer.");return{dateSaved:new Date,modelTopologyType:"JSON",modelTopologyBytes:null==t.modelTopology?0:Lu(JSON.stringify(t.modelTopology)),weightSpecsBytes:null==t.weightSpecs?0:Lu(JSON.stringify(t.weightSpecs)),weightDataBytes:null==t.weightData?0:t.weightData.byteLength}}var ju=function(){function t(){this.saveRouters=[],this.loadRouters=[]}return t.getInstance=function(){return null==t.instance&&(t.instance=new t),t.instance},t.registerSaveRouter=function(e){t.getInstance().saveRouters.push(e)},t.registerLoadRouter=function(e){t.getInstance().loadRouters.push(e)},t.getSaveHandlers=function(e){return t.getHandlers(e,"save")},t.getLoadHandlers=function(e,n){return t.getHandlers(e,"load",n)},t.getHandlers=function(e,n,r){var i=[];return("load"===n?t.getInstance().loadRouters:t.getInstance().saveRouters).forEach(function(t){var n=t(e,r);null!==n&&i.push(n)}),i},t}(),Fu="://",Yu=function(){function t(){this.managers={}}return t.getInstance=function(){return null==t.instance&&(t.instance=new t),t.instance},t.registerManager=function(e,n){b(null!=e,function(){return"scheme must not be undefined or null."}),e.endsWith(Fu)&&(e=e.slice(0,e.indexOf(Fu))),b(e.length>0,function(){return"scheme must not be an empty string."});var r=t.getInstance();b(null==r.managers[e],function(){return"A model store manager is already registered for scheme '"+e+"'."}),r.managers[e]=n},t.getManager=function(t){var e=this.getInstance().managers[t];if(null==e)throw new Error("Cannot find model manager for scheme '"+t+"'");return e},t.getSchemes=function(){return Object.keys(this.getInstance().managers)},t}();function $u(t){if(-1===t.indexOf(Fu))throw new Error("The url string provided does not contain a scheme. Supported schemes are: "+Yu.getSchemes().join(","));return{scheme:t.split(Fu)[0],path:t.split(Fu)[1]}}function zu(t,e,n){return void 0===n&&(n=!1),u(this,void 0,void 0,function(){var r,i,a,o,s,c,u,d,f;return l(this,function(l){switch(l.label){case 0:return b(t!==e,function(){return"Old path and new path are the same: '"+t+"'"}),b((r=ju.getLoadHandlers(t)).length>0,function(){return"Copying failed because no load handler is found for source URL "+t+"."}),b(r.length<2,function(){return"Copying failed because more than one ("+r.length+") load handlers for source URL "+t+"."}),i=r[0],b((a=ju.getSaveHandlers(e)).length>0,function(){return"Copying failed because no save handler is found for destination URL "+e+"."}),b(a.length<2,function(){return"Copying failed because more than one ("+r.length+") save handlers for destination URL "+e+"."}),o=a[0],s=$u(t).scheme,c=$u(t).path,u=s===$u(t).scheme,[4,i.load()];case 1:return d=l.sent(),n&&u?[4,Yu.getManager(s).removeModel(c)]:[3,3];case 2:l.sent(),l.label=3;case 3:return[4,o.save(d)];case 4:return f=l.sent(),!n||u?[3,6]:[4,Yu.getManager(s).removeModel(c)];case 5:l.sent(),l.label=6;case 6:return[2,f.modelArtifactsInfo]}})})}var Vu="models_store",Hu="model_info_store";function qu(){if(!zt.get("IS_BROWSER"))throw new Error("Failed to obtain IndexedDB factory because the current environmentis not a web browser.");var t=window,e=t.indexedDB||t.mozIndexedDB||t.webkitIndexedDB||t.msIndexedDB||t.shimIndexedDB;if(null==e)throw new Error("The current browser does not appear to support IndexedDB.");return e}function Wu(t){var e=t.result;e.createObjectStore(Vu,{keyPath:"modelPath"}),e.createObjectStore(Hu,{keyPath:"modelPath"})}var Uu=function(){function t(t){if(this.indexedDB=qu(),null==t||!t)throw new Error("For IndexedDB, modelPath must not be null, undefined or empty.");this.modelPath=t}return t.prototype.save=function(t){return u(this,void 0,void 0,function(){return l(this,function(e){if(t.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");return[2,this.databaseAction(this.modelPath,t)]})})},t.prototype.load=function(){return u(this,void 0,void 0,function(){return l(this,function(t){return[2,this.databaseAction(this.modelPath)]})})},t.prototype.databaseAction=function(t,e){var n=this;return new Promise(function(t,r){var i=n.indexedDB.open("tensorflowjs",1);i.onupgradeneeded=function(){return Wu(i)},i.onsuccess=function(){var a=i.result;if(null==e){var o=a.transaction(Vu,"readonly"),s=o.objectStore(Vu).get(n.modelPath);s.onsuccess=function(){if(null==s.result)return a.close(),r(new Error("Cannot find model with path '"+n.modelPath+"' in IndexedDB."));t(s.result.modelArtifacts)},s.onerror=function(t){return a.close(),r(s.error)},o.oncomplete=function(){return a.close()}}else{var c,u=Bu(e),l=a.transaction(Hu,"readwrite"),d=l.objectStore(Hu),f=d.put({modelPath:n.modelPath,modelArtifactsInfo:u});f.onsuccess=function(){var i=(c=a.transaction(Vu,"readwrite")).objectStore(Vu).put({modelPath:n.modelPath,modelArtifacts:e,modelArtifactsInfo:u});i.onsuccess=function(){return t({modelArtifactsInfo:u})},i.onerror=function(t){var e=(d=l.objectStore(Hu)).delete(n.modelPath);e.onsuccess=function(){return a.close(),r(i.error)},e.onerror=function(t){return a.close(),r(i.error)}}},f.onerror=function(t){return a.close(),r(f.error)},l.oncomplete=function(){null==c?a.close():c.oncomplete=function(){return a.close()}}}},i.onerror=function(t){return r(i.error)}})},t.URL_SCHEME="indexeddb://",t}(),Gu=function(t){return zt.get("IS_BROWSER")&&!Array.isArray(t)&&t.startsWith(Uu.URL_SCHEME)?function(t){return new Uu(t)}(t.slice(Uu.URL_SCHEME.length)):null};ju.registerSaveRouter(Gu),ju.registerLoadRouter(Gu);var Ku=function(){function t(){this.indexedDB=qu()}return t.prototype.listModels=function(){return u(this,void 0,void 0,function(){var t=this;return l(this,function(e){return[2,new Promise(function(e,n){var r=t.indexedDB.open("tensorflowjs",1);r.onupgradeneeded=function(){return Wu(r)},r.onsuccess=function(){var t=r.result,i=t.transaction(Hu,"readonly"),a=i.objectStore(Hu).getAll();a.onsuccess=function(){for(var t={},n=0,r=a.result;n<r.length;n++){var i=r[n];t[i.modelPath]=i.modelArtifactsInfo}e(t)},a.onerror=function(e){return t.close(),n(a.error)},i.oncomplete=function(){return t.close()}},r.onerror=function(t){return n(r.error)}})]})})},t.prototype.removeModel=function(t){return u(this,void 0,void 0,function(){var e=this;return l(this,function(n){return t=function(t){return t.startsWith(Uu.URL_SCHEME)?t.slice(Uu.URL_SCHEME.length):t}(t),[2,new Promise(function(n,r){var i=e.indexedDB.open("tensorflowjs",1);i.onupgradeneeded=function(){return Wu(i)},i.onsuccess=function(){var e,a=i.result,o=a.transaction(Hu,"readwrite"),s=o.objectStore(Hu),c=s.get(t);c.onsuccess=function(){if(null==c.result)return a.close(),r(new Error("Cannot find model with path '"+t+"' in IndexedDB."));var i=s.delete(t),o=function(){var i=(e=a.transaction(Vu,"readwrite")).objectStore(Vu).delete(t);i.onsuccess=function(){return n(c.result.modelArtifactsInfo)},i.onerror=function(t){return r(c.error)}};i.onsuccess=o,i.onerror=function(t){return o(),a.close(),r(c.error)}},c.onerror=function(t){return a.close(),r(c.error)},o.oncomplete=function(){null==e?a.close():e.oncomplete=function(){return a.close()}}},i.onerror=function(t){return r(i.error)}})]})})},t}();if(zt.get("IS_BROWSER"))try{Yu.registerManager(Uu.URL_SCHEME,new Ku)}catch(yt){}var Xu="/",Ju="tensorflowjs_models",Zu="info",Qu="model_topology",tl="weight_specs",el="weight_data",nl="model_metadata";function rl(t){return{info:[Ju,t,Zu].join(Xu),topology:[Ju,t,Qu].join(Xu),weightSpecs:[Ju,t,tl].join(Xu),weightData:[Ju,t,el].join(Xu),modelMetadata:[Ju,t,nl].join(Xu)}}function il(t){var e=t.split(Xu);if(e.length<3)throw new Error("Invalid key format: "+t);return e.slice(1,e.length-1).join(Xu)}var al=function(){function t(t){if(!zt.get("IS_BROWSER")||void 0===window.localStorage)throw new Error("The current environment does not support local storage.");if(this.LS=window.localStorage,null==t||!t)throw new Error("For local storage, modelPath must not be null, undefined or empty.");this.modelPath=t,this.keys=rl(this.modelPath)}return t.prototype.save=function(t){return u(this,void 0,void 0,function(){var e,n,r;return l(this,function(i){if(t.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");e=JSON.stringify(t.modelTopology),n=JSON.stringify(t.weightSpecs),r=Bu(t);try{return this.LS.setItem(this.keys.info,JSON.stringify(r)),this.LS.setItem(this.keys.topology,e),this.LS.setItem(this.keys.weightSpecs,n),this.LS.setItem(this.keys.weightData,function(t){return Ou?a.from(t).toString("base64"):btoa(String.fromCharCode.apply(null,new Uint8Array(t)))}(t.weightData)),this.LS.setItem(this.keys.modelMetadata,JSON.stringify({format:t.format,generatedBy:t.generatedBy,convertedBy:t.convertedBy})),[2,{modelArtifactsInfo:r}]}catch(t){throw this.LS.removeItem(this.keys.info),this.LS.removeItem(this.keys.topology),this.LS.removeItem(this.keys.weightSpecs),this.LS.removeItem(this.keys.weightData),this.LS.removeItem(this.keys.modelMetadata),new Error("Failed to save model '"+this.modelPath+"' to local storage: size quota being exceeded is a possible cause of this failure: modelTopologyBytes="+r.modelTopologyBytes+", weightSpecsBytes="+r.weightSpecsBytes+", weightDataBytes="+r.weightDataBytes+".")}return[2]})})},t.prototype.load=function(){return u(this,void 0,void 0,function(){var t,e,n,r,i,o,s;return l(this,function(c){if(null==(t=JSON.parse(this.LS.getItem(this.keys.info))))throw new Error("In local storage, there is no model with name '"+this.modelPath+"'");if("JSON"!==t.modelTopologyType)throw new Error("BrowserLocalStorage does not support loading non-JSON model topology yet.");if(e={},null==(n=JSON.parse(this.LS.getItem(this.keys.topology))))throw new Error("In local storage, the topology of model '"+this.modelPath+"' is missing.");if(e.modelTopology=n,null==(r=JSON.parse(this.LS.getItem(this.keys.weightSpecs))))throw new Error("In local storage, the weight specs of model '"+this.modelPath+"' are missing.");if(e.weightSpecs=r,null!=(i=this.LS.getItem(this.keys.modelMetadata))&&(o=JSON.parse(i),e.format=o.format,e.generatedBy=o.generatedBy,e.convertedBy=o.convertedBy),null==(s=this.LS.getItem(this.keys.weightData)))throw new Error("In local storage, the binary weight values of model '"+this.modelPath+"' are missing.");return e.weightData=function(t){if(Ou){var e=a.from(t,"base64");return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}for(var n=atob(t),r=new Uint8Array(n.length),i=0;i<n.length;++i)r.set([n.charCodeAt(i)],i);return r.buffer}(s),[2,e]})})},t.URL_SCHEME="localstorage://",t}(),ol=function(t){return zt.get("IS_BROWSER")&&!Array.isArray(t)&&t.startsWith(al.URL_SCHEME)?function(t){return new al(t)}(t.slice(al.URL_SCHEME.length)):null};ju.registerSaveRouter(ol),ju.registerLoadRouter(ol);var sl=function(){function t(){b(zt.get("IS_BROWSER"),function(){return"Current environment is not a web browser"}),b(void 0!==window.localStorage,function(){return"Current browser does not appear to support localStorage"}),this.LS=window.localStorage}return t.prototype.listModels=function(){return u(this,void 0,void 0,function(){var t,e,n,r,i,a;return l(this,function(o){for(t={},e=Ju+Xu,n=Xu+Zu,r=0;r<this.LS.length;++r)(i=this.LS.key(r)).startsWith(e)&&i.endsWith(n)&&(a=il(i),t[a]=JSON.parse(this.LS.getItem(i)));return[2,t]})})},t.prototype.removeModel=function(t){return u(this,void 0,void 0,function(){var e,n;return l(this,function(r){if(t=function(t){return t.startsWith(al.URL_SCHEME)?t.slice(al.URL_SCHEME.length):t}(t),e=rl(t),null==this.LS.getItem(e.info))throw new Error("Cannot find model at path '"+t+"'");return n=JSON.parse(this.LS.getItem(e.info)),this.LS.removeItem(e.info),this.LS.removeItem(e.topology),this.LS.removeItem(e.weightSpecs),this.LS.removeItem(e.weightData),[2,n]})})},t}();if(zt.get("IS_BROWSER"))try{Yu.registerManager(al.URL_SCHEME,new sl)}catch(yt){}var cl="model",ul=".json",ll=".weights.bin",dl=function(){function t(e){if(!zt.get("IS_BROWSER"))throw new Error("browserDownloads() cannot proceed because the current environment is not a browser.");e.startsWith(t.URL_SCHEME)&&(e=e.slice(t.URL_SCHEME.length)),null!=e&&0!==e.length||(e=cl),this.modelTopologyFileName=e+ul,this.weightDataFileName=e+ll}return t.prototype.save=function(t){return u(this,void 0,void 0,function(){var e,n,r,i,a,o;return l(this,function(s){if(e=window.URL.createObjectURL(new Blob([t.weightData],{type:"application/octet-stream"})),t.modelTopology instanceof ArrayBuffer)throw new Error("BrowserDownloads.save() does not support saving model topology in binary formats yet.");return n=[{paths:["./"+this.weightDataFileName],weights:t.weightSpecs}],r={modelTopology:t.modelTopology,format:t.format,generatedBy:t.generatedBy,convertedBy:t.convertedBy,weightsManifest:n},i=window.URL.createObjectURL(new Blob([JSON.stringify(r)],{type:"application/json"})),(a=null==this.jsonAnchor?document.createElement("a"):this.jsonAnchor).download=this.modelTopologyFileName,a.href=i,a.click(),null!=t.weightData&&((o=null==this.weightDataAnchor?document.createElement("a"):this.weightDataAnchor).download=this.weightDataFileName,o.href=e,o.click()),[2,{modelArtifactsInfo:Bu(t)}]})})},t.URL_SCHEME="downloads://",t}(),fl=function(){function t(t){if(null==t||t.length<1)throw new Error("When calling browserFiles, at least 1 file is required, but received "+t);this.files=t}return t.prototype.load=function(){return u(this,void 0,void 0,function(){var t,e,n=this;return l(this,function(r){return t=this.files[0],e=this.files.slice(1),[2,new Promise(function(r,i){var a=new FileReader;a.onload=function(a){var o=JSON.parse(a.target.result),s=o.modelTopology;if(null!=s){0===e.length&&r({modelTopology:s});var c=o.weightsManifest;if(null!=c){var u;try{u=n.checkManifestAndWeightFiles(c,e)}catch(t){return void i(t)}var l=[],d=[],f=[];c.forEach(function(t){t.paths.forEach(function(t){d.push(t),f.push(null)}),l.push.apply(l,t.weights)}),c.forEach(function(t){t.paths.forEach(function(t){var e=new FileReader;e.onload=function(e){var n=e.target.result,i=d.indexOf(t);f[i]=n,-1===f.indexOf(null)&&r({modelTopology:s,weightSpecs:l,weightData:Au(f)})},e.onerror=function(e){return i("Failed to weights data from file of path '"+t+"'.")},e.readAsArrayBuffer(u[t])})})}else i(new Error("weightManifest field is missing from file "+t.name))}else i(new Error("modelTopology field is missing from file "+t.name))},a.onerror=function(e){return i("Failed to read model topology and weights manifest JSON from file '"+t.name+"'. BrowserFiles supports loading Keras-style tf.Model artifacts only.")},a.readAsText(t)})]})})},t.prototype.checkManifestAndWeightFiles=function(t,e){for(var n=[],r=e.map(function(t){return Nu(t.name)}),i={},a=0,o=t;a<o.length;a++)o[a].paths.forEach(function(t){var a=Nu(t);if(-1!==n.indexOf(a))throw new Error("Duplicate file basename found in weights manifest: '"+a+"'");if(n.push(a),-1===r.indexOf(a))throw new Error("Weight file with basename '"+a+"' is not provided.");i[t]=e[r.indexOf(a)]});if(n.length!==e.length)throw new Error("Mismatch in the number of files in weights manifest ("+n.length+") and the number of weight files provided ("+e.length+").");return i},t}();function hl(t,e,n,r){!function(t){b(null!=t&&Array.isArray(t)&&t.length>0,function(){return"promises must be a none empty array"})}(t),function(t,e){b(t>=0&&t<=1,function(){return"Progress fraction must be in range [0, 1], but got startFraction "+t}),b(e>=0&&e<=1,function(){return"Progress fraction must be in range [0, 1], but got endFraction "+e}),b(e>=t,function(){return"startFraction must be no more than endFraction, but got startFraction "+t+" and endFraction "+e})}(n=null==n?0:n,r=null==r?1:r);var i=0;return Promise.all(t.map(function(a){return a.then(function(a){var o=n+ ++i/t.length*(r-n);return e(o),a}),a}))}function pl(t,e){return u(this,void 0,void 0,function(){var n,r,i,a,o,s,c,u,d;return l(this,function(l){switch(l.label){case 0:return null==e&&(e={}),n=null==e.fetchFunc?fetch:e.fetchFunc,r=t.map(function(t){return n(t,e.requestInit)}),i=0,a=.5,null!=e.onProgress?[3,2]:[4,Promise.all(r)];case 1:return o=l.sent(),[3,4];case 2:return[4,hl(r,e.onProgress,i,a)];case 3:o=l.sent(),l.label=4;case 4:return s=o.map(function(t){return t.arrayBuffer()}),c=.5,u=1,null!=e.onProgress?[3,6]:[4,Promise.all(s)];case 5:return d=l.sent(),[3,8];case 6:return[4,hl(s,e.onProgress,c,u)];case 7:d=l.sent(),l.label=8;case 8:return[2,d]}})})}function ml(t){var e=this;return function(n,r,i){return void 0===r&&(r=""),u(e,void 0,void 0,function(){var e,a,o,s,c,u,d,f,h,p;return l(this,function(l){switch(l.label){case 0:if(e=n.map(function(){return!1}),a={},o=null!=i?i.map(function(){return!1}):[],s=[],n.forEach(function(t,n){var r=0;t.weights.forEach(function(t){var c="quantization"in t?t.quantization.dtype:t.dtype,u=Ru[c]*k(t.shape),l=function(){e[n]=!0,null==a[n]&&(a[n]=[]),a[n].push({manifestEntry:t,groupOffset:r,sizeBytes:u})};null!=i?i.forEach(function(e,n){e===t.name&&(l(),o[n]=!0)}):l(),s.push(t.name),r+=u})}),!o.every(function(t){return t}))throw c=i.filter(function(t,e){return!o[e]}),new Error("Could not find weights in manifest with names: "+c.join(", ")+". \nManifest JSON has weights with names: "+s.join(", ")+".");return u=e.reduce(function(t,e,n){return e&&t.push(n),t},[]),d=[],u.forEach(function(t){n[t].paths.forEach(function(t){var e=r+(r.endsWith("/")?"":"/")+t;d.push(e)})}),[4,t(d)];case 1:return f=l.sent(),h={},p=0,u.forEach(function(t){for(var e=n[t].paths.length,r=0,i=0;i<e;i++)r+=f[p+i].byteLength;for(var o=new ArrayBuffer(r),s=new Uint8Array(o),c=0,u=0;u<e;u++){var l=new Uint8Array(f[p+u]);s.set(l,c),c+=l.byteLength}a[t].forEach(function(t){var e=Pu(o.slice(t.groupOffset,t.groupOffset+t.sizeBytes),[t.manifestEntry]);for(var n in e)h[n]=e[n]}),p+=e}),[2,h]}})})}}ju.registerSaveRouter(function(t){return zt.get("IS_BROWSER")&&!Array.isArray(t)&&t.startsWith(dl.URL_SCHEME)?function(t){return void 0===t&&(t="model"),new dl(t)}(t.slice(dl.URL_SCHEME.length)):null});var vl=function(){function t(t,e){if(this.DEFAULT_METHOD="POST",null==e&&(e={}),this.weightPathPrefix=e.weightPathPrefix,this.onProgress=e.onProgress,null==e.fetchFunc){var n=zt.global.fetch;if(void 0===n)throw new Error("browserHTTPRequest is not supported outside the web browser without a fetch polyfill.");e.fetchFunc=n.bind(zt.global)}else b("function"==typeof e.fetchFunc,function(){return"Must pass a function that matches the signature of `fetch` (see https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)"});if(this.fetchFunc=function(t,n){return e.fetchFunc(t,n).catch(function(e){throw new Error("Request for "+t+" failed due to error: "+e)})},b(null!=t&&t.length>0,function(){return"URL path for browserHTTPRequest must not be null, undefined or empty."}),Array.isArray(t)&&b(2===t.length,function(){return"URL paths for browserHTTPRequest must have a length of 2, (actual length is "+t.length+")."}),this.path=t,null!=e.requestInit&&null!=e.requestInit.body)throw new Error("requestInit is expected to have no pre-existing body, but has one.");this.requestInit=e.requestInit||{}}return t.prototype.save=function(t){return u(this,void 0,void 0,function(){var e,n,r,i;return l(this,function(a){switch(a.label){case 0:if(t.modelTopology instanceof ArrayBuffer)throw new Error("BrowserHTTPRequest.save() does not support saving model topology in binary formats yet.");return(e=Object.assign({method:this.DEFAULT_METHOD},this.requestInit)).body=new FormData,n=[{paths:["./model.weights.bin"],weights:t.weightSpecs}],r={modelTopology:t.modelTopology,format:t.format,generatedBy:t.generatedBy,convertedBy:t.convertedBy,weightsManifest:n},e.body.append("model.json",new Blob([JSON.stringify(r)],{type:"application/json"}),"model.json"),null!=t.weightData&&e.body.append("model.weights.bin",new Blob([t.weightData],{type:"application/octet-stream"}),"model.weights.bin"),[4,this.getFetchFunc()(this.path,e)];case 1:if((i=a.sent()).ok)return[2,{modelArtifactsInfo:Bu(t),responses:[i]}];throw new Error("BrowserHTTPRequest.save() failed due to HTTP response status "+i.status+".")}})})},t.prototype.load=function(){return u(this,void 0,void 0,function(){var t,e,n,r,i,a,o,s;return l(this,function(c){switch(c.label){case 0:return[4,this.getFetchFunc()(this.path,this.requestInit)];case 1:if(!(t=c.sent()).ok)throw new Error("Request to "+this.path+" failed with status code "+t.status+". Please verify this URL points to the model JSON of the model to load.");c.label=2;case 2:return c.trys.push([2,4,,5]),[4,t.json()];case 3:return e=c.sent(),[3,5];case 4:throw c.sent(),n="Failed to parse model JSON of response from "+this.path+".",this.path.endsWith(".pb")?n+=" Your path contains a .pb file extension. Support for .pb models have been removed in TensorFlow.js 1.0 in favor of .json models. You can re-convert your Python TensorFlow model using the TensorFlow.js 1.0 conversion scripts or you can convert your.pb models with the 'pb2json'NPM script in the tensorflow/tfjs-converter repository.":n+=" Please make sure the server is serving valid JSON for this request.",new Error(n);case 5:if(r=e.modelTopology,i=e.weightsManifest,null==r&&null==i)throw new Error("The JSON from HTTP path "+this.path+" contains neither model topology or manifest for weights.");return null==i?[3,7]:[4,this.loadWeights(i)];case 6:s=c.sent(),a=s[0],o=s[1],c.label=7;case 7:return[2,{modelTopology:r,weightSpecs:a,weightData:o}]}})})},t.prototype.loadWeights=function(t){return u(this,void 0,void 0,function(){var e,n,r,i,a,o,s,c,u,d,f;return l(this,function(l){switch(l.label){case 0:for(e=Array.isArray(this.path)?this.path[1]:this.path,n=function(t){var e=t.lastIndexOf("/"),n=t.lastIndexOf("?");return[t.substring(0,e)+"/",n>e?t.substring(n):""]}(e),r=n[0],i=n[1],a=this.weightPathPrefix||r,o=[],s=0,c=t;s<c.length;s++)u=c[s],o.push.apply(o,u.weights);return d=[],t.forEach(function(t){t.paths.forEach(function(t){d.push(a+t+i)})}),[4,pl(d,{requestInit:this.requestInit,fetchFunc:this.getFetchFunc(),onProgress:this.onProgress})];case 1:return f=l.sent(),[2,[o,Au(f)]]}})})},t.prototype.getFetchFunc=function(){return this.fetchFunc},t.URL_SCHEME_REGEX=/^https?:\/\//,t}();function _l(t){return null!=t.match(vl.URL_SCHEME_REGEX)}var gl=function(t,e){return"undefined"==typeof fetch?null:(Array.isArray(t)?t.every(function(t){return _l(t)}):_l(t))?bl(t,{onProgress:e}):null};function bl(t,e){return new vl(t,e)}ju.registerSaveRouter(gl),ju.registerLoadRouter(gl);var yl=function(){function t(t,e,n){this.modelTopology=t,this.weightSpecs=e,this.weightData=n}return t.prototype.load=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){return t={},null!=this.modelTopology&&(t=c({modelTopology:this.modelTopology},t)),null!=this.weightSpecs&&this.weightSpecs.length>0&&(t=c({weightSpecs:this.weightSpecs},t)),null!=this.weightData&&this.weightData.byteLength>0&&(t=c({weightData:this.weightData},t)),[2,t]})})},t}(),xl=function(){function t(t){this.saveHandler=t}return t.prototype.save=function(t){return u(this,void 0,void 0,function(){return l(this,function(e){return[2,this.saveHandler(t)]})})},t}();Object.freeze({browserFiles:function(t){return new fl(t)},browserHTTPRequest:bl,concatenateArrayBuffers:Au,decodeWeights:Pu,encodeWeights:function(t){return u(this,void 0,void 0,function(){var e,n,r,i;return l(this,function(a){switch(a.label){case 0:for(r in e=[],n=[],t){if("float32"!==(i=t[r]).dtype&&"int32"!==i.dtype&&"bool"!==i.dtype)throw new Error("Unsupported dtype in weight '"+r+"': "+i.dtype);e.push({name:r,shape:i.shape,dtype:i.dtype}),n.push(i.data())}return[4,Promise.all(n)];case 1:return[2,{data:function(t){if(null===t)throw new Error("Invalid input value: "+JSON.stringify(t));var e=0,n=[];t.forEach(function(t){if(e+=t.byteLength,n.push(t.byteLength===t.buffer.byteLength?t:new t.constructor(t)),!(t instanceof Float32Array||t instanceof Int32Array||t instanceof Uint8Array))throw new Error("Unsupported TypedArray subtype: "+t.constructor.name)});var r=new Uint8Array(e),i=0;return n.forEach(function(t){r.set(new Uint8Array(t.buffer),i),i+=t.byteLength}),r.buffer}(a.sent()),specs:e}]}})})},fromMemory:function(t,e,n){return new yl(t,e,n)},getLoadHandlers:function(t,e){return ju.getLoadHandlers(t)},getModelArtifactsInfoForJSON:Bu,getSaveHandlers:function(t){return ju.getSaveHandlers(t)},isHTTPScheme:_l,loadWeights:function(t,e,n,r){return void 0===e&&(e=""),u(this,void 0,void 0,function(){return l(this,function(i){return[2,ml(function(t){return pl(t,{requestInit:r})})(t,e,n)]})})},registerLoadRouter:function(t){return ju.registerLoadRouter(t)},registerSaveRouter:function(t){return ju.registerSaveRouter(t)},weightsLoaderFactory:ml,withSaveHandler:function(t){return new xl(t)},copyModel:function(t,e){return u(this,void 0,void 0,function(){return l(this,function(n){switch(n.label){case 0:return[4,zu(t,e,!1)];case 1:return[2,n.sent()]}})})},listModels:function(){return u(this,void 0,void 0,function(){var t,e,n,r,i,a,o;return l(this,function(s){switch(s.label){case 0:t=Yu.getSchemes(),e={},n=0,r=t,s.label=1;case 1:return n<r.length?(i=r[n],[4,Yu.getManager(i).listModels()]):[3,4];case 2:for(o in a=s.sent())e[i+Fu+o]=a[o];s.label=3;case 3:return n++,[3,1];case 4:return[2,e]}})})},moveModel:function(t,e){return u(this,void 0,void 0,function(){return l(this,function(n){switch(n.label){case 0:return[4,zu(t,e,!0)];case 1:return[2,n.sent()]}})})},removeModel:function(t){return u(this,void 0,void 0,function(){var e;return l(this,function(n){switch(n.label){case 0:return e=$u(t),[4,Yu.getManager(e.scheme).removeModel(e.path)];case 1:return[2,n.sent()]}})})}});var wl=xe({confusionMatrix_:function(t,e,n){var r=qt(t,"labels","confusionMatrix"),i=qt(e,"predictions","confusionMatrix");b(null==n||n>0&&Number.isInteger(n),function(){return"If provided, numClasses must be a positive integer, but got "+n}),b(1===r.rank,function(){return"Expected the rank of labels to be 1, but got "+r.rank}),b(1===i.rank,function(){return"Expected the rank of predictions to be 1, but got "+i.rank}),b(r.shape[0]===i.shape[0],function(){return"Mismatch in the number of examples: "+r.shape[0]+" vs. "+i.shape[0]+". Labels and predictions should have the same number of elements."}),b(n>0&&Number.isInteger(n),function(){return"numClasses is required to be a positive integer, but got "+n});var a=Ba(r.asType("int32"),n),o=Ba(i.asType("int32"),n);return a.transpose().matMul(o).asType("int32")}});Object.freeze({confusionMatrix:wl});var kl=xe({fromPixels_:function(t,e){if(void 0===e&&(e=3),e>4)throw new Error("Cannot construct Tensor with more than 4 channels from pixels.");return zt.engine.fromPixels(t,e)}}),Cl=Object.freeze({toPixels:function(t,e){return u(this,void 0,void 0,function(){var n,r,i,a,o,s,c,u,d,f,h,p,m,v,_,g,b,y,x,w;return l(this,function(l){switch(l.label){case 0:if(n=qt(t,"img","toPixels"),t instanceof ht||(n=n.toInt()),2!==n.rank&&3!==n.rank)throw new Error("toPixels only supports rank 2 or 3 tensors, got rank "+n.rank+".");if(r=n.shape.slice(0,2),i=r[0],a=r[1],(o=2===n.rank?1:n.shape[2])>4||2===o)throw new Error("toPixels only supports depth of size 1, 3 or 4 but got "+o);return s=n.min(),c=n.max(),[4,s.data()];case 1:return u=l.sent()[0],[4,c.data()];case 2:if(d=l.sent()[0],s.dispose(),c.dispose(),"float32"===n.dtype){if(u<0||d>1)throw new Error("Tensor values for a float32 Tensor must be in the range [0 - 1] but got range ["+u+" - "+d+"].")}else{if("int32"!==n.dtype)throw new Error("Unsupported type for toPixels: "+n.dtype+". Please use float32 or int32 tensors.");if(u<0||d>255)throw new Error("Tensor values for a int32 Tensor must be in the range [0 - 255] but got range ["+u+" - "+d+"].")}return[4,n.data()];case 3:for(f=l.sent(),h="float32"===n.dtype?255:1,p=new Uint8ClampedArray(a*i*4),m=0;m<i*a;++m)v=void 0,_=void 0,g=void 0,b=void 0,1===o?(v=f[m]*h,_=f[m]*h,g=f[m]*h,b=255):3===o?(v=f[3*m]*h,_=f[3*m+1]*h,g=f[3*m+2]*h,b=255):4===o&&(v=f[4*m]*h,_=f[4*m+1]*h,g=f[4*m+2]*h,b=f[4*m+3]*h),p[0+(y=4*m)]=Math.round(v),p[y+1]=Math.round(_),p[y+2]=Math.round(g),p[y+3]=Math.round(b);return null!=e&&(e.width=a,e.height=i,x=e.getContext("2d"),w=new ImageData(p,a,i),x.putImageData(w,0,0)),n!==t&&n.dispose(),[2,p]}})})},fromPixels:kl}),El=function(){function t(){}return t.prototype.getClassName=function(){return this.constructor.className},t.fromConfig=function(t,e){return new t(e)},t}(),Sl=function(){function t(){this.classNameMap={}}return t.getMap=function(){return null==t.instance&&(t.instance=new t),t.instance},t.register=function(e){t.getMap().classNameMap[e.className]=[e,e.fromConfig]},t}();function Il(t){b(null!=t.className,function(){return"Class being registered does not have the static className property defined."}),b("string"==typeof t.className,function(){return"className is required to be a string, but got type "+typeof t.className}),b(t.className.length>0,function(){return"Class being registered has an empty-string as its className, which is disallowed."}),Sl.register(t)}Object.freeze({Serializable:El,SerializationMap:Sl,registerClass:Il});function Ml(t,e,n){return null==n&&(n=zt.get("TEST_EPSILON")),Tl(t,"number"==typeof e||"boolean"==typeof e?[e]:e,function(t,e){return Dl(t,Number(e),n)})}function Tl(t,e,n){if(t instanceof ht||e instanceof ht){if(t instanceof ht&&e instanceof ht){if(t.dtype!==e.dtype)throw new Error("Arrays are of different type actual: "+t.dtype+" vs expected: "+e.dtype+".");if(!C(t.shape,e.shape))throw new Error("Arrays are of different shape actual: "+t.shape+" vs expected: "+e.shape+".")}}else{var r=t.constructor.name,i=e.constructor.name;if(r!==i)throw new Error("Arrays are of different type actual: "+r+" vs expected: "+i)}var a,o;if(a=t instanceof ht?t.dataSync():t,o=e instanceof ht?e.dataSync():e,a.length!==o.length)throw new Error("Arrays have different lengths actual: "+a.length+" vs expected: "+o.length+".\nActual: "+a+".\nExpected: "+o+".");for(var s=0;s<o.length;++s){var c=a[s],u=o[s];if(!n(c,u))throw new Error("Arrays differ: actual["+s+"] = "+c+", expected["+s+"] = "+u+".\nActual: "+a+".\nExpected: "+o+".")}}function Dl(t,e,n){return!(!isNaN(t)||!isNaN(e))||!(isNaN(t)||isNaN(e)||Math.abs(t-e)>n)}Object.freeze({WEBGL_ENVS:{HAS_WEBGL:!0},PACKED_ENVS:{WEBGL_PACK:!0},NODE_ENVS:{IS_NODE:!0},CHROME_ENVS:{IS_CHROME:!0},BROWSER_ENVS:{IS_BROWSER:!0},CPU_ENVS:{HAS_WEBGL:!1},ALL_ENVS:{},expectArraysClose:Ml,expectPromiseToFail:function(t,e){t().then(function(){return e.fail()},function(){return e()})},expectArraysEqual:function(t,e){var n="string"==typeof e||"number"==typeof e||"boolean"==typeof e?[e]:e;return t instanceof ht&&"string"===t.dtype||e instanceof ht&&"string"===e.dtype||Array.isArray(t)&&$(t[0])||Array.isArray(e)&&$(e[0])?Tl(t,n,function(t,e){return t==e}):Ml(t,e,0)},expectNumbersClose:function(t,e,n){if(null==n&&(n=zt.get("TEST_EPSILON")),!Dl(t,e,n))throw new Error("Numbers differ: actual === "+t+", expected === "+e)},expectValuesInRange:function(t,e,n){var r;r=t instanceof ht?t.dataSync():t;for(var i=0;i<r.length;i++)if(r[i]<e||r[i]>n)throw new Error("Value out of range:"+r[i]+" low: "+e+", high: "+n)},expectArrayBuffersEqual:function(t,e){expect(new Float32Array(t)).toEqual(new Float32Array(e))}}),Object.freeze({gpgpu_util:hi,webgl_util:qr,MathBackendWebGL:no,GPGPUContext:pi});var Rl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.prototype.minimize=function(t,e,n){void 0===e&&(e=!1);var r=this.computeGradients(t,n),i=r.value,a=r.grads;return this.applyGradients(a),Object.keys(a).forEach(function(t){return a[t].dispose()}),e?i:(i.dispose(),null)},e.prototype.computeGradients=function(t,e){return function(t,e){if(b(q(t),function(){return"The f passed in variableGrads(f) must be a function"}),b(null==e||Array.isArray(e)&&e.every(function(t){return t instanceof pt}),function(){return"The varList passed in variableGrads(f, varList) must be an array of variables"}),null==e)for(var n in e=[],zt.engine.registeredVariables)e.push(zt.engine.registeredVariables[n]);var r=e.length;b((e=e.filter(function(t){return t.trainable})).length>0,function(){return"variableGrads() expects at least one of the input variables to be trainable, but none of the "+r+" variables is trainable."});var i=zt.engine.gradients(t,e,null,!0),a=i.value,o=i.grads;b(o.some(function(t){return null!=t}),function(){return"Cannot find a connection between any variable and the result of the loss function y=f(x). Please make sure the operations that use variables are inside the function f passed to minimize()."}),b(0===a.rank,function(){return"The f passed in variableGrads(f) must return a scalar, but it returned a rank-"+a.rank+" tensor"});var s={};return e.forEach(function(t,e){null!=o[e]&&(s[t.name]=o[e])}),{value:a,grads:s}}(t,e)},e.prototype.dispose=function(){},e}(El);Object.defineProperty(Rl,Symbol.hasInstance,{value:function(t){return null!=t.minimize&&null!=t.computeGradients&&null!=t.applyGradients}});var Pl=function(t){function e(e,n,r){void 0===r&&(r=null);var i=t.call(this)||this;return i.learningRate=e,i.rho=n,i.epsilon=r,i.accumulatedGrads={},i.accumulatedUpdates={},i.c=Kt(Me(-e)),i.rhoScalar=Kt(Me(n)),i.oneMinusRho=Kt(Me(1-n)),null===r&&(r=zt.get("EPSILON")),i.epsilonScalar=Kt(Me(r)),i}return s(e,t),e.prototype.applyGradients=function(t){var e=this,n=function(n){var i=zt.engine.registeredVariables[n];null==r.accumulatedGrads[n]&&Gt(function(){e.accumulatedGrads[n]=je(i).variable(!1)}),null==r.accumulatedUpdates[n]&&Gt(function(){e.accumulatedUpdates[n]=je(i).variable(!1)});var a=t[n],o=r.accumulatedGrads[n],s=r.accumulatedUpdates[n];Gt(function(){var t=e.rhoScalar.mul(o).add(e.oneMinusRho.mul(a.square())),r=s.add(e.epsilonScalar).sqrt().div(o.add(e.epsilonScalar).sqrt()).mul(a),c=e.rhoScalar.mul(s).add(e.oneMinusRho.mul(r.square()));e.accumulatedGrads[n].assign(t),e.accumulatedUpdates[n].assign(c);var u=e.c.mul(r).add(i);i.assign(u)})},r=this;for(var i in t)n(i)},e.prototype.dispose=function(){var t=this;this.c.dispose(),this.epsilonScalar.dispose(),this.rhoScalar.dispose(),this.oneMinusRho.dispose(),null!=this.accumulatedUpdates&&(Object.keys(this.accumulatedUpdates).forEach(function(e){return t.accumulatedUpdates[e].dispose()}),Object.keys(this.accumulatedGrads).forEach(function(e){return t.accumulatedGrads[e].dispose()}))},e.prototype.getConfig=function(){return{learningRate:this.learningRate,rho:this.rho,epsilon:this.epsilon}},e.fromConfig=function(t,e){return new t(e.learningRate,e.rho,e.epsilon)},e.className="AdadeltaOptimizer",e}(Rl);Il(Pl);var Ol=function(t){function e(e,n){void 0===n&&(n=.1);var r=t.call(this)||this;return r.learningRate=e,r.initialAccumulatorValue=n,r.accumulatedGrads={},r.c=Kt(Me(-e)),r.epsilon=Kt(Me(zt.get("EPSILON"))),r}return s(e,t),e.prototype.applyGradients=function(t){var e=this,n=function(n){var i=zt.engine.registeredVariables[n];null==r.accumulatedGrads[n]&&Gt(function(){e.accumulatedGrads[n]=Ae(i.shape,e.initialAccumulatorValue).variable(!1)});var a=t[n],o=r.accumulatedGrads[n];Gt(function(){var t=o.add(a.square());e.accumulatedGrads[n].assign(t);var r=e.c.mul(a.div(t.add(e.epsilon).sqrt())).add(i);i.assign(r)})},r=this;for(var i in t)n(i)},e.prototype.dispose=function(){var t=this;this.epsilon.dispose(),this.c.dispose(),null!=this.accumulatedGrads&&Object.keys(this.accumulatedGrads).forEach(function(e){return t.accumulatedGrads[e].dispose()})},e.prototype.getConfig=function(){return{learningRate:this.learningRate,initialAccumulatorValue:this.initialAccumulatorValue}},e.fromConfig=function(t,e){return new t(e.learningRate,e.initialAccumulatorValue)},e.className="AdagradOptimizer",e}(Rl);Il(Ol);var Ll=function(t){function e(e,n,r,i){void 0===i&&(i=null);var a=t.call(this)||this;return a.learningRate=e,a.beta1=n,a.beta2=r,a.epsilon=i,a.accumulatedFirstMoment={},a.accumulatedSecondMoment={},a.c=Kt(Me(-e)),a.beta1Scalar=Kt(Me(n)),a.beta2Scalar=Kt(Me(r)),Gt(function(){a.accBeta1=Me(n).variable(),a.accBeta2=Me(r).variable()}),a.oneMinusBeta1=Kt(Me(1-n)),a.oneMinusBeta2=Kt(Me(1-r)),a.one=Kt(Me(1)),null===i&&(i=zt.get("EPSILON")),a.epsScalar=Kt(Me(i)),a}return s(e,t),e.prototype.applyGradients=function(t){var e=this;Gt(function(){var n=e.one.sub(e.accBeta1),r=e.one.sub(e.accBeta2);for(var i in t){var a=zt.engine.registeredVariables[i];if(null==e.accumulatedFirstMoment[i]){var o=!1;e.accumulatedFirstMoment[i]=je(a).variable(o)}null==e.accumulatedSecondMoment[i]&&(o=!1,e.accumulatedSecondMoment[i]=je(a).variable(o));var s=t[i],c=e.accumulatedFirstMoment[i],u=e.accumulatedSecondMoment[i],l=e.beta1Scalar.mul(c).add(e.oneMinusBeta1.mul(s)),d=e.beta2Scalar.mul(u).add(e.oneMinusBeta2.mul(s.square())),f=l.div(n),h=d.div(r);e.accumulatedFirstMoment[i].assign(l),e.accumulatedSecondMoment[i].assign(d);var p=e.c.mul(f.div(e.epsScalar.add(h.sqrt()))).add(a);a.assign(p)}e.accBeta1.assign(e.accBeta1.mul(e.beta1Scalar)),e.accBeta2.assign(e.accBeta2.mul(e.beta2Scalar))})},e.prototype.dispose=function(){var t=this;this.c.dispose(),this.epsScalar.dispose(),this.beta1Scalar.dispose(),this.beta2Scalar.dispose(),this.accBeta1.dispose(),this.accBeta2.dispose(),this.oneMinusBeta1.dispose(),this.oneMinusBeta2.dispose(),this.one.dispose(),null!=this.accumulatedFirstMoment&&Object.keys(this.accumulatedFirstMoment).forEach(function(e){return t.accumulatedFirstMoment[e].dispose()}),null!=this.accumulatedSecondMoment&&Object.keys(this.accumulatedSecondMoment).forEach(function(e){return t.accumulatedSecondMoment[e].dispose()})},e.prototype.getConfig=function(){return{learningRate:this.learningRate,beta1:this.beta1,beta2:this.beta2,epsilon:this.epsilon}},e.fromConfig=function(t,e){return new t(e.learningRate,e.beta1,e.beta2,e.epsilon)},e.className="AdamOptimizer",e}(Rl);Il(Ll);var Al=function(t){function e(e,n,r,i,a){void 0===i&&(i=null),void 0===a&&(a=0);var o=t.call(this)||this;return o.learningRate=e,o.beta1=n,o.beta2=r,o.epsilon=i,o.decay=a,o.accumulatedFirstMoment={},o.accumulatedWeightedInfNorm={},o.c=Kt(Me(-e)),o.beta1Scalar=Kt(Me(n)),o.beta2Scalar=Kt(Me(r)),o.decayScalar=Kt(Me(a)),Gt(function(){o.iteration=Me(0).variable(),o.accBeta1=Me(n).variable()}),o.oneMinusBeta1=Kt(Me(1-n)),o.one=Kt(Me(1)),null===i&&(i=zt.get("EPSILON")),o.epsScalar=Kt(Me(i)),o}return s(e,t),e.prototype.applyGradients=function(t){var e=this;Gt(function(){var n=e.one.sub(e.accBeta1),r=e.c.div(e.one.add(e.decayScalar.mul(e.iteration)));for(var i in t){var a=zt.engine.registeredVariables[i];if(null==e.accumulatedFirstMoment[i]){var o=!1;e.accumulatedFirstMoment[i]=je(a).variable(o)}null==e.accumulatedWeightedInfNorm[i]&&(o=!1,e.accumulatedWeightedInfNorm[i]=je(a).variable(o));var s=t[i],c=e.accumulatedFirstMoment[i],u=e.accumulatedWeightedInfNorm[i],l=e.beta1Scalar.mul(c).add(e.oneMinusBeta1.mul(s)),d=e.beta2Scalar.mul(u),f=s.abs(),h=d.maximum(f);e.accumulatedFirstMoment[i].assign(l),e.accumulatedWeightedInfNorm[i].assign(h);var p=r.div(n).mul(l.div(e.epsScalar.add(h))).add(a);a.assign(p)}e.iteration.assign(e.iteration.add(e.one)),e.accBeta1.assign(e.accBeta1.mul(e.beta1Scalar))})},e.prototype.dispose=function(){var t=this;this.c.dispose(),this.epsScalar.dispose(),this.accBeta1.dispose(),this.beta1Scalar.dispose(),this.beta2Scalar.dispose(),this.oneMinusBeta1.dispose(),this.decayScalar.dispose(),this.iteration.dispose(),this.one.dispose(),null!=this.accumulatedFirstMoment&&Object.keys(this.accumulatedFirstMoment).forEach(function(e){return t.accumulatedFirstMoment[e].dispose()}),null!=this.accumulatedWeightedInfNorm&&Object.keys(this.accumulatedWeightedInfNorm).forEach(function(e){return t.accumulatedWeightedInfNorm[e].dispose()})},e.prototype.getConfig=function(){return{learningRate:this.learningRate,beta1:this.beta1,beta2:this.beta2,epsilon:this.epsilon,decay:this.decay}},e.fromConfig=function(t,e){return new t(e.learningRate,e.beta1,e.beta2,e.epsilon,e.decay)},e.className="AdamaxOptimizer",e}(Rl);Il(Al);var Nl=function(t){function e(e){var n=t.call(this)||this;return n.learningRate=e,n.setLearningRate(e),n}return s(e,t),e.prototype.applyGradients=function(t){var e=this;Object.keys(t).forEach(function(n){var r=t[n],i=zt.engine.registeredVariables[n];Gt(function(){var t=e.c.mul(r).add(i);i.assign(t)})})},e.prototype.setLearningRate=function(t){this.learningRate=t,null!=this.c&&this.c.dispose(),this.c=Kt(Me(-t))},e.prototype.dispose=function(){this.c.dispose()},e.prototype.getConfig=function(){return{learningRate:this.learningRate}},e.fromConfig=function(t,e){return new t(e.learningRate)},e.className="SGDOptimizer",e}(Rl);Il(Nl);var Bl=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e)||this;return i.learningRate=e,i.momentum=n,i.useNesterov=r,i.m=Me(i.momentum),i.accumulations={},i}return s(e,t),e.prototype.applyGradients=function(t){var e=this,n=function(n){var i=zt.engine.registeredVariables[n];null==r.accumulations[n]&&Gt(function(){e.accumulations[n]=je(i).variable(!1)});var a=r.accumulations[n],o=t[n];Gt(function(){var t,r=e.m.mul(a).add(o);t=e.useNesterov?e.c.mul(o.add(r.mul(e.m))).add(i):e.c.mul(r).add(i),e.accumulations[n].assign(r),i.assign(t)})},r=this;for(var i in t)n(i)},e.prototype.dispose=function(){if(t.prototype.dispose.call(this),this.m.dispose(),null!=this.accumulations)for(var e in this.accumulations)this.accumulations[e].dispose()},e.prototype.setMomentum=function(t){this.momentum=t},e.prototype.getConfig=function(){return{learningRate:this.learningRate,momentum:this.momentum,useNesterov:this.useNesterov}},e.fromConfig=function(t,e){return new t(e.learningRate,e.momentum,e.useNesterov)},e.className="MomentumOptimizer",e}(Nl);Il(Bl);var jl=function(t){function e(e,n,r,i,a){void 0===n&&(n=.9),void 0===r&&(r=0),void 0===i&&(i=null),void 0===a&&(a=!1);var o=t.call(this)||this;return o.learningRate=e,o.decay=n,o.momentum=r,o.epsilon=i,o.accumulatedMeanSquares={},o.accumulatedMeanGrads={},o.accumulatedMoments={},o.c=Kt(Me(e)),o.decayScalar=Kt(Me(n)),o.momentumScalar=Kt(Me(r)),o.oneMinusDecay=Kt(Me(1-n)),o.centered=a,null===i&&(i=zt.get("EPSILON")),o.epsilonScalar=Kt(Me(i)),o}return s(e,t),e.prototype.applyGradients=function(t){var e=this,n=function(n){var i=zt.engine.registeredVariables[n];null==r.accumulatedMeanSquares[n]&&Gt(function(){e.accumulatedMeanSquares[n]=je(i).variable(!1)}),null==r.accumulatedMeanGrads[n]&&r.centered&&Gt(function(){e.accumulatedMeanGrads[n]=je(i).variable(!1)}),null==r.accumulatedMoments[n]&&Gt(function(){e.accumulatedMoments[n]=je(i).variable(!1)});var a=r.accumulatedMeanSquares[n],o=r.accumulatedMeanGrads[n],s=r.accumulatedMoments[n],c=t[n];Gt(function(){var t=e.decayScalar.mul(a).add(e.oneMinusDecay.mul(c.square()));if(e.centered){var r=e.decayScalar.mul(o).add(e.oneMinusDecay.mul(c)),u=e.momentumScalar.mul(s).add(e.c.mul(c).div(t.sub(r.square().add(e.epsilonScalar)).sqrt()));e.accumulatedMeanSquares[n].assign(t),e.accumulatedMeanGrads[n].assign(r),e.accumulatedMoments[n].assign(u);var l=i.sub(u);i.assign(l)}else{var d=e.decayScalar.mul(a).add(e.oneMinusDecay.mul(c.square()));u=e.momentumScalar.mul(s).add(e.c.mul(c).div(d.add(e.epsilonScalar).sqrt())),e.accumulatedMeanSquares[n].assign(d),e.accumulatedMoments[n].assign(u),l=i.sub(u),i.assign(l)}})},r=this;for(var i in t)n(i)},e.prototype.dispose=function(){var t=this;this.c.dispose(),this.epsilonScalar.dispose(),this.decayScalar.dispose(),this.momentumScalar.dispose(),this.oneMinusDecay.dispose(),null!=this.accumulatedMeanSquares&&Object.keys(this.accumulatedMeanSquares).forEach(function(e){return t.accumulatedMeanSquares[e].dispose()}),null!=this.accumulatedMeanGrads&&this.centered&&Object.keys(this.accumulatedMeanGrads).forEach(function(e){return t.accumulatedMeanGrads[e].dispose()}),null!=this.accumulatedMoments&&Object.keys(this.accumulatedMoments).forEach(function(e){return t.accumulatedMoments[e].dispose()})},e.prototype.getConfig=function(){return{learningRate:this.learningRate,decay:this.decay,momentum:this.momentum,epsilon:this.epsilon,centered:this.centered}},e.fromConfig=function(t,e){return new t(e.learningRate,e.decay,e.momentum,e.epsilon,e.centered)},e.className="RMSPropOptimizer",e}(Rl);Il(jl);var Fl=function(){function t(){}return t.sgd=function(t){return new Nl(t)},t.momentum=function(t,e,n){return void 0===n&&(n=!1),new Bl(t,e,n)},t.rmsprop=function(t,e,n,r,i){return void 0===e&&(e=.9),void 0===n&&(n=0),void 0===r&&(r=null),void 0===i&&(i=!1),new jl(t,e,n,r,i)},t.adam=function(t,e,n,r){return void 0===t&&(t=.001),void 0===e&&(e=.9),void 0===n&&(n=.999),void 0===r&&(r=null),new Ll(t,e,n,r)},t.adadelta=function(t,e,n){return void 0===t&&(t=.001),void 0===e&&(e=.95),void 0===n&&(n=null),new Pl(t,e,n)},t.adamax=function(t,e,n,r,i){return void 0===t&&(t=.002),void 0===e&&(e=.9),void 0===n&&(n=.999),void 0===r&&(r=null),void 0===i&&(i=0),new Al(t,e,n,r,i)},t.adagrad=function(t,e){return void 0===e&&(e=.1),new Ol(t,e)},t}();Fl.sgd,Fl.momentum,Fl.adadelta,Fl.adagrad,Fl.rmsprop,Fl.adamax,Fl.adam,Ft.setBackend,Ft.getBackend,Ft.disposeVariables,Ft.memory;!function(t){dt=t}(Tu)}).call(e,n(26),n(20),n(107).setImmediate,n(19).Buffer)},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},function(t,e,n){var r=n(19),i=r.Buffer;function a(t,e){for(var n in t)e[n]=t[n]}function o(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(a(r,e),e.Buffer=o),a(i,o),o.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},o.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(79)("wks"),i=n(58),a=n(12).Symbol,o="function"==typeof a;(t.exports=function(t){return r[t]||(r[t]=o&&a[t]||(o?a:i)("Symbol."+t))}).store=r},function(t,e,n){var r=n(40),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){t.exports=!n(13)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(8),i=n(297),a=n(43),o=Object.defineProperty;e.f=n(17)?Object.defineProperty:function(t,e,n){if(r(t),e=a(e,!0),r(n),i)try{return o(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){"use strict";(function(t){var r=n(869),i=n(870),a=n(346);function o(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(o()<e)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=c.prototype:(null===t&&(t=new c(e)),t.length=e),t}function c(t,e,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return d(this,t)}return u(this,t,e,n)}function u(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);c.TYPED_ARRAY_SUPPORT?(t=e).__proto__=c.prototype:t=f(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(e,n),i=(t=s(t,r)).write(e,n);i!==r&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(c.isBuffer(e)){var n=0|h(e.length);return 0===(t=s(t,n)).length?t:(e.copy(t,0,0,n),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?s(t,0):f(t,e);if("Buffer"===e.type&&a(e.data))return f(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function d(t,e){if(l(e),t=s(t,e<0?0:0|h(e)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function f(t,e){var n=e.length<0?0:0|h(e.length);t=s(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function h(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function p(t,e){if(c.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Y(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return $(t).length;default:if(r)return Y(t).length;e=(""+e).toLowerCase(),r=!0}}function m(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=c.from(e,r)),c.isBuffer(e))return 0===e.length?-1:_(t,e,n,r,i);if("number"==typeof e)return e&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):_(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function _(t,e,n,r,i){var a,o=1,s=t.length,c=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;o=2,s/=2,c/=2,n/=2}function u(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var l=-1;for(a=n;a<s;a++)if(u(t,a)===u(e,-1===l?0:a-l)){if(-1===l&&(l=a),a-l+1===c)return l*o}else-1!==l&&(a-=a-l),l=-1}else for(n+c>s&&(n=s-c),a=n;a>=0;a--){for(var d=!0,f=0;f<c;f++)if(u(t,a+f)!==u(e,f)){d=!1;break}if(d)return a}return-1}function g(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=e.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(e.substr(2*o,2),16);if(isNaN(s))return o;t[n+o]=s}return o}function b(t,e,n,r){return z(Y(e,t.length-n),t,n,r)}function y(t,e,n,r){return z(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function x(t,e,n,r){return y(t,e,n,r)}function w(t,e,n,r){return z($(e),t,n,r)}function k(t,e,n,r){return z(function(t,e){for(var n,r,i,a=[],o=0;o<t.length&&!((e-=2)<0);++o)n=t.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}(e,t.length-n),t,n,r)}function C(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function E(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var a,o,s,c,u=t[i],l=null,d=u>239?4:u>223?3:u>191?2:1;if(i+d<=n)switch(d){case 1:u<128&&(l=u);break;case 2:128==(192&(a=t[i+1]))&&(c=(31&u)<<6|63&a)>127&&(l=c);break;case 3:a=t[i+1],o=t[i+2],128==(192&a)&&128==(192&o)&&(c=(15&u)<<12|(63&a)<<6|63&o)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:a=t[i+1],o=t[i+2],s=t[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(c=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,d=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=d}return function(t){var e=t.length;if(e<=S)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=S));return n}(r)}e.Buffer=c,e.SlowBuffer=function(t){+t!=t&&(t=0);return c.alloc(+t)},e.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=o(),c.poolSize=8192,c._augment=function(t){return t.__proto__=c.prototype,t},c.from=function(t,e,n){return u(null,t,e,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(t,e,n){return function(t,e,n,r){return l(e),e<=0?s(t,e):void 0!==n?"string"==typeof r?s(t,e).fill(n,r):s(t,e).fill(n):s(t,e)}(null,t,e,n)},c.allocUnsafe=function(t){return d(null,t)},c.allocUnsafeSlow=function(t){return d(null,t)},c.isBuffer=function(t){return!(null==t||!t._isBuffer)},c.compare=function(t,e){if(!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,a=Math.min(n,r);i<a;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},c.isEncoding=function(t){switch(String(t).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!0;default:return!1}},c.concat=function(t,e){if(!a(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=c.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var o=t[n];if(!c.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},c.byteLength=p,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},c.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},c.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},c.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?E(this,0,t):function(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,n);case"utf8":case"utf-8":return E(this,e,n);case"ascii":return I(this,e,n);case"latin1":case"binary":return M(this,e,n);case"base64":return C(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}.apply(this,arguments)},c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},c.prototype.compare=function(t,e,n,r,i){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,i>>>=0,this===t)return 0;for(var a=i-r,o=n-e,s=Math.min(a,o),u=this.slice(r,i),l=t.slice(e,n),d=0;d<s;++d)if(u[d]!==l[d]){a=u[d],o=l[d];break}return a<o?-1:o<a?1:0},c.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},c.prototype.indexOf=function(t,e,n){return v(this,t,e,n,!0)},c.prototype.lastIndexOf=function(t,e,n){return v(this,t,e,n,!1)},c.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return g(this,t,e,n);case"utf8":case"utf-8":return b(this,t,e,n);case"ascii":return y(this,t,e,n);case"latin1":case"binary":return x(this,t,e,n);case"base64":return w(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var S=4096;function I(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function M(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function T(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=e;a<n;++a)i+=F(t[a]);return i}function D(t,e,n){for(var r=t.slice(e,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function R(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function P(t,e,n,r,i,a){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function O(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,a=Math.min(t.length-n,2);i<a;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function L(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,a=Math.min(t.length-n,4);i<a;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function A(t,e,n,r,i,a){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(t,e,n,r,a){return a||A(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function B(t,e,n,r,a){return a||A(t,0,n,8),i.write(t,e,n,r,52,8),n+8}c.prototype.slice=function(t,e){var n,r=this.length;if(t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=c.prototype;else{var i=e-t;n=new c(i,void 0);for(var a=0;a<i;++a)n[a]=this[a+t]}return n},c.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||R(t,e,this.length);for(var r=this[t],i=1,a=0;++a<e&&(i*=256);)r+=this[t+a]*i;return r},c.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||R(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},c.prototype.readUInt8=function(t,e){return e||R(t,1,this.length),this[t]},c.prototype.readUInt16LE=function(t,e){return e||R(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUInt16BE=function(t,e){return e||R(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUInt32LE=function(t,e){return e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUInt32BE=function(t,e){return e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||R(t,e,this.length);for(var r=this[t],i=1,a=0;++a<e&&(i*=256);)r+=this[t+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},c.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||R(t,e,this.length);for(var r=e,i=1,a=this[t+--r];r>0&&(i*=256);)a+=this[t+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*e)),a},c.prototype.readInt8=function(t,e){return e||R(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){e||R(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(t,e){e||R(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(t,e){return e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readFloatLE=function(t,e){return e||R(t,4,this.length),i.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return e||R(t,4,this.length),i.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return e||R(t,8,this.length),i.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return e||R(t,8,this.length),i.read(this,t,!1,52,8)},c.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||P(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[e]=255&t;++a<n&&(i*=256);)this[e+a]=t/i&255;return e+n},c.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||P(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+n},c.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,1,255,0),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},c.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},c.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},c.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):L(this,t,e,!0),e+4},c.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},c.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);P(this,t,e,n,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a<n&&(o*=256);)t<0&&0===s&&0!==this[e+a-1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+n},c.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);P(this,t,e,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+n},c.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,1,127,-128),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},c.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},c.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):L(this,t,e,!0),e+4},c.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},c.prototype.writeFloatLE=function(t,e,n){return N(this,t,e,!0,n)},c.prototype.writeFloatBE=function(t,e,n){return N(this,t,e,!1,n)},c.prototype.writeDoubleLE=function(t,e,n){return B(this,t,e,!0,n)},c.prototype.writeDoubleBE=function(t,e,n){return B(this,t,e,!1,n)},c.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,a=r-n;if(this===t&&n<e&&e<r)for(i=a-1;i>=0;--i)t[i+e]=this[i+n];else if(a<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+a),e);return a},c.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var a;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(a=e;a<n;++a)this[a]=t;else{var o=c.isBuffer(t)?t:Y(new c(t,r).toString()),s=o.length;for(a=0;a<n-e;++a)this[a+e]=o[a%s]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function F(t){return t<16?"0"+t.toString(16):t.toString(16)}function Y(t,e){var n;e=e||1/0;for(var r=t.length,i=null,a=[],o=0;o<r;++o){if((n=t.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(e-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;a.push(n)}else if(n<2048){if((e-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function $(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(j,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(e,n(20))},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(44);t.exports=function(t){return Object(r(t))}},function(t,e,n){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function a(t,e,n){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var o;"object"==typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{o=n(905).Buffer}catch(t){}function s(t,e,n){for(var r=0,i=Math.min(t.length,n),a=e;a<i;a++){var o=t.charCodeAt(a)-48;r<<=4,r|=o>=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return r}function c(t,e,n,r){for(var i=0,a=Math.min(t.length,n),o=e;o<a;o++){var s=t.charCodeAt(o)-48;i*=r,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),e,n)},a.prototype._initNumber=function(t,e,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},a.prototype._initArray=function(t,e,n){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,o,s=0;if("be"===n)for(i=t.length-1,a=0;i>=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===n)for(i=0,a=0;i<t.length;i+=3)o=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var r,i,a=0;for(n=t.length-6,r=0;n>=e;n-=6)i=s(t,n,n+6),this.words[r]|=i<<a&67108863,this.words[r+1]|=i>>>26-a&4194303,(a+=24)>=26&&(a-=26,r++);n+6!==e&&(i=s(t,e,n+6),this.words[r]|=i<<a&67108863,this.words[r+1]|=i>>>26-a&4194303),this.strip()},a.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var a=t.length-n,o=a%r,s=Math.min(a,a-o)+n,u=0,l=n;l<s;l+=r)u=c(t,l,l+r,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==o){var d=1;for(u=c(t,l,t.length,e),l=0;l<o;l++)d*=e;this.imuln(d),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],a=0|e.words[0],o=i*a,s=67108863&o,c=o/67108864|0;n.words[0]=s;for(var u=1;u<r;u++){for(var l=c>>>26,d=67108863&c,f=Math.min(u,e.length-1),h=Math.max(0,u-t.length+1);h<=f;h++){var p=u-h|0;l+=(o=(i=0|t.words[p])*(a=0|e.words[h])+d)/67108864|0,d=67108863&o}n.words[u]=0|d,c=0|l}return 0!==c?n.words[u]=0|c:n.length--,n.strip()}a.prototype.toString=function(t,e){var n;if(t=t||10,e=0|e||1,16===t||"hex"===t){n="";for(var i=0,a=0,o=0;o<this.length;o++){var s=this.words[o],c=(16777215&(s<<i|a)).toString(16);n=0!==(a=s>>>24-i&16777215)||o!==this.length-1?u[6-c.length]+c+n:c+n,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(n=a.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var f=l[t],h=d[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(h).toString(t);n=(p=p.idivn(h)).isZero()?m+n:u[f-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return r(void 0!==o),this.toArrayLike(o,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,n){var i=this.byteLength(),a=n||Math.max(1,i);r(i<=a,"byte array longer than desired length"),r(a>0,"Requested array length <= 0"),this.strip();var o,s,c="le"===e,u=new t(a),l=this.clone();if(c){for(s=0;!l.isZero();s++)o=l.andln(255),l.iushrn(8),u[s]=o;for(;s<a;s++)u[s]=0}else{for(s=0;s<a-i;s++)u[s]=0;for(s=0;!l.isZero();s++)o=l.andln(255),l.iushrn(8),u[a-s-1]=o}return u},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var n=this._zeroBits(this.words[e]);if(t+=n,26!==n)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},a.prototype.ior=function(t){return r(0==(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;n<e.length;n++)this.words[n]=this.words[n]&t.words[n];return this.length=e.length,this.strip()},a.prototype.iand=function(t){return r(0==(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;r<n.length;r++)this.words[r]=e.words[r]^n.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},a.prototype.ixor=function(t){return r(0==(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},a.prototype.iadd=function(t){var e,n,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(n=this,r=t):(n=t,r=this);for(var i=0,a=0;a<r.length;a++)e=(0|n.words[a])+(0|r.words[a])+i,this.words[a]=67108863&e,i=e>>>26;for(;0!==i&&a<n.length;a++)e=(0|n.words[a])+i,this.words[a]=67108863&e,i=e>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this},a.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var a=0,o=0;o<r.length;o++)a=(e=(0|n.words[o])-(0|r.words[o])+a)>>26,this.words[o]=67108863&e;for(;0!==a&&o<n.length;o++)a=(e=(0|n.words[o])+a)>>26,this.words[o]=67108863&e;if(0===a&&o<n.length&&n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this.length=Math.max(this.length,o),n!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var h=function(t,e,n){var r,i,a,o=t.words,s=e.words,c=n.words,u=0,l=0|o[0],d=8191&l,f=l>>>13,h=0|o[1],p=8191&h,m=h>>>13,v=0|o[2],_=8191&v,g=v>>>13,b=0|o[3],y=8191&b,x=b>>>13,w=0|o[4],k=8191&w,C=w>>>13,E=0|o[5],S=8191&E,I=E>>>13,M=0|o[6],T=8191&M,D=M>>>13,R=0|o[7],P=8191&R,O=R>>>13,L=0|o[8],A=8191&L,N=L>>>13,B=0|o[9],j=8191&B,F=B>>>13,Y=0|s[0],$=8191&Y,z=Y>>>13,V=0|s[1],H=8191&V,q=V>>>13,W=0|s[2],U=8191&W,G=W>>>13,K=0|s[3],X=8191&K,J=K>>>13,Z=0|s[4],Q=8191&Z,tt=Z>>>13,et=0|s[5],nt=8191&et,rt=et>>>13,it=0|s[6],at=8191&it,ot=it>>>13,st=0|s[7],ct=8191&st,ut=st>>>13,lt=0|s[8],dt=8191&lt,ft=lt>>>13,ht=0|s[9],pt=8191&ht,mt=ht>>>13;n.negative=t.negative^e.negative,n.length=19;var vt=(u+(r=Math.imul(d,$))|0)+((8191&(i=(i=Math.imul(d,z))+Math.imul(f,$)|0))<<13)|0;u=((a=Math.imul(f,z))+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(p,$),i=(i=Math.imul(p,z))+Math.imul(m,$)|0,a=Math.imul(m,z);var _t=(u+(r=r+Math.imul(d,H)|0)|0)+((8191&(i=(i=i+Math.imul(d,q)|0)+Math.imul(f,H)|0))<<13)|0;u=((a=a+Math.imul(f,q)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(_,$),i=(i=Math.imul(_,z))+Math.imul(g,$)|0,a=Math.imul(g,z),r=r+Math.imul(p,H)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,H)|0,a=a+Math.imul(m,q)|0;var gt=(u+(r=r+Math.imul(d,U)|0)|0)+((8191&(i=(i=i+Math.imul(d,G)|0)+Math.imul(f,U)|0))<<13)|0;u=((a=a+Math.imul(f,G)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(y,$),i=(i=Math.imul(y,z))+Math.imul(x,$)|0,a=Math.imul(x,z),r=r+Math.imul(_,H)|0,i=(i=i+Math.imul(_,q)|0)+Math.imul(g,H)|0,a=a+Math.imul(g,q)|0,r=r+Math.imul(p,U)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,U)|0,a=a+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,J)|0)+Math.imul(f,X)|0))<<13)|0;u=((a=a+Math.imul(f,J)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(k,$),i=(i=Math.imul(k,z))+Math.imul(C,$)|0,a=Math.imul(C,z),r=r+Math.imul(y,H)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(x,H)|0,a=a+Math.imul(x,q)|0,r=r+Math.imul(_,U)|0,i=(i=i+Math.imul(_,G)|0)+Math.imul(g,U)|0,a=a+Math.imul(g,G)|0,r=r+Math.imul(p,X)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,X)|0,a=a+Math.imul(m,J)|0;var yt=(u+(r=r+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,tt)|0)+Math.imul(f,Q)|0))<<13)|0;u=((a=a+Math.imul(f,tt)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,$),i=(i=Math.imul(S,z))+Math.imul(I,$)|0,a=Math.imul(I,z),r=r+Math.imul(k,H)|0,i=(i=i+Math.imul(k,q)|0)+Math.imul(C,H)|0,a=a+Math.imul(C,q)|0,r=r+Math.imul(y,U)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(x,U)|0,a=a+Math.imul(x,G)|0,r=r+Math.imul(_,X)|0,i=(i=i+Math.imul(_,J)|0)+Math.imul(g,X)|0,a=a+Math.imul(g,J)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,a=a+Math.imul(m,tt)|0;var xt=(u+(r=r+Math.imul(d,nt)|0)|0)+((8191&(i=(i=i+Math.imul(d,rt)|0)+Math.imul(f,nt)|0))<<13)|0;u=((a=a+Math.imul(f,rt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(T,$),i=(i=Math.imul(T,z))+Math.imul(D,$)|0,a=Math.imul(D,z),r=r+Math.imul(S,H)|0,i=(i=i+Math.imul(S,q)|0)+Math.imul(I,H)|0,a=a+Math.imul(I,q)|0,r=r+Math.imul(k,U)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(C,U)|0,a=a+Math.imul(C,G)|0,r=r+Math.imul(y,X)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(x,X)|0,a=a+Math.imul(x,J)|0,r=r+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(g,Q)|0,a=a+Math.imul(g,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,a=a+Math.imul(m,rt)|0;var wt=(u+(r=r+Math.imul(d,at)|0)|0)+((8191&(i=(i=i+Math.imul(d,ot)|0)+Math.imul(f,at)|0))<<13)|0;u=((a=a+Math.imul(f,ot)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(P,$),i=(i=Math.imul(P,z))+Math.imul(O,$)|0,a=Math.imul(O,z),r=r+Math.imul(T,H)|0,i=(i=i+Math.imul(T,q)|0)+Math.imul(D,H)|0,a=a+Math.imul(D,q)|0,r=r+Math.imul(S,U)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(I,U)|0,a=a+Math.imul(I,G)|0,r=r+Math.imul(k,X)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(C,X)|0,a=a+Math.imul(C,J)|0,r=r+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(x,Q)|0,a=a+Math.imul(x,tt)|0,r=r+Math.imul(_,nt)|0,i=(i=i+Math.imul(_,rt)|0)+Math.imul(g,nt)|0,a=a+Math.imul(g,rt)|0,r=r+Math.imul(p,at)|0,i=(i=i+Math.imul(p,ot)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,ot)|0;var kt=(u+(r=r+Math.imul(d,ct)|0)|0)+((8191&(i=(i=i+Math.imul(d,ut)|0)+Math.imul(f,ct)|0))<<13)|0;u=((a=a+Math.imul(f,ut)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(A,$),i=(i=Math.imul(A,z))+Math.imul(N,$)|0,a=Math.imul(N,z),r=r+Math.imul(P,H)|0,i=(i=i+Math.imul(P,q)|0)+Math.imul(O,H)|0,a=a+Math.imul(O,q)|0,r=r+Math.imul(T,U)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(D,U)|0,a=a+Math.imul(D,G)|0,r=r+Math.imul(S,X)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(I,X)|0,a=a+Math.imul(I,J)|0,r=r+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(C,Q)|0,a=a+Math.imul(C,tt)|0,r=r+Math.imul(y,nt)|0,i=(i=i+Math.imul(y,rt)|0)+Math.imul(x,nt)|0,a=a+Math.imul(x,rt)|0,r=r+Math.imul(_,at)|0,i=(i=i+Math.imul(_,ot)|0)+Math.imul(g,at)|0,a=a+Math.imul(g,ot)|0,r=r+Math.imul(p,ct)|0,i=(i=i+Math.imul(p,ut)|0)+Math.imul(m,ct)|0,a=a+Math.imul(m,ut)|0;var Ct=(u+(r=r+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,ft)|0)+Math.imul(f,dt)|0))<<13)|0;u=((a=a+Math.imul(f,ft)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(j,$),i=(i=Math.imul(j,z))+Math.imul(F,$)|0,a=Math.imul(F,z),r=r+Math.imul(A,H)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(N,H)|0,a=a+Math.imul(N,q)|0,r=r+Math.imul(P,U)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(O,U)|0,a=a+Math.imul(O,G)|0,r=r+Math.imul(T,X)|0,i=(i=i+Math.imul(T,J)|0)+Math.imul(D,X)|0,a=a+Math.imul(D,J)|0,r=r+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(I,Q)|0,a=a+Math.imul(I,tt)|0,r=r+Math.imul(k,nt)|0,i=(i=i+Math.imul(k,rt)|0)+Math.imul(C,nt)|0,a=a+Math.imul(C,rt)|0,r=r+Math.imul(y,at)|0,i=(i=i+Math.imul(y,ot)|0)+Math.imul(x,at)|0,a=a+Math.imul(x,ot)|0,r=r+Math.imul(_,ct)|0,i=(i=i+Math.imul(_,ut)|0)+Math.imul(g,ct)|0,a=a+Math.imul(g,ut)|0,r=r+Math.imul(p,dt)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(m,dt)|0,a=a+Math.imul(m,ft)|0;var Et=(u+(r=r+Math.imul(d,pt)|0)|0)+((8191&(i=(i=i+Math.imul(d,mt)|0)+Math.imul(f,pt)|0))<<13)|0;u=((a=a+Math.imul(f,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(j,H),i=(i=Math.imul(j,q))+Math.imul(F,H)|0,a=Math.imul(F,q),r=r+Math.imul(A,U)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(N,U)|0,a=a+Math.imul(N,G)|0,r=r+Math.imul(P,X)|0,i=(i=i+Math.imul(P,J)|0)+Math.imul(O,X)|0,a=a+Math.imul(O,J)|0,r=r+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(D,Q)|0,a=a+Math.imul(D,tt)|0,r=r+Math.imul(S,nt)|0,i=(i=i+Math.imul(S,rt)|0)+Math.imul(I,nt)|0,a=a+Math.imul(I,rt)|0,r=r+Math.imul(k,at)|0,i=(i=i+Math.imul(k,ot)|0)+Math.imul(C,at)|0,a=a+Math.imul(C,ot)|0,r=r+Math.imul(y,ct)|0,i=(i=i+Math.imul(y,ut)|0)+Math.imul(x,ct)|0,a=a+Math.imul(x,ut)|0,r=r+Math.imul(_,dt)|0,i=(i=i+Math.imul(_,ft)|0)+Math.imul(g,dt)|0,a=a+Math.imul(g,ft)|0;var St=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((a=a+Math.imul(m,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(j,U),i=(i=Math.imul(j,G))+Math.imul(F,U)|0,a=Math.imul(F,G),r=r+Math.imul(A,X)|0,i=(i=i+Math.imul(A,J)|0)+Math.imul(N,X)|0,a=a+Math.imul(N,J)|0,r=r+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(O,Q)|0,a=a+Math.imul(O,tt)|0,r=r+Math.imul(T,nt)|0,i=(i=i+Math.imul(T,rt)|0)+Math.imul(D,nt)|0,a=a+Math.imul(D,rt)|0,r=r+Math.imul(S,at)|0,i=(i=i+Math.imul(S,ot)|0)+Math.imul(I,at)|0,a=a+Math.imul(I,ot)|0,r=r+Math.imul(k,ct)|0,i=(i=i+Math.imul(k,ut)|0)+Math.imul(C,ct)|0,a=a+Math.imul(C,ut)|0,r=r+Math.imul(y,dt)|0,i=(i=i+Math.imul(y,ft)|0)+Math.imul(x,dt)|0,a=a+Math.imul(x,ft)|0;var It=(u+(r=r+Math.imul(_,pt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(g,pt)|0))<<13)|0;u=((a=a+Math.imul(g,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(j,X),i=(i=Math.imul(j,J))+Math.imul(F,X)|0,a=Math.imul(F,J),r=r+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(N,Q)|0,a=a+Math.imul(N,tt)|0,r=r+Math.imul(P,nt)|0,i=(i=i+Math.imul(P,rt)|0)+Math.imul(O,nt)|0,a=a+Math.imul(O,rt)|0,r=r+Math.imul(T,at)|0,i=(i=i+Math.imul(T,ot)|0)+Math.imul(D,at)|0,a=a+Math.imul(D,ot)|0,r=r+Math.imul(S,ct)|0,i=(i=i+Math.imul(S,ut)|0)+Math.imul(I,ct)|0,a=a+Math.imul(I,ut)|0,r=r+Math.imul(k,dt)|0,i=(i=i+Math.imul(k,ft)|0)+Math.imul(C,dt)|0,a=a+Math.imul(C,ft)|0;var Mt=(u+(r=r+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,mt)|0)+Math.imul(x,pt)|0))<<13)|0;u=((a=a+Math.imul(x,mt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(j,Q),i=(i=Math.imul(j,tt))+Math.imul(F,Q)|0,a=Math.imul(F,tt),r=r+Math.imul(A,nt)|0,i=(i=i+Math.imul(A,rt)|0)+Math.imul(N,nt)|0,a=a+Math.imul(N,rt)|0,r=r+Math.imul(P,at)|0,i=(i=i+Math.imul(P,ot)|0)+Math.imul(O,at)|0,a=a+Math.imul(O,ot)|0,r=r+Math.imul(T,ct)|0,i=(i=i+Math.imul(T,ut)|0)+Math.imul(D,ct)|0,a=a+Math.imul(D,ut)|0,r=r+Math.imul(S,dt)|0,i=(i=i+Math.imul(S,ft)|0)+Math.imul(I,dt)|0,a=a+Math.imul(I,ft)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,mt)|0)+Math.imul(C,pt)|0))<<13)|0;u=((a=a+Math.imul(C,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(j,nt),i=(i=Math.imul(j,rt))+Math.imul(F,nt)|0,a=Math.imul(F,rt),r=r+Math.imul(A,at)|0,i=(i=i+Math.imul(A,ot)|0)+Math.imul(N,at)|0,a=a+Math.imul(N,ot)|0,r=r+Math.imul(P,ct)|0,i=(i=i+Math.imul(P,ut)|0)+Math.imul(O,ct)|0,a=a+Math.imul(O,ut)|0,r=r+Math.imul(T,dt)|0,i=(i=i+Math.imul(T,ft)|0)+Math.imul(D,dt)|0,a=a+Math.imul(D,ft)|0;var Dt=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,mt)|0)+Math.imul(I,pt)|0))<<13)|0;u=((a=a+Math.imul(I,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,r=Math.imul(j,at),i=(i=Math.imul(j,ot))+Math.imul(F,at)|0,a=Math.imul(F,ot),r=r+Math.imul(A,ct)|0,i=(i=i+Math.imul(A,ut)|0)+Math.imul(N,ct)|0,a=a+Math.imul(N,ut)|0,r=r+Math.imul(P,dt)|0,i=(i=i+Math.imul(P,ft)|0)+Math.imul(O,dt)|0,a=a+Math.imul(O,ft)|0;var Rt=(u+(r=r+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((a=a+Math.imul(D,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(j,ct),i=(i=Math.imul(j,ut))+Math.imul(F,ct)|0,a=Math.imul(F,ut),r=r+Math.imul(A,dt)|0,i=(i=i+Math.imul(A,ft)|0)+Math.imul(N,dt)|0,a=a+Math.imul(N,ft)|0;var Pt=(u+(r=r+Math.imul(P,pt)|0)|0)+((8191&(i=(i=i+Math.imul(P,mt)|0)+Math.imul(O,pt)|0))<<13)|0;u=((a=a+Math.imul(O,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(j,dt),i=(i=Math.imul(j,ft))+Math.imul(F,dt)|0,a=Math.imul(F,ft);var Ot=(u+(r=r+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,mt)|0)+Math.imul(N,pt)|0))<<13)|0;u=((a=a+Math.imul(N,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863;var Lt=(u+(r=Math.imul(j,pt))|0)+((8191&(i=(i=Math.imul(j,mt))+Math.imul(F,pt)|0))<<13)|0;return u=((a=Math.imul(F,mt))+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,c[0]=vt,c[1]=_t,c[2]=gt,c[3]=bt,c[4]=yt,c[5]=xt,c[6]=wt,c[7]=kt,c[8]=Ct,c[9]=Et,c[10]=St,c[11]=It,c[12]=Mt,c[13]=Tt,c[14]=Dt,c[15]=Rt,c[16]=Pt,c[17]=Ot,c[18]=Lt,0!==u&&(c[19]=u,n.length++),n};function p(t,e,n){return(new m).mulp(t,e,n)}function m(t,e){this.x=t,this.y=e}Math.imul||(h=f),a.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?h(this,t,e):n<63?f(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,a=0;a<n.length-1;a++){var o=i;i=0;for(var s=67108863&r,c=Math.min(a,e.length-1),u=Math.max(0,a-t.length+1);u<=c;u++){var l=a-u,d=(0|t.words[l])*(0|e.words[u]),f=67108863&d;s=67108863&(f=f+s|0),i+=(o=(o=o+(d/67108864|0)|0)+(f>>>26)|0)>>>26,o&=67108863}n.words[a]=s,r=o,o=i}return 0!==r?n.words[a]=r:n.length--,n.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),n=a.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,n,t);return e},m.prototype.revBin=function(t,e,n){if(0===t||t===n-1)return t;for(var r=0,i=0;i<e;i++)r|=(1&t)<<e-i-1,t>>=1;return r},m.prototype.permute=function(t,e,n,r,i,a){for(var o=0;o<a;o++)r[o]=e[t[o]],i[o]=n[t[o]]},m.prototype.transform=function(t,e,n,r,i,a){this.permute(a,t,e,n,r,i);for(var o=1;o<i;o<<=1)for(var s=o<<1,c=Math.cos(2*Math.PI/s),u=Math.sin(2*Math.PI/s),l=0;l<i;l+=s)for(var d=c,f=u,h=0;h<o;h++){var p=n[l+h],m=r[l+h],v=n[l+h+o],_=r[l+h+o],g=d*v-f*_;_=d*_+f*v,v=g,n[l+h]=p+v,r[l+h]=m+_,n[l+h+o]=p-v,r[l+h+o]=m-_,h!==s&&(g=c*d-u*f,f=c*f+u*d,d=g)}},m.prototype.guessLen13b=function(t,e){var n=1|Math.max(e,t),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},m.prototype.conjugate=function(t,e,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=t[r];t[r]=t[n-r-1],t[n-r-1]=i,i=e[r],e[r]=-e[n-r-1],e[n-r-1]=-i}},m.prototype.normalize13b=function(t,e){for(var n=0,r=0;r<e/2;r++){var i=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+n;t[r]=67108863&i,n=i<67108864?0:i/67108864|0}return t},m.prototype.convert13b=function(t,e,n,i){for(var a=0,o=0;o<e;o++)a+=0|t[o],n[2*o]=8191&a,a>>>=13,n[2*o+1]=8191&a,a>>>=13;for(o=2*e;o<i;++o)n[o]=0;r(0===a),r(0==(-8192&a))},m.prototype.stub=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=0;return e},m.prototype.mulp=function(t,e,n){var r=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(r),a=this.stub(r),o=new Array(r),s=new Array(r),c=new Array(r),u=new Array(r),l=new Array(r),d=new Array(r),f=n.words;f.length=r,this.convert13b(t.words,t.length,o,r),this.convert13b(e.words,e.length,u,r),this.transform(o,a,s,c,r,i),this.transform(u,a,l,d,r,i);for(var h=0;h<r;h++){var p=s[h]*l[h]-c[h]*d[h];c[h]=s[h]*d[h]+c[h]*l[h],s[h]=p}return this.conjugate(s,c,r),this.transform(s,c,f,a,r,i),this.conjugate(f,a,r),this.normalize13b(f,r),n.negative=t.negative^e.negative,n.length=t.length+e.length,n.strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),p(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){r("number"==typeof t),r(t<67108864);for(var e=0,n=0;n<this.length;n++){var i=(0|this.words[n])*t,a=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=a>>>26,this.words[n]=67108863&a}return 0!==e&&(this.words[n]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n<e.length;n++){var r=n/26|0,i=n%26;e[n]=(t.words[r]&1<<i)>>>i}return e}(t);if(0===e.length)return new a(1);for(var n=this,r=0;r<e.length&&0===e[r];r++,n=n.sqr());if(++r<e.length)for(var i=n.sqr();r<e.length;r++,i=i.sqr())0!==e[r]&&(n=n.mul(i));return n},a.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,n=t%26,i=(t-n)/26,a=67108863>>>26-n<<26-n;if(0!==n){var o=0;for(e=0;e<this.length;e++){var s=this.words[e]&a,c=(0|this.words[e])-s<<n;this.words[e]=c|o,o=s>>>26-n}o&&(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},a.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,n){var i;r("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var a=t%26,o=Math.min((t-a)/26,this.length),s=67108863^67108863>>>a<<a,c=n;if(i-=o,i=Math.max(0,i),c){for(var u=0;u<o;u++)c.words[u]=this.words[u];c.length=o}if(0===o);else if(this.length>o)for(this.length-=o,u=0;u<this.length;u++)this.words[u]=this.words[u+o];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=i);u--){var d=0|this.words[u];this.words[u]=l<<26-a|d>>>a,l=d&s}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<<e;return!(this.length<=n)&&!!(this.words[n]&i)},a.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return r("number"==typeof t),r(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,n){var i,a,o=t.length+n;this._expand(o);var s=0;for(i=0;i<t.length;i++){a=(0|this.words[i+n])+s;var c=(0|t.words[i])*e;s=((a-=67108863&c)>>26)-(c/67108864|0),this.words[i+n]=67108863&a}for(;i<this.length-n;i++)s=(a=(0|this.words[i+n])+s)>>26,this.words[i+n]=67108863&a;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i<this.length;i++)s=(a=-(0|this.words[i])+s)>>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,o=0|i.words[i.length-1];0!==(n=26-this._countBits(o))&&(i=i.ushln(n),r.iushln(n),o=0|i.words[i.length-1]);var s,c=r.length-i.length;if("mod"!==e){(s=new a(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u<s.length;u++)s.words[u]=0}var l=r.clone()._ishlnsubmul(i,1,c);0===l.negative&&(r=l,s&&(s.words[c]=1));for(var d=c-1;d>=0;d--){var f=67108864*(0|r.words[i.length+d])+(0|r.words[i.length+d-1]);for(f=Math.min(f/o|0,67108863),r._ishlnsubmul(i,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(i,1,d),r.isZero()||(r.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},a.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(o=s.mod.neg(),n&&0!==o.negative&&o.iadd(t)),{div:i,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(o=s.mod.neg(),n&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,o,s},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),a=n.cmp(r);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},a.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=new a(0),c=new a(1),u=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++u;for(var l=n.clone(),d=e.clone();!e.isZero();){for(var f=0,h=1;0==(e.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(l),o.isub(d)),i.iushrn(1),o.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(l),c.isub(d)),s.iushrn(1),c.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(s),o.isub(c)):(n.isub(e),s.isub(i),c.isub(o))}return{a:s,b:c,gcd:n.iushln(u)}},a.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,o=new a(1),s=new a(0),c=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,l=1;0==(e.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(e.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);for(var d=0,f=1;0==(n.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(n.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),o.isub(s)):(n.isub(e),s.isub(o))}return(i=0===e.cmpn(1)?o:s).cmpn(0)<0&&i.iadd(t),i},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var a=e;e=n,n=a}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<<e;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var a=i,o=n;0!==a&&o<this.length;o++){var s=0|this.words[o];a=(s+=a)>>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},a.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){r<i?e=-1:r>i&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new w(t)},a.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function y(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function w(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){w.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):n.strip(),n},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},i(g,_),g.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r<n;r++)e.words[r]=t.words[r];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,r=10;r<t.length;r++){var a=0|t.words[r];t.words[r-10]=(4194303&a)<<4|i>>>22,i=a}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},g.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n<t.length;n++){var r=0|t.words[n];e+=977*r,t.words[n]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(b,_),i(y,_),i(x,_),x.prototype.imulK=function(t){for(var e=0,n=0;n<t.length;n++){var r=19*(0|t.words[n])+e,i=67108863&r;r>>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new g;else if("p224"===t)e=new b;else if("p192"===t)e=new y;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new x}return v[t]=e,e},w.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},w.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},w.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},w.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},w.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},w.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},w.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},w.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},w.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},w.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},w.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},w.prototype.isqr=function(t){return this.imul(t,t.clone())},w.prototype.sqr=function(t){return this.mul(t,t)},w.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new a(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);r(!i.isZero());var s=new a(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new a(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var d=this.pow(l,i),f=this.pow(t,i.addn(1).iushrn(1)),h=this.pow(t,i),p=o;0!==h.cmp(s);){for(var m=h,v=0;0!==m.cmp(s);v++)m=m.redSqr();r(v<p);var _=this.pow(d,new a(1).iushln(p-v-1));f=f.redMul(_),d=_.redSqr(),h=h.redMul(d),p=v}return f},w.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},w.prototype.pow=function(t,e){if(e.isZero())return new a(1).toRed(this);if(0===e.cmpn(1))return t.clone();var n=new Array(16);n[0]=new a(1).toRed(this),n[1]=t;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],t);var i=n[0],o=0,s=0,c=e.bitLength()%26;for(0===c&&(c=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],l=c-1;l>=0;l--){var d=u>>l&1;i!==n[0]&&(i=this.sqr(i)),0!==d||0!==o?(o<<=1,o|=d,(4===++s||0===r&&0===l)&&(i=this.mul(i,n[o]),s=0,o=0)):s=0}c=26}return i},w.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},w.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new k(t)},i(k,w),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)}).call(e,n(340)(t))},function(t,e,n){var r;r=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.m=t,n.c=e,n.p="",n(0)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(33),a=(r=i)&&r.__esModule?r:{default:r};var o={install:function(t){t.component("vue-clip",a.default)}};"undefined"!=typeof window&&void 0!==window.Vue&&window.Vue.use(o),e.default=o},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){t.exports=!n(7)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(6),i=n(22),a=n(17),o=Object.defineProperty;e.f=n(2)?Object.defineProperty:function(t,e,n){if(r(t),e=a(e,!0),r(n),i)try{return o(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(43),i=n(39);t.exports=function(t){return r(i(t))}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(8);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(26),i=n(12);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(3),i=n(15);t.exports=n(2)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(1),i=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,e,n){var r=n(8);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(1),i=n(11),a=n(23),o=n(29),s=n(3).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=a?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:o.f(t)})}},function(t,e,n){var r=n(16)("wks"),i=n(10),a=n(1).Symbol,o="function"==typeof a;(t.exports=function(t){return r[t]||(r[t]=o&&a[t]||(o?a:i)("Symbol."+t))}).store=r},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(8),i=n(1).document,a=r(i)&&r(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},function(t,e,n){t.exports=!n(2)&&!n(7)(function(){return 7!=Object.defineProperty(n(21)("div"),"a",{get:function(){return 7}}).a})},function(t,e){t.exports=!0},function(t,e,n){var r=n(26),i=n(12).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(5),i=n(4),a=n(37)(!1),o=n(27)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),c=0,u=[];for(n in s)n!=o&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~a(u,n)||u.push(n));return u}},function(t,e,n){var r=n(16)("keys"),i=n(10);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){e.f=n(19)},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var r=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._file=e,this.status=e.status,this.name=e.name,this.width=e.width,this.height=e.height,this.bytesSent=e.upload.bytesSent||0,this.progress=e.upload.progress||0,this.total=e.upload.total,this.type=e.type,this.size=e.size,this.dataUrl="",this.xhrResponse={},this.customAttributes={},this.errorMessage=""}return n(t,[{key:"updateDataUrl",value:function(t){this.dataUrl=t}},{key:"updateStatus",value:function(t){this.status=t}},{key:"updateProgress",value:function(t){this.progress=t}},{key:"updateBytesSent",value:function(t){this.bytesSent=t}},{key:"updateXhrResponse",value:function(t){this.xhrResponse=t}},{key:"updateErrorMessage",value:function(t){this.errorMessage=t}},{key:"addAttribute",value:function(t,e){this.customAttributes[t]=e}}]),t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(59),o=(r=a)&&r.__esModule?r:{default:r};o.default.autoDiscover=!1;var s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._options=e||{},this._existingInit=this._options.init||function(){},this._hooks=[],this._uploader=null}return i(t,[{key:"_bindHooks",value:function(t){var e=this;t._existingInit.bind(this)(),t._hooks.forEach(function(t){e.on(t.event,t.callback)}),t._hooks=[]}},{key:"mount",value:function(t){var e=this;this._options.init=function(){e._bindHooks.bind(this)(e)},this._uploader=new o.default(t,this._options)}},{key:"on",value:function(t,e){this._hooks.push({event:t,callback:e})}},{key:"destroy",value:function(){this._uploader.disable()}},{key:"removeFile",value:function(t){this._uploader.removeFile(t)}},{key:"addFile",value:function(t){this._uploader.addFile(t)}},{key:"removeAllFiles",value:function(t){this._uploader.removeAllFiles(t)}}]),t}();e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(n(32)),i=s(n(31)),a=s(n(60)),o=s(n(34));function s(t){return t&&t.__esModule?t:{default:t}}var c={template:'<div v-bind:class="uploaderClass">\n <slot name="clip-uploader-action" :dragging="dragCounter > 0"></slot>\n <slot name="clip-uploader-body" :files="files"></slot>\n <div ref="clip-preview-template" class="clip-preview-template" style="display: none;"><div></div></div>\n</div>',props:{}};c.props.uploaderClass={type:String},c.props.options={type:Object,default:function(){return{}}},c.props.onAddedFile={type:Function,default:function(){return function(){}}},c.props.onRemovedFile={type:Function,default:function(){return function(){}}},c.props.onSending={type:Function,default:function(){return function(){}}},c.props.onDragEnter={type:Function,default:function(){return function(){}}},c.props.onDragLeave={type:Function,default:function(){return function(){}}},c.props.onDrop={type:Function,default:function(){return function(){}}},c.props.onTotalProgress={type:Function,default:function(){return function(){}}},c.props.onQueueComplete={type:Function,default:function(){return function(){}}},c.props.onMaxFiles={type:Function,default:function(){return function(){}}},c.props.onInit={type:Function,default:function(){return function(){}}},c.props.onComplete={type:Function,default:function(){return function(){}}},c.data=function(){return{files:[],dragCounter:0,uploader:null}},c.mounted=function(){var t=this,e=(0,a.default)(this.options),n=e.accept||function(t,e){e()};if(e.previewTemplate=this.$refs["clip-preview-template"].innerHTML,e.accept=function(e,r){var i=e.blobId;n(t.getFile(i),r)},void 0!==e.maxFiles&&e.maxFiles instanceof Object==!0){var i=e.maxFiles,o=i.limit,s=i.message;e.maxFiles=o,e.dictMaxFilesExceeded=s}if(void 0!==e.maxFilesize&&e.maxFilesize instanceof Object==!0){var c=e.maxFilesize,u=c.limit,l=c.message;e.maxFilesize=u,e.dictFileTooBig=l}if(void 0!==e.acceptedFiles&&e.acceptedFiles instanceof Object==!0&&e.acceptedFiles instanceof Array==!1){var d=e.acceptedFiles,f=d.extensions,h=d.message;e.acceptedFiles=f.join(","),e.dictInvalidFileType=h}this.uploader=new r.default(e),this.bindEvents(),this.uploader.mount(this.$el.firstElementChild),this.onInit(this)},c.methods={},c.methods.bindEvents=function(){this.uploader.on("addedfile",this.addedFile.bind(this)),this.uploader.on("removedfile",this.removedFile.bind(this)),this.uploader.on("sending",this.sending.bind(this)),this.uploader.on("complete",this.complete.bind(this)),this.uploader.on("error",this.error.bind(this)),this.uploader.on("uploadprogress",this.uploadProgress.bind(this)),this.uploader.on("thumbnail",this.thumbnail.bind(this)),this.uploader.on("drop",this.drop.bind(this)),this.uploader.on("dragenter",this.dragEnter.bind(this)),this.uploader.on("dragleave",this.dragLeave.bind(this)),this.uploader.on("totaluploadprogress",this.totalUploadProgress.bind(this)),this.uploader.on("maxfilesexceeded",this.maxFilesExceeded.bind(this)),this.uploader.on("queuecomplete",this.queueComplete.bind(this))},c.methods.getFile=function(t){var e={};return this.files.forEach(function(n){n._file.blobId===t&&(e=n)}),e},c.methods.addedFile=function(t){var e=(0,o.default)();t.blobId=e,this.files.push(new i.default(t)),this.onAddedFile(this.getFile(e))},c.methods.removedFile=function(t){var e=t.blobId,n=this.getFile(e);n.updateStatus("removed"),this.onRemovedFile(n)},c.methods.sending=function(t,e,n){var r=t.blobId,i=this.getFile(r);this.onSending(i,e,n)},c.methods.complete=function(t){var e=t.blobId,n=t.status,r=t.xhr,i=void 0===r?{}:r,a=this.getFile(e);a.updateStatus(n),a.updateXhrResponse({response:i.response,responseText:i.responseText,statusCode:i.status}),this.onComplete(a,n,i)},c.methods.error=function(t,e){var n=t.blobId,r=t.status,i=this.getFile(n);i.updateStatus(r),i.updateErrorMessage(e)},c.methods.uploadProgress=function(t,e,n){var r=t.blobId,i=this.getFile(r);i.updateProgress(e),i.updateBytesSent(n)},c.methods.thumbnail=function(t,e){var n=t.blobId;this.getFile(n).updateDataUrl(e)},c.methods.drop=function(){this.dragCounter=0,this.onDrop(),this.onDragLeave()},c.methods.dragEnter=function(t){t.preventDefault(),this.dragCounter++,this.onDragEnter()},c.methods.dragLeave=function(){this.dragCounter--,0===this.dragCounter&&this.onDragLeave()},c.methods.totalUploadProgress=function(){this.onTotalProgress.apply(this,arguments)},c.methods.queueComplete=function(){this.onQueueComplete()},c.methods.maxFilesExceeded=function(t){var e=t.blobId,n=this.getFile(e);this.onMaxFiles(n)},c.methods.removeFile=function(t){this.uploader.removeFile(t._file)},c.methods.addFile=function(t){this.uploader.addFile(t)},c.methods.removeAllFiles=function(t){this.uploader.removeAllFiles(t)},e.default=c},function(t,e,n){t.exports={default:n(35),__esModule:!0}},function(t,e,n){n(56),n(55),n(57),n(58),t.exports=n(11).Symbol},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(4),i=n(54),a=n(53);t.exports=function(t){return function(e,n,o){var s,c=r(e),u=i(c.length),l=a(o,u);if(t&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var r=n(36);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(9),i=n(25),a=n(14);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var o,s=n(t),c=a.f,u=0;s.length>u;)c.call(t,o=s[u++])&&e.push(o);return e}},function(t,e,n){var r=n(1),i=n(11),a=n(38),o=n(13),s=function(t,e,n){var c,u,l,d=t&s.F,f=t&s.G,h=t&s.S,p=t&s.P,m=t&s.B,v=t&s.W,_=f?i:i[e]||(i[e]={}),g=_.prototype,b=f?r:h?r[e]:(r[e]||{}).prototype;for(c in f&&(n=e),n)(u=!d&&b&&void 0!==b[c])&&c in _||(l=u?b[c]:n[c],_[c]=f&&"function"!=typeof b[c]?n[c]:m&&u?a(l,r):v&&b[c]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):p&&"function"==typeof l?a(Function.call,l):l,p&&((_.virtual||(_.virtual={}))[c]=l,t&s.R&&g&&!g[c]&&o(g,c,l)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,e,n){t.exports=n(1).document&&document.documentElement},function(t,e,n){var r=n(20);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(20);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(9),i=n(4);t.exports=function(t,e){for(var n,a=i(t),o=r(a),s=o.length,c=0;s>c;)if(a[n=o[c++]]===e)return n}},function(t,e,n){var r=n(10)("meta"),i=n(8),a=n(5),o=n(3).f,s=0,c=Object.isExtensible||function(){return!0},u=!n(7)(function(){return c(Object.preventExtensions({}))}),l=function(t){o(t,r,{value:{i:"O"+ ++s,w:{}}})},d=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!a(t,r)){if(!c(t))return"F";if(!e)return"E";l(t)}return t[r].i},getWeak:function(t,e){if(!a(t,r)){if(!c(t))return!0;if(!e)return!1;l(t)}return t[r].w},onFreeze:function(t){return u&&d.NEED&&c(t)&&!a(t,r)&&l(t),t}}},function(t,e,n){var r=n(6),i=n(48),a=n(12),o=n(27)("IE_PROTO"),s=function(){},c=function(){var t,e=n(21)("iframe"),r=a.length;for(e.style.display="none",n(42).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[a[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[o]=t):n=c(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(3),i=n(6),a=n(9);t.exports=n(2)?Object.defineProperties:function(t,e){i(t);for(var n,o=a(e),s=o.length,c=0;s>c;)r.f(t,n=o[c++],e[n]);return t}},function(t,e,n){var r=n(14),i=n(15),a=n(4),o=n(17),s=n(5),c=n(22),u=Object.getOwnPropertyDescriptor;e.f=n(2)?u:function(t,e){if(t=a(t),e=o(e,!0),c)try{return u(t,e)}catch(t){}if(s(t,e))return i(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(4),i=n(24).f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return o&&"[object Window]"==a.call(t)?function(t){try{return i(t)}catch(t){return o.slice()}}(t):i(r(t))}},function(t,e,n){t.exports=n(13)},function(t,e,n){var r=n(3).f,i=n(5),a=n(19)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,a)&&r(t,a,{configurable:!0,value:e})}},function(t,e,n){var r=n(28),i=Math.max,a=Math.min;t.exports=function(t,e){return(t=r(t))<0?i(t+e,0):a(t,e)}},function(t,e,n){var r=n(28),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e){},function(t,e,n){"use strict";var r=n(1),i=n(5),a=n(2),o=n(41),s=n(51),c=n(46).KEY,u=n(7),l=n(16),d=n(52),f=n(10),h=n(19),p=n(29),m=n(18),v=n(45),_=n(40),g=n(44),b=n(6),y=n(4),x=n(17),w=n(15),k=n(47),C=n(50),E=n(49),S=n(3),I=n(9),M=E.f,T=S.f,D=C.f,R=r.Symbol,P=r.JSON,O=P&&P.stringify,L=h("_hidden"),A=h("toPrimitive"),N={}.propertyIsEnumerable,B=l("symbol-registry"),j=l("symbols"),F=l("op-symbols"),Y=Object.prototype,$="function"==typeof R,z=r.QObject,V=!z||!z.prototype||!z.prototype.findChild,H=a&&u(function(){return 7!=k(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=M(Y,e);r&&delete Y[e],T(t,e,n),r&&t!==Y&&T(Y,e,r)}:T,q=function(t){var e=j[t]=k(R.prototype);return e._k=t,e},W=$&&"symbol"==typeof R.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof R},U=function(t,e,n){return t===Y&&U(F,e,n),b(t),e=x(e,!0),b(n),i(j,e)?(n.enumerable?(i(t,L)&&t[L][e]&&(t[L][e]=!1),n=k(n,{enumerable:w(0,!1)})):(i(t,L)||T(t,L,w(1,{})),t[L][e]=!0),H(t,e,n)):T(t,e,n)},G=function(t,e){b(t);for(var n,r=_(e=y(e)),i=0,a=r.length;a>i;)U(t,n=r[i++],e[n]);return t},K=function(t){var e=N.call(this,t=x(t,!0));return!(this===Y&&i(j,t)&&!i(F,t))&&(!(e||!i(this,t)||!i(j,t)||i(this,L)&&this[L][t])||e)},X=function(t,e){if(t=y(t),e=x(e,!0),t!==Y||!i(j,e)||i(F,e)){var n=M(t,e);return!n||!i(j,e)||i(t,L)&&t[L][e]||(n.enumerable=!0),n}},J=function(t){for(var e,n=D(y(t)),r=[],a=0;n.length>a;)i(j,e=n[a++])||e==L||e==c||r.push(e);return r},Z=function(t){for(var e,n=t===Y,r=D(n?F:y(t)),a=[],o=0;r.length>o;)!i(j,e=r[o++])||n&&!i(Y,e)||a.push(j[e]);return a};$||(s((R=function(){if(this instanceof R)throw TypeError("Symbol is not a constructor!");var t=f(arguments.length>0?arguments[0]:void 0),e=function(n){this===Y&&e.call(F,n),i(this,L)&&i(this[L],t)&&(this[L][t]=!1),H(this,t,w(1,n))};return a&&V&&H(Y,t,{configurable:!0,set:e}),q(t)}).prototype,"toString",function(){return this._k}),E.f=X,S.f=U,n(24).f=C.f=J,n(14).f=K,n(25).f=Z,a&&!n(23)&&s(Y,"propertyIsEnumerable",K,!0),p.f=function(t){return q(h(t))}),o(o.G+o.W+o.F*!$,{Symbol:R});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;Q.length>tt;)h(Q[tt++]);for(Q=I(h.store),tt=0;Q.length>tt;)m(Q[tt++]);o(o.S+o.F*!$,"Symbol",{for:function(t){return i(B,t+="")?B[t]:B[t]=R(t)},keyFor:function(t){if(W(t))return v(B,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){V=!0},useSimple:function(){V=!1}}),o(o.S+o.F*!$,"Object",{create:function(t,e){return void 0===e?k(t):G(k(t),e)},defineProperty:U,defineProperties:G,getOwnPropertyDescriptor:X,getOwnPropertyNames:J,getOwnPropertySymbols:Z}),P&&o(o.S+o.F*(!$||u(function(){var t=R();return"[null]"!=O([t])||"{}"!=O({a:t})||"{}"!=O(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!W(t)){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);return"function"==typeof(e=r[1])&&(n=e),!n&&g(e)||(e=function(t,e){if(n&&(e=n.call(this,t,e)),!W(e))return e}),r[1]=e,O.apply(P,r)}}}),R.prototype[A]||n(13)(R.prototype,A,R.prototype.valueOf),d(R,"Symbol"),d(Math,"Math",!0),d(r.JSON,"JSON",!0)},function(t,e,n){n(18)("asyncIterator")},function(t,e,n){n(18)("observable")},function(t,e,n){(function(t){(function(){var e,n,r,i,a,o,s,c,u=[].slice,l={}.hasOwnProperty;s=function(){},n=function(){function t(){}return t.prototype.addEventListener=t.prototype.on,t.prototype.on=function(t,e){return this._callbacks=this._callbacks||{},this._callbacks[t]||(this._callbacks[t]=[]),this._callbacks[t].push(e),this},t.prototype.emit=function(){var t,e,n,r,i;if(n=arguments[0],t=2<=arguments.length?u.call(arguments,1):[],this._callbacks=this._callbacks||{},e=this._callbacks[n])for(r=0,i=e.length;r<i;r++)e[r].apply(this,t);return this},t.prototype.removeListener=t.prototype.off,t.prototype.removeAllListeners=t.prototype.off,t.prototype.removeEventListener=t.prototype.off,t.prototype.off=function(t,e){var n,r,i,a;if(!this._callbacks||0===arguments.length)return this._callbacks={},this;if(!(n=this._callbacks[t]))return this;if(1===arguments.length)return delete this._callbacks[t],this;for(r=i=0,a=n.length;i<a;r=++i)if(n[r]===e){n.splice(r,1);break}return this},t}(),(e=function(t){var e,r;function i(t,n){var r,a,o;if(this.element=t,this.version=i.version,this.defaultOptions.previewTemplate=this.defaultOptions.previewTemplate.replace(/\n*/g,""),this.clickableElements=[],this.listeners=[],this.files=[],"string"==typeof this.element&&(this.element=document.querySelector(this.element)),!this.element||null==this.element.nodeType)throw new Error("Invalid dropzone element.");if(this.element.dropzone)throw new Error("Dropzone already attached.");if(i.instances.push(this),this.element.dropzone=this,r=null!=(o=i.optionsForElement(this.element))?o:{},this.options=e({},this.defaultOptions,r,null!=n?n:{}),this.options.forceFallback||!i.isBrowserSupported())return this.options.fallback.call(this);if(null==this.options.url&&(this.options.url=this.element.getAttribute("action")),!this.options.url)throw new Error("No URL provided.");if(this.options.acceptedFiles&&this.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");this.options.acceptedMimeTypes&&(this.options.acceptedFiles=this.options.acceptedMimeTypes,delete this.options.acceptedMimeTypes),this.options.method=this.options.method.toUpperCase(),(a=this.getExistingFallback())&&a.parentNode&&a.parentNode.removeChild(a),!1!==this.options.previewsContainer&&(this.options.previewsContainer?this.previewsContainer=i.getElement(this.options.previewsContainer,"previewsContainer"):this.previewsContainer=this.element),this.options.clickable&&(!0===this.options.clickable?this.clickableElements=[this.element]:this.clickableElements=i.getElements(this.options.clickable,"clickable")),this.init()}return function(t,e){for(var n in e)l.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(i,n),i.prototype.Emitter=n,i.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],i.prototype.defaultOptions={url:null,method:"post",withCredentials:!1,parallelUploads:2,uploadMultiple:!1,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,filesizeBase:1e3,maxFiles:null,params:{},clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,hiddenInputContainer:"body",capture:null,renameFilename:null,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",accept:function(t,e){return e()},init:function(){return s},forceFallback:!1,fallback:function(){var t,e,n,r,a,o;for(this.element.className=this.element.className+" dz-browser-not-supported",r=0,a=(o=this.element.getElementsByTagName("div")).length;r<a;r++)t=o[r],/(^| )dz-message($| )/.test(t.className)&&(e=t,t.className="dz-message");return e||(e=i.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(e)),(n=e.getElementsByTagName("span")[0])&&(null!=n.textContent?n.textContent=this.options.dictFallbackMessage:null!=n.innerText&&(n.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(t){var e,n,r;return e={srcX:0,srcY:0,srcWidth:t.width,srcHeight:t.height},n=t.width/t.height,e.optWidth=this.options.thumbnailWidth,e.optHeight=this.options.thumbnailHeight,null==e.optWidth&&null==e.optHeight?(e.optWidth=e.srcWidth,e.optHeight=e.srcHeight):null==e.optWidth?e.optWidth=n*e.optHeight:null==e.optHeight&&(e.optHeight=1/n*e.optWidth),r=e.optWidth/e.optHeight,t.height<e.optHeight||t.width<e.optWidth?(e.trgHeight=e.srcHeight,e.trgWidth=e.srcWidth):n>r?(e.srcHeight=t.height,e.srcWidth=e.srcHeight*r):(e.srcWidth=t.width,e.srcHeight=e.srcWidth/r),e.srcX=(t.width-e.srcWidth)/2,e.srcY=(t.height-e.srcHeight)/2,e},drop:function(t){return this.element.classList.remove("dz-drag-hover")},dragstart:s,dragend:function(t){return this.element.classList.remove("dz-drag-hover")},dragenter:function(t){return this.element.classList.add("dz-drag-hover")},dragover:function(t){return this.element.classList.add("dz-drag-hover")},dragleave:function(t){return this.element.classList.remove("dz-drag-hover")},paste:s,reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(t){var e,n,r,a,o,s,c,u,l,d,f,h,p;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){for(t.previewElement=i.createElement(this.options.previewTemplate.trim()),t.previewTemplate=t.previewElement,this.previewsContainer.appendChild(t.previewElement),r=0,s=(l=t.previewElement.querySelectorAll("[data-dz-name]")).length;r<s;r++)l[r].textContent=this._renameFilename(t.name);for(a=0,c=(d=t.previewElement.querySelectorAll("[data-dz-size]")).length;a<c;a++)d[a].innerHTML=this.filesize(t.size);for(this.options.addRemoveLinks&&(t._removeLink=i.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'+this.options.dictRemoveFile+"</a>"),t.previewElement.appendChild(t._removeLink)),p=this,e=function(e){return e.preventDefault(),e.stopPropagation(),t.status===i.UPLOADING?i.confirm(p.options.dictCancelUploadConfirmation,function(){return p.removeFile(t)}):p.options.dictRemoveFileConfirmation?i.confirm(p.options.dictRemoveFileConfirmation,function(){return p.removeFile(t)}):p.removeFile(t)},h=[],o=0,u=(f=t.previewElement.querySelectorAll("[data-dz-remove]")).length;o<u;o++)n=f[o],h.push(n.addEventListener("click",e));return h}},removedfile:function(t){var e;return t.previewElement&&null!=(e=t.previewElement)&&e.parentNode.removeChild(t.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(t,e){var n,r,i,a;if(t.previewElement){for(t.previewElement.classList.remove("dz-file-preview"),r=0,i=(a=t.previewElement.querySelectorAll("[data-dz-thumbnail]")).length;r<i;r++)(n=a[r]).alt=t.name,n.src=e;return setTimeout(function(){return t.previewElement.classList.add("dz-image-preview")},1)}},error:function(t,e){var n,r,i,a,o;if(t.previewElement){for(t.previewElement.classList.add("dz-error"),"String"!=typeof e&&e.error&&(e=e.error),o=[],r=0,i=(a=t.previewElement.querySelectorAll("[data-dz-errormessage]")).length;r<i;r++)n=a[r],o.push(n.textContent=e);return o}},errormultiple:s,processing:function(t){if(t.previewElement&&(t.previewElement.classList.add("dz-processing"),t._removeLink))return t._removeLink.textContent=this.options.dictCancelUpload},processingmultiple:s,uploadprogress:function(t,e,n){var r,i,a,o,s;if(t.previewElement){for(s=[],i=0,a=(o=t.previewElement.querySelectorAll("[data-dz-uploadprogress]")).length;i<a;i++)"PROGRESS"===(r=o[i]).nodeName?s.push(r.value=e):s.push(r.style.width=e+"%");return s}},totaluploadprogress:s,sending:s,sendingmultiple:s,success:function(t){if(t.previewElement)return t.previewElement.classList.add("dz-success")},successmultiple:s,canceled:function(t){return this.emit("error",t,"Upload canceled.")},canceledmultiple:s,complete:function(t){if(t._removeLink&&(t._removeLink.textContent=this.options.dictRemoveFile),t.previewElement)return t.previewElement.classList.add("dz-complete")},completemultiple:s,maxfilesexceeded:s,maxfilesreached:s,queuecomplete:s,addedfiles:s,previewTemplate:""},e=function(){var t,e,n,r,i,a,o;for(r=arguments[0],a=0,o=(n=2<=arguments.length?u.call(arguments,1):[]).length;a<o;a++)for(t in e=n[a])i=e[t],r[t]=i;return r},i.prototype.getAcceptedFiles=function(){var t,e,n,r,i;for(i=[],e=0,n=(r=this.files).length;e<n;e++)(t=r[e]).accepted&&i.push(t);return i},i.prototype.getRejectedFiles=function(){var t,e,n,r,i;for(i=[],e=0,n=(r=this.files).length;e<n;e++)(t=r[e]).accepted||i.push(t);return i},i.prototype.getFilesWithStatus=function(t){var e,n,r,i,a;for(a=[],n=0,r=(i=this.files).length;n<r;n++)(e=i[n]).status===t&&a.push(e);return a},i.prototype.getQueuedFiles=function(){return this.getFilesWithStatus(i.QUEUED)},i.prototype.getUploadingFiles=function(){return this.getFilesWithStatus(i.UPLOADING)},i.prototype.getAddedFiles=function(){return this.getFilesWithStatus(i.ADDED)},i.prototype.getActiveFiles=function(){var t,e,n,r,a;for(a=[],e=0,n=(r=this.files).length;e<n;e++)(t=r[e]).status!==i.UPLOADING&&t.status!==i.QUEUED||a.push(t);return a},i.prototype.init=function(){var t,e,n,r,a,o,s,c;for("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(i.createElement('<div class="dz-default dz-message"><span>'+this.options.dictDefaultMessage+"</span></div>")),this.clickableElements.length&&(c=this,(n=function(){return c.hiddenFileInput&&c.hiddenFileInput.parentNode.removeChild(c.hiddenFileInput),c.hiddenFileInput=document.createElement("input"),c.hiddenFileInput.setAttribute("type","file"),(null==c.options.maxFiles||c.options.maxFiles>1)&&c.hiddenFileInput.setAttribute("multiple","multiple"),c.hiddenFileInput.className="dz-hidden-input",null!=c.options.acceptedFiles&&c.hiddenFileInput.setAttribute("accept",c.options.acceptedFiles),null!=c.options.capture&&c.hiddenFileInput.setAttribute("capture",c.options.capture),c.hiddenFileInput.style.visibility="hidden",c.hiddenFileInput.style.position="absolute",c.hiddenFileInput.style.top="0",c.hiddenFileInput.style.left="0",c.hiddenFileInput.style.height="0",c.hiddenFileInput.style.width="0",document.querySelector(c.options.hiddenInputContainer).appendChild(c.hiddenFileInput),c.hiddenFileInput.addEventListener("change",function(){var t,e,r,i;if((e=c.hiddenFileInput.files).length)for(r=0,i=e.length;r<i;r++)t=e[r],c.addFile(t);return c.emit("addedfiles",e),n()})})()),this.URL=null!=(o=window.URL)?o:window.webkitURL,r=0,a=(s=this.events).length;r<a;r++)t=s[r],this.on(t,this.options[t]);return this.on("uploadprogress",function(t){return function(){return t.updateTotalUploadProgress()}}(this)),this.on("removedfile",function(t){return function(){return t.updateTotalUploadProgress()}}(this)),this.on("canceled",function(t){return function(e){return t.emit("complete",e)}}(this)),this.on("complete",function(t){return function(e){if(0===t.getAddedFiles().length&&0===t.getUploadingFiles().length&&0===t.getQueuedFiles().length)return setTimeout(function(){return t.emit("queuecomplete")},0)}}(this)),e=function(t){return t.stopPropagation(),t.preventDefault?t.preventDefault():t.returnValue=!1},this.listeners=[{element:this.element,events:{dragstart:function(t){return function(e){return t.emit("dragstart",e)}}(this),dragenter:function(t){return function(n){return e(n),t.emit("dragenter",n)}}(this),dragover:function(t){return function(n){var r;try{r=n.dataTransfer.effectAllowed}catch(t){}return n.dataTransfer.dropEffect="move"===r||"linkMove"===r?"move":"copy",e(n),t.emit("dragover",n)}}(this),dragleave:function(t){return function(e){return t.emit("dragleave",e)}}(this),drop:function(t){return function(n){return e(n),t.drop(n)}}(this),dragend:function(t){return function(e){return t.emit("dragend",e)}}(this)}}],this.clickableElements.forEach(function(t){return function(e){return t.listeners.push({element:e,events:{click:function(n){return(e!==t.element||n.target===t.element||i.elementInside(n.target,t.element.querySelector(".dz-message")))&&t.hiddenFileInput.click(),!0}}})}}(this)),this.enable(),this.options.init.call(this)},i.prototype.destroy=function(){var t;return this.disable(),this.removeAllFiles(!0),(null!=(t=this.hiddenFileInput)?t.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,i.instances.splice(i.instances.indexOf(this),1)},i.prototype.updateTotalUploadProgress=function(){var t,e,n,r,i,a,o;if(n=0,e=0,this.getActiveFiles().length){for(i=0,a=(o=this.getActiveFiles()).length;i<a;i++)n+=(t=o[i]).upload.bytesSent,e+=t.upload.total;r=100*n/e}else r=100;return this.emit("totaluploadprogress",r,e,n)},i.prototype._getParamName=function(t){return"function"==typeof this.options.paramName?this.options.paramName(t):this.options.paramName+(this.options.uploadMultiple?"["+t+"]":"")},i.prototype._renameFilename=function(t){return"function"!=typeof this.options.renameFilename?t:this.options.renameFilename(t)},i.prototype.getFallbackForm=function(){var t,e,n,r;return(t=this.getExistingFallback())?t:(n='<div class="dz-fallback">',this.options.dictFallbackText&&(n+="

"+this.options.dictFallbackText+"

"),n+='<input type="file" name="'+this._getParamName(0)+'" '+(this.options.uploadMultiple?'multiple="multiple"':void 0)+' /><input type="submit" value="Upload!"></div>',e=i.createElement(n),"FORM"!==this.element.tagName?(r=i.createElement('<form action="'+this.options.url+'" enctype="multipart/form-data" method="'+this.options.method+'"></form>')).appendChild(e):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=r?r:e)},i.prototype.getExistingFallback=function(){var t,e,n,r,i,a;for(e=function(t){var e,n,r;for(n=0,r=t.length;n<r;n++)if(e=t[n],/(^| )fallback($| )/.test(e.className))return e},r=0,i=(a=["div","form"]).length;r<i;r++)if(n=a[r],t=e(this.element.getElementsByTagName(n)))return t},i.prototype.setupEventListeners=function(){var t,e,n,r,i,a,o;for(o=[],r=0,i=(a=this.listeners).length;r<i;r++)t=a[r],o.push(function(){var r,i;for(e in i=[],r=t.events)n=r[e],i.push(t.element.addEventListener(e,n,!1));return i}());return o},i.prototype.removeEventListeners=function(){var t,e,n,r,i,a,o;for(o=[],r=0,i=(a=this.listeners).length;r<i;r++)t=a[r],o.push(function(){var r,i;for(e in i=[],r=t.events)n=r[e],i.push(t.element.removeEventListener(e,n,!1));return i}());return o},i.prototype.disable=function(){var t,e,n,r,i;for(this.clickableElements.forEach(function(t){return t.classList.remove("dz-clickable")}),this.removeEventListeners(),i=[],e=0,n=(r=this.files).length;e<n;e++)t=r[e],i.push(this.cancelUpload(t));return i},i.prototype.enable=function(){return this.clickableElements.forEach(function(t){return t.classList.add("dz-clickable")}),this.setupEventListeners()},i.prototype.filesize=function(t){var e,n,r,i,a,o,s;if(n=0,r="b",t>0){for(e=o=0,s=(a=["TB","GB","MB","KB","b"]).length;o<s;e=++o)if(i=a[e],t>=Math.pow(this.options.filesizeBase,4-e)/10){n=t/Math.pow(this.options.filesizeBase,4-e),r=i;break}n=Math.round(10*n)/10}return"<strong>"+n+"</strong> "+r},i.prototype._updateMaxFilesReachedClass=function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")},i.prototype.drop=function(t){var e,n;t.dataTransfer&&(this.emit("drop",t),e=t.dataTransfer.files,this.emit("addedfiles",e),e.length&&((n=t.dataTransfer.items)&&n.length&&null!=n[0].webkitGetAsEntry?this._addFilesFromItems(n):this.handleFiles(e)))},i.prototype.paste=function(t){var e,n;if(null!=(null!=t&&null!=(n=t.clipboardData)?n.items:void 0))return this.emit("paste",t),(e=t.clipboardData.items).length?this._addFilesFromItems(e):void 0},i.prototype.handleFiles=function(t){var e,n,r,i;for(i=[],n=0,r=t.length;n<r;n++)e=t[n],i.push(this.addFile(e));return i},i.prototype._addFilesFromItems=function(t){var e,n,r,i,a;for(a=[],r=0,i=t.length;r<i;r++)null!=(n=t[r]).webkitGetAsEntry&&(e=n.webkitGetAsEntry())?e.isFile?a.push(this.addFile(n.getAsFile())):e.isDirectory?a.push(this._addFilesFromDirectory(e,e.name)):a.push(void 0):null!=n.getAsFile&&(null==n.kind||"file"===n.kind)?a.push(this.addFile(n.getAsFile())):a.push(void 0);return a},i.prototype._addFilesFromDirectory=function(t,e){var n,r,i,a;return n=t.createReader(),r=function(t){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log?console.log(t):void 0},a=this,(i=function(){return n.readEntries(function(t){var n,r,o;if(t.length>0){for(r=0,o=t.length;r<o;r++)(n=t[r]).isFile?n.file(function(t){if(!a.options.ignoreHiddenFiles||"."!==t.name.substring(0,1))return t.fullPath=e+"/"+t.name,a.addFile(t)}):n.isDirectory&&a._addFilesFromDirectory(n,e+"/"+n.name);i()}return null},r)})()},i.prototype.accept=function(t,e){return t.size>1024*this.options.maxFilesize*1024?e(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(t.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):i.isValidFile(t,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(e(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",t)):this.options.accept.call(this,t,e):e(this.options.dictInvalidFileType)},i.prototype.addFile=function(t){return t.upload={progress:0,total:t.size,bytesSent:0},this.files.push(t),t.status=i.ADDED,this.emit("addedfile",t),this._enqueueThumbnail(t),this.accept(t,(e=this,function(n){return n?(t.accepted=!1,e._errorProcessing([t],n)):(t.accepted=!0,e.options.autoQueue&&e.enqueueFile(t)),e._updateMaxFilesReachedClass()}));var e},i.prototype.enqueueFiles=function(t){var e,n,r;for(n=0,r=t.length;n<r;n++)e=t[n],this.enqueueFile(e);return null},i.prototype.enqueueFile=function(t){if(t.status!==i.ADDED||!0!==t.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(t.status=i.QUEUED,this.options.autoProcessQueue)return setTimeout((e=this,function(){return e.processQueue()}),0);var e},i.prototype._thumbnailQueue=[],i.prototype._processingThumbnail=!1,i.prototype._enqueueThumbnail=function(t){if(this.options.createImageThumbnails&&t.type.match(/image.*/)&&t.size<=1024*this.options.maxThumbnailFilesize*1024)return this._thumbnailQueue.push(t),setTimeout((e=this,function(){return e._processThumbnailQueue()}),0);var e},i.prototype._processThumbnailQueue=function(){var t;if(!this._processingThumbnail&&0!==this._thumbnailQueue.length)return this._processingThumbnail=!0,this.createThumbnail(this._thumbnailQueue.shift(),(t=this,function(){return t._processingThumbnail=!1,t._processThumbnailQueue()}))},i.prototype.removeFile=function(t){if(t.status===i.UPLOADING&&this.cancelUpload(t),this.files=c(this.files,t),this.emit("removedfile",t),0===this.files.length)return this.emit("reset")},i.prototype.removeAllFiles=function(t){var e,n,r,a;for(null==t&&(t=!1),n=0,r=(a=this.files.slice()).length;n<r;n++)((e=a[n]).status!==i.UPLOADING||t)&&this.removeFile(e);return null},i.prototype.createThumbnail=function(t,e){var n,r;return(n=new FileReader).onload=(r=this,function(){return"image/svg+xml"===t.type?(r.emit("thumbnail",t,n.result),void(null!=e&&e())):r.createThumbnailFromUrl(t,n.result,e)}),n.readAsDataURL(t)},i.prototype.createThumbnailFromUrl=function(t,e,n,r){var i,a;return i=document.createElement("img"),r&&(i.crossOrigin=r),i.onload=(a=this,function(){var e,r,s,c,u,l,d,f;if(t.width=i.width,t.height=i.height,null==(s=a.options.resize.call(a,t)).trgWidth&&(s.trgWidth=s.optWidth),null==s.trgHeight&&(s.trgHeight=s.optHeight),r=(e=document.createElement("canvas")).getContext("2d"),e.width=s.trgWidth,e.height=s.trgHeight,o(r,i,null!=(u=s.srcX)?u:0,null!=(l=s.srcY)?l:0,s.srcWidth,s.srcHeight,null!=(d=s.trgX)?d:0,null!=(f=s.trgY)?f:0,s.trgWidth,s.trgHeight),c=e.toDataURL("image/png"),a.emit("thumbnail",t,c),null!=n)return n()}),null!=n&&(i.onerror=n),i.src=e},i.prototype.processQueue=function(){var t,e,n,r;if(e=this.options.parallelUploads,t=n=this.getUploadingFiles().length,!(n>=e)&&(r=this.getQueuedFiles()).length>0){if(this.options.uploadMultiple)return this.processFiles(r.slice(0,e-n));for(;t<e;){if(!r.length)return;this.processFile(r.shift()),t++}}},i.prototype.processFile=function(t){return this.processFiles([t])},i.prototype.processFiles=function(t){var e,n,r;for(n=0,r=t.length;n<r;n++)(e=t[n]).processing=!0,e.status=i.UPLOADING,this.emit("processing",e);return this.options.uploadMultiple&&this.emit("processingmultiple",t),this.uploadFiles(t)},i.prototype._getFilesWithXhr=function(t){var e;return function(){var n,r,i,a;for(a=[],n=0,r=(i=this.files).length;n<r;n++)(e=i[n]).xhr===t&&a.push(e);return a}.call(this)},i.prototype.cancelUpload=function(t){var e,n,r,a,o,s,c;if(t.status===i.UPLOADING){for(r=0,o=(n=this._getFilesWithXhr(t.xhr)).length;r<o;r++)(e=n[r]).status=i.CANCELED;for(t.xhr.abort(),a=0,s=n.length;a<s;a++)e=n[a],this.emit("canceled",e);this.options.uploadMultiple&&this.emit("canceledmultiple",n)}else(c=t.status)!==i.ADDED&&c!==i.QUEUED||(t.status=i.CANCELED,this.emit("canceled",t),this.options.uploadMultiple&&this.emit("canceledmultiple",[t]));if(this.options.autoProcessQueue)return this.processQueue()},r=function(){var t,e;return e=arguments[0],t=2<=arguments.length?u.call(arguments,1):[],"function"==typeof e?e.apply(this,t):e},i.prototype.uploadFile=function(t){return this.uploadFiles([t])},i.prototype.uploadFiles=function(t){var n,a,o,s,c,u,l,d,f,h,p,m,v,_,g,b,y,x,w,k,C,E,S,I,M,T,D,R,P,O,L,A,N,B;for(x=new XMLHttpRequest,w=0,S=t.length;w<S;w++)(n=t[w]).xhr=x;for(s in m=r(this.options.method,t),b=r(this.options.url,t),x.open(m,b,!0),x.withCredentials=!!this.options.withCredentials,_=null,B=this,o=function(){var e,r,i;for(i=[],e=0,r=t.length;e<r;e++)n=t[e],i.push(B._errorProcessing(t,_||B.options.dictResponseError.replace("{{statusCode}}",x.status),x));return i},g=function(e){return function(r){var i,a,o,s,c,u,l,d,f;if(null!=r)for(a=100*r.loaded/r.total,o=0,u=t.length;o<u;o++)(n=t[o]).upload={progress:a,total:r.total,bytesSent:r.loaded};else{for(i=!0,a=100,s=0,l=t.length;s<l;s++)100===(n=t[s]).upload.progress&&n.upload.bytesSent===n.upload.total||(i=!1),n.upload.progress=a,n.upload.bytesSent=n.upload.total;if(i)return}for(f=[],c=0,d=t.length;c<d;c++)n=t[c],f.push(e.emit("uploadprogress",n,a,n.upload.bytesSent));return f}}(this),x.onload=function(e){return function(n){var r;if(t[0].status!==i.CANCELED&&4===x.readyState){if(_=x.responseText,x.getResponseHeader("content-type")&&~x.getResponseHeader("content-type").indexOf("application/json"))try{_=JSON.parse(_)}catch(t){n=t,_="Invalid JSON response from server."}return g(),200<=(r=x.status)&&r<300?e._finished(t,_,n):o()}}}(this),x.onerror=function(){if(t[0].status!==i.CANCELED)return o()},(null!=(R=x.upload)?R:x).onprogress=g,u={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"},this.options.headers&&e(u,this.options.headers),u)(c=u[s])&&x.setRequestHeader(s,c);if(a=new FormData,this.options.params)for(p in P=this.options.params)y=P[p],a.append(p,y);for(k=0,I=t.length;k<I;k++)n=t[k],this.emit("sending",n,x,a);if(this.options.uploadMultiple&&this.emit("sendingmultiple",t,x,a),"FORM"===this.element.tagName)for(C=0,M=(O=this.element.querySelectorAll("input, textarea, select, button")).length;C<M;C++)if(f=(d=O[C]).getAttribute("name"),h=d.getAttribute("type"),"SELECT"===d.tagName&&d.hasAttribute("multiple"))for(E=0,T=(L=d.options).length;E<T;E++)(v=L[E]).selected&&a.append(f,v.value);else(!h||"checkbox"!==(A=h.toLowerCase())&&"radio"!==A||d.checked)&&a.append(f,d.value);for(l=D=0,N=t.length-1;0<=N?D<=N:D>=N;l=0<=N?++D:--D)a.append(this._getParamName(l),t[l],this._renameFilename(t[l].name));return this.submitRequest(x,a,t)},i.prototype.submitRequest=function(t,e,n){return t.send(e)},i.prototype._finished=function(t,e,n){var r,a,o;for(a=0,o=t.length;a<o;a++)(r=t[a]).status=i.SUCCESS,this.emit("success",r,e,n),this.emit("complete",r);if(this.options.uploadMultiple&&(this.emit("successmultiple",t,e,n),this.emit("completemultiple",t)),this.options.autoProcessQueue)return this.processQueue()},i.prototype._errorProcessing=function(t,e,n){var r,a,o;for(a=0,o=t.length;a<o;a++)(r=t[a]).status=i.ERROR,this.emit("error",r,e,n),this.emit("complete",r);if(this.options.uploadMultiple&&(this.emit("errormultiple",t,e,n),this.emit("completemultiple",t)),this.options.autoProcessQueue)return this.processQueue()},i}()).version="4.3.0",e.options={},e.optionsForElement=function(t){return t.getAttribute("id")?e.options[r(t.getAttribute("id"))]:void 0},e.instances=[],e.forElement=function(t){if("string"==typeof t&&(t=document.querySelector(t)),null==(null!=t?t.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return t.dropzone},e.autoDiscover=!0,e.discover=function(){var t,n,r,i,a,o;for(document.querySelectorAll?r=document.querySelectorAll(".dropzone"):(r=[],(t=function(t){var e,n,i,a;for(a=[],n=0,i=t.length;n<i;n++)e=t[n],/(^| )dropzone($| )/.test(e.className)?a.push(r.push(e)):a.push(void 0);return a})(document.getElementsByTagName("div")),t(document.getElementsByTagName("form"))),o=[],i=0,a=r.length;i<a;i++)n=r[i],!1!==e.optionsForElement(n)?o.push(new e(n)):o.push(void 0);return o},e.blacklistedBrowsers=[/opera.*Macintosh.*version\/12/i],e.isBrowserSupported=function(){var t,n,r,i;if(t=!0,window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(n=0,r=(i=e.blacklistedBrowsers).length;n<r;n++)i[n].test(navigator.userAgent)&&(t=!1);else t=!1;else t=!1;return t},c=function(t,e){var n,r,i,a;for(a=[],r=0,i=t.length;r<i;r++)(n=t[r])!==e&&a.push(n);return a},r=function(t){return t.replace(/[\-_](\w)/g,function(t){return t.charAt(1).toUpperCase()})},e.createElement=function(t){var e;return(e=document.createElement("div")).innerHTML=t,e.childNodes[0]},e.elementInside=function(t,e){if(t===e)return!0;for(;t=t.parentNode;)if(t===e)return!0;return!1},e.getElement=function(t,e){var n;if("string"==typeof t?n=document.querySelector(t):null!=t.nodeType&&(n=t),null==n)throw new Error("Invalid `"+e+"` option provided. Please provide a CSS selector or a plain HTML element.");return n},e.getElements=function(t,e){var n,r,i,a,o,s,c;if(t instanceof Array){r=[];try{for(i=0,o=t.length;i<o;i++)n=t[i],r.push(this.getElement(n,e))}catch(t){t,r=null}}else if("string"==typeof t)for(r=[],a=0,s=(c=document.querySelectorAll(t)).length;a<s;a++)n=c[a],r.push(n);else null!=t.nodeType&&(r=[t]);if(null==r||!r.length)throw new Error("Invalid `"+e+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return r},e.confirm=function(t,e,n){return window.confirm(t)?e():null!=n?n():void 0},e.isValidFile=function(t,e){var n,r,i,a,o;if(!e)return!0;for(e=e.split(","),n=(r=t.type).replace(/\/.*$/,""),a=0,o=e.length;a<o;a++)if("."===(i=(i=e[a]).trim()).charAt(0)){if(-1!==t.name.toLowerCase().indexOf(i.toLowerCase(),t.name.length-i.length))return!0}else if(/\/\*$/.test(i)){if(n===i.replace(/\/.*$/,""))return!0}else if(r===i)return!0;return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(t){return this.each(function(){return new e(this,t)})}),void 0!==t&&null!==t?t.exports=e:window.Dropzone=e,e.ADDED="added",e.QUEUED="queued",e.ACCEPTED=e.QUEUED,e.UPLOADING="uploading",e.PROCESSING=e.UPLOADING,e.CANCELED="canceled",e.ERROR="error",e.SUCCESS="success",a=function(t){var e,n,r,i,a,o,s,c;for(t.naturalWidth,a=t.naturalHeight,(e=document.createElement("canvas")).width=1,e.height=a,(n=e.getContext("2d")).drawImage(t,0,0),r=n.getImageData(0,0,1,a).data,c=0,i=a,o=a;o>c;)0===r[4*(o-1)+3]?i=o:c=o,o=i+c>>1;return 0===(s=o/a)?1:s},o=function(t,e,n,r,i,o,s,c,u,l){var d;return d=a(e),t.drawImage(e,n,r,i,o,s,c,u,l/d)},i=function(t,e){var n,r,i,a,o,s,c,u,l;if(i=!1,l=!0,r=t.document,u=r.documentElement,n=r.addEventListener?"addEventListener":"attachEvent",c=r.addEventListener?"removeEventListener":"detachEvent",s=r.addEventListener?"":"on",a=function(n){if("readystatechange"!==n.type||"complete"===r.readyState)return("load"===n.type?t:r)[c](s+n.type,a,!1),!i&&(i=!0)?e.call(t,n.type||n):void 0},o=function(){try{u.doScroll("left")}catch(t){return t,void setTimeout(o,50)}return a("poll")},"complete"!==r.readyState){if(r.createEventObject&&u.doScroll){try{l=!t.frameElement}catch(t){}l&&o()}return r[n](s+"DOMContentLoaded",a,!1),r[n](s+"readystatechange",a,!1),t[n](s+"load",a,!1)}},e._autoDiscoverFunction=function(){if(e.autoDiscover)return e.discover()},i(window,e._autoDiscoverFunction)}).call(this)}).call(e,n(30)(t))},function(t,e,n){(function(t,n){var r=200,i="__lodash_hash_undefined__",a=9007199254740991,o="[object Arguments]",s="[object Boolean]",c="[object Date]",u="[object Function]",l="[object GeneratorFunction]",d="[object Map]",f="[object Number]",h="[object Object]",p="[object RegExp]",m="[object Set]",v="[object String]",_="[object Symbol]",g="[object ArrayBuffer]",b="[object DataView]",y="[object Float32Array]",x="[object Float64Array]",w="[object Int8Array]",k="[object Int16Array]",C="[object Int32Array]",E="[object Uint8Array]",S="[object Uint8ClampedArray]",I="[object Uint16Array]",M="[object Uint32Array]",T=/\w*$/,D=/^\[object .+?Constructor\]$/,R=/^(?:0|[1-9]\d*)$/,P={};P[o]=P["[object Array]"]=P[g]=P[b]=P[s]=P[c]=P[y]=P[x]=P[w]=P[k]=P[C]=P[d]=P[f]=P[h]=P[p]=P[m]=P[v]=P[_]=P[E]=P[S]=P[I]=P[M]=!0,P["[object Error]"]=P[u]=P["[object WeakMap]"]=!1;var O="object"==typeof t&&t&&t.Object===Object&&t,L="object"==typeof self&&self&&self.Object===Object&&self,A=O||L||Function("return this")(),N="object"==typeof e&&e&&!e.nodeType&&e,B=N&&"object"==typeof n&&n&&!n.nodeType&&n,j=B&&B.exports===N;function F(t,e){return t.set(e[0],e[1]),t}function Y(t,e){return t.add(e),t}function $(t,e,n,r){var i=-1,a=t?t.length:0;for(r&&a&&(n=t[++i]);++i<a;)n=e(n,t[i],i,t);return n}function z(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function V(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function H(t,e){return function(n){return t(e(n))}}function q(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}var W,U=Array.prototype,G=Function.prototype,K=Object.prototype,X=A["__core-js_shared__"],J=(W=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||""))?"Symbol(src)_1."+W:"",Z=G.toString,Q=K.hasOwnProperty,tt=K.toString,et=RegExp("^"+Z.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),nt=j?A.Buffer:void 0,rt=A.Symbol,it=A.Uint8Array,at=H(Object.getPrototypeOf,Object),ot=Object.create,st=K.propertyIsEnumerable,ct=U.splice,ut=Object.getOwnPropertySymbols,lt=nt?nt.isBuffer:void 0,dt=H(Object.keys,Object),ft=Bt(A,"DataView"),ht=Bt(A,"Map"),pt=Bt(A,"Promise"),mt=Bt(A,"Set"),vt=Bt(A,"WeakMap"),_t=Bt(Object,"create"),gt=zt(ft),bt=zt(ht),yt=zt(pt),xt=zt(mt),wt=zt(vt),kt=rt?rt.prototype:void 0,Ct=kt?kt.valueOf:void 0;function Et(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function St(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function It(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Mt(t){this.__data__=new St(t)}function Tt(t,e){var n=Ht(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&qt(t)}(t)&&Q.call(t,"callee")&&(!st.call(t,"callee")||tt.call(t)==o)}(t)?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],r=n.length,i=!!r;for(var a in t)!e&&!Q.call(t,a)||i&&("length"==a||Yt(a,r))||n.push(a);return n}function Dt(t,e,n){var r=t[e];Q.call(t,e)&&Vt(r,n)&&(void 0!==n||e in t)||(t[e]=n)}function Rt(t,e){for(var n=t.length;n--;)if(Vt(t[n][0],e))return n;return-1}function Pt(t,e,n,r,i,a,D){var R;if(r&&(R=a?r(t,i,a,D):r(t)),void 0!==R)return R;if(!Gt(t))return t;var O=Ht(t);if(O){if(R=function(t){var e=t.length,n=t.constructor(e);e&&"string"==typeof t[0]&&Q.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!e)return function(t,e){var n=-1,r=t.length;e||(e=Array(r));for(;++n<r;)e[n]=t[n];return e}(t,R)}else{var L=Ft(t),A=L==u||L==l;if(Wt(t))return function(t,e){if(e)return t.slice();var n=new t.constructor(t.length);return t.copy(n),n}(t,e);if(L==h||L==o||A&&!a){if(z(t))return a?t:{};if(R=function(t){return"function"!=typeof t.constructor||$t(t)?{}:(e=at(t),Gt(e)?ot(e):{});var e}(A?{}:t),!e)return function(t,e){return At(t,jt(t),e)}(t,function(t,e){return t&&At(e,Kt(e),t)}(R,t))}else{if(!P[L])return a?t:{};R=function(t,e,n,r){var i=t.constructor;switch(e){case g:return Lt(t);case s:case c:return new i(+t);case b:return function(t,e){var n=e?Lt(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,r);case y:case x:case w:case k:case C:case E:case S:case I:case M:return function(t,e){var n=e?Lt(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}(t,r);case d:return function(t,e,n){return $(e?n(V(t),!0):V(t),F,new t.constructor)}(t,r,n);case f:case v:return new i(t);case p:return(u=new(o=t).constructor(o.source,T.exec(o))).lastIndex=o.lastIndex,u;case m:return function(t,e,n){return $(e?n(q(t),!0):q(t),Y,new t.constructor)}(t,r,n);case _:return a=t,Ct?Object(Ct.call(a)):{}}var a;var o,u}(t,L,Pt,e)}}D||(D=new Mt);var N=D.get(t);if(N)return N;if(D.set(t,R),!O)var B=n?function(t){return function(t,e,n){var r=e(t);return Ht(t)?r:function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}(r,n(t))}(t,Kt,jt)}(t):Kt(t);return function(t,e){for(var n=-1,r=t?t.length:0;++n<r&&!1!==e(t[n],n,t););}(B||t,function(i,a){B&&(i=t[a=i]),Dt(R,a,Pt(i,e,n,r,a,t,D))}),R}function Ot(t){return!(!Gt(t)||J&&J in t)&&(Ut(t)||z(t)?et:D).test(zt(t))}function Lt(t){var e=new t.constructor(t.byteLength);return new it(e).set(new it(t)),e}function At(t,e,n,r){n||(n={});for(var i=-1,a=e.length;++i<a;){var o=e[i],s=r?r(n[o],t[o],o,n,t):void 0;Dt(n,o,void 0===s?t[o]:s)}return n}function Nt(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function Bt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Ot(n)?n:void 0}Et.prototype.clear=function(){this.__data__=_t?_t(null):{}},Et.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},Et.prototype.get=function(t){var e=this.__data__;if(_t){var n=e[t];return n===i?void 0:n}return Q.call(e,t)?e[t]:void 0},Et.prototype.has=function(t){var e=this.__data__;return _t?void 0!==e[t]:Q.call(e,t)},Et.prototype.set=function(t,e){return this.__data__[t]=_t&&void 0===e?i:e,this},St.prototype.clear=function(){this.__data__=[]},St.prototype.delete=function(t){var e=this.__data__,n=Rt(e,t);return!(n<0||(n==e.length-1?e.pop():ct.call(e,n,1),0))},St.prototype.get=function(t){var e=this.__data__,n=Rt(e,t);return n<0?void 0:e[n][1]},St.prototype.has=function(t){return Rt(this.__data__,t)>-1},St.prototype.set=function(t,e){var n=this.__data__,r=Rt(n,t);return r<0?n.push([t,e]):n[r][1]=e,this},It.prototype.clear=function(){this.__data__={hash:new Et,map:new(ht||St),string:new Et}},It.prototype.delete=function(t){return Nt(this,t).delete(t)},It.prototype.get=function(t){return Nt(this,t).get(t)},It.prototype.has=function(t){return Nt(this,t).has(t)},It.prototype.set=function(t,e){return Nt(this,t).set(t,e),this},Mt.prototype.clear=function(){this.__data__=new St},Mt.prototype.delete=function(t){return this.__data__.delete(t)},Mt.prototype.get=function(t){return this.__data__.get(t)},Mt.prototype.has=function(t){return this.__data__.has(t)},Mt.prototype.set=function(t,e){var n=this.__data__;if(n instanceof St){var i=n.__data__;if(!ht||i.length<r-1)return i.push([t,e]),this;n=this.__data__=new It(i)}return n.set(t,e),this};var jt=ut?H(ut,Object):function(){return[]},Ft=function(t){return tt.call(t)};function Yt(t,e){return!!(e=null==e?a:e)&&("number"==typeof t||R.test(t))&&t>-1&&t%1==0&&t<e}function $t(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||K)}function zt(t){if(null!=t){try{return Z.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Vt(t,e){return t===e||t!=t&&e!=e}(ft&&Ft(new ft(new ArrayBuffer(1)))!=b||ht&&Ft(new ht)!=d||pt&&"[object Promise]"!=Ft(pt.resolve())||mt&&Ft(new mt)!=m||vt&&"[object WeakMap]"!=Ft(new vt))&&(Ft=function(t){var e=tt.call(t),n=e==h?t.constructor:void 0,r=n?zt(n):void 0;if(r)switch(r){case gt:return b;case bt:return d;case yt:return"[object Promise]";case xt:return m;case wt:return"[object WeakMap]"}return e});var Ht=Array.isArray;function qt(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=a}(t.length)&&!Ut(t)}var Wt=lt||function(){return!1};function Ut(t){var e=Gt(t)?tt.call(t):"";return e==u||e==l}function Gt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Kt(t){return qt(t)?Tt(t):function(t){if(!$t(t))return dt(t);var e=[];for(var n in Object(t))Q.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}n.exports=function(t){return Pt(t,!1,!0)}}).call(e,function(){return this}(),n(30)(t))}])},t.exports=r()},function(t,e,n){"use strict";(function(t,r,i,a){n.d(e,"d",function(){return El}),n.d(e,"i",function(){return wl}),n.d(e,"a",function(){return ht}),n.d(e,"b",function(){return pt}),n.d(e,"h",function(){return Su}),n.d(e,"e",function(){return fa}),n.d(e,"f",function(){return hs}),n.d(e,"o",function(){return _s}),n.d(e,"j",function(){return Ts}),n.d(e,"c",function(){return sc}),n.d(e,"k",function(){return yc}),n.d(e,"r",function(){return Sc}),n.d(e,"m",function(){return Bc}),n.d(e,"l",function(){return ja}),n.d(e,"q",function(){return Ka}),n.d(e,"x",function(){return Za}),n.d(e,"g",function(){return Ae}),n.d(e,"n",function(){return Me}),n.d(e,"s",function(){return Ie}),n.d(e,"t",function(){return Te}),n.d(e,"u",function(){return De}),n.d(e,"v",function(){return Pe}),n.d(e,"p",function(){return we}),n.d(e,"w",function(){return Gt});var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function s(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var c=function(){return(c=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function u(t,e,n,r){return new(n||(n=Promise))(function(i,a){function o(t){try{c(r.next(t))}catch(t){a(t)}}function s(t){try{c(r.throw(t))}catch(t){a(t)}}function c(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(o,s)}c((r=r.apply(t,e||[])).next())})}function l(t,e){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}var d={},f={alpha:!1,antialias:!1,premultipliedAlpha:!1,preserveDrawingBuffer:!1,depth:!1,stencil:!1,failIfMajorPerformanceCaveat:!0};function h(t){t in d||(d[t]=function(t){if(1!==t&&2!==t)throw new Error("Cannot get WebGL rendering context, WebGL is disabled.");var e=document.createElement("canvas");return e.addEventListener("webglcontextlost",function(e){e.preventDefault(),delete d[t]},!1),1===t?e.getContext("webgl",f)||e.getContext("experimental-webgl",f):e.getContext("webgl2",f)}(t));var e=d[t];return e.isContextLost()?(delete d[t],h(t)):(e.disable(e.DEPTH_TEST),e.disable(e.STENCIL_TEST),e.disable(e.BLEND),e.disable(e.DITHER),e.disable(e.POLYGON_OFFSET_FILL),e.disable(e.SAMPLE_COVERAGE),e.enable(e.SCISSOR_TEST),e.enable(e.CULL_FACE),e.cullFace(e.BACK),d[t])}function p(t){for(var e=t.length,n=0,r=0;e>0;)r=Math.random()*e|0,n=t[--e],t[e]=t[r],t[r]=n}function m(t,e,n){return Math.max(t,Math.min(e,n))}function v(t){return t%2==0?t:t+1}function _(t){for(var e=0,n=0;n<t.length;n++)e+=t[n];return e}function g(t,e){var n=Math.random();return e*n+(1-n)*t}function b(t,e){if(!t)throw new Error("string"==typeof e?e:e())}function y(t,e,n){void 0===n&&(n=""),b(C(t,e),function(){return n+" Shapes "+t+" and "+e+" must match"})}function x(t){b(null!=t,function(){return"The input to the tensor constructor must be a non-null value."})}function w(t,e){if(void 0===e&&(e=[]),null==e&&(e=[]),Array.isArray(t)||j(t))for(var n=0;n<t.length;++n)w(t[n],e);else e.push(t);return e}function k(t){if(0===t.length)return 1;for(var e=t[0],n=1;n<t.length;n++)e*=t[n];return e}function C(t,e){if(t===e)return!0;if(null==t||null==e)return!1;if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function E(t){return t%1==0}function S(t){if(null!=Math.tanh)return Math.tanh(t);if(t===1/0)return 1;if(t===-1/0)return-1;var e=Math.exp(2*t);return(e-1)/(e+1)}function I(t){var e=Math.ceil(Math.sqrt(t));return[e,Math.ceil(t/e)]}function M(t,e){return e<=t.length?t:t+" ".repeat(e-t.length)}function T(t,e,n){return void 0===e&&(e=function(t){return 0}),new Promise(function(r,i){var a=0,o=function(){if(t())r();else{var s=e(++a);null!=n&&a>=n?i():setTimeout(o,s)}};o()})}function D(t,e){for(var n=1,r=-1,i=0;i<t.length;++i)if(t[i]>=0)n*=t[i];else if(-1===t[i]){if(-1!==r)throw Error("Shapes can only have 1 implicit size. Found -1 at dim "+r+" and dim "+i);r=i}else if(t[i]<0)throw Error("Shapes can not be < 0. Found "+t[i]+" at dim "+i);if(-1===r){if(e>0&&e!==n)throw Error("Size("+e+") must match the product of shape "+t);return t}if(0===n)throw Error("Cannot infer the missing size in ["+t+"] when there are 0 elements");if(e%n!=0)throw Error("The implicit shape can't be a fractional number. Got "+e+" / "+n);var a=t.slice();return a[r]=e/n,a}function R(t,e){var n=e.length;return b((t=null==t?e.map(function(t,e){return e}):[].concat(t)).every(function(t){return t>=-n&&t<n}),function(){return"All values in axis param must be in range [-"+n+", "+n+") but got axis "+t}),b(t.every(function(t){return E(t)}),function(){return"All values in axis param must be integers but got axis "+t}),t.map(function(t){return t<0?n+t:t})}function P(t,e){for(var n=[],r=[],i=null==e?null:R(e,t).sort(),a=0,o=0;o<t.length;++o){if(null!=i){if(i[a]===o&&1!==t[o])throw new Error("Can't squeeze axis "+o+" since its dim '"+t[o]+"' is not 1");(null==i[a]||i[a]>o)&&1===t[o]&&(n.push(t[o]),r.push(o)),i[a]<=o&&a++}1!==t[o]&&(n.push(t[o]),r.push(o))}return{newShape:n,keptDims:r}}function O(t,e){var n=null;if(null==t||"float32"===t)n=new Float32Array(e);else if("int32"===t)n=new Int32Array(e);else{if("bool"!==t)throw new Error("Unknown data type "+t);n=new Uint8Array(e)}return n}function L(t,e){var n=null;if(null==t||"float32"===t)n=new Float32Array(e);else if("int32"===t)n=new Int32Array(e);else if("bool"===t)n=new Uint8Array(e);else{if("string"!==t)throw new Error("Unknown data type "+t);n=new Array(e)}return n}function A(t,e,n){if("float32"===e)for(var r=0;r<t.length;r++){var i=t[r];if(isNaN(i)||!isFinite(i))throw Error("The result of the '"+n+"' is "+i+".")}}function N(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(isNaN(r)||!isFinite(r))throw Error("A tensor of type "+e+" being uploaded contains "+r+".")}}function B(t,e){return!("complex64"===e||"float32"===e&&"complex64"!==t||"int32"===e&&"float32"!==t&&"complex64"!==t||"bool"===e&&"bool"===t)}function j(t){return t instanceof Float32Array||t instanceof Int32Array||t instanceof Uint8Array}function F(t){if("float32"===t||"int32"===t)return 4;if("complex64"===t)return 8;if("bool"===t)return 1;throw new Error("Unknown dtype "+t)}function Y(t){if(null==t)return 0;var e=0;return t.forEach(function(t){return e+=2*t.length}),e}function $(t){return"string"==typeof t||t instanceof String}function z(t){return"boolean"==typeof t}function V(t){return"number"==typeof t}function H(t){return Array.isArray(t)?H(t[0]):t instanceof Float32Array?"float32":t instanceof Int32Array||t instanceof Uint8Array?"int32":V(t)?"float32":$(t)?"string":z(t)?"bool":"float32"}function q(t){return!!(t&&t.constructor&&t.call&&t.apply)}function W(t,e){for(var n=e;n<t;++n)if(t%n==0)return n;return t}function U(t){var e=t.length;if(e<2)return[];var n=new Array(e-1);n[e-2]=t[e-1];for(var r=e-3;r>=0;--r)n[r]=n[r+1]*t[r+1];return n}function G(t,e,n){if("string"===e)throw new Error("Cannot convert a string[] to a TypedArray");if(Array.isArray(t)&&(t=w(t)),n&&N(t,e),function(t,e){return t instanceof Float32Array&&"float32"===e||t instanceof Int32Array&&"int32"===e||t instanceof Uint8Array&&"bool"===e}(t,e))return t;if(null==e||"float32"===e||"complex64"===e)return new Float32Array(t);if("int32"===e)return new Int32Array(t);if("bool"===e){for(var r=new Uint8Array(t.length),i=0;i<r.length;++i)0!==Math.round(t[i])&&(r[i]=1);return r}throw new Error("Unknown data type "+e)}function K(t,e){if(0===t.length)return e[0];var n=t.reduce(function(t,e){return t*e});if(0===n)return[];if(n!==e.length)throw new Error("["+t+"] does not match the input size.");return function t(e,n,r){var i=new Array;if(1===n.length)for(var a=n[0],o=0;o<a;o++)i[o]=r[e+o];else{a=n[0];var s=n.slice(1),c=s.reduce(function(t,e){return t*e});for(o=0;o<a;o++)i[o]=t(e+o*c,s,r)}return i}(0,t,e)}function X(t,e){for(var n=J(t,e),r=0;r<n.length;r++)n[r]=1;return n}function J(t,e){if(null==e||"float32"===e||"complex64"===e)return new Float32Array(t);if("int32"===e)return new Int32Array(t);if("bool"===e)return new Uint8Array(t);throw new Error("Unknown data type "+e)}function Z(){if("undefined"!=typeof performance)return performance.now();if(void 0!==t){var e=t.hrtime();return 1e3*e[0]+e[1]/1e6}throw new Error("Cannot measure time in this environment. You should run tf.js in the browser or in Node.js")}function Q(t){t.forEach(function(e){b(Number.isInteger(e)&&e>=0,function(){return"Tensor must have a shape comprised of positive integers but got shape ["+t+"]."})})}Object.freeze({shuffle:p,clamp:m,nearestLargerEven:v,sum:_,randUniform:g,distSquared:function(t,e){for(var n=0,r=0;r<t.length;r++){var i=Number(t[r])-Number(e[r]);n+=i*i}return n},assert:b,assertShapesMatch:y,assertNonNull:x,flatten:w,sizeFromShape:k,isScalarShape:function(t){return 0===t.length},arraysEqual:C,isInt:E,tanh:S,sizeToSquarishShape:I,createShuffledIndices:function(t){for(var e=new Uint32Array(t),n=0;n<t;++n)e[n]=n;return p(e),e},rightPad:M,repeatedTry:T,inferFromImplicitShape:D,parseAxisParam:R,squeezeShape:P,getTypedArrayFromDType:O,getArrayFromDType:L,checkComputationForErrors:A,checkConversionForErrors:N,hasEncodingLoss:B,isTypedArray:j,bytesPerElement:F,bytesFromStringArray:Y,isString:$,isBoolean:z,isNumber:V,inferDtype:H,isFunction:q,nearestDivisor:W,computeStrides:U,toTypedArray:G,toNestedArray:K,makeOnesTypedArray:X,makeZerosTypedArray:J,now:Z,assertNonNegativeIntegerDimensions:Q});var tt=function(){function t(t,e){this.backendTimer=t,this.logger=e,null==e&&(this.logger=new et)}return t.prototype.profileKernel=function(t,e){var n,r=this,i=this.backendTimer.time(function(){n=e()});return(Array.isArray(n)?n:[n]).forEach(function(e){var n=e.dataSync();A(n,e.dtype,t),i.then(function(i){var a="";null!=i.getExtraProfileInfo&&(a=i.getExtraProfileInfo()),r.logger.logKernelProfile(t,e,n,i.kernelMs,a)})}),n},t}(),et=function(){function t(){}return t.prototype.logKernelProfile=function(t,e,n,r,i){var a=M(r+"ms",9),o=M(t,25),s=e.rank,c=e.size,u=M(e.shape.toString(),14);console.log("%c"+o+"\t%c"+a+"\t%c"+s+"D "+u+"\t%c"+c+"\t%c"+i,"font-weight:bold","color:red","color:blue","color: orange","color: green")},t}(),nt=20,rt=3,it=7;function at(t,e,n,r){var i=U(e),a=function(t,e,n,r){var i=k(e),a=r[r.length-1],o=new Array(a).fill(0),s=e.length,c="complex64"===n?ct(t):t;if(s>1)for(var u=0;u<i/a;u++)for(var l=u*a,d=0;d<a;d++)o[d]=Math.max(o[d],ot(c[l+d],0,n).length);return o}(t,e,n,i),o=e.length,s=function t(e,n,r,i,a,o){void 0===o&&(o=!0);var s="complex64"===r?2:1,c=n[0],u=n.length;if(0===u)return"complex64"===r?[ot(ct(e)[0],0,r)]:"bool"===r?[st(e[0])]:[e[0].toString()];if(1===u){if(c>nt){var l=rt*s,d=Array.from(e.slice(0,l)),f=Array.from(e.slice(c-rt*s,c));return"complex64"===r&&(d=ct(d),f=ct(f)),["["+d.map(function(t,e){return ot(t,a[e],r)}).join(", ")+", ..., "+f.map(function(t,e){return ot(t,a[c-rt+e],r)}).join(", ")+"]"]}return["["+("complex64"===r?ct(e):Array.from(e)).map(function(t,e){return ot(t,a[e],r)}).join(", ")+"]"]}var h=n.slice(1),p=i.slice(1),m=i[0]*s,v=[];if(c>nt){for(var _=0;_<rt;_++){var g=(b=_*m)+m;v.push.apply(v,t(e.slice(b,g),h,r,p,a,!1))}for(v.push("..."),_=c-rt;_<c;_++)g=(b=_*m)+m,v.push.apply(v,t(e.slice(b,g),h,r,p,a,_===c-1))}else for(_=0;_<c;_++){var b;g=(b=_*m)+m,v.push.apply(v,t(e.slice(b,g),h,r,p,a,_===c-1))}var y=2===u?",":"";v[0]="["+v[0]+y;for(_=1;_<v.length-1;_++)v[_]=" "+v[_]+y;var x=",\n";for(_=2;_<u;_++)x+="\n";return v[v.length-1]=" "+v[v.length-1]+"]"+(o?"":x),v}(t,e,n,i,a),c=["Tensor"];return r&&(c.push(" dtype: "+n),c.push(" rank: "+o),c.push(" shape: ["+e+"]"),c.push(" values:")),c.push(s.map(function(t){return" "+t}).join("\n")),c.join("\n")}function ot(t,e,n){return M(Array.isArray(t)?parseFloat(t[0].toFixed(it))+" + "+parseFloat(t[1].toFixed(it))+"j":$(t)?"'"+t+"'":"bool"===n?st(t):parseFloat(t.toFixed(it)).toString(),e)}function st(t){return 0===t?"false":"true"}function ct(t){for(var e=[],n=0;n<t.length;n+=2)e.push([t[n],t[n+1]]);return e}var ut=function(){function t(t,e,n){var r=this;if(this.dtype=e,this.shape=t.slice(),this.size=k(t),null!=n){var i=n.length;b(i===this.size,function(){return"Length of values '"+i+"' does not match the size inferred by the shape '"+r.size+"'."})}if("complex64"===e)throw new Error("complex64 dtype TensorBuffers are not supported. Please create a TensorBuffer for the real and imaginary parts separately and call tf.complex(real, imag).");this.values=n||L(e,this.size),this.strides=U(t)}return t.prototype.set=function(t){for(var e=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];0===n.length&&(n=[0]),b(n.length===this.rank,function(){return"The number of provided coordinates ("+n.length+") must match the rank ("+e.rank+")"});var i=this.locToIndex(n);this.values[i]=t},t.prototype.get=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];0===t.length&&(t=[0]);for(var n=0,r=0,i=t;r<i.length;r++){var a=i[r];if(a<0||a>=this.shape[n]){var o="Requested out of range element at "+t+". Buffer shape="+this.shape;throw new Error(o)}n++}for(var s=t[t.length-1],c=0;c<t.length-1;++c)s+=this.strides[c]*t[c];return this.values[s]},t.prototype.locToIndex=function(t){if(0===this.rank)return 0;if(1===this.rank)return t[0];for(var e=t[t.length-1],n=0;n<t.length-1;++n)e+=this.strides[n]*t[n];return e},t.prototype.indexToLoc=function(t){if(0===this.rank)return[];if(1===this.rank)return[t];for(var e=new Array(this.shape.length),n=0;n<e.length-1;++n)e[n]=Math.floor(t/this.strides[n]),t-=e[n]*this.strides[n];return e[e.length-1]=t,e},Object.defineProperty(t.prototype,"rank",{get:function(){return this.shape.length},enumerable:!0,configurable:!0}),t.prototype.toTensor=function(){return ht.make(this.shape,{values:this.values},this.dtype)},t}(),lt=null,dt=null,ft=null;var ht=function(){function t(t,e,n,r,i){this.kept=!1,this.isDisposedInternal=!1,this.shape=t.slice(),this.dtype=e||"float32",this.size=k(t),this.strides=U(t),this.dataId=null!=r?r:{},this.id=lt().nextTensorId(),this.rankType=this.rank<5?this.rank.toString():"higher",lt().registerTensor(this,i),null!=n&&lt().write(this.dataId,n)}return t.make=function(e,n,r,i){return new t(e,r,n.values,n.dataId,i)},t.prototype.flatten=function(){return this.throwIfDisposed(),this.as1D()},t.prototype.asScalar=function(){return this.throwIfDisposed(),b(1===this.size,function(){return"The array must have only 1 element."}),this.reshape([])},t.prototype.as1D=function(){return this.throwIfDisposed(),this.reshape([this.size])},t.prototype.as2D=function(t,e){return this.throwIfDisposed(),this.reshape([t,e])},t.prototype.as3D=function(t,e,n){return this.throwIfDisposed(),this.reshape([t,e,n])},t.prototype.as4D=function(t,e,n,r){return this.throwIfDisposed(),this.reshape([t,e,n,r])},t.prototype.as5D=function(t,e,n,r,i){return this.throwIfDisposed(),this.reshape([t,e,n,r,i])},t.prototype.asType=function(t){return this.throwIfDisposed(),dt.cast(this,t)},Object.defineProperty(t.prototype,"rank",{get:function(){return this.shape.length},enumerable:!0,configurable:!0}),t.prototype.buffer=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return[4,this.data()];case 1:return t=e.sent(),[2,dt.buffer(this.shape,this.dtype,t)]}})})},t.prototype.bufferSync=function(){return dt.buffer(this.shape,this.dtype,this.dataSync())},t.prototype.array=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return[4,this.data()];case 1:return t=e.sent(),[2,K(this.shape,t)]}})})},t.prototype.arraySync=function(){return K(this.shape,this.dataSync())},t.prototype.data=function(){return u(this,void 0,void 0,function(){return l(this,function(t){return this.throwIfDisposed(),[2,lt().read(this.dataId)]})})},t.prototype.dataSync=function(){return this.throwIfDisposed(),lt().readSync(this.dataId)},t.prototype.dispose=function(){this.isDisposed||(lt().disposeTensor(this),this.isDisposedInternal=!0)},Object.defineProperty(t.prototype,"isDisposed",{get:function(){return this.isDisposedInternal},enumerable:!0,configurable:!0}),t.prototype.throwIfDisposed=function(){if(this.isDisposed)throw new Error("Tensor is disposed.")},t.prototype.toFloat=function(){return this.asType("float32")},t.prototype.toInt=function(){return this.asType("int32")},t.prototype.toBool=function(){return this.asType("bool")},t.prototype.print=function(t){return void 0===t&&(t=!1),dt.print(this,t)},t.prototype.reshape=function(t){return this.throwIfDisposed(),dt.reshape(this,t)},t.prototype.reshapeAs=function(t){return this.throwIfDisposed(),this.reshape(t.shape)},t.prototype.expandDims=function(t){return void 0===t&&(t=0),dt.expandDims(this,t)},t.prototype.cumsum=function(t,e,n){return void 0===t&&(t=0),void 0===e&&(e=!1),void 0===n&&(n=!1),dt.cumsum(this,t,e,n)},t.prototype.squeeze=function(t){return this.throwIfDisposed(),dt.squeeze(this,t)},t.prototype.clone=function(){return this.throwIfDisposed(),dt.clone(this)},t.prototype.oneHot=function(t,e,n){return this.throwIfDisposed(),dt.oneHot(this,t,e,n)},t.prototype.toString=function(t){return void 0===t&&(t=!1),at(this.dataSync(),this.shape,this.dtype,t)},t.prototype.tile=function(t){return this.throwIfDisposed(),dt.tile(this,t)},t.prototype.gather=function(t,e){return void 0===e&&(e=0),this.throwIfDisposed(),dt.gather(this,t,e)},t.prototype.matMul=function(t,e,n){return void 0===e&&(e=!1),void 0===n&&(n=!1),this.throwIfDisposed(),dt.matMul(this,t,e,n)},t.prototype.dot=function(t){return this.throwIfDisposed(),dt.dot(this,t)},t.prototype.norm=function(t,e,n){return void 0===t&&(t="euclidean"),void 0===e&&(e=null),void 0===n&&(n=!1),this.throwIfDisposed(),dt.norm(this,t,e,n)},t.prototype.slice=function(t,e){return this.throwIfDisposed(),dt.slice(this,t,e)},t.prototype.reverse=function(t){return this.throwIfDisposed(),dt.reverse(this,t)},t.prototype.concat=function(e,n){return void 0===n&&(n=0),this.throwIfDisposed(),e instanceof t&&(e=[e]),dt.concat([this].concat(e),n)},t.prototype.split=function(t,e){return void 0===e&&(e=0),this.throwIfDisposed(),dt.split(this,t,e)},t.prototype.stack=function(t,e){return void 0===e&&(e=0),dt.stack([this,t],e)},t.prototype.unstack=function(t){return void 0===t&&(t=0),dt.unstack(this,t)},t.prototype.pad=function(t,e){return void 0===e&&(e=0),dt.pad(this,t,e)},t.prototype.batchNormalization=function(t,e,n,r,i){return void 0===n&&(n=.001),ft("tf.batchNormalization() is going away. Use tf.batchNorm() instead, and note the positional argument change of scale, offset, and varianceEpsilon"),this.batchNorm(t,e,i,r,n)},t.prototype.batchNorm=function(t,e,n,r,i){return void 0===i&&(i=.001),this.throwIfDisposed(),dt.batchNorm(this,t,e,n,r,i)},t.prototype.all=function(t,e){return void 0===t&&(t=null),void 0===e&&(e=!1),this.throwIfDisposed(),dt.all(this,t,e)},t.prototype.any=function(t,e){return void 0===t&&(t=null),void 0===e&&(e=!1),this.throwIfDisposed(),dt.any(this,t,e)},t.prototype.logSumExp=function(t,e){return void 0===t&&(t=null),void 0===e&&(e=!1),this.throwIfDisposed(),dt.logSumExp(this,t,e)},t.prototype.sum=function(t,e){return void 0===t&&(t=null),void 0===e&&(e=!1),this.throwIfDisposed(),dt.sum(this,t,e)},t.prototype.prod=function(t,e){return void 0===t&&(t=null),void 0===e&&(e=!1),this.throwIfDisposed(),dt.prod(this,t,e)},t.prototype.mean=function(t,e){return void 0===t&&(t=null),void 0===e&&(e=!1),this.throwIfDisposed(),dt.mean(this,t,e)},t.prototype.min=function(t,e){return void 0===t&&(t=null),void 0===e&&(e=!1),this.throwIfDisposed(),dt.min(this,t,e)},t.prototype.max=function(t,e){return void 0===t&&(t=null),void 0===e&&(e=!1),this.throwIfDisposed(),dt.max(this,t,e)},t.prototype.argMin=function(t){return void 0===t&&(t=null),this.throwIfDisposed(),dt.argMin(this,t)},t.prototype.argMax=function(t){return void 0===t&&(t=null),this.throwIfDisposed(),dt.argMax(this,t)},t.prototype.cast=function(t){return this.throwIfDisposed(),dt.cast(this,t)},t.prototype.add=function(t){return this.throwIfDisposed(),dt.add(this,t)},t.prototype.addStrict=function(t){return this.throwIfDisposed(),dt.addStrict(this,t)},t.prototype.atan2=function(t){return this.throwIfDisposed(),dt.atan2(this,t)},t.prototype.sub=function(t){return this.throwIfDisposed(),dt.sub(this,t)},t.prototype.subStrict=function(t){return this.throwIfDisposed(),dt.subStrict(this,t)},t.prototype.pow=function(t){return this.throwIfDisposed(),dt.pow(this,t)},t.prototype.powStrict=function(t){return this.throwIfDisposed(),dt.powStrict(this,t)},t.prototype.mul=function(t){return this.throwIfDisposed(),dt.mul(this,t)},t.prototype.mulStrict=function(t){return this.throwIfDisposed(),dt.mulStrict(this,t)},t.prototype.div=function(t){return this.throwIfDisposed(),dt.div(this,t)},t.prototype.floorDiv=function(t){return this.throwIfDisposed(),dt.floorDiv(this,t)},t.prototype.divStrict=function(t){return this.throwIfDisposed(),dt.divStrict(this,t)},t.prototype.minimum=function(t){return this.throwIfDisposed(),dt.minimum(this,t)},t.prototype.minimumStrict=function(t){return this.throwIfDisposed(),dt.minimumStrict(this,t)},t.prototype.maximum=function(t){return this.throwIfDisposed(),dt.maximum(this,t)},t.prototype.maximumStrict=function(t){return this.throwIfDisposed(),dt.maximumStrict(this,t)},t.prototype.mod=function(t){return this.throwIfDisposed(),dt.mod(this,t)},t.prototype.modStrict=function(t){return this.throwIfDisposed(),dt.modStrict(this,t)},t.prototype.squaredDifference=function(t){return this.throwIfDisposed(),dt.squaredDifference(this,t)},t.prototype.squaredDifferenceStrict=function(t){return this.throwIfDisposed(),dt.squaredDifferenceStrict(this,t)},t.prototype.transpose=function(t){return this.throwIfDisposed(),dt.transpose(this,t)},t.prototype.notEqual=function(t){return this.throwIfDisposed(),dt.notEqual(this,t)},t.prototype.notEqualStrict=function(t){return this.throwIfDisposed(),dt.notEqualStrict(this,t)},t.prototype.less=function(t){return this.throwIfDisposed(),dt.less(this,t)},t.prototype.lessStrict=function(t){return this.throwIfDisposed(),dt.lessStrict(this,t)},t.prototype.equal=function(t){return this.throwIfDisposed(),dt.equal(this,t)},t.prototype.equalStrict=function(t){return this.throwIfDisposed(),dt.equalStrict(this,t)},t.prototype.lessEqual=function(t){return this.throwIfDisposed(),dt.lessEqual(this,t)},t.prototype.lessEqualStrict=function(t){return this.throwIfDisposed(),dt.lessEqualStrict(this,t)},t.prototype.greater=function(t){return this.throwIfDisposed(),dt.greater(this,t)},t.prototype.greaterStrict=function(t){return this.throwIfDisposed(),dt.greaterStrict(this,t)},t.prototype.greaterEqual=function(t){return this.throwIfDisposed(),dt.greaterEqual(this,t)},t.prototype.greaterEqualStrict=function(t){return this.throwIfDisposed(),dt.greaterEqualStrict(this,t)},t.prototype.logicalAnd=function(t){return this.throwIfDisposed(),dt.logicalAnd(this,t)},t.prototype.logicalOr=function(t){return this.throwIfDisposed(),dt.logicalOr(this,t)},t.prototype.logicalNot=function(){return this.throwIfDisposed(),dt.logicalNot(this)},t.prototype.logicalXor=function(t){return this.throwIfDisposed(),dt.logicalXor(this,t)},t.prototype.where=function(t,e){return this.throwIfDisposed(),dt.where(t,this,e)},t.prototype.neg=function(){return this.throwIfDisposed(),dt.neg(this)},t.prototype.ceil=function(){return this.throwIfDisposed(),dt.ceil(this)},t.prototype.floor=function(){return this.throwIfDisposed(),dt.floor(this)},t.prototype.sign=function(){return this.throwIfDisposed(),dt.sign(this)},t.prototype.exp=function(){return this.throwIfDisposed(),dt.exp(this)},t.prototype.expm1=function(){return this.throwIfDisposed(),dt.expm1(this)},t.prototype.log=function(){return this.throwIfDisposed(),dt.log(this)},t.prototype.log1p=function(){return this.throwIfDisposed(),dt.log1p(this)},t.prototype.sqrt=function(){return this.throwIfDisposed(),dt.sqrt(this)},t.prototype.rsqrt=function(){return this.throwIfDisposed(),dt.rsqrt(this)},t.prototype.square=function(){return this.throwIfDisposed(),dt.square(this)},t.prototype.reciprocal=function(){return this.throwIfDisposed(),dt.reciprocal(this)},t.prototype.abs=function(){return this.throwIfDisposed(),dt.abs(this)},t.prototype.clipByValue=function(t,e){return this.throwIfDisposed(),dt.clipByValue(this,t,e)},t.prototype.relu=function(){return this.throwIfDisposed(),dt.relu(this)},t.prototype.elu=function(){return this.throwIfDisposed(),dt.elu(this)},t.prototype.selu=function(){return this.throwIfDisposed(),dt.selu(this)},t.prototype.leakyRelu=function(t){return void 0===t&&(t=.2),this.throwIfDisposed(),dt.leakyRelu(this,t)},t.prototype.prelu=function(t){return this.throwIfDisposed(),dt.prelu(this,t)},t.prototype.sigmoid=function(){return this.throwIfDisposed(),dt.sigmoid(this)},t.prototype.logSigmoid=function(){return this.throwIfDisposed(),dt.logSigmoid(this)},t.prototype.softplus=function(){return this.throwIfDisposed(),dt.softplus(this)},t.prototype.zerosLike=function(){return this.throwIfDisposed(),dt.zerosLike(this)},t.prototype.onesLike=function(){return this.throwIfDisposed(),dt.onesLike(this)},t.prototype.sin=function(){return this.throwIfDisposed(),dt.sin(this)},t.prototype.cos=function(){return this.throwIfDisposed(),dt.cos(this)},t.prototype.tan=function(){return this.throwIfDisposed(),dt.tan(this)},t.prototype.asin=function(){return this.throwIfDisposed(),dt.asin(this)},t.prototype.acos=function(){return this.throwIfDisposed(),dt.acos(this)},t.prototype.atan=function(){return this.throwIfDisposed(),dt.atan(this)},t.prototype.sinh=function(){return this.throwIfDisposed(),dt.sinh(this)},t.prototype.cosh=function(){return this.throwIfDisposed(),dt.cosh(this)},t.prototype.tanh=function(){return this.throwIfDisposed(),dt.tanh(this)},t.prototype.asinh=function(){return this.throwIfDisposed(),dt.asinh(this)},t.prototype.acosh=function(){return this.throwIfDisposed(),dt.acosh(this)},t.prototype.atanh=function(){return this.throwIfDisposed(),dt.atanh(this)},t.prototype.erf=function(){return this.throwIfDisposed(),dt.erf(this)},t.prototype.round=function(){return this.throwIfDisposed(),dt.round(this)},t.prototype.step=function(t){return void 0===t&&(t=0),this.throwIfDisposed(),dt.step(this,t)},t.prototype.softmax=function(t){return void 0===t&&(t=-1),this.throwIfDisposed(),dt.softmax(this,t)},t.prototype.logSoftmax=function(t){return void 0===t&&(t=-1),this.throwIfDisposed(),dt.logSoftmax(this,t)},t.prototype.resizeBilinear=function(t,e){return void 0===e&&(e=!1),this.throwIfDisposed(),dt.image.resizeBilinear(this,t,e)},t.prototype.resizeNearestNeighbor=function(t,e){return void 0===e&&(e=!1),this.throwIfDisposed(),dt.image.resizeNearestNeighbor(this,t,e)},t.prototype.conv1d=function(t,e,n,r,i,a){return void 0===r&&(r="NWC"),void 0===i&&(i=1),this.throwIfDisposed(),dt.conv1d(this,t,e,n,r,i,a)},t.prototype.conv2d=function(t,e,n,r,i,a){return void 0===r&&(r="NHWC"),void 0===i&&(i=[1,1]),this.throwIfDisposed(),dt.conv2d(this,t,e,n,r,i,a)},t.prototype.conv2dTranspose=function(t,e,n,r,i){return this.throwIfDisposed(),dt.conv2dTranspose(this,t,e,n,r,i)},t.prototype.depthwiseConv2D=function(t,e,n,r,i,a){return void 0===r&&(r="NHWC"),void 0===i&&(i=[1,1]),this.throwIfDisposed(),dt.depthwiseConv2d(this,t,e,n,r,i,a)},t.prototype.separableConv2d=function(t,e,n,r,i,a){return void 0===i&&(i=[1,1]),void 0===a&&(a="NHWC"),this.throwIfDisposed(),dt.separableConv2d(this,t,e,n,r,i,a)},t.prototype.avgPool=function(t,e,n,r){return this.throwIfDisposed(),dt.avgPool(this,t,e,n,r)},t.prototype.maxPool=function(t,e,n,r){return this.throwIfDisposed(),dt.maxPool(this,t,e,n,r)},t.prototype.localResponseNormalization=function(t,e,n,r){return void 0===t&&(t=5),void 0===e&&(e=1),void 0===n&&(n=1),void 0===r&&(r=.5),dt.localResponseNormalization(this,t,e,n,r)},t.prototype.pool=function(t,e,n,r,i){return this.throwIfDisposed(),dt.pool(this,t,e,n,r,i)},t.prototype.variable=function(t,e,n){return void 0===t&&(t=!0),this.throwIfDisposed(),pt.variable(this,t,e,n)},t.prototype.unsortedSegmentSum=function(t,e){return this.throwIfDisposed(),dt.unsortedSegmentSum(this,t,e)},t.prototype.batchToSpaceND=function(t,e){return this.throwIfDisposed(),dt.batchToSpaceND(this,t,e)},t.prototype.spaceToBatchND=function(t,e){return this.throwIfDisposed(),dt.spaceToBatchND(this,t,e)},t.prototype.topk=function(t,e){return void 0===t&&(t=1),void 0===e&&(e=!0),this.throwIfDisposed(),dt.topk(this,t,e)},t.prototype.stridedSlice=function(t,e,n,r,i,a,o,s){return void 0===r&&(r=0),void 0===i&&(i=0),void 0===a&&(a=0),void 0===o&&(o=0),void 0===s&&(s=0),this.throwIfDisposed(),dt.stridedSlice(this,t,e,n,r,i,a,o,s)},t.prototype.depthToSpace=function(t,e){return this.throwIfDisposed(),dt.depthToSpace(this,t,e)},t.prototype.fft=function(){return this.throwIfDisposed(),dt.spectral.fft(this)},t.prototype.ifft=function(){return this.throwIfDisposed(),dt.spectral.ifft(this)},t.prototype.rfft=function(){return this.throwIfDisposed(),dt.spectral.rfft(this)},t.prototype.irfft=function(){return this.throwIfDisposed(),dt.spectral.irfft(this)},t}();Object.defineProperty(ht,Symbol.hasInstance,{value:function(t){return!!t&&null!=t.dataId&&null!=t.shape&&null!=t.dtype}});var pt=function(t){function e(e,n,r){void 0===n&&(n=!0);var i=t.call(this,e.shape,e.dtype,null,e.dataId)||this;i.trainable=n,i.name=r,null==i.name&&(i.name=lt().nextVariableId().toString());try{lt().registerVariable(i)}catch(t){throw lt().disposeTensor(i),t}return i}return s(e,t),e.variable=function(t,n,r,i){return void 0===n&&(n=!0),null!=i&&i!==t.dtype&&(t=t.asType(i)),new e(t,n,r)},e.prototype.assign=function(t){if(t.dtype!==this.dtype)throw new Error("dtype of the new value ("+t.dtype+") and previous value ("+this.dtype+") must match");if(!C(t.shape,this.shape))throw new Error("shape of the new value ("+t.shape+") and previous value ("+this.shape+") must match");lt().disposeTensor(this),this.dataId=t.dataId,lt().registerTensor(this)},e}(ht);Object.defineProperty(pt,Symbol.hasInstance,{value:function(t){return t instanceof ht&&null!=t.assign&&t.assign instanceof Function}});var mt,vt,_t,gt,bt,yt;pt.variable;(yt=mt||(mt={})).R0="R0",yt.R1="R1",yt.R2="R2",yt.R3="R3",yt.R4="R4",yt.R5="R5",yt.R6="R6",function(t){t.float32="float32",t.int32="int32",t.bool="int32",t.complex64="complex64"}(vt||(vt={})),function(t){t.float32="float32",t.int32="int32",t.bool="bool",t.complex64="complex64"}(_t||(_t={})),function(t){t.float32="float32",t.int32="float32",t.bool="float32",t.complex64="complex64"}(gt||(gt={})),function(t){t.float32="complex64",t.int32="complex64",t.bool="complex64",t.complex64="complex64"}(bt||(bt={}));var xt={float32:gt,int32:vt,bool:_t,complex64:bt};function wt(t,e){if("string"===t||"string"===e){if("string"===t&&"string"===e)return"string";throw new Error("Can not upcast "+t+" with "+e)}return xt[t][e]}function kt(t){return wt(t,"int32")}function Ct(t,e){if(t.dtype===e.dtype)return[t,e];var n=wt(t.dtype,e.dtype);return[t.cast(n),e.cast(n)]}function Et(t,e){b(t.dtype===e.dtype,function(){return"The dtypes of the first("+t.dtype+") and second("+e.dtype+") input must match"})}function St(t){var e=[];return function t(e,n,r){if(null!=e)if(e instanceof ht)n.push(e);else if(function(t){return Array.isArray(t)||"object"==typeof t}(e)){var i=e;for(var a in i){var o=i[a];r.has(o)||(r.add(o),t(o,n,r))}}}(t,e,new Set),e}Object.freeze({makeTypesMatch:Ct,assertTypesMatch:Et,isTensorInList:function(t,e){for(var n=0;n<e.length;n++)if(e[n].id===t.id)return!0;return!1},getTensorsInContainer:St});var It,Mt=function(){function t(t,e,n){this.backend=t,this.safeMode=e,this.debugMode=n,this.registeredVariables={},this.nextTapeNodeId=0,this.numBytes=0,this.numTensors=0,this.numStringTensors=0,this.numDataBuffers=0,this.profiling=!1,this.gradientDepth=0,this.kernelDepth=0,this.scopeStack=[],this.nextScopeId=0,this.tensorInfo=new WeakMap,this.profiler=new tt(t),this.activeProfile={newBytes:0,newTensors:0,peakBytes:0,kernels:[],result:null}}return t.prototype.moveData=function(t){this.write(t,this.readSync(t))},t.prototype.tidy=function(t,e){var n,r=this,i=null;if(null==e){if("function"!=typeof t)throw new Error("Please provide a function to tidy()");e=t}else{if("string"!=typeof t&&!(t instanceof String))throw new Error("When calling with two arguments, the first argument to tidy() must be a string");if("function"!=typeof e)throw new Error("When calling with two arguments, the 2nd argument to tidy() must be a function");i=t}return this.scopedRun(function(){return r.startScope(i)},function(){return r.endScope(n)},function(){return(n=e())instanceof Promise&&console.error("Cannot return a Promise inside of tidy."),n})},t.prototype.scopedRun=function(t,e,n){t();try{var r=n();return e(),r}catch(t){throw e(),t}},t.prototype.nextTensorId=function(){return t.nextTensorId++},t.prototype.nextVariableId=function(){return t.nextVariableId++},t.prototype.clone=function(t){var e=ht.make(t.shape,{dataId:t.dataId},t.dtype);return this.addTapeNode([t],e,function(t){return[t.toFloat()]}),e},t.prototype.runKernel=function(t,e,n){var r,i=this,a=[],o=this.isTapeOn(),s=null!=this.activeScope?this.activeScope.name:"",c=function(t){o&&(a=t.map(function(t){return i.keep(i.clone(t))}))},u=this.numBytes,l=this.numTensors;if(this.scopedRun(function(){return i.kernelDepth++},function(){return i.kernelDepth--},function(){r=i.debugMode()?i.profiler.profileKernel(s,function(){return t(i.backend,c)}):t(i.backend,c)}),o){var d={id:this.nextTapeNodeId++,name:s,inputs:e,outputs:Array.isArray(r)?r:[r],saved:a};null!=n&&(d.gradient=function(t){return n(t,a)}),this.activeTape.push(d)}return this.profiling&&this.activeProfile.kernels.push({name:s,bytesAdded:this.numBytes-u,totalBytesSnapshot:this.numBytes,tensorsAdded:this.numTensors-l,totalTensorsSnapshot:this.numTensors,inputShapes:Object.keys(e).map(function(t){return e[t].shape}),outputShape:Array.isArray(r)?r.map(function(t){return t.shape}):r.shape}),r},t.prototype.registerTensor=function(t,e){var n=this.tensorInfo.has(t.dataId)?this.tensorInfo.get(t.dataId).refCount:0;if(this.numTensors++,"string"===t.dtype&&this.numStringTensors++,0===n){this.numDataBuffers++;var r=0;"complex64"!==t.dtype&&"string"!==t.dtype&&(r=t.size*F(t.dtype)),this.tensorInfo.set(t.dataId,{backend:null!=e?e:this.backend,dtype:t.dtype,shape:t.shape,bytes:r,refCount:0}),this.numBytes+=r,null!=e?e.register(t.dataId,t.shape,t.dtype):this.backend.register(t.dataId,t.shape,t.dtype)}this.tensorInfo.get(t.dataId).refCount++,t instanceof pt||this.track(t)},t.prototype.registerVariable=function(t){if(null!=this.registeredVariables[t.name])throw new Error("Variable with name "+t.name+" was already registered");this.registeredVariables[t.name]=t},t.prototype.disposeTensor=function(t){if(this.tensorInfo.has(t.dataId)){this.numTensors--,"string"===t.dtype&&this.numStringTensors--;var e=this.tensorInfo.get(t.dataId);e.refCount<=1?("complex64"!==t.dtype&&(this.numBytes-=e.bytes),this.numDataBuffers--,e.backend.disposeData(t.dataId),this.tensorInfo.delete(t.dataId)):this.tensorInfo.get(t.dataId).refCount--}},t.prototype.disposeVariables=function(){for(var t in this.registeredVariables){var e=this.registeredVariables[t];this.disposeTensor(e),delete this.registeredVariables[t]}},t.prototype.memory=function(){var t=this.backend.memory();return t.numTensors=this.numTensors,t.numDataBuffers=this.numDataBuffers,t.numBytes=this.numBytes,this.numStringTensors>0&&(t.unreliable=!0,null==t.reasons&&(t.reasons=[]),t.reasons.push("Memory usage by string tensors is approximate (2 bytes per character)")),t},t.prototype.profile=function(t){return u(this,void 0,void 0,function(){var e,n;return l(this,function(r){return this.profiling=!0,e=this.numBytes,n=this.numTensors,this.activeProfile.kernels=[],this.activeProfile.result=t(),this.profiling=!1,this.activeProfile.peakBytes=Math.max.apply(Math,this.activeProfile.kernels.map(function(t){return t.totalBytesSnapshot})),this.activeProfile.newBytes=this.numBytes-e,this.activeProfile.newTensors=this.numTensors-n,[2,this.activeProfile]})})},t.prototype.isTapeOn=function(){return this.gradientDepth>0&&0===this.kernelDepth},t.prototype.addTapeNode=function(t,e,n){var r={};t.forEach(function(t,e){r[e]=t});var i={id:this.nextTapeNodeId++,name:this.activeScope.name,inputs:r,outputs:[e],gradient:function(t){var e={};return n(t).forEach(function(t,n){e[n]=function(){return t}}),e}};this.activeTape.push(i)},t.prototype.keep=function(t){if(1===this.scopeStack.length&&this.safeMode)throw new Error("Safe mode is ON. Enclose all tensor operations inside tf.tidy(): tf.tidy(() => {...}) to avoid memory leaks.");return t.kept=!0,t},t.prototype.startTape=function(){0===this.gradientDepth&&(this.activeTape=[]),this.gradientDepth++},t.prototype.endTape=function(){this.gradientDepth--},t.prototype.startScope=function(t){var e={track:[],name:"unnamed scope",id:this.nextScopeId++};t&&(e.name=t),this.scopeStack.push(e),this.activeScope=e},t.prototype.endScope=function(t){for(var e=this,n=St(t),r=new Set(n.map(function(t){return t.id})),i=0;i<this.activeScope.track.length;i++){var a=this.activeScope.track[i];a.kept||r.has(a.id)||a.dispose()}var o=this.scopeStack.pop();this.activeScope=0===this.scopeStack.length?null:this.scopeStack[this.scopeStack.length-1],n.forEach(function(t){t.kept||t.scopeId!==o.id||e.track(t)})},t.prototype.gradients=function(t,e,n,r){var i=this;if(void 0===r&&(r=!1),b(e.length>0,function(){return"gradients() received an empty list of xs."}),null!=n&&"float32"!==n.dtype)throw new Error("dy must have 'float32' dtype, but has '"+n.dtype+"'");var a=this.scopedRun(function(){return i.startTape()},function(){return i.endTape()},function(){return i.tidy("forward",t)});b(a instanceof ht,function(){return"The result y returned by f() must be a tensor."});var o=function(t,e,n){for(var r={},i={},a=0;a<e.length;a++)r[e[a].id]=!0;for(a=0;a<t.length;a++){var o=(p=t[a]).inputs;for(var s in o){for(var c=o[s],u=!1,l=0;l<e.length;l++)if(r[c.id]){p.outputs.forEach(function(t){return r[t.id]=!0}),u=!0,i[p.id]=!0;break}if(u)break}}var d={};d[n.id]=!0;var f={};for(a=t.length-1;a>=0;a--)for(o=(p=t[a]).inputs,l=0;l<p.outputs.length;l++)if(d[p.outputs[l].id]){for(var s in o)d[o[s].id]=!0,f[p.id]=!0;break}var h=[];for(a=0;a<t.length;a++){var p;if(i[(p=t[a]).id]&&f[p.id]){var m={};for(var s in p.inputs){var v=p.inputs[s];r[v.id]&&(m[s]=v)}var _=Object.assign({},p);_.inputs=m,_.outputs=p.outputs,h.push(_)}}return h}(this.activeTape,e,a);if(!r&&0===o.length&&e.length>0)throw new Error("Cannot compute gradient of y=f(x) with respect to x. Make sure that the f you passed encloses all operations that lead from x to y.");return this.tidy("backward",function(){var t={};t[a.id]=null==n?function(t){var e=X(k(t),"float32");return ht.make(t,{values:e})}(a.shape):n,function(t,e,n){for(var r=function(r){var i=e[r],a=[];if(i.outputs.forEach(function(e){var n=t[e.id];if(null!=n)a.push(n);else{var r=ht.make(e.shape,{values:J(e.size,e.dtype)},e.dtype);a.push(r)}}),null==i.gradient)throw new Error("Cannot compute gradient: gradient function not found for "+i.name+".");var o=i.gradient(1===i.outputs.length?a[0]:a),s=function(e){if(!(e in o))throw new Error("Cannot backprop through input "+e+". Available gradients found: "+Object.keys(o)+".");var r=n(function(){return o[e]()});if("float32"!==r.dtype)throw new Error("Error in gradient for op "+i.name+". The gradient of input "+e+" must have 'float32' dtype, but has '"+r.dtype+"'");var a=i.inputs[e];if(!C(r.shape,a.shape))throw new Error("Error in gradient for op "+i.name+". The gradient of input '"+e+"' has shape '"+r.shape+"', which does not match the shape of the input '"+a.shape+"'");if(null==t[a.id])t[a.id]=r;else{var s=t[a.id];t[a.id]=s.add(r),s.dispose()}};for(var c in i.inputs)s(c)},i=e.length-1;i>=0;i--)r(i)}(t,o,function(t){return i.tidy(t)});var r=e.map(function(e){return t[e.id]});return 0===i.gradientDepth&&(i.activeTape.forEach(function(t){for(var e in t.saved)t.saved[e].dispose()}),i.activeTape=null),{value:a,grads:r}})},t.prototype.customGrad=function(t){var e=this;return b(q(t),function(){return"The f passed in customGrad(f) must be a function."}),function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];b(r.every(function(t){return t instanceof ht}),function(){return"The args passed in customGrad(f)(x1, x2,...) must all be tensors"});var a={};return r.forEach(function(t,e){a[e]=t}),e.runKernel(function(e,i){return b((n=t.apply(void 0,r.concat([i]))).value instanceof ht,function(){return"The function f passed in customGrad(f) must return an object where `obj.value` is a tensor"}),b(q(n.gradFunc),function(){return"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function."}),n.value},a,function(t,e){var i=n.gradFunc(t,e),a=Array.isArray(i)?i:[i];b(a.length===r.length,function(){return"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns the same number of tensors as inputs passed to f(...)."}),b(a.every(function(t){return t instanceof ht}),function(){return"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns a list of only tensors."});var o={};return a.forEach(function(t,e){o[e]=function(){return t}}),o})}},t.prototype.write=function(t,e){var n=this.tensorInfo.get(t);if("string"===n.dtype){var r=Y(e);this.numBytes+=r-n.bytes,n.bytes=r}this.backend!==n.backend&&(n.backend.disposeData(t),n.backend=this.backend,this.backend.register(t,n.shape,n.dtype)),this.backend.write(t,e)},t.prototype.readSync=function(t){return this.tensorInfo.get(t).backend.readSync(t)},t.prototype.read=function(t){return this.tensorInfo.get(t).backend.read(t)},t.prototype.fromPixels=function(t,e){return this.backend.fromPixels(t,e)},t.prototype.time=function(t){return u(this,void 0,void 0,function(){var e,n;return l(this,function(r){switch(r.label){case 0:return e=Z(),[4,this.backend.time(t)];case 1:return(n=r.sent()).wallMs=Z()-e,[2,n]}})})},t.prototype.track=function(t){if(1===this.scopeStack.length&&this.safeMode)throw new Error("Safe mode is ON. Enclose all tensor operations inside tf.tidy(): tf.tidy(() => {op();...}); to avoid memory leaks.");return null!=this.activeScope&&(t.scopeId=this.activeScope.id,this.activeScope.track.push(t)),t},t.nextTensorId=0,t.nextVariableId=0,t}();!function(t){t[t.NUMBER=0]="NUMBER",t[t.BOOLEAN=1]="BOOLEAN",t[t.STRING=2]="STRING"}(It||(It={}));var Tt,Dt,Rt=[{name:"DEBUG",type:It.BOOLEAN},{name:"IS_BROWSER",type:It.BOOLEAN},{name:"WEBGL_LAZILY_UNPACK",type:It.BOOLEAN},{name:"WEBGL_CPU_FORWARD",type:It.BOOLEAN},{name:"WEBGL_PACK",type:It.BOOLEAN},{name:"WEBGL_PACK_BATCHNORMALIZATION",type:It.BOOLEAN},{name:"WEBGL_PACK_CLIP",type:It.BOOLEAN},{name:"WEBGL_PACK_DEPTHWISECONV",type:It.BOOLEAN},{name:"WEBGL_PACK_BINARY_OPERATIONS",type:It.BOOLEAN},{name:"WEBGL_PACK_ARRAY_OPERATIONS",type:It.BOOLEAN},{name:"WEBGL_PACK_IMAGE_OPERATIONS",type:It.BOOLEAN},{name:"WEBGL_PACK_REDUCE",type:It.BOOLEAN},{name:"WEBGL_CONV_IM2COL",type:It.BOOLEAN},{name:"WEBGL_MAX_TEXTURE_SIZE",type:It.NUMBER},{name:"WEBGL_NUM_MB_BEFORE_PAGING",type:It.NUMBER},{name:"WEBGL_MAX_TEXTURES_IN_SHADER",type:It.NUMBER},{name:"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION",type:It.NUMBER},{name:"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE",type:It.BOOLEAN},{name:"WEBGL_VERSION",type:It.NUMBER},{name:"WEBGL_RENDER_FLOAT32_ENABLED",type:It.BOOLEAN},{name:"WEBGL_DOWNLOAD_FLOAT_ENABLED",type:It.BOOLEAN},{name:"WEBGL_FENCE_API_ENABLED",type:It.BOOLEAN},{name:"WEBGL_SIZE_UPLOAD_UNIFORM",type:It.NUMBER},{name:"BACKEND",type:It.STRING},{name:"EPSILON",type:It.NUMBER},{name:"PROD",type:It.BOOLEAN},{name:"TENSORLIKE_CHECK_SHAPE_CONSISTENCY",type:It.BOOLEAN},{name:"DEPRECATION_WARNINGS_ENABLED",type:It.BOOLEAN}];function Pt(t){try{if(null!=h(t))return!0}catch(t){return!1}return!1}var Ot="tfjsflags";function Lt(){var t={};if("undefined"==typeof window||void 0===window.location||void 0===window.location.search)return t;var e=function(t){var e={};return t.replace(/[?&]([^=?&]+)(?:=([^&]*))?/g,function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return function(t,e,n){t[decodeURIComponent(e)]=decodeURIComponent(n||"")}(e,n[0],n[1]),n.join("=")}),e}(window.location.search);if(Ot in e){var n={};e[Ot].split(",").forEach(function(t){var e=t.split(":"),r=e[0],i=e[1];n[r]=i}),Rt.forEach(function(e){e.name in n&&(console.log("Setting feature override from URL "+e.name+": "+n[e.name]),e.type===It.NUMBER?t[e.name]=+n[e.name]:e.type===It.BOOLEAN?t[e.name]="true"===n[e.name]:e.type===It.STRING?t[e.name]=n[e.name]:console.warn("Unknown URL param: "+e.name+"."))})}return t}function At(t,e){return null!=t.getExtension(e)}function Nt(t,e){var n=t.createFramebuffer(),r=t.createTexture();t.bindTexture(t.TEXTURE_2D,r);var i=2===e?t.RGBA32F:t.RGBA;t.texImage2D(t.TEXTURE_2D,0,i,1,1,0,t.RGBA,t.FLOAT,null),t.bindFramebuffer(t.FRAMEBUFFER,n),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,r,0);var a=t.checkFramebufferStatus(t.FRAMEBUFFER)===t.FRAMEBUFFER_COMPLETE;return t.bindTexture(t.TEXTURE_2D,null),t.bindFramebuffer(t.FRAMEBUFFER,null),t.deleteTexture(r),t.deleteFramebuffer(n),a}var Bt=600;var jt,Ft=function(){function e(t){this.features={},this.registry={},this.registryFactory={},null!=t&&(this.features=t),this.get("DEBUG")&&console.warn("Debugging mode is ON. The output of every math call will be downloaded to CPU and checked for NaNs. This significantly impacts performance.")}return e.setBackend=function(t,e){if(void 0===e&&(e=!1),!(t in zt.registry))throw new Error("Backend name '"+t+"' not found in registry");zt.engine.backend=zt.findBackend(t),zt.backendName=t},e.getBackend=function(){return zt.initEngine(),zt.backendName},e.disposeVariables=function(){zt.engine.disposeVariables()},e.memory=function(){return zt.engine.memory()},e.profile=function(t){return zt.engine.profile(t)},e.tidy=function(t,e){return zt.engine.tidy(t,e)},e.dispose=function(t){St(t).forEach(function(t){return t.dispose()})},e.keep=function(t){return zt.engine.keep(t)},e.time=function(t){return zt.engine.time(t)},e.prototype.get=function(t){return t in this.features?this.features[t]:(this.features[t]=this.evaluateFeature(t),this.features[t])},e.prototype.getFeatures=function(){return this.features},e.prototype.set=function(t,e){this.features[t]=e},e.prototype.getBestBackendName=function(){var t=this;if(0===Object.keys(this.registry).length)throw new Error("No backend found in registry.");return Object.keys(this.registry).map(function(e){return{name:e,entry:t.registry[e]}}).sort(function(t,e){return e.entry.priority-t.entry.priority})[0].name},e.prototype.evaluateFeature=function(e){if("DEBUG"===e)return!1;if("IS_BROWSER"===e)return"undefined"!=typeof window;if("IS_NODE"===e)return void 0!==t&&void 0!==t.versions&&void 0!==t.versions.node;if("IS_CHROME"===e)return"undefined"!=typeof navigator&&null!=navigator&&null!=navigator.userAgent&&/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor);if("WEBGL_CPU_FORWARD"===e)return!0;if("WEBGL_PACK"===e)return 0!==this.get("WEBGL_VERSION");if("WEBGL_PACK_BATCHNORMALIZATION"===e)return this.get("WEBGL_PACK");if("WEBGL_PACK_CLIP"===e)return this.get("WEBGL_PACK");if("WEBGL_PACK_DEPTHWISECONV"===e)return this.get("WEBGL_PACK");if("WEBGL_PACK_BINARY_OPERATIONS"===e)return this.get("WEBGL_PACK");if("WEBGL_PACK_ARRAY_OPERATIONS"===e)return this.get("WEBGL_PACK");if("WEBGL_PACK_IMAGE_OPERATIONS"===e)return this.get("WEBGL_PACK");if("WEBGL_PACK_REDUCE"===e)return this.get("WEBGL_PACK");if("WEBGL_LAZILY_UNPACK"===e)return this.get("WEBGL_PACK");if("WEBGL_CONV_IM2COL"===e)return this.get("WEBGL_PACK");if("WEBGL_NUM_MB_BEFORE_PAGING"===e)return this.get("PROD")||!this.get("IS_BROWSER")?Number.POSITIVE_INFINITY:window.screen.height*window.screen.width*window.devicePixelRatio*Bt/1024;if("WEBGL_MAX_TEXTURE_SIZE"===e)return function(t){if(null==Tt){var e=h(t);Tt=e.getParameter(e.MAX_TEXTURE_SIZE)}return Tt}(this.get("WEBGL_VERSION"));if("WEBGL_MAX_TEXTURES_IN_SHADER"===e)return function(t){if(null==Dt){var e=h(t);Dt=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)}return Math.min(16,Dt)}(this.get("WEBGL_VERSION"));if("IS_TEST"===e)return!1;if("BACKEND"===e)return this.getBestBackendName();if("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"===e){var n=this.get("WEBGL_VERSION");return 0===n?0:function(t){if(0===t)return 0;var e=h(t);return At(e,"EXT_disjoint_timer_query_webgl2")&&2===t?2:At(e,"EXT_disjoint_timer_query")?1:0}(n)}if("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE"===e)return this.get("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0&&!function(){var t=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))}();if("HAS_WEBGL"===e)return this.get("WEBGL_VERSION")>0;if("WEBGL_VERSION"===e)return Pt(2)?2:Pt(1)?1:0;if("WEBGL_RENDER_FLOAT32_ENABLED"===e)return function(t){if(0===t)return!1;var e=h(t);if(1===t){if(!At(e,"OES_texture_float"))return!1}else if(!At(e,"EXT_color_buffer_float"))return!1;return Nt(e,t)}(this.get("WEBGL_VERSION"));if("WEBGL_DOWNLOAD_FLOAT_ENABLED"===e)return function(t){if(0===t)return!1;var e=h(t);if(1===t){if(!At(e,"OES_texture_float"))return!1;if(!At(e,"WEBGL_color_buffer_float"))return!1}else if(!At(e,"EXT_color_buffer_float"))return!1;return Nt(e,t)}(this.get("WEBGL_VERSION"));if("WEBGL_FENCE_API_ENABLED"===e)return function(t){return 2===t&&null!=h(t).fenceSync}(this.get("WEBGL_VERSION"));if("WEBGL_SIZE_UPLOAD_UNIFORM"===e)return this.get("WEBGL_RENDER_FLOAT32_ENABLED")?4:0;if("TEST_EPSILON"===e)return 32===this.backend.floatPrecision()?.001:.1;if("EPSILON"===e)return 32===this.backend.floatPrecision()?1e-7:1e-4;if("PROD"===e)return!1;if("TENSORLIKE_CHECK_SHAPE_CONSISTENCY"===e)return!this.get("PROD");if("DEPRECATION_WARNINGS_ENABLED"===e)return!0;throw new Error("Unknown feature "+e+".")},e.prototype.setFeatures=function(t){this.features=Object.assign({},t)},e.prototype.reset=function(){this.features=Lt(),null!=this.globalEngine&&(this.globalEngine=null)},Object.defineProperty(e.prototype,"backend",{get:function(){return this.engine.backend},enumerable:!0,configurable:!0}),e.prototype.findBackend=function(t){return t in this.registry?this.registry[t].backend:null},e.prototype.findBackendFactory=function(t){return t in this.registryFactory?this.registryFactory[t]:null},e.prototype.registerBackend=function(t,e,n){var r=this;if(void 0===n&&(n=1),t in this.registry)return console.warn(t+" backend was already registered. Reusing existing backend"),!1;try{var i=e();return i.setDataMover({moveData:function(t){return r.engine.moveData(t)}}),this.registry[t]={backend:i,priority:n},this.registryFactory[t]=e,!0}catch(e){return console.warn("Registration of backend "+t+" failed"),console.warn(e.stack||e.message),!1}},e.prototype.removeBackend=function(t){if(!(t in this.registry))throw new Error(t+" backend not found in registry");this.registry[t].backend.dispose(),delete this.registry[t]},Object.defineProperty(e.prototype,"engine",{get:function(){return this.initEngine(),this.globalEngine},enumerable:!0,configurable:!0}),e.prototype.initEngine=function(){var t=this;if(null==this.globalEngine){this.backendName=this.get("BACKEND");var e=this.findBackend(this.backendName);this.globalEngine=new Mt(e,!1,function(){return t.get("DEBUG")})}},Object.defineProperty(e.prototype,"global",{get:function(){return Yt()},enumerable:!0,configurable:!0}),e}();function Yt(){if(null==jt){var e=void 0;if("undefined"!=typeof window)e=window;else if(void 0!==r)e=r;else{if(void 0===t)throw new Error("Could not find a global object");e=t}jt=e}return jt}function $t(t){zt.get("DEPRECATION_WARNINGS_ENABLED")&&console.warn(t+" You can disable deprecation warnings with tf.disableDeprecationWarnings().")}!function(t){ft=t}($t);var zt=function(){var t=Yt();return null==t.ENV&&(t.ENV=new Ft(Lt())),function(t){lt=t}(function(){return t.ENV.engine}),t.ENV}();Object.freeze({EPSILON_FLOAT16:1e-4,EPSILON_FLOAT32:1e-7,Environment:Ft,enableProdMode:function(){zt.set("PROD",!0)},enableDebugMode:function(){zt.set("DEBUG",!0)},disableDeprecationWarnings:function(){zt.set("DEPRECATION_WARNINGS_ENABLED",!1),console.warn("TensorFlow.js deprecation warnings have been disabled.")},deprecationWarn:$t,ENV:zt});function Vt(t){var e=t;if(j(t))return[t.length];if(!Array.isArray(t))return[];for(var n=[];Array.isArray(e)||j(e);)n.push(e.length),e=e[0];return Array.isArray(t)&&zt.get("TENSORLIKE_CHECK_SHAPE_CONSISTENCY")&&function t(e,n,r){if(r=r||[],Array.isArray(e)||j(e)){b(n.length>0,function(){return"Element arr["+r.join("][")+"] should be a primitive, but is an array of "+e.length+" elements"}),b(e.length===n[0],function(){return"Element arr["+r.join("][")+"] should have "+n[0]+" elements, but has "+e.length+" elements"});for(var i=n.slice(1),a=0;a<e.length;++a)t(e[a],i,r.concat(a))}else b(0===n.length,function(){return"Element arr["+r.join("][")+"] is a primitive, but should be an array/TypedArray of "+n[0]+" elements"})}(t,n,[]),n}function Ht(t,e,n,r){if(null!=t&&("numeric"!==t&&t!==e||"numeric"===t&&"string"===e))throw new Error("Argument '"+n+"' passed to '"+r+"' must be "+t+" tensor, but got "+e+" tensor")}function qt(t,e,n,r){if(void 0===r&&(r="numeric"),t instanceof ht)return Ht(r,t.dtype,e,n),t;var i=H(t);if("string"!==i&&["bool","int32","float32"].indexOf(r)>=0&&(i=r),Ht(r,i,e,n),null==t||!j(t)&&!Array.isArray(t)&&"number"!=typeof t&&"boolean"!=typeof t&&"string"!=typeof t){var a=null==t?"null":t.constructor.name;throw new Error("Argument '"+e+"' passed to '"+n+"' must be a Tensor or TensorLike, but got '"+a+"'")}var o=Vt(t);j(t)||Array.isArray(t)||(t=[t]);var s="string"!==i?G(t,i,zt.get("DEBUG")):w(t);return ht.make(o,{values:s},i)}function Wt(t,e,n,r){if(void 0===r&&(r="numeric"),!Array.isArray(t))throw new Error("Argument "+e+" passed to "+n+" must be a `Tensor[]` or `TensorLike[]`");return t.map(function(t,r){return qt(t,e+"["+r+"]",n)},r)}function Ut(t){return zt.engine.customGrad(t)}var Gt=Ft.tidy,Kt=Ft.keep,Xt=Ft.dispose;Ft.time,Ft.profile;function Jt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];zt.get("IS_TEST")||console.warn.apply(console,t)}function Zt(t,e,n,r){void 0===r&&(r=!0);var i=[];if(r)(i=i.concat(e.slice(0))).push(t[0]/n),i=i.concat(t.slice(1));else{i=i.concat(t[0]);for(var a=e.length,o=0;o<a;++o)i=i.concat([t[o+1]/e[o],e[o]]);i=i.concat(t.slice(a+1))}return i}function Qt(t,e,n){void 0===n&&(n=!0);var r=[];if(n){r.push(e);for(var i=e+1;i<t;++i)i<=2*e?(r.push(i),r.push(i-(e+1))):r.push(i)}else{var a=[],o=[];for(i=1;i<t;++i)i>=2*e+1||i%2==1?o.push(i):a.push(i);r.push.apply(r,a),r.push(0),r.push.apply(r,o)}return r}function te(t,e,n,r){void 0===r&&(r=!0);var i=[];r?i.push(t[0]/n):i.push(t[0]*n);for(var a=1;a<t.length;++a)a<=e.length?r?i.push(e[a-1]*t[a]):i.push(t[a]/e[a-1]):i.push(t[a]);return i}function ee(t,e){for(var n=[0],r=0;r<e;++r)n.push(t[r][0]);return n}function ne(t,e,n){for(var r=t.slice(0,1),i=0;i<n;++i)r.push(t[i+1]-e[i][0]-e[i][1]);return r}function re(t,e){for(var n=0;n<t.length;++n)if(t[t.length-n-1]!==e-1-n)return!1;return!0}function ie(t,e){for(var n=[],r=t.length,i=0;i<r;i++)-1===e.indexOf(i)&&n.push(t[i]);return[n,e.map(function(e){return t[e]})]}function ae(t,e){return function(t,e,n){for(var r=t.length+e.length,i=[],a=0,o=0,s=0;s<r;s++)-1===n.indexOf(s)?i.push(t[a++]):i.push(e[o++]);return i}(t,e.map(function(t){return 1}),e)}function oe(t,e,n){b(re(e,n),function(){return t+" supports only inner-most axes for now. Got axes "+e+" and rank-"+n+" input."})}function se(t,e){if(re(t,e))return null;for(var n=[],r=0;r<e;++r)-1===t.indexOf(r)&&n.push(r);return t.forEach(function(t){return n.push(t)}),n}function ce(t){return t.map(function(t,e){return[e,t]}).sort(function(t,e){return t[1]-e[1]}).map(function(t){return t[0]})}function ue(t,e){for(var n=[],r=e-t;r<e;++r)n.push(r);return n}function le(t,e){for(var n=t[0].slice(),r=1;r<t.length;r++)n[e]+=t[r][e];return n}function de(t,e){if(t.rank<1)throw new Error("tf.gatherND() expects the input to be rank 1 or higher, but the rank was "+t.rank+".");if(e.rank<1)throw new Error("tf.gatherND() expects the indices to be rank 1 or higher, but the rank was "+e.rank+".");if("int32"!==e.dtype)throw new Error("tf.gatherND() expects the indices to be int32 type, but the dtype was "+e.dtype+".");if(e.shape[e.rank-1]>t.rank)throw new Error("index innermost dimension length must be <= tensor rank; saw: "+e.shape[e.rank-1]+" vs. "+t.rank);if(0===t.size)throw new Error("Requested more than 0 entries, but input is empty. Input shape: "+t.shape+".");for(var n=e.shape,r=n[n.length-1],i=1,a=0;a<n.length-1;++a)i*=n[a];var o=t.shape,s=n.slice();s.pop();var c=1;for(a=r;a<t.rank;++a)c*=o[a],s.push(o[a]);var u=U(t.shape).map(function(t){return t/c}).concat([1]).slice(0,r);return[s,i,c,u]}var fe=30;function he(t){return t<=fe?t:W(t,Math.floor(Math.sqrt(t)))}function pe(t,e,n){if(e.rank<1)throw new Error("tf.scatterND() expects the indices to be rank 1 or higher, but the rank was "+e.rank+".");if(t.rank<1)throw new Error("tf.scatterND() expects the updates to be rank 1 or higher, but the rank was "+t.rank+".");if("int32"!==e.dtype)throw new Error("The dtype of 'indices' should be int32, but got dtype: "+e.dtype);if(n.length<1)throw new Error("Output rank must be greater or equal to 1, but got shape: "+n);if(0===n.length){if(0===e.size)throw new Error("Indices specified for empty output. indices shape: "+e.shape);if(0===t.size)throw new Error("Updates specified for empty output. updates shape: "+t.shape)}!function(t,e,n){var r=e.rank>1?e.shape[e.rank-1]:1,i=e.rank>1?e.rank-1:1,a="Must have updates.shape = indices.shape[:batchDim] + shape[sliceDim:], got updates.shape: "+n.shape+", indices.shape: "+e.shape+", shape: "+t+", sliceDim: "+r+", and batchDim: "+i+".";if(n.rank<i)throw new Error(a+" update.rank < "+i+". ");if(t.length<r+(n.rank-i))throw new Error(a+" Output shape length < "+(r+(n.rank-i)));if(n.rank!==i+t.length-r)throw new Error(a+" update.rank != "+(i+t.length-r));for(var o=0;o<i;++o)if(n.shape[o]!==e.shape[o])throw new Error(a+" updates.shape["+o+"] ("+n.shape[o]+") != indices.shape["+o+"] ("+e.shape[o]+").");for(o=0;o<n.rank-i;++o)if(n.shape[o+i]!==t[o+r])throw new Error(a+" updates.shape["+(o+i)+"] ("+n.shape[o+i]+") != shape["+(o+i)+"] ("+t[o+i]+")")}(n,e,t)}function me(t,e,n){for(var r=e.rank>1?e.shape[e.rank-1]:1,i=n.length,a=1,o=r;o<i;++o)a*=n[o];var s=r<1?1:r;return{sliceRank:r,numUpdates:e.size/s,sliceSize:a,strides:U(n.slice(0,r)).concat([1]),outputSize:k(n)}}function ve(t,e,n,r,i,a,o,s,c){if(void 0===i&&(i=0),void 0===a&&(a=0),void 0===o&&(o=0),void 0===s&&(s=0),void 0===c&&(c=0),0!==o)throw new Error("ellipsis mask is not yet supported");if(0!==s)throw new Error("new axis mask is not yet supported");for(var u=[],l=[],d=[],f=0;f<t.length;f++)u[f]=_e(i,e,r,t,f),l[f]=ge(a,n,r,t,f),c&1<<f&&(l[f]=u[f]+1,d.push(f));var h=new Array(t.length).fill(0);return h=h.map(function(t,e){for(var n=0,i=r[e]||1,a=u[e];!(i>0?a>=l[e]:a<=l[e]);a+=i)n+=1;return n}),[u,h,d]}function _e(t,e,n,r,i){var a=e[i],o=n[i]||1;(t&1<<i||null==a)&&(a=o>0?Number.MIN_SAFE_INTEGER:Number.MAX_SAFE_INTEGER);var s=r[i];return a<0&&(a+=s),m(0,a,s-1)}function ge(t,e,n,r,i){var a=e[i],o=n[i]||1;(t&1<<i||null==a)&&(a=o>0?Number.MAX_SAFE_INTEGER:Number.MIN_SAFE_INTEGER);var s=r[i];return a<0&&(a+=s),o>0?m(0,a,s):m(-1,a,s-1)}function be(t,e,n){for(var r=n.length,i=0;i<n.length;i++)if(n[i]>1){r=i;break}for(i=r+1;i<n.length;i++)if(e[i]>0||n[i]!==t[i])return!1;return!0}function ye(t,e){for(var n=t.length>0?t[t.length-1]:1,r=0;r<t.length-1;r++)n+=t[r]*e[r];return n}function xe(t){var e=Object.keys(t);if(1!==e.length)throw new Error("Please provide an object with a single key (operation name) mapping to a function. Got an object with "+e.length+" keys.");var n=e[0],r=t[n];n.endsWith("_")&&(n=n.substring(0,n.length-1));var i=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];zt.engine.startScope(n);try{var i=r.apply(void 0,t);return i instanceof Promise&&console.error("Cannot return a Promise inside of tidy."),zt.engine.endScope(i),i}catch(t){throw zt.engine.endScope(null),t}};return Object.defineProperty(i,"name",{value:n,configurable:!0}),i}var we=xe({softmax_:function(t,e){void 0===e&&(e=-1);var n=qt(t,"logits","softmax");if(-1===e&&(e=n.rank-1),e!==n.rank-1)throw Error("Softmax along a non-last dimension is not yet supported. Logits was rank "+n.rank+" and dim was "+e);return Ut(function(t,n){var r=t.logSumExp([e],!0),i=t.toFloat().sub(r).exp();return n([i]),{value:i,gradFunc:function(t,n){var r=n[0],i=t.mul(r);return i.sub(i.sum([e],!0).mul(r))}}})(n)}}),ke=xe({logSoftmax_:function(t,e){void 0===e&&(e=-1);var n=qt(t,"logits","logSoftmax");if(-1===e&&(e=n.rank-1),e!==n.rank-1)throw Error("Log Softmax along a non-last dimension is not yet supported. Logits was rank "+n.rank+" and axis was "+e);return Ut(function(t,n){var r=t.max(e,!0),i=t.sub(r),a=i.toFloat().sub(i.exp().sum(e,!0).log());return n([a]),{value:a,gradFunc:function(t,n){var r=n[0].exp();return t.sub(t.sum(e,!0).mul(r))}}})(n)}});var Ce=xe({complex_:function(t,e){var n=qt(t,"real","complex"),r=qt(e,"imag","complex");return y(n.shape,r.shape,"real and imag shapes, "+n.shape+" and "+r.shape+", must match in call to tf.complex()."),zt.engine.runKernel(function(t){return t.complex(n,r)},{$real:n,$imag:r})}}),Ee=xe({real_:function(t){var e=qt(t,"input","real");return zt.engine.runKernel(function(t){return t.real(e)},{$input:e})}}),Se=xe({imag_:function(t){var e=qt(t,"input","imag");return zt.engine.runKernel(function(t){return t.imag(e)},{$input:e})}});function Ie(t,e,n){if(null==n&&(n=H(t)),"complex64"===n)throw new Error("Cannot construct a complex64 tensor directly. Please use tf.complex(real, imag).");if(!j(t)&&!Array.isArray(t)&&"number"!=typeof t&&"boolean"!=typeof t&&"string"!=typeof t)throw new Error("values passed to tensor(values) must be a number/boolean/string or an array of numbers/booleans/strings, or a TypedArray");var r=Vt(t);if(null!=e){Q(e);var i=k(e),a=k(r);b(i===a,function(){return"Based on the provided shape, ["+e+"], the tensor should have "+i+" values but has "+a});for(var o=0;o<r.length;++o){var s=r[o],c=o!==r.length-1||s!==k(e.slice(o));b(r[o]===e[o]||!c,function(){return"Error creating a new Tensor. Inferred shape ("+r+") does not match the provided shape ("+e+"). "})}}return j(t)||Array.isArray(t)||(t=[t]),e=e||r,t="string"!==n?G(t,n,zt.get("DEBUG")):w(t),ht.make(e,{values:t},n)}function Me(t,e){if((j(t)||Array.isArray(t))&&"complex64"!==e)throw new Error("Error creating a new Scalar: value must be a primitive (number|boolean|string)");return Ie(t,[],e)}function Te(t,e){x(t);var n=Vt(t);if(1!==n.length)throw new Error("tensor1d() requires values to be a flat/TypedArray");return Ie(t,n,e)}function De(t,e,n){if(x(t),null!=e&&2!==e.length)throw new Error("tensor2d() requires shape to have two numbers");var r=Vt(t);if(2!==r.length&&1!==r.length)throw new Error("tensor2d() requires values to be number[][] or flat/TypedArray");if(1===r.length&&null==e)throw new Error("tensor2d() requires shape to be provided when `values` are a flat/TypedArray");return Ie(t,e=e||r,n)}function Re(t,e,n){if(x(t),null!=e&&3!==e.length)throw new Error("tensor3d() requires shape to have three numbers");var r=Vt(t);if(3!==r.length&&1!==r.length)throw new Error("tensor3d() requires values to be number[][][] or flat/TypedArray");if(1===r.length&&null==e)throw new Error("tensor3d() requires shape to be provided when `values` are a flat array");return Ie(t,e=e||r,n)}function Pe(t,e,n){if(x(t),null!=e&&4!==e.length)throw new Error("tensor4d() requires shape to have four numbers");var r=Vt(t);if(4!==r.length&&1!==r.length)throw new Error("tensor4d() requires values to be number[][][][] or flat/TypedArray");if(1===r.length&&null==e)throw new Error("tensor4d() requires shape to be provided when `values` are a flat array");return Ie(t,e=e||r,n)}function Oe(t,e){if(void 0===e&&(e="float32"),"complex64"===e){var n=Oe(t,"float32"),r=Oe(t,"float32");return Ce(n,r)}var i=X(k(t),e);return ht.make(t,{values:i},e)}function Le(t,e){if(void 0===e&&(e="float32"),"complex64"===e){var n=Le(t,"float32"),r=Le(t,"float32");return Ce(n,r)}var i=J(k(t),e);return ht.make(t,{values:i},e)}function Ae(t,e,n){return zt.engine.runKernel(function(r){return r.fill(t,e,n)},{})}function Ne(t,e,n,r){if(void 0===n&&(n=1),void 0===r&&(r="float32"),0===n)throw new Error("Cannot have a step of zero");if(t===e||t<e&&n<0||e<t&&n>1)return Le([0],r);var i=J(Math.abs(Math.ceil((e-t)/n)),r);e<t&&1===n&&(n=-1),i[0]=t;for(var a=1;a<i.length;a++)i[a]=i[a-1]+n;return Te(i,r)}var Be=xe({onesLike_:function(t){var e=qt(t,"x","onesLike");if("complex64"===e.dtype){var n=Be(Ee(e)),r=je(Se(e));return Ce(n,r)}return zt.engine.runKernel(function(t){return t.onesLike(e)},{$x:e},null)}}),je=xe({zerosLike_:function(t){var e=qt(t,"x","zerosLike");return zt.engine.runKernel(function(t){return t.zerosLike(e)},{$x:e},null)}}),Fe=function(){function t(t){this.dataMover=t,this.data=new WeakMap}return t.prototype.get=function(t){return this.data.has(t)||this.dataMover.moveData(t),this.data.get(t)},t.prototype.set=function(t,e){this.data.set(t,e)},t.prototype.has=function(t){return this.data.has(t)},t.prototype.delete=function(t){return this.data.delete(t)},t}();!function(){function t(){}t.prototype.time=function(t){throw new Error("Not yet implemented.")},t.prototype.read=function(t){throw new Error("Not yet implemented.")},t.prototype.readSync=function(t){throw new Error("Not yet implemented.")},t.prototype.disposeData=function(t){throw new Error("Not yet implemented.")},t.prototype.write=function(t,e){throw new Error("Not yet implemented.")},t.prototype.fromPixels=function(t,e){throw new Error("Not yet implemented.")},t.prototype.register=function(t,e,n){throw new Error("Not yet implemented.")},t.prototype.memory=function(){throw new Error("Not yet implemented.")},t.prototype.floatPrecision=function(){throw new Error("Not yet implemented")},t.prototype.batchMatMul=function(t,e,n,r){throw new Error("Not yet implemented")},t.prototype.fusedBatchMatMul=function(t,e,n,r,i,a){throw new Error("Not yet implemented")},t.prototype.slice=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.stridedSlice=function(t,e,n,r,i,a,o,s,c){throw new Error("Not yet implemented")},t.prototype.unstack=function(t,e){throw new Error("Not yet implemented")},t.prototype.reverse=function(t,e){throw new Error("Not yet implemented")},t.prototype.concat=function(t,e){throw new Error("Not yet implemented")},t.prototype.neg=function(t){throw new Error("Not yet implemented")},t.prototype.add=function(t,e){throw new Error("Not yet implemented")},t.prototype.addN=function(t){throw new Error("Not yet implemented")},t.prototype.subtract=function(t,e){throw new Error("Not yet implemented")},t.prototype.multiply=function(t,e){throw new Error("Not yet implemented")},t.prototype.realDivide=function(t,e){throw new Error("Not yet implemented")},t.prototype.floorDiv=function(t,e){throw new Error("Not yet implemented")},t.prototype.sum=function(t,e){throw new Error("Not yet implemented")},t.prototype.prod=function(t,e){throw new Error("Not yet implemented")},t.prototype.unsortedSegmentSum=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.argMin=function(t,e){throw new Error("Not yet implemented")},t.prototype.argMax=function(t,e){throw new Error("Not yet implemented")},t.prototype.equal=function(t,e){throw new Error("Not yet implemented")},t.prototype.notEqual=function(t,e){throw new Error("Not yet implemented")},t.prototype.less=function(t,e){throw new Error("Not yet implemented")},t.prototype.lessEqual=function(t,e){throw new Error("Not yet implemented")},t.prototype.greater=function(t,e){throw new Error("Not yet implemented")},t.prototype.greaterEqual=function(t,e){throw new Error("Not yet implemented")},t.prototype.logicalNot=function(t){throw new Error("Not yet implemented")},t.prototype.logicalAnd=function(t,e){throw new Error("Not yet implemented")},t.prototype.logicalOr=function(t,e){throw new Error("Not yet implemented")},t.prototype.where=function(t){throw new Error("Not yet implemented")},t.prototype.select=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.topk=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.min=function(t,e){throw new Error("Not yet implemented")},t.prototype.minimum=function(t,e){throw new Error("Not yet implemented")},t.prototype.mod=function(t,e){throw new Error("Not yet implemented")},t.prototype.max=function(t,e){throw new Error("Not yet implemented")},t.prototype.maximum=function(t,e){throw new Error("Not yet implemented")},t.prototype.all=function(t,e){throw new Error("Not yet implemented")},t.prototype.any=function(t,e){throw new Error("Not yet implemented")},t.prototype.squaredDifference=function(t,e){throw new Error("Not yet implemented")},t.prototype.ceil=function(t){throw new Error("Not yet implemented")},t.prototype.floor=function(t){throw new Error("Not yet implemented")},t.prototype.round=function(t){throw new Error("Not yet implemented")},t.prototype.sign=function(t){throw new Error("Not yet implemented")},t.prototype.isNaN=function(t){throw new Error("Not yet implemented")},t.prototype.isInf=function(t){throw new Error("Not yet implemented")},t.prototype.isFinite=function(t){throw new Error("Not yet implemented")},t.prototype.pow=function(t,e){throw new Error("Not yet implemented")},t.prototype.exp=function(t){throw new Error("Not yet implemented")},t.prototype.expm1=function(t){throw new Error("Not yet implemented")},t.prototype.log=function(t){throw new Error("Not yet implemented")},t.prototype.log1p=function(t){throw new Error("Not yet implemented")},t.prototype.sqrt=function(t){throw new Error("Not yet implemented")},t.prototype.rsqrt=function(t){throw new Error("Not yet implemented")},t.prototype.square=function(t){throw new Error("Not yet implemented")},t.prototype.reciprocal=function(t){throw new Error("Not yet implemented")},t.prototype.relu=function(t){throw new Error("Not yet implemented")},t.prototype.prelu=function(t,e){throw new Error("Not yet implemented")},t.prototype.elu=function(t){throw new Error("Not yet implemented")},t.prototype.eluDer=function(t,e){throw new Error("Not yet implemented")},t.prototype.selu=function(t){throw new Error("Not yet implemented")},t.prototype.int=function(t){throw new Error("Not yet implemented")},t.prototype.clip=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.abs=function(t){throw new Error("Not yet implemented")},t.prototype.complexAbs=function(t){throw new Error("Not yet implemented")},t.prototype.sigmoid=function(t){throw new Error("Not yet implemented")},t.prototype.softplus=function(t){throw new Error("Not yet implemented")},t.prototype.sin=function(t){throw new Error("Not yet implemented")},t.prototype.cos=function(t){throw new Error("Not yet implemented")},t.prototype.tan=function(t){throw new Error("Not yet implemented")},t.prototype.asin=function(t){throw new Error("Not yet implemented")},t.prototype.acos=function(t){throw new Error("Not yet implemented")},t.prototype.atan=function(t){throw new Error("Not yet implemented")},t.prototype.atan2=function(t,e){throw new Error("Not yet implemented")},t.prototype.sinh=function(t){throw new Error("Not yet implemented")},t.prototype.cosh=function(t){throw new Error("Not yet implemented")},t.prototype.tanh=function(t){throw new Error("Not yet implemented")},t.prototype.asinh=function(t){throw new Error("Not yet implemented")},t.prototype.acosh=function(t){throw new Error("Not yet implemented")},t.prototype.atanh=function(t){throw new Error("Not yet implemented")},t.prototype.erf=function(t){throw new Error("Not yet implemented")},t.prototype.step=function(t,e){throw new Error("Not yet implemented")},t.prototype.conv2d=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.conv2dDerInput=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.conv2dDerFilter=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.depthwiseConv2D=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.depthwiseConv2DDerInput=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.depthwiseConv2DDerFilter=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.conv3d=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.conv3dDerInput=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.conv3dDerFilter=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.maxPool=function(t,e){throw new Error("Not yet implemented")},t.prototype.maxPoolBackprop=function(t,e,n,r){throw new Error("Not yet implemented")},t.prototype.avgPool=function(t,e){throw new Error("Not yet implemented")},t.prototype.avgPoolBackprop=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.reshape=function(t,e){throw new Error("Not yet implemented")},t.prototype.cast=function(t,e){throw new Error("Not yet implemented")},t.prototype.tile=function(t,e){throw new Error("Not yet implemented")},t.prototype.pad=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.transpose=function(t,e){throw new Error("Not yet implemented")},t.prototype.gather=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.gatherND=function(t,e){throw new Error("Not yet implemented")},t.prototype.scatterND=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.batchToSpaceND=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.spaceToBatchND=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.resizeBilinear=function(t,e,n,r){throw new Error("Not yet implemented")},t.prototype.resizeBilinearBackprop=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.resizeNearestNeighbor=function(t,e,n,r){throw new Error("Not yet implemented")},t.prototype.resizeNearestNeighborBackprop=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.batchNormalization=function(t,e,n,r,i,a){throw new Error("Not yet implemented")},t.prototype.localResponseNormalization4D=function(t,e,n,r,i){throw new Error("Not yet implemented")},t.prototype.LRNGrad=function(t,e,n,r,i,a,o){throw new Error("Not yet implemented")},t.prototype.multinomial=function(t,e,n,r){throw new Error("Not yet implemented")},t.prototype.oneHot=function(t,e,n,r){throw new Error("Not yet implemented")},t.prototype.cumsum=function(t,e,n,r){throw new Error("Not yet implemented")},t.prototype.nonMaxSuppression=function(t,e,n,r,i){throw new Error("Not yet implemented")},t.prototype.fft=function(t){throw new Error("Not yet implemented")},t.prototype.ifft=function(t){throw new Error("Not yet implemented")},t.prototype.complex=function(t,e){throw new Error("Not yet implemented")},t.prototype.real=function(t){throw new Error("Not yet implemented")},t.prototype.imag=function(t){throw new Error("Not yet implemented")},t.prototype.cropAndResize=function(t,e,n,r,i,a){throw new Error("Not yet implemented")},t.prototype.depthToSpace=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.split=function(t,e,n){throw new Error("Not yet implemented")},t.prototype.sparseToDense=function(t,e,n,r){throw new Error("Not yet implemented")},t.prototype.fill=function(t,e,n){throw new Error("Not yet implemented.")},t.prototype.onesLike=function(t){throw new Error("Not yet implemented")},t.prototype.zerosLike=function(t){throw new Error("Not yet implemented")},t.prototype.setDataMover=function(t){throw new Error("Not yet implemented")},t.prototype.dispose=function(){throw new Error("Not yet implemented")}}();function Ye(t,e,n){if("complex64"===e){if("complex64"===t.dtype)return t.clone();var r=Le(t.shape),i=t.toFloat(),a=n.complex(i,r);return r.dispose(),i.dispose(),a}if(!B(t.dtype,e))return ht.make(t.shape,{dataId:t.dataId},e);if("complex64"===t.dtype){var o=n.real(t);return a=o.cast(e),o.dispose(),a}if("int32"===e)return n.int(t);if("bool"===e){var s=Me(0,t.dtype);return a=n.notEqual(t,s),s.dispose(),a}throw new Error("Error in Cast: unknown dtype argument ("+e+")")}function $e(t,e){return ht.make(e,{dataId:t.dataId},t.dtype)}function ze(t,e){if(t.length!==e.length)throw new Error("Cannot merge real and imag arrays of different lengths. real:"+t.length+", imag: "+e.length+".");for(var n=new Float32Array(2*t.length),r=0;r<n.length;r+=2)n[r]=t[r/2],n[r+1]=e[r/2];return n}function Ve(t,e){return{real:t[2*e],imag:t[2*e+1]}}function He(t,e,n,r){t[2*r]=e,t[2*r+1]=n}function qe(t,e,n){var r=(n?2:-2)*Math.PI*(t/e);return{real:Math.cos(r),imag:Math.sin(r)}}function We(t,e,n,r,i){for(var a=Array.from(e).map(function(t,e){return{score:t,boxIndex:e}}).filter(function(t){return t.score>i}).sort(function(t,e){return e.score-t.score}),o=[],s=0;s<a.length;s++){var c=a[s],u=c.score,l=c.boxIndex;if(u<i)break;for(var d=!1,f=o.length-1;f>=0;--f)if(Ue(t,l,o[f])>=r){d=!0;break}if(!d&&(o.push(l),o.length>=n))break}return Te(o,"int32")}function Ue(t,e,n){var r=t.subarray(4*e,4*e+4),i=t.subarray(4*n,4*n+4),a=Math.min(r[0],r[2]),o=Math.min(r[1],r[3]),s=Math.max(r[0],r[2]),c=Math.max(r[1],r[3]),u=Math.min(i[0],i[2]),l=Math.min(i[1],i[3]),d=Math.max(i[0],i[2]),f=Math.max(i[1],i[3]),h=(s-a)*(c-o),p=(d-u)*(f-l);if(h<=0||p<=0)return 0;var m=Math.max(a,u),v=Math.max(o,l),_=Math.min(s,d),g=Math.min(c,f),b=Math.max(_-m,0)*Math.max(g-v,0);return b/(h+p-b)}function Ge(t,e,n){var r=new Array(t.rank).fill(0),i=t.shape.slice();return e.map(function(e){i[n]=e;var a=t.slice(r,i);return r[n]+=e,a})}function Ke(t,e,n,r,i){for(var a=e[e.length-1],o=[t.length/a,a],s=o[0],c=o[1],u=O(n,s*r),l=O("int32",s*r),d=0;d<s;d++){for(var f=d*c,h=t.subarray(f,f+c),p=[],m=0;m<h.length;m++)p.push({value:h[m],index:m});p.sort(function(t,e){return e.value-t.value});var v=d*r,_=u.subarray(v,v+r),g=l.subarray(v,v+r);for(m=0;m<r;m++)_[m]=p[m].value,g[m]=p[m].index}var b=e.slice();return b[b.length-1]=r,[Ie(u,b,n),Ie(l,b,"int32")]}var Xe=function(t,e,n){this.variableNames=["A"];var r=t.windowSize,i=t.batchSize,a=t.inSize,o=Math.ceil(a/r);n||this.variableNames.push("bestIndicesA"),this.outputShape=[i,o];var s="max"===e?">":"<",c=n?"inOffset + i;":"round(getBestIndicesA(batch, inOffset + i));";this.userCode="\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = outIdx * "+r+";\n\n int bestIndex = inOffset;\n float bestValue = getA(batch, bestIndex);\n\n for (int i = 0; i < "+r+"; i++) {\n int inIdx = "+c+";\n float candidate = getA(batch, inIdx);\n if (candidate "+s+" bestValue) {\n bestValue = candidate;\n bestIndex = inIdx;\n }\n }\n setOutput(float(bestIndex));\n }\n "};function Je(t,e){return["x","y","z","w","u","v"].slice(0,e).map(function(e){return t+"."+e})}function Ze(t,e){return 1===e?[t]:Je(t,e)}function Qe(t,e){for(var n=t.length,r=[],i=0;i<n;i++){var a=n-1-i,o=t[a]||1;(e[e.length-1-i]||1)>1&&1===o&&r.unshift(a)}return r}function tn(t,e){for(var n=[],r=0;r<e.length;r++){var i=t[t.length-r-1],a=e.length-r-1,o=e[a];(null==i||1===i&&o>1)&&n.unshift(a)}return n}function en(t,e){for(var n=[],r=Math.max(t.length,e.length),i=0;i<r;i++){var a=t[t.length-i-1];null==a&&(a=1);var o=e[e.length-i-1];if(null==o&&(o=1),1===a)n.unshift(o);else if(1===o)n.unshift(a);else{if(a!==o)throw Error("Operands could not be broadcast together with shapes "+t+" and "+e+".");n.unshift(a)}}return n}function nn(){var t,e,n,r,i,a,o,s,c,u;return 2===zt.get("WEBGL_VERSION")?(t="#version 300 es",e="in",n="out",r="in",i="texture",a="outputColor",o="out vec4 outputColor;",s="\n const float NAN = uintBitsToFloat(uint(0x7fc00000));\n ",c="\n const float INFINITY = uintBitsToFloat(uint(0x7f800000));\n ",u="\n #define round(value) newRound(value)\n int newRound(float value) {\n return int(floor(value + 0.5));\n }\n\n ivec4 newRound(vec4 value) {\n return ivec4(floor(value + vec4(0.5)));\n }\n "):(t="",e="attribute",n="varying",r="varying",i="texture2D",a="gl_FragColor",o="",s="\n uniform float NAN;\n\n bool isnan(float val) {\n return (val < 1.0 || 0.0 < val || val == 0.0) ? false : true;\n }\n bvec4 isnan(vec4 val) {\n return bvec4(isnan(val.x), isnan(val.y), isnan(val.z), isnan(val.w));\n }\n ",c="\n uniform float INFINITY;\n\n bool isinf(float val) {\n return abs(val) == INFINITY;\n }\n bvec4 isinf(vec4 val) {\n return equal(abs(val), vec4(INFINITY));\n }\n ",u="\n int round(float value) {\n return int(floor(value + 0.5));\n }\n\n ivec4 round(vec4 value) {\n return ivec4(floor(value + vec4(0.5)));\n }\n "),{version:t,attribute:e,varyingVs:n,varyingFs:r,texture2D:i,output:a,defineOutput:o,defineSpecialNaN:s,defineSpecialInf:c,defineRound:u}}function rn(t,e,n){void 0===n&&(n="index");var r=U(e);return r.map(function(e,i){return"int "+t[i]+" = "+n+" / "+e+"; "+(i===r.length-1?"int "+t[i+1]+" = "+n+" - "+t[i]+" * "+e:"index -= "+t[i]+" * "+e)+";"}).join("")}function an(t){return 1===t.length?""+t[0]:"vec"+t.length+"("+t.join(",")+")"}function on(t,e,n,r){var i=[];t.forEach(function(t){var e=k(t.shapeInfo.logicalShape);t.shapeInfo.isUniform?i.push("uniform float "+t.name+(e>1?"["+e+"]":"")+";"):(i.push("uniform sampler2D "+t.name+";"),i.push("uniform int offset"+t.name+";"))});var a,o,s=i.join("\n"),c=t.map(function(t){return function(t,e,n){void 0===n&&(n=!1);var r="";r+=n?cn(t):sn(t);var i=t.shapeInfo.logicalShape,a=e.logicalShape;return i.length<=a.length&&(r+=n?function(t,e){var n,r=t.name,i=r.charAt(0).toUpperCase()+r.slice(1),a="get"+i+"AtOutCoords",o=t.shapeInfo.logicalShape.length,s=e.logicalShape.length,c=Qe(t.shapeInfo.logicalShape,e.logicalShape),u=mn(s),l=s-o,d=["x","y","z","w","u","v"];n=0===o?"":s<2&&c.length>=1?"coords = 0;":c.map(function(t){return"coords."+d[t+l]+" = 0;"}).join("\n");var f="";f=s<2&&o>0?"coords":t.shapeInfo.logicalShape.map(function(t,e){return"coords."+d[e+l]}).join(", ");var h="return outputValue;";if(1===o&&s>1)h="\n return vec4(outputValue.xy, outputValue.xy);\n ";else if(0===o&&s>0)h=1===s?"\n return vec4(outputValue.x, outputValue.x, 0., 0.);\n ":"\n return vec4(outputValue.x);\n ";else if(c.length){var p=o-2,m=o-1;c.indexOf(p)>-1&&c.indexOf(m)>-1?h="return vec4(outputValue.x);":c.indexOf(p)>-1?h="return vec4(outputValue.x, outputValue.y, outputValue.x, outputValue.y);":c.indexOf(m)>-1&&(h="return vec4(outputValue.xx, outputValue.zz);")}return"\n vec4 "+a+"() {\n "+u+" coords = getOutputCoords();\n "+n+"\n vec4 outputValue = get"+i+"("+f+");\n "+h+"\n }\n "}(t,e):function(t,e){var n=t.name,r=n.charAt(0).toUpperCase()+n.slice(1),i="get"+r+"AtOutCoords",a=e.texShape,o=t.shapeInfo.texShape,s=t.shapeInfo.logicalShape.length,c=e.logicalShape.length;if(!t.shapeInfo.isUniform&&s===c&&null==t.shapeInfo.flatOffset&&C(o,a))return"\n float "+i+"() {\n return sampleTexture("+n+", resultUV);\n }\n ";var u=mn(c),l=Qe(t.shapeInfo.logicalShape,e.logicalShape),d=c-s,f=["x","y","z","w","u","v"];return"\n float "+i+"() {\n "+u+" coords = getOutputCoords();\n "+(0===s?"":c<2&&l.length>=1?"coords = 0;":l.map(function(t){return"coords."+f[t+d]+" = 0;"}).join("\n"))+"\n return get"+r+"("+(c<2&&s>0?"coords":t.shapeInfo.logicalShape.map(function(t,e){return"coords."+f[e+d]}).join(", "))+");\n }\n "}(t,e)),r}(t,e,r)}).join("\n"),u=e.texShape,l=nn(),d=function(t){return"\n float sampleTexture(sampler2D textureSampler, vec2 uv) {\n return "+t.texture2D+"(textureSampler, uv).r;\n }\n "}(l),f=function(t){return t.version+"\n precision highp float;\n precision highp int;\n precision highp sampler2D;\n "+t.varyingFs+" vec2 resultUV;\n "+t.defineOutput+"\n const vec2 halfCR = vec2(0.5, 0.5);\n\n struct ivec5\n {\n int x;\n int y;\n int z;\n int w;\n int u;\n };\n\n struct ivec6\n {\n int x;\n int y;\n int z;\n int w;\n int u;\n int v;\n };\n\n "+t.defineSpecialNaN+"\n "+t.defineSpecialInf+"\n "+t.defineRound+"\n\n int imod(int x, int y) {\n return x - y * (x / y);\n }\n\n //Based on the work of Dave Hoskins\n //https://www.shadertoy.com/view/4djSRW\n #define HASHSCALE1 443.8975\n float random(float seed){\n vec2 p = resultUV * seed;\n vec3 p3 = fract(vec3(p.xyx) * HASHSCALE1);\n p3 += dot(p3, p3.yzx + 19.19);\n return fract((p3.x + p3.y) * p3.z);\n }\n\n "+un+"\n "+ln+"\n "+dn+"\n "}(l);return e.isPacked?(a=function(t,e){switch(t.length){case 0:return"\n int getOutputCoords() {\n return 0;\n }\n ";case 1:return function(t,e){var n=[Math.ceil(e[0]/2),Math.ceil(e[1]/2)];return 1===n[0]?"\n int getOutputCoords() {\n return 2 * int(resultUV.x * "+n[1]+".0);\n }\n ":1===n[1]?"\n int getOutputCoords() {\n return 2 * int(resultUV.y * "+n[0]+".0);\n }\n ":"\n int getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+n[0]+", "+n[1]+"));\n return resTexRC.x * "+n[1]+" + resTexRC.y;\n }\n "}(0,e);case 2:return function(t,e){var n=[Math.ceil(e[0]/2),Math.ceil(e[1]/2)];if(C(t,e))return"\n ivec2 getOutputCoords() {\n return 2 * ivec2(resultUV.yx * vec2("+n[0]+", "+n[1]+"));\n }\n ";var r=Math.ceil(t[1]/2);return"\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+n[0]+", "+n[1]+"));\n\n int index = resTexRC.x * "+n[1]+" + resTexRC.y;\n int r = 2 * (index / "+r+");\n int c = imod(index, "+r+") * 2;\n\n return ivec2(r, c);\n }\n "}(t,e);case 3:return function(t,e){var n=[Math.ceil(e[0]/2),Math.ceil(e[1]/2)],r=Math.ceil(t[2]/2),i=r*Math.ceil(t[1]/2);return"\n ivec3 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+n[0]+", "+n[1]+"));\n int index = resTexRC.x * "+n[1]+" + resTexRC.y;\n\n int b = index / "+i+";\n index -= b * "+i+";\n\n int r = 2 * (index / "+r+");\n int c = imod(index, "+r+") * 2;\n\n return ivec3(b, r, c);\n }\n "}(t,e);default:return function(t,e){for(var n=[Math.ceil(e[0]/2),Math.ceil(e[1]/2)],r=Math.ceil(t[t.length-1]/2),i=r*Math.ceil(t[t.length-2]/2),a=i,o="",s="b, r, c",c=2;c<t.length-1;c++)o="\n int b"+c+" = index / "+(a*=t[t.length-c-1])+";\n index -= b"+c+" * "+a+";\n "+o,s="b"+c+", "+s;return"\n ivec"+t.length+" getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+n[0]+", "+n[1]+"));\n int index = resTexRC.x * "+n[1]+" + resTexRC.y;\n\n "+o+"\n\n int b = index / "+i+";\n index -= b * "+i+";\n\n int r = 2 * (index / "+r+");\n int c = imod(index, "+r+") * 2;\n\n return ivec"+t.length+"("+s+");\n }\n "}(t,e)}}(e.logicalShape,u),o=function(t){return"\n void setOutput(vec4 val) {\n "+t.output+" = val;\n }\n "}(l)):(a=function(t,e){switch(t.length){case 0:return"\n int getOutputCoords() {\n return 0;\n }\n ";case 1:return function(t,e){return 1===e[0]?"\n int getOutputCoords() {\n return int(resultUV.x * "+e[1]+".0);\n }\n ":1===e[1]?"\n int getOutputCoords() {\n return int(resultUV.y * "+e[0]+".0);\n }\n ":"\n int getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+e[0]+", "+e[1]+"));\n return resTexRC.x * "+e[1]+" + resTexRC.y;\n }\n "}(0,e);case 2:return function(t,e){return C(t,e)?"\n ivec2 getOutputCoords() {\n return ivec2(resultUV.yx * vec2("+e[0]+", "+e[1]+"));\n }\n ":1===t[1]?"\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+e[0]+", "+e[1]+"));\n int index = resTexRC.x * "+e[1]+" + resTexRC.y;\n return ivec2(index, 0);\n }\n ":1===t[0]?"\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+e[0]+", "+e[1]+"));\n int index = resTexRC.x * "+e[1]+" + resTexRC.y;\n return ivec2(0, index);\n }\n ":"\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+e[0]+", "+e[1]+"));\n int index = resTexRC.x * "+e[1]+" + resTexRC.y;\n int r = index / "+t[1]+";\n int c = index - r * "+t[1]+";\n return ivec2(r, c);\n }\n "}(t,e);case 3:return function(t,e){var n=rn(["r","c","d"],t);return"\n ivec3 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+e[0]+", "+e[1]+"));\n int index = resTexRC.x * "+e[1]+" + resTexRC.y;\n "+n+"\n return ivec3(r, c, d);\n }\n "}(t,e);case 4:return function(t,e){var n=rn(["r","c","d","d2"],t);return"\n ivec4 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+e[0]+", "+e[1]+"));\n int index = resTexRC.x * "+e[1]+" + resTexRC.y;\n "+n+"\n return ivec4(r, c, d, d2);\n }\n "}(t,e);case 5:return function(t,e){var n=rn(["r","c","d","d2","d3"],t);return"\n ivec5 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx * vec2("+e[0]+",\n "+e[1]+"));\n\n int index = resTexRC.x * "+e[1]+" + resTexRC.y;\n\n "+n+"\n\n ivec5 outShape = ivec5(r, c, d, d2, d3);\n return outShape;\n }\n "}(t,e);case 6:return function(t,e){var n=rn(["r","c","d","d2","d3","d4"],t);return"\n ivec6 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2("+e[0]+", "+e[1]+"));\n int index = resTexRC.x * "+e[1]+" + resTexRC.y;\n\n "+n+"\n\n ivec6 result = ivec6(r, c, d, d2, d3, d4);\n return result;\n }\n "}(t,e);default:throw new Error(t.length+"-D output sampling is not yet supported")}}(e.logicalShape,u),o=function(t){return"\n void setOutput(float val) {\n "+t.output+" = vec4(val, 0, 0, 0);\n }\n "}(l)),r&&(f+=fn),[f,d,o,s,a,c,n].join("\n")}function sn(t){var e=t.shapeInfo.logicalShape;switch(e.length){case 0:return function(t){var e=t.name,n="get"+e.charAt(0).toUpperCase()+e.slice(1);if(t.shapeInfo.isUniform)return"float "+n+"() {return "+e+";}";var r=t.shapeInfo.texShape,i=r[0],a=r[1];if(1===i&&1===a)return"\n float "+n+"() {\n return sampleTexture("+e+", halfCR);\n }\n ";var o=t.shapeInfo.texShape;return"\n float "+n+"() {\n vec2 uv = uvFromFlat("+o[0]+", "+o[1]+", "+hn(e)+");\n return sampleTexture("+e+", uv);\n }\n "}(t);case 1:return function(t){var e=t.name,n="get"+e.charAt(0).toUpperCase()+e.slice(1);if(t.shapeInfo.isUniform)return"\n float "+n+"(int index) {\n "+pn(t)+"\n }\n ";var r=t.shapeInfo.texShape,i=r[0],a=r[1];if(1===a&&1===i)return"\n float "+n+"(int index) {\n return sampleTexture("+e+", halfCR);\n }\n ";var o=hn(e);return 1===a?"\n float "+n+"(int index) {\n vec2 uv = vec2(0.5, (float(index + "+o+") + 0.5) / "+i+".0);\n return sampleTexture("+e+", uv);\n }\n ":1===i?"\n float "+n+"(int index) {\n vec2 uv = vec2((float(index + "+o+") + 0.5) / "+a+".0, 0.5);\n return sampleTexture("+e+", uv);\n }\n ":"\n float "+n+"(int index) {\n vec2 uv = uvFromFlat("+i+", "+a+", index + "+o+");\n return sampleTexture("+e+", uv);\n }\n "}(t);case 2:return function(t){var e=t.shapeInfo.logicalShape,n=t.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),i=t.shapeInfo.texShape;if(null!=i&&C(e,i)){var a=i[0];return"\n float "+r+"(int row, int col) {\n vec2 uv = (vec2(col, row) + halfCR) / vec2("+i[1]+".0, "+a+".0);\n return sampleTexture("+n+", uv);\n }\n "}var o=P(e),s=o.newShape,c=o.keptDims,u=s;if(u.length<e.length)return"\n "+sn(vn(t,u))+"\n float "+r+"(int row, int col) {\n return "+r+"("+_n(["row","col"],c)+");\n }\n ";if(t.shapeInfo.isUniform)return"\n float "+r+"(int row, int col) {\n int index = round(dot(vec2(row, col), vec2("+e[1]+", 1)));\n "+pn(t)+"\n }\n ";var l=i[0],d=i[1],f=hn(n);return 1===d?"\n float "+r+"(int row, int col) {\n float index = dot(vec3(row, col, "+f+"), vec3("+e[1]+", 1, 1));\n vec2 uv = vec2(0.5, (index + 0.5) / "+l+".0);\n return sampleTexture("+n+", uv);\n }\n ":1===l?"\n float "+r+"(int row, int col) {\n float index = dot(vec3(row, col, "+f+"), vec3("+e[1]+", 1, 1));\n vec2 uv = vec2((index + 0.5) / "+d+".0, 0.5);\n return sampleTexture("+n+", uv);\n }\n ":"\n float "+r+"(int row, int col) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * "+e[1]+" + col + "+f+";\n vec2 uv = uvFromFlat("+l+", "+d+", index);\n return sampleTexture("+n+", uv);\n }\n"}(t);case 3:return function(t){var e=t.shapeInfo.logicalShape,n=t.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),i=e[1]*e[2],a=e[2],o=P(e),s=o.newShape,c=o.keptDims,u=s;if(u.length<e.length)return"\n "+sn(vn(t,u))+"\n float "+r+"(int row, int col, int depth) {\n return "+r+"("+_n(["row","col","depth"],c)+");\n }\n ";if(t.shapeInfo.isUniform)return"\n float "+r+"(int row, int col, int depth) {\n int index = round(dot(vec3(row, col, depth),\n vec3("+i+", "+a+", 1)));\n "+pn(t)+"\n }\n ";var l=t.shapeInfo.texShape,d=l[0],f=l[1],h=t.shapeInfo.flatOffset;return f===i&&null==h?"\n float "+r+"(int row, int col, int depth) {\n float texR = float(row);\n float texC = dot(vec2(col, depth), vec2("+a+", 1));\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+f+".0, "+d+".0);\n return sampleTexture("+n+", uv);\n }\n ":f===a&&null==h?"\n float "+r+"(int row, int col, int depth) {\n float texR = dot(vec2(row, col), vec2("+e[1]+", 1));\n float texC = float(depth);\n vec2 uv = (vec2(texC, texR) + halfCR) / vec2("+f+".0, "+d+".0);\n return sampleTexture("+n+", uv);\n }\n ":"\n float "+r+"(int row, int col, int depth) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * "+i+" + col * "+a+" + depth + "+hn(n)+";\n vec2 uv = uvFromFlat("+d+", "+f+", index);\n return sampleTexture("+n+", uv);\n }\n "}(t);case 4:return function(t){var e=t.shapeInfo.logicalShape,n=t.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),i=e[3],a=e[2]*i,o=e[1]*a,s=P(e),c=s.newShape,u=s.keptDims;if(c.length<e.length)return"\n "+sn(vn(t,c))+"\n float "+r+"(int row, int col, int depth, int depth2) {\n return "+r+"("+_n(["row","col","depth","depth2"],u)+");\n }\n ";if(t.shapeInfo.isUniform)return"\n float "+r+"(int row, int col, int depth, int depth2) {\n int index = round(dot(vec4(row, col, depth, depth2),\n vec4("+o+", "+a+", "+i+", 1)));\n "+pn(t)+"\n }\n ";var l=t.shapeInfo.flatOffset,d=t.shapeInfo.texShape,f=d[0],h=d[1];return h===o&&null==l?"\n float "+r+"(int row, int col, int depth, int depth2) {\n float texR = float(row);\n float texC =\n dot(vec3(col, depth, depth2),\n vec3("+a+", "+i+", 1));\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+h+".0, "+f+".0);\n return sampleTexture("+n+", uv);\n }\n ":h===i&&null==l?"\n float "+r+"(int row, int col, int depth, int depth2) {\n float texR = dot(vec3(row, col, depth),\n vec3("+e[1]*e[2]+", "+e[2]+", 1));\n float texC = float(depth2);\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+h+".0, "+f+".0);\n return sampleTexture("+n+", uv);\n }\n ":"\n float "+r+"(int row, int col, int depth, int depth2) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * "+o+" + col * "+a+" +\n depth * "+i+" + depth2;\n vec2 uv = uvFromFlat("+f+", "+h+", index + "+hn(n)+");\n return sampleTexture("+n+", uv);\n }\n "}(t);case 5:return function(t){var e=t.shapeInfo.logicalShape,n=t.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),i=e[4],a=e[3]*i,o=e[2]*a,s=e[1]*o,c=P(e),u=c.newShape,l=c.keptDims;if(u.length<e.length)return"\n "+sn(vn(t,u))+"\n float "+r+"(int row, int col, int depth, int depth2, int depth3) {\n return "+r+"("+_n(["row","col","depth","depth2","depth3"],l)+");\n }\n ";if(t.shapeInfo.isUniform)return"\n float "+r+"(int row, int col, int depth, int depth2, int depth3) {\n float index = dot(\n vec4(row, col, depth, depth2),\n vec4("+s+", "+o+", "+a+", "+i+")) +\n depth3;\n "+pn(t)+"\n }\n ";var d=t.shapeInfo.flatOffset,f=t.shapeInfo.texShape,h=f[0],p=f[1];return p===s&&null==d?"\n float "+r+"(int row, int col, int depth, int depth2, int depth3) {\n int texR = row;\n float texC = dot(vec4(col, depth, depth2, depth3),\n vec4("+o+", "+a+", "+i+", 1));\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+p+".0, "+h+".0);\n return sampleTexture("+n+", uv);\n }\n ":p===i&&null==d?"\n float "+r+"(int row, int col, int depth, int depth2, int depth3) {\n float texR = dot(\n vec4(row, col, depth, depth2),\n vec4("+e[1]*e[2]*e[3]+",\n "+e[2]*e[3]+", "+e[3]+", 1));\n int texC = depth3;\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+p+".0, "+h+".0);\n return sampleTexture("+n+", uv);\n }\n ":"\n float "+r+"(int row, int col, int depth, int depth2, int depth3) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * "+s+" + col * "+o+" + depth * "+a+" +\n depth2 * "+i+" + depth3 + "+hn(n)+";\n vec2 uv = uvFromFlat("+h+", "+p+", index);\n return sampleTexture("+n+", uv);\n }\n "}(t);case 6:return function(t){var e=t.shapeInfo.logicalShape,n=t.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),i=P(e),a=i.newShape,o=i.keptDims;if(a.length<e.length)return"\n "+sn(vn(t,a))+"\n float "+r+"(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n return "+r+"("+_n(["row","col","depth","depth2","depth3","depth4"],o)+");\n }\n ";var s=e[5],c=e[4]*s,u=e[3]*c,l=e[2]*u,d=e[1]*l;if(t.shapeInfo.isUniform)return"\n float "+r+"(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n int index = round(dot(\n vec4(row, col, depth, depth2),\n vec4("+d+", "+l+", "+u+", "+c+")) +\n dot(\n vec2(depth3, depth4),\n vec2("+s+", 1)));\n "+pn(t)+"\n }\n ";var f=t.shapeInfo.flatOffset,h=t.shapeInfo.texShape,p=h[0],m=h[1];return m===d&&null==f?"\n float "+r+"(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n int texR = row;\n float texC = dot(vec4(col, depth, depth2, depth3),\n vec4("+l+", "+u+", "+c+", "+s+")) +\n float(depth4);\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+m+".0, "+p+".0);\n return sampleTexture("+n+", uv);\n }\n ":m===s&&null==f?"\n float "+r+"(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n float texR = dot(vec4(row, col, depth, depth2),\n vec4("+e[1]*e[2]*e[3]*e[4]+",\n "+e[2]*e[3]*e[4]+",\n "+e[3]*e[4]+",\n "+e[4]+")) + float(depth3);\n int texC = depth4;\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2("+m+".0, "+p+".0);\n return sampleTexture("+n+", uv);\n }\n ":"\n float "+r+"(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * "+d+" + col * "+l+" + depth * "+u+" +\n depth2 * "+c+" + depth3 * "+s+" + depth4 + "+hn(n)+";\n vec2 uv = uvFromFlat("+p+", "+m+", index);\n return sampleTexture("+n+", uv);\n }\n "}(t);default:throw new Error(e.length+"-D input sampling is not yet supported")}}function cn(t){switch(t.shapeInfo.logicalShape.length){case 0:return function(t){var e=t.name;return"\n vec4 get"+e.charAt(0).toUpperCase()+e.slice(1)+"() {\n return "+nn().texture2D+"("+e+", halfCR);\n }\n "}(t);case 1:return function(t){var e=t.name,n="get"+e.charAt(0).toUpperCase()+e.slice(1),r=t.shapeInfo.texShape,i=[Math.ceil(r[0]/2),Math.ceil(r[1]/2)],a=nn();return"\n vec4 "+n+"(int index) {\n vec2 uv = packedUVfrom1D(\n "+i[0]+", "+i[1]+", index);\n return "+a.texture2D+"("+e+", uv);\n }\n "}(t);case 2:return function(t){var e=t.shapeInfo.logicalShape,n=t.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),i=t.shapeInfo.texShape,a=i[0],o=i[1],s=nn();if(null!=i&&C(e,i))return"\n vec4 "+r+"(int row, int col) {\n vec2 uv = (vec2(col, row) + halfCR) / vec2("+o+".0, "+a+".0);\n\n return "+s.texture2D+"("+n+", uv);\n }\n ";var c=[Math.ceil(i[0]/2),Math.ceil(i[1]/2)];return"\n vec4 "+r+"(int row, int col) {\n vec2 uv = packedUVfrom2D("+Math.ceil(e[1]/2)+", "+c[0]+", "+c[1]+", row, col);\n return "+s.texture2D+"("+n+", uv);\n }\n "}(t);case 3:return function(t){var e=t.shapeInfo.logicalShape,n=t.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),i=t.shapeInfo.texShape,a=[Math.ceil(i[0]/2),Math.ceil(i[1]/2)];if(1===e[0])return"\n "+cn(vn(t,e.slice(1)))+"\n vec4 "+r+"(int b, int row, int col) {\n return "+r+"("+_n(["b","row","col"],[1,2])+");\n }\n ";var o=a[0],s=a[1],c=Math.ceil(e[2]/2);return"\n vec4 "+r+"(int b, int row, int col) {\n vec2 uv = packedUVfrom3D(\n "+o+", "+s+", "+c*Math.ceil(e[1]/2)+", "+c+", b, row, col);\n return "+nn().texture2D+"("+n+", uv);\n }\n "}(t);default:return function(t){for(var e=t.shapeInfo.logicalShape,n=e.length,r=t.name,i="get"+r.charAt(0).toUpperCase()+r.slice(1),a=t.shapeInfo.texShape,o=[Math.ceil(a[0]/2),Math.ceil(a[1]/2)],s=o[0],c=o[1],u=Math.ceil(e[n-1]/2),l=u*Math.ceil(e[n-2]/2),d="int b, int row, int col",f="b * "+l+" + (row / 2) * "+u+" + (col / 2)",h=2;h<n-1;h++)d="int b"+h+", "+d,f="b"+h+" * "+(l*=e[n-h-1])+" + "+f;return"\n vec4 "+i+"("+d+") {\n int index = "+f+";\n int texR = index / "+c+";\n int texC = index - texR * "+c+";\n vec2 uv = (vec2(texC, texR) + halfCR) / vec2("+c+", "+s+");\n return "+nn().texture2D+"("+r+", uv);\n }\n "}(t)}}var un="\nvec2 uvFromFlat(int texNumR, int texNumC, int index) {\n int texR = index / texNumC;\n int texC = index - texR * texNumC;\n return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\nvec2 packedUVfrom1D(int texNumR, int texNumC, int index) {\n int texelIndex = index / 2;\n int texR = texelIndex / texNumC;\n int texC = texelIndex - texR * texNumC;\n return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\n",ln="\nvec2 packedUVfrom2D(int texelsInLogicalRow, int texNumR,\n int texNumC, int row, int col) {\n int texelIndex = (row / 2) * texelsInLogicalRow + (col / 2);\n int texR = texelIndex / texNumC;\n int texC = texelIndex - texR * texNumC;\n return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\n",dn="\nvec2 packedUVfrom3D(int texNumR, int texNumC,\n int texelsInBatch, int texelsInLogicalRow, int b,\n int row, int col) {\n int index = b * texelsInBatch + (row / 2) * texelsInLogicalRow + (col / 2);\n int texR = index / texNumC;\n int texC = index - texR * texNumC;\n return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\n",fn="\n float getChannel(vec4 frag, vec2 innerDims) {\n vec2 modCoord = mod(innerDims, 2.);\n return modCoord.x == 0. ?\n (modCoord.y == 0. ? frag.r : frag.g) :\n (modCoord.y == 0. ? frag.b : frag.a);\n }\n float getChannel(vec4 frag, int dim) {\n float modCoord = mod(float(dim), 2.);\n return modCoord == 0. ? frag.r : frag.g;\n }\n";function hn(t){return"offset"+t}function pn(t){var e=t.name,n=k(t.shapeInfo.logicalShape);return n<2?"return "+e+";":"\n for (int i = 0; i < "+n+"; i++) {\n if (i == index) {\n return "+e+"[i];\n }\n }\n "}function mn(t){if(t<=1)return"int";if(2===t)return"ivec2";if(3===t)return"ivec3";if(4===t)return"ivec4";if(5===t)return"ivec5";if(6===t)return"ivec6";throw Error("GPU for rank "+t+" is not yet supported")}function vn(t,e){var n=JSON.parse(JSON.stringify(t));return n.shapeInfo.logicalShape=e,n}function _n(t,e){return e.map(function(e){return t[e]}).join(", ")}var gn=function(t,e,n,r){this.variableNames=["A"],this.usesPackedTextures=!0,b(t.length>2,function(){return"Packed arg"+(n.charAt(0).toUpperCase()+n.slice(1))+" supports only inputs with rank above 2."});var i=t[t.length-1],a=Math.ceil(i/e);this.outputShape=t.slice(0,-1),a>1&&this.outputShape.push(a),r||this.variableNames.push("bestIndicesA");var o,s,c=this.outputShape,u=c.length,l=mn(u),d=Ze("coords",u);if(1===a){var f=mn(s=u+1);o="\n "+f+" sourceLocR = "+f+"("+d.join()+", 0);\n ++"+d[u-1]+";\n "+f+" sourceLocG = "+f+"("+d.join()+", 0);\n ++"+d[u-2]+";\n "+f+" sourceLocA = "+f+"("+d.join()+", 0);\n --"+d[u-1]+";\n "+f+" sourceLocB = "+f+"("+d.join()+", 0);\n --"+d[u-2]+";"}else s=u,o="\n "+l+" sourceLocR = coords;\n ++"+d[u-1]+";\n "+l+" sourceLocG = coords;\n ++"+d[u-2]+";\n "+l+" sourceLocA = coords;\n --"+d[u-1]+";\n "+l+" sourceLocB = coords;\n --"+d[u-2]+";";var h=["x","y","z","w","u","v"].slice(0,s),p="."+h[s-1],m=h.map(function(t){return"int "+t}),v=Ze("sourceLocR",s-1).concat("inIdx.r"),_=Ze("sourceLocG",s-1).concat("inIdx.g"),g=Ze("sourceLocB",s-1).concat("inIdx.b"),y=Ze("sourceLocA",s-1).concat("inIdx.a"),x="max"===n?"greaterThan":"lessThan",w=r?"":"\n inIdx = round(vec4(getBestIndicesAChannel("+v.join()+"),\n getBestIndicesAChannel("+_.join()+"),\n getBestIndicesAChannel("+g.join()+"),\n getBestIndicesAChannel("+y.join()+")));",k="vec4(\n getAChannel("+v.join()+"),\n hasNextCol ? getAChannel("+_.join()+") : 0.,\n hasNextRow ? getAChannel("+g.join()+") : 0.,\n hasNextRow && hasNextCol ? getAChannel("+y.join()+") : 0.)",C=r?"":"\n float getBestIndicesAChannel("+m.join()+") {\n return getChannel(getBestIndicesA("+h.join()+"),\n vec2("+h.slice(-2).join()+"));\n }";this.userCode="\n float getAChannel("+m.join()+") {\n return getChannel(getA("+h.join()+"),\n vec2("+h.slice(-2).join()+"));\n }\n "+C+"\n void main() {\n "+l+" coords = getOutputCoords();\n bool hasNextCol = "+d[u-1]+" < "+(c[u-1]-1)+";\n bool hasNextRow = "+d[u-2]+" < "+(c[u-2]-1)+";\n "+o+"\n ivec4 srcIdx = ivec4(sourceLocR"+p+", sourceLocG"+p+",\n sourceLocB"+p+", sourceLocA"+p+") * "+e+";\n ivec4 inIdx = srcIdx;\n vec4 bestIndex = vec4(inIdx);\n vec4 bestValue = "+k+";\n\n for (int i = 0; i < "+e+"; i++) {\n inIdx = srcIdx;\n "+w+"\n vec4 candidate = "+k+";\n bvec4 nan = isnan(candidate);\n bvec4 replace = bvec4(\n vec4("+x+"(candidate, bestValue)) * (vec4(1.0) - vec4(nan)));\n\n bestValue = vec4(replace.x ? candidate.x : bestValue.x,\n replace.y ? candidate.y : bestValue.y,\n replace.z ? candidate.z : bestValue.z,\n replace.w ? candidate.w : bestValue.w);\n bestIndex = mix(bestIndex, vec4(inIdx), vec4(replace));\n srcIdx++;\n }\n setOutput(bestIndex);\n }\n "},bn=function(t){this.variableNames=["dy"],this.outputShape=t.inShape;var e=t.filterHeight,n=t.filterWidth,r=t.strideHeight,i=t.strideWidth,a=t.dilationHeight,o=t.dilationWidth,s=t.effectiveFilterHeight,c=t.effectiveFilterWidth,u=s-1-t.padInfo.top,l=c-1-t.padInfo.left,d=1/(e*n);this.userCode="\n const ivec2 pads = ivec2("+u+", "+l+");\n const float avgMultiplier = float("+d+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n\n ivec2 dyRCCorner = coords.yz - pads;\n int dyRCorner = dyRCCorner.x;\n int dyCCorner = dyRCCorner.y;\n\n // Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < "+s+";\n wR += "+a+") {\n float dyR = float(dyRCorner + wR) / "+r+".0;\n\n if (dyR < 0.0 || dyR >= "+t.outHeight+".0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < "+c+";\n wC+= "+o+") {\n float dyC = float(dyCCorner + wC) / "+i+".0;\n\n if (dyC < 0.0 || dyC >= "+t.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(b, idyR, idyC, d);\n\n dotProd += dyValue * avgMultiplier;\n }\n }\n setOutput(dotProd);\n }\n "},yn=function(t,e,n,r,i,a){this.outputShape=[],this.variableNames=["x","mean","variance"],en(t,e),en(t,n);var o="0.0";null!=r&&(en(t,r),this.variableNames.push("offset"),o="getOffsetAtOutCoords()");var s="1.0";null!=i&&(en(t,i),this.variableNames.push("scale"),s="getScaleAtOutCoords()"),this.outputShape=t,this.userCode="\n void main() {\n float x = getXAtOutCoords();\n float mean = getMeanAtOutCoords();\n float variance = getVarianceAtOutCoords();\n float offset = "+o+";\n float scale = "+s+";\n float inv = scale * inversesqrt(variance + float("+a+"));\n setOutput(dot(vec3(x, -mean, offset), vec3(inv, inv, 1)));\n }\n "},xn=function(t,e,n,r,i,a){this.usesPackedTextures=!0,this.variableNames=["x","mean","variance"],en(t,e),en(t,n);var o="vec4(0.0)";null!=r&&(en(t,r),this.variableNames.push("offset"),o="getOffsetAtOutCoords()");var s="vec4(1.0)";null!=i&&(en(t,i),this.variableNames.push("scale"),s="getScaleAtOutCoords()"),this.outputShape=t,this.userCode="\n void main() {\n vec4 offset = "+o+";\n vec4 scale = "+s+";\n\n vec4 x = getXAtOutCoords();\n vec4 mean = getMeanAtOutCoords();\n vec4 variance = getVarianceAtOutCoords();\n\n vec4 inv = scale * inversesqrt(variance + vec4("+a+"));\n\n setOutput((x - mean) * inv + offset);\n }\n "},wn="return areal * breal - aimag * bimag;",kn="return areal * bimag + aimag * breal;",Cn=function(t,e,n){this.variableNames=["AReal","AImag","BReal","BImag"],this.outputShape=en(e,n),this.userCode="\n float binaryOpComplex(\n float areal, float aimag, float breal, float bimag) {\n "+t+"\n }\n\n void main() {\n float areal = getARealAtOutCoords();\n float aimag = getAImagAtOutCoords();\n float breal = getBRealAtOutCoords();\n float bimag = getBImagAtOutCoords();\n setOutput(binaryOpComplex(areal, aimag, breal, bimag));\n }\n "},En="return a + b;",Sn="return a - b;",In="return a * b;",Mn=function(t,e,n){this.variableNames=["A","B"],this.outputShape=en(e,n),this.userCode="\n float binaryOperation(float a, float b) {\n "+t+"\n }\n\n void main() {\n float a = getAAtOutCoords();\n float b = getBAtOutCoords();\n setOutput(binaryOperation(a, b));\n }\n "},Tn=function(t,e,n){this.variableNames=["A","B"],this.supportsBroadcasting=!0,this.usesPackedTextures=!0,this.outputShape=en(e,n),this.userCode="\n vec4 binaryOperation(vec4 a, vec4 b) {\n "+t+"\n }\n\n void main() {\n vec4 a = getAAtOutCoords();\n vec4 b = getBAtOutCoords();\n setOutput(binaryOperation(a, b));\n }\n "},Dn=function(){function t(t){this.variableNames=["A"],this.outputShape=t,this.userCode="\n uniform float min;\n uniform float max;\n\n void main() {\n float value = getAAtOutCoords();\n if (isnan(value)) {\n setOutput(value);\n return;\n }\n\n setOutput(clamp(value, min, max));\n }\n "}return t.prototype.getCustomSetupFunc=function(t,e){var n=this;return function(r,i){null==n.minLoc&&(n.minLoc=r.getUniformLocationNoThrow(i,"min"),n.maxLoc=r.getUniformLocationNoThrow(i,"max")),r.gl.uniform1f(n.minLoc,t),r.gl.uniform1f(n.maxLoc,e)}},t}(),Rn=function(){function t(t){this.variableNames=["A"],this.usesPackedTextures=!0,this.outputShape=t,this.userCode="\n uniform float min;\n uniform float max;\n\n void main() {\n vec4 value = getAAtOutCoords();\n\n if (any(isnan(value))) {\n setOutput(value);\n return;\n }\n\n setOutput(clamp(value, vec4(min), vec4(max)));\n }\n "}return t.prototype.getCustomSetupFunc=function(t,e){var n=this;return function(r,i){null==n.minLoc&&(n.minLoc=r.getUniformLocationNoThrow(i,"min"),n.maxLoc=r.getUniformLocationNoThrow(i,"max")),r.gl.uniform1f(n.minLoc,t),r.gl.uniform1f(n.maxLoc,e)}},t}(),Pn=function(t){this.variableNames=["real","imag"],this.outputShape=t,this.userCode="\n void main() {\n float re = abs(getRealAtOutCoords());\n float im = abs(getImagAtOutCoords());\n float mx = max(re, im);\n\n // sadly the length function in glsl is not underflow-safe\n // (at least not on Intel GPUs). So the safe solution is\n // to ensure underflow-safety in all cases.\n setOutput(\n mx == 0.0 ? 0.0 : mx * length(vec2(1, min(re, im)/mx))\n );\n }\n "},On=function(t){this.outputShape=[],this.outputShape=le(t,1),this.variableNames=t.map(function(t,e){return"T"+e});var e=new Array(t.length-1);e[0]=t[0][1];for(var n=1;n<e.length;n++)e[n]=e[n-1]+t[n][1];var r=["if (yC < "+e[0]+") setOutput(getT0(yR, yC));"];for(n=1;n<e.length;n++){var i=e[n-1];r.push("else if (yC < "+e[n]+") setOutput(getT"+n+"(yR, yC-"+i+"));")}var a=e.length,o=e[e.length-1];r.push("else setOutput(getT"+a+"(yR, yC-"+o+"));"),this.userCode="\n void main() {\n ivec2 coords = getOutputCoords();\n int yR = coords.x;\n int yC = coords.y;\n\n "+r.join("\n ")+"\n }\n "},Ln=function(t,e){this.usesPackedTextures=!0,this.outputShape=[],this.outputShape=le(t,e);var n=this.outputShape,r=n.length,i=mn(r),a=Ze("coords",r),o=["x","y","z","w","u","v"].slice(0,r);this.variableNames=t.map(function(t,e){return"T"+e});var s=new Array(t.length-1);s[0]=t[0][e];for(var c=1;c<s.length;c++)s[c]=s[c-1]+t[c][e];var u=o[e],l="vec2("+o.slice(-2).join()+")",d=o.join(),f="if ("+u+" < "+s[0]+")\n return getChannel(getT0("+d+"), "+l+");";for(c=1;c<s.length;c++){var h=s[c-1];f+="\n else if ("+u+" < "+s[c]+") {\n "+u+" -= "+h+";\n return getChannel(getT"+c+"("+d+"), "+l+");\n }"}var p=s.length;f+="\n else {\n "+u+" -= "+s[s.length-1]+";\n return getChannel(getT"+p+"("+d+"), "+l+");\n }",this.userCode="\n float getValue("+o.map(function(t){return"int "+t})+") {\n "+f+"\n }\n\n void main() {\n "+i+" coords = getOutputCoords();\n vec4 result = vec4(getValue("+a+"), 0., 0., 0.);\n if (++"+a[r-1]+" < "+n[r-1]+") {\n result.g = getValue("+a+");\n }\n if (++"+a[r-2]+" < "+n[r-2]+") {\n result.a = getValue("+a+");\n }\n if ("+a[r-2]+" < "+n[r-2]+" &&\n --"+a[r-1]+" < "+n[r-1]+") {\n result.b = getValue("+a+");\n }\n setOutput(result);\n }\n "},An=function(t){this.variableNames=["x","dy"],this.outputShape=t.filterShape;var e=t.strideHeight,n=t.strideWidth,r=t.padInfo.top,i=t.padInfo.left;this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int wR = coords.x;\n int wC = coords.y;\n int d1 = coords.z;\n int d2 = coords.w;\n\n // Convolve x(?, ?, d1) with dy(:, :, d2) to get dw(wR, wC, d1, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n\n for (int b = 0; b < "+t.batchSize+"; b++) {\n for (int yR = 0; yR < "+t.outHeight+"; yR++) {\n int xR = wR + yR * "+e+" - "+r+";\n\n if (xR < 0 || xR >= "+t.inHeight+") {\n continue;\n }\n\n for (int yC = 0; yC < "+t.outWidth+"; yC++) {\n int xC = wC + yC * "+n+" - "+i+";\n\n if (xC < 0 || xC >= "+t.inWidth+") {\n continue;\n }\n\n float dyValue = getDy(b, yR, yC, d2);\n float xValue = getX(b, xR, xC, d1);\n dotProd += (xValue * dyValue);\n }\n }\n }\n setOutput(dotProd);\n }\n "},Nn=function(t){this.variableNames=["dy","W"],this.outputShape=t.inShape;var e=t.filterHeight,n=t.filterWidth,r=t.strideHeight,i=t.strideWidth,a=e-1-t.padInfo.top,o=n-1-t.padInfo.left;this.userCode="\n const ivec2 pads = ivec2("+a+", "+o+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d1 = coords[3];\n\n ivec2 dyCorner = coords.yz - pads;\n int dyRCorner = dyCorner.x;\n int dyCCorner = dyCorner.y;\n\n // Convolve dy(?, ?, d2) with w(:, :, d1, d2) to compute dx(xR, xC, d1).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < "+e+"; wR++) {\n float dyR = float(dyRCorner + wR) / "+r+".0;\n\n if (dyR < 0.0 || dyR >= "+t.outHeight+".0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n int wRPerm = "+e+" - 1 - wR;\n\n for (int wC = 0; wC < "+n+"; wC++) {\n float dyC = float(dyCCorner + wC) / "+i+".0;\n\n if (dyC < 0.0 || dyC >= "+t.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n int wCPerm = "+n+" - 1 - wC;\n\n for (int d2 = 0; d2 < "+t.outChannels+"; d2++) {\n float xValue = getDy(batch, idyR, idyC, d2);\n float wValue = getW(wRPerm, wCPerm, d1, d2);\n dotProd += xValue * wValue;\n }\n }\n }\n setOutput(dotProd);\n }\n "},Bn=function(t){this.variableNames=["x","dy"],this.outputShape=t.filterShape;var e=t.strideDepth,n=t.strideHeight,r=t.strideWidth,i=t.padInfo.front,a=t.padInfo.top,o=t.padInfo.left;this.userCode="\n void main() {\n ivec5 coords = getOutputCoords();\n int wF = coords.x;\n int wR = coords.y;\n int wC = coords.z;\n int d1 = coords.w;\n int d2 = coords.u;\n\n float dotProd = 0.0;\n\n for (int b = 0; b < "+t.batchSize+"; b++) {\n for (int yF = 0; yF < "+t.outDepth+"; yF++) {\n int xF = wF + yF * "+e+" - "+i+";\n\n if (xF < 0 || xF >= "+t.inDepth+") {\n continue;\n }\n\n for (int yR = 0; yR < "+t.outHeight+"; yR++) {\n int xR = wR + yR * "+n+" - "+a+";\n\n if (xR < 0 || xR >= "+t.inHeight+") {\n continue;\n }\n\n for (int yC = 0; yC < "+t.outWidth+"; yC++) {\n int xC = wC + yC * "+r+" - "+o+";\n\n if (xC < 0 || xC >= "+t.inWidth+") {\n continue;\n }\n\n float dyValue = getDy(b, yF, yR, yC, d2);\n float xValue = getX(b, xF, xR, xC, d1);\n dotProd += (xValue * dyValue);\n }\n }\n }\n }\n setOutput(dotProd);\n }\n "},jn=function(t){this.variableNames=["dy","W"],this.outputShape=t.inShape;var e=t.filterDepth,n=t.filterHeight,r=t.filterWidth,i=t.strideDepth,a=t.strideHeight,o=t.strideWidth,s=e-1-t.padInfo.front,c=n-1-t.padInfo.top,u=r-1-t.padInfo.left;this.userCode="\n const ivec3 pads = ivec3("+s+", "+c+", "+u+");\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int d1 = coords.u;\n\n\n ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n int dyFCorner = dyCorner.x;\n int dyRCorner = dyCorner.y;\n int dyCCorner = dyCorner.z;\n\n float dotProd = 0.0;\n for (int wF = 0; wF < "+e+"; wF++) {\n float dyF = float(dyFCorner + wF) / "+i+".0;\n\n if (dyF < 0.0 || dyF >= "+t.outDepth+".0 || fract(dyF) > 0.0) {\n continue;\n }\n int idyF = int(dyF);\n\n int wFPerm = "+e+" - 1 - wF;\n\n for (int wR = 0; wR < "+n+"; wR++) {\n float dyR = float(dyRCorner + wR) / "+a+".0;\n\n if (dyR < 0.0 || dyR >= "+t.outHeight+".0 ||\n fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n int wRPerm = "+n+" - 1 - wR;\n\n for (int wC = 0; wC < "+r+"; wC++) {\n float dyC = float(dyCCorner + wC) / "+o+".0;\n\n if (dyC < 0.0 || dyC >= "+t.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n int wCPerm = "+r+" - 1 - wC;\n\n for (int d2 = 0; d2 < "+t.outChannels+"; d2++) {\n float xValue = getDy(batch, idyF, idyR, idyC, d2);\n float wValue = getW(wFPerm, wRPerm, wCPerm, d1, d2);\n dotProd += xValue * wValue;\n }\n }\n }\n }\n setOutput(dotProd);\n }\n "},Fn=function(t){this.variableNames=["x","dy"],this.outputShape=t.filterShape;var e=t.strideHeight,n=t.strideWidth,r=t.padInfo.top,i=t.padInfo.left,a=t.outChannels/t.inChannels;this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int wR = coords.x;\n int wC = coords.y;\n int d1 = coords.z;\n int dm = coords.w;\n int d2 = d1 * "+a+" + dm;\n\n float dotProd = 0.0;\n\n // TODO: Vec4 over the batch size\n for (int b = 0; b < "+t.batchSize+"; b++) {\n for (int yR = 0; yR < "+t.outHeight+"; yR++) {\n int xR = wR + yR * "+e+" - "+r+";\n\n if (xR < 0 || xR >= "+t.inHeight+") {\n continue;\n }\n\n for (int yC = 0; yC < "+t.outWidth+"; yC++) {\n int xC = wC + yC * "+n+" - "+i+";\n\n if (xC < 0 || xC >= "+t.inWidth+") {\n continue;\n }\n\n float dyValue = getDy(b, yR, yC, d2);\n float xValue = getX(b, xR, xC, d1);\n dotProd += (xValue * dyValue);\n }\n }\n }\n setOutput(dotProd);\n }\n "},Yn=function(t){this.variableNames=["dy","W"],this.outputShape=t.inShape;var e=t.filterHeight,n=t.filterWidth,r=t.strideHeight,i=t.strideWidth,a=e-1-t.padInfo.top,o=n-1-t.padInfo.left,s=t.outChannels/t.inChannels;this.userCode="\n const ivec2 pads = ivec2("+a+", "+o+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d1 = coords[3];\n ivec2 dyCorner = coords.yz - pads;\n int dyRCorner = dyCorner.x;\n int dyCCorner = dyCorner.y;\n\n float dotProd = 0.0;\n\n for (int wR = 0; wR < "+e+"; wR++) {\n float dyR = float(dyRCorner + wR) / "+r+".0;\n\n if (dyR < 0.0 || dyR >= "+t.outHeight+".0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n int wRPerm = "+e+" - 1 - wR;\n\n for (int wC = 0; wC < "+n+"; wC++) {\n float dyC = float(dyCCorner + wC) / "+i+".0;\n\n if (dyC < 0.0 || dyC >= "+t.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n int wCPerm = "+n+" - 1 - wC;\n\n // TODO: Vec4 over the channelMul\n for (int dm = 0; dm < "+s+"; dm++) {\n int d2 = d1 * "+s+" + dm;\n float xValue = getDy(batch, idyR, idyC, d2);\n float wValue = getW(wRPerm, wCPerm, d1, dm);\n dotProd += xValue * wValue;\n }\n }\n }\n setOutput(dotProd);\n }\n "},$n=function(t){this.variableNames=["x","W"],this.outputShape=t.outShape;var e=t.padInfo.top,n=t.padInfo.left,r=t.strideHeight,i=t.strideWidth,a=t.dilationHeight,o=t.dilationWidth,s=t.filterHeight,c=t.filterWidth,u=4*Math.floor(t.inChannels/4),l=t.inChannels%4;this.userCode="\n const ivec2 strides = ivec2("+r+", "+i+");\n const ivec2 pads = ivec2("+e+", "+n+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d2 = coords[3];\n\n ivec2 xRCCorner = coords.yz * strides - pads;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // Convolve x(?, ?, d1) with w(:, :, d1, d2) to get y(yR, yC, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < "+s+"; wR++) {\n int xR = xRCorner + wR * "+a+";\n\n if (xR < 0 || xR >= "+t.inHeight+") {\n continue;\n }\n\n for (int wC = 0; wC < "+c+"; wC++) {\n int xC = xCCorner + wC * "+o+";\n\n if (xC < 0 || xC >= "+t.inWidth+") {\n continue;\n }\n\n for (int d1 = 0; d1 < "+u+"; d1 += 4) {\n vec4 xValues = vec4(\n getX(batch, xR, xC, d1),\n getX(batch, xR, xC, d1 + 1),\n getX(batch, xR, xC, d1 + 2),\n getX(batch, xR, xC, d1 + 3)\n );\n vec4 wValues = vec4(\n getW(wR, wC, d1, d2),\n getW(wR, wC, d1 + 1, d2),\n getW(wR, wC, d1 + 2, d2),\n getW(wR, wC, d1 + 3, d2)\n );\n\n dotProd += dot(xValues, wValues);\n }\n\n if ("+(1===l)+") {\n dotProd +=\n getX(batch, xR, xC, "+u+") *\n getW(wR, wC, "+u+", d2);\n } else if ("+(2===l)+") {\n vec2 xValues = vec2(\n getX(batch, xR, xC, "+u+"),\n getX(batch, xR, xC, "+u+" + 1)\n );\n vec2 wValues = vec2(\n getW(wR, wC, "+u+", d2),\n getW(wR, wC, "+u+" + 1, d2)\n );\n dotProd += dot(xValues, wValues);\n } else if ("+(3===l)+") {\n vec3 xValues = vec3(\n getX(batch, xR, xC, "+u+"),\n getX(batch, xR, xC, "+u+" + 1),\n getX(batch, xR, xC, "+u+" + 2)\n );\n vec3 wValues = vec3(\n getW(wR, wC, "+u+", d2),\n getW(wR, wC, "+u+" + 1, d2),\n getW(wR, wC, "+u+" + 2, d2)\n );\n dotProd += dot(xValues, wValues);\n }\n }\n }\n setOutput(dotProd);\n }\n "},zn=function(t){this.variableNames=["x","W"],this.outputShape=t.outShape;var e=t.padInfo.front,n=t.padInfo.top,r=t.padInfo.left,i=t.strideDepth,a=t.strideHeight,o=t.strideWidth,s=t.dilationDepth,c=t.dilationHeight,u=t.dilationWidth,l=t.filterDepth,d=t.filterHeight,f=t.filterWidth,h=4*Math.floor(t.inChannels/4),p=t.inChannels%4;this.userCode="\n const ivec3 strides = ivec3("+i+", "+a+", "+o+");\n const ivec3 pads = ivec3("+e+", "+n+", "+r+");\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int d2 = coords.u;\n\n ivec3 xFRCCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n int xFCorner = xFRCCorner.x;\n int xRCorner = xFRCCorner.y;\n int xCCorner = xFRCCorner.z;\n\n // Convolve x(?, ?, ?, d1) with w(:, :, :, d1, d2) to get\n // y(yF, yR, yC, d2). ? = to be determined. : = across all\n // values in that axis.\n float dotProd = 0.0;\n for (int wF = 0; wF < "+l+"; wF++) {\n int xF = xFCorner + wF * "+s+";\n\n if (xF < 0 || xF >= "+t.inDepth+") {\n continue;\n }\n\n for (int wR = 0; wR < "+d+"; wR++) {\n int xR = xRCorner + wR * "+c+";\n\n if (xR < 0 || xR >= "+t.inHeight+") {\n continue;\n }\n\n for (int wC = 0; wC < "+f+"; wC++) {\n int xC = xCCorner + wC * "+u+";\n\n if (xC < 0 || xC >= "+t.inWidth+") {\n continue;\n }\n\n for (int d1 = 0; d1 < "+h+"; d1 += 4) {\n vec4 xValues = vec4(\n getX(batch, xF, xR, xC, d1),\n getX(batch, xF, xR, xC, d1 + 1),\n getX(batch, xF, xR, xC, d1 + 2),\n getX(batch, xF, xR, xC, d1 + 3)\n );\n vec4 wValues = vec4(\n getW(wF, wR, wC, d1, d2),\n getW(wF, wR, wC, d1 + 1, d2),\n getW(wF, wR, wC, d1 + 2, d2),\n getW(wF, wR, wC, d1 + 3, d2)\n );\n\n dotProd += dot(xValues, wValues);\n }\n\n if ("+(1===p)+") {\n dotProd +=\n getX(batch, xF, xR, xC, "+h+") *\n getW(wF, wR, wC, "+h+", d2);\n } else if ("+(2===p)+") {\n vec2 xValues = vec2(\n getX(batch, xF, xR, xC, "+h+"),\n getX(batch, xF, xR, xC, "+h+" + 1)\n );\n vec2 wValues = vec2(\n getW(wF, wR, wC, "+h+", d2),\n getW(wF, wR, wC, "+h+" + 1, d2)\n );\n dotProd += dot(xValues, wValues);\n } else if ("+(3===p)+") {\n vec3 xValues = vec3(\n getX(batch, xF, xR, xC, "+h+"),\n getX(batch, xF, xR, xC, "+h+" + 1),\n getX(batch, xF, xR, xC, "+h+" + 2)\n );\n vec3 wValues = vec3(\n getW(wF, wR, wC, "+h+", d2),\n getW(wF, wR, wC, "+h+" + 1, d2),\n getW(wF, wR, wC, "+h+" + 2, d2)\n );\n dotProd += dot(xValues, wValues);\n }\n }\n }\n }\n setOutput(dotProd);\n }\n "},Vn=function(t){this.variableNames=["x","W"],this.outputShape=t.outShape;var e=t.inHeight,n=t.inWidth,r=t.padInfo.top,i=t.padInfo.left,a=t.strideHeight,o=t.strideWidth,s=t.dilationHeight,c=t.dilationWidth,u=t.filterHeight,l=t.filterWidth,d=t.outChannels/t.inChannels;this.userCode="\n const ivec2 strides = ivec2("+a+", "+o+");\n const ivec2 pads = ivec2("+r+", "+i+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords.x;\n ivec2 xRCCorner = coords.yz * strides - pads;\n int d2 = coords.w;\n int d1 = d2 / "+d+";\n int q = d2 - d1 * "+d+";\n\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // Convolve x(?, ?, d1) with w(:, :, d1, q) to get y(yR, yC, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n // TODO(dsmilkov): Flatten the two for loops and vec4 the operations.\n for (int wR = 0; wR < "+u+"; wR++) {\n int xR = xRCorner + wR * "+s+";\n\n if (xR < 0 || xR >= "+e+") {\n continue;\n }\n\n for (int wC = 0; wC < "+l+"; wC++) {\n int xC = xCCorner + wC * "+c+";\n\n if (xC < 0 || xC >= "+n+") {\n continue;\n }\n\n float xVal = getX(batch, xR, xC, d1);\n float wVal = getW(wR, wC, d1, q);\n dotProd += xVal * wVal;\n }\n }\n setOutput(dotProd);\n }\n "},Hn=function(t){this.variableNames=["x","W"],this.usesPackedTextures=!0,this.outputShape=t.outShape;for(var e=t.inHeight,n=t.inWidth,r=t.padInfo.top,i=t.padInfo.left,a=t.strideHeight,o=t.strideWidth,s=t.dilationHeight,c=t.dilationWidth,u=t.filterHeight,l=t.filterWidth,d=l,f="int xR; int xC; int xCOffset;",h=0;h<u;h++)for(var p=0;p<l;p++)f+="\n vec4 xTexelR"+h+"C"+2*p+" = vec4(0.);\n vec4 wR"+h+"C"+p+" = vec4(0.);\n vec4 xR"+h+"C"+p+" = vec4(0.);";for(h=0;h<u;h++)for(var m=0;m<d;m++){if(f+="\n xR = xRCorner + "+h*s+";\n xC = xCCorner + "+(p=2*m)*c+";\n ",1===o){if(p<l&&(f+=i%2==1?"\n xCOffset = xC + 1;\n if(xR >= 0 && xR < "+e+" && xCOffset >= 0 && xCOffset < "+n+") {\n xTexelR"+h+"C"+p+" = getX(batch, xR, xCOffset, d1);\n } else {\n xTexelR"+h+"C"+p+" = vec4(0.);\n }\n\n xCOffset = xC + 1 - 2;\n if(xR >= 0 && xR < "+e+" && xCOffset >= 0 && xCOffset < "+n+") {\n vec4 previous = getX(batch, xR, xCOffset, d1);\n xR"+h+"C"+p+" = vec4(previous.zw, xTexelR"+h+"C"+p+".xy);\n } else {\n xR"+h+"C"+p+" = vec4(0, 0, xTexelR"+h+"C"+p+".xy);\n }\n ":"\n if(xR >= 0 && xR < "+e+" && xC >= 0 && xC < "+n+") {\n xTexelR"+h+"C"+p+" = getX(batch, xR, xC, d1);\n } else {\n xTexelR"+h+"C"+p+" = vec4(0.);\n }\n\n xR"+h+"C"+p+" = xTexelR"+h+"C"+p+";\n ",p+1<l)){var _=i%2==0?v(c):c;c%2==0&&i%2==1||c%2!=0&&i%2!=1?(f+="\n xCOffset = xC + "+i%2+" + "+_+";\n\n if(xR >= 0 && xR < "+e+" &&\n xCOffset >= 0 && xCOffset < "+n+") {\n xTexelR"+h+"C"+(p+2)+" = getX(batch, xR, xCOffset, d1);\n }\n ",c>1&&(f+="\n xCOffset -= 2;\n if(xR >= 0 && xR < "+e+" &&\n xCOffset >= 0 && xCOffset < "+n+") {\n xTexelR"+h+"C"+p+" = getX(batch, xR, xCOffset, d1);\n } else {\n xTexelR"+h+"C"+p+" = vec4(0.);\n }\n "),f+="\n xR"+h+"C"+(p+1)+" = vec4(\n xTexelR"+h+"C"+p+".zw, xTexelR"+h+"C"+(p+2)+".xy);\n "):f+="\n xCOffset = xC + "+_+";\n\n if(xR >= 0 && xR < "+e+" &&\n xCOffset >= 0 && xCOffset < "+n+") {\n xTexelR"+h+"C"+(p+2)+" = getX(batch, xR, xCOffset, d1);\n }\n\n xR"+h+"C"+(p+1)+" = xTexelR"+h+"C"+(p+2)+";\n "}}else p<l&&(f+="\n if(xR >= 0 && xR < "+e+") {\n ",i%2==1?(f+="\n xCOffset = xC + 1 - "+o+";\n if(xCOffset >= 0 && xCOffset < "+n+") {\n xTexelR"+h+"C"+p+" = getX(batch, xR, xCOffset, d1);\n } else {\n xTexelR"+h+"C"+p+" = vec4(0.);\n }\n\n if(xC + 1 >= 0 && xC + 1 < "+n+") {\n xTexelR"+h+"C"+(p+2)+" = getX(batch, xR, xC + 1, d1);\n } else {\n xTexelR"+h+"C"+(p+2)+" = vec4(0.);\n }\n\n xR"+h+"C"+p+" = vec4(\n xTexelR"+h+"C"+p+".zw, xTexelR"+h+"C"+(p+2)+".zw);\n ",p+1<l&&(f+="\n vec4 final = vec4(0.);\n xCOffset = xC + 1 + "+o+";\n if(xCOffset >= 0 && xCOffset < "+n+") {\n final = getX(batch, xR, xCOffset, d1);\n }\n xR"+h+"C"+(p+1)+" = vec4(xTexelR"+h+"C"+(p+2)+".xy, final.xy);\n ")):(f+="\n if(xC >= 0 && xC < "+n+") {\n xTexelR"+h+"C"+p+" = getX(batch, xR, xC, d1);\n } else {\n xTexelR"+h+"C"+p+" = vec4(0.);\n }\n\n xCOffset = xC + "+o+";\n if(xCOffset >= 0 && xCOffset < "+n+") {\n xTexelR"+h+"C"+(p+2)+" = getX(batch, xR, xCOffset, d1);\n } else {\n xTexelR"+h+"C"+(p+2)+" = vec4(0.);\n }\n\n xR"+h+"C"+p+" = vec4(\n xTexelR"+h+"C"+p+".xy, xTexelR"+h+"C"+(p+2)+".xy);\n ",p+1<l&&(f+="\n xR"+h+"C"+(p+1)+" = vec4(\n xTexelR"+h+"C"+p+".zw, xTexelR"+h+"C"+(p+2)+".zw);\n ")),f+="}");p<l&&(f+="\n vec4 wTexelR"+h+"C"+p+" = getW("+h+", "+p+", d1, q);\n wR"+h+"C"+p+" = vec4(wTexelR"+h+"C"+p+".xz, wTexelR"+h+"C"+p+".xz);\n ",p+1<l&&(f+="\n vec4 wTexelR"+h+"C"+(p+1)+" = getW("+h+", "+(p+1)+", d1, q);\n wR"+h+"C"+(p+1)+" =\n vec4(wTexelR"+h+"C"+(p+1)+".xz, wTexelR"+h+"C"+(p+1)+".xz);"))}for(h=0;h<u;h++)for(p=0;p<l;p++)f+="result += xR"+h+"C"+p+" * wR"+h+"C"+p+";";this.userCode="\n const ivec2 strides = ivec2("+a+", "+o+");\n const ivec2 pads = ivec2("+r+", "+i+");\n\n void main() {\n\n ivec4 coords = getOutputCoords();\n int batch = coords.x;\n ivec2 xRCCorner = coords.yz * strides - pads;\n int d2 = coords.w;\n int d1 = d2;\n int q = 0;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n vec4 result = vec4(0.);\n\n "+f+"\n\n setOutput(result);\n }\n "},qn=function(t,e,n,r,i){this.variableNames=["Image","Boxes","BoxInd"],this.outputShape=[];var a=t[0],o=t[1],s=t[2],c=t[3],u=e[0],l=n[0],d=n[1];this.outputShape=[u,l,d,c];var f="bilinear"===r?1:0,h=[o-1+".0",s-1+".0"],p=h[0],m=h[1],v=l>1?[""+(o-1)/(l-1),"(y2-y1) * height_ratio","y1*"+p+" + float(y)*(height_scale)"]:["0.0","0.0","0.5 * (y1+y2) * "+p],_=v[0],g=v[1],b=v[2],y=d>1?[""+(s-1)/(d-1),"(x2-x1) * width_ratio","x1*"+m+" + float(x)*(width_scale)"]:["0.0","0.0","0.5 * (x1+x2) * "+m],x=y[0],w=y[1],k=y[2];this.userCode="\n const float height_ratio = float("+_+");\n const float width_ratio = float("+x+");\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int y = coords[1];\n int x = coords[2];\n int d = coords[3];\n\n // get box vals\n float y1 = getBoxes(b,0);\n float x1 = getBoxes(b,1);\n float y2 = getBoxes(b,2);\n float x2 = getBoxes(b,3);\n\n // get image in batch index\n int bInd = round(getBoxInd(b));\n if(bInd < 0 || bInd >= "+a+") {\n return;\n }\n\n float height_scale = "+g+";\n float width_scale = "+w+";\n\n float in_y = "+b+";\n if( in_y < 0.0 || in_y > "+p+" ) {\n setOutput(float("+i+"));\n return;\n }\n float in_x = "+k+";\n if( in_x < 0.0 || in_x > "+m+" ) {\n setOutput(float("+i+"));\n return;\n }\n\n vec2 sourceFracIndexCR = vec2(in_x,in_y);\n if("+f+" == 1) {\n // Compute the four integer indices.\n ivec2 sourceFloorCR = ivec2(sourceFracIndexCR);\n ivec2 sourceCeilCR = ivec2(ceil(sourceFracIndexCR));\n\n float topLeft = getImage(b, sourceFloorCR.y, sourceFloorCR.x, d);\n float bottomLeft = getImage(b, sourceCeilCR.y, sourceFloorCR.x, d);\n float topRight = getImage(b, sourceFloorCR.y, sourceCeilCR.x, d);\n float bottomRight = getImage(b, sourceCeilCR.y, sourceCeilCR.x, d);\n\n vec2 fracCR = sourceFracIndexCR - vec2(sourceFloorCR);\n\n float top = topLeft + (topRight - topLeft) * fracCR.x;\n float bottom = bottomLeft + (bottomRight - bottomLeft) * fracCR.x;\n float newValue = top + (bottom - top) * fracCR.y;\n setOutput(newValue);\n } else {\n // Compute the coordinators of nearest neighbor point.\n ivec2 sourceNearestCR = ivec2(floor(\n sourceFracIndexCR + vec2(0.5,0.5)));\n float newValue = getImage(b, sourceNearestCR.y, sourceNearestCR.x, d);\n setOutput(newValue);\n }\n }\n "},Wn=function(t,e,n){this.variableNames=["x"],this.outputShape=t;var r=t.length,i=t[t.length-1],a=n?"<":">";this.userCode="\n int getIndex(int i) {\n "+(n?"return "+i+" -i - 1;":"return i;")+"\n }\n\n void main() {\n "+mn(r)+" coords = getOutputCoords();\n int end = "+Un(r,"coords")+";\n float val = 0.0;\n for (int i = "+i+" - 1; i >= 0; i -= 1) {\n int idx = getIndex(i);\n if (idx "+a+" end) {\n continue;\n }\n if (idx == end && "+e+") {\n continue;\n }\n "+Un(r,"coords")+" = idx;\n val += getX("+function(t,e){if(1===t)return""+e;if(2===t)return e+".x, "+e+".y";if(3===t)return e+".x, "+e+".y, "+e+".z";if(4===t)return e+".x, "+e+".y, "+e+".z, "+e+".w";throw Error("Cumulative sum for rank "+t+" is not yet supported")}(r,"coords")+");\n }\n setOutput(val);\n }\n "};function Un(t,e){if(1===t)return""+e;if(2===t)return e+".y";if(3===t)return e+".z";if(4===t)return e+".w";throw Error("Cumulative sum for rank "+t+" is not yet supported")}var Gn=function(){function t(t,e,n){this.variableNames=["x"],this.outputShape=[],this.outputShape=t,this.blockSize=e,this.dataFormat=n,this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int h = "+this.getHeightCoordString()+";\n int w = "+this.getWidthCoordString()+";\n int d = "+this.getDepthCoordString()+";\n\n int in_h = h / "+e+";\n int offset_h = imod(h, "+e+");\n int in_w = w / "+e+";\n int offset_w = imod(w, "+e+");\n int offset_d = (offset_h * "+e+" + offset_w) *\n "+this.getOutputDepthSize()+";\n int in_d = d + offset_d;\n\n float result = "+this.getInputSamplingString()+";\n setOutput(result);\n }\n "}return t.prototype.getHeightCoordString=function(){return"NHWC"===this.dataFormat?"coords[1]":"coords[2]"},t.prototype.getWidthCoordString=function(){return"NHWC"===this.dataFormat?"coords[2]":"coords[3]"},t.prototype.getDepthCoordString=function(){return"NHWC"===this.dataFormat?"coords[3]":"coords[1]"},t.prototype.getOutputDepthSize=function(){return"NHWC"===this.dataFormat?this.outputShape[3]:this.outputShape[1]},t.prototype.getInputSamplingString=function(){return"NHWC"===this.dataFormat?"getX(b, in_h, in_w, in_d)":"getX(b, in_d, in_h, in_w)"},t}(),Kn=function(t){this.variableNames=["A"];var e=nn();this.outputShape=t,this.userCode="\n const float FLOAT_MAX = 1.70141184e38;\n const float FLOAT_MIN = 1.17549435e-38;\n\n lowp vec4 encode_float(highp float v) {\n if (isnan(v)) {\n return vec4(255, 255, 255, 255);\n }\n\n highp float av = abs(v);\n\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(0.0, 0.0, 128.0, 127.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(0.0, 0.0, 128.0, 255.0) / 255.0;\n }\n\n highp vec4 c = vec4(0,0,0,0);\n\n highp float e = floor(log2(av));\n highp float m = exp2(fract(log2(av))) - 1.0;\n\n c[2] = floor(128.0 * m);\n m -= c[2] / 128.0;\n c[1] = floor(32768.0 * m);\n m -= c[1] / 32768.0;\n c[0] = floor(8388608.0 * m);\n\n highp float ebias = e + 127.0;\n c[3] = floor(ebias / 2.0);\n ebias -= c[3] * 2.0;\n c[2] += floor(ebias) * 128.0;\n\n c[3] += 128.0 * step(0.0, -v);\n\n return c / 255.0;\n }\n\n void main() {\n float x = getAAtOutCoords();\n "+e.output+" = encode_float(x);\n }\n "},Xn="return real * expR - imag * expI;",Jn="return real * expI + imag * expR;",Zn=function(t,e,n){this.variableNames=["real","imag"];var r=e[1];this.outputShape=e;var i=n?"2.0 * "+Math.PI:"-2.0 * "+Math.PI,a=n?r+".0":"1.0";this.userCode="\n const float exponentMultiplier = "+i+";\n\n float unaryOpComplex(float real, float expR, float imag, float expI) {\n "+t+"\n }\n\n float mulMatDFT(int batch, int index) {\n float indexRatio = float(index) / float("+r+");\n float exponentMultiplierTimesIndexRatio =\n exponentMultiplier * indexRatio;\n\n float result = 0.0;\n\n for (int i = 0; i < "+r+"; i++) {\n // x = (-2|2 * PI / N) * index * i;\n float x = exponentMultiplierTimesIndexRatio * float(i);\n float expR = cos(x);\n float expI = sin(x);\n float real = getReal(batch, i);\n float imag = getImag(batch, i);\n\n result +=\n unaryOpComplex(real, expR, imag, expI) / "+a+";\n }\n\n return result;\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n setOutput(mulMatDFT(coords[0], coords[1]));\n }\n "},Qn=function(){function t(t,e){this.outputShape=[],this.variableNames=["x"],this.outputShape=t,this.userCode="\n uniform float value;\n void main() {\n // Input can be obtained from uniform value.\n setOutput(value);\n }\n "}return t.prototype.getCustomSetupFunc=function(t){var e=this;return function(n,r){null==e.valueLoc&&(e.valueLoc=n.getUniformLocationNoThrow(r,"value")),n.gl.uniform1f(e.valueLoc,t)}},t}(),tr=function(t){this.variableNames=["A"];var e=nn(),n=t[0],r=t[1];this.outputShape=t,this.userCode="\n void main() {\n ivec3 coords = getOutputCoords();\n int texR = coords[0];\n int texC = coords[1];\n int depth = coords[2];\n vec2 uv = (vec2(texC, texR) + halfCR) / vec2("+r+".0, "+n+".0);\n\n vec4 values = "+e.texture2D+"(A, uv);\n float value;\n if (depth == 0) {\n value = values.r;\n } else if (depth == 1) {\n value = values.g;\n } else if (depth == 2) {\n value = values.b;\n } else if (depth == 3) {\n value = values.a;\n }\n\n setOutput(floor(value * 255.0 + 0.5));\n }\n "},er=function(t,e,n){this.variableNames=["A","indices"];var r=t.slice();r[n]=e,this.outputShape=r,this.rank=r.length;var i=mn(this.rank),a=function(t,e){var n=t.length;if(n>4)throw Error("Gather for rank "+n+" is not yet supported");if(1===n)return"int(getIndices(resRC))";for(var r=["resRC.x","resRC.y","resRC.z","resRC.w"],i=[],a=0;a<t.length;a++)a===e?i.push("int(getIndices("+r[a]+"))"):i.push(""+r[a]);return i.join()}(t,n);this.userCode="\n void main() {\n "+i+" resRC = getOutputCoords();\n setOutput(getA("+a+"));\n }\n "};var nr,rr,ir=function(t,e,n){this.sliceDim=t,this.strides=e,this.variableNames=["x","indices"],this.outputShape=n;var r=mn(e.length),i=mn(n.length),a=this.sliceDim>1?"strides[j]":"strides";this.userCode="\n "+r+" strides = "+r+"("+this.strides+");\n void main() {\n "+i+" coords = getOutputCoords();\n int flattenIndex = 0;\n for (int j = 0; j < "+this.sliceDim+"; j++) {\n int index = round(getIndices(coords[0], j));\n flattenIndex += index * "+a+";\n }\n setOutput(getX(flattenIndex, coords[1]));\n }\n "};function ar(t,e){return[e,t]}function or(t,e){return t*e}function sr(t,e,n){var r=function(t,e){if(t%e!=0)throw new Error("unpackedSize ("+t+") must be a multiple of "+e);return t/e}(t.length,n);if(e.length<r)throw new Error("matrix length ("+e.length+") must be >= "+r);for(var i=0,a=0;a<t.length;a+=n)e[i++]=t[a]}function cr(t,e){return[Math.max(1,Math.ceil(e/2)),Math.max(1,Math.ceil(t/2))]}function ur(t,e){var n=cr(t,e);return n[0]*n[1]*4}function lr(t,e,n,r,i){var a=n*r;if(i.length<a)throw new Error("matrix length ("+i.length+") must be >= "+a);for(var o=r%2==1,s=n%2==1,c=Math.floor(r/2),u=Math.floor(n/2),l=Math.ceil(r/2),d=l*Math.ceil(n/2),f=v(n)*v(r),h=0;h<e;h++){for(var p=h*n*r,m=h*f,_=o?4:0,g=r+(o?1:0),b=m,y=p,x=p+r,w=0;w<u;++w){for(var k=0;k<c;++k)i[y++]=t[b++],i[y++]=t[b++],i[x++]=t[b++],i[x++]=t[b++];b+=_,y+=g,x+=g}if(o){b=m+4*(l-1);var C=p+r-1;for(_=4*l,g=2*r,w=0;w<u;++w)i[C]=t[b],i[C+r]=t[b+2],b+=_,C+=g}if(s){for(b=m+4*(d-l),C=p+(n-1)*r,k=0;k<c;++k)i[C++]=t[b++],i[C++]=t[b++],b+=2;o&&(i[p+n*r-1]=t[b])}}return i}function dr(t,e,n){var r=n();return e&&function(t){var e=t.getError();if(e!==t.NO_ERROR)throw new Error("WebGL Error: "+mr(t,e))}(t),r}!function(t){t[t.RENDER=0]="RENDER",t[t.UPLOAD=1]="UPLOAD",t[t.PIXELS=2]="PIXELS",t[t.DOWNLOAD=3]="DOWNLOAD"}(nr||(nr={})),function(t){t[t.UNPACKED_FLOAT16=0]="UNPACKED_FLOAT16",t[t.UNPACKED_FLOAT32=1]="UNPACKED_FLOAT32",t[t.PACKED_4X1_UNSIGNED_BYTE=2]="PACKED_4X1_UNSIGNED_BYTE",t[t.PACKED_2X2_FLOAT32=3]="PACKED_2X2_FLOAT32",t[t.PACKED_2X2_FLOAT16=4]="PACKED_2X2_FLOAT16"}(rr||(rr={}));var fr=5.96e-8,hr=65504;function pr(t){return!!(zt.get("WEBGL_RENDER_FLOAT32_ENABLED")||0===t||fr<Math.abs(t)&&Math.abs(t)<hr)}function mr(t,e){switch(e){case t.NO_ERROR:return"NO_ERROR";case t.INVALID_ENUM:return"INVALID_ENUM";case t.INVALID_VALUE:return"INVALID_VALUE";case t.INVALID_OPERATION:return"INVALID_OPERATION";case t.INVALID_FRAMEBUFFER_OPERATION:return"INVALID_FRAMEBUFFER_OPERATION";case t.OUT_OF_MEMORY:return"OUT_OF_MEMORY";case t.CONTEXT_LOST_WEBGL:return"CONTEXT_LOST_WEBGL";default:return"Unknown error code "+e}}function vr(t,e,n){return jr(t,e,function(){return t.getExtension(n)},'Extension "'+n+'" not supported on this browser.')}function _r(t,e,n){var r=jr(t,e,function(){return t.createShader(t.VERTEX_SHADER)},"Unable to create vertex WebGLShader.");if(dr(t,e,function(){return t.shaderSource(r,n)}),dr(t,e,function(){return t.compileShader(r)}),!1===t.getShaderParameter(r,t.COMPILE_STATUS))throw console.log(t.getShaderInfoLog(r)),new Error("Failed to compile vertex shader.");return r}function gr(t,e,n){var r=jr(t,e,function(){return t.createShader(t.FRAGMENT_SHADER)},"Unable to create fragment WebGLShader.");if(dr(t,e,function(){return t.shaderSource(r,n)}),dr(t,e,function(){return t.compileShader(r)}),!1===t.getShaderParameter(r,t.COMPILE_STATUS))throw function(t,e){var n=br.exec(e);if(null==n)return console.log("Couldn't parse line number in error: "+e),void console.log(t);for(var r=+n[1],i=t.split("\n"),a=i.length.toString().length+2,o=i.map(function(t,e){return M((e+1).toString(),a)+t}),s=0,c=0;c<o.length;c++)s=Math.max(o[c].length,s);var u=o.slice(0,r-1),l=o.slice(r-1,r),d=o.slice(r);console.log(u.join("\n")),console.log(e.split("\n")[0]),console.log("%c "+M(l[0],s),"border:1px solid red; background-color:#e3d2d2; color:#a61717"),console.log(d.join("\n"))}(n,t.getShaderInfoLog(r)),new Error("Failed to compile fragment shader.");return r}var br=/ERROR: [0-9]+:([0-9]+):/g;function yr(t,e){return jr(t,e,function(){return t.createProgram()},"Unable to create WebGLProgram.")}function xr(t,e,n){if(dr(t,e,function(){return t.linkProgram(n)}),!1===t.getProgramParameter(n,t.LINK_STATUS))throw console.log(t.getProgramInfoLog(n)),new Error("Failed to link vertex and fragment shaders.")}function wr(t,e,n){if(dr(t,e,function(){return t.validateProgram(n)}),!1===t.getProgramParameter(n,t.VALIDATE_STATUS))throw console.log(t.getProgramInfoLog(n)),new Error("Shader program validation failed.")}function kr(t,e,n){var r=jr(t,e,function(){return t.createBuffer()},"Unable to create WebGLBuffer");return dr(t,e,function(){return t.bindBuffer(t.ARRAY_BUFFER,r)}),dr(t,e,function(){return t.bufferData(t.ARRAY_BUFFER,n,t.STATIC_DRAW)}),r}function Cr(t,e,n){var r=jr(t,e,function(){return t.createBuffer()},"Unable to create WebGLBuffer");return dr(t,e,function(){return t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,r)}),dr(t,e,function(){return t.bufferData(t.ELEMENT_ARRAY_BUFFER,n,t.STATIC_DRAW)}),r}function Er(){return 2===zt.get("WEBGL_VERSION")?1:4}function Sr(t,e){return jr(t,e,function(){return t.createTexture()},"Unable to create WebGLTexture.")}function Ir(t,e){var n=zt.get("WEBGL_MAX_TEXTURE_SIZE");if(t<=0||e<=0){var r="["+t+"x"+e+"]";throw new Error("Requested texture size "+r+" is invalid.")}if(t>n||e>n)throw r="["+t+"x"+e+"]",new Error("Requested texture size "+r+" greater than WebGL maximum on this browser / GPU ["+n+"x"+n+"].")}function Mr(t,e){return jr(t,e,function(){return t.createFramebuffer()},"Unable to create WebGLFramebuffer.")}function Tr(t,e,n,r,i,a,o,s){var c=t.getAttribLocation(n,r);return-1!==c&&(dr(t,e,function(){return t.bindBuffer(t.ARRAY_BUFFER,i)}),dr(t,e,function(){return t.vertexAttribPointer(c,a,t.FLOAT,!1,o,s)}),dr(t,e,function(){return t.enableVertexAttribArray(c)}),!0)}function Dr(t,e,n,r){Fr(t,r),dr(t,e,function(){return t.activeTexture(t.TEXTURE0+r)}),dr(t,e,function(){return t.bindTexture(t.TEXTURE_2D,n)})}function Rr(t,e,n,r){return jr(t,e,function(){return t.getUniformLocation(n,r)},'uniform "'+r+'" not present in program.')}function Pr(t,e,n){return t.getUniformLocation(e,n)}function Or(t,e,n,r,i,a){dr(t,e,function(){return Dr(t,e,r,a)}),dr(t,e,function(){return t.uniform1i(i,a)})}function Lr(t,e,n,r){dr(t,e,function(){return t.bindFramebuffer(t.FRAMEBUFFER,r)}),dr(t,e,function(){return t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,n,0)})}function Ar(t,e,n){dr(t,e,function(){return t.bindFramebuffer(t.FRAMEBUFFER,n)}),dr(t,e,function(){return t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,null,0)})}function Nr(t){var e=t.checkFramebufferStatus(t.FRAMEBUFFER);if(e!==t.FRAMEBUFFER_COMPLETE)throw new Error("Error binding framebuffer: "+Br(t,e))}function Br(t,e){switch(e){case t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_ATTACHMENT";case t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";case t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:return"FRAMEBUFFER_INCOMPLETE_DIMENSIONS";case t.FRAMEBUFFER_UNSUPPORTED:return"FRAMEBUFFER_UNSUPPORTED";default:return"unknown error "+e}}function jr(t,e,n,r){var i=dr(t,e,function(){return n()});if(null==i)throw new Error(r);return i}function Fr(t,e){var n=t.MAX_COMBINED_TEXTURE_IMAGE_UNITS-1,r=e+t.TEXTURE0;if(r<t.TEXTURE0||r>n)throw new Error("textureUnit must be in [gl.TEXTURE0, gl.TEXTURE"+n+"].")}function Yr(t,e){return void 0===e&&(e=2),k(t.slice(0,t.length-e))}function $r(t){if(0===t.length)throw Error("Cannot get rows and columns of an empty shape array.");return[t.length>1?t[t.length-2]:1,t[t.length-1]]}function zr(t,e){var n;void 0===e&&(e=!1);var r=zt.get("WEBGL_MAX_TEXTURE_SIZE");if(e&&(r*=2,1===(t=t.map(function(e,n){return n>=t.length-2?v(t[n]):t[n]})).length&&(t=[2,t[0]])),2!==t.length){var i=P(t);t=i.newShape}var a=k(t);if(t.length<=1&&a<=r)return[1,a];if(2===t.length&&t[0]<=r&&t[1]<=r)return t;if(3===t.length&&t[0]*t[1]<=r&&t[2]<=r)return[t[0]*t[1],t[2]];if(3===t.length&&t[0]<=r&&t[1]*t[2]<=r)return[t[0],t[1]*t[2]];if(4===t.length&&t[0]*t[1]*t[2]<=r&&t[3]<=r)return[t[0]*t[1]*t[2],t[3]];if(4===t.length&&t[0]<=r&&t[1]*t[2]*t[3]<=r)return[t[0],t[1]*t[2]*t[3]];if(e){var o=Yr(t),s=2,c=2;return t.length&&(s=(n=$r(t))[0],c=n[1]),I(a=o*(s/2)*(c/2)).map(function(t){return 2*t})}return I(a)}function Vr(t){return t%2==0}function Hr(t,e){if(C(t=t.slice(-2),e=e.slice(-2)))return!0;if(!t.length||!e.length)return!0;if(0===t[0]||0===t[1]||0===e[0]||0===e[1])return!0;if(t.length!==e.length){var n=t.slice(-1)[0],r=e.slice(-1)[0];if(n===r)return!0;if(Vr(n)&&Vr(r)&&(1===t[0]||1===e[0]))return!0}return t[1]===e[1]&&Vr(t[0])&&Vr(e[0])}var qr=Object.freeze({callAndCheck:dr,canBeRepresented:pr,getWebGLErrorMessage:mr,getExtensionOrThrow:vr,createVertexShader:_r,createFragmentShader:gr,createProgram:yr,linkProgram:xr,validateProgram:wr,createStaticVertexBuffer:kr,createStaticIndexBuffer:Cr,getNumChannels:Er,createTexture:Sr,validateTextureSize:Ir,createFramebuffer:Mr,bindVertexBufferToProgramAttribute:Tr,bindTextureUnit:Dr,unbindTextureUnit:function(t,e,n){Fr(t,n),dr(t,e,function(){return t.activeTexture(t.TEXTURE0+n)}),dr(t,e,function(){return t.bindTexture(t.TEXTURE_2D,null)})},getProgramUniformLocationOrThrow:Rr,getProgramUniformLocation:Pr,bindTextureToProgramUniformSampler:Or,bindCanvasToFramebuffer:function(t,e){dr(t,e,function(){return t.bindFramebuffer(t.FRAMEBUFFER,null)}),dr(t,e,function(){return t.viewport(0,0,t.canvas.width,t.canvas.height)}),dr(t,e,function(){return t.scissor(0,0,t.canvas.width,t.canvas.height)})},bindColorTextureToFramebuffer:Lr,unbindColorTextureFromFramebuffer:Ar,validateFramebuffer:Nr,getFramebufferErrorMessage:Br,getBatchDim:Yr,getRowsCols:$r,getTextureShapeFromLogicalShape:zr,isReshapeFree:Hr});function Wr(t,e){var n=nn();return _r(t,e,n.version+"\n precision highp float;\n "+n.attribute+" vec3 clipSpacePos;\n "+n.attribute+" vec2 uv;\n "+n.varyingVs+" vec2 resultUV;\n\n void main() {\n gl_Position = vec4(clipSpacePos, 1);\n resultUV = uv;\n }")}function Ur(t,e){return kr(t,e,new Float32Array([-1,1,0,0,1,-1,-1,0,0,0,1,1,0,1,1,1,-1,0,1,0]))}function Gr(t,e){return Cr(t,e,new Uint16Array([0,1,2,2,1,3]))}function Kr(t,e){var n,r,i,a,o,s,c,u,l=t;return 2===zt.get("WEBGL_VERSION")?(n=l.R32F,r=l.R16F,i=l.RGBA16F,a=l.RGBA32F,o=l.RED,s=4,c=1,u=l.HALF_FLOAT):(n=t.RGBA,r=t.RGBA,i=t.RGBA,a=l.RGBA,o=t.RGBA,s=4,c=4,u=null!=e?e.HALF_FLOAT_OES:null),{internalFormatFloat:n,internalFormatHalfFloat:r,internalFormatPackedHalfFloat:i,internalFormatPackedFloat:a,textureFormatFloat:o,downloadTextureFormat:t.RGBA,downloadUnpackNumChannels:s,defaultNumChannels:c,textureTypeHalfFloat:u}}function Xr(t,e,n,r,i,a,o){Ir(n,r);var s=Sr(t,e),c=t.TEXTURE_2D;return dr(t,e,function(){return t.bindTexture(c,s)}),dr(t,e,function(){return t.texParameteri(c,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE)}),dr(t,e,function(){return t.texParameteri(c,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE)}),dr(t,e,function(){return t.texParameteri(c,t.TEXTURE_MIN_FILTER,t.NEAREST)}),dr(t,e,function(){return t.texParameteri(c,t.TEXTURE_MAG_FILTER,t.NEAREST)}),dr(t,e,function(){return t.texImage2D(c,0,i,n,r,0,a,o,null)}),dr(t,e,function(){return t.bindTexture(t.TEXTURE_2D,null)}),s}function Jr(t,e,n,r,i){var a=ar(n,r);return Xr(t,e,a[0],a[1],i.internalFormatFloat,i.textureFormatFloat,t.FLOAT)}function Zr(t,e,n,r,i){var a=ar(n,r);return Xr(t,e,a[0],a[1],i.internalFormatHalfFloat,i.textureFormatFloat,i.textureTypeHalfFloat)}function Qr(t,e,n,r,i){var a=ar(n,r);return Xr(t,e,a[0],a[1],t.RGBA,t.RGBA,t.UNSIGNED_BYTE)}function ti(t,e,n,r,i){var a=cr(n,r);return Xr(t,e,a[0],a[1],i.internalFormatPackedFloat,t.RGBA,t.FLOAT)}function ei(t,e,n,r,i){var a=cr(n,r);return Xr(t,e,a[0],a[1],i.internalFormatPackedHalfFloat,t.RGBA,i.textureTypeHalfFloat)}function ni(t,e,n,r){return dr(t,e,function(){return t.bindBuffer(t.ARRAY_BUFFER,r)}),Tr(t,e,n,"clipSpacePos",r,3,20,0)&&Tr(t,e,n,"uv",r,2,20,12)}function ri(t,e,n,r){dr(t,e,function(){return t.bindTexture(t.TEXTURE_2D,n)}),dr(t,e,function(){return t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,r)}),dr(t,e,function(){return t.bindTexture(t.TEXTURE_2D,null)})}function ii(t,e,n,r,i,a,o){Ir(r,i),dr(t,e,function(){return t.bindTexture(t.TEXTURE_2D,n)}),dr(t,e,function(){return t.texSubImage2D(t.TEXTURE_2D,0,0,0,r,i,o,t.FLOAT,a)}),dr(t,e,function(){return t.bindTexture(t.TEXTURE_2D,null)})}function ai(t,e,n,r,i,a,o,s){var c,u=ar(r,i),l=u[0],d=u[1],f=r*i;1===s.defaultNumChannels&&f===a.length?c=a:function(t,e,n){var r=or(t.length,n);if(e.length<r)throw new Error("unpackedArray length ("+e.length+") must be >= "+r);for(var i=0,a=0;a<t.length;++a)e[i]=t[a],i+=n}(a,c=new Float32Array(f*o),o),ii(t,e,n,l,d,c,s.textureFormatFloat)}function oi(t,e,n,r,i,a,o,s,c,u){var l=cr(o,s),d=l[0],f=l[1],h=new Float32Array(ur(o,s));(function(t,e,n,r,i){for(var a=r%2==1,o=n%2==1,s=Math.floor(r/2),c=Math.floor(n/2),u=Math.ceil(r/2),l=u*Math.ceil(n/2),d=v(n)*v(r),f=0;f<e;f++){for(var h=f*n*r,p=f*d,m=a?4:0,_=r,g=p,b=0;b<c;++b){for(var y=2*b*r,x=0;x<s;++x){var w=h+y+2*x;i[g]=t[w],i[g+1]=t[w+1],i[g+2]=t[w+_],i[g+3]=t[w+_+1],g+=4}g+=m}if(a){w=h+r-1,g=p+4*(u-1);var k=2*r;for(m=4*u,b=0;b<c;++b)i[g]=t[w],i[g+2]=t[w+r],w+=k,g+=m}if(o){for(w=h+(n-1)*r,g=p+4*(l-u),x=0;x<s;++x)i[g++]=t[w++],i[g++]=t[w++],g+=2;a&&o&&(i[p+d-4]=t[w])}}})(c,r,i,a,h),ii(t,e,n,d,f,h,t.RGBA)}function si(t,e,n,r,i,a){var o=n;if(2===zt.get("WEBGL_VERSION")){var s=t,c=s.createBuffer();dr(t,e,function(){return t.bindBuffer(s.PIXEL_PACK_BUFFER,c)});var u=4*or(r*i,a.downloadUnpackNumChannels);dr(t,e,function(){return t.bufferData(s.PIXEL_PACK_BUFFER,u,s.STREAM_READ)}),dr(t,e,function(){return s.readPixels(0,0,i,r,t.RGBA,t.FLOAT,0)}),dr(t,e,function(){return t.bindBuffer(s.PIXEL_PACK_BUFFER,null)}),o=c}return o}function ci(t,e,n,r,i){var a=t,o=new Float32Array(or(n*r,i.downloadUnpackNumChannels));a.bindBuffer(a.PIXEL_PACK_BUFFER,e),a.getBufferSubData(a.PIXEL_PACK_BUFFER,0,o),a.bindBuffer(a.PIXEL_PACK_BUFFER,null);var s=new Float32Array(n*r);return sr(o,s,i.downloadUnpackNumChannels),s}function ui(t,e,n,r,i){var a=ar(n,r),o=a[0],s=a[1],c=new Float32Array(or(n*r,i.downloadUnpackNumChannels));dr(t,e,function(){return t.readPixels(0,0,o,s,i.downloadTextureFormat,t.FLOAT,c)});var u=new Float32Array(n*r);return sr(c,u,i.downloadUnpackNumChannels),u}function li(t,e,n,r,i){var a=ar(n,r),o=a[0],s=a[1],c=new Uint8Array(or(n*r,4));return dr(t,e,function(){return t.readPixels(0,0,o,s,i.downloadTextureFormat,t.UNSIGNED_BYTE,c)}),new Float32Array(c.buffer)}function di(t,e,n,r,i,a,o,s){var c=t,u=new Float32Array(ur(a,o));c.bindBuffer(c.PIXEL_PACK_BUFFER,e),c.getBufferSubData(c.PIXEL_PACK_BUFFER,0,u),c.bindBuffer(c.PIXEL_PACK_BUFFER,null);var l=new Float32Array(k([n,r,i]));return lr(u,n,r,i,l),l}function fi(t,e,n,r,i,a,o,s){var c=cr(a,o),u=c[0],l=c[1],d=new Float32Array(ur(a,o));dr(t,e,function(){return t.readPixels(0,0,u,l,t.RGBA,t.FLOAT,d)});var f=new Float32Array(k([n,r,i]));return lr(d,n,r,i,f)}var hi=Object.freeze({createVertexShader:Wr,createVertexBuffer:Ur,createIndexBuffer:Gr,getTextureConfig:Kr,createFloat32MatrixTexture:Jr,createFloat16MatrixTexture:Zr,createUnsignedBytesMatrixTexture:Qr,createPackedMatrixTexture:ti,createFloat16PackedMatrixTexture:ei,bindVertexProgramAttributeStreams:ni,uploadPixelDataToTexture:ri,uploadMatrixToTexture:ai,uploadMatrixToPackedTexture:oi,maybeCreateBufferFromOutputTexture:si,downloadFloat32MatrixFromBuffer:ci,downloadFloat32MatrixFromOutputTexture:ui,downloadByteEncodedFloatMatrixFromOutputTexture:li,downloadPackedMatrixFromBuffer:di,downloadMatrixFromPackedOutputTexture:fi}),pi=function(){function t(t){this.outputTexture=null,this.program=null,this.disposed=!1,this.vertexAttrsAreBound=!1,this.itemsToPoll=[];var e=zt.get("WEBGL_VERSION");null!=t?(this.gl=t,function(t,e){d[t]=e}(e,t)):this.gl=h(e),1===zt.get("WEBGL_VERSION")?(this.textureFloatExtension=vr(this.gl,this.debug,"OES_texture_float"),this.colorBufferFloatExtension=this.gl.getExtension("WEBGL_color_buffer_float"),zt.get("WEBGL_RENDER_FLOAT32_ENABLED")||(this.textureHalfFloatExtension=vr(this.gl,this.debug,"OES_texture_half_float"),this.colorBufferHalfFloatExtension=this.gl.getExtension("EXT_color_buffer_half_float"))):this.colorBufferFloatExtension=vr(this.gl,this.debug,"EXT_color_buffer_float"),this.vertexBuffer=Ur(this.gl,this.debug),this.indexBuffer=Gr(this.gl,this.debug),this.framebuffer=Mr(this.gl,this.debug),this.textureConfig=Kr(this.gl,this.textureHalfFloatExtension)}return Object.defineProperty(t.prototype,"debug",{get:function(){return zt.get("DEBUG")},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){var t=this;if(!this.disposed){null!=this.program&&console.warn("Disposing a GPGPUContext that still has a bound WebGLProgram. This is probably a resource leak, delete the program with GPGPUContext.deleteProgram before disposing."),null!=this.outputTexture&&console.warn("Disposing a GPGPUContext that still has a bound output matrix texture. This is probably a resource leak, delete the output matrix texture with GPGPUContext.deleteMatrixTexture before disposing.");var e=this.gl;dr(e,this.debug,function(){return e.finish()}),dr(e,this.debug,function(){return e.bindFramebuffer(e.FRAMEBUFFER,null)}),dr(e,this.debug,function(){return e.deleteFramebuffer(t.framebuffer)}),dr(e,this.debug,function(){return e.bindBuffer(e.ARRAY_BUFFER,null)}),dr(e,this.debug,function(){return e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null)}),dr(e,this.debug,function(){return e.deleteBuffer(t.indexBuffer)}),this.disposed=!0}},t.prototype.createFloat32MatrixTexture=function(t,e){return this.throwIfDisposed(),Jr(this.gl,this.debug,t,e,this.textureConfig)},t.prototype.createFloat16MatrixTexture=function(t,e){return this.throwIfDisposed(),Zr(this.gl,this.debug,t,e,this.textureConfig)},t.prototype.createUnsignedBytesMatrixTexture=function(t,e){return this.throwIfDisposed(),Qr(this.gl,this.debug,t,e,this.textureConfig)},t.prototype.uploadPixelDataToTexture=function(t,e){this.throwIfDisposed(),ri(this.gl,this.debug,t,e)},t.prototype.createFloat16PackedMatrixTexture=function(t,e){return this.throwIfDisposed(),ei(this.gl,this.debug,t,e,this.textureConfig)},t.prototype.createPackedMatrixTexture=function(t,e){return this.throwIfDisposed(),ti(this.gl,this.debug,t,e,this.textureConfig)},t.prototype.deleteMatrixTexture=function(t){var e=this;this.throwIfDisposed(),this.outputTexture===t&&(Ar(this.gl,this.debug,this.framebuffer),this.outputTexture=null),dr(this.gl,this.debug,function(){return e.gl.deleteTexture(t)})},t.prototype.uploadMatrixToTexture=function(t,e,n,r){this.throwIfDisposed();var i=Er();return ai(this.gl,this.debug,t,e,n,r,i,this.textureConfig)},t.prototype.uploadMatrixToPackedTexture=function(t,e,n,r,i,a,o){return this.throwIfDisposed(),oi(this.gl,this.debug,t,e,n,r,i,a,o,this.textureConfig)},t.prototype.downloadFloat32MatrixFromOutputTexture=function(t,e,n){var r=this;return this.downloadMatrixDriver(t,function(){return ui(r.gl,r.debug,e,n,r.textureConfig)})},t.prototype.downloadByteEncodedFloatMatrixFromOutputTexture=function(t,e,n){var r=this;return this.downloadMatrixDriver(t,function(){return li(r.gl,r.debug,e,n,r.textureConfig)})},t.prototype.downloadPackedMatrixFromBuffer=function(t,e,n,r,i,a){return di(this.gl,t,e,n,r,i,a,this.textureConfig)},t.prototype.downloadFloat32MatrixFromBuffer=function(t,e,n){return ci(this.gl,t,e,n,this.textureConfig)},t.prototype.maybeCreateBufferFromTexture=function(t,e,n){this.bindTextureToFrameBuffer(t);var r=si(this.gl,this.debug,t,e,n,this.textureConfig);return this.unbindTextureToFrameBuffer(),r},t.prototype.createAndWaitForFence=function(){var t=this.createFence(this.gl);return this.pollFence(t)},t.prototype.createFence=function(t){var e,n,r=this;if(zt.get("WEBGL_FENCE_API_ENABLED")){var i=t,a=i.fenceSync(i.SYNC_GPU_COMMANDS_COMPLETE,0);t.flush(),n=function(){var t=i.clientWaitSync(a,0,0);return t===i.ALREADY_SIGNALED||t===i.CONDITION_SATISFIED},e=a}else zt.get("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0?(e=this.beginQuery(),this.endQuery(),n=function(){return r.isQueryAvailable(e,zt.get("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))}):n=function(){return!0};return{query:e,isFencePassed:n}},t.prototype.downloadMatrixFromPackedTexture=function(t,e,n,r,i,a){var o=this;return this.downloadMatrixDriver(t,function(){return fi(o.gl,o.debug,e,n,r,i,a,o.textureConfig)})},t.prototype.createProgram=function(t){this.throwIfDisposed();var e=this.gl,n=gr(e,this.debug,t),r=Wr(e,this.debug),i=yr(e,this.debug);return dr(e,this.debug,function(){return e.attachShader(i,r)}),dr(e,this.debug,function(){return e.attachShader(i,n)}),xr(e,this.debug,i),this.debug&&wr(e,this.debug,i),this.vertexAttrsAreBound||(this.setProgram(i),this.vertexAttrsAreBound=ni(e,this.debug,this.program,this.vertexBuffer)),i},t.prototype.deleteProgram=function(t){var e=this;this.throwIfDisposed(),t===this.program&&(this.program=null),null!=t&&dr(this.gl,this.debug,function(){return e.gl.deleteProgram(t)})},t.prototype.setProgram=function(t){var e=this;this.throwIfDisposed(),this.program=t,null!=this.program&&this.debug&&wr(this.gl,this.debug,this.program),dr(this.gl,this.debug,function(){return e.gl.useProgram(t)})},t.prototype.getUniformLocation=function(t,e,n){return void 0===n&&(n=!0),this.throwIfDisposed(),n?Rr(this.gl,this.debug,t,e):Pr(this.gl,t,e)},t.prototype.getAttributeLocation=function(t,e){var n=this;return this.throwIfDisposed(),dr(this.gl,this.debug,function(){return n.gl.getAttribLocation(t,e)})},t.prototype.getUniformLocationNoThrow=function(t,e){return this.throwIfDisposed(),this.gl.getUniformLocation(t,e)},t.prototype.setInputMatrixTexture=function(t,e,n){this.throwIfDisposed(),this.throwIfNoProgram(),Or(this.gl,this.debug,this.program,t,e,n)},t.prototype.setOutputMatrixTexture=function(t,e,n){this.setOutputMatrixTextureDriver(t,n,e)},t.prototype.setOutputPackedMatrixTexture=function(t,e,n){this.throwIfDisposed();var r=cr(e,n),i=r[0],a=r[1];this.setOutputMatrixTextureDriver(t,i,a)},t.prototype.setOutputMatrixWriteRegion=function(t,e,n,r){this.setOutputMatrixWriteRegionDriver(n,t,r,e)},t.prototype.setOutputPackedMatrixWriteRegion=function(t,e,n,r){throw new Error("setOutputPackedMatrixWriteRegion not implemented.")},t.prototype.debugValidate=function(){null!=this.program&&wr(this.gl,this.debug,this.program),Nr(this.gl)},t.prototype.executeProgram=function(){this.throwIfDisposed(),this.throwIfNoProgram();var t=this.gl;this.debug&&this.debugValidate(),dr(t,this.debug,function(){return t.drawElements(t.TRIANGLES,6,t.UNSIGNED_SHORT,0)})},t.prototype.blockUntilAllProgramsCompleted=function(){var t=this;this.throwIfDisposed(),dr(this.gl,this.debug,function(){return t.gl.finish()})},t.prototype.getQueryTimerExtension=function(){return null==this.disjointQueryTimerExtension&&(this.disjointQueryTimerExtension=vr(this.gl,this.debug,2===zt.get("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")?"EXT_disjoint_timer_query_webgl2":"EXT_disjoint_timer_query")),this.disjointQueryTimerExtension},t.prototype.getQueryTimerExtensionWebGL2=function(){return this.getQueryTimerExtension()},t.prototype.getQueryTimerExtensionWebGL1=function(){return this.getQueryTimerExtension()},t.prototype.beginQuery=function(){if(2===zt.get("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")){var t=this.gl,e=this.getQueryTimerExtensionWebGL2(),n=t.createQuery();return t.beginQuery(e.TIME_ELAPSED_EXT,n),n}var r=this.getQueryTimerExtensionWebGL1(),i=r.createQueryEXT();return r.beginQueryEXT(r.TIME_ELAPSED_EXT,i),i},t.prototype.endQuery=function(){if(2!==zt.get("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")){var t=this.getQueryTimerExtensionWebGL1();t.endQueryEXT(t.TIME_ELAPSED_EXT)}else{var e=this.gl,n=this.getQueryTimerExtensionWebGL2();e.endQuery(n.TIME_ELAPSED_EXT)}},t.prototype.waitForQueryAndGetTime=function(t){return u(this,void 0,void 0,function(){var e=this;return l(this,function(n){switch(n.label){case 0:return[4,T(function(){return e.disposed||e.isQueryAvailable(t,zt.get("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))})];case 1:return n.sent(),[2,this.getQueryTime(t,zt.get("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))]}})})},t.prototype.getQueryTime=function(t,e){if(0===e)return null;if(2===e){var n=this.gl;return n.getQueryParameter(t,n.QUERY_RESULT)/1e6}var r=this.getQueryTimerExtensionWebGL1();return r.getQueryObjectEXT(t,r.QUERY_RESULT_EXT)/1e6},t.prototype.isQueryAvailable=function(t,e){if(0===e)return!0;if(2===e){var n=this.gl,r=this.getQueryTimerExtensionWebGL2(),i=n.getQueryParameter(t,n.QUERY_RESULT_AVAILABLE);return null==this.disjoint&&(this.disjoint=this.gl.getParameter(r.GPU_DISJOINT_EXT)),i&&!this.disjoint}return i=(r=this.getQueryTimerExtensionWebGL1()).getQueryObjectEXT(t,r.QUERY_RESULT_AVAILABLE_EXT),null==this.disjoint&&(this.disjoint=this.gl.getParameter(r.GPU_DISJOINT_EXT)),i&&!this.disjoint},t.prototype.pollFence=function(t){var e=this;return new Promise(function(n){e.addItemToPoll(function(){return t.isFencePassed()},function(){return n()})})},t.prototype.pollItems=function(){for(var t=function(t){for(var e=0;e<t.length&&t[e]();++e);return e-1}(this.itemsToPoll.map(function(t){return t.isDoneFn})),e=0;e<=t;++e)(0,this.itemsToPoll[e].resolveFn)();this.itemsToPoll=this.itemsToPoll.slice(t+1)},t.prototype.addItemToPoll=function(t,e){var n=this;this.itemsToPoll.push({isDoneFn:t,resolveFn:e}),this.itemsToPoll.length>1||T(function(){return n.pollItems(),0===n.itemsToPoll.length})},t.prototype.bindTextureToFrameBuffer=function(t){this.throwIfDisposed(),Lr(this.gl,this.debug,t,this.framebuffer),this.debug&&Nr(this.gl)},t.prototype.unbindTextureToFrameBuffer=function(){null!=this.outputTexture?(Lr(this.gl,this.debug,this.outputTexture,this.framebuffer),this.debug&&Nr(this.gl)):Ar(this.gl,this.debug,this.framebuffer)},t.prototype.downloadMatrixDriver=function(t,e){this.bindTextureToFrameBuffer(t);var n=e();return this.unbindTextureToFrameBuffer(),n},t.prototype.setOutputMatrixTextureDriver=function(t,e,n){this.throwIfDisposed();var r=this.gl;Lr(r,this.debug,t,this.framebuffer),this.debug&&Nr(r),this.outputTexture=t,dr(r,this.debug,function(){return r.viewport(0,0,e,n)}),dr(r,this.debug,function(){return r.scissor(0,0,e,n)})},t.prototype.setOutputMatrixWriteRegionDriver=function(t,e,n,r){var i=this;this.throwIfDisposed(),dr(this.gl,this.debug,function(){return i.gl.scissor(t,e,n,r)})},t.prototype.throwIfDisposed=function(){if(this.disposed)throw new Error("Attempted to use disposed GPGPUContext.")},t.prototype.throwIfNoProgram=function(){if(null==this.program)throw new Error("No GPU program is currently set.")},t}();function mi(t,e){if(t.length!==e.length)throw Error("Binary was compiled with "+t.length+" inputs, but was executed with "+e.length+" inputs");t.forEach(function(t,n){var r=t.logicalShape,i=e[n],a=i.shape;if(!C(r,a))throw Error("Binary was compiled with different shapes than the current args. Shapes "+r+" and "+a+" must match");if(!t.isUniform||!i.isUniform){var o=t.texShape,s=i.isUniform?null:i.texData.texShape;if(!C(o,s))throw Error("Binary was compiled with different texture shapes than the current args. Shape "+o+" and "+s+" must match")}})}var vi=function(t,e,n){this.variableNames=["A"],this.usesPackedTextures=!0,this.outputShape=t;var r=n.filterWidth,i=n.inChannels,a=n.strideWidth,o=n.strideHeight,s=n.padInfo,c=n.outWidth,u=n.dilationWidth,l=n.dilationHeight,d=s.left,f=s.top,h=i*r,p=nn();this.userCode="\n void main() {\n ivec2 rc = getOutputCoords();\n\n vec4 result = vec4(0);\n\n for(int row=0; row<=1; row++) {\n for(int col=0; col<=1; col++) {\n int blockIndex = rc.y + col;\n int pos = rc.x + row;\n\n if(blockIndex >= "+t[1]+" || pos >= "+t[0]+") continue;\n\n int offsetY = int(blockIndex / ("+c+")) * "+o+" - "+f+";\n int d0 = offsetY + "+l+" * (pos / "+h+");\n\n if(d0 >= "+e[0]+" || d0 < 0) continue;\n\n int offsetX = int(mod(float(blockIndex), "+c+".) * "+a+". - "+d+".);\n int d1 = offsetX + "+u+" * (int(mod(float(pos), "+h+".) / "+i+".));\n\n if(d1 >= "+e[1]+" || d1 < 0) continue;\n\n vec2 innerDims = vec2(d1, int(mod(float(pos), "+i+".)));\n result[row * 2 + col] = getChannel(getA(d0, int(innerDims.x),\n int(innerDims.y)), innerDims);\n }\n }\n\n "+p.output+" = result;\n }\n "},_i=function(t,e,n,r,i){this.variableNames=["x"],this.outputShape=[];var a,o=e,s=t[3]-1;this.outputShape=t;var c="float("+n+") + float("+r+") * sum";a=.5===i?"inversesqrt("+c+")":1===i?"1.0/("+c+")":"exp(log("+c+") * float(-"+i+"));",this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int r = coords[1];\n int c = coords[2];\n int d = coords[3];\n float x = getX(b, r, c, d);\n float sum = 0.0;\n for (int j = -"+o+"; j <= "+o+"; j++) {\n int idx = d + j;\n if (idx >= 0 && idx <= "+s+") {\n float z = getX(b, r, c, idx);\n sum += z * z;\n }\n }\n float val = x * "+a+";\n setOutput(val);\n }\n "},gi=function(t,e,n,r,i){this.variableNames=["inputImage","outputImage","dy"],this.outputShape=[],this.outputShape=t,this.depth=t[3],this.depthRadius=e,this.bias=n,this.alpha=r,this.beta=i,this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int r = coords[1];\n int c = coords[2];\n\n float result = 0.0;\n for (int d = 0; d < "+this.depth+"; ++d) {\n int depthBegin = int(max(0.0, float(d - "+e+")));\n int depthEnd = int(min(float("+this.depth+"),\n float(d + "+e+" + 1)));\n\n const int MIN_DEPTH_BEGIN = 0;\n const int MAX_DEPTH_END = "+this.depth+";\n\n float norm = 0.0;\n for (int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k) {\n if (k < depthBegin){\n continue;\n }\n else if (k >= depthBegin && k < depthEnd) {\n norm += getInputImage(b, r, c, k) * getInputImage(b, r, c, k);\n }\n else {\n break;\n }\n }\n\n norm = float("+r+") * norm + float("+n+");\n\n for(int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k){\n if (k < depthBegin){\n continue;\n }\n else if (k >= depthBegin && k < depthEnd){\n float dyi = -2.0 * float("+r+")\n * float("+i+")\n * getInputImage(b ,r ,c, k) * getOutputImage(b, r, c, d)\n / norm;\n if (k == d) {\n dyi += pow(norm, -1.0 * "+i+");\n }\n if (k == coords[3]) {\n dyi *= getDy(b, r, c, d);\n result += dyi;\n }\n }\n else {\n break;\n }\n }\n }\n setOutput(result);\n }\n "},bi=function(t){this.variableNames=["dy","maxPos"],this.outputShape=t.inShape;var e=t.strideHeight,n=t.strideWidth,r=t.dilationHeight,i=t.effectiveFilterHeight,a=t.effectiveFilterWidth,o=i-1-t.padInfo.top,s=a-1-t.padInfo.left,c=i*a-1;this.userCode="\n const ivec2 pads = ivec2("+o+", "+s+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n\n ivec2 dyRCCorner = coords.yz - pads;\n int dyRCorner = dyRCCorner.x;\n int dyCCorner = dyRCCorner.y;\n\n // Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < "+i+";\n wR += "+r+") {\n float dyR = float(dyRCorner + wR) / "+e+".0;\n\n if (dyR < 0.0 || dyR >= "+t.outHeight+".0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < "+a+"; wC++) {\n float dyC = float(dyCCorner + wC) / "+n+".0;\n\n if (dyC < 0.0 || dyC >= "+t.outWidth+".0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(b, idyR, idyC, d);\n int maxPosValue = "+c+" - int(getMaxPos(b, idyR, idyC, d));\n\n // Get the current value, check it against the value from the\n // position matrix.\n int curPosValue = wR * "+a+" + wC;\n float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);\n\n dotProd += dyValue * mask;\n }\n }\n setOutput(dotProd);\n }\n "},yi=function(t,e,n,r,i,a){void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===i&&(i=!1),void 0===a&&(a=null),this.variableNames=["matrixA","matrixB"],this.usesPackedTextures=!0,this.outputShape=e;var o=n?t[1]:t[2],s=Math.ceil(o/2),c=n?"i * 2, rc.y":"rc.y, i * 2",u=r?"rc.z, i * 2":"i * 2, rc.z",l=n?["a.xxyy","a.zzww"]:["a.xxzz","a.yyww"],d=r?["b.xzxz","b.ywyw"]:["b.xyxy","b.zwzw"],f="",h="";a&&(f="vec4 activation(vec4 x) {\n "+a+"\n }",h="result = activation(result);");var p=i?"result += getBiasAtOutCoords();":"";i&&this.variableNames.push("bias"),this.userCode="\n "+f+"\n\n const float sharedDimension = "+s+".0;\n\n vec4 dot2x2ARowBCol(ivec3 rc) {\n vec4 result = vec4(0);\n for (int i = 0; i < "+s+"; i++) {\n vec4 a = getMatrixA(rc.x, "+c+");\n vec4 b = getMatrixB(rc.x, "+u+");\n\n result += ("+l[0]+" * "+d[0]+") + ("+l[1]+" * "+d[1]+");\n }\n return result;\n }\n\n void main() {\n ivec3 rc = getOutputCoords();\n vec4 result = dot2x2ARowBCol(rc);\n\n "+p+"\n\n "+h+"\n\n setOutput(result);\n }\n "},xi=function(){function t(t,e,n){this.variableNames=["probs"],this.outputShape=[t,n],this.userCode="\n uniform float seed;\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n\n float r = random(seed);\n float cdf = 0.0;\n\n for (int i = 0; i < "+(e-1)+"; i++) {\n cdf += getProbs(batch, i);\n\n if (r < cdf) {\n setOutput(float(i));\n return;\n }\n }\n\n // If no other event happened, last event happened.\n setOutput(float("+(e-1)+"));\n }\n "}return t.prototype.getCustomSetupFunc=function(t){var e=this;return function(n,r){null==e.seedLoc&&(e.seedLoc=n.getUniformLocation(r,"seed")),n.gl.uniform1f(e.seedLoc,t)}},t}(),wi=function(t,e,n,r){this.variableNames=["indices"],this.outputShape=[t,e],this.userCode="\n void main() {\n ivec2 coords = getOutputCoords();\n int index = round(getIndices(coords.x));\n setOutput(mix(float("+r+"), float("+n+"),\n float(index == coords.y)));\n }\n "},ki=function(t){this.variableNames=["A"],this.isPackShader=!0,this.outputShape=t;var e=t.length;if(0===e)this.userCode="\n void main() {\n setOutput(vec4(getA(), 0., 0., 0.));\n }\n ";else{var n=Ze("rc",e),r=mn(e),i=function(t,e,n){if(1===t)return"rc > "+e[0];for(var r="",i=t-2;i<t;i++)r+=n[i]+" >= "+e[i],i<t-1&&(r+="||");return r}(e,t,n),a=function(t,e,n,r){if(1===t)return"";var i=r.slice(-2);return"\n int r = "+i[0]+";\n int c = "+i[1]+";\n int rp1 = r + 1;\n int cp1 = c + 1;\n\n bool cEdge = cp1 >= "+e+";\n bool rEdge = rp1 >= "+n+";\n "}(e,t[t.length-1],t[t.length-2],n),o=function(t,e){var n=t.length,r=function(t,e){for(var n=[],r=0;r<=1;r++)for(var i=0;i<=1;i++){for(var a=(0===r?"r":"rp1")+", "+(0===i?"c":"cp1"),o=2;o<t;o++)a=e[e.length-1-o]+","+a;n.push(a)}return n}(n,e);return 1===n?"getA(rc),\n rc + 1 >= "+t[0]+" ? 0. : getA(rc + 1),\n 0, 0":"getA("+r[0]+"),\n cEdge ? 0. : getA("+r[1]+"),\n rEdge ? 0. : getA("+r[2]+"),\n rEdge || cEdge ? 0. : getA("+r[3]+")"}(t,n);this.userCode="\n void main() {\n "+r+" rc = getOutputCoords();\n\n if("+i+") {\n setOutput(vec4(0));\n } else {\n "+a+"\n\n setOutput(vec4("+o+"));\n }\n }\n "}};var Ci=function(t,e,n){this.variableNames=["x"],this.outputShape=e.map(function(e,n){return e[0]+t[n]+e[1]});var r=t.length,i=mn(r),a=e.map(function(t){return t[0]}).join(","),o=e.map(function(e,n){return e[0]+t[n]}).join(","),s=["coords[0]","coords[1]","coords[2]","coords[3]"].slice(0,r);this.userCode=1!==r?"\n "+i+" start = "+i+"("+a+");\n "+i+" end = "+i+"("+o+");\n\n void main() {\n "+i+" outC = getOutputCoords();\n if (any(lessThan(outC, start)) || any(greaterThanEqual(outC, end))) {\n setOutput(float("+n+"));\n } else {\n "+i+" coords = outC - start;\n setOutput(getX("+s+"));\n }\n }\n ":"\n int start = "+a+";\n int end = "+o+";\n\n void main() {\n int outC = getOutputCoords();\n if (outC < start || outC >= end) {\n setOutput(float("+n+"));\n } else {\n setOutput(getX(outC - start));\n }\n }\n "},Ei=function(t,e,n){this.variableNames=["x"],this.usesPackedTextures=!0,this.outputShape=e.map(function(e,n){return e[0]+t[n]+e[1]});for(var r=t.length,i=mn(r),a=e.map(function(t){return t[0]}).join(","),o=e.map(function(e,n){return e[0]+t[n]}).join(","),s=Ze("rc",r),c=Ze("source",r),u=s[r-1]+" < "+this.outputShape[r-1],l=1===r?"source":"vec2("+c.slice(-2).join()+")",d=[i+" rc = outputLoc;",s[r-1]+" += 1;\n if("+u+") {\n ",1===r?"":"}\n rc = outputLoc;\n "+s[r-2]+" += 1;\n if("+s[r-2]+" < "+this.outputShape[r-2]+") {",1===r?"":" "+s[r-1]+" += 1;\n if("+u+") {"],f=1===r?"rc < start || rc >= end":"any(lessThan(rc, start)) || any(greaterThanEqual(rc, end))",h="",p=0,m=1===r?2:4;p<m;p++)h+="\n "+d[p]+"\n if ("+f+") {\n result["+p+"] = float("+n+");\n } else {\n "+i+" source = rc - start;\n result["+p+"] = getChannel(getX("+c.join()+"), "+l+");\n }\n ";h+=1===r?"} ":"}}",this.userCode="\n const "+i+" start = "+i+"("+a+");\n const "+i+" end = "+i+"("+o+");\n\n void main() {\n "+i+" outputLoc = getOutputCoords();\n vec4 result = vec4(0.);\n "+h+"\n setOutput(result);\n }\n "},Si=function(t,e,n){if(this.variableNames=["x"],"avg"===e&&n)throw new Error("Cannot compute positions for average pool.");var r=t.filterWidth,i=t.strideHeight,a=t.strideWidth,o=t.dilationHeight,s=t.dilationWidth,c=t.effectiveFilterHeight,u=t.effectiveFilterWidth,l=t.padInfo.top,d=t.padInfo.left;this.outputShape=t.outShape;var f="avg"===e,h="0.0";if(f||(h="-1.0 / 1e-20"),n)this.userCode="\n const ivec2 strides = ivec2("+i+", "+a+");\n const ivec2 pads = ivec2("+l+", "+d+");\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d = coords[3];\n\n ivec2 xRCCorner = coords.yz * strides - pads;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // max/min x(?, ?, d) to get y(yR, yC, d).\n // ? = to be determined\n float minMaxValue = 0.0;\n float minMaxValueFound = 0.0;\n int minMaxPosition = 0;\n float avgValue = 0.0;\n\n for (int wR = 0; wR < "+c+";\n wR += "+o+") {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= "+t.inHeight+") {\n continue;\n }\n\n for (int wC = 0; wC < "+u+";\n wC += "+s+") {\n int xC = xCCorner + wC;\n\n if (xC < 0 || xC >= "+t.inWidth+") {\n continue;\n }\n\n float value = getX(batch, xR, xC, d);\n\n // If a min / max value has already been found, use it. If not,\n // use the current value.\n float currMinMaxValue = mix(\n value, minMaxValue, minMaxValueFound);\n if (value >= currMinMaxValue) {\n minMaxValue = value;\n minMaxValueFound = 1.0;\n minMaxPosition = wR * "+u+" + wC;\n }\n }\n }\n setOutput(float(minMaxPosition));\n }\n ";else{var p=e+"("+e+"("+e+"(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])";"avg"===e&&(p="avgValue / count");var m=4*Math.floor(r/4),v=r%4,_="\n if ("+f+") {\n avgValue += dot(values, ones);\n } else {\n minMaxValue = max(values, minMaxValue);\n }\n ";this.userCode="\n const ivec2 strides = ivec2("+i+", "+a+");\n const ivec2 pads = ivec2("+l+", "+d+");\n const float initializationValue = "+h+";\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float count = 0.0;\n\n float getValue(int batch, int xR, int xC, int d) {\n if (xC < 0 || xC >= "+t.inWidth+") {\n return initializationValue;\n }\n count += 1.0;\n return getX(batch, xR, xC, d);\n }\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d = coords[3];\n\n ivec2 xRCCorner = coords.yz * strides - pads;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // max/min x(?, ?, d) to get y(yR, yC, d).\n // ? = to be determined\n vec4 minMaxValue = vec4("+h+");\n float avgValue = 0.0;\n count = 0.0;\n\n for (int wR = 0; wR < "+c+";\n wR += "+o+") {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= "+t.inHeight+") {\n continue;\n }\n\n for (int wC = 0; wC < "+m+"; wC += 4) {\n int xC = xCCorner + wC * "+s+";\n\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n getValue(batch, xR, xC + "+s+", d),\n getValue(batch, xR, xC + 2 * "+s+", d),\n getValue(batch, xR, xC + 3 * "+s+", d)\n );\n\n "+_+"\n }\n\n int xC = xCCorner + "+m+";\n if ("+(1===v)+") {\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n "+_+"\n } else if ("+(2===v)+") {\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n getValue(batch, xR, xC + "+s+", d),\n initializationValue,\n initializationValue\n );\n\n "+_+"\n } else if ("+(3===v)+") {\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n getValue(batch, xR, xC + "+s+", d),\n getValue(batch, xR, xC + 2 * "+s+", d),\n initializationValue\n );\n\n "+_+"\n }\n }\n setOutput("+p+");\n }\n "}},Ii=function(t,e){this.variableNames=["x"];var n=t.windowSize,r=t.batchSize,i=t.inSize,a=Math.ceil(i/n);this.outputShape=[r,a];var o="0.0",s="";"prod"===e?o="1.0":"min"===e?(o="1.0 / 1e-20",s="min"):"max"===e&&(o="-1.0 / 1e-20",s="max");var c=e+"("+e+"("+e+"(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])";"sum"===e?c="sumValue":"prod"===e?c="prodValue":"all"===e?c="allValue":"any"===e&&(c="anyValue");var u=4*Math.floor(n/4),l=n%4,d="\n if ("+("sum"===e)+") {\n sumValue += dot(values, ones);\n } else if ("+("prod"===e)+") {\n vec2 tmp = vec2(values[0], values[1]) * vec2(values[2], values[3]);\n prodValue *= tmp[0] * tmp[1];\n } else {\n minMaxValue = "+s+"(values, minMaxValue);\n }\n ",f="vec4";"all"===e?(o="1.0",d="\n bool reducedAllValue = all(values);\n float floatedReducedAllValue = float(reducedAllValue);\n allValue = float(allValue >= 1.0 && floatedReducedAllValue >= 1.0);\n ",f="bvec4"):"any"===e&&(o="0.0",d="\n bool reducedAnyValue = any(values);\n float floatedReducedAnyValue = float(reducedAnyValue);\n anyValue = float(anyValue >= 1.0 || floatedReducedAnyValue >= 1.0);\n ",f="bvec4");var h="";i%n>0&&(h="\n if (inIdx < 0 || inIdx >= "+i+") {\n return initializationValue;\n }\n "),this.userCode="\n const float initializationValue = "+o+";\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float getValue(int batch, int inIdx) {\n "+h+"\n return getX(batch, inIdx);\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = outIdx * "+n+";\n\n vec4 minMaxValue = vec4("+o+");\n float prodValue = 1.0;\n float sumValue = 0.0;\n float allValue = 1.0;\n float anyValue = 0.0;\n\n for (int i = 0; i < "+u+"; i += 4) {\n int inIdx = inOffset + i;\n "+f+" values = "+f+"(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n getValue(batch, inIdx + 3)\n );\n\n "+d+"\n }\n\n int inIdx = inOffset + "+u+";\n if ("+(1===l)+") {\n "+f+" values = "+f+"(\n getValue(batch, inIdx),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n "+d+"\n } else if ("+(2===l)+") {\n "+f+" values = "+f+"(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n initializationValue,\n initializationValue\n );\n\n "+d+"\n } else if ("+(3===l)+") {\n "+f+" values = "+f+"(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n initializationValue\n );\n\n "+d+"\n }\n setOutput("+c+");\n }\n "},Mi=function(t,e){this.variableNames=["A"],this.usesPackedTextures=!0,this.outputShape=t;for(var n="",r=0;r<4;r++){var i="thisRC = rc;";r%2==1&&(i+="thisRC.z += 1;"),r>1&&(i+="thisRC.y += 1;"),n+="\n "+i+"\n "+(r>0?"if(thisRC.y < rows && thisRC.z < cols){":"")+"\n int flatIndex = getFlatIndex(thisRC);\n\n ivec3 inputRC = inputCoordsFromReshapedOutCoords(flatIndex);\n vec2 inputRCInnerDims = vec2(float(inputRC.y),float(inputRC.z));\n\n result["+r+"] =\n getChannel(getA(inputRC.x, inputRC.y, inputRC.z), inputRCInnerDims);\n "+(r>0?"}":"")+"\n "}this.userCode="\n "+function(t){return"\n ivec3 inputCoordsFromReshapedOutCoords(int index) {\n "+rn(["r","c","d"],t)+"\n return ivec3(r, c, d);\n }\n "}(e)+"\n "+function(t){return"\n int getFlatIndex(ivec3 coords) {\n return round("+function(t,e){if(t.length!==e.length)throw new Error("Vectors to be dotted must be of the same length -got "+t.length+" and "+e.length);for(var n=[],r=Math.floor(t.length/4),i=t.length%4,a=0;a<r;a++){var o=t.slice(4*a,4*a+4),s=e.slice(4*a,4*a+4);n.push(an(o)+", "+an(s))}return 0!==i&&(o=t.slice(4*r),s=e.slice(4*r),1===o.length&&(o=o.map(function(t){return"float("+t+")"}),s=s.map(function(t){return"float("+t+")"})),n.push(an(o)+", "+an(s))),n.map(function(t,e){return"dot("+t+")"}).join("+")}(["coords.x","coords.y","coords.z"],U(t).map(function(t){return t.toString()}).concat(["1."]))+");\n }\n "}(t)+"\n\n void main() {\n ivec3 rc = getOutputCoords();\n\n vec4 result = vec4(0.);\n\n ivec3 thisRC;\n int rows = "+t[1]+";\n int cols = "+t[2]+";\n\n "+n+"\n\n setOutput(result);\n }\n "};var Ti=function(t,e,n){this.variableNames=["dy"],this.outputShape=[],this.outputShape=e.shape;var r=e.shape,i=r[1],a=r[2],o=t.shape,s=o[1],c=o[2],u=[n&&s>1?i-1:i,n&&c>1?a-1:a],l=[n&&s>1?s-1:s,n&&c>1?c-1:c],d=u[0]/l[0],f=u[1]/l[1],h=1/d,p=1/f,m=2*Math.ceil(h)+2,v=2*Math.ceil(p)+2;this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n int r = coords[1];\n int c = coords[2];\n\n float accumulator = 0.0;\n\n const float heightScale = float("+d+");\n const float widthScale = float("+f+");\n\n const float invHeightScale = float("+h+");\n const float invWidthScale = float("+p+");\n\n const int winHeight = int("+m+");\n const int winWidth = int("+v+");\n\n // Compute bounds for where in dy we will look\n float startRLerp = floor(float(r) * invHeightScale);\n int startDyR = int(startRLerp - float(winHeight / 2));\n\n float startCLerp = floor(float(c) * invWidthScale);\n int startDyC = int(startCLerp - float(winWidth / 2));\n\n // Loop over dy\n for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {\n int dyR = dyROffset + startDyR;\n\n // Guard against the window exceeding the bounds of dy\n if (dyR < 0 || dyR >= "+s+") {\n continue;\n }\n\n for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {\n int dyC = dyCOffset + startDyC;\n\n // Guard against the window exceeding the bounds of dy\n if (dyC < 0 || dyC >= "+c+") {\n continue;\n }\n\n float dxR = float(dyR) * heightScale;\n int topDxRIndex = int(floor(dxR));\n int bottomDxRIndex = int(min(ceil(dxR), "+(i-1)+".0));\n float dxRLerp = dxR - float(topDxRIndex);\n float inverseDxRLerp = 1.0 - dxRLerp;\n\n float dxC = float(dyC) * widthScale;\n int leftDxCIndex = int(floor(dxC));\n int rightDxCIndex = int(min(ceil(dxC), "+(a-1)+".0));\n float dxCLerp = dxC - float(leftDxCIndex);\n float inverseDxCLerp = 1.0 - dxCLerp;\n\n if (r == topDxRIndex && c == leftDxCIndex) {\n // topLeft\n accumulator +=\n getDy(b, dyR, dyC, d) * inverseDxRLerp * inverseDxCLerp;\n }\n\n if (r == topDxRIndex && c == rightDxCIndex) {\n // topRight\n accumulator += getDy(b, dyR, dyC, d) * inverseDxRLerp * dxCLerp;\n }\n\n if (r == bottomDxRIndex && c == leftDxCIndex) {\n // bottomLeft\n accumulator += getDy(b, dyR, dyC, d) * dxRLerp * inverseDxCLerp;\n }\n\n if (r == bottomDxRIndex && c == rightDxCIndex) {\n // bottomRight\n accumulator += getDy(b, dyR, dyC, d) * dxRLerp * dxCLerp;\n }\n }\n }\n // End loop over dy\n\n setOutput(accumulator);\n }\n "},Di=function(t,e,n,r){this.variableNames=["A"],this.outputShape=[];var i=t[0],a=t[1],o=t[2],s=t[3];this.outputShape=[i,e,n,s];var c=[r&&e>1?a-1:a,r&&n>1?o-1:o],u=[r&&e>1?e-1:e,r&&n>1?n-1:n];this.userCode="\n const vec2 effectiveInputOverOutputRatioRC = vec2(\n "+c[0]/u[0]+",\n "+c[1]/u[1]+");\n const vec2 inputShapeRC = vec2("+a+".0, "+o+".0);\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n ivec2 yRC = coords.yz;\n\n // Fractional source index.\n vec2 sourceFracIndexRC = vec2(yRC) * effectiveInputOverOutputRatioRC;\n\n // Compute the four integer indices.\n ivec2 sourceFloorRC = ivec2(sourceFracIndexRC);\n ivec2 sourceCeilRC = ivec2(\n min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));\n\n float topLeft = getA(b, sourceFloorRC.x, sourceFloorRC.y, d);\n float bottomLeft = getA(b, sourceCeilRC.x, sourceFloorRC.y, d);\n float topRight = getA(b, sourceFloorRC.x, sourceCeilRC.y, d);\n float bottomRight = getA(b, sourceCeilRC.x, sourceCeilRC.y, d);\n\n vec2 fracRC = sourceFracIndexRC - vec2(sourceFloorRC);\n\n float top = topLeft + (topRight - topLeft) * fracRC.y;\n float bottom = bottomLeft + (bottomRight - bottomLeft) * fracRC.y;\n float newValue = top + (bottom - top) * fracRC.x;\n\n setOutput(newValue);\n }\n "},Ri=function(t,e,n,r){this.variableNames=["A"],this.usesPackedTextures=!0,this.outputShape=[];var i=t[0],a=t[1],o=t[2],s=t[3];this.outputShape=[i,e,n,s];var c=[r&&e>1?a-1:a,r&&n>1?o-1:o],u=[r&&e>1?e-1:e,r&&n>1?n-1:n];this.userCode="\n const vec3 effectiveInputOverOutputRatioRC = vec3(\n "+c[0]/u[0]+",\n "+c[1]/u[1]+",\n "+c[1]/u[1]+");\n const vec3 inputShapeRC = vec3("+a+".0, "+o+".0,\n "+o+".0);\n\n float getAValue(int b, int r, int c, int d) {\n return getChannel(getA(b, r, c, d), vec2(c, d));\n }\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n // Calculate values for next column in yRC.z.\n ivec3 yRC = coords.yzz + ivec3(0, 0, 1);\n\n // Fractional source index.\n vec3 sourceFracIndexRC = vec3(yRC) * effectiveInputOverOutputRatioRC;\n\n // Compute the four integer indices.\n ivec3 sourceFloorRC = ivec3(sourceFracIndexRC);\n ivec3 sourceCeilRC = ivec3(\n min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));\n \n // Should we calculate next column and row elements in 2x2 packed cell.\n bool hasNextCol = d < "+(s-1)+"; \n bool hasNextRow = coords.z < "+(n-1)+";\n\n // In parallel, construct four corners for all four components in\n // packed 2x2 cell.\n vec4 topLeft = vec4(\n getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d),\n hasNextCol ? getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d + 1) : 0.0);\n\n vec4 bottomLeft = vec4(\n getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d),\n hasNextCol ? getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d + 1) : 0.0);\n\n vec4 topRight = vec4(\n getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d),\n hasNextCol ? getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d + 1) : 0.0);\n\n vec4 bottomRight = vec4(\n getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d),\n hasNextCol ? getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d + 1) : 0.0);\n\n vec3 fracRC = sourceFracIndexRC - vec3(sourceFloorRC);\n\n vec4 top = mix(topLeft, topRight, fracRC.yyzz);\n vec4 bottom = mix(bottomLeft, bottomRight, fracRC.yyzz);\n vec4 newValue = mix(top, bottom, fracRC.x);\n\n setOutput(newValue);\n }\n "},Pi=function(t,e,n){this.variableNames=["dy"],this.outputShape=[],this.outputShape=e.shape;var r=e.shape,i=r[1],a=r[2],o=t.shape,s=o[1],c=o[2],u=[n&&s>1?i-1:i,n&&c>1?a-1:a],l=[n&&s>1?s-1:s,n&&c>1?c-1:c],d=u[0]/l[0],f=u[1]/l[1],h=1/d,p=1/f,m=2*Math.ceil(h)+2,v=2*Math.ceil(p)+2;this.userCode="\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n int r = coords[1];\n int c = coords[2];\n\n float accumulator = 0.0;\n\n const float heightScale = float("+d+");\n const float widthScale = float("+f+");\n\n const float invHeightScale = float("+h+");\n const float invWidthScale = float("+p+");\n\n const int winHeight = int("+m+");\n const int winWidth = int("+v+");\n\n // Compute bounds for where in dy we will look\n float startRLerp = floor(float(r) * invHeightScale);\n int startDyR = int(floor(startRLerp - float(winHeight / 2)));\n\n float startCLerp = floor(float(c) * invWidthScale);\n int startDyC = int(floor(startCLerp - float(winWidth / 2)));\n\n // Loop over dy\n for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {\n int dyR = dyROffset + startDyR;\n\n // Guard against the window exceeding the bounds of dy\n if (dyR < 0 || dyR >= "+s+") {\n continue;\n }\n\n for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {\n int dyC = dyCOffset + startDyC;\n\n // Guard against the window exceeding the bounds of dy\n if (dyC < 0 || dyC >= "+c+") {\n continue;\n }\n\n float sourceFracRow =\n float("+u[0]+") *\n (float(dyR) / float("+l[0]+"));\n\n float sourceFracCol =\n float("+u[1]+") *\n (float(dyC) / float("+l[1]+"));\n\n int sourceNearestRow = int(min(\n float(int("+i+") - 1),\n "+n+" ? float(round(sourceFracRow)) :\n float(floor(sourceFracRow))));\n\n int sourceNearestCol = int(min(\n float(int("+a+") - 1),\n "+n+" ? float(round(sourceFracCol)) :\n float(floor(sourceFracCol))));\n\n if (r == sourceNearestRow && c == sourceNearestCol) {\n accumulator += getDy(b, dyR, dyC, d);\n }\n }\n }\n // End loop over dy\n\n setOutput(accumulator);\n }\n "},Oi=function(t,e,n,r){this.variableNames=["A"],this.outputShape=[];var i=t[0],a=t[1],o=t[2],s=t[3];this.outputShape=[i,e,n,s];var c=[r&&e>1?a-1:a,r&&n>1?o-1:o],u=[r&&e>1?e-1:e,r&&n>1?n-1:n],l=r?"0.5":"0.0";this.userCode="\n const vec2 effectiveInputOverOutputRatioRC = vec2(\n "+c[0]/u[0]+",\n "+c[1]/u[1]+");\n const vec2 inputShapeRC = vec2("+a+".0, "+o+".0);\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n ivec2 yRC = coords.yz;\n\n // Fractional source index.\n vec2 sourceFracIndexRC = vec2(yRC) * effectiveInputOverOutputRatioRC;\n\n // Compute the coordinators of nearest neighbor point.\n ivec2 sourceNearestRC = ivec2(\n min(inputShapeRC - 1.0, floor(sourceFracIndexRC + "+l+")));\n\n float newValue = getA(b, sourceNearestRC.x, sourceNearestRC.y, d);\n\n setOutput(newValue);\n }\n "},Li=function(t,e){this.variableNames=["x"];var n=t.length;if(n>4)throw new Error("WebGL backend: Reverse of rank-"+n+" tensor is not yet supported");if(this.outputShape=t,1!==n){var r=t.map(function(n,r){return function(n){return-1!==e.indexOf(n)&&1!==t[n]?t[n]+" - coords["+n+"] - 1":"coords["+n+"]"}(r)}).join(","),i=mn(n);this.userCode="\n void main() {\n "+i+" coords = getOutputCoords();\n setOutput(getX("+r+"));\n }\n "}else this.userCode="\n void main() {\n int coord = getOutputCoords();\n setOutput(getX("+t[0]+" - coord - 1));\n }\n "},Ai=function(t,e){this.variableNames=["x"],this.usesPackedTextures=!0;var n=t.length;if(n>4)throw new Error("WebGL backend: Reverse of rank-"+n+" tensor is not yet supported");this.outputShape=t;var r=Ze("rc",n),i=r[n-1]+" + 1 < "+this.outputShape[n-1],a=r[n-2]+" + 1 < "+this.outputShape[n-2],o=mn(n);function s(n){var r=t.map(function(r,i){return function(n,r){return-1!==e.indexOf(n)&&1!==t[n]?t[n]+" - "+r[n]+" - 1":""+r[n]}(i,n)});return"getChannel(getX("+r.join(",")+"), vec2("+r.slice(-2).join(",")+"))"}this.userCode=1===n?"\n void main(){\n int rc = getOutputCoords();\n vec4 result = vec4(0.);\n result.r = getChannel(getX("+t[0]+" - rc - 1), rc);\n if("+i+"){\n result.g = getChannel(getX("+t[0]+" - (rc + 1) - 1), rc + 1);\n }\n setOutput(result);\n }\n ":"\n void main() {\n "+o+" rc = getOutputCoords();\n vec4 result = vec4(0.);\n result.r = "+s(r.slice())+";\n if("+i+"){\n result.g = "+function(t){return t[n-1]="("+t[n-1]+" + 1)",s(t)}(r.slice())+";\n }\n if("+a+") {\n result.b = "+function(t){return t[n-2]="("+t[n-2]+" + 1)",s(t)}(r.slice())+";\n if("+i+") {\n result.a = "+function(t){return t[n-1]="("+t[n-1]+" + 1)",t[n-2]="("+t[n-2]+" + 1)",s(t)}(r.slice())+";\n }\n }\n setOutput(result);\n }\n "},Ni=function(t,e,n,r,i,a,o){void 0===o&&(o=!0),this.variableNames=["updates","indices","defaultValue"],this.outputShape=a;var s=mn(i.length),c=mn(a.length),u="";1===n?u="i":2===n&&(u="i, j");var l="getIndices("+u+")",d="";1===r?d="i":2===r&&(d="i, coords[1]");var f="getUpdates("+d+")",h=e>1?"strides[j]":"strides";this.userCode="\n "+s+" strides = "+s+"("+i+");\n\n void main() {\n "+c+" coords = getOutputCoords();\n float sum = 0.0;\n bool found = false;\n for (int i = 0; i < "+t+"; i++) {\n int flattenedIndex = 0;\n for (int j = 0; j < "+e+"; j++) {\n int index = round("+l+");\n flattenedIndex += index * "+h+";\n }\n if (flattenedIndex == coords[0]) {\n sum += "+f+";\n found = true;\n }\n }\n setOutput(mix(getDefaultValue(), sum, float(found)));\n }\n "},Bi=function(t,e){this.variableNames=["x","segmentIds"];var n=t.windowSize,r=t.batchSize,i=t.inSize,a=t.numSegments,o=a*Math.ceil(i/n);this.outputShape=[r,o];var s=4*Math.floor(n/4),c=n%4,u="\n sumValue += dot(values, segFilter);\n ",l="";i%n>0&&(l="\n if (inIdx < 0 || inIdx >= "+i+") {\n return initializationValue;\n }\n ");var d="";i%n>0&&(d="\n if (inIdx < 0 || inIdx >= "+i+") {\n return -1.0;\n }\n "),this.userCode="\n const float initializationValue = 0.0;\n\n float getValue(int batch, int inIdx) {\n "+l+"\n return getX(batch, inIdx);\n }\n\n float getSegmentIdAtIndex(int inIdx) {\n "+d+"\n return getSegmentIds(inIdx);\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = int(floor(float(outIdx) / float(\n "+a+")) * float("+n+"));\n int currentSeg = int(mod(float(outIdx), float("+a+")));\n\n float sumValue = 0.0;\n\n for (int i = 0; i < "+s+"; i += 4) {\n int inIdx = inOffset + i;\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n getValue(batch, inIdx + 3)\n );\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 3)) == currentSeg ? 1 : 0\n );\n\n "+u+"\n }\n\n int inIdx = inOffset + "+s+";\n if ("+(1===c)+") {\n vec4 values = vec4(\n getValue(batch, inIdx),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n int inIdxSeg = int(getSegmentIdAtIndex(inIdx));\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n 0,\n 0,\n 0\n );\n\n "+u+"\n } else if ("+(2===c)+") {\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n initializationValue,\n initializationValue\n );\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n 0,\n 0\n );\n\n "+u+"\n } else if ("+(3===c)+") {\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n initializationValue\n );\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,\n 0\n );\n\n "+u+"\n }\n setOutput(sumValue);\n }\n "},ji=function(t,e,n){var r,i;if(this.variableNames=["c","a","b"],this.outputShape=e,n>4)throw Error("Where for rank "+n+" is not yet supported");if(1===n)i="resRC",r="resRC";else{for(var a=["resRC.x","resRC.y","resRC.z","resRC.w"],o=[],s=[],c=0;c<e.length;c++)s.push(""+a[c]),c<t&&o.push(""+a[c]);r=o.join(),i=s.join()}var u=mn(n);this.userCode="\n void main() {\n "+u+" resRC = getOutputCoords();\n float cVal = getC("+r+");\n if (cVal >= 1.0) {\n setOutput(getA("+i+"));\n } else {\n setOutput(getB("+i+"));\n }\n }\n "},Fi=function(){function t(t){this.variableNames=["source"],this.outputShape=t,this.rank=t.length;var e,n=mn(this.rank),r="uniform int start["+this.rank+"];",i=function(t){if(1===t)return"sourceLoc";if(t<=6)return Yi.slice(0,t).map(function(t){return"sourceLoc."+t}).join(",");throw Error("Slicing for rank "+t+" is not yet supported")}(this.rank);e="\n "+n+" sourceLoc;\n "+n+" coords = getOutputCoords();\n "+t.map(function(t,e){return"sourceLoc."+Yi[e]+" = start["+e+"] + coords."+Yi[e]+";"}).join("\n")+"\n ",this.userCode="\n "+r+"\n void main() {\n "+e+"\n setOutput(getSource("+i+"));\n }\n "}return t.prototype.getCustomSetupFunc=function(t){var e=this;if(t.length!==this.rank)throw Error("The rank ("+this.rank+") of the program must match the length of start ("+t.length+")");return function(n,r){null==e.startLoc&&(e.startLoc=n.getUniformLocationNoThrow(r,"start"),null==e.startLoc)||n.gl.uniform1iv(e.startLoc,t)}},t}(),Yi=["x","y","z","w","u","v"];var $i=function(){function t(t){this.variableNames=["source"],this.usesPackedTextures=!0,this.outputShape=t,this.rank=t.length;var e=mn(this.rank),n=Ze("coords",this.rank),r=Ze("sourceLoc",this.rank),i=1===this.rank?"sourceLoc":"vec2("+r.slice(-2).join()+")",a="getChannel(getSource("+r.join()+"), "+i+")",o="\n result.x = "+a+";\n if (++"+n[this.rank-1]+" < "+t[this.rank-1]+") {\n ++"+r[this.rank-1]+";\n result.y = "+a+";\n --"+r[this.rank-1]+";\n }\n ",s=1===this.rank?"":"\n --"+n[this.rank-1]+";\n if (++"+n[this.rank-2]+" < "+t[this.rank-2]+") {\n ++"+r[this.rank-2]+";\n result.z = "+a+";\n if (++"+n[this.rank-1]+" < "+t[this.rank-1]+") {\n ++"+r[this.rank-1]+";\n result.w = "+a+";\n }\n }\n ",c=this.rank<=4?"sourceLoc = coords +\n "+e+"("+t.map(function(t,e){return"start["+e+"]"}).join()+");":t.map(function(t,e){return r[e]+" = "+n[e]+" + start["+e+"];"}).join("\n");this.userCode="\n uniform int start["+this.rank+"];\n void main() {\n "+e+" coords = getOutputCoords();\n "+e+" sourceLoc;\n "+c+" \n vec4 result = vec4(0.);\n "+o+"\n "+s+"\n setOutput(result);\n }\n "}return t.prototype.getCustomSetupFunc=function(t){var e=this;if(t.length!==this.rank)throw Error("The rank ("+this.rank+") of the program must match the length of start ("+t.length+")");return function(n,r){null==e.startLoc&&(e.startLoc=n.getUniformLocationNoThrow(r,"start"),null==e.startLoc)||n.gl.uniform1iv(e.startLoc,t)}},t}(),zi=function(t,e,n,r){this.variableNames=["x"];var i=n.filter(function(t,e){return-1===r.indexOf(e)});this.outputShape=i;var a=n.length,o=mn(n.length),s=mn(i.length),c="";if(1===a)c="coords * strides + begin";else{var u=0;c=n.map(function(t,e){return-1===r.indexOf(e)?(u++,1===i.length?"coords * strides["+e+"] + begin["+e+"]":"coords["+(u-1)+"] * strides["+e+"] + begin["+e+"]"):"begin["+e+"]"}).join(",")}this.userCode="\n "+o+" begin = "+o+"("+t+");\n "+o+" strides = "+o+"("+e+");\n\n void main() {\n "+s+" coords = getOutputCoords();\n setOutput(getX("+c+"));\n }\n "},Vi=function(){function t(t){this.gpgpu=t,this.numUsedTextures=0,this.numFreeTextures=0,this.freeTextures={},this.logEnabled=!1,this.usedTextures={}}return t.prototype.acquireTexture=function(t,e,n){var r,i=Hi(e,n),a=qi(t,i,n);if(a in this.freeTextures||(this.freeTextures[a]=[]),a in this.usedTextures||(this.usedTextures[a]=[]),this.freeTextures[a].length>0){this.numFreeTextures--,this.numUsedTextures++,this.log();var o=this.freeTextures[a].shift();return this.usedTextures[a].push(o),o}return this.numUsedTextures++,this.log(),i===rr.PACKED_2X2_FLOAT32?r=this.gpgpu.createPackedMatrixTexture(t[0],t[1]):i===rr.PACKED_2X2_FLOAT16?r=this.gpgpu.createFloat16PackedMatrixTexture(t[0],t[1]):i===rr.UNPACKED_FLOAT32?r=this.gpgpu.createFloat32MatrixTexture(t[0],t[1]):i===rr.UNPACKED_FLOAT16?r=this.gpgpu.createFloat16MatrixTexture(t[0],t[1]):i===rr.PACKED_4X1_UNSIGNED_BYTE&&(r=this.gpgpu.createUnsignedBytesMatrixTexture(t[0],t[1])),this.usedTextures[a].push(r),r},t.prototype.releaseTexture=function(t,e,n,r){if(null!=this.freeTextures){var i=qi(e,Hi(n,r),r);i in this.freeTextures||(this.freeTextures[i]=[]),this.freeTextures[i].push(t),this.numFreeTextures++,this.numUsedTextures--;var a=this.usedTextures[i],o=a.indexOf(t);if(o<0)throw new Error("Cannot release a texture that was never provided by this texture manager");a.splice(o,1),this.log()}},t.prototype.log=function(){if(this.logEnabled){var t=this.numFreeTextures+this.numUsedTextures;console.log("Free/Used",this.numFreeTextures+" / "+this.numUsedTextures,"("+t+")")}},t.prototype.getNumUsedTextures=function(){return this.numUsedTextures},t.prototype.getNumFreeTextures=function(){return this.numFreeTextures},t.prototype.dispose=function(){var t=this;if(null!=this.freeTextures){for(var e in this.freeTextures)this.freeTextures[e].forEach(function(e){t.gpgpu.deleteMatrixTexture(e)});for(var e in this.usedTextures)this.usedTextures[e].forEach(function(e){t.gpgpu.deleteMatrixTexture(e)});this.freeTextures=null,this.usedTextures=null,this.numUsedTextures=0,this.numFreeTextures=0}},t}();function Hi(t,e){if(t===nr.UPLOAD)return e?rr.PACKED_2X2_FLOAT32:rr.UNPACKED_FLOAT32;if(t===nr.RENDER||null==t)return e?zt.get("WEBGL_RENDER_FLOAT32_ENABLED")?rr.PACKED_2X2_FLOAT32:rr.PACKED_2X2_FLOAT16:zt.get("WEBGL_RENDER_FLOAT32_ENABLED")?rr.UNPACKED_FLOAT32:rr.UNPACKED_FLOAT16;if(t===nr.DOWNLOAD||t===nr.PIXELS)return rr.PACKED_4X1_UNSIGNED_BYTE;throw new Error("Unknown logical texture type "+t)}function qi(t,e,n){return t[0]+"_"+t[1]+"_"+e+"_"+n}var Wi=function(t,e){this.variableNames=["A"];for(var n=new Array(t.length),r=0;r<n.length;r++)n[r]=t[r]*e[r];this.outputShape=n,this.rank=n.length;var i=mn(this.rank),a=function(t){var e=t.length;if(e>5)throw Error("Tile for rank "+e+" is not yet supported");if(1===e)return"imod(resRC, "+t[0]+")";for(var n=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u"],r=[],i=0;i<t.length;i++)r.push("imod("+n[i]+", "+t[i]+")");return r.join()}(t);this.userCode="\n void main() {\n "+i+" resRC = getOutputCoords();\n setOutput(getA("+a+"));\n }\n "};var Ui=function(t,e){this.variableNames=["A"];for(var n=new Array(t.length),r=0;r<n.length;r++)n[r]=t[e[r]];this.outputShape=n,this.rank=n.length;var i=mn(this.rank),a=function(t){var e=t.length;if(e>6)throw Error("Transpose for rank "+e+" is not yet supported");for(var n=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u","resRC.v"],r=new Array(e),i=0;i<t.length;i++)r[t[i]]=n[i];return r.join()}(e);this.userCode="\n void main() {\n "+i+" resRC = getOutputCoords();\n setOutput(getA("+a+"));\n }\n "};var Gi=function(t,e){this.variableNames=["A"],this.usesPackedTextures=!0;for(var n=new Array(t.length),r=0;r<n.length;r++)n[r]=t[e[r]];if(this.outputShape=n,this.rank=n.length,this.rank>6)throw Error("Packed transpose for rank "+this.rank+" is not yet supported.");var i=mn(this.rank),a=Je("rc",this.rank),o=new Array(this.rank);for(r=0;r<e.length;r++)o[e[r]]=a[r];var s="vec2("+o.slice(-2).join()+")",c="++"+a[this.rank-1]+" < "+n[this.rank-1],u="getChannel(getA("+o.join()+"), "+s+")";this.userCode="\n void main() {\n "+i+" rc = getOutputCoords();\n vec4 result = vec4(0.);\n result[0] = "+u+";\n if("+c+") {\n result[1] = "+u+";\n }\n --"+a[this.rank-1]+";\n if(++"+a[this.rank-2]+" < "+n[this.rank-2]+") {\n result[2] = "+u+";\n if("+c+") {\n result[3] = "+u+";\n }\n } \n setOutput(result);\n }\n "},Ki=1.7580993408473768,Xi=1.0507009873554805,Ji=function(t,e){this.variableNames=["A"],this.outputShape=t,this.userCode="\n float unaryOperation(float x) {\n "+e+"\n }\n\n void main() {\n float x = getAAtOutCoords();\n float y = unaryOperation(x);\n\n setOutput(y);\n }\n "},Zi="if (isnan(x)) return x;",Qi="return x;",ta=Zi+"\n return (x < 0.0) ? 0.0 : x;\n",ea="\n // Stable and Attracting Fixed Point (0, 1) for Normalized Weights.\n // see: https://arxiv.org/abs/1706.02515\n float scaleAlpha = "+Ki+";\n float scale = "+Xi+";\n return (x >= 0.0) ? scale * x : scaleAlpha * (exp(x) - 1.0);\n";var na="return exp(x);",ra=Zi+"\n return sin(x);\n",ia=Zi+"\n return cos(x);\n",aa=Zi+"\n return atan(x);\n",oa=Zi+"\n if (x < 1.0) return NAN;\n return log(x + sqrt(x * x - 1.0));",sa=Zi+"\n if ((x < -1.0) || (x > 1.0)) return NAN;\n return (log(1.0 + x) - log(1.0 - x)) / 2.0;",ca="return x;",ua="\n vec4 result = x * vec4(greaterThanEqual(x, vec4(0.0)));\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n",la=function(t,e){this.variableNames=["A"],this.usesPackedTextures=!0,this.outputShape=t,this.userCode="\n vec4 unaryOperation(vec4 x) {\n "+e+"\n }\n\n void main() {\n vec4 x = getAAtOutCoords();\n vec4 y = unaryOperation(x);\n\n setOutput(y);\n }\n "},da=function(t){this.variableNames=["A"],this.usesPackedTextures=!0,this.outputShape=t;var e=t.length,n=Ze("rc",e),r=mn(e),i=function(t,e){if(1===t)return"rc";for(var n="",r=0;r<t;r++)n+=e[r],r<t-1&&(n+=",");return n}(e,n),a=n.slice(-2),o=e<=1?"rc":"vec2("+a.join(",")+")";this.userCode="\n void main() {\n "+r+" rc = getOutputCoords();\n vec4 packedInput = getA("+i+");\n\n setOutput(getChannel(packedInput, "+o+"));\n }\n "};var fa=xe({concat_:function(t,e){void 0===e&&(e=0),b(t.length>=1,function(){return"Pass at least one tensor to concat"});var n=Wt(t,"tensors","concat");e=R(e,n[0].shape)[0];var r=le(n.map(function(t){return t.shape}),e);if(0===k(r))return Ie([],r);if(1===(n=n.filter(function(t){return t.size>0})).length)return n[0];var i=n.map(function(t){return t.shape});!function(t,e){var n=t[0].length;t.forEach(function(t,e){b(t.length===n,function(){return"Error in concat"+n+"D: rank of tensors["+e+"] must be the same as the rank of the rest ("+n+")"})}),b(e>=0&&e<n,function(){return"Error in concat"+n+"D: axis must be between 0 and "+(n-1)+"."});var r=t[0];t.forEach(function(t,i){for(var a=0;a<n;a++)b(a===e||t[a]===r[a],function(){return"Error in concat"+n+"D: Shape of tensors["+i+"] ("+t+") does not match the shape of the rest ("+r+") along the non-concatenated axis "+i+"."})})}(i,e);var a=n;return zt.engine.runKernel(function(t){return t.concat(n,e)},a,function(t){var n=i.map(function(t){return t[e]});return _a(t,n,e).map(function(t){return function(){return t}})})}}),ha=xe({concat1d_:function(t){return fa(t,0)}}),pa=xe({concat2d_:function(t,e){return fa(t,e)}}),ma=xe({concat3d_:function(t,e){return fa(t,e)}}),va=xe({concat4d_:function(t,e){return fa(t,e)}}),_a=xe({split_:function(t,e,n){void 0===n&&(n=0);var r,i=qt(t,"x","split");return n=R(n,i.shape)[0],"number"==typeof e?(b(i.shape[n]%e==0,function(){return"Number of splits must evenly divide the axis."}),r=new Array(e).fill(i.shape[n]/e)):(b(i.shape[n]===e.reduce(function(t,e){return t+e}),function(){return"The sum of sizes must match the size of the axis dimension."}),r=e),zt.engine.runKernel(function(t){return t.split(i,r,n)},{$x:i},function(t){return{$x:function(){return fa(t,n)}}})}});"undefined"!=typeof window?window:void 0!==r||"undefined"!=typeof self&&self;function ga(t,e){return t(e={exports:{}},e.exports),e.exports}var ba=ga(function(t){!function(t,e,n){function r(t,e){return e.c=t.c,e.s0=t.s0,e.s1=t.s1,e.s2=t.s2,e}function i(t,e){var n=new function(t){var e,n=this,r=(e=4022871197,function(t){t=t.toString();for(var n=0;n<t.length;n++){var r=.02519603282416938*(e+=t.charCodeAt(n));r-=e=r>>>0,e=(r*=e)>>>0,e+=4294967296*(r-=e)}return 2.3283064365386963e-10*(e>>>0)});n.next=function(){var t=2091639*n.s0+2.3283064365386963e-10*n.c;return n.s0=n.s1,n.s1=n.s2,n.s2=t-(n.c=0|t)},n.c=1,n.s0=r(" "),n.s1=r(" "),n.s2=r(" "),n.s0-=r(t),n.s0<0&&(n.s0+=1),n.s1-=r(t),n.s1<0&&(n.s1+=1),n.s2-=r(t),n.s2<0&&(n.s2+=1),r=null}(t),i=e&&e.state,a=n.next;return a.int32=function(){return 4294967296*n.next()|0},a.double=function(){return a()+1.1102230246251565e-16*(2097152*a()|0)},a.quick=a,i&&("object"==typeof i&&r(i,n),a.state=function(){return r(n,{})}),a}e&&e.exports?e.exports=i:this.alea=i}(0,t)}),ya=ga(function(t){!function(t,e,n){function r(t,e){return e.x=t.x,e.y=t.y,e.z=t.z,e.w=t.w,e}function i(t,e){var n=new function(t){var e=this,n="";e.x=0,e.y=0,e.z=0,e.w=0,e.next=function(){var t=e.x^e.x<<11;return e.x=e.y,e.y=e.z,e.z=e.w,e.w^=e.w>>>19^t^t>>>8},t===(0|t)?e.x=t:n+=t;for(var r=0;r<n.length+64;r++)e.x^=0|n.charCodeAt(r),e.next()}(t),i=e&&e.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var t=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},a.int32=n.next,a.quick=a,i&&("object"==typeof i&&r(i,n),a.state=function(){return r(n,{})}),a}e&&e.exports?e.exports=i:this.xor128=i}(0,t)}),xa=ga(function(t){!function(t,e,n){function r(t,e){return e.x=t.x,e.y=t.y,e.z=t.z,e.w=t.w,e.v=t.v,e.d=t.d,e}function i(t,e){var n=new function(t){var e=this,n="";e.next=function(){var t=e.x^e.x>>>2;return e.x=e.y,e.y=e.z,e.z=e.w,e.w=e.v,(e.d=e.d+362437|0)+(e.v=e.v^e.v<<4^t^t<<1)|0},e.x=0,e.y=0,e.z=0,e.w=0,e.v=0,t===(0|t)?e.x=t:n+=t;for(var r=0;r<n.length+64;r++)e.x^=0|n.charCodeAt(r),r==n.length&&(e.d=e.x<<10^e.x>>>4),e.next()}(t),i=e&&e.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var t=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},a.int32=n.next,a.quick=a,i&&("object"==typeof i&&r(i,n),a.state=function(){return r(n,{})}),a}e&&e.exports?e.exports=i:this.xorwow=i}(0,t)}),wa=ga(function(t){!function(t,e,n){function r(t,e){return e.x=t.x.slice(),e.i=t.i,e}function i(t,e){null==t&&(t=+new Date);var n=new function(t){var e=this;e.next=function(){var t,n,r=e.x,i=e.i;return t=r[i],n=(t^=t>>>7)^t<<24,n^=(t=r[i+1&7])^t>>>10,n^=(t=r[i+3&7])^t>>>3,n^=(t=r[i+4&7])^t<<7,t=r[i+7&7],n^=(t^=t<<13)^t<<9,r[i]=n,e.i=i+1&7,n},function(t,e){var n,r=[];if(e===(0|e))r[0]=e;else for(e=""+e,n=0;n<e.length;++n)r[7&n]=r[7&n]<<15^e.charCodeAt(n)+r[n+1&7]<<13;for(;r.length<8;)r.push(0);for(n=0;n<8&&0===r[n];++n);for(8==n?r[7]=-1:r[n],t.x=r,t.i=0,n=256;n>0;--n)t.next()}(e,t)}(t),i=e&&e.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var t=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},a.int32=n.next,a.quick=a,i&&(i.x&&r(i,n),a.state=function(){return r(n,{})}),a}e&&e.exports?e.exports=i:this.xorshift7=i}(0,t)}),ka=ga(function(t){!function(t,e,n){function r(t,e){return e.i=t.i,e.w=t.w,e.X=t.X.slice(),e}function i(t,e){null==t&&(t=+new Date);var n=new function(t){var e=this;e.next=function(){var t,n,r=e.w,i=e.X,a=e.i;return e.w=r=r+1640531527|0,n=i[a+34&127],t=i[a=a+1&127],n^=n<<13,t^=t<<17,n^=n>>>15,t^=t>>>12,n=i[a]=n^t,e.i=a,n+(r^r>>>16)|0},function(t,e){var n,r,i,a,o,s=[],c=128;for(e===(0|e)?(r=e,e=null):(e+="\0",r=0,c=Math.max(c,e.length)),i=0,a=-32;a<c;++a)e&&(r^=e.charCodeAt((a+32)%e.length)),0===a&&(o=r),r^=r<<10,r^=r>>>15,r^=r<<4,r^=r>>>13,a>=0&&(o=o+1640531527|0,i=0==(n=s[127&a]^=r+o)?i+1:0);for(i>=128&&(s[127&(e&&e.length||0)]=-1),i=127,a=512;a>0;--a)r=s[i+34&127],n=s[i=i+1&127],r^=r<<13,n^=n<<17,r^=r>>>15,n^=n>>>12,s[i]=r^n;t.w=o,t.X=s,t.i=i}(e,t)}(t),i=e&&e.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var t=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},a.int32=n.next,a.quick=a,i&&(i.X&&r(i,n),a.state=function(){return r(n,{})}),a}e&&e.exports?e.exports=i:this.xor4096=i}(0,t)}),Ca=ga(function(t){!function(t,e,n){function r(t,e){return e.a=t.a,e.b=t.b,e.c=t.c,e.d=t.d,e}function i(t,e){var n=new function(t){var e=this,n="";e.next=function(){var t=e.b,n=e.c,r=e.d,i=e.a;return t=t<<25^t>>>7^n,n=n-r|0,r=r<<24^r>>>8^i,i=i-t|0,e.b=t=t<<20^t>>>12^n,e.c=n=n-r|0,e.d=r<<16^n>>>16^i,e.a=i-t|0},e.a=0,e.b=0,e.c=-1640531527,e.d=1367130551,t===Math.floor(t)?(e.a=t/4294967296|0,e.b=0|t):n+=t;for(var r=0;r<n.length+20;r++)e.b^=0|n.charCodeAt(r),e.next()}(t),i=e&&e.state,a=function(){return(n.next()>>>0)/4294967296};return a.double=function(){do{var t=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},a.int32=n.next,a.quick=a,i&&("object"==typeof i&&r(i,n),a.state=function(){return r(n,{})}),a}e&&e.exports?e.exports=i:this.tychei=i}(0,t)}),Ea=ga(function(t){!function(e,r){var i,a=this,o=256,s=6,c="random",u=r.pow(o,s),l=r.pow(2,52),d=2*l,f=o-1;function h(t,n,h){var _=[],g=m(function t(e,n){var r,i=[],a=typeof e;if(n&&"object"==a)for(r in e)try{i.push(t(e[r],n-1))}catch(t){}return i.length?i:"string"==a?e:e+"\0"}((n=1==n?{entropy:!0}:n||{}).entropy?[t,v(e)]:null==t?function(){try{var t;return i&&(t=i.randomBytes)?t=t(o):(t=new Uint8Array(o),(a.crypto||a.msCrypto).getRandomValues(t)),v(t)}catch(t){var n=a.navigator,r=n&&n.plugins;return[+new Date,a,r,a.screen,v(e)]}}():t,3),_),b=new function(t){var e,n=t.length,r=this,i=0,a=r.i=r.j=0,s=r.S=[];for(n||(t=[n++]);i<o;)s[i]=i++;for(i=0;i<o;i++)s[i]=s[a=f&a+t[i%n]+(e=s[i])],s[a]=e;(r.g=function(t){for(var e,n=0,i=r.i,a=r.j,s=r.S;t--;)e=s[i=f&i+1],n=n*o+s[f&(s[i]=s[a=f&a+e])+(s[a]=e)];return r.i=i,r.j=a,n})(o)}(_),y=function(){for(var t=b.g(s),e=u,n=0;t<l;)t=(t+n)*o,e*=o,n=b.g(1);for(;t>=d;)t/=2,e/=2,n>>>=1;return(t+n)/e};return y.int32=function(){return 0|b.g(4)},y.quick=function(){return b.g(4)/4294967296},y.double=y,m(v(b.S),e),(n.pass||h||function(t,e,n,i){return i&&(i.S&&p(i,b),t.state=function(){return p(b,{})}),n?(r[c]=t,e):t})(y,g,"global"in n?n.global:this==r,n.state)}function p(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function m(t,e){for(var n,r=t+"",i=0;i<r.length;)e[f&i]=f&(n^=19*e[f&i])+r.charCodeAt(i++);return v(e)}function v(t){return String.fromCharCode.apply(0,t)}if(r["seed"+c]=h,m(r.random(),e),t.exports){t.exports=h;try{i=n(86)}catch(t){}}}([],Math)});Ea.alea=ba,Ea.xor128=ya,Ea.xorwow=xa,Ea.xorshift7=wa,Ea.xor4096=ka,Ea.tychei=Ca;var Sa=Ea.alea,Ia=function(){function t(t,e,n,r,i){this.mean=t,this.stdDev=e,this.dtype=n,this.nextVal=NaN,this.truncated=r,this.truncated&&(this.upper=this.mean+2*this.stdDev,this.lower=this.mean-2*this.stdDev);var a=i||Math.random();this.random=Sa(a.toString())}return t.prototype.nextValue=function(){if(!isNaN(this.nextVal)){var t=this.nextVal;return this.nextVal=NaN,t}for(var e,n,r=!1;!r;){var i=void 0,a=void 0,o=void 0;do{o=(i=2*this.random()-1)*i+(a=2*this.random()-1)*a}while(o>=1||0===o);var s=Math.sqrt(-2*Math.log(o)/o);e=this.mean+this.stdDev*i*s,n=this.mean+this.stdDev*a*s,this.truncated&&!this.isValidTruncated(e)||(r=!0)}return this.truncated&&!this.isValidTruncated(n)||(this.nextVal=this.convertValue(n)),this.convertValue(e)},t.prototype.convertValue=function(t){return null==this.dtype||"float32"===this.dtype?t:Math.round(t)},t.prototype.isValidTruncated=function(t){return t<=this.upper&&t>=this.lower},t}();function Ma(t,e,n){return void 0===e&&(e="float32"),e=e||"float32",Q(t),new ut(t,e,n)}var Ta=xe({batchToSpaceND_:function(t,e,n){var r=qt(t,"x","batchToSpaceND"),i=e.reduce(function(t,e){return t*e});return b(r.rank>=1+e.length,function(){return"input rank is "+r.rank+" but should be > than blockShape.length "+e.length}),b(n.length===e.length,function(){return"crops.length is "+n.length+" but should be equal to blockShape.length "+e.length}),b(r.shape[0]%i==0,function(){return"input tensor batch is "+r.shape[0]+" but is not divisible by the product of the elements of blockShape "+e.join(" * ")+" === "+i}),zt.engine.runKernel(function(t){return t.batchToSpaceND(r,e,n)},{$x:r},function(t){return{$x:function(){return t.spaceToBatchND(e,n)}}})}}),Da=xe({cast_:function(t,e){var n=qt(t,"x","cast");return zt.engine.runKernel(function(t){return t.cast(n,e)},{$x:n},function(t){return{$x:function(){return t.clone()}}})}}),Ra=xe({clone_:function(t){var e=qt(t,"x","clone",null);return zt.engine.runKernel(function(t){return ht.make(e.shape,{dataId:e.dataId},e.dtype)},{$x:e},function(t){return{$x:function(){return t.toFloat()}}})}}),Pa=xe({cumsum_:function(t,e,n,r){void 0===e&&(e=0),void 0===n&&(n=!1),void 0===r&&(r=!1);var i=qt(t,"x","cumsum"),a=se([e|=0],i.rank),o=i;null!=a&&(o=i.transpose(a));var s=ue(1,i.rank)[0],c=zt.engine.runKernel(function(t){return t.cumsum(o,s,n,r)},{permutedX:o},function(t){return{permutedX:function(){return t.cumsum(e,n,!r)}}});return null!=a&&(c=c.transpose(a)),c}}),Oa=xe({depthToSpace_:function(t,e,n){void 0===n&&(n="NHWC");var r=qt(t,"x","depthToSpace"),i="NHWC"===n?r.shape[1]:r.shape[2],a="NHWC"===n?r.shape[2]:r.shape[3],o="NHWC"===n?r.shape[3]:r.shape[1];return b(i*e>=0,function(){return"Negative dimension size caused by overflow when multiplying\n "+i+" and "+e+" for depthToSpace with input shape\n "+r.shape}),b(a*e>=0,function(){return"Negative dimension size caused by overflow when multiplying\n "+a+" and "+e+" for depthToSpace with input shape\n "+r.shape}),b(o%(e*e)==0,function(){return"Dimension size must be evenly divisible by "+e*e+" but is "+o+" for depthToSpace with input shape "+r.shape}),zt.engine.runKernel(function(t){return t.depthToSpace(r,e,n)},{$x:r})}}),La=xe({expandDims_:function(t,e){void 0===e&&(e=0);var n=qt(t,"x","expandDims");b(e<=n.rank,function(){return"Axis must be <= rank of the tensor"});var r=n.shape.slice();return e<0&&(b(-(n.rank+1)<=e,function(){return"Axis must be in the interval ["+-(n.rank+1)+", "+n.rank+"]"}),e=n.rank+e+1),r.splice(e,0,1),Wa(n,r)}}),Aa=xe({eye_:function(t,e,n,r){void 0===r&&(r="float32"),null==e&&(e=t);for(var i=Ma([t,e],r),a=t<=e?t:e,o=0;o<a;++o)i.set(1,o,o);var s=i.toTensor().as2D(t,e);if(null==n)return s;if(1===n.length)return Xa(La(s,0),[n[0],1,1]);if(2===n.length)return Xa(La(La(s,0),0),[n[0],n[1],1,1]);if(3===n.length)return Xa(La(La(La(s,0),0),0),[n[0],n[1],n[2],1,1]);throw new Error("eye() currently supports only 1D and 2D batchShapes, but received "+n.length+"D.")}}),Na=xe({multinomial_:function(t,e,n,r){void 0===r&&(r=!1);var i=qt(t,"logits","multinomial"),a=i.size,o=i.rank;if(a<2)throw new Error("Error in multinomial: you need at least 2 outcomes, but got "+a+".");if(o>2)throw new Error("Rank of probabilities must be 1 or 2, but is "+o);n=n||Math.random();var s=1===o?i.as2D(1,-1):i,c=zt.engine.runKernel(function(t){return t.multinomial(s,r,e,n)},{logits2D:s});return 1===o?c.as1D():c}}),Ba=xe({oneHot_:function(t,e,n,r){if(void 0===n&&(n=1),void 0===r&&(r=0),e<2)throw new Error("Error in oneHot: depth must be >=2, but it is "+e);var i=qt(t,"indices","oneHot","int32"),a=i.shape.concat([e]);return i=i.flatten(),zt.engine.runKernel(function(t){return t.oneHot(i,e,n,r)},{$indices:i},function(t){return{$indices:function(){return Le(i.shape,"float32")}}}).reshape(a)}}),ja=xe({pad_:function(t,e,n){void 0===n&&(n=0);var r=qt(t,"x","pad");if(0===r.rank)throw new Error("pad(scalar) is not defined. Pass non-scalar to pad");var i=e.map(function(t){return t[0]});return zt.engine.runKernel(function(t){return t.pad(r,e,n)},{$x:r},function(t){return{$x:function(){return t.slice(i,r.shape)}}})}}),Fa=xe({pad1d_:function(t,e,n){return void 0===n&&(n=0),b(2===e.length,function(){return"Invalid number of paddings. Must be length of 2."}),ja(t,[e],n)}}),Ya=xe({pad2d_:function(t,e,n){return void 0===n&&(n=0),b(2===e.length&&2===e[0].length&&2===e[1].length,function(){return"Invalid number of paddings. Must be length of 2 each."}),ja(t,e,n)}}),$a=xe({pad3d_:function(t,e,n){return void 0===n&&(n=0),b(3===e.length&&2===e[0].length&&2===e[1].length&&2===e[2].length,function(){return"Invalid number of paddings. Must be length of 2 each."}),ja(t,e,n)}}),za=xe({pad4d_:function(t,e,n){return void 0===n&&(n=0),b(4===e.length&&2===e[0].length&&2===e[1].length&&2===e[2].length&&2===e[3].length,function(){return"Invalid number of paddings. Must be length of 2 each."}),ja(t,e,n)}}),Va=xe({rand_:function(t,e,n){var r=k(t),i=null;if(null==n||"float32"===n)i=new Float32Array(r);else if("int32"===n)i=new Int32Array(r);else{if("bool"!==n)throw new Error("Unknown data type "+n);i=new Uint8Array(r)}for(var a=0;a<r;a++)i[a]=e();return ht.make(t,{values:i},n)}}),Ha=xe({randomNormal_:function(t,e,n,r,i){if(void 0===e&&(e=0),void 0===n&&(n=1),null!=r&&"bool"===r)throw new Error("Unsupported data type "+r);for(var a=new Ia(e,n,r,!1,i),o=Ma(t,r),s=0;s<o.values.length;s++)o.values[s]=a.nextValue();return o.toTensor()}}),qa=xe({randomUniform_:function(t,e,n,r){void 0===e&&(e=0),void 0===n&&(n=1),void 0===r&&(r="float32");for(var i=Ma(t,r),a=0;a<i.values.length;a++)i.values[a]=g(e,n);return i.toTensor()}}),Wa=xe({reshape_:function(t,e){var n=qt(t,"x","reshape",null);return e=D(e,n.size),b(n.size===k(e),function(){return"new shape and old shape must have the same number of elements."}),zt.engine.runKernel(function(t){return t.reshape(n,e)},{$x:n},function(t){return{$x:function(){return t.reshape(n.shape)}}})}}),Ua=xe({spaceToBatchND_:function(t,e,n){var r=qt(t,"x","spaceToBatchND");return b(r.rank>=1+e.length,function(){return"input rank "+r.rank+" should be > than [blockShape] "+e.length}),b(n.length===e.length,function(){return"paddings.shape[0] "+n.length+" must be equal to [blockShape] "+e.length}),b(r.shape.reduce(function(t,r,i){return i>0&&i<=e.length?t&&(r+n[i-1][0]+n[i-1][1])%e[i-1]==0:t},!0),function(){return"input spatial dimensions "+r.shape.slice(1)+" with paddings "+n.toString()+" must be divisible by blockShapes "+e.toString()}),zt.engine.runKernel(function(t){return t.spaceToBatchND(r,e,n)},{$x:r},function(t){return{$x:function(){return t.batchToSpaceND(e,n)}}})}}),Ga=xe({squeeze_:function(t,e){var n=qt(t,"x","squeeze");return Wa(n,P(n.shape,e).newShape)}}),Ka=xe({stack_:function(t,e){void 0===e&&(e=0);var n=Wt(t,"tensors","stack");if(b(n.length>=1,function(){return"Pass at least one tensor to tf.stack"}),1===n.length)return n[0].expandDims(e);var r=n[0].rank,i=n[0].shape,a=n[0].dtype;b(e<=r,function(){return"Axis must be <= rank of the tensor"}),n.forEach(function(t){y(i,t.shape,"All tensors passed to stack must have matching shapes")}),n.forEach(function(t){b(a===t.dtype,function(){return"All tensors passed to stack must have matching dtypes"})});var o=n.map(function(t){return t.expandDims(e)});return fa(o,e)}}),Xa=xe({tile_:function(t,e){var n=qt(t,"x","tile");return b(n.rank===e.length,function(){return"Error in transpose: rank of input "+n.rank+" must match length of reps "+e+"."}),zt.engine.runKernel(function(t,r){var i=t.tile(n,e);return r([n]),i},{$x:n},function(t,n){var r=n[0];return{$x:function(){var n=je(r);if(1===r.rank)for(var i=0;i<e[0];++i)n=n.add(t.slice([i*r.shape[0]],[r.shape[0]]));else if(2===r.rank)for(i=0;i<e[0];++i)for(var a=0;a<e[1];++a)n=n.add(t.slice([i*r.shape[0],a*r.shape[1]],[r.shape[0],r.shape[1]]));else if(3===r.rank)for(i=0;i<e[0];++i)for(a=0;a<e[1];++a)for(var o=0;o<e[2];++o)n=n.add(t.slice([i*r.shape[0],a*r.shape[1],o*r.shape[2]],[r.shape[0],r.shape[1],r.shape[2]]));else{if(4!==r.rank)throw new Error("Gradient for tile operation is not implemented for rank-"+r.rank+" tensors yet.");for(i=0;i<e[0];++i)for(a=0;a<e[1];++a)for(o=0;o<e[2];++o)for(var s=0;s<e[3];++s)n=n.add(t.slice([i*r.shape[0],a*r.shape[1],o*r.shape[2],s*r.shape[3]],[r.shape[0],r.shape[1],r.shape[2],r.shape[3]]))}return n}}})}}),Ja=xe({truncatedNormal_:function(t,e,n,r,i){if(void 0===e&&(e=0),void 0===n&&(n=1),null!=r&&"bool"===r)throw new Error("Unsupported data type "+r);for(var a=new Ia(e,n,r,!0,i),o=Ma(t,r),s=0;s<o.values.length;s++)o.values[s]=a.nextValue();return o.toTensor()}}),Za=xe({unstack_:function(t,e){void 0===e&&(e=0),e=e||0;var n=qt(t,"x","unstack");return b(e>=-n.shape.length&&e<n.shape.length,function(){return"Axis = "+e+" is not in [-"+n.shape.length+", "+n.shape.length+")"}),e<0&&(e+=n.shape.length),zt.engine.runKernel(function(t){return t.unstack(n,e)},{$x:n},function(t){return{$x:function(){return Ka(t,e)}}})}}),Qa=function(t,e){return u(this,void 0,void 0,function(){var n,r,i,a,o,s,c,u,d,f;return l(this,function(l){switch(l.label){case 0:return n=qt(t,"x","setdiff1d"),r=qt(e,"y","setdiff1d"),b(n.dtype===r.dtype,function(){return"x and y should have the same dtype, but got x ("+n.dtype+") and y ("+r.dtype+")."}),b(1===n.rank,function(){return"x should be 1D tensor, but got x ("+n.shape+")."}),b(1===r.rank,function(){return"y should be 1D tensor, but got y ("+r.shape+")."}),[4,n.data()];case 1:return i=l.sent(),[4,r.data()];case 2:for(a=l.sent(),o=new Set(a),s=0,d=0;d<i.length;d++)o.has(i[d])||s++;for(c=new ut([s],n.dtype),u=new ut([s],"int32"),d=0,f=0;d<i.length;d++)o.has(i[d])||(c.values[f]=i[d],u.values[f]=d,f++);return[2,[c.toTensor(),u.toTensor()]]}})})};function to(t,e){for(var n=[],r=0;r<e.length;r++)e[r]&&n.push(r);var i=Ma(t,"int32"),a=Ma([n.length,t.length],"int32");for(r=0;r<n.length;r++){var o=i.indexToLoc(n[r]),s=r*t.length;a.values.set(o,s)}return a.toTensor()}var eo={};var no=function(){function t(t){if(this.gpgpu=t,this.pendingRead=new WeakMap,this.pendingDisposal=new WeakSet,this.dataRefCount=new WeakMap,this.lruDataGPU=[],this.numBytesInGPU=0,this.uploadWaitMs=0,this.downloadWaitMs=0,this.disposed=!1,zt.get("WEBGL_VERSION")<1)throw new Error("WebGL is not supported on this device");if(null==t){var e=h(zt.get("WEBGL_VERSION"));this.binaryCache=function(t){return t in eo?eo[t]:(eo[t]={},eo[t])}(zt.get("WEBGL_VERSION")),this.gpgpu=new pi(e),this.canvas=e.canvas,this.gpgpuCreatedLocally=!0}else this.binaryCache={},this.gpgpuCreatedLocally=!1,this.canvas=t.gl.canvas;this.textureManager=new Vi(this.gpgpu)}return t.prototype.register=function(t,e,n){if(this.texData.has(t))throw new Error("Data buffer is already registered");this.texData.set(t,{shape:e,dtype:n})},t.prototype.setDataMover=function(t){this.texData=new Fe(t)},t.prototype.fromPixels=function(t,e){if(null==t)throw new Error("pixels passed to tf.browser.fromPixels() can not be null");var n=[t.height,t.width],r=[t.height,t.width,e];if(zt.get("IS_BROWSER")){if(!(t instanceof HTMLVideoElement||t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageData))throw new Error("pixels passed to tf.browser.fromPixels() must be either an HTMLVideoElement, HTMLImageElement, HTMLCanvasElement or ImageData, but was "+t.constructor.name);if(t instanceof HTMLVideoElement){if(null==this.fromPixels2DContext){if("complete"!==document.readyState)throw new Error("The DOM is not ready yet. Please call tf.browser.fromPixels() once the DOM is ready. One way to do that is to add an event listener for `DOMContentLoaded` on the document object");this.fromPixels2DContext=document.createElement("canvas").getContext("2d")}this.fromPixels2DContext.canvas.width=t.width,this.fromPixels2DContext.canvas.height=t.height,this.fromPixels2DContext.drawImage(t,0,0,t.width,t.height),t=this.fromPixels2DContext.canvas}}var i=this.makeTensorHandle(n,"int32");this.texData.get(i.dataId).usage=nr.PIXELS,this.gpgpu.uploadPixelDataToTexture(this.getTexture(i.dataId),t);var a=new tr(r),o=this.compileAndRun(a,[i]);return this.disposeData(i.dataId),o},t.prototype.makeTensorHandle=function(t,e){var n={};return this.register(n,t,e),{dataId:n,shape:t,dtype:e}},t.prototype.write=function(t,e){if(null==e)throw new Error("MathBackendWebGL.write(): values can not be null");if(zt.get("DEBUG"))for(var n=0;n<e.length;n++){var r=e[n];if(!pr(r))throw Error("The value "+r+" cannot be represented on this device.")}var i=this.texData.get(t),a=i.texture,o=i.texShape,s=i.usage,c=i.dtype,u=i.isPacked;if("complex64"===c)throw new Error("Cannot write to a complex64 dtype. Please use tf.complex(real, imag).");null!=a&&(this.releaseTexture(t,a,o,s,c,u),i.texture=null,i.texShape=null),i.usage=nr.UPLOAD,i.values=e},t.prototype.readSync=function(t){var e=this.texData.get(t),n=e.values,r=e.dtype,i=e.complexTensors,a=e.slice,o=e.shape;if(null!=a){var s=new Ji(o,"return x;"),c=this.compileAndRun(s,[{dataId:t,shape:o,dtype:r}]),u=this.readSync(c.dataId);return c.dispose(),u}if(null!=n)return this.convertAndCacheOnCPU(t);if("string"===r)return n;var l,d,f=null!=this.activeTimers;return f&&(l=performance.now()),d="complex64"===r?ze(i.real.dataSync(),i.imag.dataSync()):this.getValuesFromTexture(t),f&&(this.downloadWaitMs+=performance.now()-l),this.convertAndCacheOnCPU(t,d)},t.prototype.read=function(t){return u(this,void 0,void 0,function(){var e,n,r,i,a,o,s,c,u,d,f,h,p,m,v,_,g,b,y,x,w,C,E,S;return l(this,function(l){switch(l.label){case 0:if(this.pendingRead.has(t))return r=this.pendingRead.get(t),[2,new Promise(function(t){return r.push(t)})];if(i=this.texData.get(t),a=i.texture,o=i.values,s=i.texShape,c=i.isPacked,u=i.shape,d=i.slice,f=i.dtype,null!=d)return h=new Ji(u,"return x;"),p=this.compileAndRun(h,[{dataId:t,shape:u,dtype:f}]),m=this.read(p.dataId),p.dispose(),[2,m];if(null!=o)return[2,this.convertAndCacheOnCPU(t)];if(this.pendingRead.set(t,[]),!zt.get("WEBGL_DOWNLOAD_FLOAT_ENABLED")&&2===zt.get("WEBGL_VERSION"))throw new Error("tensor.data() with WEBGL_DOWNLOAD_FLOAT_ENABLED=false and WEBGL_VERSION=2 not yet supported.");return v=s[1],_=s[0],c&&(e=cr(s[0],s[1]),v=e[0],_=e[1]),g=this.gpgpu.maybeCreateBufferFromTexture(a,_,v),[4,this.gpgpu.createAndWaitForFence()];case 1:return l.sent(),g instanceof WebGLTexture?b=this.getValuesFromTexture(t):(y=k(u),c?(x=Yr(u),w=1,C=1,u.length&&(n=$r(u),w=n[0],C=n[1]),b=this.gpgpu.downloadPackedMatrixFromBuffer(g,x,w,C,s[0],s[1]).subarray(0,y)):b=this.gpgpu.downloadFloat32MatrixFromBuffer(g,s[0],s[1]).subarray(0,y)),E=this.convertAndCacheOnCPU(t,b),S=this.pendingRead.get(t),this.pendingRead.delete(t),S.forEach(function(t){return t(E)}),this.pendingDisposal.has(t)&&(this.pendingDisposal.delete(t),this.disposeData(t)),[2,E]}})})},t.prototype.getValuesFromTexture=function(t){var e,n=this,r=this.texData.get(t),i=r.shape,a=r.dtype,o=r.texture,s=r.texShape,c=k(i);if(zt.get("WEBGL_DOWNLOAD_FLOAT_ENABLED")){if(this.texData.get(t).isPacked){var u=Yr(i),l=1,d=1;return i.length&&(l=(e=$r(i))[0],d=e[1]),this.gpgpu.downloadMatrixFromPackedTexture(o,u,l,d,s[0],s[1]).subarray(0,c)}return this.gpgpu.downloadFloat32MatrixFromOutputTexture(o,s[0],s[1]).subarray(0,c)}var f=this.makeTensorHandle(i,"float32");f.size=k(i),this.texData.get(f.dataId).usage=nr.DOWNLOAD;var h=Gt(function(){var e=new Kn(i);return n.compileAndRun(e,[{shape:i,dtype:a,dataId:t}],f,null,!1)}),p=this.texData.get(h.dataId),m=this.gpgpu.downloadByteEncodedFloatMatrixFromOutputTexture(p.texture,p.texShape[0],p.texShape[1]).subarray(0,c);return this.disposeData(f.dataId),m},t.prototype.time=function(t){return u(this,void 0,void 0,function(){var e,n,r,i,a,o,s;return l(this,function(c){switch(c.label){case 0:return e=this.activeTimers,n=[],r=!1,null==this.programTimersStack?(this.programTimersStack=n,r=!0):this.activeTimers.push(n),this.activeTimers=n,t(),i=w(this.activeTimers.map(function(t){return t.query})).filter(function(t){return null!=t}),a=w(this.activeTimers.map(function(t){return t.name})).filter(function(t){return null!=t}),this.activeTimers=e,r&&(this.programTimersStack=null),[4,Promise.all(i)];case 1:return o=c.sent(),s={uploadWaitMs:this.uploadWaitMs,downloadWaitMs:this.downloadWaitMs,kernelMs:_(o),getExtraProfileInfo:function(){return o.map(function(t,e){return{name:a[e],ms:t}}).map(function(t){return t.name+": "+t.ms}).join(", ")},wallMs:null},this.uploadWaitMs=0,this.downloadWaitMs=0,[2,s]}})})},t.prototype.memory=function(){return{unreliable:!1,numBytesInGPU:this.numBytesInGPU}},t.prototype.startTimer=function(){return zt.get("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0?this.gpgpu.beginQuery():{startMs:performance.now(),endMs:null}},t.prototype.endTimer=function(t){return zt.get("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0?(this.gpgpu.endQuery(),t):(t.endMs=performance.now(),t)},t.prototype.getQueryTime=function(t){return u(this,void 0,void 0,function(){var e;return l(this,function(n){return zt.get("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0?[2,this.gpgpu.waitForQueryAndGetTime(t)]:[2,(e=t).endMs-e.startMs]})})},t.prototype.disposeData=function(t){if(!this.pendingDisposal.has(t))if(this.pendingRead.has(t))this.pendingDisposal.add(t);else if(this.texData.has(t)){var e=this.texData.get(t),n=e.texture,r=e.dtype,i=e.texShape,a=e.usage,o=e.complexTensors,s=e.isPacked,c=e.slice;if(null!=n){var u=c&&c.origDataId||t,l=this.dataRefCount.get(u);l>1?this.dataRefCount.set(u,l-1):(this.dataRefCount.delete(u),this.releaseTexture(t,n,i,a,r,s),this.texData.delete(t))}null!=o&&(o.real.dispose(),o.imag.dispose())}},t.prototype.getTexture=function(t){return this.uploadToGPU(t),this.texData.get(t).texture},t.prototype.getCPUBackend=function(){return zt.get("WEBGL_CPU_FORWARD")?(null==this.cpuBackend&&(this.cpuBackend=zt.findBackend("cpu")),this.cpuBackend):null},t.prototype.shouldExecuteOnCPU=function(t,e){var n=this;return void 0===e&&(e=128),null!=this.getCPUBackend()&&t.every(function(t){return null==n.texData.get(t.dataId).texture&&t.size<e})},t.prototype.getGPGPUContext=function(){return this.gpgpu},t.prototype.getCanvas=function(){return this.canvas},t.prototype.complex=function(t,e){var n=this.makeOutputArray(t.shape,"complex64");return this.texData.get(n.dataId).complexTensors={real:zt.engine.keep(t.clone()),imag:zt.engine.keep(e.clone())},n},t.prototype.real=function(t){return this.texData.get(t.dataId).complexTensors.real.clone()},t.prototype.imag=function(t){return this.texData.get(t.dataId).complexTensors.imag.clone()},t.prototype.slice=function(t,e,n){if(this.shouldExecuteOnCPU([t]))return this.cpuBackend.slice(t,e,n);var r=this.texData.get(t.dataId).isPacked,i=be(t.shape,e,n);if(r||!i){var a=zt.get("WEBGL_PACK_ARRAY_OPERATIONS")?new $i(n):new Fi(n),o=a.getCustomSetupFunc(e);return this.compileAndRun(a,[t],null,o)}return this.uploadToGPU(t.dataId),this.shallowSlice(t,e,n)},t.prototype.shallowSlice=function(t,e,n){var r=this.texData.get(t.dataId),i=ht.make(n,{},t.dtype,this),a=this.texData.get(i.dataId);Object.assign(a,r),a.shape=n,a.dtype=t.dtype;var o=ye(e,t.strides);r.slice&&(o+=r.slice.flatOffset),a.slice={flatOffset:o,origDataId:r.slice&&r.slice.origDataId||t.dataId};var s=this.dataRefCount.get(a.slice.origDataId)||1;return this.dataRefCount.set(a.slice.origDataId,s+1),i},t.prototype.stridedSlice=function(t,e,n,r,i,a,o,s,c){if(this.shouldExecuteOnCPU([t]))return this.cpuBackend.stridedSlice(t,e,n,r,i,a,o,s,c);var u=ve(t.shape,e,n,r,i,a,o,s,c),l=u[0],d=u[1],f=u[2],h=d.filter(function(t,e){return-1===f.indexOf(e)});if(h.some(function(t){return 0===t}))return Ie([],h);var p=new zi(l,r,d,f);return this.compileAndRun(p,[t])},t.prototype.reverse=function(t,e){var n=zt.get("WEBGL_PACK_ARRAY_OPERATIONS")?new Ai(t.shape,e):new Li(t.shape,e);return this.compileAndRun(n,[t])},t.prototype.concat=function(t,e){if(this.shouldExecuteOnCPU(t))return this.cpuBackend.concat(t,e);if(1===t.length)return t[0];if(t.length>zt.get("WEBGL_MAX_TEXTURES_IN_SHADER")){var n=Math.floor(t.length/2),r=this.concat(t.slice(0,n),e),i=this.concat(t.slice(n),e);return this.concat([r,i],e)}if(zt.get("WEBGL_PACK_ARRAY_OPERATIONS")&&t[0].rank>1){var a=new Ln(t.map(function(t){return t.shape}),e);return this.compileAndRun(a,t)}var o=le(t.map(function(t){return t.shape}),e),s=t.map(function(t){return t.as2D(-1,k(t.shape.slice(e)))}),c=new On(s.map(function(t){return t.shape}));return this.compileAndRun(c,s).reshape(o)},t.prototype.neg=function(t){var e=new Ji(t.shape,"return -x;");return this.compileAndRun(e,[t])},t.prototype.batchMatMul=function(t,e,n,r){var i=n?t.shape[2]:t.shape[1],a=r?e.shape[1]:e.shape[2],o=n?t.shape[1]:t.shape[2],s=t.shape[0];if((1===i||1===a)&&o>1e3){n&&(t=t.transpose([0,2,1])),r&&(e=e.transpose([0,2,1]));var c=1===a?t:t.as3D(s,o,1),u=1===a?2:1,l=1===a?e.as3D(s,1,o):e;return this.multiply(c,l).sum(u,!0)}var d=wt(t.dtype,e.dtype),f=new yi(t.shape,[s,i,a],n,r),h=this.makePackedTensor(f.outputShape,d);return this.compileAndRun(f,[t,e],h)},t.prototype.fusedBatchMatMul=function(t,e,n,r,i,a){var o=n?t.shape[2]:t.shape[1],s=r?e.shape[1]:e.shape[2],c=t.shape[0],u=wt(t.dtype,e.dtype),l=new yi(t.shape,[c,o,s],n,r,!!i,a?function(t,e){if(void 0===e&&(e=!1),"linear"===t)return e?ca:Qi;if("relu"===t)return e?ua:ta;throw new Error("Activation "+t+" has not been implemented for the WebGL backend.")}(a,!0):null),d=this.makePackedTensor(l.outputShape,u),f=[t,e];return i&&f.push(i),this.compileAndRun(l,f,d)},t.prototype.multiply=function(t,e){if("complex64"===t.dtype){var n=this.texData.get(t.dataId),r=this.texData.get(e.dataId),i=new Cn(wn,t.shape,e.shape),a=new Cn(kn,t.shape,e.shape),o=[this.makeComplexComponentTensorHandle(t,n.complexTensors.real),this.makeComplexComponentTensorHandle(t,n.complexTensors.imag),this.makeComplexComponentTensorHandle(e,r.complexTensors.real),this.makeComplexComponentTensorHandle(e,r.complexTensors.imag)],s=this.compileAndRun(i,o),c=this.compileAndRun(a,o),u=this.complex(s,c);return s.dispose(),c.dispose(),u}if(this.shouldExecuteOnCPU([t,e]))return this.cpuBackend.multiply(t,e);if(zt.get("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(t,e,In,t.dtype);var l=new Mn(In,t.shape,e.shape),d=this.makeOutputArray(l.outputShape,t.dtype);return this.compileAndRun(l,[t,e],d)},t.prototype.batchNormalization=function(t,e,n,r,i,a){var o=[t,e,n],s=null;null!=a&&(s=a.shape,o.push(a));var c=null;if(null!=i&&(c=i.shape,o.push(i)),zt.get("WEBGL_PACK_BATCHNORMALIZATION")){var u=new xn(t.shape,e.shape,n.shape,s,c,r);return this.compileAndRun(u,o)}var l=new yn(t.shape,e.shape,n.shape,s,c,r);return this.compileAndRun(l,o)},t.prototype.localResponseNormalization4D=function(t,e,n,r,i){var a=new _i(t.shape,e,n,r,i);return this.compileAndRun(a,[t])},t.prototype.LRNGrad=function(t,e,n,r,i,a,o){var s=new gi(e.shape,r,i,a,o);return this.compileAndRun(s,[e,n,t])},t.prototype.tile=function(t,e){var n=new Wi(t.shape,e);return this.compileAndRun(n,[t])},t.prototype.pad=function(t,e,n){var r=zt.get("WEBGL_PACK_ARRAY_OPERATIONS")?new Ei(t.shape,e,n):new Ci(t.shape,e,n);return this.compileAndRun(r,[t])},t.prototype.transpose=function(t,e){if(this.shouldExecuteOnCPU([t]))return this.cpuBackend.transpose(t,e);var n=zt.get("WEBGL_PACK_ARRAY_OPERATIONS")?new Gi(t.shape,e):new Ui(t.shape,e);return this.compileAndRun(n,[t])},t.prototype.gather=function(t,e,n){if(this.shouldExecuteOnCPU([t,e]))return this.cpuBackend.gather(t,e,n);var r=new er(t.shape,e.size,n);return this.compileAndRun(r,[t,e])},t.prototype.batchToSpaceND=function(t,e,n){b(t.rank<=4,function(){return"batchToSpaceND for rank > 4 with a WebGL backend not implemented yet"});var r=e.reduce(function(t,e){return t*e}),i=Zt(t.shape,e,r),a=Qt(i.length,e.length),o=te(t.shape,e,r),s=ee(n,e.length),c=ne(o,n,e.length);return t.reshape(i).transpose(a).reshape(o).slice(s,c)},t.prototype.spaceToBatchND=function(t,e,n){b(t.rank<=4,function(){return"spaceToBatchND for rank > 4 with a WebGL backend not implemented yet"});var r=e.reduce(function(t,e){return t*e}),i=[[0,0]];i.push.apply(i,n);for(var a=1+e.length;a<t.shape.length;++a)i.push([0,0]);var o=t.pad(i),s=Zt(o.shape,e,r,!1),c=Qt(s.length,e.length,!1),u=te(o.shape,e,r,!1);return o.reshape(s).transpose(c).reshape(u)},t.prototype.reduce=function(t,e,n){var r=t.shape[0],i=t.shape[1],a=he(i),o=new Ii({windowSize:a,inSize:i,batchSize:r},e),s=o.outputShape,c=s[0],u=s[1],l=this.makeOutputArray([c,u],n);return this.compileAndRun(o,[t],l),1===l.shape[1]?l:this.reduce(l,e,n)},t.prototype.argReduce=function(t,e,n){void 0===n&&(n=null);var r=t.shape[0],i=t.shape[1];null!=n&&(r=n.shape[0],i=n.shape[1]);var a=he(i),o=new Xe({windowSize:a,inSize:i,batchSize:r},e,null==n),s=o.outputShape,c=s[0],u=s[1],l=this.makeOutputArray([c,u],"int32"),d=[t];return null!=n&&d.push(n),this.compileAndRun(o,d,l),1===l.shape[1]?l:this.argReduce(t,e,l)},t.prototype.argReducePacked=function(t,e,n){void 0===n&&(n=null);var r=null!=n?n.shape:t.shape,i=he(r[r.length-1]),a=new gn(r,i,e,null==n),o=this.makePackedTensor(a.outputShape,"int32"),s=null==n?[t]:[t,n];return this.compileAndRun(a,s,o),o.rank===t.rank?this.argReducePacked(t,e,o):o},t.prototype.sum=function(t,e){oe("sum",e,t.rank);var n=ie(t.shape,e),r=n[0],i=k(n[1]),a=t.as2D(-1,i),o=kt(t.dtype);return this.reduce(a,"sum",o).reshape(r)},t.prototype.prod=function(t,e){if(this.shouldExecuteOnCPU([t]))return this.cpuBackend.prod(t,e);var n=ie(t.shape,e),r=n[0],i=k(n[1]),a=t.as2D(-1,i),o=kt(t.dtype);return this.reduce(a,"prod",o).reshape(r)},t.prototype.unsortedSegmentSum=function(t,e,n){var r=0,i=se([r],t.rank),a=t;null!=i&&(a=t.transpose(i),r=ue(1,t.rank)[0]);var o=function(t,e,n){for(var r=[],i=t.length,a=0;a<i;a++)a!==e?r.push(t[a]):r.push(n);return r}(a.shape,r,n),s=k([a.shape[r]]),c=a.as2D(-1,s),u=kt(t.dtype),l=this.segOpCompute(c,"unsortedSegmentSum",e,u,n).reshape(o);return null!=i&&(l=l.transpose(ce(i))),l},t.prototype.segOpCompute=function(t,e,n,r,i){var a=t.shape[0],o=t.shape[1],s=function(t,e){var n,r=!1;for(t<=fe?(n=t,r=!0):n=W(t,Math.floor(Math.sqrt(t)));!r;)n>e||n===t?r=!0:n=W(t,n+1);return n}(o,i),c=new Bi({windowSize:s,inSize:o,batchSize:a,numSegments:i},e),u=c.outputShape,l=u[0],d=u[1],f=this.makeOutputArray([l,d],r);return this.compileAndRun(c,[t,n],f),f.shape[1]===i?f:(n=Ne(0,i).tile([o/s]),this.segOpCompute(f,e,n,r,i))},t.prototype.argMinMaxReduce=function(t,e,n){var r=[e];if(oe("arg"+n.charAt(0).toUpperCase()+n.slice(1),r,t.rank),!zt.get("WEBGL_PACK_REDUCE")||t.rank<=2){var i=ie(t.shape,r),a=i[0],o=k(i[1]),s=t.as2D(-1,o);return this.argReduce(s,n).reshape(a)}return this.argReducePacked(t,n)},t.prototype.argMin=function(t,e){return this.argMinMaxReduce(t,e,"min")},t.prototype.argMax=function(t,e){return this.argMinMaxReduce(t,e,"max")},t.prototype.cumsum=function(t,e,n,r){if(e!==t.rank-1)throw new Error("WebGL cumsum shader expects an inner-most axis="+(t.rank-1)+" but got axis="+e);var i=new Wn(t.shape,n,r);return this.compileAndRun(i,[t])},t.prototype.equal=function(t,e){if(zt.get("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(t,e,"\n return vec4(equal(a, b));\n","bool");var n=new Mn("return float(a == b);",t.shape,e.shape),r=this.makeOutputArray(n.outputShape,"bool");return this.compileAndRun(n,[t,e],r)},t.prototype.notEqual=function(t,e){if(zt.get("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(t,e,"\n return vec4(notEqual(a, b));\n","bool");var n=new Mn("return float(a != b);",t.shape,e.shape),r=this.makeOutputArray(n.outputShape,"bool");return this.compileAndRun(n,[t,e],r)},t.prototype.less=function(t,e){if(this.shouldExecuteOnCPU([t,e]))return this.cpuBackend.less(t,e);if(zt.get("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(t,e,"\n return vec4(lessThan(a, b));\n","bool");var n=new Mn("return float(a < b);",t.shape,e.shape),r=this.makeOutputArray(n.outputShape,"bool");return this.compileAndRun(n,[t,e],r)},t.prototype.lessEqual=function(t,e){if(zt.get("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(t,e,"\n return vec4(lessThanEqual(a, b));\n","bool");var n=new Mn("return float(a <= b);",t.shape,e.shape),r=this.makeOutputArray(n.outputShape,"bool");return this.compileAndRun(n,[t,e],r)},t.prototype.greater=function(t,e){if(this.shouldExecuteOnCPU([t,e]))return this.cpuBackend.greater(t,e);if(zt.get("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(t,e,"\n return vec4(greaterThan(a, b));\n","bool");var n=new Mn("return float(a > b);",t.shape,e.shape),r=this.makeOutputArray(n.outputShape,"bool");return this.compileAndRun(n,[t,e],r)},t.prototype.greaterEqual=function(t,e){if(zt.get("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(t,e,"\n return vec4(greaterThanEqual(a, b));\n","bool");var n=new Mn("return float(a >= b);",t.shape,e.shape),r=this.makeOutputArray(n.outputShape,"bool");return this.compileAndRun(n,[t,e],r)},t.prototype.logicalNot=function(t){var e=new Ji(t.shape,"return float(!(x >= 1.0));");return this.compileAndRun(e,[t])},t.prototype.logicalAnd=function(t,e){if(zt.get("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(t,e,"\n return vec4(\n vec4(greaterThanEqual(a, vec4(1.0))) *\n vec4(greaterThanEqual(b, vec4(1.0))));\n","bool");var n=new Mn("return float(a >= 1.0 && b >= 1.0);",t.shape,e.shape),r=this.makeOutputArray(n.outputShape,"bool");return this.compileAndRun(n,[t,e],r)},t.prototype.logicalOr=function(t,e){if(zt.get("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(t,e,"\n return min(\n vec4(greaterThanEqual(a, vec4(1.0))) +\n vec4(greaterThanEqual(b, vec4(1.0))),\n vec4(1.0));\n","bool");var n=new Mn("return float(a >= 1.0 || b >= 1.0);",t.shape,e.shape),r=this.makeOutputArray(n.outputShape,"bool");return this.compileAndRun(n,[t,e],r)},t.prototype.select=function(t,e,n){var r=new ji(t.rank,e.shape,e.rank),i=this.makeOutputArray(r.outputShape,wt(e.dtype,n.dtype));return this.compileAndRun(r,[t,e,n],i)},t.prototype.where=function(t){Jt("tf.where() in webgl locks the UI thread. Call tf.whereAsync() instead");var e=t.dataSync();return to(t.shape,e)},t.prototype.topk=function(t,e,n){return Ke(t.dataSync(),t.shape,t.dtype,e)},t.prototype.min=function(t,e){oe("min",e,t.rank);var n=ie(t.shape,e),r=n[0],i=k(n[1]),a=t.as2D(-1,i);return this.reduce(a,"min",a.dtype).reshape(r)},t.prototype.minimum=function(t,e){if(this.shouldExecuteOnCPU([t,e]))return this.cpuBackend.minimum(t,e);var n=zt.get("WEBGL_PACK_BINARY_OPERATIONS")?new Tn("\n vec4 result = vec4(min(a, b));\n vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));\n \n result.r = isNaN.r > 0. ? NAN : result.r;\n result.g = isNaN.g > 0. ? NAN : result.g;\n result.b = isNaN.b > 0. ? NAN : result.b;\n result.a = isNaN.a > 0. ? NAN : result.a;\n\n return result;\n",t.shape,e.shape):new Mn("\n if (isnan(a)) return a;\n if (isnan(b)) return b;\n\n return min(a, b);\n",t.shape,e.shape);return this.compileAndRun(n,[t,e])},t.prototype.mod=function(t,e){var n=zt.get("WEBGL_PACK_BINARY_OPERATIONS")?new Tn("\n vec4 result = mod(a, b);\n vec4 isNaN = vec4(equal(b, vec4(0.0)));\n \n result.r = isNaN.r > 0. ? NAN : result.r;\n result.g = isNaN.g > 0. ? NAN : result.g;\n result.b = isNaN.b > 0. ? NAN : result.b;\n result.a = isNaN.a > 0. ? NAN : result.a;\n\n return result;\n",t.shape,e.shape):new Mn("if (b == 0.0) return NAN;\n return mod(a, b);",t.shape,e.shape);return this.compileAndRun(n,[t,e])},t.prototype.max=function(t,e){if(this.shouldExecuteOnCPU([t]))return this.cpuBackend.max(t,e);oe("max",e,t.rank);var n=ie(t.shape,e),r=n[0],i=k(n[1]),a=t.as2D(-1,i);return this.reduce(a,"max",a.dtype).reshape(r)},t.prototype.maximum=function(t,e){if(this.shouldExecuteOnCPU([t,e]))return this.cpuBackend.maximum(t,e);var n=zt.get("WEBGL_PACK_BINARY_OPERATIONS")?new Tn("\n vec4 result = vec4(max(a, b));\n vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));\n \n result.r = isNaN.r > 0. ? NAN : result.r;\n result.g = isNaN.g > 0. ? NAN : result.g;\n result.b = isNaN.b > 0. ? NAN : result.b;\n result.a = isNaN.a > 0. ? NAN : result.a;\n\n return result;\n",t.shape,e.shape):new Mn("\n if (isnan(a)) return a;\n if (isnan(b)) return b;\n\n return max(a, b);\n",t.shape,e.shape);return this.compileAndRun(n,[t,e])},t.prototype.all=function(t,e){oe("all",e,t.rank);var n=ie(t.shape,e),r=n[0],i=k(n[1]),a=t.as2D(-1,i);return this.reduce(a,"all",a.dtype).reshape(r)},t.prototype.any=function(t,e){oe("any",e,t.rank);var n=ie(t.shape,e),r=n[0],i=k(n[1]),a=t.as2D(-1,i);return this.reduce(a,"any",a.dtype).reshape(r)},t.prototype.squaredDifference=function(t,e){var n=zt.get("WEBGL_PACK_BINARY_OPERATIONS")?new Tn("return (a - b) * (a - b);",t.shape,e.shape):new Mn("return (a - b) * (a - b);",t.shape,e.shape);return this.compileAndRun(n,[t,e])},t.prototype.realDivide=function(t,e){var n=new Mn("if (a == b) return 1.0;\n return a / b;",t.shape,e.shape),r=this.makeOutputArray(n.outputShape,"float32");return this.compileAndRun(n,[t,e],r)},t.prototype.floorDiv=function(t,e){if(zt.get("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(t,e,"\n vec4 resultSign = sign(a) * sign(b);\n ivec4 ia = round(a);\n ivec4 ib = round(b);\n ivec4 result = ia / ib;\n ivec4 amodb = ia - ib * result;\n\n // Vectorize INT_DIV\n // if (resultSign < 0.0 && amodb != 0) result -= 1;\n // return float(result);\n return vec4(result -\n ivec4(lessThan(resultSign, vec4(0.0))) * ivec4(notEqual(amodb, ivec4(0))));\n","int32");var n=new Mn("\n float resultSign = sign(a) * sign(b);\n int ia = round(a);\n int ib = round(b);\n int result = ia / ib;\n int amodb = ia - ib * result;\n\n if (resultSign < 0.0 && amodb != 0) {\n result -= 1;\n }\n return float(result);\n",t.shape,e.shape),r=this.makeOutputArray(n.outputShape,"int32");return this.compileAndRun(n,[t,e],r)},t.prototype.add=function(t,e){if("complex64"===t.dtype&&"complex64"===e.dtype)return this.complexSeparableBinaryOp(t,e,En);if(this.shouldExecuteOnCPU([t,e]))return this.cpuBackend.add(t,e);var n=wt(t.dtype,e.dtype);if(zt.get("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(t,e,En,n);var r=new Mn(En,t.shape,e.shape),i=this.makeOutputArray(r.outputShape,n);return this.compileAndRun(r,[t,e],i)},t.prototype.packedBinaryOp=function(t,e,n,r){var i=new Tn(n,t.shape,e.shape),a=this.makePackedTensor(i.outputShape,r);return this.compileAndRun(i,[t,e],a)},t.prototype.complexSeparableBinaryOp=function(t,e,n){var r=this,i=this.texData.get(t.dataId),a=this.texData.get(e.dataId),o=[[i.complexTensors.real,a.complexTensors.real],[i.complexTensors.imag,a.complexTensors.imag]].map(function(i){var a=i[0],o=i[1],s=r.makeComplexComponentTensorHandle(t,a),c=r.makeComplexComponentTensorHandle(e,o),u=new Mn(n,t.shape,e.shape),l=r.makeOutputArray(u.outputShape,wt(a.dtype,o.dtype));return r.compileAndRun(u,[s,c],l)}),s=o[0],c=o[1],u=this.complex(s,c);return s.dispose(),c.dispose(),u},t.prototype.makeComplexComponentTensorHandle=function(t,e){return{dataId:e.dataId,dtype:e.dtype,shape:t.shape}},t.prototype.addN=function(t){for(var e=t[0],n=1;n<t.length;n++)e=this.add(e,t[n]);return e},t.prototype.subtract=function(t,e){if("complex64"===t.dtype&&"complex64"===e.dtype)return this.complexSeparableBinaryOp(t,e,Sn);if(this.shouldExecuteOnCPU([t,e]))return this.cpuBackend.subtract(t,e);var n=wt(t.dtype,e.dtype);if(zt.get("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(t,e,Sn,t.dtype);var r=new Mn(Sn,t.shape,e.shape),i=this.makeOutputArray(r.outputShape,n);return this.compileAndRun(r,[t,e],i)},t.prototype.pow=function(t,e){var n=zt.get("WEBGL_PACK_BINARY_OPERATIONS"),r=n?new Tn("\n // isModRound1 has 1 for components with round(mod(b, 2.0)) == 1, 0 otherwise.\n vec4 isModRound1 = vec4(equal(round(mod(b, 2.0)), ivec4(1)));\n vec4 multiplier = sign(a) * isModRound1 + (vec4(1.0) - isModRound1);\n vec4 result = multiplier * pow(abs(a), b);\n\n vec4 isNaN = vec4(lessThan(a, vec4(0.0))) * vec4(lessThan(floor(b), b));\n \n result.r = isNaN.r > 0. ? NAN : result.r;\n result.g = isNaN.g > 0. ? NAN : result.g;\n result.b = isNaN.b > 0. ? NAN : result.b;\n result.a = isNaN.a > 0. ? NAN : result.a;\n\n return result;\n",t.shape,e.shape):new Mn("\nif(a < 0.0 && floor(b) < b){\n return NAN;\n}\nreturn (round(mod(b, 2.0)) != 1) ?\n pow(abs(a), b) : sign(a) * pow(abs(a), b);\n",t.shape,e.shape),i=wt(t.dtype,e.dtype),a=n?this.makePackedTensor(r.outputShape,i):this.makeOutputArray(r.outputShape,i);return this.compileAndRun(r,[t,e],a)},t.prototype.ceil=function(t){var e=new Ji(t.shape,"return ceil(x);");return this.compileAndRun(e,[t])},t.prototype.floor=function(t){var e=new Ji(t.shape,"return floor(x);");return this.compileAndRun(e,[t])},t.prototype.sign=function(t){var e=new Ji(t.shape,"\n if (isnan(x)) { return 0.0; }\n return sign(x);\n");return this.compileAndRun(e,[t])},t.prototype.isNaN=function(t){var e=new Ji(t.shape,"return float(isnan(x));"),n=this.makeOutputArray(e.outputShape,"bool");return this.compileAndRun(e,[t],n)},t.prototype.isInf=function(t){var e=new Ji(t.shape,"return float(isinf(x));"),n=this.makeOutputArray(e.outputShape,"bool");return this.compileAndRun(e,[t],n)},t.prototype.isFinite=function(t){var e=new Ji(t.shape,"return float(!isnan(x) && !isinf(x));"),n=this.makeOutputArray(e.outputShape,"bool");return this.compileAndRun(e,[t],n)},t.prototype.round=function(t){var e=new Ji(t.shape,"\n // OpenGL ES does not support round function.\n // The algorithm is based on banker's rounding.\n float base = floor(x);\n if ((x - base) < 0.5) {\n return floor(x);\n } else if ((x - base) > 0.5) {\n return ceil(x);\n } else {\n if (mod(base, 2.0) == 0.0) {\n return base;\n } else {\n return base + 1.0;\n }\n }\n");return this.compileAndRun(e,[t])},t.prototype.exp=function(t){var e;return e=zt.get("WEBGL_PACK")?new la(t.shape,na):new Ji(t.shape,na),this.compileAndRun(e,[t])},t.prototype.expm1=function(t){var e=new Ji(t.shape,"return exp(x) - 1.0;");return this.compileAndRun(e,[t])},t.prototype.log=function(t){var e;return e=zt.get("WEBGL_PACK")?new la(t.shape,"\n vec4 result = log(x);\n vec4 isNaN = vec4(lessThan(x, vec4(0.0)));\n result.r = isNaN.r == 1.0 ? NAN : result.r;\n result.g = isNaN.g == 1.0 ? NAN : result.g;\n result.b = isNaN.b == 1.0 ? NAN : result.b;\n result.a = isNaN.a == 1.0 ? NAN : result.a;\n\n return result;\n"):new Ji(t.shape,"if (x < 0.0) return NAN;\n return log(x);"),this.compileAndRun(e,[t])},t.prototype.log1p=function(t){var e=new Ji(t.shape,"return log(1.0 + x);");return this.compileAndRun(e,[t])},t.prototype.sqrt=function(t){var e=new Ji(t.shape,"return sqrt(x);");return this.compileAndRun(e,[t])},t.prototype.rsqrt=function(t){if(this.shouldExecuteOnCPU([t]))return this.cpuBackend.rsqrt(t);var e=new Ji(t.shape,"return inversesqrt(x);");return this.compileAndRun(e,[t])},t.prototype.square=function(t){var e=new Ji(t.shape,"return x * x;");return this.compileAndRun(e,[t])},t.prototype.reciprocal=function(t){var e=new Ji(t.shape,"return 1.0 / x;");return this.compileAndRun(e,[t])},t.prototype.relu=function(t){var e;return e=zt.get("WEBGL_PACK")?new la(t.shape,ua):new Ji(t.shape,ta),this.compileAndRun(e,[t])},t.prototype.prelu=function(t,e){var n=zt.get("WEBGL_PACK_BINARY_OPERATIONS")?new Tn("\n vec4 aLessThanZero = vec4(lessThan(a, vec4(0.)));\n return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a);\n",t.shape,e.shape):new Mn("return (a < 0.) ? b * a : a;",t.shape,e.shape);return this.compileAndRun(n,[t,e])},t.prototype.elu=function(t){var e=new Ji(t.shape,"return (x >= 0.0) ? x : (exp(x) - 1.0);");return this.compileAndRun(e,[t])},t.prototype.eluDer=function(t,e){var n=zt.get("WEBGL_PACK_BINARY_OPERATIONS")?new Tn("\n vec4 bGTEZero = vec4(greaterThanEqual(b, vec4(0.)));\n return (bGTEZero * a) + ((vec4(1.0) - bGTEZero) * (a * (b + vec4(1.0))));\n",t.shape,e.shape):new Mn("return (b >= 1.0) ? a : a * (b + 1.0);",t.shape,e.shape);return this.compileAndRun(n,[t,e])},t.prototype.selu=function(t){var e=new Ji(t.shape,ea);return this.compileAndRun(e,[t])},t.prototype.int=function(t){var e=new Ji(t.shape,"return float(int(x));"),n=this.makeOutputArray(e.outputShape,"int32");return this.compileAndRun(e,[t],n)},t.prototype.clip=function(t,e,n){var r,i=(r=zt.get("WEBGL_PACK_CLIP")?new Rn(t.shape):new Dn(t.shape)).getCustomSetupFunc(e,n);return this.compileAndRun(r,[t],null,i)},t.prototype.abs=function(t){var e=new Ji(t.shape,"return abs(x);");return this.compileAndRun(e,[t])},t.prototype.complexAbs=function(t){var e=this.texData.get(t.dataId),n=new Pn(t.shape),r=[this.makeComplexComponentTensorHandle(t,e.complexTensors.real),this.makeComplexComponentTensorHandle(t,e.complexTensors.imag)];return this.compileAndRun(n,r)},t.prototype.sigmoid=function(t){var e=new Ji(t.shape,"return 1.0 / (1.0 + exp(-1.0 * x));");return this.compileAndRun(e,[t])},t.prototype.softplus=function(t){var e=new Ji(t.shape,"\n float epsilon = 1.1920928955078125e-7;\n float threshold = log(epsilon) + 2.0;\n\n bool too_large = x > -threshold;\n bool too_small = x < threshold;\n\n float result;\n float exp_x = exp(x);\n\n if (too_large){\n result = x;\n }\n else if (too_small){\n result = exp_x;\n }\n else{\n result = log(exp_x + 1.0);\n }\n return result;\n");return this.compileAndRun(e,[t])},t.prototype.sin=function(t){var e=new Ji(t.shape,ra);return this.compileAndRun(e,[t])},t.prototype.cos=function(t){var e=new Ji(t.shape,ia);return this.compileAndRun(e,[t])},t.prototype.tan=function(t){var e=new Ji(t.shape,"return tan(x);");return this.compileAndRun(e,[t])},t.prototype.asin=function(t){var e=new Ji(t.shape,"return asin(x);");return this.compileAndRun(e,[t])},t.prototype.acos=function(t){var e=new Ji(t.shape,"return acos(x);");return this.compileAndRun(e,[t])},t.prototype.atan=function(t){var e=new Ji(t.shape,aa);return this.compileAndRun(e,[t])},t.prototype.atan2=function(t,e){var n=zt.get("WEBGL_PACK_BINARY_OPERATIONS")?new Tn("\n vec4 result = atan(a, b);\n vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));\n \n result.r = isNaN.r > 0. ? NAN : result.r;\n result.g = isNaN.g > 0. ? NAN : result.g;\n result.b = isNaN.b > 0. ? NAN : result.b;\n result.a = isNaN.a > 0. ? NAN : result.a;\n\n return result;\n",t.shape,e.shape):new Mn("\n if (isnan(a)) return a;\n if (isnan(b)) return b;\n\n return atan(a, b);\n",t.shape,e.shape);return this.compileAndRun(n,[t,e])},t.prototype.sinh=function(t){var e=new Ji(t.shape,"\n float e2x = exp(x);\n return (e2x - 1.0 / e2x) / 2.0;\n");return this.compileAndRun(e,[t])},t.prototype.cosh=function(t){var e=new Ji(t.shape,"\n float e2x = exp(-x);\n return (e2x + 1.0 / e2x) / 2.0;\n");return this.compileAndRun(e,[t])},t.prototype.tanh=function(t){var e=new Ji(t.shape,"\n float e2x = exp(-2.0 * abs(x));\n return sign(x) * (1.0 - e2x) / (1.0 + e2x);\n");return this.compileAndRun(e,[t])},t.prototype.asinh=function(t){var e=new Ji(t.shape,"return log(x + sqrt(x * x + 1.0));");return this.compileAndRun(e,[t])},t.prototype.acosh=function(t){var e=new Ji(t.shape,oa);return this.compileAndRun(e,[t])},t.prototype.atanh=function(t){var e=new Ji(t.shape,sa);return this.compileAndRun(e,[t])},t.prototype.erf=function(t){var e=new Ji(t.shape,'\n // Error function is calculated approximately with elementary function.\n // See "Handbook of Mathematical Functions with Formulas,\n // Graphs, and Mathematical Tables", Abramowitz and Stegun.\n float p = 0.3275911;\n float a1 = 0.254829592;\n float a2 = -0.284496736;\n float a3 = 1.421413741;\n float a4 = -1.453152027;\n float a5 = 1.061405429;\n\n float t = 1.0 / (1.0 + p * x);\n return 1.0 - (((((a5*t + a4)*t) + a3)*t + a2)*t + a1)*t*exp(-x*x);\n');return this.compileAndRun(e,[t])},t.prototype.step=function(t,e){var n=new Ji(t.shape,function(t){return void 0===t&&(t=0),Zi+"\n return x > 0.0 ? 1.0 : float("+t+");\n "}(e));return this.compileAndRun(n,[t])},t.prototype.conv2dByMatMul=function(t,e,n){var r=t.shape,i=this.texData.get(t.dataId),a=n.inChannels,o=r[0]*r[1]*r[2],s=n.outChannels,c=(1===o||1===s)&&a>1e3,u=r[2]%2!=0&&!!i.isPacked;if(c||!zt.get("WEBGL_LAZILY_UNPACK")||!zt.get("WEBGL_PACK_BINARY_OPERATIONS")||!u){var l=this.reshape(t,[1,r[0]*r[1]*r[2],n.inChannels]),d=this.reshape(e,[1,n.inChannels,n.outChannels]);return this.reshape(this.batchMatMul(l,d,!1,!1),n.outShape)}var f=ht.make([1,r[0]*r[1]*(r[2]+1),n.inChannels],{dataId:t.dataId},t.dtype,this),h=i.shape;i.shape=i.shape.slice(),i.shape[i.shape.length-2]++,b(Hr(i.shape,f.shape),function(){return"packed reshape "+i.shape+" to "+f.shape+" isn't free"});var p=this.reshape(e,[1,n.inChannels,n.outChannels]),m=this.batchMatMul(f,p,!1,!1),v=this.texData.get(m.dataId);return b(v.isPacked,function(){return"batchMatMul result is expected to be packed"}),i.shape=h,v.shape=n.outShape,ht.make(n.outShape,{dataId:m.dataId},m.dtype,this)},t.prototype.conv2dWithIm2Row=function(t,e,n){var r=n.filterWidth,i=n.filterHeight,a=n.inChannels,o=n.outWidth,s=n.outHeight,c=r*i*a,u=s*o,l=[c,u],d=t.squeeze([0]),f=e.reshape([1,c,-1]),h=new vi(l,d.shape,n),p=this.compileAndRun(h,[d]).reshape([1,l[0],l[1]]),m=new yi(p.shape,[1,u,n.outChannels],!0,!1);return this.compileAndRun(m,[p,f]).reshape([1,s,o,n.outChannels])},t.prototype.conv2d=function(t,e,n){if(1===n.filterHeight&&1===n.filterWidth&&1===n.dilationHeight&&1===n.dilationWidth&&1===n.strideHeight&&1===n.strideWidth&&("SAME"===n.padInfo.type||"VALID"===n.padInfo.type))return this.conv2dByMatMul(t,e,n);if(zt.get("WEBGL_CONV_IM2COL")&&1===t.shape[0])return this.conv2dWithIm2Row(t,e,n);var r=new $n(n);return this.compileAndRun(r,[t,e])},t.prototype.conv2dDerInput=function(t,e,n){var r=new Nn(n);return this.compileAndRun(r,[t,e])},t.prototype.conv2dDerFilter=function(t,e,n){var r=new An(n);return this.compileAndRun(r,[t,e])},t.prototype.depthwiseConv2D=function(t,e,n){var r;return zt.get("WEBGL_PACK_DEPTHWISECONV")&&n.strideWidth<=2&&n.outChannels/n.inChannels==1?(r=new Hn(n),this.compileAndRun(r,[t,e],this.makePackedTensor(n.outShape,t.dtype))):(r=new Vn(n),this.compileAndRun(r,[t,e]))},t.prototype.depthwiseConv2DDerInput=function(t,e,n){var r=new Yn(n);return this.compileAndRun(r,[t,e])},t.prototype.depthwiseConv2DDerFilter=function(t,e,n){var r=new Fn(n);return this.compileAndRun(r,[t,e])},t.prototype.conv3d=function(t,e,n){var r=new zn(n);return this.compileAndRun(r,[t,e])},t.prototype.conv3dDerInput=function(t,e,n){var r=new jn(n);return this.compileAndRun(r,[t,e])},t.prototype.conv3dDerFilter=function(t,e,n){var r=new Bn(n);return this.compileAndRun(r,[t,e])},t.prototype.maxPool=function(t,e){var n=new Si(e,"max",!1),r=this.makeOutputArray(n.outputShape,t.dtype);return this.compileAndRun(n,[t],r)},t.prototype.avgPool=function(t,e){var n=new Si(e,"avg",!1),r=this.makeOutputArray(n.outputShape,"float32");return this.compileAndRun(n,[t],r)},t.prototype.maxPoolBackprop=function(t,e,n,r){var i=new Si(r,"max",!0),a=this.compileAndRun(i,[e]),o=new bi(r),s=this.makeOutputArray(o.outputShape,e.dtype),c=this.compileAndRun(o,[t,a],s);return a.dispose(),c},t.prototype.avgPoolBackprop=function(t,e,n){var r=new bn(n),i=this.makeOutputArray(r.outputShape,e.dtype);return this.compileAndRun(r,[t],i)},t.prototype.cast=function(t,e){return Ye(t,e,this)},t.prototype.unstack=function(t,e){for(var n=t.shape[e],r=new Array(t.rank-1),i=0,a=0;a<t.rank;a++)a!==e&&(r[i++]=t.shape[a]);var o=new Array(t.rank).fill(0),s=t.shape.slice();s[e]=1;var c=new Array(n);for(a=0;a<c.length;a++)o[e]=a,c[a]=this.slice(t,o,s).reshape(r);return c},t.prototype.reshape=function(t,e){var n=this.texData.get(t.dataId);return!n.isPacked||Hr(t.shape,e)||null!==n.texture&&Hr(n.shape,e)?$e(t,e):this.packedReshape(t,e)},t.prototype.resizeBilinear=function(t,e,n,r){var i=zt.get("WEBGL_PACK_IMAGE_OPERATIONS")?new Ri(t.shape,e,n,r):new Di(t.shape,e,n,r);return this.compileAndRun(i,[t])},t.prototype.resizeBilinearBackprop=function(t,e,n){var r=new Ti(t,e,n);return this.compileAndRun(r,[t])},t.prototype.resizeNearestNeighbor=function(t,e,n,r){var i=new Oi(t.shape,e,n,r);return this.compileAndRun(i,[t])},t.prototype.resizeNearestNeighborBackprop=function(t,e,n){var r=new Pi(t,e,n);return this.compileAndRun(r,[t])},t.prototype.multinomial=function(t,e,n,r){var i=e?t:we(t),a=i.shape[0],o=i.shape[1],s=new xi(a,o,n),c=this.makeOutputArray(s.outputShape,"int32"),u=s.getCustomSetupFunc(r);return this.compileAndRun(s,[i],c,u)},t.prototype.oneHot=function(t,e,n,r){var i=new wi(t.size,e,n,r);return this.compileAndRun(i,[t])},t.prototype.nonMaxSuppression=function(t,e,n,r,i){return Jt("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead"),We(t.dataSync(),e.dataSync(),n,r,i)},t.prototype.cropAndResize=function(t,e,n,r,i,a){var o=new qn(t.shape,e.shape,r,i,a);return this.compileAndRun(o,[t,e,n])},t.prototype.depthToSpace=function(t,e,n){b(e>1,function(){return"blockSize should be > 1 for depthToSpace, but was: "+e});var r=t.shape[0],i="NHWC"===n?t.shape[1]:t.shape[2],a="NHWC"===n?t.shape[2]:t.shape[3],o="NHWC"===n?t.shape[3]:t.shape[1],s=i*e,c=a*e,u=o/(e*e),l=new Gn("NHWC"===n?[r,s,c,u]:[r,u,s,c],e,n);return this.compileAndRun(l,[t])},t.prototype.split=function(t,e,n){return Ge(t,e,n)},t.prototype.scatterND=function(t,e,n){var r=me(0,t,n),i=r.sliceRank,a=r.numUpdates,o=r.sliceSize,s=r.strides,c=r.outputSize,u=[c/o,o],l=t.reshape([a,i]),d=e.reshape([a,o]);if(0===c)return $e(Ie([]),n);var f=Me(0),h=new Ni(a,i,l.rank,d.rank,s,u);return this.compileAndRun(h,[d,l,f]).reshape(n)},t.prototype.sparseToDense=function(t,e,n,r){var i=me(0,t,n),a=i.sliceRank,o=i.numUpdates,s=i.strides,c=i.outputSize,u=new Ni(o,a,t.rank,e.rank,s,[c,1],!1);return this.compileAndRun(u,[e,t,r]).reshape(n)},t.prototype.fft=function(t){return this.fftImpl(t,!1)},t.prototype.ifft=function(t){return this.fftImpl(t,!0)},t.prototype.fftImpl=function(t,e){var n=this.texData.get(t.dataId),r=new Zn(Xn,t.shape,e),i=new Zn(Jn,t.shape,e),a=[this.makeComplexComponentTensorHandle(t,n.complexTensors.real),this.makeComplexComponentTensorHandle(t,n.complexTensors.imag)],o=this.compileAndRun(r,a),s=this.compileAndRun(i,a),c=this.complex(o,s).as2D(t.shape[0],t.shape[1]);return o.dispose(),s.dispose(),c},t.prototype.gatherND=function(t,e){var n=e.shape,r=n[n.length-1],i=de(t,e),a=i[0],o=i[1],s=i[2],c=i[3],u=e.reshape([o,r]),l=t.reshape([t.size/s,s]),d=new ir(r,c,[o,s]);return this.compileAndRun(d,[l,u]).reshape(a)},t.prototype.fill=function(t,e,n){if("string"===(n=n||H(e))){var r=L(n,k(t));return r.fill(e),ht.make(t,{values:r},n)}var i=new Qn(t,e),a=i.getCustomSetupFunc(e),o=this.makeOutputArray(t,n);return this.compileAndRun(i,[],o,a)},t.prototype.onesLike=function(t){if("string"===t.dtype)throw new Error("onesLike is not supported under string dtype");return this.fill(t.shape,1,t.dtype)},t.prototype.zerosLike=function(t){return this.fill(t.shape,"string"===t.dtype?"":0,t.dtype)},t.prototype.makeOutputArray=function(t,e){return ht.make(t,{},e,this)},t.prototype.makePackedTensor=function(t,e){var n=ht.make(t,{},e,this);return this.texData.get(n.dataId).isPacked=!0,n},t.prototype.unpackTensor=function(t){var e=new da(t.shape);return this.compileAndRun(e,[t],ht.make(e.outputShape,{},t.dtype,this))},t.prototype.packTensor=function(t){var e=new ki(t.shape);return this.compileAndRun(e,[t],this.makePackedTensor(t.shape,t.dtype))},t.prototype.packedReshape=function(t,e){var n=t.reshape([Yr(t.shape)].concat($r(t.shape))),r=[Yr(e)].concat($r(e)),i=new Mi(r,n.shape);return this.compileAndRun(i,[n]).reshape(e)},t.prototype.compileAndRun=function(t,e,n,r,i){var a=this;if(void 0===i&&(i=!0),null==n&&(n=t.usesPackedTextures?this.makePackedTensor(t.outputShape,e[0].dtype):this.makeOutputArray(t.outputShape,e[0].dtype)),0===n.size)return this.texData.get(n.dataId).values=O(n.dtype,0),n;var o=e.map(function(e){if("complex64"===e.dtype)throw new Error("GPGPUProgram does not support complex64 input. For complex64 dtypes, please separate the program into real and imaginary parts.");var n=a.texData.get(e.dataId);if(null==n.texture){if(!t.usesPackedTextures&&k(e.shape)<=zt.get("WEBGL_SIZE_UPLOAD_UNIFORM"))return{shape:e.shape,texData:null,isUniform:!0,uniformValues:a.readSync(e.dataId)};t.usesPackedTextures&&(n.isPacked=!0,n.shape=e.shape)}else if(!!n.isPacked!=!!t.usesPackedTextures)e=n.isPacked?a.unpackTensor(e):a.packTensor(e),n=a.texData.get(e.dataId);else if(n.isPacked&&!Hr(n.shape,e.shape)){var r=e,i=e.shape;e.shape=n.shape,e=a.packedReshape(e,i),n=a.texData.get(e.dataId),r.shape=i}return a.uploadToGPU(e.dataId),{shape:e.shape,texData:n,isUniform:!1}});this.uploadToGPU(n.dataId);var s,c={shape:n.shape,texData:this.texData.get(n.dataId),isUniform:!1},u=function(t,e,n){var r="";e.concat(n).forEach(function(t){var e=null!=t.texData&&null!=t.texData.slice&&t.texData.slice.flatOffset>0,n=t.isUniform?"uniform":t.texData.texShape;r+=t.shape+"_"+n+"_"+e});var i=t.userCode;return t.constructor.name+"_"+r+"_"+i}(t,o,c),l=this.getAndSaveBinary(u,function(){return function(t,e,n,r){var i=e.userCode,a=n.map(function(t,n){var r={logicalShape:t.shape,texShape:t.isUniform?null:t.texData.texShape,isUniform:t.isUniform,isPacked:!t.isUniform&&t.texData.isPacked,flatOffset:null};return null!=t.texData&&null!=t.texData.slice&&t.texData.slice.flatOffset>0&&(r.flatOffset=t.texData.slice.flatOffset),{name:e.variableNames[n],shapeInfo:r}}),o=a.map(function(t){return t.shapeInfo}),s={logicalShape:r.shape,texShape:r.texData.texShape,isUniform:!1,isPacked:r.texData.isPacked,flatOffset:null},c=on(a,s,i,e.usesPackedTextures),u=t.createProgram(c),l=null,d=null;1===zt.get("WEBGL_VERSION")&&(l=t.getUniformLocation(u,"INFINITY",!1),d=t.getUniformLocation(u,"NAN",!1));for(var f={},h=0;h<e.variableNames.length;h++){var p=e.variableNames[h];f[p]=t.getUniformLocation(u,p,!1),f["offset"+p]=t.getUniformLocation(u,"offset"+p,!1)}return{program:e,source:c,webGLProgram:u,uniformLocations:f,inShapeInfos:o,outShapeInfo:s,infLoc:l,nanLoc:d}}(a.gpgpu,t,o,c)}),d=null!=this.activeTimers;d&&(s=this.startTimer()),function(t,e,n,r,i){mi(e.inShapeInfos,n),mi([e.outShapeInfo],[r]);var a=r.texData.texture,o=r.texData.texShape;r.texData.isPacked?t.setOutputPackedMatrixTexture(a,o[0],o[1]):t.setOutputMatrixTexture(a,o[0],o[1]),t.setProgram(e.webGLProgram),1===zt.get("WEBGL_VERSION")&&(null!==e.infLoc&&t.gl.uniform1f(e.infLoc,1/0),null!==e.nanLoc&&t.gl.uniform1f(e.nanLoc,NaN)),n.forEach(function(n,r){var i=e.program.variableNames[r],a=e.uniformLocations[i],o=e.uniformLocations["offset"+i];if(null!=a)if(n.isUniform)if(k(n.shape)<2)t.gl.uniform1f(a,n.uniformValues[0]);else{var s=n.uniformValues;s instanceof Float32Array||(s=new Float32Array(s)),t.gl.uniform1fv(a,s)}else null!=n.texData.slice&&null!=o&&t.gl.uniform1i(o,n.texData.slice.flatOffset),t.setInputMatrixTexture(n.texData.texture,a,r)}),null!=i&&i(t,e.webGLProgram),t.executeProgram()}(this.gpgpu,l,o,c,r);var f=1024*zt.get("WEBGL_NUM_MB_BEFORE_PAGING");if(i&&this.numBytesInGPU>f)for(var h=this.numBytesInGPU-f;h>0&&this.lruDataGPU.length>0;){var p=this.lruDataGPU.shift(),m=this.texData.get(p),v=m.texShape,_=m.dtype;h-=this.computeBytes(v,_),this.read(p)}return d&&(s=this.endTimer(s),this.activeTimers.push({name:t.constructor.name,query:this.getQueryTime(s)})),zt.get("WEBGL_LAZILY_UNPACK")||!this.texData.get(n.dataId).isPacked||t.isPackShader?n:this.unpackTensor(n)},t.prototype.getAndSaveBinary=function(t,e){return t in this.binaryCache||(this.binaryCache[t]=e()),this.binaryCache[t]},t.prototype.getTextureManager=function(){return this.textureManager},t.prototype.dispose=function(){this.disposed||(this.textureManager.dispose(),this.canvas.remove(),null!=this.fromPixels2DContext&&this.fromPixels2DContext.canvas.remove(),this.gpgpuCreatedLocally&&(this.gpgpu.program=null,this.gpgpu.dispose()),this.disposed=!0)},t.prototype.floatPrecision=function(){var t=this;return Gt(function(){var e=zt.get("DEBUG");zt.set("DEBUG",!1);var n=t.abs(Me(1e-8)).dataSync()[0];return zt.set("DEBUG",e),n>0?32:16})},t.prototype.uploadToGPU=function(t){var e,n=this.texData.get(t),r=n.shape,i=n.dtype,a=n.values,o=n.texture,s=n.usage,c=n.isPacked;if(null==o){var u,l=null!=this.activeTimers;l&&(u=performance.now());var d=zr(r,c);n.texShape=d;var f=this.acquireTexture(t,d,s,i,c);if(n.texture=f,null!=a){if(c){var h=Yr(r),p=1,m=1;r.length&&(p=(e=$r(r))[0],m=e[1]),this.gpgpu.uploadMatrixToPackedTexture(f,h,p,m,d[0],d[1],ro(a))}else this.gpgpu.uploadMatrixToTexture(f,d[0],d[1],ro(a));n.values=null,l&&(this.uploadWaitMs+=performance.now()-u)}}else zt.get("WEBGL_NUM_MB_BEFORE_PAGING")<Number.POSITIVE_INFINITY&&this.lruDataGPU.indexOf(t)>=0&&(this.lruDataGPU.splice(this.lruDataGPU.indexOf(t),1),this.lruDataGPU.push(t))},t.prototype.convertAndCacheOnCPU=function(t,e){var n=this.texData.get(t),r=n.texture,i=n.texShape,a=n.dtype,o=n.usage,s=n.isPacked;return null!=r&&(this.releaseTexture(t,r,i,o,a,s),n.texture=null,n.texShape=null,n.isPacked=!1),n.usage=nr.UPLOAD,null!=e&&(n.values=function(t,e){if("float32"===e||"complex64"===e)return t;if("int32"===e||"bool"===e){for(var n="int32"===e?new Int32Array(t.length):new Uint8Array(t.length),r=0;r<n.length;++r)n[r]=Math.round(t[r]);return n}throw new Error("Unknown dtype "+e)}(e,a)),n.values},t.prototype.releaseTexture=function(t,e,n,r,i,a){if(zt.get("WEBGL_NUM_MB_BEFORE_PAGING")<Number.POSITIVE_INFINITY){var o=this.lruDataGPU.indexOf(t);o>=0&&this.lruDataGPU.splice(o,1)}this.numBytesInGPU-=this.computeBytes(n,i),this.textureManager.releaseTexture(e,n,r,a)},t.prototype.acquireTexture=function(t,e,n,r,i){return zt.get("WEBGL_NUM_MB_BEFORE_PAGING")<Number.POSITIVE_INFINITY&&this.lruDataGPU.push(t),this.numBytesInGPU+=this.computeBytes(e,r),this.textureManager.acquireTexture(e,n,i)},t.prototype.computeBytes=function(t,e){return t[0]*t[1]*F(e)},t}();function ro(t){return t instanceof Float32Array?t:new Float32Array(t)}zt.get("IS_BROWSER")&&zt.registerBackend("webgl",function(){return new no},2);var io=xe({abs_:function(t){var e=qt(t,"x","abs");return"complex64"===e.dtype?zt.engine.runKernel(function(t){return t.complexAbs(e)},{$x:e}):zt.engine.runKernel(function(t,n){var r=t.abs(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.mul(n.toFloat().step(-1))}}})}}),ao=xe({acos_:function(t){var e=qt(t,"x","acos");return zt.engine.runKernel(function(t,n){var r=t.acos(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.divStrict(Me(1).sub(n.toFloat().square()).sqrt()).neg()}}})}}),oo=xe({acosh_:function(t){var e=qt(t,"x","acosh");return zt.engine.runKernel(function(t,n){var r=t.acosh(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.divStrict(n.toFloat().square().sub(1).sqrt())}}})}}),so=xe({asin_:function(t){var e=qt(t,"x","asin");return zt.engine.runKernel(function(t,n){var r=t.asin(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.divStrict(Me(1).sub(n.toFloat().square()).sqrt())}}})}}),co=xe({asinh_:function(t){var e=qt(t,"x","asinh");return zt.engine.runKernel(function(t,n){var r=t.asinh(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.divStrict(Me(1).add(n.toFloat().square()).sqrt())}}})}}),uo=xe({atan_:function(t){var e=qt(t,"x","atan");return zt.engine.runKernel(function(t,n){var r=t.atan(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.div(n.toFloat().square().add(1))}}})}}),lo=xe({atanh_:function(t){var e=qt(t,"x","atanh");return zt.engine.runKernel(function(t,n){var r=t.atanh(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.div(Me(1).sub(n.toFloat().square()))}}})}}),fo=xe({ceil_:function(t){var e=qt(t,"x","ceil");return zt.engine.runKernel(function(t){return t.ceil(e)},{$x:e},function(t){return{$x:function(){return je(t)}}})}}),ho=xe({clipByValue_:function(t,e,n){var r=qt(t,"x","clipByValue");return b(e<=n,function(){return"Error in clip: min ("+e+") must be less than or equal to max ("+n+")."}),zt.engine.runKernel(function(t,i){var a=t.clip(r,e,n);return i([r]),a},{$x:r},function(t,r){var i=r[0];return{$x:function(){return t.where(i.greaterEqual(e).logicalAnd(i.lessEqual(n)),je(t))}}})}}),po=xe({cos_:function(t){var e=qt(t,"x","cos");return zt.engine.runKernel(function(t,n){var r=t.cos(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return n.toFloat().sin().neg().mul(t)}}})}}),mo=xe({cosh_:function(t){var e=qt(t,"x","cosh");return zt.engine.runKernel(function(t,n){var r=t.cosh(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return n.toFloat().sinh().mulStrict(t)}}})}}),vo=xe({erf_:function(t){var e=qt(t,"x","erf");return b("int32"===e.dtype||"float32"===e.dtype,function(){return"Input dtype must be `int32` or `float32`."}),"int32"===e.dtype&&(e=e.toFloat()),zt.engine.runKernel(function(t,n){var r=t.erf(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.mul(n.square().neg().exp().mul(2/Math.sqrt(Math.PI)))}}})}}),_o=xe({exp_:function(t){var e=qt(t,"x","exp");return zt.engine.runKernel(function(t,n){var r=t.exp(e);return n([r]),r},{$x:e},function(t,e){return{$x:function(){return t.mulStrict(e[0])}}})}}),go=xe({expm1_:function(t){var e=qt(t,"x","expm1");return zt.engine.runKernel(function(t,n){var r=t.expm1(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.mul(n.exp())}}})}}),bo=xe({floor_:function(t){var e=qt(t,"x","floor");return zt.engine.runKernel(function(t){return t.floor(e)},{$x:e},function(t){return{$x:function(){return je(t)}}})}}),yo=xe({log_:function(t){var e=qt(t,"x","log");return zt.engine.runKernel(function(t,n){var r=t.log(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.div(n.toFloat())}}})}}),xo=xe({log1p_:function(t){var e=qt(t,"x","log1p");return zt.engine.runKernel(function(t,n){var r=t.log1p(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.div(n.add(1))}}})}}),wo=xe({logSigmoid_:function(t){var e=qt(t,"x","logSigmoid");return zt.engine.runKernel(function(t,n){var r=t.softplus(e.neg()).neg();return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.mul(n.neg().sigmoid())}}})}}),ko=xe({neg_:function(t){var e=qt(t,"x","neg");return zt.engine.runKernel(function(t){return t.neg(e)},{$x:e},function(t){return{$x:function(){return t.neg()}}})}}),Co=xe({reciprocal_:function(t){var e=qt(t,"x","reciprocal");return zt.engine.runKernel(function(t,n){var r=t.reciprocal(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.div(n.square().neg())}}})}}),Eo=xe({round_:function(t){var e=qt(t,"x","round");return zt.engine.runKernel(function(t){return t.round(e)},{$x:e},function(t){return{$x:function(){return je(t)}}})}}),So=xe({rsqrt_:function(t){var e=qt(t,"x","rsqrt");return zt.engine.runKernel(function(t,n){var r=t.rsqrt(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.div(n.pow(1.5).mul(2)).neg()}}})}}),Io=xe({sigmoid_:function(t){var e=qt(t,"x","sigmoid");return zt.engine.runKernel(function(t,n){var r=t.sigmoid(e);return n([r]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.mul(n.mul(Me(1).sub(n)))}}})}}),Mo=xe({sign_:function(t){var e=qt(t,"x","sign");return zt.engine.runKernel(function(t){return t.sign(e)},{$x:e},function(t){return{$x:function(){return je(t)}}})}}),To=xe({isNaN_:function(t){var e=qt(t,"x","isNaN");return zt.engine.runKernel(function(t){return t.isNaN(e)},{$x:e},function(t){return{$x:function(){return je(t)}}})}}),Do=xe({isInf_:function(t){var e=qt(t,"x","isInf");return zt.engine.runKernel(function(t){return t.isInf(e)},{$x:e},function(t){return{$x:function(){return je(t)}}})}}),Ro=xe({isFinite_:function(t){var e=qt(t,"x","isFinite");return zt.engine.runKernel(function(t){return t.isFinite(e)},{$x:e},function(t){return{$x:function(){return je(t)}}})}}),Po=xe({sin_:function(t){var e=qt(t,"x","sin");return zt.engine.runKernel(function(t,n){var r=t.sin(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return n.toFloat().cos().mul(t)}}})}}),Oo=xe({sinh_:function(t){var e=qt(t,"x","sinh");return zt.engine.runKernel(function(t,n){var r=t.sinh(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return n.toFloat().cosh().mulStrict(t)}}})}}),Lo=xe({softplus_:function(t){var e=qt(t,"x","softplus");return zt.engine.runKernel(function(t,n){var r=t.softplus(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.mul(n.sigmoid())}}})}}),Ao=xe({sqrt_:function(t){var e=qt(t,"x","sqrt");return zt.engine.runKernel(function(t,n){var r=t.sqrt(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.div(n.toFloat().sqrt().mul(2))}}})}}),No=xe({square_:function(t){var e=qt(t,"x","square");return zt.engine.runKernel(function(t,n){return n([e]),t.square(e)},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.mul(n.toFloat().mul(2))}}})}}),Bo=xe({step_:function(t,e){void 0===e&&(e=0);var n=qt(t,"x","step");return zt.engine.runKernel(function(t){return t.step(n,e)},{$x:n},function(t){return{$x:function(){return je(t)}}})}}),jo=xe({tan_:function(t){var e=qt(t,"x","tan");return zt.engine.runKernel(function(t,n){var r=t.tan(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.div(n.cos().square())}}})}}),Fo=xe({tanh_:function(t){var e=qt(t,"x","tanh");return zt.engine.runKernel(function(t,n){var r=t.tanh(e);return n([r]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return Me(1).sub(n.square()).mulStrict(t)}}})}});function Yo(t,e,n,r,i,a){var o,s,c=qt(t,"x","batchNorm"),u=qt(e,"mean","batchNorm"),l=qt(n,"variance","batchNorm");return null!=i&&(o=qt(i,"scale","batchNorm")),null!=r&&(s=qt(r,"offset","batchNorm")),b(2===c.rank,function(){return"Error in batchNorm3D: x must be rank 3 but got rank "+c.rank+"."}),b(2===u.rank||1===u.rank,function(){return"Error in batchNorm2D: mean must be rank 2 or rank 1 but got rank "+u.rank+"."}),b(2===l.rank||1===l.rank,function(){return"Error in batchNorm2D: variance must be rank 2 or rank 1 but got rank "+l.rank+"."}),null!=o&&b(2===o.rank||1===o.rank,function(){return"Error in batchNorm2D: scale must be rank 2 or rank 1 but got rank "+o.rank+"."}),null!=s&&b(2===s.rank||1===s.rank,function(){return"Error in batchNorm2D: offset must be rank 2 or rank 1 but got rank "+s.rank+"."}),Vo(c,u,l,s,o,a)}function $o(t,e,n,r,i,a){var o,s,c=qt(t,"x","batchNorm"),u=qt(e,"mean","batchNorm"),l=qt(n,"variance","batchNorm");return null!=i&&(o=qt(i,"scale","batchNorm")),null!=r&&(s=qt(r,"offset","batchNorm")),b(3===c.rank,function(){return"Error in batchNorm3D: x must be rank 3 but got rank "+c.rank+"."}),b(3===u.rank||1===u.rank,function(){return"Error in batchNorm3D: mean must be rank 3 or rank 1 but got rank "+u.rank+"."}),b(3===l.rank||1===l.rank,function(){return"Error in batchNorm3D: variance must be rank 3 or rank 1 but got rank "+l.rank+"."}),null!=o&&b(3===o.rank||1===o.rank,function(){return"Error in batchNorm3D: scale must be rank 3 or rank 1 but got rank "+o.rank+"."}),null!=s&&b(3===s.rank||1===s.rank,function(){return"Error in batchNorm3D: offset must be rank 3 or rank 1 but got rank "+s.rank+"."}),Vo(c,u,l,s,o,a)}function zo(t,e,n,r,i,a){var o,s,c=qt(t,"x","batchNorm"),u=qt(e,"mean","batchNorm"),l=qt(n,"variance","batchNorm");return null!=i&&(o=qt(i,"scale","batchNorm")),null!=r&&(s=qt(r,"offset","batchNorm")),b(4===c.rank,function(){return"Error in batchNorm4D: x must be rank 4 but got rank "+c.rank+"."}),b(4===u.rank||1===u.rank,function(){return"Error in batchNorm4D: mean must be rank 4 or rank 1 but got rank "+u.rank+"."}),b(4===l.rank||1===l.rank,function(){return"Error in batchNorm4D: variance must be rank 4 or rank 1 but got rank "+l.rank+"."}),null!=o&&b(4===o.rank||1===o.rank,function(){return"Error in batchNorm4D: scale must be rank 4 or rank 1 but got rank "+o.rank+"."}),null!=s&&b(4===s.rank||1===s.rank,function(){return"Error in batchNorm4D: offset must be rank 4 or rank 1 but got rank "+s.rank+"."}),Vo(c,u,l,s,o,a)}function Vo(t,e,n,r,i,a){null==a&&(a=.001);var o,s,c,u=qt(t,"x","batchNorm"),l=qt(e,"mean","batchNorm"),d=qt(n,"variance","batchNorm");return null!=i&&(o=qt(i,"scale","batchNorm")),null!=r&&(s=qt(r,"offset","batchNorm")),b(l.rank===d.rank,function(){return"Batch normalization gradient requires mean and variance to have equal ranks."}),b(null==s||l.rank===s.rank,function(){return"Batch normalization gradient requires mean and offset to have equal ranks."}),b(null==o||l.rank===o.rank,function(){return"Batch normalization gradient requires mean and scale to have equal ranks."}),c=0===u.rank||1===u.rank?u.as4D(1,1,1,u.size):2===u.rank?u.as4D(1,1,u.shape[0],u.shape[1]):3===u.rank?u.as4D(1,u.shape[0],u.shape[1],u.shape[2]):u,zt.engine.runKernel(function(t,e){var n=t.batchNormalization(c,Ho(l),Ho(d),a,Ho(o),Ho(s));return e([u,l,d,o]),n},{$x:u,$mean:l,$variance:d,$scale:o,$offset:s},function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],s=null==o?Me(1):o,u=tn(r.shape,c.shape),l=[];if(1===r.rank){for(var d=0;d<c.shape.length-1;++d)l.push(c.shape[d]);l.push(1)}var f=n.sub(r),h=t.mul(s),p=So(i.add(Me(a))),m=p.mul(p).mul(p).mul(Me(-.5));return{$x:function(){return 1===r.rank?t.mul(Xa(p.as4D(1,1,1,r.shape[0]),l)).mul(s).reshape(n.shape):t.mul(p).mul(s).reshape(n.shape)},$mean:function(){var t=p.mul(Me(-1)).mul(h);return 1===r.rank&&(t=t.sum(u)),t.reshape(r.shape)},$variance:function(){var t=m.mul(f).mul(h);return 1===r.rank&&(t=t.sum(u)),t.reshape(r.shape)},$scale:function(){var e=f.mul(p),n=t.mul(e);return 1===r.rank&&(n=n.sum(u)),n.reshape(r.shape)},$offset:function(){var e=t;return 1===r.rank&&(e=e.sum(u)),e.reshape(r.shape)}}}).reshape(u.shape)}function Ho(t){return null==t?null:0===t.rank?t.as1D():1===t.rank?t:2===t.rank?t.as4D(1,1,t.shape[0],t.shape[1]):3===t.rank?t.as4D(1,t.shape[0],t.shape[1],t.shape[2]):t}function qo(){$t("tf.batchNormalization() is going away. Use tf.batchNorm() instead, and note the positional argument change of scale, offset, and varianceEpsilon")}var Wo=xe({batchNormalization2d_:function(t,e,n,r,i,a){return void 0===r&&(r=.001),qo(),Yo(t,e,n,a,i,r)}}),Uo=xe({batchNormalization3d_:function(t,e,n,r,i,a){return void 0===r&&(r=.001),qo(),$o(t,e,n,a,i,r)}}),Go=xe({batchNormalization4d_:function(t,e,n,r,i,a){return void 0===r&&(r=.001),qo(),zo(t,e,n,a,i,r)}}),Ko=xe({batchNormalization_:function(t,e,n,r,i,a){return void 0===r&&(r=.001),qo(),Vo(t,e,n,a,i,r)}}),Xo=xe({batchNorm_:Vo}),Jo=xe({batchNorm2d_:Yo}),Zo=xe({batchNorm3d_:$o}),Qo=xe({batchNorm4d_:zo});function ts(t,e,n,r,i,a,o){void 0===o&&(o="channelsLast");var s,c=rs(e),u=c[0],l=c[1];if("channelsLast"===o)s=[u,l,t[3],t[3]];else{if("channelsFirst"!==o)throw new Error("Unknown dataFormat "+o);s=[u,l,t[1],t[1]]}return es(t,s,n,r,i,a,!1,o)}function es(t,e,n,r,i,a,o,s){void 0===o&&(o=!1),void 0===s&&(s="channelsLast");var c=[-1,-1,-1,-1],u=c[0],l=c[1],d=c[2],f=c[3];if("channelsLast"===s)u=t[0],l=t[1],d=t[2],f=t[3];else{if("channelsFirst"!==s)throw new Error("Unknown dataFormat "+s);u=t[0],f=t[1],l=t[2],d=t[3]}var h,p=e[0],m=e[1],v=e[3],_=rs(n),g=_[0],y=_[1],x=rs(r),w=x[0],k=x[1],C=as(p,w),S=as(m,k),I=function(t,e,n,r,i,a,o,s){var c,u,l;if("number"==typeof t){c={top:t,bottom:t,left:t,right:t,type:0===t?"VALID":"NUMBER"};var d=function(t,e,n,r,i,a){null==i&&(i=function(t,e,n,r){void 0===r&&(r=1);var i=as(e,r);return Math.floor((t[0]*(n-1)-n+i)/2)}(t,e,r));var o=t[0],s=t[1],c=os((o-e+2*i)/r+1,a);b(E(c),function(){return"The output # of rows ("+c+") must be an integer. Change the stride and/or zero pad parameters"});var u=os((s-e+2*i)/r+1,a);return b(E(u),function(){return"The output # of columns ("+u+") must be an integer. Change the stride and/or zero pad parameters"}),[c,u,n]}([e,n,1],a,1,r,t,s);u=d[0],l=d[1]}else if("same"===t){u=Math.ceil(e/r),l=Math.ceil(n/i);var f=Math.max(0,(u-1)*r+a-e),h=Math.max(0,(l-1)*i+o-n),p=Math.floor(f/2),m=f-p,v=Math.floor(h/2);c={top:p,bottom:m,left:v,right:h-v,type:"SAME"}}else{if("valid"!==t)throw Error("Unknown padding parameter: "+t);c={top:0,bottom:0,left:0,right:0,type:"VALID"},u=Math.ceil((e-a+1)/r),l=Math.ceil((n-o+1)/i)}return{padInfo:c,outHeight:u,outWidth:l}}(i,l,d,g,y,C,S,a),M=I.padInfo,T=I.outHeight,D=I.outWidth,R=o?v*f:v;return"channelsFirst"===s?h=[u,R,T,D]:"channelsLast"===s&&(h=[u,T,D,R]),{batchSize:u,dataFormat:s,inHeight:l,inWidth:d,inChannels:f,outHeight:T,outWidth:D,outChannels:R,padInfo:M,strideHeight:g,strideWidth:y,filterHeight:p,filterWidth:m,effectiveFilterHeight:C,effectiveFilterWidth:S,dilationHeight:w,dilationWidth:k,inShape:t,outShape:h,filterShape:e}}function ns(t,e,n,r,i,a,o){void 0===a&&(a=!1),void 0===o&&(o="channelsLast");var s=[-1,-1,-1,-1,-1],c=s[0],u=s[1],l=s[2],d=s[3],f=s[4];if("channelsLast"===o)c=t[0],u=t[1],l=t[2],d=t[3],f=t[4];else{if("channelsFirst"!==o)throw new Error("Unknown dataFormat "+o);c=t[0],f=t[1],u=t[2],l=t[3],d=t[4]}var h,p=e[0],m=e[1],v=e[2],_=e[4],g=is(n),b=g[0],y=g[1],x=g[2],w=is(r),k=w[0],C=w[1],E=w[2],S=function(t,e,n,r,i,a,o,s,c,u){var l,d,f,h;if("same"===t){var p=((d=Math.ceil(e/i))-1)*i+s-e,m=((f=Math.ceil(n/a))-1)*a+c-n,v=((h=Math.ceil(r/o))-1)*o+u-r,_=Math.floor(p/2),g=p-_,b=Math.floor(m/2),y=m-b,x=Math.floor(v/2);l={top:b,bottom:y,left:x,right:v-x,front:_,back:g,type:"SAME"}}else{if("valid"!==t)throw Error("Unknown padding parameter: "+t);l={top:0,bottom:0,left:0,right:0,front:0,back:0,type:"VALID"},d=Math.ceil((e-s+1)/i),f=Math.ceil((n-c+1)/a),h=Math.ceil((r-u+1)/o)}return{padInfo:l,outDepth:d,outHeight:f,outWidth:h}}(i,u,l,d,b,y,x,as(p,k),as(m,C),as(v,E)),I=S.padInfo,M=S.outDepth,T=S.outHeight,D=S.outWidth,R=a?_*f:_;return"channelsFirst"===o?h=[c,R,M,T,D]:"channelsLast"===o&&(h=[c,M,T,D,R]),{batchSize:c,dataFormat:o,inDepth:u,inHeight:l,inWidth:d,inChannels:f,outDepth:M,outHeight:T,outWidth:D,outChannels:R,padInfo:I,strideDepth:b,strideHeight:y,strideWidth:x,filterDepth:p,filterHeight:m,filterWidth:v,dilationDepth:k,dilationHeight:C,dilationWidth:E,inShape:t,outShape:h,filterShape:e}}function rs(t){return"number"==typeof t?[t,t]:t}function is(t){return"number"==typeof t?[t,t,t]:t}function as(t,e){return e<=1?t:t+(t-1)*(e-1)}function os(t,e){if(!e)return t;switch(e){case"round":return Math.round(t);case"ceil":return Math.ceil(t);case"floor":return Math.floor(t);default:throw new Error("Unknown roundingMode "+e)}}function ss(t){var e=rs(t),n=e[0],r=e[1];return 1===n&&1===r}function cs(t,e){return ss(t)||ss(e)}function us(t,e,n,r,i,a){b(t.length===e.rank,function(){return"Length of inShape ("+t.length+") and rank of dy ("+e.rank+") must match"});var o=t,s=e,c=!1;3===e.rank&&(c=!0,s=e.as4D(1,e.shape[0],e.shape[1],e.shape[2]),o=[1,t[0],t[1],t[2]]);var u=o[3],l=s.shape[3];b(4===o.length,function(){return"Error in conv2dDerInput: inShape must be length 4, but got length "+o.length+"."}),b(4===s.rank,function(){return"Error in conv2dDerInput: dy must be rank 4, but got rank "+s.rank}),b(4===n.rank,function(){return"Error in conv2dDerInput: filter must be rank 4, but got rank "+n.rank}),b(u===n.shape[2],function(){return"Error in conv2dDerInput: depth of input ("+u+") must match input depth for filter "+n.shape[2]+"."}),b(l===n.shape[3],function(){return"Error in conv2dDerInput: depth of output ("+l+") must match output depth for filter "+n.shape[3]+"."}),null!=a&&b(E(i),function(){return"Error in conv2dDerInput: pad must be an integer when using, dimRoundingMode "+a+" but got pad "+i+"."});var d=es(o,n.shape,r,1,i,a),f=zt.engine.runKernel(function(t,e){var r=t.conv2dDerInput(s,n,d);return e([n,s]),r},{dy4D:s,filter:n},function(t,e){var n=e[0],o=e[1];return{dy4D:function(){return hs(t,n,r,i,"NHWC",1,a)},filter:function(){return ms(t,o,n.shape,r,i,a)}}});return c?f.as3D(f.shape[1],f.shape[2],f.shape[3]):f}function ls(t,e,n,r,i,a){var o=t;3===t.rank&&(o=t.as4D(1,t.shape[0],t.shape[1],t.shape[2]));var s=e;3===s.rank&&(s=e.as4D(1,e.shape[0],e.shape[1],e.shape[2])),b(4===o.rank,function(){return"Error in conv2dDerFilter: input must be rank 4, but got shape "+o.shape+"."}),b(4===s.rank,function(){return"Error in conv2dDerFilter: dy must be rank 4, but got shape "+s.shape+"."}),b(4===n.length,function(){return"Error in conv2dDerFilter: filterShape must be length 4, but got "+n+"."}),b(o.shape[3]===n[2],function(){return"Error in conv2dDerFilter: depth of input "+o.shape[3]+") must match input depth in filter ("+n[2]+"."}),b(s.shape[3]===n[3],function(){return"Error in conv2dDerFilter: depth of dy ("+s.shape[3]+") must match output depth for filter ("+n[3]+")."}),null!=a&&b(E(i),function(){return"Error in conv2dDerFilter: pad must be an integer when using, dimRoundingMode "+a+" but got pad "+i+"."});var c=es(o.shape,n,r,1,i,a);return zt.engine.runKernel(function(t){return t.conv2dDerFilter(o,s,c)},{x4D:o,dy4D:s})}function ds(t){var e=function(t){return"number"==typeof t?[t,t,t]:2===t.length?[t[0],t[1],1]:t}(t),n=e[0],r=e[1],i=e[2];return 1===n&&1===r&&1===i}var fs=xe({conv1d_:function(t,e,n,r,i,a,o){void 0===i&&(i="NWC"),void 0===a&&(a=1);var s=qt(t,"x","conv1d"),c=qt(e,"filter","conv1d"),u=s,l=!1;2===s.rank&&(l=!0,u=s.as3D(1,s.shape[0],s.shape[1])),b(3===u.rank,function(){return"Error in conv1d: input must be rank 3, but got rank "+u.rank+"."}),b(3===c.rank,function(){return"Error in conv1d: filter must be rank 3, but got rank "+c.rank+"."}),null!=o&&b(E(r),function(){return"Error in conv1d: pad must be an integer when using, dimRoundingMode "+o+" but got pad "+r+"."}),b(u.shape[2]===c.shape[1],function(){return"Error in conv1d: depth of input ("+u.shape[2]+") must match input depth for filter "+c.shape[1]+"."}),b(cs(n,a),function(){return"Error in conv1D: Either stride or dilation must be 1. Got stride "+n+" and dilation '"+a+"'"}),b("NWC"===i,function(){return"Error in conv1d: got dataFormat of "+i+" but only NWC is currently supported."});var d=c.as4D(1,c.shape[0],c.shape[1],c.shape[2]),f=u.as4D(u.shape[0],1,u.shape[1],u.shape[2]),h=hs(f,d,[1,n],r,"NHWC",[1,a],o);return l?h.as2D(h.shape[2],h.shape[3]):h.as3D(h.shape[0],h.shape[2],h.shape[3])}}),hs=xe({conv2d_:function(t,e,n,r,i,a,o){void 0===i&&(i="NHWC"),void 0===a&&(a=[1,1]);var s=qt(t,"x","conv2d"),c=qt(e,"filter","conv2d"),u=s,l=!1;3===s.rank&&(l=!0,u=s.as4D(1,s.shape[0],s.shape[1],s.shape[2])),b(4===u.rank,function(){return"Error in conv2d: input must be rank 4, but got rank "+u.rank+"."}),b(4===c.rank,function(){return"Error in conv2d: filter must be rank 4, but got rank "+c.rank+"."}),null!=o&&b(E(r),function(){return"Error in conv2d: pad must be an integer when using, dimRoundingMode "+o+" but got pad "+r+"."}),b(u.shape[3]===c.shape[2],function(){return"Error in conv2d: depth of input ("+u.shape[3]+") must match input depth for filter "+c.shape[2]+"."}),b(cs(n,a),function(){return"Error in conv2D: Either strides or dilations must be 1. Got strides "+n+" and dilations '"+a+"'"}),b("NHWC"===i,function(){return"Error in conv2d: got dataFormat of "+i+" but only NHWC is currently supported."});var d=es(u.shape,c.shape,n,a,r,o),f=zt.engine.runKernel(function(t,e){var n=t.conv2d(u,c,d);return e([c,u]),n},{x:u,$filter:c},function(t,e){var i=e,o=i[0],s=i[1];return b(ss(a),function(){return"Error in gradient of conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '"+a+"'"}),{x:function(){return us(s.shape,t,o,n,r)},$filter:function(){return ls(s,t,o.shape,n,r)}}});return l?f.as3D(f.shape[1],f.shape[2],f.shape[3]):f}}),ps=xe({conv3d_:function(t,e,n,r,i,a){void 0===i&&(i="NHWC"),void 0===a&&(a=[1,1,1]);var o=qt(t,"x","conv3d"),s=qt(e,"filter","conv3d"),c=o,u=!1;4===o.rank&&(u=!0,c=o.as5D(1,o.shape[0],o.shape[1],o.shape[2],o.shape[3])),b(5===c.rank,function(){return"Error in conv3d: input must be rank 5, but got rank "+c.rank+"."}),b(5===s.rank,function(){return"Error in conv3d: filter must be rank 5, but got rank "+s.rank+"."}),b(c.shape[4]===s.shape[3],function(){return"Error in conv3d: depth of input ("+c.shape[4]+") must match input depth for filter "+s.shape[3]+"."}),b(function(t,e){return ds(t)||ds(e)}(n,a),function(){return"Error in conv3D: Either strides or dilations must be 1. Got strides "+n+" and dilations '"+a+"'"}),b("NHWC"===i,function(){return"Error in conv3d: got dataFormat of "+i+" but only NHWC is currently supported."});var l=ns(c.shape,s.shape,n,a,r),d=zt.engine.runKernel(function(t,e){var n=t.conv3d(c,s,l);return e([c,s]),n},{x:c,$filter:s},function(t,e){b(ds(a),function(){return"Error in gradient of conv3D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '"+a+"'"});var i=e[0],o=e[1];return{x:function(){return function(t,e,n,r,i){b(t.length===e.rank,function(){return"Length of inShape ("+t.length+") and rank of dy ("+e.rank+") must match"});var a=t,o=e,s=!1;4===e.rank&&(s=!0,o=e.as5D(1,e.shape[0],e.shape[1],e.shape[2],e.shape[3]),a=[1,t[0],t[1],t[2],t[3]]);var c=a[4],u=o.shape[4];b(5===a.length,function(){return"Error in conv3dDerInput: inShape must be length 5, but got length "+a.length+"."}),b(5===o.rank,function(){return"Error in conv3dDerInput: dy must be rank 5, but got rank "+o.rank}),b(5===n.rank,function(){return"Error in conv3dDerInput: filter must be rank 5, but got rank "+n.rank}),b(c===n.shape[3],function(){return"Error in conv3dDerInput: depth of input ("+c+") must match input depth for filter "+n.shape[3]+"."}),b(u===n.shape[4],function(){return"Error in conv3dDerInput: depth of output ("+u+") must match output depth for filter "+n.shape[4]+"."});var l=ns(a,n.shape,r,1,i),d=zt.engine.runKernel(function(t){return t.conv3dDerInput(o,n,l)},{dy5D:o});return s?d.as4D(d.shape[1],d.shape[2],d.shape[3],d.shape[4]):d}(i.shape,t,o,n,r)},$filter:function(){return function(t,e,n,r,i){var a=t;4===t.rank&&(a=t.as5D(1,t.shape[0],t.shape[1],t.shape[2],t.shape[3]));var o=e;4===o.rank&&(o=e.as5D(1,e.shape[0],e.shape[1],e.shape[2],e.shape[3])),b(5===a.rank,function(){return"Error in conv3dDerFilter: input must be rank 5, but got shape "+a.shape+"."}),b(5===o.rank,function(){return"Error in conv3dDerFilter: dy must be rank 5, but got shape "+o.shape+"."}),b(5===n.length,function(){return"Error in conv3dDerFilter: filterShape must be length 5, but got "+n+"."}),b(a.shape[4]===n[3],function(){return"Error in conv3dDerFilter: depth of input "+a.shape[4]+") must match input depth in filter ("+n[3]+"."}),b(o.shape[4]===n[4],function(){return"Error in conv3dDerFilter: depth of dy ("+o.shape[4]+") must match output depth for filter ("+n[4]+")."});var s=ns(a.shape,n,r,1,i);return zt.engine.runKernel(function(t){return t.conv3dDerFilter(a,o,s)},{x5D:a,dy5D:o})}(i,t,o.shape,n,r)}}});return u?d.as4D(d.shape[1],d.shape[2],d.shape[3],d.shape[4]):d}}),ms=xe({conv2dDerFilter_:ls}),vs=xe({depthwiseConv2d_:function(t,e,n,r,i,a,o){void 0===i&&(i="NHWC"),void 0===a&&(a=[1,1]);var s=qt(t,"x","depthwiseConv2d"),c=qt(e,"filter","depthwiseConv2d"),u=s,l=!1;3===s.rank&&(l=!0,u=s.as4D(1,s.shape[0],s.shape[1],s.shape[2])),b(4===u.rank,function(){return"Error in depthwiseConv2d: input must be rank 4, but got rank "+u.rank+"."}),b(4===c.rank,function(){return"Error in depthwiseConv2d: filter must be rank 4, but got rank "+c.rank+"."}),b(u.shape[3]===c.shape[2],function(){return"Error in depthwiseConv2d: number of input channels ("+u.shape[3]+") must match the inChannels dimension in filter "+c.shape[2]+"."}),null==a&&(a=[1,1]),b(cs(n,a),function(){return"Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides "+n+" and dilations '"+a+"'"}),null!=o&&b(E(r),function(){return"Error in depthwiseConv2d: pad must be an integer when using, dimRoundingMode "+o+" but got pad "+r+"."});var d=es(u.shape,c.shape,n,a,r,o,!0),f=zt.engine.runKernel(function(t,e){var n=t.depthwiseConv2D(u,c,d);return e([u,c]),n},{x:u,$filter:c},function(t,e){b(ss(a),function(){return"Error in gradient of depthwiseConv2d: dilation rates greater than 1 are not yet supported. Got dilations '"+a+"'"});var n=e[0],r=e[1];return{x:function(){return function(t,e,n,r){var i=e,a=!1;3===e.rank&&(a=!0,i=e.as4D(1,e.shape[0],e.shape[1],e.shape[2]));var o=zt.engine.runKernel(function(t){return t.depthwiseConv2DDerInput(i,n,r)},{dy4D:i});return a?o.as3D(o.shape[1],o.shape[2],o.shape[3]):o}(n.shape,t,r,d)},$filter:function(){return function(t,e,n,r){var i=t;3===t.rank&&(i=t.as4D(1,t.shape[0],t.shape[1],t.shape[2]));var a=e;return 3===a.rank&&(a=e.as4D(1,e.shape[0],e.shape[1],e.shape[2])),zt.engine.runKernel(function(t){return t.depthwiseConv2DDerFilter(i,a,r)},{x4D:i,dy4D:a})}(n,t,r.shape,d)}}});return l?f.as3D(f.shape[1],f.shape[2],f.shape[3]):f}}),_s=xe({separableConv2d_:function(t,e,n,r,i,a,o){void 0===a&&(a=[1,1]),void 0===o&&(o="NHWC");var s=qt(t,"x","separableConv2d"),c=qt(e,"depthwiseFilter","separableConv2d"),u=qt(n,"pointwiseFilter","separableConv2d"),l=s,d=!1;if(3===s.rank&&(d=!0,l=s.as4D(1,s.shape[0],s.shape[1],s.shape[2])),"NCHW"===o)throw new Error("separableConv2d currently does not support dataFormat NCHW; only NHWC is supported");b(4===l.rank,function(){return"Error in separableConv2d: input must be rank 4, but got rank "+l.rank+"."}),b(4===c.rank,function(){return"Error in separableConv2d: depthwise filter must be rank 4, but got rank "+c.rank+"."}),b(4===u.rank,function(){return"Error in separableConv2d: pointwise filter must be rank 4, but got rank "+c.rank+"."}),b(1===u.shape[0],function(){return"Error in separableConv2d: the first dimension of pointwise filter must be 1, but got "+u.shape[0]+"."}),b(1===u.shape[1],function(){return"Error in separableConv2d: the second dimension of pointwise filter must be 1, but got "+u.shape[1]+"."});var f=c.shape[2],h=c.shape[3];b(u.shape[2]===f*h,function(){return"Error in separableConv2d: the third dimension of pointwise filter must be "+f*h+", but got "+u.shape[2]+"."});var p=vs(l,c,r,i,o,a),m=hs(p,u,1,"valid",o);return d?m.as3D(m.shape[1],m.shape[2],m.shape[3]):m}}),gs=xe({conv2dTranspose_:function(t,e,n,r,i,a){return us(n,qt(t,"x","conv2dTranspose"),qt(e,"filter","conv2dTranspose"),r,i,a)}});var bs=xe({matMul_:function(t,e,n,r){var i;void 0===n&&(n=!1),void 0===r&&(r=!1);var a=qt(t,"a","matMul"),o=qt(e,"b","matMul");i=Ct(a,o),a=i[0],o=i[1];var s=n?a.shape[a.rank-2]:a.shape[a.rank-1],c=r?o.shape[o.rank-1]:o.shape[o.rank-2],u=n?a.shape[a.rank-1]:a.shape[a.rank-2],l=r?o.shape[o.rank-2]:o.shape[o.rank-1],d=a.shape.slice(0,-2),f=o.shape.slice(0,-2),h=k(d),p=k(f);b(a.rank>=2&&o.rank>=2&&a.rank===o.rank,function(){return"Error in matMul: inputs must have the same rank of at least 2, got ranks "+a.rank+" and "+o.rank+"."}),b(C(d,f),function(){return"Error in matMul: outer dimensions ("+d+") and ("+f+") of Tensors with shapes "+a.shape+" and "+o.shape+" must match."}),b(s===c,function(){return"Error in matMul: inner shapes ("+s+") and ("+c+") of Tensors with shapes "+a.shape+" and "+o.shape+" and transposeA="+n+" and transposeB="+r+" must match."});var m=a.shape.slice(0,-2).concat([u,l]),v=n?a.as3D(h,s,u):a.as3D(h,u,s),_=r?o.as3D(p,l,c):o.as3D(p,c,l);return zt.engine.runKernel(function(t,e){var i=t.batchMatMul(v,_,n,r);return e([v,_]),i},{$a:v,$b:_},function(t,e){var i=e,a=i[0],o=i[1];return n||r?!n&&r?{$a:function(){return t.matMul(o,!1,!1)},$b:function(){return t.matMul(a,!0,!1)}}:n&&!r?{$a:function(){return o.matMul(t,!1,!0)},$b:function(){return a.matMul(t,!1,!1)}}:{$a:function(){return o.matMul(t,!0,!0)},$b:function(){return t.matMul(a,!0,!0)}}:{$a:function(){return t.matMul(o,!1,!0)},$b:function(){return a.matMul(t,!0,!1)}}}).reshape(m)}}),ys=xe({dot_:function(t,e){var n=qt(t,"t1","dot"),r=qt(e,"t2","dot");b(!(1!==n.rank&&2!==n.rank||1!==r.rank&&2!==r.rank),function(){return"Error in dot: inputs must all be rank 1 or 2, but got ranks "+n.rank+" and "+r.rank+"."});var i=1===n.rank?n.size:n.shape[1],a=1===r.rank?r.size:r.shape[0];return b(i===a,function(){return"Error in dot: inner dimensions of inputs must match, but got "+i+" and "+a+"."}),1===n.rank&&1===r.rank?n.as2D(1,-1).matMul(r.as2D(-1,1)).asScalar():1===n.rank&&2===r.rank?n.as2D(1,-1).matMul(r.as2D(r.shape[0],r.shape[1])).as1D():2===n.rank&&1===r.rank?n.matMul(r.as2D(-1,1)).as1D():n.matMul(r.as2D(r.shape[0],r.shape[1]))}}),xs=xe({outerProduct_:function(t,e){var n=qt(t,"v1","outerProduct"),r=qt(e,"v2","outerProduct");return b(1===n.rank&&1===r.rank,function(){return"Error in outerProduct: inputs must be rank 1, but got ranks "+n.rank+" and "+r.rank+"."}),n.as2D(-1,1).matMul(r.as2D(1,-1))}});var ws=xe({reverse_:function(t,e){var n=qt(t,"x","reverse");if(0===n.rank)return n.clone();var r=R(e,n.shape);return zt.engine.runKernel(function(t){return t.reverse(n,r)},{$x:n},function(t){return{$x:function(){return t.reverse(r)}}}).reshapeAs(n)}}),ks=xe({reverse1d_:function(t){var e=qt(t,"x","reverse");return b(1===e.rank,function(){return"Error in reverse1D: x must be rank 1 but got rank "+e.rank+"."}),ws(e,0)}}),Cs=xe({reverse2d_:function(t,e){var n=qt(t,"x","reverse");return b(2===n.rank,function(){return"Error in reverse2D: x must be rank 2 but got rank "+n.rank+"."}),ws(n,e)}}),Es=xe({reverse3d_:function(t,e){var n=qt(t,"x","reverse");return b(3===n.rank,function(){return"Error in reverse3D: x must be rank 3 but got rank "+n.rank+"."}),ws(n,e)}}),Ss=xe({reverse4d_:function(t,e){var n=qt(t,"x","reverse");return b(4===n.rank,function(){return"Error in reverse4D: x must be rank 4 but got rank "+n.rank+"."}),ws(n,e)}});function Is(t,e,n,r,i,a){var o=qt(t,"x","maxPool"),s=o,c=!1;3===o.rank&&(c=!0,s=o.as4D(1,o.shape[0],o.shape[1],o.shape[2])),null==r&&(r=[1,1]),b(4===s.rank,function(){return"Error in maxPool: input must be rank 4 but got rank "+s.rank+"."}),b(cs(n,r),function(){return"Error in maxPool: Either strides or dilations must be 1. Got strides "+n+" and dilations '"+r+"'"}),null!=a&&b(E(i),function(){return"Error in maxPool: pad must be an integer when using, dimRoundingMode "+a+" but got pad "+i+"."});var u=ts(s.shape,e,n,r,i,a),l=zt.engine.runKernel(function(t,e){var n=t.maxPool(s,u);return e([s,n]),n},{x:s},function(t,a){var o=a[0],s=a[1];return{x:function(){return function(t,e,n,r,i,a,o,s){var c=qt(t,"dy","maxPoolBackprop"),u=qt(e,"input","maxPoolBackprop"),l=qt(n,"output","maxPoolBackprop");b(u.rank===c.rank,function(){return"Rank of input ("+u.rank+") does not match rank of dy ("+c.rank+")"}),null==a&&(a=[1,1]),b(cs(i,a),function(){return"Error in maxPoolBackProp: Either strides or dilations must be 1. Got strides "+i+" and dilations '"+a+"'"}),b(4===c.rank,function(){return"Error in maxPoolBackprop: dy must be rank 4 but got rank "+c.rank+"."}),b(4===u.rank,function(){return"Error in maxPoolBackprop: input must be rank 4 but got rank "+u.rank+"."}),null!=s&&b(E(o),function(){return"Error in maxPoolBackprop: pad must be an integer when using, dimRoundingMode "+s+" but got pad "+o+"."});var d=ts(u.shape,r,i,a,o,s);return zt.engine.runKernel(function(t){return t.maxPoolBackprop(c,u,l,d)},{$dy:c,$input:u})}(t,o,s,e,n,r,i)}}});return c?l.as3D(l.shape[1],l.shape[2],l.shape[3]):l}function Ms(t,e,n,r,i,a){var o=qt(t,"x","avgPool","float32");null==r&&(r=[1,1]),b(cs(n,r),function(){return"Error in avgPool: Either strides or dilations must be 1. Got strides "+n+" and dilations '"+r+"'"});var s=o,c=!1;3===o.rank&&(c=!0,s=o.as4D(1,o.shape[0],o.shape[1],o.shape[2])),b(4===s.rank,function(){return"Error in avgPool: x must be rank 4 but got rank "+s.rank+"."}),null!=a&&b(E(i),function(){return"Error in avgPool: pad must be an integer when using, dimRoundingMode "+a+" but got pad "+i+"."});var u=ts(s.shape,e,n,r,i,a),l=zt.engine.runKernel(function(t){return t.avgPool(s,u)},{x:s},function(t){return{x:function(){return function(t,e,n,r,i,a){var o=qt(t,"dy","avgPoolBackprop"),s=qt(e,"input","avgPoolBackprop");b(s.rank===o.rank,function(){return"Rank of input ("+s.rank+") does not match rank of dy ("+o.rank+")"}),null==i&&(i=[1,1]),b(cs(r,i),function(){return"Error in avgPoolBackprop: Either strides or dilations must be 1. Got strides "+r+" and dilations '"+i+"'"});var c=s,u=o,l=!1;3===s.rank&&(l=!0,c=s.as4D(1,s.shape[0],s.shape[1],s.shape[2]),u=o.as4D(1,o.shape[0],o.shape[1],o.shape[2])),b(4===u.rank,function(){return"Error in avgPoolBackprop: dy must be rank 4 but got rank "+u.rank+"."}),b(4===c.rank,function(){return"Error in avgPoolBackprop: input must be rank 4 but got rank "+c.rank+"."});var d=ts(c.shape,n,r,i,a),f=zt.engine.runKernel(function(t){return t.avgPoolBackprop(u,c,d)},{dy4D:u,input4D:c});return l?f.as3D(f.shape[1],f.shape[2],f.shape[3]):f}(t,s,e,n,r,i)}}});return l=l.cast(o.dtype),c?l.as3D(l.shape[1],l.shape[2],l.shape[3]):l}var Ts=xe({maxPool_:function(t,e,n,r,i){return Is(t,e,n,1,r,i)}}),Ds=xe({avgPool_:function(t,e,n,r,i){return Ms(t,e,n,1,r,i)}}),Rs=xe({pool_:function(t,e,n,r,i,a){null==i&&(i=[1,1]),null==a&&(a=1),0===r&&(r="valid");var o=qt(t,"x","maxPool"),s=o,c=!1;3===o.rank&&(c=!0,s=o.as4D(1,o.shape[0],o.shape[1],o.shape[2])),b(cs(a,i),function(){return"Error in pool: Either strides or dilations must be 1. Got strides "+a+" and dilations '"+i+"'"});var u,l=ts(s.shape,e,a,i,r),d=[l.dilationHeight,l.dilationWidth];u="same"===r?function(t,e){var n=t.map(function(t,n){return t+(t-1)*(e[n]-1)}).map(function(t){return t-1}),r=n.map(function(t){return Math.floor(t/2)}),i=n.map(function(t,e){return t-r[e]});return n.map(function(t,e){return[r[e],i[e]]})}([l.filterHeight,l.filterWidth],d):[[0,0],[0,0]];var f=1===d[0]&&1===d[1],h=function(t,e,n){var r=n.map(function(t){return t[0]}),i=n.map(function(t){return t[1]}),a=t.concat(r,i),o=e.map(function(t,e){return(t-a[e]%t)%t}),s=i.map(function(t,e){return t+o[e]});return[e.map(function(t,e){return[r[e],s[e]]}),e.map(function(t,e){return[0,o[e]]})]}([l.inHeight,l.inWidth],d,u),p=h[0],m=h[1],v=f?r:"valid",_=f?s:Ua(s,d,p),g=("avg"===n?function(){return Ms(_,e,a,1,v)}:function(){return Is(_,e,a,1,v)})(),y=f?g:Ta(g,d,m);return c?y.as3D(y.shape[1],y.shape[2],y.shape[3]):y}});var Ps=xe({slice_:function(t,e,n){var r,i,a=qt(t,"x","slice");if(0===a.rank)throw new Error("Slicing scalar is not possible");r="number"==typeof e?[e].concat(new Array(a.rank-1).fill(0)):e.length<a.rank?e.concat(new Array(a.rank-e.length).fill(0)):e.slice(),i=(i=null==n?new Array(a.rank).fill(-1):"number"==typeof n?[n].concat(new Array(a.rank-1).fill(-1)):n.length<a.rank?n.concat(new Array(a.rank-n.length).fill(-1)):n).map(function(t,e){return t>=0?t:(b(-1===t,function(){return"Bad value in size"}),a.shape[e]-r[e])}),function(t,e,n){b(t.rank===e.length,function(){return"Error in slice"+t.rank+"D: Length of begin "+e+" must match the rank of the array ("+t.rank+")."}),b(t.rank===n.length,function(){return"Error in slice"+t.rank+"D: Length of size "+n+" must match the rank of the array ("+t.rank+")."});for(var r=function(r){b(e[r]+n[r]<=t.shape[r],function(){return"Error in slice"+t.rank+"D: begin["+r+"] + size["+r+"] ("+(e[r]+n[r])+") would overflow input.shape["+r+"] ("+t.shape[r]+")"})},i=0;i<t.rank;++i)r(i)}(a,r,i);var o=a.shape;return zt.engine.runKernel(function(t){return t.slice(a,r,i)},{$x:a},function(t){for(var e=[],n=0;n<t.rank;n++)e.push([r[n],o[n]-r[n]-i[n]]);return{$x:function(){return t.pad(e)}}})}}),Os=xe({slice1d_:function(t,e,n){var r=qt(t,"x","slice1d");return b(1===r.rank,function(){return"slice1d expects a rank-1 tensor, but got a rank-"+r.rank+" tensor"}),Ps(r,[e],[n])}}),Ls=xe({slice2d_:function(t,e,n){var r=qt(t,"x","slice2d");return b(2===r.rank,function(){return"slice2d expects a rank-2 tensor, but got a rank-"+r.rank+" tensor"}),Ps(r,e,n)}}),As=xe({slice3d_:function(t,e,n){var r=qt(t,"x","slice3d");return b(3===r.rank,function(){return"slice3d expects a rank-3 tensor, but got a rank-"+r.rank+" tensor"}),Ps(r,e,n)}}),Ns=xe({slice4d_:function(t,e,n){var r=qt(t,"x","slice4d");return b(4===r.rank,function(){return"slice4d expects a rank-4 tensor, but got a rank-"+r.rank+" tensor"}),Ps(r,e,n)}});function Bs(t,e,n,r,i){return e.rank<n.rank&&(e=e.reshape(ae(e.shape,r))),t.rank<n.rank&&(t=t.reshape(ae(t.shape,r))),{$x:function(){var r=t.mul(n.equal(e).cast(t.dtype));return null==i?r:r.transpose(i)}}}var js=xe({all_:function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var r=qt(t,"x","all","bool"),i=R(e,r.shape),a=i,o=se(a,r.rank);null!=o&&(r=r.transpose(o),a=ue(a.length,r.rank));var s=zt.engine.runKernel(function(t){return t.all(r,a)},{$x:r});if(n){var c=ae(s.shape,i);return s.reshape(c)}return s}}),Fs=xe({any_:function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var r=qt(t,"x","any","bool"),i=R(e,r.shape),a=i,o=se(a,r.rank);null!=o&&(r=r.transpose(o),a=ue(a.length,r.rank));var s=zt.engine.runKernel(function(t){return t.any(r,a)},{$x:r});if(n){var c=ae(s.shape,i);return s.reshape(c)}return s}}),Ys=xe({argMax_:function(t,e){void 0===e&&(e=0);var n=qt(t,"x","argMax");null==e&&(e=0);var r=R(e,n.shape),i=se(r,n.rank);return null!=i&&(n=n.transpose(i),r=ue(r.length,n.rank)),zt.engine.runKernel(function(t,e){var i=t.argMax(n,r[0]);return e([n]),i},{$x:n},function(t,e){var n=e[0];return{$x:function(){return je(n)}}})}}),$s=xe({argMin_:function(t,e){void 0===e&&(e=0);var n=qt(t,"x","argMin");null==e&&(e=0);var r=R(e,n.shape),i=se(r,n.rank);return null!=i&&(n=n.transpose(i),r=ue(r.length,n.rank)),zt.engine.runKernel(function(t,e){var i=t.argMin(n,r[0]);return e([n]),i},{$x:n},function(t,e){var n=e[0];return{$x:function(){return je(n)}}})}}),zs=xe({logSumExp_:function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var r=qt(t,"x","logSumExp"),i=R(e,r.shape),a=r.max(i,!0),o=r.sub(a).exp().sum(i).log(),s=a.reshape(o.shape).add(o);if(n){var c=ae(s.shape,i);return s.reshape(c)}return s}}),Vs=xe({max_:function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var r=qt(t,"x","max"),i=r,a=R(e,r.shape),o=a,s=se(o,r.rank);null!=s&&(r=r.transpose(s),o=ue(o.length,r.rank));var c=zt.engine.runKernel(function(t,e){var n=t.max(r,o);return e([i,n]),n},{$x:r},function(t,e){return Bs(t,e[1],e[0],a,s)});if(n){var u=ae(c.shape,a);c=c.reshape(u)}return c}}),Hs=xe({mean_:function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var r=qt(t,"x","mean"),i=R(e,r.shape),a=k(ie(r.shape,i)[1]);return Ut(function(t){var r=Me(a);return{value:(r.dtype===t.dtype?t:t.cast(r.dtype)).div(r).sum(e,n),gradFunc:function(e){var n=t.shape.slice();return i.forEach(function(t){n[t]=1}),e.reshape(n).mul(Oe(t.shape,"float32")).div(a)}}})(r)}}),qs=xe({min_:function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var r=qt(t,"x","min"),i=r,a=R(e,r.shape),o=a,s=se(o,r.rank);null!=s&&(r=r.transpose(s),o=ue(o.length,r.rank));var c=zt.engine.runKernel(function(t,e){var n=t.min(r,o);return e([i,n]),n},{$x:r},function(t,e){return Bs(t,e[1],e[0],a,s)});if(n){var u=ae(c.shape,a);c=c.reshape(u)}return c}}),Ws=xe({moments_:function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var r=R(e,(t=qt(t,"x","moments")).shape),i=t.mean(r,n),a=i.shape;return n||(a=ae(i.shape,r)),{mean:i,variance:t.toFloat().sub(i.reshape(a)).square().mean(r,n)}}}),Us=xe({sum_:function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var r=qt(t,"x","sum");"bool"===r.dtype&&(r=r.toInt());var i=R(e,r.shape);return Ut(function(t){var e=se(i,t.rank),r=i,a=t;null!=e&&(a=t.transpose(e),r=ue(r.length,t.rank));var o=zt.engine.runKernel(function(t){return t.sum(a,r)},{permutedX:a});if(n){var s=ae(o.shape,i);o=o.reshape(s)}return{value:o,gradFunc:function(e){var n=t.shape.slice();return i.forEach(function(t){n[t]=1}),e.reshape(n).mul(Oe(t.shape,"float32"))}}})(r)}}),Gs=xe({prod_:function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var r=qt(t,"x","prod");"bool"===r.dtype&&(r=r.toInt());var i=R(e,r.shape),a=se(i,r.rank),o=i,s=r;null!=a&&(s=r.transpose(a),o=ue(o.length,r.rank));var c=zt.engine.runKernel(function(t){return t.prod(s,o)},{permutedX:s});if(n){var u=ae(c.shape,i);c=c.reshape(u)}return c}});var Ks=xe({equal_:function(t,e){var n,r=qt(t,"a","equal"),i=qt(e,"b","equal");return n=Ct(r,i),r=n[0],i=n[1],en(r.shape,i.shape),zt.engine.runKernel(function(t){return t.equal(r,i)},{$a:r,$b:i})}}),Xs=xe({equalStrict_:function(t,e){var n=qt(t,"a","equalStrict"),r=qt(e,"b","equalStrict");return y(n.shape,r.shape,"Error in equalStrict: "),n.equal(r)}}),Js=xe({greater_:function(t,e){var n,r=qt(t,"a","greater"),i=qt(e,"b","greater");return n=Ct(r,i),r=n[0],i=n[1],en(r.shape,i.shape),zt.engine.runKernel(function(t){return t.greater(r,i)},{$a:r,$b:i})}}),Zs=xe({greaterEqual_:function(t,e){var n,r=qt(t,"a","greaterEqual"),i=qt(e,"b","greaterEqual");return n=Ct(r,i),r=n[0],i=n[1],en(r.shape,i.shape),zt.engine.runKernel(function(t,e){var n=t.greaterEqual(r,i);return e([r,i]),n},{$a:r,$b:i},function(t,e){var n=e[0],r=e[1];return{$a:function(){return je(n)},$b:function(){return je(r)}}})}}),Qs=xe({greaterEqualStrict_:function(t,e){var n=qt(t,"a","greaterEqualStrict"),r=qt(e,"b","greaterEqualStrict");return y(n.shape,r.shape,"Error in greaterEqualStrict: "),n.greaterEqual(r)}}),tc=xe({greaterStrict_:function(t,e){var n=qt(t,"a","greaterStrict"),r=qt(e,"b","greaterStrict");return y(n.shape,r.shape,"Error in greaterStrict: "),n.greater(r)}}),ec=xe({less_:function(t,e){var n,r=qt(t,"a","less"),i=qt(e,"b","less");return n=Ct(r,i),r=n[0],i=n[1],en(r.shape,i.shape),zt.engine.runKernel(function(t){return t.less(r,i)},{$a:r,$b:i})}}),nc=xe({lessEqual_:function(t,e){var n,r=qt(t,"a","lessEqual"),i=qt(e,"b","lessEqual");return n=Ct(r,i),r=n[0],i=n[1],en(r.shape,i.shape),zt.engine.runKernel(function(t){return t.lessEqual(r,i)},{$a:r,$b:i})}}),rc=xe({lessEqualStrict_:function(t,e){var n=qt(t,"a","lessEqualStrict"),r=qt(e,"b","lessEqualStrict");return y(n.shape,r.shape,"Error in lessEqualStrict: "),n.lessEqual(r)}}),ic=xe({lessStrict_:function(t,e){var n=qt(t,"a","lessStrict"),r=qt(e,"b","lessStrict");return y(n.shape,r.shape,"Error in lessStrict: "),n.less(r)}}),ac=xe({notEqual_:function(t,e){var n,r=qt(t,"a","notEqual"),i=qt(e,"b","notEqual");return n=Ct(r,i),r=n[0],i=n[1],en(r.shape,i.shape),zt.engine.runKernel(function(t){return t.notEqual(r,i)},{$a:r,$b:i})}}),oc=xe({notEqualStrict_:function(t,e){var n=qt(t,"a","notEqualStrict"),r=qt(e,"b","notEqualStrict");return y(n.shape,r.shape,"Error in notEqualStrict: "),n.notEqual(r)}});var sc=xe({add_:function(t,e){var n,r=qt(t,"a","add"),i=qt(e,"b","add");n=Ct(r,i),r=n[0],i=n[1];var a=en(r.shape,i.shape);return zt.engine.runKernel(function(t){return t.add(r,i)},{$a:r,$b:i},function(t){return{$a:function(){var e=t,n=tn(r.shape,a);return n.length>0&&(e=e.sum(n)),e.reshape(r.shape)},$b:function(){var e=t,n=tn(i.shape,a);return n.length>0&&(e=e.sum(n)),e.reshape(i.shape)}}})}}),cc=xe({addN_:function(t){b(Array.isArray(t),function(){return"The argument passed to tf.addN() must be a list of tensors"}),b(t.length>=1,function(){return"Must pass at least one tensor to tf.addN(), but got "+t.length});var e=t.map(function(t,e){return qt(t,"tensors"+e,"addN")}),n=e[0];e.forEach(function(t){if(t.dtype!==n.dtype)throw new Error("All tensors passed to tf.addN() must have the same dtype")}),e.forEach(function(t){if(!C(t.shape,n.shape))throw new Error("All tensors passed to tf.addN() must have the same shape")});var r=e;return zt.engine.runKernel(function(t){return t.addN(e)},r,function(t){var n={};return e.forEach(function(e,r){n[r]=function(){return t.clone()}}),n})}}),uc=xe({addStrict_:function(t,e){var n=qt(t,"a","addStrict"),r=qt(e,"b","addStrict");return y(n.shape,r.shape,"Error in addStrict: "),n.add(r)}}),lc=xe({atan2_:function(t,e){var n,r=qt(t,"a","atan2"),i=qt(e,"b","atan2");n=Ct(r,i),r=n[0],i=n[1];var a=en(r.shape,i.shape);return zt.engine.runKernel(function(t,e){var n=t.atan2(r,i);return e([r,i]),n},{$a:r,$b:i},function(t,e){var n=e[0],r=e[1];return{$a:function(){var e=sc(n.square(),r.square()),i=t.mul(r.div(e)),o=tn(n.shape,a);return o.length>0&&(i=i.sum(o)),i.reshape(n.shape)},$b:function(){var e=sc(n.square(),r.square()),i=ko(t.mul(n.div(e))),o=tn(r.shape,a);return o.length>0&&(i=i.sum(o)),i.reshape(r.shape)}}})}}),dc=xe({div_:function(t,e){var n,r=qt(t,"a","div"),i=qt(e,"b","div");if(n=Ct(r,i),r=n[0],i=n[1],"int32"===r.dtype&&"int32"===i.dtype)return hc(r,i);var a=en(r.shape,i.shape);return zt.engine.runKernel(function(t,e){var n=t.realDivide(r,i);return e([r,i]),n},{$a:r,$b:i},function(t,e){var n=e[0],r=e[1];return{$a:function(){var e=t.div(r.toFloat()),i=tn(n.shape,a);return i.length>0?e.sum(i).reshape(n.shape):e},$b:function(){var e=t.mul(n.toFloat()),i=tn(r.shape,a);i.length>0&&(e=e.sum(i).reshape(r.shape));var o=r.square();return e.div(o.toFloat()).neg()}}})}}),fc=xe({divStrict_:function(t,e){var n=qt(t,"a","div"),r=qt(e,"b","div");return y(n.shape,r.shape,"Error in divideStrict: "),n.div(r)}}),hc=xe({floorDiv_:function(t,e){var n,r=qt(t,"a","floorDiv"),i=qt(e,"b","floorDiv");n=Ct(r,i),r=n[0],i=n[1];var a=en(r.shape,i.shape);return zt.engine.runKernel(function(t,e){var n=t.floorDiv(r,i);return e([r,i]),n},{$a:r,$b:i},function(t,e){var n=e[0],r=e[1];return{$a:function(){var e=t.div(r.toFloat()),i=tn(n.shape,a);return i.length>0?e.sum(i).reshape(n.shape):e},$b:function(){var e=t.mul(n.toFloat()),i=tn(r.shape,a);i.length>0&&(e=e.sum(i).reshape(r.shape));var o=r.square();return e.div(o.toFloat()).neg()}}})}}),pc=xe({maximum_:function(t,e){var n,r=qt(t,"a","maximum"),i=qt(e,"b","maximum");return n=Ct(r,i),r=n[0],i=n[1],"bool"===r.dtype&&(r=r.toInt(),i=i.toInt()),en(r.shape,i.shape),zt.engine.runKernel(function(t,e){var n=t.maximum(r,i);return e([r,i]),n},{$a:r,$b:i},function(t,e){var n=e[0],r=e[1];return{$a:function(){return t.mul(n.greaterEqual(r).toFloat())},$b:function(){return t.mul(n.less(r).toFloat())}}})}}),mc=xe({maximumStrict_:function(t,e){var n=qt(t,"a","maximumStrict"),r=qt(e,"b","maximumStrict");return y(n.shape,r.shape,"Error in maximumStrict: "),n.maximum(r)}}),vc=xe({minimum_:function(t,e){var n,r=qt(t,"a","minimum"),i=qt(e,"b","minimum");return n=Ct(r,i),r=n[0],i=n[1],"bool"===r.dtype&&(r=r.toInt(),i=i.toInt()),en(r.shape,i.shape),zt.engine.runKernel(function(t,e){var n=t.minimum(r,i);return e([r,i]),n},{$a:r,$b:i},function(t,e){var n=e[0],r=e[1];return{$a:function(){return t.mul(n.lessEqual(r).toFloat())},$b:function(){return t.mul(n.greater(r).toFloat())}}})}}),_c=xe({minimumStrict_:function(t,e){var n=qt(t,"a","minimumStrict"),r=qt(e,"b","minimumStrict");return y(n.shape,r.shape,"Error in minimumStrict: "),n.minimum(r)}}),gc=xe({mod_:function(t,e){var n,r=qt(t,"a","mod"),i=qt(e,"b","mod");n=Ct(r,i),r=n[0],i=n[1];var a=en(r.shape,i.shape);return zt.engine.runKernel(function(t,e){var n=t.mod(r,i);return e([r,i]),n},{$a:r,$b:i},function(t,e){var n=e[0],r=e[1];return{$a:function(){var e=tn(n.shape,a);return e.length>0?t.sum(e).reshape(n.shape):t},$b:function(){var e=t.mul(n.div(r).floor().neg()),i=tn(r.shape,a);return i.length>0?e.sum(i).reshape(r.shape):e}}})}}),bc=xe({modStrict_:function(t,e){var n=qt(t,"a","modStrict"),r=qt(e,"b","modStrict");return y(n.shape,r.shape,"Error in modStrict: "),n.mod(r)}}),yc=xe({mul_:function(t,e){var n,r=qt(t,"a","mul"),i=qt(e,"b","mul");n=Ct(r,i),r=n[0],i=n[1];var a=en(r.shape,i.shape);return zt.engine.runKernel(function(t,e){var n=t.multiply(r,i);return e([r,i]),n},{$a:r,$b:i},function(t,e){var n=e[0],r=e[1];return{$a:function(){var e=t.mul(r.toFloat()),i=tn(n.shape,a);return i.length>0?e.sum(i).reshape(n.shape):e},$b:function(){var e=t.mul(n.toFloat()),i=tn(r.shape,a);return i.length>0?e.sum(i).reshape(r.shape):e}}})}}),xc=xe({mulStrict_:function(t,e){var n=qt(t,"a","mul"),r=qt(e,"b","mul");return y(n.shape,r.shape,"Error in multiplyStrict: "),n.mul(r)}}),wc=xe({pow_:function(t,e){var n=qt(t,"base","pow"),r=qt(e,"exp","pow"),i=en(n.shape,r.shape);return t=n.cast(wt(n.dtype,r.dtype)),e=r.cast(wt(n.dtype,r.dtype)),zt.engine.runKernel(function(t,e){var i=t.pow(n,r);return e([n,r,i]),i},{$base:n,$exp:r},function(t,e){var n=e[0],r=e[1],a=e[2];return{$base:function(){var e=r.toFloat(),a=t.mul(e.mul(n.pow(e.sub(Me(1))))),o=tn(n.shape,i);return o.length>0&&(a=a.sum(o)),a.reshape(n.shape)},$exp:function(){var e=n.greater(0),o=n.log().where(e,je(n)),s=t.mul(a.mul(o)),c=tn(r.shape,i);return c.length>0&&(s=s.sum(c)),s.reshape(r.shape)}}})}}),kc=xe({powStrict_:function(t,e){return y(t.shape,e.shape,"Error in powStrict: "),t.pow(e)}}),Cc=xe({squaredDifference_:function(t,e){var n,r=qt(t,"a","squaredDifference"),i=qt(e,"b","squaredDifference");return n=Ct(r,i),r=n[0],i=n[1],en(r.shape,i.shape),zt.engine.runKernel(function(t,e){var n=t.squaredDifference(r,i);return e([r,i]),n},{$a:r,$b:i},function(t,e){var n=e[0],r=e[1],i=Me(2);return{$a:function(){return t.mul(n.sub(r).mul(i))},$b:function(){return t.mul(r.sub(n).mul(i))}}})}}),Ec=xe({squaredDifferenceStrict_:function(t,e){var n=qt(t,"a","squaredDifferenceStrict"),r=qt(e,"b","squaredDifferenceStrict");return y(n.shape,r.shape,"Error in squaredDifferenceStrict: "),n.squaredDifference(r)}}),Sc=xe({sub_:function(t,e){var n,r=qt(t,"a","sub"),i=qt(e,"b","sub");n=Ct(r,i),r=n[0],i=n[1];var a=en(r.shape,i.shape);return zt.engine.runKernel(function(t){return t.subtract(r,i)},{$a:r,$b:i},function(t){return{$a:function(){var e=t,n=tn(r.shape,a);return n.length>0&&(e=e.sum(n)),e.reshape(r.shape)},$b:function(){var e=t,n=tn(i.shape,a);return n.length>0&&(e=e.sum(n)),e.neg().reshape(i.shape)}}})}}),Ic=xe({subStrict_:function(t,e){var n=qt(t,"a","subStrict"),r=qt(e,"b","subStrict");return y(n.shape,r.shape,"Error in subStrict: "),n.sub(r)}});var Mc=xe({logicalAnd_:function(t,e){var n=qt(t,"a","logicalAnd","bool"),r=qt(e,"b","logicalAnd","bool");return en(n.shape,r.shape),zt.engine.runKernel(function(t){return t.logicalAnd(n,r)},{$a:n,$b:r})}}),Tc=xe({logicalNot_:function(t){var e=qt(t,"x","logicalNot","bool");return zt.engine.runKernel(function(t){return t.logicalNot(e)},{$x:e})}}),Dc=xe({logicalOr_:function(t,e){var n=qt(t,"a","logicalOr","bool"),r=qt(e,"b","logicalOr","bool");return en(n.shape,r.shape),zt.engine.runKernel(function(t){return t.logicalOr(n,r)},{$a:n,$b:r})}}),Rc=xe({logicalXor_:function(t,e){var n=qt(t,"a","logicalXor","bool"),r=qt(e,"b","logicalXor","bool");return en(n.shape,r.shape),Dc(t,e).logicalAnd(Mc(t,e).logicalNot())}}),Pc=xe({where_:function(t,e,n){var r=qt(e,"a","where"),i=qt(n,"b","where"),a=qt(t,"condition","where","bool");return y(r.shape,i.shape,"Error in where: "),1===a.rank?b(a.shape[0]===r.shape[0],function(){return"The first dimension of `a` must match the size of `condition`."}):y(a.shape,i.shape,"Error in where: "),zt.engine.runKernel(function(t,e){var n=t.select(a,r,i);return e([a]),n},{$condition:a,$a:r,$b:i},function(t,e){var n=e[0];return{$condition:function(){return je(n).toFloat()},$a:function(){return t.mul(n.cast(t.dtype))},$b:function(){return t.mul(n.logicalNot().cast(t.dtype))}}})}}),Oc=function(t){return u(this,void 0,void 0,function(){var e,n,r;return l(this,function(i){switch(i.label){case 0:return[4,(e=qt(t,"condition","whereAsync","bool")).data()];case 1:return n=i.sent(),r=to(e.shape,n),t!==e&&e.dispose(),[2,r]}})})};var Lc=xe({elu_:function(t){var e=qt(t,"x","elu");return zt.engine.runKernel(function(t,n){var r=t.elu(e);return n([r]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return zt.engine.runKernel(function(e){return e.eluDer(t,n)},{dy:t,y:n})}}})}}),Ac=xe({leakyRelu_:function(t,e){void 0===e&&(e=.2);var n=qt(t,"x","leakyRelu");return pc(Me(e).mul(n),n)}}),Nc=xe({prelu_:function(t,e){var n=qt(t,"x","prelu"),r=qt(e,"alpha","prelu");return zt.engine.runKernel(function(t,e){var i=t.prelu(n,r);return e([n,r]),i},{$x:n,$alpha:r},function(t,e){var n=e[0],r=e[1],i=n.greater(0);return{$x:function(){return Pc(i,t,t.mul(r))},$alpha:function(){var e=Pc(i,je(t),t.mul(n)),a=tn(r.shape,t.shape);return a.length>0&&(e=e.sum(a)),e.reshape(r.shape)}}})}}),Bc=xe({relu_:function(t){var e=qt(t,"x","relu");return"bool"===e.dtype?e.toInt():zt.engine.runKernel(function(t,n){var r=t.relu(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){return t.mulStrict(n.step().toFloat())}}})}}),jc=xe({selu_:function(t){var e=qt(t,"x","selu");return zt.engine.runKernel(function(t,n){var r=t.selu(e);return n([e]),r},{$x:e},function(t,e){var n=e[0];return{$x:function(){var e=n.greater(Me(0)),r=Me(Ki),i=Me(Xi),a=t.mul(i),o=t.mul(r).mul(n.toFloat().exp());return Pc(e,a,o)}}})}});var Fc=xe({transpose_:function(t,e){var n=qt(t,"x","transpose");return null==e&&(e=n.shape.map(function(t,e){return e}).reverse()),b(n.rank===e.length,function(){return"Error in transpose: rank of input "+n.rank+" must match length of perm "+e+"."}),e.forEach(function(t){b(t>=0&&t<n.rank,function(){return"All entries in 'perm' must be between 0 and "+(n.rank-1)+" but got "+e})}),n.rank<=1?n.clone():zt.engine.runKernel(function(t){return t.transpose(n,e)},{$x:n},function(t){var n=ce(e);return{$x:function(){return t.transpose(n)}}})}});var Yc=xe({localResponseNormalization_:function(t,e,n,r,i){void 0===e&&(e=5),void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=.5);var a=qt(t,"x","localResponseNormalization");b(4===a.rank||3===a.rank,function(){return"Error in localResponseNormalization: x must be rank 3 or 4 but got\n rank "+a.rank+"."}),b(E(e),function(){return"Error in localResponseNormalization: depthRadius must be an integer but got depthRadius "+e+"."});var o=a,s=!1;3===a.rank&&(s=!0,o=a.as4D(1,a.shape[0],a.shape[1],a.shape[2]));var c=zt.engine.runKernel(function(t,a){var s=t.localResponseNormalization4D(o,e,n,r,i);return a([o,s]),s},{x4D:o},function(t,a){var o=a[0],s=a[1];return{x4D:function(){return zt.engine.runKernel(function(a){return a.LRNGrad(t,o,s,e,n,r,i)},{})}}});return s?c.as3D(c.shape[1],c.shape[2],c.shape[3]):c}});var $c=xe({norm_:function(t,e,n,r){void 0===e&&(e="euclidean"),void 0===n&&(n=null),void 0===r&&(r=!1);var i=function t(e,n,r){if(void 0===r&&(r=null),0===e.rank)return e.abs();if(1!==e.rank&&null===r)return t(e.reshape([-1]),n,r);if(1===e.rank||"number"==typeof r||Array.isArray(r)&&1===r.length){if(1===n)return e.abs().sum(r);if(n===1/0)return e.abs().max(r);if(n===-1/0)return e.abs().min(r);if("euclidean"===n||2===n)return e.abs().pow(Me(2,"int32")).sum(r).sqrt();throw new Error("Error in norm: invalid ord value: "+n)}if(Array.isArray(r)&&2===r.length){if(1===n)return e.abs().sum(r[0]).max(r[1]-1);if(n===1/0)return e.abs().sum(r[1]).max(r[0]);if(n===-1/0)return e.abs().sum(r[1]).min(r[0]);if("fro"===n||"euclidean"===n)return e.square().sum(r).sqrt();throw new Error("Error in norm: invalid ord value: "+n)}throw new Error("Error in norm: invalid axis: "+r)}(t=qt(t,"x","norm"),e,n),a=i.shape;if(r){var o=R(n,t.shape);a=ae(i.shape,o)}return i.reshape(a)}});function zc(t,e){for(var n=[],r=t;r<e;++r)n.push(r);return n}function Vc(t){for(var e=[],n=0;n<t.length;++n)for(var r=0;r<t[n].length;++r)e.push(t[n][r]);return e}var Hc=xe({gather_:function(t,e,n){void 0===n&&(n=0);var r=qt(t,"x","gather"),i=qt(e,"indices","gather","int32");n=R(n,r.shape)[0];var a=function(t,e,n){for(var r=t.shape[n],i=[],a=1,o=1,s=0;s<n;s++)i.push(t.shape[s]),a*=t.shape[s];for(s=0;s<e.rank;s++)i.push(e.shape[s]);for(s=n+1;s<t.rank;s++)i.push(t.shape[s]),o*=t.shape[s];return{batchSize:a,sliceSize:o,dimSize:r,outputShape:i}}(r,i,n);return zt.engine.runKernel(function(t,e){var a=t.gather(r,i.flatten(),n);return e([i]),a},{$x:r},function(t,e){var i=e[0];return{$x:function(){var e=r.shape,a=i.size,o=e.slice(0,n),s=o.length,c=e.slice(n,e.length).slice(1),u=c.length,l=zc(0,s),d=zc(s+1,s+1+u),f=Vc([o,[a],c]),h=t.reshape(f),p=i.reshape([a]),m=Vc([[s],l,d]),v=h.transpose(m),_=qc(v,p,r.shape[n]),g=ce(m);return _.transpose(g)}}}).reshape(a.outputShape)}}),qc=xe({unsortedSegmentSum_:function(t,e,n){var r=qt(t,"x","unsortedSegmentSum"),i=qt(e,"segmentIds","unsortedSegmentSum","int32");return b(E(n),function(){return"numSegments must be of dtype int"}),zt.engine.runKernel(function(t,e){var a=t.unsortedSegmentSum(r,i,n);return e([i]),a},{$x:r},function(t,e){var n=e[0];return{$x:function(){return function(t,e){for(var n=pc(e,je(e)),r=Hc(t,n),i=Zs(e,Me(0,"int32")),a=r.rank-i.rank,o=0;o<a;++o)i=La(i,o+1);i=Mc(i,Oe(r.shape,"bool"));var s=je(r);return Pc(i,r,s)}(t,n)}}})}});var Wc=xe({basicLSTMCell_:function(t,e,n,r,i,a){var o=qt(t,"forgetBias","basicLSTMCell"),s=qt(e,"lstmKernel","basicLSTMCell"),c=qt(n,"lstmBias","basicLSTMCell"),u=qt(r,"data","basicLSTMCell"),l=qt(i,"c","basicLSTMCell"),d=qt(a,"h","basicLSTMCell"),f=u.concat(d,1).matMul(s).add(c),h=f.shape[0],p=f.shape[1]/4,m=[h,p],v=f.slice([0,0],m),_=f.slice([0,p],m),g=f.slice([0,2*p],m),b=f.slice([0,3*p],m),y=v.sigmoid().mulStrict(_.tanh()).addStrict(l.mulStrict(o.add(g).sigmoid()));return[y,y.tanh().mulStrict(b.sigmoid())]}}),Uc=xe({multiRNNCell_:function(t,e,n,r){for(var i=qt(e,"data","multiRNNCell"),a=Wt(n,"c","multiRNNCell"),o=Wt(r,"h","multiRNNCell"),s=i,c=[],u=0;u<t.length;u++){var l=t[u](s,a[u],o[u]);c.push(l[0]),c.push(l[1]),s=l[1]}var d=[],f=[];for(u=0;u<c.length;u+=2)d.push(c[u]),f.push(c[u+1]);return[d,f]}});var Gc=xe({movingAverage_:function(t,e,n,r,i){void 0===i&&(i=!0);var a=qt(t,"v","movingAverage"),o=qt(e,"x","movingAverage"),s=qt(n,"decay","movingAverage");Et(a,o),b(C(a.shape,o.shape),function(){return"Shape mismatch in v and x"});var c=Me(1),u=c.sub(s),l=o.sub(a).mul(u);if(i){b(null!=r,function(){return"When using zeroDebias: true, step is required."});var d=qt(r,"step","movingAverage");l=l.div(c.sub(wc(s,d)))}return a.add(l)}});var Kc=xe({stridedSlice_:function(t,e,n,r,i,a,o,s,c){if(void 0===i&&(i=0),void 0===a&&(a=0),void 0===o&&(o=0),void 0===s&&(s=0),void 0===c&&(c=0),0!==o)throw new Error("ellipsis mask is not yet supported");if(0!==s)throw new Error("new axis mask is not yet supported");var u=qt(t,"x","stridedSlice");if(r.every(function(t){return 1===t})){var l=ve(u.shape,e,n,r,i,a,o,s,c),d=l[0],f=l[1],h=l[2],p=f.filter(function(t,e){return-1===h.indexOf(e)});return Ps(u,d,f).reshape(p)}return zt.engine.runKernel(function(t){return t.stridedSlice(u,e,n,r,i,a,o,s,c)},{$x:u})}});var Xc=xe({topk_:function(t,e,n){void 0===e&&(e=1),void 0===n&&(n=!0);var r=qt(t,"x","topk");if(0===r.rank)throw new Error("topk() expects the input to be of rank 1 or higher");var i=r.shape[r.shape.length-1];if(e>i)throw new Error("'k' passed to topk() must be <= the last dimension ("+i+") but got "+e);var a=zt.engine.runKernel(function(t){return t.topk(r,e,n)},{$x:r});return{values:a[0],indices:a[1]}}});var Jc=xe({scatterND_:function(t,e,n){var r=qt(t,"indices","scatterND","int32"),i=qt(e,"updates","scatterND");return pe(i,r,n),zt.engine.runKernel(function(t){return t.scatterND(r,i,n)},{$indices:r,$updates:i})}});var Zc=xe({fft_:function(t){b("complex64"===t.dtype,function(){return"The dtype for tf.spectral.fft() must be complex64 but got "+t.dtype+"."});var e=t.shape[t.shape.length-1],n=t.size/e,r=t.as2D(n,e);return zt.engine.runKernel(function(t){return t.fft(r)},{input:t}).reshape(t.shape)}}),Qc=xe({ifft_:function(t){b("complex64"===t.dtype,function(){return"The dtype for tf.spectral.ifft() must be complex64 but got "+t.dtype+"."});var e=t.shape[t.shape.length-1],n=t.size/e,r=t.as2D(n,e);return zt.engine.runKernel(function(t){return t.ifft(r)},{input:t}).reshape(t.shape)}}),tu=xe({rfft_:function(t){b("float32"===t.dtype,function(){return"The dtype for rfft() must be real value but got "+t.dtype});var e=t.shape[t.shape.length-1],n=t.size/e,r=t.zerosLike(),i=Ce(t,r).as2D(n,e),a=Zc(i),o=Math.floor(e/2)+1,s=Ee(a),c=Se(a),u=s.split([o,e-o],s.shape.length-1),l=c.split([o,e-o],c.shape.length-1),d=t.shape.slice();return d[t.shape.length-1]=o,Ce(u[0],l[0]).reshape(d)}}),eu=xe({irfft_:function(t){var e=t.shape[t.shape.length-1],n=t.size/e;if(e<=2){var r=t.as2D(n,e),i=Qc(r);return Ee(i)}var a=[n,2*(e-1)],o=Ee(t).as2D(n,e),s=Se(t).as2D(n,e),c=o.slice([0,1],[n,e-2]).reverse(1),u=s.slice([0,1],[n,e-2]).reverse(1).mul(Me(-1)),l=o.concat(c,1),d=s.concat(u,1);return r=Ce(l,d).as2D(a[0],a[1]),i=Qc(r),Ee(i)}}),nu=Object.freeze({fft:Zc,ifft:Qc,rfft:tu,irfft:eu});var ru=xe({sparseToDense_:function(t,e,n,r){void 0===r&&(r=0);var i=qt(t,"sparseIndices","sparseToDense","int32"),a=qt(e,"sparseValues","sparseToDense"),o=qt(r,"defaultValue","sparseToDense",a.dtype);return function(t,e,n,r){if("int32"!==t.dtype)throw new Error("tf.sparseToDense() expects the indices to be int32 type, but the dtype was "+t.dtype+".");if(t.rank>2)throw new Error("sparseIndices should be a scalar, vector, or matrix, but got shape "+t.shape+".");var i=t.rank>0?t.shape[0]:1,a=t.rank>1?t.shape[1]:1;if(n.length!==a)throw new Error("outputShape has incorrect number of elements:, "+n.length+", should be: "+a+".");var o=e.size;if(0!==e.rank&&(1!==e.rank||o!==i))throw new Error("sparseValues has incorrect shape "+e.shape+", should be [] or ["+i+"]");if(e.dtype!==r.dtype)throw new Error("sparseValues.dtype must match defaultValues.dtype")}(i,a,n,o),zt.engine.runKernel(function(t){return t.sparseToDense(i,a,n,o)},{$sparseIndices:i,$sparseValues:a,$defaultValue:o})}});var iu,au=xe({gatherND_:function(t,e){var n=qt(e,"indices","gatherND","int32"),r=qt(t,"x","gatherND");return zt.engine.runKernel(function(t){return t.gatherND(r,n)},{$x:r,$indices:n})}});!function(t){t[t.NONE=0]="NONE",t[t.MEAN=1]="MEAN",t[t.SUM=2]="SUM",t[t.SUM_BY_NONZERO_WEIGHTS=3]="SUM_BY_NONZERO_WEIGHTS"}(iu||(iu={}));var ou=xe({absoluteDifference_:function(t,e,n,r){void 0===r&&(r=iu.SUM_BY_NONZERO_WEIGHTS);var i=qt(t,"labels","absoluteDifference"),a=qt(e,"predictions","absoluteDifference"),o=null;null!=n&&(o=qt(n,"weights","absoluteDifference")),y(i.shape,a.shape,"Error in absoluteDifference: ");var s=i.sub(a).abs();return su(s,o,r)}}),su=xe({computeWeightedLoss_:function(t,e,n){void 0===n&&(n=iu.SUM_BY_NONZERO_WEIGHTS);var r=qt(t,"losses","computeWeightedLoss"),i=null;null!=e&&(i=qt(e,"weights","computeWeightedLoss"));var a=null==i?r:r.mul(i);if(n===iu.NONE)return a;if(n===iu.SUM)return a.sum();if(n===iu.MEAN){if(null==i)return a.mean();var o=r.size/i.size,s=a.sum().div(i.sum());return o>1?s.div(Me(o)):s}if(n===iu.SUM_BY_NONZERO_WEIGHTS){if(null==i)return a.sum().div(Me(r.size));var c=i.mul(Oe(r.shape)).notEqual(Me(0)).sum().toFloat();return a.sum().div(c)}throw Error("Unknown reduction: "+n)}}),cu=xe({cosineDistance_:function(t,e,n,r,i){void 0===i&&(i=iu.SUM_BY_NONZERO_WEIGHTS);var a=qt(t,"labels","cosineDistance"),o=qt(e,"predictions","cosineDistance"),s=null;null!=r&&(s=qt(r,"weights","cosineDistance")),y(a.shape,o.shape,"Error in cosineDistance: ");var c=Me(1).sub(a.mul(o).sum(n,!0));return su(c,s,i)}}),uu=xe({hingeLoss_:function(t,e,n,r){void 0===r&&(r=iu.SUM_BY_NONZERO_WEIGHTS);var i=qt(t,"labels","hingeLoss"),a=qt(e,"predictions","hingeLoss"),o=null;null!=n&&(o=qt(n,"weights","hingeLoss")),y(i.shape,a.shape,"Error in hingeLoss: ");var s=Me(1);i=Me(2).mul(i).sub(s);var c=s.sub(i.mul(a)).relu();return su(c,o,r)}}),lu=xe({huberLoss_:function(t,e,n,r,i){void 0===r&&(r=1),void 0===i&&(i=iu.SUM_BY_NONZERO_WEIGHTS);var a=qt(t,"labels","huberLoss"),o=qt(e,"predictions","huberLoss"),s=null;null!=n&&(s=qt(n,"weights","huberLoss")),y(a.shape,o.shape,"Error in huberLoss: ");var c=Me(r),u=o.sub(a).abs(),l=vc(u,c),d=u.sub(l),f=Me(.5).mul(l.square()).add(c.mul(d));return su(f,s,i)}}),du=xe({logLoss_:function(t,e,n,r,i){void 0===r&&(r=1e-7),void 0===i&&(i=iu.SUM_BY_NONZERO_WEIGHTS);var a=qt(t,"labels","logLoss"),o=qt(e,"predictions","logLoss"),s=null;null!=n&&(s=qt(n,"weights","logLoss")),y(a.shape,o.shape,"Error in logLoss: ");var c=Me(1),u=Me(r),l=a.mul(o.add(u).log()).neg().sub(c.sub(a).mul(c.sub(o).add(u).log()));return su(l,s,i)}}),fu=xe({meanSquaredError_:function(t,e,n,r){void 0===r&&(r=iu.SUM_BY_NONZERO_WEIGHTS);var i=qt(t,"labels","meanSquaredError"),a=qt(e,"predictions","meanSquaredError"),o=null;null!=n&&(o=qt(n,"weights","meanSquaredError")),y(i.shape,a.shape,"Error in meanSquaredError: ");var s=i.squaredDifference(a);return su(s,o,r)}}),hu=xe({sigmoidCrossEntropy_:function(t,e,n,r,i){void 0===r&&(r=0),void 0===i&&(i=iu.SUM_BY_NONZERO_WEIGHTS);var a=qt(t,"multiClassLabels","sigmoidCrossEntropy"),o=qt(e,"logits","sigmoidCrossEntropy"),s=null;if(null!=n&&(s=qt(n,"weights","sigmoidCrossEntropy")),y(a.shape,o.shape,"Error in sigmoidCrossEntropy: "),r>0){var c=Me(r),u=Me(1),l=Me(.5);a=a.mul(u.sub(c)).add(l.mul(c))}var d=function(t,e){var n=qt(t,"labels","sigmoidCrossEntropyWithLogits"),r=qt(e,"logits","sigmoidCrossEntropyWithLogits");y(n.shape,r.shape,"Error in sigmoidCrossEntropyWithLogits: ");var i=r.relu(),a=r.mul(n),o=r.abs().neg().exp().log1p();return i.sub(a).add(o)}(a,o);return su(d,s,i)}}),pu=xe({softmaxCrossEntropy_:function(t,e,n,r,i){void 0===r&&(r=0),void 0===i&&(i=iu.SUM_BY_NONZERO_WEIGHTS);var a=qt(t,"onehotLabels","softmaxCrossEntropy"),o=qt(e,"logits","softmaxCrossEntropy"),s=null;if(null!=n&&(s=qt(n,"weights","softmaxCrossEntropy")),y(a.shape,o.shape,"Error in softmaxCrossEntropy: "),r>0){var c=Me(r),u=Me(1),l=Me(a.shape[1]);a=a.mul(u.sub(c)).add(c.div(l))}var d=function(t,e,n){if(void 0===n&&(n=-1),-1===n&&(n=e.rank-1),n!==e.rank-1)throw Error("Softmax cross entropy along a non-last dimension is not yet supported. Labels / logits was rank "+e.rank+" and dim was "+n);return Ut(function(t,e,r){var i=e.logSumExp([n],!0),a=e.toFloat().sub(i);return r([t,a]),{value:a.mul(t).neg().sum([n]),gradFunc:function(t,e){var r=e[0],i=e[1],a=ae(t.shape,[n]);return[t.reshape(a).mul(r.toFloat().sub(i.exp())),t.reshape(a).mul(i.exp().sub(r.toFloat()))]}}})(t,e)}(a,o);return su(d,s,i)}}),mu=Object.freeze({get Reduction(){return iu},absoluteDifference:ou,computeWeightedLoss:su,cosineDistance:cu,hingeLoss:uu,huberLoss:lu,logLoss:du,meanSquaredError:fu,sigmoidCrossEntropy:hu,softmaxCrossEntropy:pu});function vu(t,e){return void 0===e&&(e=!1),zt.engine.tidy(function(){if(2!==t.shape.length)throw new Error("qr2d() requires a 2D Tensor, but got a "+t.shape.length+"D Tensor.");for(var n=t.shape[0],r=t.shape[1],i=Aa(n),a=t.clone(),o=De([[1]],[1,1]),s=o.clone(),c=n>=r?r:n,u=function(t){var e,c=a,u=s,l=i;e=zt.engine.tidy(function(){var e=a.slice([t,t],[n-t,1]),c=e.norm(),u=a.slice([t,t],[1,1]),l=u.sign().neg(),d=u.sub(l.mul(c)),f=e.div(d);s=1===f.shape[0]?o.clone():o.concat(f.slice([1,0],[f.shape[0]-1,f.shape[1]]),0);var h=l.matMul(d).div(c).neg(),p=a.slice([t,0],[n-t,r]),m=h.mul(s);a=0===t?p.sub(m.matMul(s.transpose().matMul(p))):a.slice([0,0],[t,r]).concat(p.sub(m.matMul(s.transpose().matMul(p))),0);var v=i.slice([0,t],[n,i.shape[1]-t]);return i=0===t?v.sub(v.matMul(s).matMul(m.transpose())):i.slice([0,0],[n,t]).concat(v.sub(v.matMul(s).matMul(m.transpose())),1),[s,a,i]}),s=e[0],a=e[1],i=e[2],Xt([c,u,l])},l=0;l<c;++l)u(l);return!e&&n>r&&(i=i.slice([0,0],[n,r]),a=a.slice([0,0],[r,r])),[i,a]})}var _u=xe({gramSchmidt_:function(t){var e;if(Array.isArray(t)){e=!1,b(null!=t&&t.length>0,function(){return"Gram-Schmidt process: input must not be null, undefined, or empty"});for(var n=t[0].shape[0],r=function(e){b(t[e].shape[0]===n,function(){return"Gram-Schmidt: Non-unique lengths found in the input vectors: ("+t[e].shape[0]+" vs. "+n+")"})},i=1;i<t.length;++i)r(i)}else e=!0,t=_a(t,t.shape[0],0).map(function(t){return Ga(t,[0])});b(t.length<=t[0].shape[0],function(){return"Gram-Schmidt: Number of vectors ("+t.length+") exceeds number of dimensions ("+t[0].shape[0]+")."});var a=[],o=t,s=function(t){a.push(zt.engine.tidy(function(){var e=o[t];if(t>0)for(var n=0;n<t;++n){var r=Us(a[n].mulStrict(e)).mul(a[n]);e=e.sub(r)}return e.div($c(e,"euclidean"))}))};for(i=0;i<t.length;++i)s(i);return e?Ka(a,0):a}}),gu=xe({qr_:function(t,e){if(void 0===e&&(e=!1),t.rank<2)throw new Error("qr() requires input tensor to have a rank >= 2, but got rank "+t.rank);if(2===t.rank)return vu(t,e);var n=t.shape.slice(0,t.shape.length-2).reduce(function(t,e){return t*e}),r=[],i=[];return Za(t.reshape([n,t.shape[t.shape.length-2],t.shape[t.shape.length-1]]),0).forEach(function(t){var n=vu(t,e),a=n[0],o=n[1];r.push(a),i.push(o)}),[Ka(r,0).reshape(t.shape),Ka(i,0).reshape(t.shape)]}}),bu=Object.freeze({gramSchmidt:_u,qr:gu});function yu(t,e,n,r,i){null==r&&(r=.5),null==i&&(i=Number.NEGATIVE_INFINITY);var a=t.shape[0];return n=Math.min(n,a),b(0<=r&&r<=1,function(){return"iouThreshold must be in [0, 1], but was '"+r+"'"}),b(2===t.rank,function(){return"boxes must be a 2D tensor, but was of rank '"+t.rank+"'"}),b(4===t.shape[1],function(){return"boxes must have 4 columns, but 2nd dimension was "+t.shape[1]}),b(1===e.rank,function(){return"scores must be a 1D tensor"}),b(e.shape[0]===a,function(){return"scores has incompatible shape with boxes. Expected "+a+", but was "+e.shape[0]}),{maxOutputSize:n,iouThreshold:r,scoreThreshold:i}}var xu=xe({resizeBilinear_:function(t,e,n){void 0===n&&(n=!1);var r=qt(t,"images","resizeBilinear");b(3===r.rank||4===r.rank,function(){return"Error in resizeBilinear: x must be rank 3 or 4, but got rank "+r.rank+"."}),b(2===e.length,function(){return"Error in resizeBilinear: new shape must 2D, but got shape "+e+"."});var i=r,a=!1;3===r.rank&&(a=!0,i=r.as4D(1,r.shape[0],r.shape[1],r.shape[2]));var o=e[0],s=e[1],c=zt.engine.runKernel(function(t,e){return e([i]),t.resizeBilinear(i,o,s,n)},{batchImages:i},function(t,e){return{batchImages:function(){return zt.engine.runKernel(function(r){return r.resizeBilinearBackprop(t,e[0],n)},{})}}});return a?c.as3D(c.shape[1],c.shape[2],c.shape[3]):c}}),wu=xe({resizeNearestNeighbor_:function(t,e,n){void 0===n&&(n=!1);var r=qt(t,"images","resizeNearestNeighbor");b(3===r.rank||4===r.rank,function(){return"Error in resizeNearestNeighbor: x must be rank 3 or 4, but got rank "+r.rank+"."}),b(2===e.length,function(){return"Error in resizeNearestNeighbor: new shape must 2D, but got shape "+e+"."}),b("float32"===r.dtype||"int32"===r.dtype,function(){return"`images` must have `int32` or `float32` as dtype"});var i=r,a=!1;3===r.rank&&(a=!0,i=r.as4D(1,r.shape[0],r.shape[1],r.shape[2]));var o=e[0],s=e[1],c=zt.engine.runKernel(function(t,e){return e([i]),t.resizeNearestNeighbor(i,o,s,n)},{batchImages:i},function(t,e){return{batchImages:function(){return zt.engine.runKernel(function(r){return r.resizeNearestNeighborBackprop(t,e[0],n)},{})}}});return a?c.as3D(c.shape[1],c.shape[2],c.shape[3]):c}}),ku=xe({nonMaxSuppression_:function(t,e,n,r,i){void 0===r&&(r=.5),void 0===i&&(i=Number.NEGATIVE_INFINITY);var a=qt(t,"boxes","nonMaxSuppression"),o=qt(e,"scores","nonMaxSuppression"),s=yu(a,o,n,r,i);return n=s.maxOutputSize,r=s.iouThreshold,i=s.scoreThreshold,zt.engine.runKernel(function(t){return t.nonMaxSuppression(a,o,n,r,i)},{$boxes:a})}}),Cu=function(t,e,n,r,i){return void 0===r&&(r=.5),void 0===i&&(i=Number.NEGATIVE_INFINITY),u(this,void 0,void 0,function(){var a,o,s,c,u,d;return l(this,function(l){switch(l.label){case 0:return a=qt(t,"boxes","nonMaxSuppressionAsync"),o=qt(e,"scores","nonMaxSuppressionAsync"),s=yu(a,o,n,r,i),n=s.maxOutputSize,r=s.iouThreshold,i=s.scoreThreshold,[4,a.data()];case 1:return c=l.sent(),[4,o.data()];case 2:return u=l.sent(),d=We(c,u,n,r,i),a!==t&&a.dispose(),o!==e&&o.dispose(),[2,d]}})})},Eu=xe({cropAndResize_:function(t,e,n,r,i,a){var o=qt(t,"image","cropAndResize","float32"),s=qt(e,"boxes","cropAndResize","float32"),c=qt(n,"boxInd","cropAndResize","int32");i=i||"bilinear",a=a||0;var u=s.shape[0];return b(4===o.rank,function(){return"Error in cropAndResize: image must be rank 4,but got rank "+o.rank+"."}),b(2===s.rank&&4===s.shape[1],function(){return"Error in cropAndResize: boxes must be have size ["+u+",4] but had shape "+s.shape+"."}),b(1===c.rank&&c.shape[0]===u,function(){return"Error in cropAndResize: boxInd must be have size ["+u+"] but had shape "+s.shape+"."}),b(2===r.length,function(){return"Error in cropAndResize: cropSize must be of length 2, but got length "+r.length+"."}),b(r[0]>=1&&r[1]>=1,function(){return"cropSize must be atleast [1,1], but was "+r}),b("bilinear"===i||"nearest"===i,function(){return"method must be bilinear or nearest, but was "+i}),zt.engine.runKernel(function(t,e){return t.cropAndResize(o,s,c,r,i,a)},{$image:o,$boxes:s})}}),Su=Object.freeze({resizeBilinear:xu,resizeNearestNeighbor:wu,nonMaxSuppression:ku,nonMaxSuppressionAsync:Cu,cropAndResize:Eu});var Iu=xe({matMul_:function(t,e,n,r,i,a){var o;void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===a&&(a="linear");var s=qt(t,"a","fused matMul"),c=qt(e,"b","fused matMul");o=Ct(s,c),s=o[0],c=o[1];var u=n?s.shape[s.rank-2]:s.shape[s.rank-1],l=r?c.shape[c.rank-1]:c.shape[c.rank-2],d=n?s.shape[s.rank-1]:s.shape[s.rank-2],f=r?c.shape[c.rank-2]:c.shape[c.rank-1],h=s.shape.slice(0,-2),p=c.shape.slice(0,-2),m=k(h),v=k(p);b(s.rank>=2&&c.rank>=2&&s.rank===c.rank,function(){return"Error in fused matMul: inputs must have the same rank of at least 2, got ranks "+s.rank+" and "+c.rank+"."}),b(C(h,p),function(){return"Error in fused matMul: outer dimensions ("+h+") and ("+p+") of Tensors with shapes "+s.shape+" and "+c.shape+" must match."}),b(u===l,function(){return"Error in fused matMul: inner shapes ("+u+") and ("+l+") of Tensors with shapes "+s.shape+" and "+c.shape+" and transposeA="+n+" and transposeB="+r+" must match."});var _,g=s.shape.slice(0,-2).concat([d,f]),y=n?s.as3D(m,u,d):s.as3D(m,d,u),x=r?c.as3D(v,f,l):c.as3D(v,l,f);null!=i&&en(g,(_=Ct(_=qt(i,"bias","fused matMul"),s)[0]).shape);var w={$a:y,$b:x};return null!=i&&(w.$bias=_),zt.engine.runKernel(function(t,e){var i=t.fusedBatchMatMul(y,x,n,r,_,a);return e([y,x,i]),i},w,function(t,e){var o,s=e[0],c=e[1],u=e[2];if(null==a||"linear"===a)o=t;else{if("relu"!==a)throw new Error("Gradient for activation "+a+" has not been implemented yet.");o=t.mul(u.step())}var l={};return null!=i&&(l={$bias:function(){var t=o,e=tn(_.shape,o.shape);return e.length>0&&(t=t.sum(e)),t.reshape(_.shape)}}),n||r?!n&&r?Object.assign({$a:function(){return o.matMul(c,!1,!1)},$b:function(){return o.matMul(s,!0,!1)}},l):n&&!r?Object.assign({$a:function(){return c.matMul(o,!1,!0)},$b:function(){return s.matMul(o,!1,!1)}},l):Object.assign({$a:function(){return c.matMul(o,!0,!0)},$b:function(){return o.matMul(s,!0,!0)}},l):Object.assign({$a:function(){return o.matMul(c,!1,!0)},$b:function(){return s.matMul(o,!0,!1)}},l)}).reshape(g)}}),Mu=Object.freeze({matMul:Iu}),Tu=Object.freeze({image:Su,linalg:bu,losses:mu,spectral:nu,fused:Mu,op:xe,batchNormalization2d:Wo,batchNormalization3d:Uo,batchNormalization4d:Go,batchNormalization:Ko,batchNorm:Xo,batchNorm2d:Jo,batchNorm3d:Zo,batchNorm4d:Qo,complex:Ce,real:Ee,imag:Se,concat:fa,concat1d:ha,concat2d:pa,concat3d:ma,concat4d:va,split:_a,conv1d:fs,conv2d:hs,conv3d:ps,conv2dDerFilter:ms,depthwiseConv2d:vs,separableConv2d:_s,conv2dTranspose:gs,matMul:bs,dot:ys,outerProduct:xs,reverse:ws,reverse1d:ks,reverse2d:Cs,reverse3d:Es,reverse4d:Ss,maxPool:Ts,avgPool:Ds,pool:Rs,slice:Ps,slice1d:Os,slice2d:Ls,slice3d:As,slice4d:Ns,abs:io,acos:ao,acosh:oo,asin:so,asinh:co,atan:uo,atanh:lo,ceil:fo,clipByValue:ho,cos:po,cosh:mo,erf:vo,exp:_o,expm1:go,floor:bo,log:yo,log1p:xo,logSigmoid:wo,neg:ko,reciprocal:Co,round:Eo,rsqrt:So,sigmoid:Io,sign:Mo,isNaN:To,isInf:Do,isFinite:Ro,sin:Po,sinh:Oo,softplus:Lo,sqrt:Ao,square:No,step:Bo,tan:jo,tanh:Fo,all:js,any:Fs,argMax:Ys,argMin:$s,logSumExp:zs,max:Vs,mean:Hs,min:qs,moments:Ws,sum:Us,prod:Gs,equal:Ks,equalStrict:Xs,greater:Js,greaterEqual:Zs,greaterEqualStrict:Qs,greaterStrict:tc,less:ec,lessEqual:nc,lessEqualStrict:rc,lessStrict:ic,notEqual:ac,notEqualStrict:oc,add:sc,addN:cc,addStrict:uc,atan2:lc,div:dc,divStrict:fc,floorDiv:hc,maximum:pc,maximumStrict:mc,minimum:vc,minimumStrict:_c,mod:gc,modStrict:bc,mul:yc,mulStrict:xc,pow:wc,powStrict:kc,squaredDifference:Cc,squaredDifferenceStrict:Ec,sub:Sc,subStrict:Ic,elu:Lc,leakyRelu:Ac,prelu:Nc,relu:Bc,selu:jc,logicalAnd:Mc,logicalNot:Tc,logicalOr:Dc,logicalXor:Rc,where:Pc,whereAsync:Oc,buffer:Ma,print:function(t,e){void 0===e&&(e=!1),console.log(t.toString(e))},batchToSpaceND:Ta,cast:Da,clone:Ra,cumsum:Pa,depthToSpace:Oa,expandDims:La,eye:Aa,multinomial:Na,oneHot:Ba,pad:ja,pad1d:Fa,pad2d:Ya,pad3d:$a,pad4d:za,rand:Va,randomNormal:Ha,randomUniform:qa,reshape:Wa,spaceToBatchND:Ua,squeeze:Ga,stack:Ka,tile:Xa,truncatedNormal:Ja,unstack:Za,setdiff1dAsync:Qa,fill:Ae,linspace:function(t,e,n){if(0===n)throw new Error("Cannot request zero samples");var r=(e-t)/(n-1),i=J(n,"float32");i[0]=t;for(var a=1;a<i.length;a++)i[a]=i[a-1]+r;return Te(i,"float32")},ones:Oe,range:Ne,scalar:Me,tensor:Ie,tensor1d:Te,tensor2d:De,tensor3d:Re,tensor4d:Pe,tensor5d:function(t,e,n){if(x(t),null!=e&&5!==e.length)throw new Error("tensor5d() requires shape to have five numbers");var r=Vt(t);if(5!==r.length&&1!==r.length)throw new Error("tensor5d() requires values to be number[][][][][] or flat/TypedArray");if(1===r.length&&null==e)throw new Error("tensor5d() requires shape to be provided when `values` are a flat array");return Ie(t,e=e||r,n)},tensor6d:function(t,e,n){if(x(t),null!=e&&6!==e.length)throw new Error("tensor6d() requires shape to have six numbers");var r=Vt(t);if(6!==r.length&&1!==r.length)throw new Error("tensor6d() requires values to be number[][][][][][] or flat/TypedArray");if(1===r.length&&null==e)throw new Error("tensor6d() requires shape to be provided when `values` are a flat array");return Ie(t,e=e||r,n)},zeros:Le,onesLike:Be,zerosLike:je,transpose:Fc,softmax:we,logSoftmax:ke,localResponseNormalization:Yc,norm:$c,gather:Hc,unsortedSegmentSum:qc,basicLSTMCell:Wc,multiRNNCell:Uc,movingAverage:Gc,stridedSlice:Kc,topk:Xc,scatterND:Jc,fft:Zc,ifft:Qc,rfft:tu,irfft:eu,sparseToDense:ru,gatherND:au});var Du=function(){function t(){this.blockSize=48,this.firstUse=!0,zt.get("IS_BROWSER")&&(this.fromPixels2DContext=document.createElement("canvas").getContext("2d"))}return t.prototype.setDataMover=function(t){this.data=new Fe(t)},t.prototype.register=function(t,e,n){if(this.firstUse&&(this.firstUse=!1,zt.get("IS_NODE")&&Jt("\n============================\nHi there 👋. Looks like you are running TensorFlow.js in Node.js. To speed things up dramatically, install our node backend, which binds to TensorFlow C++, by running npm i @tensorflow/tfjs-node, or npm i @tensorflow/tfjs-node-gpu if you have CUDA. Then call require('@tensorflow/tfjs-node'); (-gpu suffix for CUDA) at the start of your program. Visit https://github.com/tensorflow/tfjs-node for more details.\n============================\n")),this.data.has(t))throw new Error("Data buffer is already registered");this.data.set(t,{dtype:n})},t.prototype.write=function(t,e){if(null==e)throw new Error("MathBackendCPU.write(): values can not be null");this.data.get(t).values=e},t.prototype.fromPixels=function(t,e){if(null==t)throw new Error("pixels passed to tf.browser.fromPixels() can not be null");var n,r;if(zt.get("IS_NODE")&&null==t.getContext)throw new Error("When running in node, pixels must be an HTMLCanvasElement like the one returned by the `canvas` npm package");if(null!=t.getContext)n=t.getContext("2d").getImageData(0,0,t.width,t.height).data;else if(t instanceof ImageData)n=t.data;else{if(!(t instanceof HTMLImageElement||t instanceof HTMLVideoElement))throw new Error("pixels passed to tf.browser.fromPixels() must be either an HTMLVideoElement, HTMLImageElement, HTMLCanvasElement or ImageData, but was "+t.constructor.name);if(null==this.fromPixels2DContext)throw new Error("Can't read pixels from HTMLImageElement outside the browser.");this.fromPixels2DContext.canvas.width=t.width,this.fromPixels2DContext.canvas.height=t.height,this.fromPixels2DContext.drawImage(t,0,0,t.width,t.height),n=this.fromPixels2DContext.getImageData(0,0,t.width,t.height).data}if(4===e)r=new Int32Array(n);else{var i=t.width*t.height;r=new Int32Array(i*e);for(var a=0;a<i;a++)for(var o=0;o<e;++o)r[a*e+o]=n[4*a+o]}return Re(r,[t.height,t.width,e],"int32")},t.prototype.read=function(t){return u(this,void 0,void 0,function(){return l(this,function(e){return[2,this.readSync(t)]})})},t.prototype.readSync=function(t){var e=this.data.get(t),n=e.dtype,r=e.complexTensors;return"complex64"===n?ze(r.real.dataSync(),r.imag.dataSync()):this.data.get(t).values},t.prototype.disposeData=function(t){if(this.data.has(t)){var e=this.data.get(t).complexTensors;null!=e&&(e.real.dispose(),e.imag.dispose()),this.data.delete(t)}},t.prototype.time=function(t){return u(this,void 0,void 0,function(){var e;return l(this,function(n){return e=Z(),t(),[2,{kernelMs:Z()-e}]})})},t.prototype.memory=function(){return{unreliable:!0,reasons:["The reported memory is an upper bound. Due to automatic garbage collection, the true allocated memory may be less."]}},t.prototype.complex=function(t,e){var n=ht.make(t.shape,{},"complex64");return this.data.get(n.dataId).complexTensors={real:zt.engine.keep(t.clone()),imag:zt.engine.keep(e.clone())},n},t.prototype.real=function(t){return this.data.get(t.dataId).complexTensors.real.clone()},t.prototype.imag=function(t){return this.data.get(t.dataId).complexTensors.imag.clone()},t.prototype.assertNotComplex=function(t,e){Array.isArray(t)||(t=[t]),t.forEach(function(t){null!=t&&b("complex64"!==t.dtype,function(){return e+" does not support complex64 tensors."})})},t.prototype.slice=function(t,e,n){if(this.assertNotComplex(t,"slice"),be(t.shape,e,n)){var r=ye(e,t.strides),i=k(n);return Ie(t.dataSync().subarray(r,r+i),n,t.dtype)}for(var a=Ma(n,t.dtype),o=t.bufferSync(),s=0;s<a.size;++s){var c=a.indexToLoc(s).map(function(t,n){return t+e[n]});a.values[s]=o.get.apply(o,c)}return a.toTensor()},t.prototype.stridedSlice=function(t,e,n,r,i,a,o,s,c){this.assertNotComplex(t,"stridedSlice");var u=ve(t.shape,e,n,r,i,a,o,s,c),l=u[0],d=u[1],f=u[2],h=d.filter(function(t,e){return-1===f.indexOf(e)});if(h.some(function(t){return 0===t}))return Ie([],h);for(var p=Ma(d,t.dtype),m=t.bufferSync(),v=0;v<p.size;v++){for(var _=p.indexToLoc(v),g=new Array(_.length),b=0;b<g.length;b++)g[b]=_[b]*r[b]+l[b];p.set.apply(p,[m.get.apply(m,g)].concat(_))}return p.toTensor().reshape(h)},t.prototype.unstack=function(t,e){for(var n=t.shape[e],r=new Array(t.rank-1),i=0,a=0;a<t.rank;a++)a!==e&&(r[i++]=t.shape[a]);var o=new Array(t.rank).fill(0),s=t.shape.slice();s[e]=1;var c=new Array(n);for(a=0;a<c.length;a++)o[e]=a,c[a]=this.slice(t,o,s).reshape(r);return c},t.prototype.reverse=function(t,e){this.assertNotComplex(t,"reverse");for(var n=Ma(t.shape,t.dtype),r=t.bufferSync(),i=function(i){var a=n.indexToLoc(i),o=a.slice();e.forEach(function(e){return o[e]=t.shape[e]-1-o[e]}),n.set.apply(n,[r.get.apply(r,o)].concat(a))},a=0;a<n.size;a++)i(a);return n.toTensor()},t.prototype.concat=function(t,e){this.assertNotComplex(t,"concat");var n=t.map(function(t){var n=k(t.shape.slice(e));return t.as2D(-1,n)}),r=le(n.map(function(t){return t.shape}),1),i=Ma(r,t[0].dtype).values;if(1===n[0].shape[0]){var a=0;n.forEach(function(t){i.set(t.dataSync(),a),a+=t.size})}else{var o=0;n.forEach(function(t){for(var e=t.dataSync(),n=0,a=0;a<t.shape[0];++a)for(var s=a*r[1]+o,c=0;c<t.shape[1];++c)i[s+c]=e[n++];o+=t.shape[1]})}var s=le(t.map(function(t){return t.shape}),e);return Ie(i,s,t[0].dtype)},t.prototype.neg=function(t){return this.assertNotComplex(t,"neg"),this.multiply(Me(-1),t)},t.prototype.add=function(t,e){return"complex64"===t.dtype||"complex64"===e.dtype?this.broadcastedBinaryComplexOp(t.cast("complex64"),e.cast("complex64"),function(t,e,n,r){return{real:t+n,imag:e+r}}):this.broadcastedBinaryOp(t,e,wt(t.dtype,e.dtype),function(t,e){return t+e})},t.prototype.addN=function(t){this.assertNotComplex(t,"addN");for(var e=t.map(function(t){return t.dataSync()}),n=Ma(t[0].shape,t[0].dtype),r=n.values,i=0;i<t.length;i++)for(var a=e[i],o=0;o<r.length;o++)r[o]+=a[o];return n.toTensor()},t.prototype.subtract=function(t,e){return"complex64"===t.dtype||"complex64"===e.dtype?this.broadcastedBinaryComplexOp(t.cast("complex64"),e.cast("complex64"),function(t,e,n,r){return{real:t-n,imag:e-r}}):this.broadcastedBinaryOp(t,e,wt(t.dtype,e.dtype),function(t,e){return t-e})},t.prototype.pow=function(t,e){return this.assertNotComplex([t,e],"pow"),this.broadcastedBinaryOp(t,e,t.dtype,function(t,e){return Math.pow(t,e)})},t.prototype.batchMatMul=function(t,e,n,r){this.assertNotComplex([t,e],"matMul");for(var i=n?t.shape[1]:t.shape[2],a=n?t.shape[2]:t.shape[1],o=r?e.shape[1]:e.shape[2],s=t.shape[0],c=t.dataSync(),u=e.dataSync(),l=n?[t.strides[0],1,t.strides[1]]:[t.strides[0],t.strides[1],1],d=l[0],f=l[1],h=l[2],p=r?[1,e.strides[1],e.strides[0]]:[e.strides[1],1,e.strides[0]],m=p[0],v=p[1],_=p[2],g=a*o,b=Ma([s,a,o],t.dtype),y=b.values,x=this.blockSize,w=0;w<s;w++)for(var k=0;k<a;k+=x)for(var C=0;C<o;C+=x)for(var E=0;E<i;E+=x)for(var S=Math.min(k+x,a),I=Math.min(C+x,o),M=Math.min(E+x,i),T=k;T<S;T++)for(var D=C;D<I;D++){for(var R=0,P=E;P<M;P++)R+=c[w*d+T*f+P*h]*u[P*m+D*v+w*_];y[w*g+(T*o+D)]+=R}return b.toTensor()},t.prototype.fusedBatchMatMul=function(t,e,n,r,i,a){var o=this.batchMatMul(t,e,n,r);return i&&(o=this.add(o,i)),a&&(o=function(t,e,n){if("linear"===e)return t.linear(n);if("relu"===e)return t.relu(n);throw new Error("Activation "+e+" has not been implemented for the CPU backend.")}(this,a,o)),o},t.prototype.multiply=function(t,e){return"complex64"===t.dtype||"complex64"===e.dtype?this.broadcastedBinaryComplexOp(t.cast("complex64"),e.cast("complex64"),function(t,e,n,r){return{real:t*n-e*r,imag:t*r+e*n}}):this.broadcastedBinaryOp(t,e,wt(t.dtype,e.dtype),function(t,e){return t*e})},t.prototype.realDivide=function(t,e){return this.assertNotComplex([t,e],"realDivide"),this.broadcastedBinaryOp(t,e,"float32",function(t,e){return t/e})},t.prototype.floorDiv=function(t,e){return this.assertNotComplex([t,e],"floorDiv"),this.broadcastedBinaryOp(t,e,"int32",function(t,e){return Math.floor(t/e)})},t.prototype.sum=function(t,e){this.assertNotComplex(t,"sum"),oe("sum",e,t.rank);for(var n=ie(t.shape,e),r=n[0],i=n[1],a=Le(r,wt(t.dtype,"int32")),o=k(i),s=a.dataSync(),c=t.dataSync(),u=0;u<s.length;++u){for(var l=u*o,d=0,f=0;f<o;++f)d+=c[l+f];s[u]=d}return a},t.prototype.prod=function(t,e){this.assertNotComplex(t,"sum");for(var n=ie(t.shape,e),r=n[0],i=n[1],a=Le(r,wt(t.dtype,"int32")),o=k(i),s=a.dataSync(),c=t.dataSync(),u=0;u<s.length;++u){for(var l=u*o,d=1,f=0;f<o;++f)d*=c[l+f];s[u]=d}return a},t.prototype.unsortedSegmentSum=function(t,e,n){this.assertNotComplex(t,"unsortedSegmentSum");for(var r=[],i=t.rank-e.rank,a=0;a<i;++a)e=e.expandDims(a+1);for(a=0;a<n;++a){var o=Me(a,"int32"),s=Ks(o,e).asType("float32").mul(t).sum(0);r.push(s)}return Ka(r)},t.prototype.argMin=function(t,e){this.assertNotComplex(t,"argMin");var n=[e];oe("argMin",n,t.rank);for(var r=ie(t.shape,n),i=r[0],a=r[1],o=Le(i,"int32"),s=k(a),c=o.dataSync(),u=t.dataSync(),l=0;l<c.length;++l){for(var d=l*s,f=u[d],h=0,p=0;p<s;++p){var m=u[d+p];m<f&&(f=m,h=p)}c[l]=h}return o},t.prototype.argMax=function(t,e){this.assertNotComplex(t,"argMax");var n=[e];oe("argMax",n,t.rank);for(var r=ie(t.shape,n),i=r[0],a=r[1],o=Le(i,"int32"),s=k(a),c=o.dataSync(),u=t.dataSync(),l=0;l<c.length;++l){for(var d=l*s,f=u[d],h=0,p=0;p<s;++p){var m=u[d+p];m>f&&(f=m,h=p)}c[l]=h}return o},t.prototype.cumsum=function(t,e,n,r){if(this.assertNotComplex(t,"cumsum"),e!==t.rank-1)throw new Error("backend.cumsum in CPU expects an inner-most axis="+(t.rank-1)+" but got axis="+e);for(var i=wt(t.dtype,"int32"),a=Le(t.shape,i),o=a.dataSync(),s=t.dataSync(),c=t.shape[t.rank-1],u=r?function(t,e){return t+c-e-1}:function(t,e){return t+e},l=0;l<s.length;l+=c)for(var d=0;d<c;d++){var f=u(l,d);if(0===d)o[f]=n?0:s[f];else{var h=u(l,d-1);o[f]=n?s[h]+o[h]:s[f]+o[h]}}return a},t.prototype.equal=function(t,e){return this.assertNotComplex([t,e],"equal"),this.broadcastedBinaryOp(t,e,"bool",function(t,e){return t===e?1:0})},t.prototype.notEqual=function(t,e){return this.assertNotComplex([t,e],"notEqual"),this.broadcastedBinaryOp(t,e,"bool",function(t,e){return t!==e?1:0})},t.prototype.less=function(t,e){return this.assertNotComplex([t,e],"less"),this.broadcastedBinaryOp(t,e,"bool",function(t,e){return t<e?1:0})},t.prototype.lessEqual=function(t,e){return this.assertNotComplex([t,e],"lessEqual"),this.broadcastedBinaryOp(t,e,"bool",function(t,e){return t<=e?1:0})},t.prototype.greater=function(t,e){return this.assertNotComplex([t,e],"greater"),this.broadcastedBinaryOp(t,e,"bool",function(t,e){return t>e?1:0})},t.prototype.greaterEqual=function(t,e){return this.assertNotComplex([t,e],"greaterEqual"),this.broadcastedBinaryOp(t,e,"bool",function(t,e){return t>=e?1:0})},t.prototype.logicalNot=function(t){this.assertNotComplex(t,"logicalNot");for(var e=t.dataSync(),n=new Uint8Array(e.length),r=0;r<e.length;++r)n[r]=e[r]?0:1;return ht.make(t.shape,{values:n},"bool")},t.prototype.logicalAnd=function(t,e){return this.assertNotComplex([t,e],"logicalAnd"),this.broadcastedBinaryOp(t,e,"bool",function(t,e){return t&&e})},t.prototype.logicalOr=function(t,e){return this.assertNotComplex([t,e],"logicalOr"),this.broadcastedBinaryOp(t,e,"bool",function(t,e){return t||e})},t.prototype.select=function(t,e,n){this.assertNotComplex([t,e,n],"select");for(var r=t.dataSync(),i=e.dataSync(),a=n.dataSync(),o=Le(e.shape,wt(e.dtype,n.dtype)),s=o.dataSync(),c=0,u=0===t.rank||t.rank>1||1===e.rank?1:e.shape[1],l=0;l<r.length;l++)for(var d=0;d<u;d++)1===r[l]?s[c++]=i[l]:s[c++]=a[l];return o},t.prototype.where=function(t){this.assertNotComplex([t],"where");var e=t.dataSync();return to(t.shape,e)},t.prototype.topk=function(t,e,n){return this.assertNotComplex(t,"topk"),Ke(t.dataSync(),t.shape,t.dtype,e)},t.prototype.min=function(t,e){this.assertNotComplex(t,"min"),oe("min",e,t.rank);for(var n=ie(t.shape,e),r=n[0],i=n[1],a=Le(r,t.dtype),o=k(i),s=a.dataSync(),c=t.dataSync(),u=0;u<s.length;++u){for(var l=u*o,d=c[l],f=0;f<o;++f){var h=c[l+f];h<d&&(d=h)}s[u]=d}return a},t.prototype.minimum=function(t,e){return this.assertNotComplex([t,e],"minimum"),this.broadcastedBinaryOp(t,e,t.dtype,function(t,e){return Math.min(t,e)})},t.prototype.mod=function(t,e){return this.assertNotComplex([t,e],"mod"),this.broadcastedBinaryOp(t,e,t.dtype,function(t,e){var n=t%e;return t<0&&e<0||t>=0&&e>=0?n:(n+e)%e})},t.prototype.max=function(t,e){this.assertNotComplex(t,"max"),oe("max",e,t.rank);for(var n=ie(t.shape,e),r=n[0],i=n[1],a=Le(r,t.dtype),o=k(i),s=a.dataSync(),c=t.dataSync(),u=0;u<s.length;++u){for(var l=u*o,d=c[l],f=0;f<o;++f){var h=c[l+f];h>d&&(d=h)}s[u]=d}return a},t.prototype.maximum=function(t,e){return this.assertNotComplex([t,e],"maximum"),this.broadcastedBinaryOp(t,e,t.dtype,function(t,e){return Math.max(t,e)})},t.prototype.all=function(t,e){this.assertNotComplex(t,"all"),oe("all",e,t.rank);for(var n=ie(t.shape,e),r=n[0],i=n[1],a=Le(r,t.dtype),o=k(i),s=a.dataSync(),c=t.dataSync(),u=0;u<s.length;++u){for(var l=u*o,d=c[l],f=0;f<o;++f){var h=c[l+f];d=d&&h}s[u]=d}return a},t.prototype.any=function(t,e){this.assertNotComplex(t,"any"),oe("any",e,t.rank);for(var n=ie(t.shape,e),r=n[0],i=n[1],a=Le(r,t.dtype),o=k(i),s=a.dataSync(),c=t.dataSync(),u=0;u<s.length;++u){for(var l=u*o,d=c[l],f=0;f<o;++f){var h=c[l+f];d=d||h}s[u]=d}return a},t.prototype.squaredDifference=function(t,e){return this.assertNotComplex([t,e],"squaredDifference"),this.broadcastedBinaryOp(t,e,t.dtype,function(t,e){var n=t-e;return n*n})},t.prototype.ceil=function(t){this.assertNotComplex(t,"ceil");for(var e=t.dataSync(),n=new Float32Array(e.length),r=0;r<e.length;++r)n[r]=Math.ceil(e[r]);return ht.make(t.shape,{values:n})},t.prototype.floor=function(t){this.assertNotComplex(t,"floor");for(var e=t.dataSync(),n=new Float32Array(e.length),r=0;r<e.length;++r)n[r]=Math.floor(e[r]);return ht.make(t.shape,{values:n})},t.prototype.sign=function(t){this.assertNotComplex(t,"x");for(var e=t.dataSync(),n=new Float32Array(e.length),r=0;r<e.length;++r)e[r]<0?n[r]=-1:e[r]>0?n[r]=1:n[r]=0;return ht.make(t.shape,{values:n})},t.prototype.isNaN=function(t){this.assertNotComplex(t,"x");for(var e=t.dataSync(),n=new Uint8Array(e.length),r=0;r<e.length;++r)Number.isNaN(e[r])&&(n[r]=1);return ht.make(t.shape,{values:n},"bool")},t.prototype.isInf=function(t){this.assertNotComplex(t,"x");for(var e=t.dataSync(),n=new Uint8Array(e.length),r=0;r<e.length;++r)Math.abs(e[r])===1/0&&(n[r]=1);return ht.make(t.shape,{values:n},"bool")},t.prototype.isFinite=function(t){this.assertNotComplex(t,"x");for(var e=t.dataSync(),n=new Uint8Array(e.length),r=0;r<e.length;++r)Number.isFinite(e[r])&&(n[r]=1);return ht.make(t.shape,{values:n},"bool")},t.prototype.round=function(t){this.assertNotComplex(t,"round");for(var e=t.dataSync(),n=new Float32Array(e.length),r=0;r<e.length;++r){var i=Math.floor(e[r]);e[r]-i<.5?n[r]=Math.floor(e[r]):e[r]-i>.5?n[r]=Math.ceil(e[r]):n[r]=i%2==0?i:i+1}return ht.make(t.shape,{values:n})},t.prototype.exp=function(t){this.assertNotComplex(t,"exp");for(var e=t.dataSync(),n=new Float32Array(e.length),r=0;r<e.length;++r)n[r]=Math.exp(e[r]);return ht.make(t.shape,{values:n})},t.prototype.expm1=function(t){this.assertNotComplex(t,"expm1");for(var e=t.dataSync(),n=new Float32Array(e.length),r=0;r<e.length;++r)n[r]=Math.expm1(e[r]);return ht.make(t.shape,{values:n})},t.prototype.log=function(t){this.assertNotComplex(t,"log");for(var e=t.dataSync(),n=new Float32Array(e.length),r=0;r<e.length;++r){var i=e[r];n[r]=Math.log(i)}return ht.make(t.shape,{values:n})},t.prototype.log1p=function(t){this.assertNotComplex(t,"log1p");for(var e=t.dataSync(),n=new Float32Array(e.length),r=0;r<e.length;++r){var i=e[r];n[r]=Math.log1p(i)}return ht.make(t.shape,{values:n})},t.prototype.sqrt=function(t){this.assertNotComplex(t,"sqrt");for(var e=t.dataSync(),n=new Float32Array(e.length),r=0;r<e.length;++r){var i=e[r];n[r]=Math.sqrt(i)}return ht.make(t.shape,{values:n})},t.prototype.rsqrt=function(t){this.assertNotComplex(t,"rsqrt");for(var e=t.dataSync(),n=new Float32Array(e.length),r=0;r<e.length;++r){var i=e[r];n[r]=1/Math.sqrt(i)}return ht.make(t.shape,{values:n})},t.prototype.square=function(t){this.assertNotComplex(t,"square");for(var e=t.dataSync(),n=new Float32Array(e.length),r=0;r<e.length;++r){var i=e[r];n[r]=i*i}return ht.make(t.shape,{values:n})},t.prototype.reciprocal=function(t){this.assertNotComplex(t,"reciprocal");for(var e=t.dataSync(),n=new Float32Array(e.length),r=0;r<e.length;++r)n[r]=1/e[r];return ht.make(t.shape,{values:n})},t.prototype.linear=function(t){return t},t.prototype.relu=function(t){this.assertNotComplex(t,"relu");for(var e=Le(t.shape,t.dtype),n=e.dataSync(),r=t.dataSync(),i=0;i<r.length;++i)n[i]=Math.max(0,r[i]);return e},t.prototype.prelu=function(t,e){return this.assertNotComplex([t,e],"prelu"),this.broadcastedBinaryOp(t,e,t.dtype,function(t,e){return t<0?e*t:t})},t.prototype.elu=function(t){this.assertNotComplex(t,"elu");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r){var i=n[r];e[r]=i>=0?i:Math.exp(i)-1}return ht.make(t.shape,{values:e})},t.prototype.eluDer=function(t,e){this.assertNotComplex([t,e],"eluDer");for(var n=new Float32Array(e.size),r=e.dataSync(),i=t.dataSync(),a=0;a<r.length;++a){var o=r[a];n[a]=o>=1?i[a]:i[a]*(o+1)}return ht.make(e.shape,{values:n})},t.prototype.selu=function(t){this.assertNotComplex(t,"selu");for(var e=Ki,n=Xi,r=new Float32Array(t.size),i=t.dataSync(),a=0;a<i.length;++a){var o=i[a];r[a]=o>=0?n*o:e*(Math.exp(o)-1)}return ht.make(t.shape,{values:r})},t.prototype.clip=function(t,e,n){this.assertNotComplex(t,"clip");for(var r=new Float32Array(t.size),i=t.dataSync(),a=0;a<i.length;++a){var o=i[a];r[a]=o>n?n:o<e?e:o}return ht.make(t.shape,{values:r})},t.prototype.abs=function(t){for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=Math.abs(n[r]);return ht.make(t.shape,{values:e})},t.prototype.complexAbs=function(t){for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<t.size;++r){var i=n[2*r],a=n[2*r+1];e[r]=Math.hypot(i,a)}return ht.make(t.shape,{values:e})},t.prototype.int=function(t){this.assertNotComplex(t,"int");for(var e=new Int32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=n[r];return ht.make(t.shape,{values:e},"int32")},t.prototype.sigmoid=function(t){this.assertNotComplex(t,"sigmoid");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=1/(1+Math.exp(-n[r]));return ht.make(t.shape,{values:e})},t.prototype.softplus=function(t){this.assertNotComplex(t,"softplus");for(var e=Math.log(1.1920928955078125e-7)+2,n=new Float32Array(t.size),r=t.dataSync(),i=0;i<r.length;++i){var a,o=r[i]>-e,s=r[i]<e,c=Math.exp(r[i]);a=s?c:o?r[i]:Math.log(1+c),n[i]=a}return ht.make(t.shape,{values:n})},t.prototype.sin=function(t){this.assertNotComplex(t,"sin");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=Math.sin(n[r]);return ht.make(t.shape,{values:e})},t.prototype.cos=function(t){this.assertNotComplex(t,"cos");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=Math.cos(n[r]);return ht.make(t.shape,{values:e})},t.prototype.tan=function(t){this.assertNotComplex(t,"tan");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=Math.tan(n[r]);return ht.make(t.shape,{values:e})},t.prototype.asin=function(t){this.assertNotComplex(t,"asin");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=Math.asin(n[r]);return ht.make(t.shape,{values:e})},t.prototype.acos=function(t){this.assertNotComplex(t,"acos");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=Math.acos(n[r]);return ht.make(t.shape,{values:e})},t.prototype.atan=function(t){this.assertNotComplex(t,"atan");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=Math.atan(n[r]);return ht.make(t.shape,{values:e})},t.prototype.atan2=function(t,e){return this.assertNotComplex([t,e],"atan2"),this.broadcastedBinaryOp(t,e,t.dtype,function(t,e){return Math.atan2(t,e)})},t.prototype.sinh=function(t){this.assertNotComplex(t,"sinh");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=Math.sinh(n[r]);return ht.make(t.shape,{values:e})},t.prototype.cosh=function(t){this.assertNotComplex(t,"cosh");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=Math.cosh(n[r]);return ht.make(t.shape,{values:e})},t.prototype.tanh=function(t){this.assertNotComplex(t,"tanh");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=S(n[r]);return ht.make(t.shape,{values:e})},t.prototype.asinh=function(t){this.assertNotComplex(t,"asinh");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=Math.asinh(n[r]);return ht.make(t.shape,{values:e})},t.prototype.acosh=function(t){this.assertNotComplex(t,"acosh");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=Math.acosh(n[r]);return ht.make(t.shape,{values:e})},t.prototype.atanh=function(t){this.assertNotComplex(t,"atanh");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r)e[r]=Math.atanh(n[r]);return ht.make(t.shape,{values:e})},t.prototype.erf=function(t){this.assertNotComplex(t,"erf");for(var e=new Float32Array(t.size),n=t.dataSync(),r=0;r<n.length;++r){var i=n[r],a=1/(1+.3275911*i);e[r]=1-((((1.061405429*a-1.453152027)*a+1.421413741)*a-.284496736)*a+.254829592)*a*Math.exp(-i*i)}return ht.make(t.shape,{values:e})},t.prototype.step=function(t,e){void 0===e&&(e=0),this.assertNotComplex(t,"step");for(var n=new Float32Array(t.size),r=t.dataSync(),i=0;i<r.length;++i){var a=r[i];isNaN(a)?n[i]=NaN:n[i]=a>0?1:e}return ht.make(t.shape,{values:n})},t.prototype.conv2d=function(t,e,n){this.assertNotComplex([t,e],"conv2d");for(var r=n.filterHeight,i=n.filterWidth,a=n.dilationHeight,o=n.dilationWidth,s=n.padInfo.left,c=n.padInfo.top,u=Ma(n.outShape,t.dtype),l=t.dataSync(),d=e.dataSync(),f=u.values,h=0;h<n.batchSize;++h)for(var p=h*t.strides[0],m=h*u.strides[0],v=0;v<n.outHeight;++v)for(var _=m+v*u.strides[1],g=v*n.strideHeight-s,b=0;b<r;b++){var y=g+b*a;if(!(y<0||y>=n.inHeight))for(var x=b*e.strides[0],w=p+y*t.strides[1],k=0;k<n.outWidth;++k)for(var C=_+k*n.outChannels,E=k*n.strideWidth-c,S=0;S<i;S++){var I=E+S*o;if(!(I<0||I>=n.inWidth))for(var M=x+S*e.strides[1],T=w+I*n.inChannels,D=M,R=0;R<n.inChannels;++R){for(var P=l[T+R],O=0;O<n.outChannels;++O)f[C+O]+=P*d[D+O];D+=n.outChannels}}}return u.toTensor()},t.prototype.conv3d=function(t,e,n){for(var r=n.filterDepth,i=n.filterHeight,a=n.filterWidth,o=n.dilationDepth,s=n.dilationHeight,c=n.dilationWidth,u=n.padInfo.front,l=n.padInfo.left,d=n.padInfo.top,f=Ma(n.outShape,t.dtype),h=t.dataSync(),p=e.dataSync(),m=f.values,v=0;v<n.batchSize;++v)for(var _=v*t.strides[0],g=v*f.strides[0],b=0;b<n.outDepth;++b)for(var y=g+b*f.strides[1],x=b*n.strideDepth-u,w=0;w<r;w++){var k=x+w*o;if(!(k<0||k>=n.inDepth))for(var C=w*e.strides[0],E=_+k*t.strides[1],S=0;S<n.outHeight;++S)for(var I=y+S*f.strides[2],M=S*n.strideHeight-d,T=0;T<i;T++){var D=M+T*s;if(!(D<0||D>=n.inHeight))for(var R=C+T*e.strides[1],P=E+D*t.strides[2],O=0;O<n.outWidth;++O)for(var L=I+O*n.outChannels,A=O*n.strideWidth-l,N=0;N<a;N++){var B=A+N*c;if(!(B<0||B>=n.inWidth))for(var j=R+N*e.strides[2],F=P+B*n.inChannels,Y=j,$=0;$<n.inChannels;++$){for(var z=h[F+$],V=0;V<n.outChannels;++V)m[L+V]+=z*p[Y+V];Y+=n.outChannels}}}}return f.toTensor()},t.prototype.conv2dDerInput=function(t,e,n){this.assertNotComplex([t,e],"conv2dDerInput");for(var r=Ma(n.inShape,"float32"),i=r.values,a=r.strides,o=a[0],s=a[1],c=a[2],u=t.dataSync(),l=t.strides,d=l[0],f=l[1],h=l[2],p=e.dataSync(),m=e.strides,v=m[0],_=m[1],g=m[2],b=n.batchSize,y=n.filterHeight,x=n.filterWidth,w=n.inChannels,k=n.inHeight,C=n.inWidth,E=n.outChannels,S=n.outHeight,I=n.outWidth,M=n.strideHeight,T=n.strideWidth,D=y-1-n.padInfo.top,R=x-1-n.padInfo.left,P=0;P<b;++P)for(var O=0;O<w;++O)for(var L=0;L<k;++L)for(var A=L-D,N=Math.max(0,Math.ceil(A/M)),B=Math.min(S,(y+A)/M),j=0;j<C;++j){for(var F=j-R,Y=Math.max(0,Math.ceil(F/T)),$=Math.min(I,(x+F)/T),z=0,V=N;V<B;++V)for(var H=V*M-A,q=Y;q<$;++q)for(var W=d*P+f*V+h*q,U=v*(y-1-H)+_*(x-1-(q*T-F))+g*O,G=0;G<E;++G)z+=u[W+G]*p[U+G];i[o*P+s*L+c*j+O]=z}return r.toTensor()},t.prototype.conv3dDerInput=function(t,e,n){for(var r=Ma(n.inShape,"float32"),i=r.values,a=r.strides,o=a[0],s=a[1],c=a[2],u=a[3],l=t.dataSync(),d=t.strides,f=d[0],h=d[1],p=d[2],m=d[3],v=e.dataSync(),_=e.strides,g=_[0],b=_[1],y=_[2],x=_[3],w=n.batchSize,k=n.filterDepth,C=n.filterHeight,E=n.filterWidth,S=n.inChannels,I=n.inDepth,M=n.inHeight,T=n.inWidth,D=n.outChannels,R=n.outDepth,P=n.outHeight,O=n.outWidth,L=n.strideDepth,A=n.strideHeight,N=n.strideWidth,B=k-1-n.padInfo.front,j=C-1-n.padInfo.top,F=E-1-n.padInfo.left,Y=0;Y<w;++Y)for(var $=0;$<S;++$)for(var z=0;z<I;++z)for(var V=z-B,H=Math.max(0,Math.ceil(V/L)),q=Math.min(R,(k+V)/L),W=0;W<M;++W)for(var U=W-j,G=Math.max(0,Math.ceil(U/A)),K=Math.min(P,(C+U)/A),X=0;X<T;++X){for(var J=X-F,Z=Math.max(0,Math.ceil(J/N)),Q=Math.min(O,(E+J)/N),tt=0,et=H;et<q;++et)for(var nt=et*L-V,rt=G;rt<K;++rt)for(var it=rt*A-U,at=Z;at<Q;++at)for(var ot=f*Y+h*et+p*rt+m*at,st=g*(k-1-nt)+b*(C-1-it)+y*(E-1-(at*N-J))+x*$,ct=0;ct<D;++ct)tt+=l[ot+ct]*v[st+ct];i[o*Y+s*z+c*W+u*X+$]=tt}return r.toTensor()},t.prototype.conv2dDerFilter=function(t,e,n){this.assertNotComplex([t,e],"conv2dDerFilter");for(var r=n.strideHeight,i=n.strideWidth,a=n.filterHeight,o=n.filterWidth,s=Ma(n.filterShape,"float32"),c=n.padInfo.left,u=n.padInfo.top,l=t.bufferSync(),d=e.bufferSync(),f=0;f<a;++f)for(var h=Math.max(0,Math.ceil((u-f)/r)),p=Math.min(n.outHeight,(n.inHeight+u-f)/r),m=0;m<o;++m)for(var v=Math.max(0,Math.ceil((c-m)/i)),_=Math.min(n.outWidth,(n.inWidth+c-m)/i),g=0;g<n.inChannels;++g)for(var b=0;b<n.outChannels;++b){for(var y=0,x=0;x<n.batchSize;++x)for(var w=h;w<p;++w)for(var k=f+w*r-u,C=v;C<_;++C){var E=m+C*i-c;y+=l.get(x,k,E,g)*d.get(x,w,C,b)}s.set(y,f,m,g,b)}return s.toTensor()},t.prototype.conv3dDerFilter=function(t,e,n){for(var r=n.strideDepth,i=n.strideHeight,a=n.strideWidth,o=n.filterDepth,s=n.filterHeight,c=n.filterWidth,u=Ma(n.filterShape,"float32"),l=u.values,d=u.strides,f=d[0],h=d[1],p=d[2],m=d[3],v=e.dataSync(),_=e.strides,g=_[0],b=_[1],y=_[2],x=_[3],w=t.dataSync(),k=t.strides,C=k[0],E=k[1],S=k[2],I=k[3],M=n.padInfo.front,T=n.padInfo.left,D=n.padInfo.top,R=0;R<o;++R)for(var P=Math.max(0,Math.ceil((M-R)/r)),O=Math.min(n.outDepth,(n.inDepth+M-R)/r),L=R*f,A=0;A<s;++A)for(var N=Math.max(0,Math.ceil((D-A)/i)),B=Math.min(n.outHeight,(n.inHeight+D-A)/i),j=A*h+L,F=0;F<c;++F)for(var Y=Math.max(0,Math.ceil((T-F)/a)),$=Math.min(n.outWidth,(n.inWidth+T-F)/a),z=F*p+j,V=0;V<n.inChannels;++V)for(var H=V*m+z,q=0;q<n.outChannels;++q){for(var W=0,U=0;U<n.batchSize;++U)for(var G=U*C,K=U*g,X=P;X<O;++X)for(var J=(R+X*r-M)*E+G,Z=X*b+K,Q=N;Q<B;++Q)for(var tt=(A+Q*i-D)*S+J,et=Q*y+Z,nt=Y;nt<$;++nt){var rt=nt*x+et;W+=w[(F+nt*a-T)*I+tt+V]*v[rt+q]}l[H+q]=W}return u.toTensor()},t.prototype.depthwiseConv2D=function(t,e,n){this.assertNotComplex([t,e],"depthwiseConv2D");for(var r=n.filterHeight,i=n.filterWidth,a=n.dilationHeight,o=n.dilationWidth,s=n.padInfo.left,c=n.padInfo.top,u=n.outChannels/n.inChannels,l=Ma(n.outShape,t.dtype),d=t.dataSync(),f=e.dataSync(),h=l.values,p=0;p<n.batchSize;++p)for(var m=p*t.strides[0],v=p*l.strides[0],_=0;_<n.outHeight;++_)for(var g=v+_*l.strides[1],b=_*n.strideHeight-s,y=0;y<r;++y){var x=b+y*a;if(!(x<0||x>=n.inHeight))for(var w=y*e.strides[0],k=m+x*t.strides[1],C=0;C<n.outWidth;++C)for(var E=g+C*l.strides[2],S=C*n.strideWidth-c,I=0;I<i;++I){var M=S+I*o;if(!(M<0||M>=n.inWidth))for(var T=w+I*e.strides[1],D=k+M*n.inChannels,R=E,P=T,O=0;O<n.inChannels;++O){for(var L=d[D+O],A=0;A<u;++A)h[R+A]+=L*f[P+A];R+=u,P+=u}}}return l.toTensor()},t.prototype.depthwiseConv2DDerInput=function(t,e,n){this.assertNotComplex([t,e],"depthwiseConv2DDerInput");for(var r=Ma(n.inShape,"float32"),i=r.values,a=r.strides,o=a[0],s=a[1],c=a[2],u=t.dataSync(),l=t.strides,d=l[0],f=l[1],h=l[2],p=e.dataSync(),m=e.strides,v=m[0],_=m[1],g=m[2],b=n.batchSize,y=n.filterHeight,x=n.filterWidth,w=n.inChannels,k=n.inHeight,C=n.inWidth,E=n.outChannels,S=n.outHeight,I=n.outWidth,M=n.strideHeight,T=n.strideWidth,D=y-1-n.padInfo.top,R=x-1-n.padInfo.left,P=E/w,O=0;O<b;++O)for(var L=0;L<w;++L)for(var A=0;A<k;++A)for(var N=A-D,B=Math.max(0,Math.ceil(N/M)),j=Math.min(S,(y+N)/M),F=0;F<C;++F){for(var Y=F-R,$=Math.max(0,Math.ceil(Y/T)),z=Math.min(I,(x+Y)/T),V=0,H=B;H<j;++H)for(var q=H*M-N,W=$;W<z;++W)for(var U=d*O+f*H+h*W,G=v*(y-1-q)+_*(x-1-(W*T-Y))+g*L,K=0;K<P;++K)V+=u[U+(L*P+K)]*p[G+K];i[o*O+s*A+c*F+L]=V}return r.toTensor()},t.prototype.depthwiseConv2DDerFilter=function(t,e,n){this.assertNotComplex([t,e],"depthwiseConv2DDerFilter");for(var r=n.strideHeight,i=n.strideWidth,a=n.filterHeight,o=n.filterWidth,s=Ma(n.filterShape,"float32"),c=n.padInfo.left,u=n.padInfo.top,l=n.outChannels/n.inChannels,d=t.bufferSync(),f=e.bufferSync(),h=0;h<a;++h)for(var p=Math.max(0,Math.ceil((u-h)/r)),m=Math.min(n.outHeight,(n.inHeight+u-h)/r),v=0;v<o;++v)for(var _=Math.max(0,Math.ceil((c-v)/i)),g=Math.min(n.outWidth,(n.inWidth+c-v)/i),b=0;b<n.outChannels;++b){for(var y=Math.trunc(b/l),x=b%l,w=0,k=0;k<n.batchSize;++k)for(var C=p;C<m;++C)for(var E=h+C*r-u,S=_;S<g;++S){var I=v+S*i-c;w+=d.get(k,E,I,y)*f.get(k,C,S,b)}s.set(w,h,v,y,x)}return s.toTensor()},t.prototype.tile=function(t,e){this.assertNotComplex(t,"tile");for(var n=new Array(t.rank),r=0;r<n.length;r++)n[r]=t.shape[r]*e[r];var i=Ma(n,t.dtype),a=t.bufferSync();for(r=0;r<i.values.length;++r){for(var o=i.indexToLoc(r),s=new Array(t.rank),c=0;c<s.length;c++)s[c]=o[c]%t.shape[c];var u=a.locToIndex(s);i.values[r]=a.values[u]}return i.toTensor()},t.prototype.pad=function(t,e,n){this.assertNotComplex(t,"pad");var r=e.map(function(e,n){return e[0]+t.shape[n]+e[1]}),i=e.map(function(t){return t[0]}),a=t.bufferSync(),o=Ma(r,t.dtype);0!==n&&o.values.fill(n);for(var s=0;s<t.size;s++){var c=a.indexToLoc(s),u=c.map(function(t,e){return t+i[e]});o.set.apply(o,[a.get.apply(a,c)].concat(u))}return o.toTensor()},t.prototype.transpose=function(t,e){this.assertNotComplex(t,"transpose");for(var n=new Array(t.rank),r=0;r<n.length;r++)n[r]=t.shape[e[r]];var i=t.dataSync(),a=Ma(n,t.dtype),o=t.bufferSync();for(r=0;r<t.size;++r){for(var s=o.indexToLoc(r),c=new Array(s.length),u=0;u<c.length;u++)c[u]=s[e[u]];var l=a.locToIndex(c);a.values[l]=i[r]}return a.toTensor()},t.prototype.gather=function(t,e,n){this.assertNotComplex([t,e],"gather");var r=t.shape.slice(),i=e.dataSync();r[n]=i.length;for(var a=Ma(r,t.dtype),o=t.bufferSync(),s=0;s<a.size;++s){var c=a.indexToLoc(s),u=c.slice();u[n]=i[c[n]];var l=o.locToIndex(u);a.values[s]=o.values[l]}return a.toTensor()},t.prototype.batchToSpaceND=function(t,e,n){this.assertNotComplex([t],"batchToSpaceND");var r=e.reduce(function(t,e){return t*e}),i=Zt(t.shape,e,r),a=Qt(i.length,e.length),o=te(t.shape,e,r),s=ee(n,e.length),c=ne(o,n,e.length);return t.reshape(i).transpose(a).reshape(o).slice(s,c)},t.prototype.spaceToBatchND=function(t,e,n){this.assertNotComplex([t],"spaceToBatchND");var r=e.reduce(function(t,e){return t*e}),i=[[0,0]];i.push.apply(i,n);for(var a=1+e.length;a<t.shape.length;++a)i.push([0,0]);var o=t.pad(i),s=Zt(o.shape,e,r,!1),c=Qt(s.length,e.length,!1),u=te(o.shape,e,r,!1);return o.reshape(s).transpose(c).reshape(u)},t.prototype.pool=function(t,e,n){this.assertNotComplex(t,"pool");for(var r=e.strideHeight,i=e.strideWidth,a=e.dilationHeight,o=e.dilationWidth,s=e.effectiveFilterHeight,c=e.effectiveFilterWidth,u=e.padInfo.top,l=e.padInfo.left,d="max"===n?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,f=t.dataSync(),h=Ma(e.outShape,t.dtype),p=h.values,m=e.outShape[1]*e.outShape[2]*e.outShape[3],v=e.outShape[2]*e.outShape[3],_=e.outShape[3],g=0;g<e.batchSize;++g)for(var b=g*m,y=g*t.strides[0],x=0;x<e.inChannels;++x)for(var w=0;w<e.outHeight;++w)for(var k=w*r-u,C=Math.max(0,k),E=Math.min(e.inHeight,s+k),S=b+w*v,I=0;I<e.outWidth;++I){for(var M=I*i-l,T=Math.max(0,M),D=Math.min(e.inWidth,c+M),R=d,P=0,O=0,L=C;L<E;L+=a){for(var A=y+L*t.strides[1],N=T;N<D;N+=o){var B=f[A+N*t.strides[2]+x];"max"===n&&B>R?R=B:"avg"===n&&(P+=B,O++)}if(isNaN(R))break}p[S+I*_+x]="avg"===n?P/O:R}return h.toTensor()},t.prototype.maxPool=function(t,e){return this.pool(t,e,"max")},t.prototype.maxPoolPositions=function(t,e){for(var n=Ma(e.outShape,"int32"),r=e.strideHeight,i=e.strideWidth,a=e.dilationHeight,o=e.dilationWidth,s=e.effectiveFilterHeight,c=e.effectiveFilterWidth,u=e.padInfo.top,l=e.padInfo.left,d=t.bufferSync(),f=0;f<e.batchSize;++f)for(var h=0;h<e.inChannels;++h)for(var p=0;p<e.outHeight;++p){for(var m=p*r-u,v=m;v<0;)v+=a;for(var _=Math.min(e.inHeight,s+m),g=0;g<e.outWidth;++g){for(var b=g*i-l,y=b;y<0;)y+=o;for(var x=Math.min(e.inWidth,c+b),w=Number.NEGATIVE_INFINITY,k=-1,C=v;C<_;C+=a)for(var E=C-m,S=y;S<x;S+=o){var I=S-b,M=d.get(f,C,S,h);M>w&&(w=M,k=E*c+I)}n.set(k,f,p,g,h)}}return n.toTensor()},t.prototype.maxPoolBackprop=function(t,e,n,r){this.assertNotComplex([e,n],"maxPoolBackprop");for(var i=this.maxPoolPositions(e,r),a=r.strideHeight,o=r.strideWidth,s=r.dilationHeight,c=r.dilationWidth,u=r.effectiveFilterHeight,l=r.effectiveFilterWidth,d=l-1-r.padInfo.left,f=u-1-r.padInfo.top,h=Ma(e.shape,"float32"),p=i.bufferSync(),m=t.bufferSync(),v=0;v<r.batchSize;++v)for(var _=0;_<r.inChannels;++_)for(var g=0;g<r.inHeight;++g)for(var b=0;b<r.inWidth;++b){for(var y=g-f,x=b-d,w=0,k=0;k<u;k+=s){var C=(y+k)/a;if(!(C<0||C>=r.outHeight||Math.floor(C)!==C))for(var E=0;E<l;E+=c){var S=(x+E)/o;if(!(S<0||S>=r.outWidth||Math.floor(S)!==S)){var I=u*l-1-p.get(v,C,S,_)===k*l+E?1:0;0!==I&&(w+=m.get(v,C,S,_)*I)}}}h.set(w,v,g,b,_)}return h.toTensor()},t.prototype.avgPoolBackprop=function(t,e,n){this.assertNotComplex([t,e],"avgPoolBackprop");for(var r=n.strideHeight,i=n.strideWidth,a=n.filterHeight,o=n.filterWidth,s=n.dilationHeight,c=n.dilationWidth,u=n.effectiveFilterHeight,l=n.effectiveFilterWidth,d=l-1-n.padInfo.left,f=u-1-n.padInfo.top,h=Ma(e.shape,"float32"),p=1/(a*o),m=t.bufferSync(),v=0;v<n.batchSize;++v)for(var _=0;_<n.inChannels;++_)for(var g=0;g<n.inHeight;++g)for(var b=0;b<n.inWidth;++b){for(var y=g-f,x=b-d,w=0,k=0;k<u;k+=s){var C=(y+k)/r;if(!(C<0||C>=n.outHeight||Math.floor(C)!==C))for(var E=0;E<l;E+=c){var S=(x+E)/i;S<0||S>=n.outWidth||Math.floor(S)!==S||(w+=m.get(v,C,S,_))}}h.set(w*p,v,g,b,_)}return h.toTensor()},t.prototype.cast=function(t,e){return Ye(t,e,this)},t.prototype.reshape=function(t,e){return $e(t,e)},t.prototype.avgPool=function(t,e){return this.assertNotComplex(t,"avgPool"),this.pool(t,e,"avg").toFloat()},t.prototype.resizeBilinear=function(t,e,n,r){this.assertNotComplex(t,"resizeBilinear");for(var i=t.shape,a=i[0],o=i[1],s=i[2],c=i[3],u=t.dataSync(),l=new Float32Array(k([a,e,n,c])),d=[r&&e>1?o-1:o,r&&n>1?s-1:s],f=[r&&e>1?e-1:e,r&&n>1?n-1:n],h=0,p=d[0]/f[0],m=d[1]/f[1],v=0;v<a;v++)for(var _=0;_<e;_++)for(var g=p*_,b=Math.floor(g),y=g-b,x=Math.min(o-1,Math.ceil(g)),w=v*t.strides[0]+b*t.strides[1],C=v*t.strides[0]+x*t.strides[1],E=0;E<n;E++)for(var S=m*E,I=Math.floor(S),M=S-I,T=Math.min(s-1,Math.ceil(S)),D=w+I*t.strides[2],R=C+I*t.strides[2],P=w+ +T*t.strides[2],O=C+T*t.strides[2],L=0;L<c;L++){var A=u[D+L],N=u[R+L],B=A+(u[P+L]-A)*M,j=B+(N+(u[O+L]-N)*M-B)*y;l[h++]=j}return Ie(l,[a,e,n,c])},t.prototype.resizeBilinearBackprop=function(t,e,n){this.assertNotComplex([t,e],"resizeBilinearBackprop");for(var r=e.shape,i=r[0],a=r[1],o=r[2],s=r[3],c=t.shape,u=c[1],l=c[2],d=new Float32Array(i*a*o*s),f=[n&&u>1?a-1:a,n&&l>1?o-1:o],h=[n&&u>1?u-1:u,n&&l>1?l-1:l],p=f[0]/h[0],m=f[1]/h[1],v=t.dataSync(),_=0,g=0;g<i;g++)for(var b=g*e.strides[0],y=0;y<u;y++)for(var x=y*p,w=Math.floor(x),k=Math.min(Math.ceil(x),a-1),C=b+w*e.strides[1],E=b+k*e.strides[1],S=x-w,I=1-S,M=0;M<l;M++)for(var T=M*m,D=Math.floor(T),R=Math.min(Math.ceil(T),o-1),P=T-D,O=1-P,L=C+D*e.strides[2],A=C+R*e.strides[2],N=E+D*e.strides[2],B=E+R*e.strides[2],j=I*O,F=I*P,Y=S*O,$=S*P,z=0;z<s;z++){var V=v[_++];d[L+z]+=V*j,d[A+z]+=V*F,d[N+z]+=V*Y,d[B+z]+=V*$}return Pe(d,[i,o,a,s],e.dtype)},t.prototype.resizeNearestNeighbor=function(t,e,n,r){this.assertNotComplex(t,"resizeNearestNeighbor");for(var i=t.shape,a=i[0],o=i[1],s=i[2],c=i[3],u=t.dataSync(),l=new Float32Array(a*e*n*c),d=[r&&e>1?o-1:o,r&&n>1?s-1:s],f=[r&&e>1?e-1:e,r&&n>1?n-1:n],h=d[0]/f[0],p=d[1]/f[1],m=0,v=0;v<a;v++)for(var _=v*t.strides[0],g=0;g<e;g++)for(var b=h*g,y=_+Math.min(o-1,r?Math.round(b):Math.floor(b))*t.strides[1],x=0;x<n;x++)for(var w=p*x,k=y+Math.min(s-1,r?Math.round(w):Math.floor(w))*t.strides[2],C=0;C<c;C++){var E=u[k+C];l[m++]=E}return Ie(l,[a,e,n,c],t.dtype)},t.prototype.resizeNearestNeighborBackprop=function(t,e,n){this.assertNotComplex([t,e],"resizeNearestNeighborBackprop");for(var r=e.shape,i=r[0],a=r[1],o=r[2],s=r[3],c=t.shape,u=c[1],l=c[2],d=new Float32Array(i*a*o*s),f=t.dataSync(),h=[n&&u>1?a-1:a,n&&l>1?o-1:o],p=[n&&u>1?u-1:u,n&&l>1?l-1:l],m=h[0]/p[0],v=h[1]/p[1],_=1/m,g=1/v,b=2*Math.ceil(_)+2,y=2*Math.ceil(g)+2,x=0;x<i;x++)for(var w=x*e.strides[0],k=0;k<a;k++)for(var C=w+k*e.strides[1],E=Math.floor(k*_),S=Math.floor(E-b/2),I=0;I<o;I++)for(var M=C+I*e.strides[2],T=Math.floor(I*g),D=Math.floor(T-y/2),R=0;R<s;R++){for(var P=0,O=0;O<b;O++){var L=O+S;if(!(L<0||L>=u)){var A=w+L*t.strides[1],N=L*m;if(k===Math.min(a-1,n?Math.round(N):Math.floor(N)))for(var B=0;B<y;B++){var j=B+D;if(!(j<0||j>=l)){var F=A+j*t.strides[2],Y=j*v;I===Math.min(o-1,n?Math.round(Y):Math.floor(Y))&&(P+=f[F+R])}}}}d[M+R]=P}return Pe(d,e.shape,e.dtype)},t.prototype.batchNormalization=function(t,e,n,r,i,a){this.assertNotComplex([t,e,n,i,a],"batchNorm");for(var o=t.dataSync(),s=e.dataSync(),c=n.dataSync(),u=i?i.dataSync():new Float32Array([1]),l=a?a.dataSync():new Float32Array([0]),d=new Float32Array(o.length),f=l.length,h=u.length,p=c.length,m=s.length,v=0,_=0,g=0,b=0,y=0;y<o.length;++y)d[y]=l[v++]+(o[y]-s[_++])*u[g++]/Math.sqrt(c[b++]+r),v>=f&&(v=0),_>=m&&(_=0),g>=h&&(g=0),b>=p&&(b=0);return Pe(d,t.shape)},t.prototype.localResponseNormalization4D=function(t,e,n,r,i){this.assertNotComplex(t,"localResponseNormalization4D");var a=t.shape[3],o=a-1,s=t.dataSync(),c=t.size,u=new Float32Array(c);function l(t){for(var n=t%a,r=t-n+Math.max(0,n-e),i=t-n+Math.min(n+e,o),c=0;r<=i;r++){var u=s[r];c+=u*u}return c}for(var d=0;d<c;d++){var f=l(d),h=s[d]*Math.pow(n+r*f,-i);u[d]=h}return Pe(u,t.shape)},t.prototype.LRNGrad=function(t,e,n,r,i,a,o){this.assertNotComplex(t,"LRNGrad");for(var s=t.shape[3],c=t.dataSync(),u=e.dataSync(),l=n.dataSync(),d=new Float32Array(t.size),f=t.size,h=0;h<f;h++){for(var p=h%s,m=h-p+Math.max(0,p-r),v=h-p+Math.min(s,p+r+1),_=0,g=m;g<v;g++)_+=Math.pow(u[g],2);for(_=a*_+i,g=m;g<v;g++){var b=-2*a*o*u[g]*l[h]/_;h===g&&(b+=Math.pow(_,-o)),b*=c[h],d[g]+=b}}return Pe(d,t.shape)},t.prototype.multinomial=function(t,e,n,r){this.assertNotComplex(t,"multinomial");for(var i=e?t:we(t),a=i.shape[0],o=i.shape[1],s=Le([a,n],"int32"),c=s.dataSync(),u=i.dataSync(),l=0;l<a;++l){var d=l*o,f=new Float32Array(o-1);f[0]=u[d];for(var h=1;h<f.length;++h)f[h]=f[h-1]+u[d+h];for(var p=Sa(r.toString()),m=l*n,v=0;v<n;++v){var _=p();c[m+v]=f.length;for(var g=0;g<f.length;g++)if(_<f[g]){c[m+v]=g;break}}}return s},t.prototype.oneHot=function(t,e,n,r){this.assertNotComplex(t,"oneHot");var i=new Float32Array(t.size*e);i.fill(r);for(var a=t.dataSync(),o=0;o<t.size;++o)a[o]>=0&&a[o]<e&&(i[o*e+a[o]]=n);return De(i,[t.size,e],"int32")},t.prototype.nonMaxSuppression=function(t,e,n,r,i){return this.assertNotComplex(t,"nonMaxSuppression"),We(t.dataSync(),e.dataSync(),n,r,i)},t.prototype.fft=function(t){return this.fftBatch(t,!1)},t.prototype.ifft=function(t){return this.fftBatch(t,!0)},t.prototype.fftBatch=function(t,e){for(var n=t.shape[0],r=t.shape[1],i=Ma(t.shape,"float32"),a=Ma(t.shape,"float32"),o=Ee(t).as2D(n,r),s=Se(t).as2D(n,r),c=0;c<n;c++)for(var u=o.slice([c,0],[1,r]),l=s.slice([c,0],[1,r]),d=Ce(u,l),f=this.fftImpl(d,e).dataSync(),h=0;h<r;h++){var p=Ve(f,h);i.values[c*r+h]=p.real,a.values[c*r+h]=p.imag}return Ce(i.toTensor(),a.toTensor()).as2D(n,r)},t.prototype.fftImpl=function(t,e){var n=t.as1D(),r=n.size;if(this.isExponentOf2(r)){var i=this.fftRadix2(n,r,e).as2D(t.shape[0],t.shape[1]);return e&&(i=Ce(Ee(i).div(Me(r)),Se(i).div(Me(r)))),i}var a=t.dataSync(),o=function(t){for(var e=new Float32Array(t.length/2),n=new Float32Array(t.length/2),r=0;r<t.length;r+=2)e[r/2]=t[r],n[r/2]=t[r+1];return{real:e,imag:n}}(this.fourierTransformByMatmul(a,r,e));return Ce(o.real,o.imag).as2D(t.shape[0],t.shape[1])},t.prototype.isExponentOf2=function(t){return 0==(t&t-1)},t.prototype.fftRadix2=function(t,e,n){if(1===e)return t;var r=t.dataSync(),i=e/2,a=function(t){for(var e=Math.ceil(t.length/4),n=new Float32Array(e),r=new Float32Array(e),i=0;i<t.length;i+=4)n[Math.floor(i/4)]=t[i],r[Math.floor(i/4)]=t[i+1];return{real:n,imag:r}}(r),o=Ce(a.real,a.imag).as1D(),s=function(t){for(var e=Math.floor(t.length/4),n=new Float32Array(e),r=new Float32Array(e),i=2;i<t.length;i+=4)n[Math.floor(i/4)]=t[i],r[Math.floor(i/4)]=t[i+1];return{real:n,imag:r}}(r),c=Ce(s.real,s.imag).as1D();o=this.fftRadix2(o,i,n),c=this.fftRadix2(c,i,n);var u=function(t,e){for(var n=new Float32Array(t/2),r=new Float32Array(t/2),i=0;i<Math.ceil(t/2);i++){var a=(e?2:-2)*Math.PI*(i/t);n[i]=Math.cos(a),r[i]=Math.sin(a)}return{real:n,imag:r}}(e,n),l=Ce(u.real,u.imag).mul(c),d=o.add(l),f=o.sub(l),h=Ee(d).concat(Ee(f)),p=Se(d).concat(Se(f));return Ce(h,p).as1D()},t.prototype.fourierTransformByMatmul=function(t,e,n){for(var r=new Float32Array(2*e),i=0;i<e;i++){for(var a=0,o=0,s=0;s<e;s++){var c=qe(i*s,e,n),u=Ve(t,s);a+=u.real*c.real-u.imag*c.imag,o+=u.real*c.imag+u.imag*c.real}n&&(a/=e,o/=e),He(r,a,o,i)}return r},t.prototype.depthToSpace=function(t,e,n){b("NHWC"===n,function(){return"Only NHWC dataFormat supported on CPU for depthToSpace. Got "+n}),b(e>1,function(){return"blockSize should be > 1 for depthToSpace, but was: "+e});for(var r=t.shape[0],i=t.shape[1],a=t.shape[2],o=t.shape[3],s=i*e,c=a*e,u=o/(e*e),l=t.dataSync(),d=new Float32Array(r*s*c*u),f=0,h=0;h<r;++h)for(var p=0;p<s;++p)for(var m=Math.floor(p/e),v=p%e,_=0;_<c;++_)for(var g=Math.floor(_/e),y=(v*e+_%e)*u,x=0;x<u;++x){var w=x+y+o*(g+a*(m+i*h));d[f++]=l[w]}return Pe(d,[r,s,c,u])},t.prototype.broadcastedBinaryOp=function(t,e,n,r){var i=en(t.shape,e.shape),a=Ma(i,n),o=t.dataSync(),s=e.dataSync(),c=Qe(t.shape,i),u=Qe(e.shape,i),l=a.values;if(c.length+u.length===0)for(var d=0;d<l.length;++d)l[d]=r(o[d%o.length],s[d%s.length]);else{var f=t.bufferSync(),h=e.bufferSync(),p=function(n){var i=a.indexToLoc(n),d=i.slice(-t.rank);c.forEach(function(t){return d[t]=0});var p=f.locToIndex(d),m=i.slice(-e.rank);u.forEach(function(t){return m[t]=0});var v=h.locToIndex(m);l[n]=r(o[p],s[v])};for(d=0;d<l.length;++d)p(d)}return a.toTensor()},t.prototype.broadcastedBinaryComplexOp=function(t,e,n){var r=en(t.shape,e.shape),i=Ma(r,"float32"),a=Ma(r,"float32"),o=t.dataSync(),s=e.dataSync(),c=Qe(t.shape,r),u=Qe(e.shape,r),l=i.values,d=a.values;if(c.length+u.length===0)for(var f=0;f<l.length;f++){var h=f%o.length,p=f%s.length,m=n(o[2*h],o[2*h+1],s[2*p],s[2*p+1]);l[f]=m.real,d[f]=m.imag}else{var v=this.data.get(t.dataId).complexTensors.real.bufferSync(),_=this.data.get(e.dataId).complexTensors.real.bufferSync(),g=function(r){var a=i.indexToLoc(r),f=a.slice(-t.rank);c.forEach(function(t){return f[t]=0});var h=v.locToIndex(f),p=a.slice(-e.rank);u.forEach(function(t){return p[t]=0});var m=_.locToIndex(p),g=n(o[2*h],o[2*h+1],s[2*m],s[2*m+1]);l[r]=g.real,d[r]=g.imag};for(f=0;f<l.length;f++)g(f)}return this.complex(i.toTensor(),a.toTensor())},t.prototype.split=function(t,e,n){return Ge(t,e,n)},t.prototype.dispose=function(){},t.prototype.floatPrecision=function(){return 32},t.prototype.cropAndResize=function(t,e,n,r,i,a){for(var o=t.shape,s=o[0],c=o[1],u=o[2],l=o[3],d=e.shape[0],f=r[0],h=r[1],p=Ma([d,f,h,l],t.dtype),m=e.dataSync(),v=n.dataSync(),_=t.dataSync(),g=t.strides,b=p.strides,y=0;y<d;y++){var x=4*y,w=m[x],k=m[x+1],C=m[x+2],E=m[x+3],S=v[y];if(!(S>=s))for(var I=f>1?(C-w)*(c-1)/(f-1):0,M=h>1?(E-k)*(u-1)/(h-1):0,T=0;T<f;T++){var D=f>1?w*(c-1)+T*I:.5*(w+C)*(c-1);if(D<0||D>c-1)for(var R=0;R<h;R++)for(var P=0;P<l;P++){var O=P+R*b[2]+T*b[1]+y*b[0];p.values[O]=a}else if("bilinear"===i){var L=Math.floor(D),A=Math.ceil(D),N=D-L;for(R=0;R<h;R++)if((q=h>1?k*(u-1)+R*M:.5*(k+E)*(u-1))<0||q>u-1)for(P=0;P<l;P++)O=P+R*b[2]+T*b[1]+y*b[0],p.values[O]=a;else{var B=Math.floor(q),j=Math.ceil(q),F=q-B;for(P=0;P<l;P++){var Y=_[O=P+B*g[2]+L*g[1]+S*g[0]],$=_[O=P+j*g[2]+L*g[1]+S*g[0]],z=_[O=P+B*g[2]+A*g[1]+S*g[0]],V=Y+($-Y)*F,H=z+(_[O=P+j*g[2]+A*g[1]+S*g[0]]-z)*F;O=P+R*b[2]+T*b[1]+y*b[0],p.values[O]=V+(H-V)*N}}}else for(R=0;R<h;++R){var q;if((q=h>1?k*(u-1)+R*M:.5*(k+E)*(u-1))<0||q>u-1)for(P=0;P<l;P++)O=P+R*b[2]+T*b[1]+y*b[0],p.values[O]=a;else{var W=Math.round(q),U=Math.round(D);for(P=0;P<l;P++){var G=P+W*g[2]+U*g[1]+S*g[0],K=P+R*b[2]+T*b[1]+y*b[0];p.values[K]=_[G]}}}}}return p.toTensor()},t.prototype.sparseToDense=function(t,e,n,r){var i=me(0,t,n),a=i.sliceRank,o=i.numUpdates,s=i.sliceSize,c=i.strides,u=i.outputSize;return this.scatter(t,e,n,u,s,o,a,c,r,!1)},t.prototype.gatherND=function(t,e){var n=e.shape,r=n[n.length-1],i=de(t,e),a=i[0],o=i[1],s=i[2],c=i[3];if(0===o)return Ie([],a,t.dtype);for(var u=new ut([o,s],t.dtype),l=e.dataSync(),d=t.dataSync(),f=0;f<o;f++){for(var h=[],p=0,m=0;m<r;m++){var v=l[f*r+m];p+=v*c[m],h.push(v)}if(p<0||p>=t.size/s)throw new Error("Invalid indices: "+h+" does not index into "+t.shape);for(var _=0;_<s;_++)u.values[f*s+_]=d[p*s+_]}return u.toTensor().reshape(a)},t.prototype.scatterND=function(t,e,n){var r=me(0,t,n),i=r.sliceRank,a=r.numUpdates,o=r.sliceSize,s=r.strides,c=r.outputSize,u=Me(0);return this.scatter(t,e,n,c,o,a,i,s,u,!0)},t.prototype.fill=function(t,e,n){var r=L(n=n||H(e),k(t));return r.fill(e),ht.make(t,{values:r},n)},t.prototype.onesLike=function(t){if("string"===t.dtype)throw new Error("onesLike is not supported for string tensors");return this.fill(t.shape,1,t.dtype)},t.prototype.zerosLike=function(t){var e=L(t.dtype,k(t.shape));return ht.make(t.shape,{values:e},t.dtype)},t.prototype.scatter=function(t,e,n,r,i,a,o,s,c,u){var l=[r/i,i],d=t.dataSync(),f=e.dataSync();if(0===r)return Ie([],n,e.dtype);var h=new ut(l,e.dtype);h.values.fill(c.dataSync()[0]);for(var p=0;p<a;p++){for(var m=[],v=0,_=0;_<o;_++){var g=d[p*o+_];m.push(g),v+=g*s[_]}if(v<0||v>=r/i)throw new Error("Invalid indices: "+m+" does not index into "+n);for(var b=0;b<i;b++)u?h.values[v*i+b]+=f[p*i+b]:h.values[v*i+b]=0===e.rank?f[0]:f[p*i+b]}return h.toTensor().reshape(n)},t}();zt.registerBackend("cpu",function(){return new Du},1);"undefined"!=typeof requestAnimationFrame&&requestAnimationFrame;var Ru={float32:4,int32:4,uint16:2,uint8:1,bool:1};function Pu(t,e){for(var n={},r=0,i=function(e){var i=e.name,a=e.dtype,o=e.shape,s=k(o),c=void 0;if("quantization"in e){var u=e.quantization;if("uint8"!==u.dtype&&"uint16"!==u.dtype)throw new Error("Weight "+e.name+" has unknown quantization dtype "+u.dtype+". Supported quantization dtypes are: 'uint8' and 'uint16'.");var l=Ru[u.dtype],d=t.slice(r,r+s*l),f="uint8"===u.dtype?new Uint8Array(d):new Uint16Array(d);if("float32"===a)c=Float32Array.from(f,function(t){return t*u.scale+u.min});else{if("int32"!==a)throw new Error("Unsupported dtype in weight '"+i+"': "+a);c=Int32Array.from(f,function(t){return Math.round(t*u.scale+u.min)})}r+=s*l}else{var h=Ru[a];if(d=t.slice(r,r+s*h),"float32"===a)c=new Float32Array(d);else if("int32"===a)c=new Int32Array(d);else{if("bool"!==a)throw new Error("Unsupported dtype in weight '"+i+"': "+a);c=new Uint8Array(d)}r+=s*h}var p=void 0;if("float32"===a)p=Ie(c,o,"float32");else if("int32"===a)p=Ie(c,o,"int32");else{if("bool"!==a)throw new Error("Unsupported dtype in weight '"+i+"': "+a);p=Ie(c,o,"bool")}n[i]=p},a=0,o=e;a<o.length;a++)i(o[a]);return n}var Ou=void 0!==a&&("undefined"==typeof Blob||"undefined"==typeof atob||"undefined"==typeof btoa);function Lu(t){return Ou?a.byteLength(t):new Blob([t]).size}function Au(t){var e=0;t.forEach(function(t){e+=t.byteLength});var n=new Uint8Array(e),r=0;return t.forEach(function(t){n.set(new Uint8Array(t),r),r+=t.byteLength}),n.buffer}function Nu(t){for(t=t.trim();t.endsWith("/");)t=t.slice(0,t.length-1);var e=t.split("/");return e[e.length-1]}function Bu(t){if(t.modelTopology instanceof ArrayBuffer)throw new Error("Expected JSON model topology, received ArrayBuffer.");return{dateSaved:new Date,modelTopologyType:"JSON",modelTopologyBytes:null==t.modelTopology?0:Lu(JSON.stringify(t.modelTopology)),weightSpecsBytes:null==t.weightSpecs?0:Lu(JSON.stringify(t.weightSpecs)),weightDataBytes:null==t.weightData?0:t.weightData.byteLength}}var ju=function(){function t(){this.saveRouters=[],this.loadRouters=[]}return t.getInstance=function(){return null==t.instance&&(t.instance=new t),t.instance},t.registerSaveRouter=function(e){t.getInstance().saveRouters.push(e)},t.registerLoadRouter=function(e){t.getInstance().loadRouters.push(e)},t.getSaveHandlers=function(e){return t.getHandlers(e,"save")},t.getLoadHandlers=function(e,n){return t.getHandlers(e,"load",n)},t.getHandlers=function(e,n,r){var i=[];return("load"===n?t.getInstance().loadRouters:t.getInstance().saveRouters).forEach(function(t){var n=t(e,r);null!==n&&i.push(n)}),i},t}(),Fu="://",Yu=function(){function t(){this.managers={}}return t.getInstance=function(){return null==t.instance&&(t.instance=new t),t.instance},t.registerManager=function(e,n){b(null!=e,function(){return"scheme must not be undefined or null."}),e.endsWith(Fu)&&(e=e.slice(0,e.indexOf(Fu))),b(e.length>0,function(){return"scheme must not be an empty string."});var r=t.getInstance();b(null==r.managers[e],function(){return"A model store manager is already registered for scheme '"+e+"'."}),r.managers[e]=n},t.getManager=function(t){var e=this.getInstance().managers[t];if(null==e)throw new Error("Cannot find model manager for scheme '"+t+"'");return e},t.getSchemes=function(){return Object.keys(this.getInstance().managers)},t}();function $u(t){if(-1===t.indexOf(Fu))throw new Error("The url string provided does not contain a scheme. Supported schemes are: "+Yu.getSchemes().join(","));return{scheme:t.split(Fu)[0],path:t.split(Fu)[1]}}function zu(t,e,n){return void 0===n&&(n=!1),u(this,void 0,void 0,function(){var r,i,a,o,s,c,u,d,f;return l(this,function(l){switch(l.label){case 0:return b(t!==e,function(){return"Old path and new path are the same: '"+t+"'"}),b((r=ju.getLoadHandlers(t)).length>0,function(){return"Copying failed because no load handler is found for source URL "+t+"."}),b(r.length<2,function(){return"Copying failed because more than one ("+r.length+") load handlers for source URL "+t+"."}),i=r[0],b((a=ju.getSaveHandlers(e)).length>0,function(){return"Copying failed because no save handler is found for destination URL "+e+"."}),b(a.length<2,function(){return"Copying failed because more than one ("+r.length+") save handlers for destination URL "+e+"."}),o=a[0],s=$u(t).scheme,c=$u(t).path,u=s===$u(t).scheme,[4,i.load()];case 1:return d=l.sent(),n&&u?[4,Yu.getManager(s).removeModel(c)]:[3,3];case 2:l.sent(),l.label=3;case 3:return[4,o.save(d)];case 4:return f=l.sent(),!n||u?[3,6]:[4,Yu.getManager(s).removeModel(c)];case 5:l.sent(),l.label=6;case 6:return[2,f.modelArtifactsInfo]}})})}var Vu="models_store",Hu="model_info_store";function qu(){if(!zt.get("IS_BROWSER"))throw new Error("Failed to obtain IndexedDB factory because the current environmentis not a web browser.");var t=window,e=t.indexedDB||t.mozIndexedDB||t.webkitIndexedDB||t.msIndexedDB||t.shimIndexedDB;if(null==e)throw new Error("The current browser does not appear to support IndexedDB.");return e}function Wu(t){var e=t.result;e.createObjectStore(Vu,{keyPath:"modelPath"}),e.createObjectStore(Hu,{keyPath:"modelPath"})}var Uu=function(){function t(t){if(this.indexedDB=qu(),null==t||!t)throw new Error("For IndexedDB, modelPath must not be null, undefined or empty.");this.modelPath=t}return t.prototype.save=function(t){return u(this,void 0,void 0,function(){return l(this,function(e){if(t.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");return[2,this.databaseAction(this.modelPath,t)]})})},t.prototype.load=function(){return u(this,void 0,void 0,function(){return l(this,function(t){return[2,this.databaseAction(this.modelPath)]})})},t.prototype.databaseAction=function(t,e){var n=this;return new Promise(function(t,r){var i=n.indexedDB.open("tensorflowjs",1);i.onupgradeneeded=function(){return Wu(i)},i.onsuccess=function(){var a=i.result;if(null==e){var o=a.transaction(Vu,"readonly"),s=o.objectStore(Vu).get(n.modelPath);s.onsuccess=function(){if(null==s.result)return a.close(),r(new Error("Cannot find model with path '"+n.modelPath+"' in IndexedDB."));t(s.result.modelArtifacts)},s.onerror=function(t){return a.close(),r(s.error)},o.oncomplete=function(){return a.close()}}else{var c,u=Bu(e),l=a.transaction(Hu,"readwrite"),d=l.objectStore(Hu),f=d.put({modelPath:n.modelPath,modelArtifactsInfo:u});f.onsuccess=function(){var i=(c=a.transaction(Vu,"readwrite")).objectStore(Vu).put({modelPath:n.modelPath,modelArtifacts:e,modelArtifactsInfo:u});i.onsuccess=function(){return t({modelArtifactsInfo:u})},i.onerror=function(t){var e=(d=l.objectStore(Hu)).delete(n.modelPath);e.onsuccess=function(){return a.close(),r(i.error)},e.onerror=function(t){return a.close(),r(i.error)}}},f.onerror=function(t){return a.close(),r(f.error)},l.oncomplete=function(){null==c?a.close():c.oncomplete=function(){return a.close()}}}},i.onerror=function(t){return r(i.error)}})},t.URL_SCHEME="indexeddb://",t}(),Gu=function(t){return zt.get("IS_BROWSER")&&!Array.isArray(t)&&t.startsWith(Uu.URL_SCHEME)?function(t){return new Uu(t)}(t.slice(Uu.URL_SCHEME.length)):null};ju.registerSaveRouter(Gu),ju.registerLoadRouter(Gu);var Ku=function(){function t(){this.indexedDB=qu()}return t.prototype.listModels=function(){return u(this,void 0,void 0,function(){var t=this;return l(this,function(e){return[2,new Promise(function(e,n){var r=t.indexedDB.open("tensorflowjs",1);r.onupgradeneeded=function(){return Wu(r)},r.onsuccess=function(){var t=r.result,i=t.transaction(Hu,"readonly"),a=i.objectStore(Hu).getAll();a.onsuccess=function(){for(var t={},n=0,r=a.result;n<r.length;n++){var i=r[n];t[i.modelPath]=i.modelArtifactsInfo}e(t)},a.onerror=function(e){return t.close(),n(a.error)},i.oncomplete=function(){return t.close()}},r.onerror=function(t){return n(r.error)}})]})})},t.prototype.removeModel=function(t){return u(this,void 0,void 0,function(){var e=this;return l(this,function(n){return t=function(t){return t.startsWith(Uu.URL_SCHEME)?t.slice(Uu.URL_SCHEME.length):t}(t),[2,new Promise(function(n,r){var i=e.indexedDB.open("tensorflowjs",1);i.onupgradeneeded=function(){return Wu(i)},i.onsuccess=function(){var e,a=i.result,o=a.transaction(Hu,"readwrite"),s=o.objectStore(Hu),c=s.get(t);c.onsuccess=function(){if(null==c.result)return a.close(),r(new Error("Cannot find model with path '"+t+"' in IndexedDB."));var i=s.delete(t),o=function(){var i=(e=a.transaction(Vu,"readwrite")).objectStore(Vu).delete(t);i.onsuccess=function(){return n(c.result.modelArtifactsInfo)},i.onerror=function(t){return r(c.error)}};i.onsuccess=o,i.onerror=function(t){return o(),a.close(),r(c.error)}},c.onerror=function(t){return a.close(),r(c.error)},o.oncomplete=function(){null==e?a.close():e.oncomplete=function(){return a.close()}}},i.onerror=function(t){return r(i.error)}})]})})},t}();if(zt.get("IS_BROWSER"))try{Yu.registerManager(Uu.URL_SCHEME,new Ku)}catch(yt){}var Xu="/",Ju="tensorflowjs_models",Zu="info",Qu="model_topology",tl="weight_specs",el="weight_data",nl="model_metadata";function rl(t){return{info:[Ju,t,Zu].join(Xu),topology:[Ju,t,Qu].join(Xu),weightSpecs:[Ju,t,tl].join(Xu),weightData:[Ju,t,el].join(Xu),modelMetadata:[Ju,t,nl].join(Xu)}}function il(t){var e=t.split(Xu);if(e.length<3)throw new Error("Invalid key format: "+t);return e.slice(1,e.length-1).join(Xu)}var al=function(){function t(t){if(!zt.get("IS_BROWSER")||void 0===window.localStorage)throw new Error("The current environment does not support local storage.");if(this.LS=window.localStorage,null==t||!t)throw new Error("For local storage, modelPath must not be null, undefined or empty.");this.modelPath=t,this.keys=rl(this.modelPath)}return t.prototype.save=function(t){return u(this,void 0,void 0,function(){var e,n,r;return l(this,function(i){if(t.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");e=JSON.stringify(t.modelTopology),n=JSON.stringify(t.weightSpecs),r=Bu(t);try{return this.LS.setItem(this.keys.info,JSON.stringify(r)),this.LS.setItem(this.keys.topology,e),this.LS.setItem(this.keys.weightSpecs,n),this.LS.setItem(this.keys.weightData,function(t){return Ou?a.from(t).toString("base64"):btoa(String.fromCharCode.apply(null,new Uint8Array(t)))}(t.weightData)),this.LS.setItem(this.keys.modelMetadata,JSON.stringify({format:t.format,generatedBy:t.generatedBy,convertedBy:t.convertedBy})),[2,{modelArtifactsInfo:r}]}catch(t){throw this.LS.removeItem(this.keys.info),this.LS.removeItem(this.keys.topology),this.LS.removeItem(this.keys.weightSpecs),this.LS.removeItem(this.keys.weightData),this.LS.removeItem(this.keys.modelMetadata),new Error("Failed to save model '"+this.modelPath+"' to local storage: size quota being exceeded is a possible cause of this failure: modelTopologyBytes="+r.modelTopologyBytes+", weightSpecsBytes="+r.weightSpecsBytes+", weightDataBytes="+r.weightDataBytes+".")}return[2]})})},t.prototype.load=function(){return u(this,void 0,void 0,function(){var t,e,n,r,i,o,s;return l(this,function(c){if(null==(t=JSON.parse(this.LS.getItem(this.keys.info))))throw new Error("In local storage, there is no model with name '"+this.modelPath+"'");if("JSON"!==t.modelTopologyType)throw new Error("BrowserLocalStorage does not support loading non-JSON model topology yet.");if(e={},null==(n=JSON.parse(this.LS.getItem(this.keys.topology))))throw new Error("In local storage, the topology of model '"+this.modelPath+"' is missing.");if(e.modelTopology=n,null==(r=JSON.parse(this.LS.getItem(this.keys.weightSpecs))))throw new Error("In local storage, the weight specs of model '"+this.modelPath+"' are missing.");if(e.weightSpecs=r,null!=(i=this.LS.getItem(this.keys.modelMetadata))&&(o=JSON.parse(i),e.format=o.format,e.generatedBy=o.generatedBy,e.convertedBy=o.convertedBy),null==(s=this.LS.getItem(this.keys.weightData)))throw new Error("In local storage, the binary weight values of model '"+this.modelPath+"' are missing.");return e.weightData=function(t){if(Ou){var e=a.from(t,"base64");return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}for(var n=atob(t),r=new Uint8Array(n.length),i=0;i<n.length;++i)r.set([n.charCodeAt(i)],i);return r.buffer}(s),[2,e]})})},t.URL_SCHEME="localstorage://",t}(),ol=function(t){return zt.get("IS_BROWSER")&&!Array.isArray(t)&&t.startsWith(al.URL_SCHEME)?function(t){return new al(t)}(t.slice(al.URL_SCHEME.length)):null};ju.registerSaveRouter(ol),ju.registerLoadRouter(ol);var sl=function(){function t(){b(zt.get("IS_BROWSER"),function(){return"Current environment is not a web browser"}),b(void 0!==window.localStorage,function(){return"Current browser does not appear to support localStorage"}),this.LS=window.localStorage}return t.prototype.listModels=function(){return u(this,void 0,void 0,function(){var t,e,n,r,i,a;return l(this,function(o){for(t={},e=Ju+Xu,n=Xu+Zu,r=0;r<this.LS.length;++r)(i=this.LS.key(r)).startsWith(e)&&i.endsWith(n)&&(a=il(i),t[a]=JSON.parse(this.LS.getItem(i)));return[2,t]})})},t.prototype.removeModel=function(t){return u(this,void 0,void 0,function(){var e,n;return l(this,function(r){if(t=function(t){return t.startsWith(al.URL_SCHEME)?t.slice(al.URL_SCHEME.length):t}(t),e=rl(t),null==this.LS.getItem(e.info))throw new Error("Cannot find model at path '"+t+"'");return n=JSON.parse(this.LS.getItem(e.info)),this.LS.removeItem(e.info),this.LS.removeItem(e.topology),this.LS.removeItem(e.weightSpecs),this.LS.removeItem(e.weightData),[2,n]})})},t}();if(zt.get("IS_BROWSER"))try{Yu.registerManager(al.URL_SCHEME,new sl)}catch(yt){}var cl="model",ul=".json",ll=".weights.bin",dl=function(){function t(e){if(!zt.get("IS_BROWSER"))throw new Error("browserDownloads() cannot proceed because the current environment is not a browser.");e.startsWith(t.URL_SCHEME)&&(e=e.slice(t.URL_SCHEME.length)),null!=e&&0!==e.length||(e=cl),this.modelTopologyFileName=e+ul,this.weightDataFileName=e+ll}return t.prototype.save=function(t){return u(this,void 0,void 0,function(){var e,n,r,i,a,o;return l(this,function(s){if(e=window.URL.createObjectURL(new Blob([t.weightData],{type:"application/octet-stream"})),t.modelTopology instanceof ArrayBuffer)throw new Error("BrowserDownloads.save() does not support saving model topology in binary formats yet.");return n=[{paths:["./"+this.weightDataFileName],weights:t.weightSpecs}],r={modelTopology:t.modelTopology,format:t.format,generatedBy:t.generatedBy,convertedBy:t.convertedBy,weightsManifest:n},i=window.URL.createObjectURL(new Blob([JSON.stringify(r)],{type:"application/json"})),(a=null==this.jsonAnchor?document.createElement("a"):this.jsonAnchor).download=this.modelTopologyFileName,a.href=i,a.click(),null!=t.weightData&&((o=null==this.weightDataAnchor?document.createElement("a"):this.weightDataAnchor).download=this.weightDataFileName,o.href=e,o.click()),[2,{modelArtifactsInfo:Bu(t)}]})})},t.URL_SCHEME="downloads://",t}(),fl=function(){function t(t){if(null==t||t.length<1)throw new Error("When calling browserFiles, at least 1 file is required, but received "+t);this.files=t}return t.prototype.load=function(){return u(this,void 0,void 0,function(){var t,e,n=this;return l(this,function(r){return t=this.files[0],e=this.files.slice(1),[2,new Promise(function(r,i){var a=new FileReader;a.onload=function(a){var o=JSON.parse(a.target.result),s=o.modelTopology;if(null!=s){0===e.length&&r({modelTopology:s});var c=o.weightsManifest;if(null!=c){var u;try{u=n.checkManifestAndWeightFiles(c,e)}catch(t){return void i(t)}var l=[],d=[],f=[];c.forEach(function(t){t.paths.forEach(function(t){d.push(t),f.push(null)}),l.push.apply(l,t.weights)}),c.forEach(function(t){t.paths.forEach(function(t){var e=new FileReader;e.onload=function(e){var n=e.target.result,i=d.indexOf(t);f[i]=n,-1===f.indexOf(null)&&r({modelTopology:s,weightSpecs:l,weightData:Au(f)})},e.onerror=function(e){return i("Failed to weights data from file of path '"+t+"'.")},e.readAsArrayBuffer(u[t])})})}else i(new Error("weightManifest field is missing from file "+t.name))}else i(new Error("modelTopology field is missing from file "+t.name))},a.onerror=function(e){return i("Failed to read model topology and weights manifest JSON from file '"+t.name+"'. BrowserFiles supports loading Keras-style tf.Model artifacts only.")},a.readAsText(t)})]})})},t.prototype.checkManifestAndWeightFiles=function(t,e){for(var n=[],r=e.map(function(t){return Nu(t.name)}),i={},a=0,o=t;a<o.length;a++)o[a].paths.forEach(function(t){var a=Nu(t);if(-1!==n.indexOf(a))throw new Error("Duplicate file basename found in weights manifest: '"+a+"'");if(n.push(a),-1===r.indexOf(a))throw new Error("Weight file with basename '"+a+"' is not provided.");i[t]=e[r.indexOf(a)]});if(n.length!==e.length)throw new Error("Mismatch in the number of files in weights manifest ("+n.length+") and the number of weight files provided ("+e.length+").");return i},t}();function hl(t,e,n,r){!function(t){b(null!=t&&Array.isArray(t)&&t.length>0,function(){return"promises must be a none empty array"})}(t),function(t,e){b(t>=0&&t<=1,function(){return"Progress fraction must be in range [0, 1], but got startFraction "+t}),b(e>=0&&e<=1,function(){return"Progress fraction must be in range [0, 1], but got endFraction "+e}),b(e>=t,function(){return"startFraction must be no more than endFraction, but got startFraction "+t+" and endFraction "+e})}(n=null==n?0:n,r=null==r?1:r);var i=0;return Promise.all(t.map(function(a){return a.then(function(a){var o=n+ ++i/t.length*(r-n);return e(o),a}),a}))}function pl(t,e){return u(this,void 0,void 0,function(){var n,r,i,a,o,s,c,u,d;return l(this,function(l){switch(l.label){case 0:return null==e&&(e={}),n=null==e.fetchFunc?fetch:e.fetchFunc,r=t.map(function(t){return n(t,e.requestInit)}),i=0,a=.5,null!=e.onProgress?[3,2]:[4,Promise.all(r)];case 1:return o=l.sent(),[3,4];case 2:return[4,hl(r,e.onProgress,i,a)];case 3:o=l.sent(),l.label=4;case 4:return s=o.map(function(t){return t.arrayBuffer()}),c=.5,u=1,null!=e.onProgress?[3,6]:[4,Promise.all(s)];case 5:return d=l.sent(),[3,8];case 6:return[4,hl(s,e.onProgress,c,u)];case 7:d=l.sent(),l.label=8;case 8:return[2,d]}})})}function ml(t){var e=this;return function(n,r,i){return void 0===r&&(r=""),u(e,void 0,void 0,function(){var e,a,o,s,c,u,d,f,h,p;return l(this,function(l){switch(l.label){case 0:if(e=n.map(function(){return!1}),a={},o=null!=i?i.map(function(){return!1}):[],s=[],n.forEach(function(t,n){var r=0;t.weights.forEach(function(t){var c="quantization"in t?t.quantization.dtype:t.dtype,u=Ru[c]*k(t.shape),l=function(){e[n]=!0,null==a[n]&&(a[n]=[]),a[n].push({manifestEntry:t,groupOffset:r,sizeBytes:u})};null!=i?i.forEach(function(e,n){e===t.name&&(l(),o[n]=!0)}):l(),s.push(t.name),r+=u})}),!o.every(function(t){return t}))throw c=i.filter(function(t,e){return!o[e]}),new Error("Could not find weights in manifest with names: "+c.join(", ")+". \nManifest JSON has weights with names: "+s.join(", ")+".");return u=e.reduce(function(t,e,n){return e&&t.push(n),t},[]),d=[],u.forEach(function(t){n[t].paths.forEach(function(t){var e=r+(r.endsWith("/")?"":"/")+t;d.push(e)})}),[4,t(d)];case 1:return f=l.sent(),h={},p=0,u.forEach(function(t){for(var e=n[t].paths.length,r=0,i=0;i<e;i++)r+=f[p+i].byteLength;for(var o=new ArrayBuffer(r),s=new Uint8Array(o),c=0,u=0;u<e;u++){var l=new Uint8Array(f[p+u]);s.set(l,c),c+=l.byteLength}a[t].forEach(function(t){var e=Pu(o.slice(t.groupOffset,t.groupOffset+t.sizeBytes),[t.manifestEntry]);for(var n in e)h[n]=e[n]}),p+=e}),[2,h]}})})}}ju.registerSaveRouter(function(t){return zt.get("IS_BROWSER")&&!Array.isArray(t)&&t.startsWith(dl.URL_SCHEME)?function(t){return void 0===t&&(t="model"),new dl(t)}(t.slice(dl.URL_SCHEME.length)):null});var vl=function(){function t(t,e){if(this.DEFAULT_METHOD="POST",null==e&&(e={}),this.weightPathPrefix=e.weightPathPrefix,this.onProgress=e.onProgress,null==e.fetchFunc){var n=zt.global.fetch;if(void 0===n)throw new Error("browserHTTPRequest is not supported outside the web browser without a fetch polyfill.");e.fetchFunc=n.bind(zt.global)}else b("function"==typeof e.fetchFunc,function(){return"Must pass a function that matches the signature of `fetch` (see https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)"});if(this.fetchFunc=function(t,n){return e.fetchFunc(t,n).catch(function(e){throw new Error("Request for "+t+" failed due to error: "+e)})},b(null!=t&&t.length>0,function(){return"URL path for browserHTTPRequest must not be null, undefined or empty."}),Array.isArray(t)&&b(2===t.length,function(){return"URL paths for browserHTTPRequest must have a length of 2, (actual length is "+t.length+")."}),this.path=t,null!=e.requestInit&&null!=e.requestInit.body)throw new Error("requestInit is expected to have no pre-existing body, but has one.");this.requestInit=e.requestInit||{}}return t.prototype.save=function(t){return u(this,void 0,void 0,function(){var e,n,r,i;return l(this,function(a){switch(a.label){case 0:if(t.modelTopology instanceof ArrayBuffer)throw new Error("BrowserHTTPRequest.save() does not support saving model topology in binary formats yet.");return(e=Object.assign({method:this.DEFAULT_METHOD},this.requestInit)).body=new FormData,n=[{paths:["./model.weights.bin"],weights:t.weightSpecs}],r={modelTopology:t.modelTopology,format:t.format,generatedBy:t.generatedBy,convertedBy:t.convertedBy,weightsManifest:n},e.body.append("model.json",new Blob([JSON.stringify(r)],{type:"application/json"}),"model.json"),null!=t.weightData&&e.body.append("model.weights.bin",new Blob([t.weightData],{type:"application/octet-stream"}),"model.weights.bin"),[4,this.getFetchFunc()(this.path,e)];case 1:if((i=a.sent()).ok)return[2,{modelArtifactsInfo:Bu(t),responses:[i]}];throw new Error("BrowserHTTPRequest.save() failed due to HTTP response status "+i.status+".")}})})},t.prototype.load=function(){return u(this,void 0,void 0,function(){var t,e,n,r,i,a,o,s;return l(this,function(c){switch(c.label){case 0:return[4,this.getFetchFunc()(this.path,this.requestInit)];case 1:if(!(t=c.sent()).ok)throw new Error("Request to "+this.path+" failed with status code "+t.status+". Please verify this URL points to the model JSON of the model to load.");c.label=2;case 2:return c.trys.push([2,4,,5]),[4,t.json()];case 3:return e=c.sent(),[3,5];case 4:throw c.sent(),n="Failed to parse model JSON of response from "+this.path+".",this.path.endsWith(".pb")?n+=" Your path contains a .pb file extension. Support for .pb models have been removed in TensorFlow.js 1.0 in favor of .json models. You can re-convert your Python TensorFlow model using the TensorFlow.js 1.0 conversion scripts or you can convert your.pb models with the 'pb2json'NPM script in the tensorflow/tfjs-converter repository.":n+=" Please make sure the server is serving valid JSON for this request.",new Error(n);case 5:if(r=e.modelTopology,i=e.weightsManifest,null==r&&null==i)throw new Error("The JSON from HTTP path "+this.path+" contains neither model topology or manifest for weights.");return null==i?[3,7]:[4,this.loadWeights(i)];case 6:s=c.sent(),a=s[0],o=s[1],c.label=7;case 7:return[2,{modelTopology:r,weightSpecs:a,weightData:o}]}})})},t.prototype.loadWeights=function(t){return u(this,void 0,void 0,function(){var e,n,r,i,a,o,s,c,u,d,f;return l(this,function(l){switch(l.label){case 0:for(e=Array.isArray(this.path)?this.path[1]:this.path,n=function(t){var e=t.lastIndexOf("/"),n=t.lastIndexOf("?");return[t.substring(0,e)+"/",n>e?t.substring(n):""]}(e),r=n[0],i=n[1],a=this.weightPathPrefix||r,o=[],s=0,c=t;s<c.length;s++)u=c[s],o.push.apply(o,u.weights);return d=[],t.forEach(function(t){t.paths.forEach(function(t){d.push(a+t+i)})}),[4,pl(d,{requestInit:this.requestInit,fetchFunc:this.getFetchFunc(),onProgress:this.onProgress})];case 1:return f=l.sent(),[2,[o,Au(f)]]}})})},t.prototype.getFetchFunc=function(){return this.fetchFunc},t.URL_SCHEME_REGEX=/^https?:\/\//,t}();function _l(t){return null!=t.match(vl.URL_SCHEME_REGEX)}var gl=function(t,e){return"undefined"==typeof fetch?null:(Array.isArray(t)?t.every(function(t){return _l(t)}):_l(t))?bl(t,{onProgress:e}):null};function bl(t,e){return new vl(t,e)}ju.registerSaveRouter(gl),ju.registerLoadRouter(gl);var yl=function(){function t(t,e,n){this.modelTopology=t,this.weightSpecs=e,this.weightData=n}return t.prototype.load=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){return t={},null!=this.modelTopology&&(t=c({modelTopology:this.modelTopology},t)),null!=this.weightSpecs&&this.weightSpecs.length>0&&(t=c({weightSpecs:this.weightSpecs},t)),null!=this.weightData&&this.weightData.byteLength>0&&(t=c({weightData:this.weightData},t)),[2,t]})})},t}(),xl=function(){function t(t){this.saveHandler=t}return t.prototype.save=function(t){return u(this,void 0,void 0,function(){return l(this,function(e){return[2,this.saveHandler(t)]})})},t}();var wl=Object.freeze({browserFiles:function(t){return new fl(t)},browserHTTPRequest:bl,concatenateArrayBuffers:Au,decodeWeights:Pu,encodeWeights:function(t){return u(this,void 0,void 0,function(){var e,n,r,i;return l(this,function(a){switch(a.label){case 0:for(r in e=[],n=[],t){if("float32"!==(i=t[r]).dtype&&"int32"!==i.dtype&&"bool"!==i.dtype)throw new Error("Unsupported dtype in weight '"+r+"': "+i.dtype);e.push({name:r,shape:i.shape,dtype:i.dtype}),n.push(i.data())}return[4,Promise.all(n)];case 1:return[2,{data:function(t){if(null===t)throw new Error("Invalid input value: "+JSON.stringify(t));var e=0,n=[];t.forEach(function(t){if(e+=t.byteLength,n.push(t.byteLength===t.buffer.byteLength?t:new t.constructor(t)),!(t instanceof Float32Array||t instanceof Int32Array||t instanceof Uint8Array))throw new Error("Unsupported TypedArray subtype: "+t.constructor.name)});var r=new Uint8Array(e),i=0;return n.forEach(function(t){r.set(new Uint8Array(t.buffer),i),i+=t.byteLength}),r.buffer}(a.sent()),specs:e}]}})})},fromMemory:function(t,e,n){return new yl(t,e,n)},getLoadHandlers:function(t,e){return ju.getLoadHandlers(t)},getModelArtifactsInfoForJSON:Bu,getSaveHandlers:function(t){return ju.getSaveHandlers(t)},isHTTPScheme:_l,loadWeights:function(t,e,n,r){return void 0===e&&(e=""),u(this,void 0,void 0,function(){return l(this,function(i){return[2,ml(function(t){return pl(t,{requestInit:r})})(t,e,n)]})})},registerLoadRouter:function(t){return ju.registerLoadRouter(t)},registerSaveRouter:function(t){return ju.registerSaveRouter(t)},weightsLoaderFactory:ml,withSaveHandler:function(t){return new xl(t)},copyModel:function(t,e){return u(this,void 0,void 0,function(){return l(this,function(n){switch(n.label){case 0:return[4,zu(t,e,!1)];case 1:return[2,n.sent()]}})})},listModels:function(){return u(this,void 0,void 0,function(){var t,e,n,r,i,a,o;return l(this,function(s){switch(s.label){case 0:t=Yu.getSchemes(),e={},n=0,r=t,s.label=1;case 1:return n<r.length?(i=r[n],[4,Yu.getManager(i).listModels()]):[3,4];case 2:for(o in a=s.sent())e[i+Fu+o]=a[o];s.label=3;case 3:return n++,[3,1];case 4:return[2,e]}})})},moveModel:function(t,e){return u(this,void 0,void 0,function(){return l(this,function(n){switch(n.label){case 0:return[4,zu(t,e,!0)];case 1:return[2,n.sent()]}})})},removeModel:function(t){return u(this,void 0,void 0,function(){var e;return l(this,function(n){switch(n.label){case 0:return e=$u(t),[4,Yu.getManager(e.scheme).removeModel(e.path)];case 1:return[2,n.sent()]}})})}});var kl=xe({confusionMatrix_:function(t,e,n){var r=qt(t,"labels","confusionMatrix"),i=qt(e,"predictions","confusionMatrix");b(null==n||n>0&&Number.isInteger(n),function(){return"If provided, numClasses must be a positive integer, but got "+n}),b(1===r.rank,function(){return"Expected the rank of labels to be 1, but got "+r.rank}),b(1===i.rank,function(){return"Expected the rank of predictions to be 1, but got "+i.rank}),b(r.shape[0]===i.shape[0],function(){return"Mismatch in the number of examples: "+r.shape[0]+" vs. "+i.shape[0]+". Labels and predictions should have the same number of elements."}),b(n>0&&Number.isInteger(n),function(){return"numClasses is required to be a positive integer, but got "+n});var a=Ba(r.asType("int32"),n),o=Ba(i.asType("int32"),n);return a.transpose().matMul(o).asType("int32")}});Object.freeze({confusionMatrix:kl});var Cl=xe({fromPixels_:function(t,e){if(void 0===e&&(e=3),e>4)throw new Error("Cannot construct Tensor with more than 4 channels from pixels.");return zt.engine.fromPixels(t,e)}}),El=Object.freeze({toPixels:function(t,e){return u(this,void 0,void 0,function(){var n,r,i,a,o,s,c,u,d,f,h,p,m,v,_,g,b,y,x,w;return l(this,function(l){switch(l.label){case 0:if(n=qt(t,"img","toPixels"),t instanceof ht||(n=n.toInt()),2!==n.rank&&3!==n.rank)throw new Error("toPixels only supports rank 2 or 3 tensors, got rank "+n.rank+".");if(r=n.shape.slice(0,2),i=r[0],a=r[1],(o=2===n.rank?1:n.shape[2])>4||2===o)throw new Error("toPixels only supports depth of size 1, 3 or 4 but got "+o);return s=n.min(),c=n.max(),[4,s.data()];case 1:return u=l.sent()[0],[4,c.data()];case 2:if(d=l.sent()[0],s.dispose(),c.dispose(),"float32"===n.dtype){if(u<0||d>1)throw new Error("Tensor values for a float32 Tensor must be in the range [0 - 1] but got range ["+u+" - "+d+"].")}else{if("int32"!==n.dtype)throw new Error("Unsupported type for toPixels: "+n.dtype+". Please use float32 or int32 tensors.");if(u<0||d>255)throw new Error("Tensor values for a int32 Tensor must be in the range [0 - 255] but got range ["+u+" - "+d+"].")}return[4,n.data()];case 3:for(f=l.sent(),h="float32"===n.dtype?255:1,p=new Uint8ClampedArray(a*i*4),m=0;m<i*a;++m)v=void 0,_=void 0,g=void 0,b=void 0,1===o?(v=f[m]*h,_=f[m]*h,g=f[m]*h,b=255):3===o?(v=f[3*m]*h,_=f[3*m+1]*h,g=f[3*m+2]*h,b=255):4===o&&(v=f[4*m]*h,_=f[4*m+1]*h,g=f[4*m+2]*h,b=f[4*m+3]*h),p[0+(y=4*m)]=Math.round(v),p[y+1]=Math.round(_),p[y+2]=Math.round(g),p[y+3]=Math.round(b);return null!=e&&(e.width=a,e.height=i,x=e.getContext("2d"),w=new ImageData(p,a,i),x.putImageData(w,0,0)),n!==t&&n.dispose(),[2,p]}})})},fromPixels:Cl}),Sl=function(){function t(){}return t.prototype.getClassName=function(){return this.constructor.className},t.fromConfig=function(t,e){return new t(e)},t}(),Il=function(){function t(){this.classNameMap={}}return t.getMap=function(){return null==t.instance&&(t.instance=new t),t.instance},t.register=function(e){t.getMap().classNameMap[e.className]=[e,e.fromConfig]},t}();function Ml(t){b(null!=t.className,function(){return"Class being registered does not have the static className property defined."}),b("string"==typeof t.className,function(){return"className is required to be a string, but got type "+typeof t.className}),b(t.className.length>0,function(){return"Class being registered has an empty-string as its className, which is disallowed."}),Il.register(t)}Object.freeze({Serializable:Sl,SerializationMap:Il,registerClass:Ml});function Tl(t,e,n){return null==n&&(n=zt.get("TEST_EPSILON")),Dl(t,"number"==typeof e||"boolean"==typeof e?[e]:e,function(t,e){return Rl(t,Number(e),n)})}function Dl(t,e,n){if(t instanceof ht||e instanceof ht){if(t instanceof ht&&e instanceof ht){if(t.dtype!==e.dtype)throw new Error("Arrays are of different type actual: "+t.dtype+" vs expected: "+e.dtype+".");if(!C(t.shape,e.shape))throw new Error("Arrays are of different shape actual: "+t.shape+" vs expected: "+e.shape+".")}}else{var r=t.constructor.name,i=e.constructor.name;if(r!==i)throw new Error("Arrays are of different type actual: "+r+" vs expected: "+i)}var a,o;if(a=t instanceof ht?t.dataSync():t,o=e instanceof ht?e.dataSync():e,a.length!==o.length)throw new Error("Arrays have different lengths actual: "+a.length+" vs expected: "+o.length+".\nActual: "+a+".\nExpected: "+o+".");for(var s=0;s<o.length;++s){var c=a[s],u=o[s];if(!n(c,u))throw new Error("Arrays differ: actual["+s+"] = "+c+", expected["+s+"] = "+u+".\nActual: "+a+".\nExpected: "+o+".")}}function Rl(t,e,n){return!(!isNaN(t)||!isNaN(e))||!(isNaN(t)||isNaN(e)||Math.abs(t-e)>n)}Object.freeze({WEBGL_ENVS:{HAS_WEBGL:!0},PACKED_ENVS:{WEBGL_PACK:!0},NODE_ENVS:{IS_NODE:!0},CHROME_ENVS:{IS_CHROME:!0},BROWSER_ENVS:{IS_BROWSER:!0},CPU_ENVS:{HAS_WEBGL:!1},ALL_ENVS:{},expectArraysClose:Tl,expectPromiseToFail:function(t,e){t().then(function(){return e.fail()},function(){return e()})},expectArraysEqual:function(t,e){var n="string"==typeof e||"number"==typeof e||"boolean"==typeof e?[e]:e;return t instanceof ht&&"string"===t.dtype||e instanceof ht&&"string"===e.dtype||Array.isArray(t)&&$(t[0])||Array.isArray(e)&&$(e[0])?Dl(t,n,function(t,e){return t==e}):Tl(t,e,0)},expectNumbersClose:function(t,e,n){if(null==n&&(n=zt.get("TEST_EPSILON")),!Rl(t,e,n))throw new Error("Numbers differ: actual === "+t+", expected === "+e)},expectValuesInRange:function(t,e,n){var r;r=t instanceof ht?t.dataSync():t;for(var i=0;i<r.length;i++)if(r[i]<e||r[i]>n)throw new Error("Value out of range:"+r[i]+" low: "+e+", high: "+n)},expectArrayBuffersEqual:function(t,e){expect(new Float32Array(t)).toEqual(new Float32Array(e))}}),Object.freeze({gpgpu_util:hi,webgl_util:qr,MathBackendWebGL:no,GPGPUContext:pi});var Pl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.prototype.minimize=function(t,e,n){void 0===e&&(e=!1);var r=this.computeGradients(t,n),i=r.value,a=r.grads;return this.applyGradients(a),Object.keys(a).forEach(function(t){return a[t].dispose()}),e?i:(i.dispose(),null)},e.prototype.computeGradients=function(t,e){return function(t,e){if(b(q(t),function(){return"The f passed in variableGrads(f) must be a function"}),b(null==e||Array.isArray(e)&&e.every(function(t){return t instanceof pt}),function(){return"The varList passed in variableGrads(f, varList) must be an array of variables"}),null==e)for(var n in e=[],zt.engine.registeredVariables)e.push(zt.engine.registeredVariables[n]);var r=e.length;b((e=e.filter(function(t){return t.trainable})).length>0,function(){return"variableGrads() expects at least one of the input variables to be trainable, but none of the "+r+" variables is trainable."});var i=zt.engine.gradients(t,e,null,!0),a=i.value,o=i.grads;b(o.some(function(t){return null!=t}),function(){return"Cannot find a connection between any variable and the result of the loss function y=f(x). Please make sure the operations that use variables are inside the function f passed to minimize()."}),b(0===a.rank,function(){return"The f passed in variableGrads(f) must return a scalar, but it returned a rank-"+a.rank+" tensor"});var s={};return e.forEach(function(t,e){null!=o[e]&&(s[t.name]=o[e])}),{value:a,grads:s}}(t,e)},e.prototype.dispose=function(){},e}(Sl);Object.defineProperty(Pl,Symbol.hasInstance,{value:function(t){return null!=t.minimize&&null!=t.computeGradients&&null!=t.applyGradients}});var Ol=function(t){function e(e,n,r){void 0===r&&(r=null);var i=t.call(this)||this;return i.learningRate=e,i.rho=n,i.epsilon=r,i.accumulatedGrads={},i.accumulatedUpdates={},i.c=Kt(Me(-e)),i.rhoScalar=Kt(Me(n)),i.oneMinusRho=Kt(Me(1-n)),null===r&&(r=zt.get("EPSILON")),i.epsilonScalar=Kt(Me(r)),i}return s(e,t),e.prototype.applyGradients=function(t){var e=this,n=function(n){var i=zt.engine.registeredVariables[n];null==r.accumulatedGrads[n]&&Gt(function(){e.accumulatedGrads[n]=je(i).variable(!1)}),null==r.accumulatedUpdates[n]&&Gt(function(){e.accumulatedUpdates[n]=je(i).variable(!1)});var a=t[n],o=r.accumulatedGrads[n],s=r.accumulatedUpdates[n];Gt(function(){var t=e.rhoScalar.mul(o).add(e.oneMinusRho.mul(a.square())),r=s.add(e.epsilonScalar).sqrt().div(o.add(e.epsilonScalar).sqrt()).mul(a),c=e.rhoScalar.mul(s).add(e.oneMinusRho.mul(r.square()));e.accumulatedGrads[n].assign(t),e.accumulatedUpdates[n].assign(c);var u=e.c.mul(r).add(i);i.assign(u)})},r=this;for(var i in t)n(i)},e.prototype.dispose=function(){var t=this;this.c.dispose(),this.epsilonScalar.dispose(),this.rhoScalar.dispose(),this.oneMinusRho.dispose(),null!=this.accumulatedUpdates&&(Object.keys(this.accumulatedUpdates).forEach(function(e){return t.accumulatedUpdates[e].dispose()}),Object.keys(this.accumulatedGrads).forEach(function(e){return t.accumulatedGrads[e].dispose()}))},e.prototype.getConfig=function(){return{learningRate:this.learningRate,rho:this.rho,epsilon:this.epsilon}},e.fromConfig=function(t,e){return new t(e.learningRate,e.rho,e.epsilon)},e.className="AdadeltaOptimizer",e}(Pl);Ml(Ol);var Ll=function(t){function e(e,n){void 0===n&&(n=.1);var r=t.call(this)||this;return r.learningRate=e,r.initialAccumulatorValue=n,r.accumulatedGrads={},r.c=Kt(Me(-e)),r.epsilon=Kt(Me(zt.get("EPSILON"))),r}return s(e,t),e.prototype.applyGradients=function(t){var e=this,n=function(n){var i=zt.engine.registeredVariables[n];null==r.accumulatedGrads[n]&&Gt(function(){e.accumulatedGrads[n]=Ae(i.shape,e.initialAccumulatorValue).variable(!1)});var a=t[n],o=r.accumulatedGrads[n];Gt(function(){var t=o.add(a.square());e.accumulatedGrads[n].assign(t);var r=e.c.mul(a.div(t.add(e.epsilon).sqrt())).add(i);i.assign(r)})},r=this;for(var i in t)n(i)},e.prototype.dispose=function(){var t=this;this.epsilon.dispose(),this.c.dispose(),null!=this.accumulatedGrads&&Object.keys(this.accumulatedGrads).forEach(function(e){return t.accumulatedGrads[e].dispose()})},e.prototype.getConfig=function(){return{learningRate:this.learningRate,initialAccumulatorValue:this.initialAccumulatorValue}},e.fromConfig=function(t,e){return new t(e.learningRate,e.initialAccumulatorValue)},e.className="AdagradOptimizer",e}(Pl);Ml(Ll);var Al=function(t){function e(e,n,r,i){void 0===i&&(i=null);var a=t.call(this)||this;return a.learningRate=e,a.beta1=n,a.beta2=r,a.epsilon=i,a.accumulatedFirstMoment={},a.accumulatedSecondMoment={},a.c=Kt(Me(-e)),a.beta1Scalar=Kt(Me(n)),a.beta2Scalar=Kt(Me(r)),Gt(function(){a.accBeta1=Me(n).variable(),a.accBeta2=Me(r).variable()}),a.oneMinusBeta1=Kt(Me(1-n)),a.oneMinusBeta2=Kt(Me(1-r)),a.one=Kt(Me(1)),null===i&&(i=zt.get("EPSILON")),a.epsScalar=Kt(Me(i)),a}return s(e,t),e.prototype.applyGradients=function(t){var e=this;Gt(function(){var n=e.one.sub(e.accBeta1),r=e.one.sub(e.accBeta2);for(var i in t){var a=zt.engine.registeredVariables[i];if(null==e.accumulatedFirstMoment[i]){var o=!1;e.accumulatedFirstMoment[i]=je(a).variable(o)}null==e.accumulatedSecondMoment[i]&&(o=!1,e.accumulatedSecondMoment[i]=je(a).variable(o));var s=t[i],c=e.accumulatedFirstMoment[i],u=e.accumulatedSecondMoment[i],l=e.beta1Scalar.mul(c).add(e.oneMinusBeta1.mul(s)),d=e.beta2Scalar.mul(u).add(e.oneMinusBeta2.mul(s.square())),f=l.div(n),h=d.div(r);e.accumulatedFirstMoment[i].assign(l),e.accumulatedSecondMoment[i].assign(d);var p=e.c.mul(f.div(e.epsScalar.add(h.sqrt()))).add(a);a.assign(p)}e.accBeta1.assign(e.accBeta1.mul(e.beta1Scalar)),e.accBeta2.assign(e.accBeta2.mul(e.beta2Scalar))})},e.prototype.dispose=function(){var t=this;this.c.dispose(),this.epsScalar.dispose(),this.beta1Scalar.dispose(),this.beta2Scalar.dispose(),this.accBeta1.dispose(),this.accBeta2.dispose(),this.oneMinusBeta1.dispose(),this.oneMinusBeta2.dispose(),this.one.dispose(),null!=this.accumulatedFirstMoment&&Object.keys(this.accumulatedFirstMoment).forEach(function(e){return t.accumulatedFirstMoment[e].dispose()}),null!=this.accumulatedSecondMoment&&Object.keys(this.accumulatedSecondMoment).forEach(function(e){return t.accumulatedSecondMoment[e].dispose()})},e.prototype.getConfig=function(){return{learningRate:this.learningRate,beta1:this.beta1,beta2:this.beta2,epsilon:this.epsilon}},e.fromConfig=function(t,e){return new t(e.learningRate,e.beta1,e.beta2,e.epsilon)},e.className="AdamOptimizer",e}(Pl);Ml(Al);var Nl=function(t){function e(e,n,r,i,a){void 0===i&&(i=null),void 0===a&&(a=0);var o=t.call(this)||this;return o.learningRate=e,o.beta1=n,o.beta2=r,o.epsilon=i,o.decay=a,o.accumulatedFirstMoment={},o.accumulatedWeightedInfNorm={},o.c=Kt(Me(-e)),o.beta1Scalar=Kt(Me(n)),o.beta2Scalar=Kt(Me(r)),o.decayScalar=Kt(Me(a)),Gt(function(){o.iteration=Me(0).variable(),o.accBeta1=Me(n).variable()}),o.oneMinusBeta1=Kt(Me(1-n)),o.one=Kt(Me(1)),null===i&&(i=zt.get("EPSILON")),o.epsScalar=Kt(Me(i)),o}return s(e,t),e.prototype.applyGradients=function(t){var e=this;Gt(function(){var n=e.one.sub(e.accBeta1),r=e.c.div(e.one.add(e.decayScalar.mul(e.iteration)));for(var i in t){var a=zt.engine.registeredVariables[i];if(null==e.accumulatedFirstMoment[i]){var o=!1;e.accumulatedFirstMoment[i]=je(a).variable(o)}null==e.accumulatedWeightedInfNorm[i]&&(o=!1,e.accumulatedWeightedInfNorm[i]=je(a).variable(o));var s=t[i],c=e.accumulatedFirstMoment[i],u=e.accumulatedWeightedInfNorm[i],l=e.beta1Scalar.mul(c).add(e.oneMinusBeta1.mul(s)),d=e.beta2Scalar.mul(u),f=s.abs(),h=d.maximum(f);e.accumulatedFirstMoment[i].assign(l),e.accumulatedWeightedInfNorm[i].assign(h);var p=r.div(n).mul(l.div(e.epsScalar.add(h))).add(a);a.assign(p)}e.iteration.assign(e.iteration.add(e.one)),e.accBeta1.assign(e.accBeta1.mul(e.beta1Scalar))})},e.prototype.dispose=function(){var t=this;this.c.dispose(),this.epsScalar.dispose(),this.accBeta1.dispose(),this.beta1Scalar.dispose(),this.beta2Scalar.dispose(),this.oneMinusBeta1.dispose(),this.decayScalar.dispose(),this.iteration.dispose(),this.one.dispose(),null!=this.accumulatedFirstMoment&&Object.keys(this.accumulatedFirstMoment).forEach(function(e){return t.accumulatedFirstMoment[e].dispose()}),null!=this.accumulatedWeightedInfNorm&&Object.keys(this.accumulatedWeightedInfNorm).forEach(function(e){return t.accumulatedWeightedInfNorm[e].dispose()})},e.prototype.getConfig=function(){return{learningRate:this.learningRate,beta1:this.beta1,beta2:this.beta2,epsilon:this.epsilon,decay:this.decay}},e.fromConfig=function(t,e){return new t(e.learningRate,e.beta1,e.beta2,e.epsilon,e.decay)},e.className="AdamaxOptimizer",e}(Pl);Ml(Nl);var Bl=function(t){function e(e){var n=t.call(this)||this;return n.learningRate=e,n.setLearningRate(e),n}return s(e,t),e.prototype.applyGradients=function(t){var e=this;Object.keys(t).forEach(function(n){var r=t[n],i=zt.engine.registeredVariables[n];Gt(function(){var t=e.c.mul(r).add(i);i.assign(t)})})},e.prototype.setLearningRate=function(t){this.learningRate=t,null!=this.c&&this.c.dispose(),this.c=Kt(Me(-t))},e.prototype.dispose=function(){this.c.dispose()},e.prototype.getConfig=function(){return{learningRate:this.learningRate}},e.fromConfig=function(t,e){return new t(e.learningRate)},e.className="SGDOptimizer",e}(Pl);Ml(Bl);var jl=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e)||this;return i.learningRate=e,i.momentum=n,i.useNesterov=r,i.m=Me(i.momentum),i.accumulations={},i}return s(e,t),e.prototype.applyGradients=function(t){var e=this,n=function(n){var i=zt.engine.registeredVariables[n];null==r.accumulations[n]&&Gt(function(){e.accumulations[n]=je(i).variable(!1)});var a=r.accumulations[n],o=t[n];Gt(function(){var t,r=e.m.mul(a).add(o);t=e.useNesterov?e.c.mul(o.add(r.mul(e.m))).add(i):e.c.mul(r).add(i),e.accumulations[n].assign(r),i.assign(t)})},r=this;for(var i in t)n(i)},e.prototype.dispose=function(){if(t.prototype.dispose.call(this),this.m.dispose(),null!=this.accumulations)for(var e in this.accumulations)this.accumulations[e].dispose()},e.prototype.setMomentum=function(t){this.momentum=t},e.prototype.getConfig=function(){return{learningRate:this.learningRate,momentum:this.momentum,useNesterov:this.useNesterov}},e.fromConfig=function(t,e){return new t(e.learningRate,e.momentum,e.useNesterov)},e.className="MomentumOptimizer",e}(Bl);Ml(jl);var Fl=function(t){function e(e,n,r,i,a){void 0===n&&(n=.9),void 0===r&&(r=0),void 0===i&&(i=null),void 0===a&&(a=!1);var o=t.call(this)||this;return o.learningRate=e,o.decay=n,o.momentum=r,o.epsilon=i,o.accumulatedMeanSquares={},o.accumulatedMeanGrads={},o.accumulatedMoments={},o.c=Kt(Me(e)),o.decayScalar=Kt(Me(n)),o.momentumScalar=Kt(Me(r)),o.oneMinusDecay=Kt(Me(1-n)),o.centered=a,null===i&&(i=zt.get("EPSILON")),o.epsilonScalar=Kt(Me(i)),o}return s(e,t),e.prototype.applyGradients=function(t){var e=this,n=function(n){var i=zt.engine.registeredVariables[n];null==r.accumulatedMeanSquares[n]&&Gt(function(){e.accumulatedMeanSquares[n]=je(i).variable(!1)}),null==r.accumulatedMeanGrads[n]&&r.centered&&Gt(function(){e.accumulatedMeanGrads[n]=je(i).variable(!1)}),null==r.accumulatedMoments[n]&&Gt(function(){e.accumulatedMoments[n]=je(i).variable(!1)});var a=r.accumulatedMeanSquares[n],o=r.accumulatedMeanGrads[n],s=r.accumulatedMoments[n],c=t[n];Gt(function(){var t=e.decayScalar.mul(a).add(e.oneMinusDecay.mul(c.square()));if(e.centered){var r=e.decayScalar.mul(o).add(e.oneMinusDecay.mul(c)),u=e.momentumScalar.mul(s).add(e.c.mul(c).div(t.sub(r.square().add(e.epsilonScalar)).sqrt()));e.accumulatedMeanSquares[n].assign(t),e.accumulatedMeanGrads[n].assign(r),e.accumulatedMoments[n].assign(u);var l=i.sub(u);i.assign(l)}else{var d=e.decayScalar.mul(a).add(e.oneMinusDecay.mul(c.square()));u=e.momentumScalar.mul(s).add(e.c.mul(c).div(d.add(e.epsilonScalar).sqrt())),e.accumulatedMeanSquares[n].assign(d),e.accumulatedMoments[n].assign(u),l=i.sub(u),i.assign(l)}})},r=this;for(var i in t)n(i)},e.prototype.dispose=function(){var t=this;this.c.dispose(),this.epsilonScalar.dispose(),this.decayScalar.dispose(),this.momentumScalar.dispose(),this.oneMinusDecay.dispose(),null!=this.accumulatedMeanSquares&&Object.keys(this.accumulatedMeanSquares).forEach(function(e){return t.accumulatedMeanSquares[e].dispose()}),null!=this.accumulatedMeanGrads&&this.centered&&Object.keys(this.accumulatedMeanGrads).forEach(function(e){return t.accumulatedMeanGrads[e].dispose()}),null!=this.accumulatedMoments&&Object.keys(this.accumulatedMoments).forEach(function(e){return t.accumulatedMoments[e].dispose()})},e.prototype.getConfig=function(){return{learningRate:this.learningRate,decay:this.decay,momentum:this.momentum,epsilon:this.epsilon,centered:this.centered}},e.fromConfig=function(t,e){return new t(e.learningRate,e.decay,e.momentum,e.epsilon,e.centered)},e.className="RMSPropOptimizer",e}(Pl);Ml(Fl);var Yl=function(){function t(){}return t.sgd=function(t){return new Bl(t)},t.momentum=function(t,e,n){return void 0===n&&(n=!1),new jl(t,e,n)},t.rmsprop=function(t,e,n,r,i){return void 0===e&&(e=.9),void 0===n&&(n=0),void 0===r&&(r=null),void 0===i&&(i=!1),new Fl(t,e,n,r,i)},t.adam=function(t,e,n,r){return void 0===t&&(t=.001),void 0===e&&(e=.9),void 0===n&&(n=.999),void 0===r&&(r=null),new Al(t,e,n,r)},t.adadelta=function(t,e,n){return void 0===t&&(t=.001),void 0===e&&(e=.95),void 0===n&&(n=null),new Ol(t,e,n)},t.adamax=function(t,e,n,r,i){return void 0===t&&(t=.002),void 0===e&&(e=.9),void 0===n&&(n=.999),void 0===r&&(r=null),void 0===i&&(i=0),new Nl(t,e,n,r,i)},t.adagrad=function(t,e){return void 0===e&&(e=.1),new Ll(t,e)},t}();Yl.sgd,Yl.momentum,Yl.adadelta,Yl.adagrad,Yl.rmsprop,Yl.adamax,Yl.adam,Ft.setBackend,Ft.getBackend,Ft.disposeVariables,Ft.memory;!function(t){dt=t}(Tu)}).call(e,n(26),n(20),n(107).setImmediate,n(19).Buffer)},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var n,r,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(t){n=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var c,u=[],l=!1,d=-1;function f(){l&&c&&(l=!1,c.length?u=c.concat(u):d=-1,u.length&&h())}function h(){if(!l){var t=s(f);l=!0;for(var e=u.length;e;){for(c=u,u=[];++d<e;)c&&c[d].run();d=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new p(t,e)),1!==u.length||l||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){var r=n(18),i=n(57);t.exports=n(17)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(12),i=n(27),a=n(30),o=n(58)("src"),s=n(405),c=(""+s).split("toString");n(37).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var u="function"==typeof n;u&&(a(n,"name")||i(n,"name",e)),t[e]!==n&&(u&&(a(n,o)||i(n,o,t[e]?""+t[e]:c.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[o]||s.call(this)})},function(t,e,n){var r=n(4),i=n(13),a=n(44),o=/"/g,s=function(t,e,n,r){var i=String(a(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+String(r).replace(o,"&quot;")+'"'),s+">"+i+"</"+e+">"};t.exports=function(t,e){var n={};n[t]=e(s),r(r.P+r.F*i(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(80),i=n(44);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(81),i=n(57),a=n(31),o=n(43),s=n(30),c=n(297),u=Object.getOwnPropertyDescriptor;e.f=n(17)?u:function(t,e){if(t=a(t),e=o(e,!0),c)try{return u(t,e)}catch(t){}if(s(t,e))return i(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(30),i=n(21),a=n(121)("IE_PROTO"),o=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?o:null}},function(t,e,n){"use strict";var r=n(333),i=n(612),a=Object.prototype.toString;function o(t){return"[object Array]"===a.call(t)}function s(t){return null!==t&&"object"==typeof t}function c(t){return"[object Function]"===a.call(t)}function u(t,e){if(null!==t&&void 0!==t)if("object"!=typeof t&&(t=[t]),o(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:o,isArrayBuffer:function(t){return"[object ArrayBuffer]"===a.call(t)},isBuffer:i,isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:s,isUndefined:function(t){return void 0===t},isDate:function(t){return"[object Date]"===a.call(t)},isFile:function(t){return"[object File]"===a.call(t)},isBlob:function(t){return"[object Blob]"===a.call(t)},isFunction:c,isStream:function(t){return s(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:u,merge:function t(){var e={};function n(n,r){"object"==typeof e[r]&&"object"==typeof n?e[r]=t(e[r],n):e[r]=n}for(var r=0,i=arguments.length;r<i;r++)u(arguments[r],n);return e},extend:function(t,e,n){return u(e,function(e,i){t[i]=n&&"function"==typeof e?r(e,n):e}),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(t,e){function n(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=n,n.equal=function(t,e,n){if(t!=e)throw new Error(n||"Assertion failed: "+t+" != "+e)}},function(t,e,n){"use strict";var r=e,i=n(22),a=n(35),o=n(368);r.assert=a,r.toArray=o.toArray,r.zero2=o.zero2,r.toHex=o.toHex,r.encode=o.encode,r.getNAF=function(t,e){for(var n=[],r=1<<e+1,i=t.clone();i.cmpn(1)>=0;){var a;if(i.isOdd()){var o=i.andln(r-1);a=o>(r>>1)-1?(r>>1)-o:o,i.isubn(a)}else a=0;n.push(a);for(var s=0!==i.cmpn(0)&&0===i.andln(r-1)?e+1:1,c=1;c<s;c++)n.push(0);i.iushrn(s)}return n},r.getJSF=function(t,e){var n=[[],[]];t=t.clone(),e=e.clone();for(var r=0,i=0;t.cmpn(-r)>0||e.cmpn(-i)>0;){var a,o,s,c=t.andln(3)+r&3,u=e.andln(3)+i&3;3===c&&(c=-1),3===u&&(u=-1),a=0==(1&c)?0:3!=(s=t.andln(7)+r&7)&&5!==s||2!==u?c:-c,n[0].push(a),o=0==(1&u)?0:3!=(s=e.andln(7)+i&7)&&5!==s||2!==c?u:-u,n[1].push(o),2*r===a+1&&(r=1-r),2*i===o+1&&(i=1-i),t.iushrn(1),e.iushrn(1)}return n},r.cachedProperty=function(t,e,n){var r="_"+e;t.prototype[e]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},r.parseBytes=function(t){return"string"==typeof t?r.toArray(t,"hex"):t},r.intFromLE=function(t){return new i(t,"hex","le")}},function(t,e){var n=t.exports={version:"2.6.9"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(25);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){"use strict";var r=n(13);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){var r;r=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=68)}([function(t,e,n){"use strict";var r=n(30),i=n(111),a=Object.prototype.toString;function o(t){return"[object Array]"===a.call(t)}function s(t){return null!==t&&"object"==typeof t}function c(t){return"[object Function]"===a.call(t)}function u(t,e){if(null!==t&&void 0!==t)if("object"!=typeof t&&(t=[t]),o(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:o,isArrayBuffer:function(t){return"[object ArrayBuffer]"===a.call(t)},isBuffer:i,isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:s,isUndefined:function(t){return void 0===t},isDate:function(t){return"[object Date]"===a.call(t)},isFile:function(t){return"[object File]"===a.call(t)},isBlob:function(t){return"[object Blob]"===a.call(t)},isFunction:c,isStream:function(t){return s(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:u,merge:function t(){var e={};function n(n,r){"object"==typeof e[r]&&"object"==typeof n?e[r]=t(e[r],n):e[r]=n}for(var r=0,i=arguments.length;r<i;r++)u(arguments[r],n);return e},extend:function(t,e,n){return u(e,function(e,i){t[i]=n&&"function"==typeof e?r(e,n):e}),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(42)("wks"),i=n(47),a=n(1).Symbol,o="function"==typeof a;(t.exports=function(t){return r[t]||(r[t]=o&&a[t]||(o?a:i)("Symbol."+t))}).store=r},function(t,e,n){"use strict";var r=!0,i={disableLog:function(t){return"boolean"!=typeof t?new Error("Argument type: "+typeof t+". Please use a boolean."):(r=t,t?"adapter.js logging disabled":"adapter.js logging enabled")},log:function(){if("object"==typeof window){if(r)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}},extractVersion:function(t,e,n){var r=t.match(e);return r&&r.length>=n&&parseInt(r[n],10)},detectBrowser:function(){var t={browser:null,version:null};if("undefined"==typeof window||!window.navigator)return t.browser="Not a browser.",t;if(navigator.mozGetUserMedia)t.browser="firefox",t.version=this.extractVersion(navigator.userAgent,/Firefox\/([0-9]+)\./,1);else if(navigator.webkitGetUserMedia)if(window.webkitRTCPeerConnection)t.browser="chrome",t.version=this.extractVersion(navigator.userAgent,/Chrom(e|ium)\/([0-9]+)\./,2);else{if(!navigator.userAgent.match(/Version\/(\d+).(\d+)/))return t.browser="Unsupported webkit-based browser with GUM support but no WebRTC support.",t;t.browser="safari",t.version=this.extractVersion(navigator.userAgent,/AppleWebKit\/([0-9]+)\./,1)}else{if(!navigator.mediaDevices||!navigator.userAgent.match(/Edge\/(\d+).(\d+)$/))return t.browser="Not a supported browser.",t;t.browser="edge",t.version=this.extractVersion(navigator.userAgent,/Edge\/(\d+).(\d+)$/,2)}return t}};t.exports={log:i.log,disableLog:i.disableLog,browserDetails:i.detectBrowser(),extractVersion:i.extractVersion}},function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(9);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var r=n(15),i=n(41);t.exports=n(7)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){t.exports=!n(19)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(1),i=n(4),a=n(13),o=n(6),s=n(14),c=function(t,e,n){var u,l,d,f=t&c.F,h=t&c.G,p=t&c.S,m=t&c.P,v=t&c.B,_=t&c.W,g=h?i:i[e]||(i[e]={}),b=g.prototype,y=h?r:p?r[e]:(r[e]||{}).prototype;for(u in h&&(n=e),n)(l=!f&&y&&void 0!==y[u])&&s(g,u)||(d=l?y[u]:n[u],g[u]=h&&"function"!=typeof y[u]?n[u]:v&&l?a(d,r):_&&y[u]==d?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(d):m&&"function"==typeof d?a(Function.call,d):d,m&&((g.virtual||(g.virtual={}))[u]=d,t&c.R&&b&&!b[u]&&o(b,u,d)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){t.exports={}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(11);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(5),i=n(79),a=n(99),o=Object.defineProperty;e.f=n(7)?Object.defineProperty:function(t,e,n){if(r(t),e=a(e,!0),r(n),i)try{return o(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){"use strict";(function(e){var r=n(0),i=n(65),a={"Content-Type":"application/x-www-form-urlencoded"};function o(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var s,c={adapter:("undefined"!=typeof XMLHttpRequest?s=n(26):void 0!==e&&(s=n(26)),s),transformRequest:[function(t,e){return i(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(o(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)?(o(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],function(t){c.headers[t]={}}),r.forEach(["post","put","patch"],function(t){c.headers[t]=r.merge(a)}),t.exports=c}).call(e,n(112))},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(9),i=n(1).document,a=r(i)&&r(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=!0},function(t,e,n){"use strict";var r=n(11);t.exports.f=function(t){return new function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=r(e),this.reject=r(n)}(t)}},function(t,e,n){var r=n(15).f,i=n(14),a=n(2)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,a)&&r(t,a,{configurable:!0,value:e})}},function(t,e,n){var r=n(42)("keys"),i=n(47);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(36),i=n(17);t.exports=function(t){return r(i(t))}},function(t,e,n){"use strict";var r=n(0),i=n(57),a=n(60),o=n(66),s=n(64),c=n(29),u="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(59);t.exports=function(t){return new Promise(function(e,l){var d=t.data,f=t.headers;r.isFormData(d)&&delete f["Content-Type"];var h=new XMLHttpRequest,p="onreadystatechange",m=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in h||s(t.url)||(h=new window.XDomainRequest,p="onload",m=!0,h.onprogress=function(){},h.ontimeout=function(){}),t.auth){var v=t.auth.username||"",_=t.auth.password||"";f.Authorization="Basic "+u(v+":"+_)}if(h.open(t.method.toUpperCase(),a(t.url,t.params,t.paramsSerializer),!0),h.timeout=t.timeout,h[p]=function(){if(h&&(4===h.readyState||m)&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in h?o(h.getAllResponseHeaders()):null,r={data:t.responseType&&"text"!==t.responseType?h.response:h.responseText,status:1223===h.status?204:h.status,statusText:1223===h.status?"No Content":h.statusText,headers:n,config:t,request:h};i(e,l,r),h=null}},h.onerror=function(){l(c("Network Error",t,null,h)),h=null},h.ontimeout=function(){l(c("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var g=n(62),b=(t.withCredentials||s(t.url))&&t.xsrfCookieName?g.read(t.xsrfCookieName):void 0;b&&(f[t.xsrfHeaderName]=b)}if("setRequestHeader"in h&&r.forEach(f,function(t,e){void 0===d&&"content-type"===e.toLowerCase()?delete f[e]:h.setRequestHeader(e,t)}),t.withCredentials&&(h.withCredentials=!0),t.responseType)try{h.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&h.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){h&&(h.abort(),l(t),h=null)}),void 0===d&&(d=null),h.send(d)})}},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";var r=n(56);t.exports=function(t,e,n,i,a){var o=new Error(t);return r(o,e,n,i,a)}},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=u(n(32)),i=u(n(72)),a=u(n(70)),o=u(n(71)),s=u(n(50)),c=u(n(110));function u(t){return t&&t.__esModule?t:{default:t}}e.default={name:"vue-cam-vision",data:function(){return{source:null,canvas:null,camerasListEmitted:!1,cameras:[],imageCapture:{},captures:[],imgReport:null,lastVideoMode:"deviceId",camsList:{back:null,front:null},inited:!1}},props:{width:{type:[Number,String],default:"100%"},height:{type:[Number,String],default:500},autoplay:{type:Boolean,default:!0},screenshotFormat:{type:String,default:"image/jpeg"},deviceId:{type:String,default:null},playsinline:{type:Boolean,default:!0},mediaConstraints:{type:Object,default:function(){return{video:!0,audio:!1}}},isFrontCam:{type:Boolean,default:!0},maxSnapshot:{type:[Number],default:3},googleKey:{type:String,default:null},debug:{type:Boolean,default:!1}},watch:{deviceId:function(t,e){t!==e&&this.changeCamera(t)},isFrontCam:function(t,e){t!==e&&this.changeFrontBack(t)},captures:function(t){this.$emit("capturedImages",t)}},computed:{supportFacingMode:function(){return navigator.mediaDevices.getSupportedConstraints().facingMode?"Supported!":"Not supported!"},Contraints:function(){var t=this.mediaConstraints.video.facingMode||(this.isFrontCam?"user":"environment");return{video:(0,o.default)({},this.mediaConstraints.video,this.deviceId?{deviceId:{exact:this.deviceId}}:{},{facingMode:t}),audio:this.mediaConstraints.audio}}},mounted:function(){this.setup()},methods:{loadSrcStream:function(t){var e=this;if("srcObject"in this.$refs.video)try{this.$refs.video.srcObject=t}catch(t){console.log(t)}else this.source=window.HTMLMediaElement.srcObject(t);this.video.onloadedmetadata=function(){e.video.play()},this.video.play(),this.$emit("started",t)},changeCamera:function(t){this.stop(),this.$emit("camera-change",t),this.deviceId=t,this.loadCamera()},loadCameras:function(){var t=this;return(0,a.default)(i.default.mark(function e(){var n;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,navigator.mediaDevices.enumerateDevices();case 3:n=e.sent,t.debug&&console.log(n),n.forEach(function(e){"videoinput"===e.kind&&(t.cameras.push(e),-1!==e.label.toLowerCase().indexOf("back")&&(t.camsList.back=e),-1!==e.label.toLowerCase().indexOf("front")&&(t.camsList.front=e))}),t.camerasListEmitted||(t.$emit("cameras",t.cameras),t.camerasListEmitted=!0),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),t.$emit("notsupported",e.t0),console.log(e.t0);case 13:case"end":return e.stop()}},e,t,[[0,9]])}))()},stopStreamedVideo:function(t){var e=this,n=t.srcObject;n.getTracks().forEach(function(t){t.stop(),e.$emit("stopped",n),e.$refs.video.srcObject=null,e.source=null})},stop:function(){null!==this.$refs.video&&this.$refs.video.srcObject&&(this.debug&&console.log("stoping"),this.stopStreamedVideo(this.$refs.video))},setup:function(){var t=this;return(0,a.default)(i.default.mark(function e(){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.loadCameras();case 2:t.start();case 3:case"end":return e.stop()}},e,t)}))()},start:function(){this.loadCamera()},isMobile:function(){return void 0!==window.orientation},toggleFrontBack:function(){this.isFrontCam=!this.isFrontCam},changeFrontBack:function(t){t&&this.camsList.front&&this.changeCamera(this.camsList.front.deviceId),!t&&this.camsList.back&&this.changeCamera(this.camsList.back.deviceId)},loadCamera:function(){var t=this;this.debug&&console.log(this.Contraints),(0,c.default)(this.Contraints,function(e,n){if(e)return t.$emit("error",e),void console.log("failed to get user camera");if(window.ImageCapture){var r=n.getVideoTracks()[0];t.imageCapture=new ImageCapture(r)}t.video=t.$refs.video,t.loadSrcStream(n)})},capture:function(){var t=this;return(0,a.default)(i.default.mark(function e(){var n,r;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!window.ImageCapture){e.next=5;break}return e.next=3,t.gCapture();case 3:return n=e.sent,e.abrupt("return",n);case 5:return t.canvas=t.getCanvas(),r=t.canvas.toDataURL(t.screenshotFormat,1),t.saveSnapShot(r),e.abrupt("return",r);case 9:case"end":return e.stop()}},e,t)}))()},saveSnapShot:function(t){return this.captures.length>this.maxSnapshot&&this.captures.shift(),this.captures.push({image:t,imgReport:{}}),t},gCapture:function(){var t=this;return(0,a.default)(i.default.mark(function e(){var n,a,o;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.imageCapture.takePhoto();case 2:return n=e.sent,a=new FileReader,o=null,e.abrupt("return",new r.default(function(e,r){a.onerror=function(t){console.error(t),a.abort(),r()},a.onloadend=function(){o=a.result,t.saveSnapShot(o),t.debug&&console.log(o),e(o)},a.readAsDataURL(n)}));case 6:case"end":return e.stop()}},e,t)}))()},getCanvas:function(){var t=this.$refs.video;if(!this.ctx){var e=document.createElement("canvas");e.height=t.videoHeight,e.width=t.videoWidth,this.canvas=e,this.ctx=e.getContext("2d")}var n=this.ctx,r=this.canvas;return n.drawImage(t,0,0,r.width,r.height),r},googleVision:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"LABEL_DETECTION",n=arguments[1];return(0,a.default)(i.default.mark(function r(){var a,o,c,u,l;return i.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(t.googleKey){r.next=3;break}return console.log("no google key detected"),r.abrupt("return");case 3:return a="https://vision.googleapis.com/v1/images:annotate?key="+t.googleKey,o=n,n&&void 0!==n||(o=t.captures.length-1),c={requests:[{image:{content:t.captures[o].image.replace("data:image/jpeg;base64,","")},features:{type:e}}]},r.next=9,s.default.post(a,c);case 9:return u=r.sent,(l=u.data)&&l.responses[0]&&(t.imgReport=l.responses[0],t.captures[o].imgReport=l.responses[0]),t.debug&&console.log(t.imgReport),t.$emit("googleReport",t.imgReport),r.abrupt("return",t.imgReport);case 15:case"end":return r.stop()}},r,t)}))()}}}},function(t,e,n){t.exports={default:n(74),__esModule:!0}},function(t,e,n){var r=n(12),i=n(2)("toStringTag"),a="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,o;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:a?r(e):"Object"==(o=r(e))&&"function"==typeof e.callee?"Arguments":o}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(1).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(12);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){"use strict";var r=n(20),i=n(8),a=n(95),o=n(6),s=n(10),c=n(83),u=n(22),l=n(91),d=n(2)("iterator"),f=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,e,n,p,m,v,_){c(n,e,p);var g,b,y,x=function(t){if(!f&&t in E)return E[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},w=e+" Iterator",k="values"==m,C=!1,E=t.prototype,S=E[d]||E["@@iterator"]||m&&E[m],I=S||x(m),M=m?k?x("entries"):I:void 0,T="Array"==e&&E.entries||S;if(T&&(y=l(T.call(new t)))!==Object.prototype&&y.next&&(u(y,w,!0),r||"function"==typeof y[d]||o(y,d,h)),k&&S&&"values"!==S.name&&(C=!0,I=function(){return S.call(this)}),r&&!_||!f&&!C&&E[d]||o(E,d,I),s[e]=I,s[w]=h,m)if(g={values:k?I:x("values"),keys:v?I:x("keys"),entries:M},_)for(b in g)b in E||a(E,b,g[b]);else i(i.P+i.F*(f||C),e,g);return g}},function(t,e,n){var r=n(92),i=n(34);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var r=n(5),i=n(9),a=n(21);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=a.f(t);return(0,n.resolve)(e),n.promise}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(4),i=n(1),a=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(20)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(5),i=n(11),a=n(2)("species");t.exports=function(t,e){var n,o=r(t).constructor;return void 0===o||void 0==(n=r(o)[a])?e:i(n)}},function(t,e,n){var r,i,a,o=n(13),s=n(80),c=n(35),u=n(18),l=n(1),d=l.process,f=l.setImmediate,h=l.clearImmediate,p=l.MessageChannel,m=l.Dispatch,v=0,_={},g=function(){var t=+this;if(_.hasOwnProperty(t)){var e=_[t];delete _[t],e()}},b=function(t){g.call(t.data)};f&&h||(f=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return _[++v]=function(){s("function"==typeof t?t:Function(t),e)},r(v),v},h=function(t){delete _[t]},"process"==n(12)(d)?r=function(t){d.nextTick(o(g,t,1))}:m&&m.now?r=function(t){m.now(o(g,t,1))}:p?(a=(i=new p).port2,i.port1.onmessage=b,r=o(a.postMessage,a,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(t){l.postMessage(t+"","*")},l.addEventListener("message",b,!1)):r="onreadystatechange"in u("script")?function(t){c.appendChild(u("script")).onreadystatechange=function(){c.removeChild(this),g.call(t)}}:function(t){setTimeout(o(g,t,1),0)}),t.exports={set:f,clear:h}},function(t,e,n){var r=n(24),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){var r=n(17);t.exports=function(t){return Object(r(t))}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(31),i=n.n(r);for(var a in r)["default","default"].indexOf(a)<0&&function(t){n.d(e,t,function(){return r[t]})}(a);e.default=i.a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(116),i=n(48);for(var a in i)["default","default"].indexOf(a)<0&&function(t){n.d(e,t,function(){return i[t]})}(a);var o=n(118),s=n.i(o.a)(i.default,r.a,r.b,!1,null,null,null);s.options.__file="webcam.vue",e.default=s.exports},function(t,e,n){t.exports=n(51)},function(t,e,n){"use strict";var r=n(0),i=n(30),a=n(53),o=n(16);function s(t){var e=new a(t),n=i(a.prototype.request,e);return r.extend(n,a.prototype,e),r.extend(n,e),n}var c=s(o);c.Axios=a,c.create=function(t){return s(r.merge(o,t))},c.Cancel=n(27),c.CancelToken=n(52),c.isCancel=n(28),c.all=function(t){return Promise.all(t)},c.spread=n(67),t.exports=c,t.exports.default=c},function(t,e,n){"use strict";var r=n(27);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new r(t),e(n.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t;return{token:new i(function(e){t=e}),cancel:t}},t.exports=i},function(t,e,n){"use strict";var r=n(16),i=n(0),a=n(54),o=n(55);function s(t){this.defaults=t,this.interceptors={request:new a,response:new a}}s.prototype.request=function(t){"string"==typeof t&&(t=i.merge({url:arguments[0]},arguments[1])),(t=i.merge(r,{method:"get"},this.defaults,t)).method=t.method.toLowerCase();var e=[o,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)n=n.then(e.shift(),e.shift());return n},i.forEach(["delete","get","head","options"],function(t){s.prototype[t]=function(e,n){return this.request(i.merge(n||{},{method:t,url:e}))}}),i.forEach(["post","put","patch"],function(t){s.prototype[t]=function(e,n,r){return this.request(i.merge(r||{},{method:t,url:e,data:n}))}}),t.exports=s},function(t,e,n){"use strict";var r=n(0);function i(){this.handlers=[]}i.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=i},function(t,e,n){"use strict";var r=n(0),i=n(58),a=n(28),o=n(16),s=n(63),c=n(61);function u(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return u(t),t.baseURL&&!s(t.url)&&(t.url=c(t.baseURL,t.url)),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||o.adapter)(t).then(function(e){return u(t),e.data=i(e.data,e.headers,t.transformResponse),e},function(e){return a(e)||(u(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t}},function(t,e,n){"use strict";var r=n(29);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},function(t,e,n){"use strict";var r=n(0);t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},function(t,e,n){"use strict";var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function i(){this.message="String contains an invalid character"}i.prototype=new Error,i.prototype.code=5,i.prototype.name="InvalidCharacterError",t.exports=function(t){for(var e,n,a=String(t),o="",s=0,c=r;a.charAt(0|s)||(c="=",s%1);o+=c.charAt(63&e>>8-s%1*8)){if((n=a.charCodeAt(s+=.75))>255)throw new i;e=e<<8|n}return o}},function(t,e,n){"use strict";var r=n(0);function i(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var a;if(n)a=n(e);else if(r.isURLSearchParams(e))a=e.toString();else{var o=[];r.forEach(e,function(t,e){null!==t&&void 0!==t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),o.push(i(e)+"="+i(t))}))}),a=o.join("&")}return a&&(t+=(-1===t.indexOf("?")?"?":"&")+a),t}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";var r=n(0);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,a,o){var s=[];s.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(a)&&s.push("domain="+a),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";var r=n(0);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},function(t,e,n){"use strict";var r=n(0);t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},function(t,e,n){"use strict";var r=n(0),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,a,o={};return t?(r.forEach(t.split("\n"),function(t){if(a=t.indexOf(":"),e=r.trim(t.substr(0,a)).toLowerCase(),n=r.trim(t.substr(a+1)),e){if(o[e]&&i.indexOf(e)>=0)return;o[e]="set-cookie"===e?(o[e]?o[e]:[]).concat([n]):o[e]?o[e]+", "+n:n}}),o):o}},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,n){"use strict";var r,i=n(49),a=(r=i)&&r.__esModule?r:{default:r};t.exports={WebCam:a.default,install:function t(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1];t.installed||e.component(a.default.name,a.default)}},t.exports.default=t.exports},function(t,e,n){t.exports={default:n(73),__esModule:!0}},function(t,e,n){"use strict";e.__esModule=!0;var r,i=n(32),a=(r=i)&&r.__esModule?r:{default:r};e.default=function(t){return function(){var e=t.apply(this,arguments);return new a.default(function(t,n){return function r(i,o){try{var s=e[i](o),c=s.value}catch(t){return void n(t)}if(!s.done)return a.default.resolve(c).then(function(t){r("next",t)},function(t){r("throw",t)});t(c)}("next")})}}},function(t,e,n){"use strict";e.__esModule=!0;var r,i=n(69),a=(r=i)&&r.__esModule?r:{default:r};e.default=a.default||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}},function(t,e,n){t.exports=n(113)},function(t,e,n){n(103),t.exports=n(4).Object.assign},function(t,e,n){n(104),n(106),n(109),n(105),n(107),n(108),t.exports=n(4).Promise},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(25),i=n(45),a=n(98);t.exports=function(t){return function(e,n,o){var s,c=r(e),u=i(c.length),l=a(o,u);if(t&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var r=n(13),i=n(82),a=n(81),o=n(5),s=n(45),c=n(101),u={},l={};(e=t.exports=function(t,e,n,d,f){var h,p,m,v,_=f?function(){return t}:c(t),g=r(n,d,e?2:1),b=0;if("function"!=typeof _)throw TypeError(t+" is not iterable!");if(a(_)){for(h=s(t.length);h>b;b++)if((v=e?g(o(p=t[b])[0],p[1]):g(t[b]))===u||v===l)return v}else for(m=_.call(t);!(p=m.next()).done;)if((v=i(m,g,p.value,e))===u||v===l)return v}).BREAK=u,e.RETURN=l},function(t,e,n){t.exports=!n(7)&&!n(19)(function(){return 7!=Object.defineProperty(n(18)("div"),"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(10),i=n(2)("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||a[i]===t)}},function(t,e,n){var r=n(5);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var a=t.return;throw void 0!==a&&r(a.call(t)),e}}},function(t,e,n){"use strict";var r=n(88),i=n(41),a=n(22),o={};n(6)(o,n(2)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(o,{next:i(1,n)}),a(t,e+" Iterator")}},function(t,e,n){var r=n(2)("iterator"),i=!1;try{var a=[7][r]();a.return=function(){i=!0},Array.from(a,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var a=[7],o=a[r]();o.next=function(){return{done:n=!0}},a[r]=function(){return o},t(a)}catch(t){}return n}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var r=n(1),i=n(44).set,a=r.MutationObserver||r.WebKitMutationObserver,o=r.process,s=r.Promise,c="process"==n(12)(o);t.exports=function(){var t,e,n,u=function(){var r,i;for(c&&(r=o.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(c)n=function(){o.nextTick(u)};else if(!a||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var l=s.resolve(void 0);n=function(){l.then(u)}}else n=function(){i.call(r,u)};else{var d=!0,f=document.createTextNode("");new a(u).observe(f,{characterData:!0}),n=function(){f.data=d=!d}}return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},function(t,e,n){"use strict";var r=n(38),i=n(90),a=n(93),o=n(46),s=n(36),c=Object.assign;t.exports=!c||n(19)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=r})?function(t,e){for(var n=o(t),c=arguments.length,u=1,l=i.f,d=a.f;c>u;)for(var f,h=s(arguments[u++]),p=l?r(h).concat(l(h)):r(h),m=p.length,v=0;m>v;)d.call(h,f=p[v++])&&(n[f]=h[f]);return n}:c},function(t,e,n){var r=n(5),i=n(89),a=n(34),o=n(23)("IE_PROTO"),s=function(){},c=function(){var t,e=n(18)("iframe"),r=a.length;for(e.style.display="none",n(35).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[a[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[o]=t):n=c(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(15),i=n(5),a=n(38);t.exports=n(7)?Object.defineProperties:function(t,e){i(t);for(var n,o=a(e),s=o.length,c=0;s>c;)r.f(t,n=o[c++],e[n]);return t}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(14),i=n(46),a=n(23)("IE_PROTO"),o=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?o:null}},function(t,e,n){var r=n(14),i=n(25),a=n(77)(!1),o=n(23)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),c=0,u=[];for(n in s)n!=o&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~a(u,n)||u.push(n));return u}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(6);t.exports=function(t,e,n){for(var i in e)n&&t[i]?t[i]=e[i]:r(t,i,e[i]);return t}},function(t,e,n){t.exports=n(6)},function(t,e,n){"use strict";var r=n(1),i=n(4),a=n(15),o=n(7),s=n(2)("species");t.exports=function(t){var e="function"==typeof i[t]?i[t]:r[t];o&&e&&!e[s]&&a.f(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(24),i=n(17);t.exports=function(t){return function(e,n){var a,o,s=String(i(e)),c=r(n),u=s.length;return c<0||c>=u?t?"":void 0:(a=s.charCodeAt(c))<55296||a>56319||c+1===u||(o=s.charCodeAt(c+1))<56320||o>57343?t?s.charAt(c):a:t?s.slice(c,c+2):o-56320+(a-55296<<10)+65536}}},function(t,e,n){var r=n(24),i=Math.max,a=Math.min;t.exports=function(t,e){return(t=r(t))<0?i(t+e,0):a(t,e)}},function(t,e,n){var r=n(9);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(1).navigator;t.exports=r&&r.userAgent||""},function(t,e,n){var r=n(33),i=n(2)("iterator"),a=n(10);t.exports=n(4).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||a[r(t)]}},function(t,e,n){"use strict";var r=n(75),i=n(85),a=n(10),o=n(25);t.exports=n(37)(Array,"Array",function(t,e){this._t=o(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(t,e,n){var r=n(8);r(r.S+r.F,"Object",{assign:n(87)})},function(t,e){},function(t,e,n){"use strict";var r,i,a,o,s=n(20),c=n(1),u=n(13),l=n(33),d=n(8),f=n(9),h=n(11),p=n(76),m=n(78),v=n(43),_=n(44).set,g=n(86)(),b=n(21),y=n(39),x=n(100),w=n(40),k=c.TypeError,C=c.process,E=C&&C.versions,S=E&&E.v8||"",I=c.Promise,M="process"==l(C),T=function(){},D=i=b.f,R=!!function(){try{var t=I.resolve(1),e=(t.constructor={})[n(2)("species")]=function(t){t(T,T)};return(M||"function"==typeof PromiseRejectionEvent)&&t.then(T)instanceof e&&0!==S.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(t){}}(),P=function(t){var e;return!(!f(t)||"function"!=typeof(e=t.then))&&e},O=function(t,e){if(!t._n){t._n=!0;var n=t._c;g(function(){for(var r=t._v,i=1==t._s,a=0,o=function(e){var n,a,o,s=i?e.ok:e.fail,c=e.resolve,u=e.reject,l=e.domain;try{s?(i||(2==t._h&&N(t),t._h=1),!0===s?n=r:(l&&l.enter(),n=s(r),l&&(l.exit(),o=!0)),n===e.promise?u(k("Promise-chain cycle")):(a=P(n))?a.call(n,c,u):c(n)):u(r)}catch(t){l&&!o&&l.exit(),u(t)}};n.length>a;)o(n[a++]);t._c=[],t._n=!1,e&&!t._h&&L(t)})}},L=function(t){_.call(c,function(){var e,n,r,i=t._v,a=A(t);if(a&&(e=y(function(){M?C.emit("unhandledRejection",i,t):(n=c.onunhandledrejection)?n({promise:t,reason:i}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=M||A(t)?2:1),t._a=void 0,a&&e.e)throw e.v})},A=function(t){return 1!==t._h&&0===(t._a||t._c).length},N=function(t){_.call(c,function(){var e;M?C.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})})},B=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),O(e,!0))},j=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw k("Promise can't be resolved itself");(e=P(t))?g(function(){var r={_w:n,_d:!1};try{e.call(t,u(j,r,1),u(B,r,1))}catch(t){B.call(r,t)}}):(n._v=t,n._s=1,O(n,!1))}catch(t){B.call({_w:n,_d:!1},t)}}};R||(I=function(t){p(this,I,"Promise","_h"),h(t),r.call(this);try{t(u(j,this,1),u(B,this,1))}catch(t){B.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(94)(I.prototype,{then:function(t,e){var n=D(v(this,I));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=M?C.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&O(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),a=function(){var t=new r;this.promise=t,this.resolve=u(j,t,1),this.reject=u(B,t,1)},b.f=D=function(t){return t===I||t===o?new a(t):i(t)}),d(d.G+d.W+d.F*!R,{Promise:I}),n(22)(I,"Promise"),n(96)("Promise"),o=n(4).Promise,d(d.S+d.F*!R,"Promise",{reject:function(t){var e=D(this);return(0,e.reject)(t),e.promise}}),d(d.S+d.F*(s||!R),"Promise",{resolve:function(t){return w(s&&this===o?I:this,t)}}),d(d.S+d.F*!(R&&n(84)(function(t){I.all(t).catch(T)})),"Promise",{all:function(t){var e=this,n=D(e),r=n.resolve,i=n.reject,a=y(function(){var n=[],a=0,o=1;m(t,!1,function(t){var s=a++,c=!1;n.push(void 0),o++,e.resolve(t).then(function(t){c||(c=!0,n[s]=t,--o||r(n))},i)}),--o||r(n)});return a.e&&i(a.v),n.promise},race:function(t){var e=this,n=D(e),r=n.reject,i=y(function(){m(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}})},function(t,e,n){"use strict";var r=n(97)(!0);n(37)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var r=n(8),i=n(4),a=n(1),o=n(43),s=n(40);r(r.P+r.R,"Promise",{finally:function(t){var e=o(this,i.Promise||a.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then(function(){return n})}:t,n?function(n){return s(e,t()).then(function(){throw n})}:t)}})},function(t,e,n){"use strict";var r=n(8),i=n(21),a=n(39);r(r.S,"Promise",{try:function(t){var e=i.f(this),n=a(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){n(102);for(var r=n(1),i=n(6),a=n(10),o=n(2)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),c=0;c<s.length;c++){var u=s[c],l=r[u],d=l&&l.prototype;d&&!d[o]&&i(d,o,u),a[u]=a.Array}},function(t,e,n){n(119);t.exports=function(t,e){var n,r="PermissionDeniedError";return 2===arguments.length||(e=t,t={video:!0,audio:!0}),"undefined"!=typeof navigator&&navigator.getUserMedia?t.audio||t.video?void navigator.mediaDevices.getUserMedia(t).then(function(t){e(null,t)}).catch(function(t){var n;"string"==typeof t?(n=new Error("MediaStreamError")).name=t===r||"PERMISSION_DENIED"===t?r:"ConstraintNotSatisfiedError":(n=t).name||(n[r]?t.name=r:t.name="ConstraintNotSatisfiedError"),e(n)}):((n=new Error("MediaStreamError")).name="NoMediaRequestedError",setTimeout(function(){e(n)},0)):((n=new Error("MediaStreamError")).name="NotSupportedError",setTimeout(function(){e(n)},0))}},function(t,e){function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}t.exports=function(t){return null!=t&&(n(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))}(t)||!!t._isBuffer)}},function(t,e){var n,r,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(t){n=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var c,u=[],l=!1,d=-1;function f(){l&&c&&(l=!1,c.length?u=c.concat(u):d=-1,u.length&&h())}function h(){if(!l){var t=s(f);l=!0;for(var e=u.length;e;){for(c=u,u=[];++d<e;)c&&c[d].run();d=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new p(t,e)),1!==u.length||l||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){var r=function(){return this}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,a=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n(114),i)r.regeneratorRuntime=a;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},function(t,e){!function(e){"use strict";var n,r=Object.prototype,i=r.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag",u="object"==typeof t,l=e.regeneratorRuntime;if(l)u&&(t.exports=l);else{(l=e.regeneratorRuntime=u?t.exports:{}).wrap=y;var d="suspendedStart",f="suspendedYield",h="executing",p="completed",m={},v={};v[o]=function(){return this};var _=Object.getPrototypeOf,g=_&&_(_(R([])));g&&g!==r&&i.call(g,o)&&(v=g);var b=C.prototype=w.prototype=Object.create(v);k.prototype=b.constructor=C,C.constructor=k,C[c]=k.displayName="GeneratorFunction",l.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===k||"GeneratorFunction"===(e.displayName||e.name))},l.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,C):(t.__proto__=C,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(b),t},l.awrap=function(t){return{__await:t}},E(S.prototype),S.prototype[s]=function(){return this},l.AsyncIterator=S,l.async=function(t,e,n,r){var i=new S(y(t,e,n,r));return l.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},E(b),b[c]="Generator",b[o]=function(){return this},b.toString=function(){return"[object Generator]"},l.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},l.values=R,D.prototype={constructor:D,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,i){return s.type="throw",s.arg=t,e.next=r,i&&(e.method="next",e.arg=n),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:R(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),m}}}function y(t,e,n,r){var i=e&&e.prototype instanceof w?e:w,a=Object.create(i.prototype),o=new D(r||[]);return a._invoke=function(t,e,n){var r=d;return function(i,a){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw a;return P()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=I(o,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var c=x(t,e,n);if("normal"===c.type){if(r=n.done?p:f,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=p,n.method="throw",n.arg=c.arg)}}}(t,n,o),a}function x(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function w(){}function k(){}function C(){}function E(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function S(t){var e;this._invoke=function(n,r){function a(){return new Promise(function(e,a){!function e(n,r,a,o){var s=x(t[n],t,r);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&i.call(u,"__await")?Promise.resolve(u.__await).then(function(t){e("next",t,a,o)},function(t){e("throw",t,a,o)}):Promise.resolve(u).then(function(t){c.value=t,a(c)},o)}o(s.arg)}(n,r,e,a)})}return e=e?e.then(a,a):a()}}function I(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,I(t,e),"throw"===e.method))return m;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var i=x(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,m;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function M(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(M,this),this.reset(!0)}function R(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=n,e.done=!0,e};return a.next=a}}return{next:P}}function P(){return{value:n,done:!0}}}(function(){return this}()||Function("return this")())},function(t,e,n){"use strict";var r={generateIdentifier:function(){return Math.random().toString(36).substr(2,10)}};r.localCName=r.generateIdentifier(),r.splitLines=function(t){return t.trim().split("\n").map(function(t){return t.trim()})},r.splitSections=function(t){return t.split("\nm=").map(function(t,e){return(e>0?"m="+t:t).trim()+"\r\n"})},r.matchPrefix=function(t,e){return r.splitLines(t).filter(function(t){return 0===t.indexOf(e)})},r.parseCandidate=function(t){for(var e,n={foundation:(e=0===t.indexOf("a=candidate:")?t.substring(12).split(" "):t.substring(10).split(" "))[0],component:e[1],protocol:e[2].toLowerCase(),priority:parseInt(e[3],10),ip:e[4],port:parseInt(e[5],10),type:e[7]},r=8;r<e.length;r+=2)switch(e[r]){case"raddr":n.relatedAddress=e[r+1];break;case"rport":n.relatedPort=parseInt(e[r+1],10);break;case"tcptype":n.tcpType=e[r+1];break;default:n[e[r]]=e[r+1]}return n},r.writeCandidate=function(t){var e=[];e.push(t.foundation),e.push(t.component),e.push(t.protocol.toUpperCase()),e.push(t.priority),e.push(t.ip),e.push(t.port);var n=t.type;return e.push("typ"),e.push(n),"host"!==n&&t.relatedAddress&&t.relatedPort&&(e.push("raddr"),e.push(t.relatedAddress),e.push("rport"),e.push(t.relatedPort)),t.tcpType&&"tcp"===t.protocol.toLowerCase()&&(e.push("tcptype"),e.push(t.tcpType)),"candidate:"+e.join(" ")},r.parseIceOptions=function(t){return t.substr(14).split(" ")},r.parseRtpMap=function(t){var e=t.substr(9).split(" "),n={payloadType:parseInt(e.shift(),10)};return e=e[0].split("/"),n.name=e[0],n.clockRate=parseInt(e[1],10),n.numChannels=3===e.length?parseInt(e[2],10):1,n},r.writeRtpMap=function(t){var e=t.payloadType;return void 0!==t.preferredPayloadType&&(e=t.preferredPayloadType),"a=rtpmap:"+e+" "+t.name+"/"+t.clockRate+(1!==t.numChannels?"/"+t.numChannels:"")+"\r\n"},r.parseExtmap=function(t){var e=t.substr(9).split(" ");return{id:parseInt(e[0],10),direction:e[0].indexOf("/")>0?e[0].split("/")[1]:"sendrecv",uri:e[1]}},r.writeExtmap=function(t){return"a=extmap:"+(t.id||t.preferredId)+(t.direction&&"sendrecv"!==t.direction?"/"+t.direction:"")+" "+t.uri+"\r\n"},r.parseFmtp=function(t){for(var e,n={},r=t.substr(t.indexOf(" ")+1).split(";"),i=0;i<r.length;i++)n[(e=r[i].trim().split("="))[0].trim()]=e[1];return n},r.writeFmtp=function(t){var e="",n=t.payloadType;if(void 0!==t.preferredPayloadType&&(n=t.preferredPayloadType),t.parameters&&Object.keys(t.parameters).length){var r=[];Object.keys(t.parameters).forEach(function(e){r.push(e+"="+t.parameters[e])}),e+="a=fmtp:"+n+" "+r.join(";")+"\r\n"}return e},r.parseRtcpFb=function(t){var e=t.substr(t.indexOf(" ")+1).split(" ");return{type:e.shift(),parameter:e.join(" ")}},r.writeRtcpFb=function(t){var e="",n=t.payloadType;return void 0!==t.preferredPayloadType&&(n=t.preferredPayloadType),t.rtcpFeedback&&t.rtcpFeedback.length&&t.rtcpFeedback.forEach(function(t){e+="a=rtcp-fb:"+n+" "+t.type+(t.parameter&&t.parameter.length?" "+t.parameter:"")+"\r\n"}),e},r.parseSsrcMedia=function(t){var e=t.indexOf(" "),n={ssrc:parseInt(t.substr(7,e-7),10)},r=t.indexOf(":",e);return r>-1?(n.attribute=t.substr(e+1,r-e-1),n.value=t.substr(r+1)):n.attribute=t.substr(e+1),n},r.getMid=function(t){var e=r.matchPrefix(t,"a=mid:")[0];if(e)return e.substr(6)},r.parseFingerprint=function(t){var e=t.substr(14).split(" ");return{algorithm:e[0].toLowerCase(),value:e[1]}},r.getDtlsParameters=function(t,e){return{role:"auto",fingerprints:r.matchPrefix(t+e,"a=fingerprint:").map(r.parseFingerprint)}},r.writeDtlsParameters=function(t,e){var n="a=setup:"+e+"\r\n";return t.fingerprints.forEach(function(t){n+="a=fingerprint:"+t.algorithm+" "+t.value+"\r\n"}),n},r.getIceParameters=function(t,e){var n=r.splitLines(t);return{usernameFragment:(n=n.concat(r.splitLines(e))).filter(function(t){return 0===t.indexOf("a=ice-ufrag:")})[0].substr(12),password:n.filter(function(t){return 0===t.indexOf("a=ice-pwd:")})[0].substr(10)}},r.writeIceParameters=function(t){return"a=ice-ufrag:"+t.usernameFragment+"\r\na=ice-pwd:"+t.password+"\r\n"},r.parseRtpParameters=function(t){for(var e={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},n=r.splitLines(t)[0].split(" "),i=3;i<n.length;i++){var a=n[i],o=r.matchPrefix(t,"a=rtpmap:"+a+" ")[0];if(o){var s=r.parseRtpMap(o),c=r.matchPrefix(t,"a=fmtp:"+a+" ");switch(s.parameters=c.length?r.parseFmtp(c[0]):{},s.rtcpFeedback=r.matchPrefix(t,"a=rtcp-fb:"+a+" ").map(r.parseRtcpFb),e.codecs.push(s),s.name.toUpperCase()){case"RED":case"ULPFEC":e.fecMechanisms.push(s.name.toUpperCase())}}}return r.matchPrefix(t,"a=extmap:").forEach(function(t){e.headerExtensions.push(r.parseExtmap(t))}),e},r.writeRtpDescription=function(t,e){var n="";n+="m="+t+" ",n+=e.codecs.length>0?"9":"0",n+=" UDP/TLS/RTP/SAVPF ",n+=e.codecs.map(function(t){return void 0!==t.preferredPayloadType?t.preferredPayloadType:t.payloadType}).join(" ")+"\r\n",n+="c=IN IP4 0.0.0.0\r\n",n+="a=rtcp:9 IN IP4 0.0.0.0\r\n",e.codecs.forEach(function(t){n+=r.writeRtpMap(t),n+=r.writeFmtp(t),n+=r.writeRtcpFb(t)});var i=0;return e.codecs.forEach(function(t){t.maxptime>i&&(i=t.maxptime)}),i>0&&(n+="a=maxptime:"+i+"\r\n"),n+="a=rtcp-mux\r\n",e.headerExtensions.forEach(function(t){n+=r.writeExtmap(t)}),n},r.parseRtpEncodingParameters=function(t){var e,n=[],i=r.parseRtpParameters(t),a=-1!==i.fecMechanisms.indexOf("RED"),o=-1!==i.fecMechanisms.indexOf("ULPFEC"),s=r.matchPrefix(t,"a=ssrc:").map(function(t){return r.parseSsrcMedia(t)}).filter(function(t){return"cname"===t.attribute}),c=s.length>0&&s[0].ssrc,u=r.matchPrefix(t,"a=ssrc-group:FID").map(function(t){var e=t.split(" ");return e.shift(),e.map(function(t){return parseInt(t,10)})});u.length>0&&u[0].length>1&&u[0][0]===c&&(e=u[0][1]),i.codecs.forEach(function(t){if("RTX"===t.name.toUpperCase()&&t.parameters.apt){var r={ssrc:c,codecPayloadType:parseInt(t.parameters.apt,10),rtx:{ssrc:e}};n.push(r),a&&((r=JSON.parse(JSON.stringify(r))).fec={ssrc:e,mechanism:o?"red+ulpfec":"red"},n.push(r))}}),0===n.length&&c&&n.push({ssrc:c});var l=r.matchPrefix(t,"b=");return l.length&&(0===l[0].indexOf("b=TIAS:")?l=parseInt(l[0].substr(7),10):0===l[0].indexOf("b=AS:")&&(l=parseInt(l[0].substr(5),10)),n.forEach(function(t){t.maxBitrate=l})),n},r.parseRtcpParameters=function(t){var e={},n=r.matchPrefix(t,"a=ssrc:").map(function(t){return r.parseSsrcMedia(t)}).filter(function(t){return"cname"===t.attribute})[0];n&&(e.cname=n.value,e.ssrc=n.ssrc);var i=r.matchPrefix(t,"a=rtcp-rsize");e.reducedSize=i.length>0,e.compound=0===i.length;var a=r.matchPrefix(t,"a=rtcp-mux");return e.mux=a.length>0,e},r.parseMsid=function(t){var e,n=r.matchPrefix(t,"a=msid:");if(1===n.length)return{stream:(e=n[0].substr(7).split(" "))[0],track:e[1]};var i=r.matchPrefix(t,"a=ssrc:").map(function(t){return r.parseSsrcMedia(t)}).filter(function(t){return"msid"===t.attribute});return i.length>0?{stream:(e=i[0].value.split(" "))[0],track:e[1]}:void 0},r.writeSessionBoilerplate=function(){return"v=0\r\no=thisisadapterortc 8169639915646943137 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},r.writeMediaSection=function(t,e,n,i){var a=r.writeRtpDescription(t.kind,e);if(a+=r.writeIceParameters(t.iceGatherer.getLocalParameters()),a+=r.writeDtlsParameters(t.dtlsTransport.getLocalParameters(),"offer"===n?"actpass":"active"),a+="a=mid:"+t.mid+"\r\n",t.direction?a+="a="+t.direction+"\r\n":t.rtpSender&&t.rtpReceiver?a+="a=sendrecv\r\n":t.rtpSender?a+="a=sendonly\r\n":t.rtpReceiver?a+="a=recvonly\r\n":a+="a=inactive\r\n",t.rtpSender){var o="msid:"+i.id+" "+t.rtpSender.track.id+"\r\n";a+="a="+o,a+="a=ssrc:"+t.sendEncodingParameters[0].ssrc+" "+o,t.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+t.sendEncodingParameters[0].rtx.ssrc+" "+o,a+="a=ssrc-group:FID "+t.sendEncodingParameters[0].ssrc+" "+t.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return a+="a=ssrc:"+t.sendEncodingParameters[0].ssrc+" cname:"+r.localCName+"\r\n",t.rtpSender&&t.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+t.sendEncodingParameters[0].rtx.ssrc+" cname:"+r.localCName+"\r\n"),a},r.getDirection=function(t,e){for(var n=r.splitLines(t),i=0;i<n.length;i++)switch(n[i]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return n[i].substr(2)}return e?r.getDirection(e):"sendrecv"},r.getKind=function(t){return r.splitLines(t)[0].split(" ")[0].substr(2)},r.isRejected=function(t){return"0"===t.split(" ",2)[1]},t.exports=r},function(t,e,n){"use strict";var r=n(117);n.d(e,"a",function(){return r.a}),n.d(e,"b",function(){return r.b})},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i});var r=function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("video",{ref:"video",attrs:{width:this.width,height:this.height,src:this.source,autoplay:this.autoplay,playsinline:this.playsinline}})])},i=[]},function(t,e,n){"use strict";e.a=function(t,e,n,r,i,a,o,s){var c,u="function"==typeof t?t.options:t;e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0);r&&(u.functional=!0);a&&(u._scopeId="data-v-"+a);o?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},u._ssrRegister=c):i&&(c=s?function(){i.call(this,this.$root.$options.shadowRoot)}:i);if(c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,c):[c]}return{exports:t,options:u}}},function(t,e,n){"use strict";!function(){var e=n(3).log,r=n(3).browserDetails;t.exports.browserDetails=r,t.exports.extractVersion=n(3).extractVersion,t.exports.disableLog=n(3).disableLog;var i=n(120)||null,a=n(122)||null,o=n(124)||null,s=n(126)||null;switch(r.browser){case"opera":case"chrome":if(!i||!i.shimPeerConnection)return void e("Chrome shim is not included in this adapter release.");e("adapter.js shimming chrome."),t.exports.browserShim=i,i.shimGetUserMedia(),i.shimMediaStream(),i.shimSourceObject(),i.shimPeerConnection(),i.shimOnTrack();break;case"firefox":if(!o||!o.shimPeerConnection)return void e("Firefox shim is not included in this adapter release.");e("adapter.js shimming firefox."),t.exports.browserShim=o,o.shimGetUserMedia(),o.shimSourceObject(),o.shimPeerConnection(),o.shimOnTrack();break;case"edge":if(!a||!a.shimPeerConnection)return void e("MS edge shim is not included in this adapter release.");e("adapter.js shimming edge."),t.exports.browserShim=a,a.shimGetUserMedia(),a.shimPeerConnection();break;case"safari":if(!s)return void e("Safari shim is not included in this adapter release.");e("adapter.js shimming safari."),t.exports.browserShim=s,s.shimGetUserMedia();break;default:e("Unsupported browser!")}}()},function(t,e,n){"use strict";var r=n(3).log,i=n(3).browserDetails,a={shimMediaStream:function(){window.MediaStream=window.MediaStream||window.webkitMediaStream},shimOnTrack:function(){"object"!=typeof window||!window.RTCPeerConnection||"ontrack"in window.RTCPeerConnection.prototype||Object.defineProperty(window.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(t){var e=this;this._ontrack&&(this.removeEventListener("track",this._ontrack),this.removeEventListener("addstream",this._ontrackpoly)),this.addEventListener("track",this._ontrack=t),this.addEventListener("addstream",this._ontrackpoly=function(t){t.stream.addEventListener("addtrack",function(n){var r=new Event("track");r.track=n.track,r.receiver={track:n.track},r.streams=[t.stream],e.dispatchEvent(r)}),t.stream.getTracks().forEach(function(e){var n=new Event("track");n.track=e,n.receiver={track:e},n.streams=[t.stream],this.dispatchEvent(n)}.bind(this))}.bind(this))}})},shimSourceObject:function(){"object"==typeof window&&(!window.HTMLMediaElement||"srcObject"in window.HTMLMediaElement.prototype||Object.defineProperty(window.HTMLMediaElement.prototype,"srcObject",{get:function(){return this._srcObject},set:function(t){var e=this;this._srcObject=t,this.src&&URL.revokeObjectURL(this.src),t?(this.src=URL.createObjectURL(t),t.addEventListener("addtrack",function(){e.src&&URL.revokeObjectURL(e.src),e.src=URL.createObjectURL(t)}),t.addEventListener("removetrack",function(){e.src&&URL.revokeObjectURL(e.src),e.src=URL.createObjectURL(t)})):this.src=""}}))},shimPeerConnection:function(){window.RTCPeerConnection=function(t,e){r("PeerConnection"),t&&t.iceTransportPolicy&&(t.iceTransports=t.iceTransportPolicy);var n=new webkitRTCPeerConnection(t,e),i=n.getStats.bind(n);return n.getStats=function(t,e,n){var r=this,a=arguments;if(arguments.length>0&&"function"==typeof t)return i(t,e);var o=function(t){var e={};return t.result().forEach(function(t){var n={id:t.id,timestamp:t.timestamp,type:t.type};t.names().forEach(function(e){n[e]=t.stat(e)}),e[n.id]=n}),e},s=function(t,e){var n=new Map(Object.keys(t).map(function(e){return[e,t[e]]}));return e=e||t,Object.keys(e).forEach(function(t){n[t]=e[t]}),n};if(arguments.length>=2){return i.apply(this,[function(t){a[1](s(o(t)))},arguments[0]])}return new Promise(function(e,n){1===a.length&&"object"==typeof t?i.apply(r,[function(t){e(s(o(t)))},n]):i.apply(r,[function(t){e(s(o(t),t.result()))},n])}).then(e,n)},n},window.RTCPeerConnection.prototype=webkitRTCPeerConnection.prototype,webkitRTCPeerConnection.generateCertificate&&Object.defineProperty(window.RTCPeerConnection,"generateCertificate",{get:function(){return webkitRTCPeerConnection.generateCertificate}}),["createOffer","createAnswer"].forEach(function(t){var e=webkitRTCPeerConnection.prototype[t];webkitRTCPeerConnection.prototype[t]=function(){var t=this;if(arguments.length<1||1===arguments.length&&"object"==typeof arguments[0]){var n=1===arguments.length?arguments[0]:void 0;return new Promise(function(r,i){e.apply(t,[r,i,n])})}return e.apply(this,arguments)}}),i.version<51&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){var e=webkitRTCPeerConnection.prototype[t];webkitRTCPeerConnection.prototype[t]=function(){var t=arguments,n=this,r=new Promise(function(r,i){e.apply(n,[t[0],r,i])});return t.length<2?r:r.then(function(){t[1].apply(null,[])},function(e){t.length>=3&&t[2].apply(null,[e])})}}),["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){var e=webkitRTCPeerConnection.prototype[t];webkitRTCPeerConnection.prototype[t]=function(){return arguments[0]=new("addIceCandidate"===t?RTCIceCandidate:RTCSessionDescription)(arguments[0]),e.apply(this,arguments)}});var t=RTCPeerConnection.prototype.addIceCandidate;RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?t.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}};t.exports={shimMediaStream:a.shimMediaStream,shimOnTrack:a.shimOnTrack,shimSourceObject:a.shimSourceObject,shimPeerConnection:a.shimPeerConnection,shimGetUserMedia:n(121)}},function(t,e,n){"use strict";var r=n(3).log;t.exports=function(){var t=function(t){if("object"!=typeof t||t.mandatory||t.optional)return t;var e={};return Object.keys(t).forEach(function(n){if("require"!==n&&"advanced"!==n&&"mediaSource"!==n){var r="object"==typeof t[n]?t[n]:{ideal:t[n]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);var i=function(t,e){return t?t+e.charAt(0).toUpperCase()+e.slice(1):"deviceId"===e?"sourceId":e};if(void 0!==r.ideal){e.optional=e.optional||[];var a={};"number"==typeof r.ideal?(a[i("min",n)]=r.ideal,e.optional.push(a),(a={})[i("max",n)]=r.ideal,e.optional.push(a)):(a[i("",n)]=r.ideal,e.optional.push(a))}void 0!==r.exact&&"number"!=typeof r.exact?(e.mandatory=e.mandatory||{},e.mandatory[i("",n)]=r.exact):["min","max"].forEach(function(t){void 0!==r[t]&&(e.mandatory=e.mandatory||{},e.mandatory[i(t,n)]=r[t])})}}),t.advanced&&(e.optional=(e.optional||[]).concat(t.advanced)),e},e=function(e,n){if((e=JSON.parse(JSON.stringify(e)))&&e.audio&&(e.audio=t(e.audio)),e&&"object"==typeof e.video){var i=e.video.facingMode;if((i=i&&("object"==typeof i?i:{ideal:i}))&&("user"===i.exact||"environment"===i.exact||"user"===i.ideal||"environment"===i.ideal)&&(!navigator.mediaDevices.getSupportedConstraints||!navigator.mediaDevices.getSupportedConstraints().facingMode)&&(delete e.video.facingMode,"environment"===i.exact||"environment"===i.ideal))return navigator.mediaDevices.enumerateDevices().then(function(a){var o=(a=a.filter(function(t){return"videoinput"===t.kind})).find(function(t){return-1!==t.label.toLowerCase().indexOf("back")})||a.length&&a[a.length-1];return o&&(e.video.deviceId=i.exact?{exact:o.deviceId}:{ideal:o.deviceId}),e.video=t(e.video),r("chrome: "+JSON.stringify(e)),n(e)});e.video=t(e.video)}return r("chrome: "+JSON.stringify(e)),n(e)},n=function(t){return{name:{PermissionDeniedError:"NotAllowedError",ConstraintNotSatisfiedError:"OverconstrainedError"}[t.name]||t.name,message:t.message,constraint:t.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}};navigator.getUserMedia=function(t,r,i){e(t,function(t){navigator.webkitGetUserMedia(t,r,function(t){i(n(t))})})};var i=function(t){return new Promise(function(e,n){navigator.getUserMedia(t,e,n)})};if(navigator.mediaDevices||(navigator.mediaDevices={getUserMedia:i,enumerateDevices:function(){return new Promise(function(t){var e={audio:"audioinput",video:"videoinput"};return MediaStreamTrack.getSources(function(n){t(n.map(function(t){return{label:t.label,kind:e[t.kind],deviceId:t.id,groupId:""}}))})})}}),navigator.mediaDevices.getUserMedia){var a=navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);navigator.mediaDevices.getUserMedia=function(t){return e(t,function(t){return a(t).then(function(e){if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(function(t){t.stop()}),new DOMException("","NotFoundError");return e},function(t){return Promise.reject(n(t))})})}}else navigator.mediaDevices.getUserMedia=function(t){return i(t)};void 0===navigator.mediaDevices.addEventListener&&(navigator.mediaDevices.addEventListener=function(){r("Dummy mediaDevices.addEventListener called.")}),void 0===navigator.mediaDevices.removeEventListener&&(navigator.mediaDevices.removeEventListener=function(){r("Dummy mediaDevices.removeEventListener called.")})}},function(t,e,n){"use strict";var r=n(115),i=n(3).browserDetails,a={shimPeerConnection:function(){if(window.RTCIceGatherer){window.RTCIceCandidate||(window.RTCIceCandidate=function(t){return t}),window.RTCSessionDescription||(window.RTCSessionDescription=function(t){return t});var t=Object.getOwnPropertyDescriptor(MediaStreamTrack.prototype,"enabled");Object.defineProperty(MediaStreamTrack.prototype,"enabled",{set:function(e){t.set.call(this,e);var n=new Event("enabled");n.enabled=e,this.dispatchEvent(n)}})}window.RTCPeerConnection=function(t){var e=this,n=document.createDocumentFragment();if(["addEventListener","removeEventListener","dispatchEvent"].forEach(function(t){e[t]=n[t].bind(n)}),this.onicecandidate=null,this.onaddstream=null,this.ontrack=null,this.onremovestream=null,this.onsignalingstatechange=null,this.oniceconnectionstatechange=null,this.onnegotiationneeded=null,this.ondatachannel=null,this.localStreams=[],this.remoteStreams=[],this.getLocalStreams=function(){return e.localStreams},this.getRemoteStreams=function(){return e.remoteStreams},this.localDescription=new RTCSessionDescription({type:"",sdp:""}),this.remoteDescription=new RTCSessionDescription({type:"",sdp:""}),this.signalingState="stable",this.iceConnectionState="new",this.iceGatheringState="new",this.iceOptions={gatherPolicy:"all",iceServers:[]},t&&t.iceTransportPolicy)switch(t.iceTransportPolicy){case"all":case"relay":this.iceOptions.gatherPolicy=t.iceTransportPolicy;break;case"none":throw new TypeError('iceTransportPolicy "none" not supported')}if(this.usingBundle=t&&"max-bundle"===t.bundlePolicy,t&&t.iceServers){var r=JSON.parse(JSON.stringify(t.iceServers));this.iceOptions.iceServers=r.filter(function(t){if(t&&t.urls){var e=t.urls;return"string"==typeof e&&(e=[e]),!!(e=e.filter(function(t){return 0===t.indexOf("turn:")&&-1!==t.indexOf("transport=udp")&&-1===t.indexOf("turn:[")||0===t.indexOf("stun:")&&i.version>=14393})[0])}return!1})}this._config=t,this.transceivers=[],this._localIceCandidatesBuffer=[]},window.RTCPeerConnection.prototype._emitBufferedCandidates=function(){var t=this,e=r.splitSections(t.localDescription.sdp);this._localIceCandidatesBuffer.forEach(function(n){if(!n.candidate||0===Object.keys(n.candidate).length)for(var r=1;r<e.length;r++)-1===e[r].indexOf("\r\na=end-of-candidates\r\n")&&(e[r]+="a=end-of-candidates\r\n");else-1===n.candidate.candidate.indexOf("typ endOfCandidates")&&(e[n.candidate.sdpMLineIndex+1]+="a="+n.candidate.candidate+"\r\n");(t.localDescription.sdp=e.join(""),t.dispatchEvent(n),null!==t.onicecandidate&&t.onicecandidate(n),n.candidate||"complete"===t.iceGatheringState)||t.transceivers.every(function(t){return t.iceGatherer&&"completed"===t.iceGatherer.state})&&(t.iceGatheringState="complete")}),this._localIceCandidatesBuffer=[]},window.RTCPeerConnection.prototype.getConfiguration=function(){return this._config},window.RTCPeerConnection.prototype.addStream=function(t){var e=t.clone();t.getTracks().forEach(function(t,n){var r=e.getTracks()[n];t.addEventListener("enabled",function(t){r.enabled=t.enabled})}),this.localStreams.push(e),this._maybeFireNegotiationNeeded()},window.RTCPeerConnection.prototype.removeStream=function(t){var e=this.localStreams.indexOf(t);e>-1&&(this.localStreams.splice(e,1),this._maybeFireNegotiationNeeded())},window.RTCPeerConnection.prototype.getSenders=function(){return this.transceivers.filter(function(t){return!!t.rtpSender}).map(function(t){return t.rtpSender})},window.RTCPeerConnection.prototype.getReceivers=function(){return this.transceivers.filter(function(t){return!!t.rtpReceiver}).map(function(t){return t.rtpReceiver})},window.RTCPeerConnection.prototype._getCommonCapabilities=function(t,e){var n={codecs:[],headerExtensions:[],fecMechanisms:[]};return t.codecs.forEach(function(t){for(var r=0;r<e.codecs.length;r++){var i=e.codecs[r];if(t.name.toLowerCase()===i.name.toLowerCase()&&t.clockRate===i.clockRate){i.numChannels=Math.min(t.numChannels,i.numChannels),n.codecs.push(i),i.rtcpFeedback=i.rtcpFeedback.filter(function(e){for(var n=0;n<t.rtcpFeedback.length;n++)if(t.rtcpFeedback[n].type===e.type&&t.rtcpFeedback[n].parameter===e.parameter)return!0;return!1});break}}}),t.headerExtensions.forEach(function(t){for(var r=0;r<e.headerExtensions.length;r++){var i=e.headerExtensions[r];if(t.uri===i.uri){n.headerExtensions.push(i);break}}}),n},window.RTCPeerConnection.prototype._createIceAndDtlsTransports=function(t,e){var n=this,i=new RTCIceGatherer(n.iceOptions),a=new RTCIceTransport(i);i.onlocalcandidate=function(o){var s=new Event("icecandidate");s.candidate={sdpMid:t,sdpMLineIndex:e};var c=o.candidate,u=!c||0===Object.keys(c).length;u?(void 0===i.state&&(i.state="completed"),s.candidate.candidate="candidate:1 1 udp 1 0.0.0.0 9 typ endOfCandidates"):(c.component="RTCP"===a.component?2:1,s.candidate.candidate=r.writeCandidate(c));var l=r.splitSections(n.localDescription.sdp);-1===s.candidate.candidate.indexOf("typ endOfCandidates")?l[s.candidate.sdpMLineIndex+1]+="a="+s.candidate.candidate+"\r\n":l[s.candidate.sdpMLineIndex+1]+="a=end-of-candidates\r\n",n.localDescription.sdp=l.join("");var d=n.transceivers.every(function(t){return t.iceGatherer&&"completed"===t.iceGatherer.state});switch(n.iceGatheringState){case"new":n._localIceCandidatesBuffer.push(s),u&&d&&n._localIceCandidatesBuffer.push(new Event("icecandidate"));break;case"gathering":n._emitBufferedCandidates(),n.dispatchEvent(s),null!==n.onicecandidate&&n.onicecandidate(s),d&&(n.dispatchEvent(new Event("icecandidate")),null!==n.onicecandidate&&n.onicecandidate(new Event("icecandidate")),n.iceGatheringState="complete")}},a.onicestatechange=function(){n._updateConnectionState()};var o=new RTCDtlsTransport(a);return o.ondtlsstatechange=function(){n._updateConnectionState()},o.onerror=function(){o.state="failed",n._updateConnectionState()},{iceGatherer:i,iceTransport:a,dtlsTransport:o}},window.RTCPeerConnection.prototype._transceive=function(t,e,n){var i=this._getCommonCapabilities(t.localCapabilities,t.remoteCapabilities);e&&t.rtpSender&&(i.encodings=t.sendEncodingParameters,i.rtcp={cname:r.localCName},t.recvEncodingParameters.length&&(i.rtcp.ssrc=t.recvEncodingParameters[0].ssrc),t.rtpSender.send(i)),n&&t.rtpReceiver&&("video"===t.kind&&t.recvEncodingParameters&&t.recvEncodingParameters.forEach(function(t){delete t.rtx}),i.encodings=t.recvEncodingParameters,i.rtcp={cname:t.cname},t.sendEncodingParameters.length&&(i.rtcp.ssrc=t.sendEncodingParameters[0].ssrc),t.rtpReceiver.receive(i))},window.RTCPeerConnection.prototype.setLocalDescription=function(t){var e,n,i=this;if("offer"===t.type)this._pendingOffer&&(e=r.splitSections(t.sdp),n=e.shift(),e.forEach(function(t,e){var n=r.parseRtpParameters(t);i._pendingOffer[e].localCapabilities=n}),this.transceivers=this._pendingOffer,delete this._pendingOffer);else if("answer"===t.type){e=r.splitSections(i.remoteDescription.sdp),n=e.shift();var a=r.matchPrefix(n,"a=ice-lite").length>0;e.forEach(function(t,e){var o=i.transceivers[e],s=o.iceGatherer,c=o.iceTransport,u=o.dtlsTransport,l=o.localCapabilities,d=o.remoteCapabilities;if(!("0"===t.split("\n",1)[0].split(" ",2)[1])&&!o.isDatachannel){var f=r.getIceParameters(t,n);if(a){var h=r.matchPrefix(t,"a=candidate:").map(function(t){return r.parseCandidate(t)}).filter(function(t){return"1"===t.component});h.length&&c.setRemoteCandidates(h)}var p=r.getDtlsParameters(t,n);a&&(p.role="server"),i.usingBundle&&0!==e||(c.start(s,f,a?"controlling":"controlled"),u.start(p));var m=i._getCommonCapabilities(l,d);i._transceive(o,m.codecs.length>0,!1)}})}switch(this.localDescription={type:t.type,sdp:t.sdp},t.type){case"offer":this._updateSignalingState("have-local-offer");break;case"answer":this._updateSignalingState("stable");break;default:throw new TypeError('unsupported type "'+t.type+'"')}var o=arguments.length>1&&"function"==typeof arguments[1];if(o){var s=arguments[1];window.setTimeout(function(){s(),"new"===i.iceGatheringState&&(i.iceGatheringState="gathering"),i._emitBufferedCandidates()},0)}var c=Promise.resolve();return c.then(function(){o||("new"===i.iceGatheringState&&(i.iceGatheringState="gathering"),window.setTimeout(i._emitBufferedCandidates.bind(i),500))}),c},window.RTCPeerConnection.prototype.setRemoteDescription=function(t){var e=this,n=new MediaStream,i=[],a=r.splitSections(t.sdp),o=a.shift(),s=r.matchPrefix(o,"a=ice-lite").length>0;switch(this.usingBundle=r.matchPrefix(o,"a=group:BUNDLE ").length>0,a.forEach(function(a,c){var u=r.splitLines(a)[0].substr(2).split(" "),l=u[0],d="0"===u[1],f=r.getDirection(a,o),h=r.matchPrefix(a,"a=mid:");if(h=h.length?h[0].substr(6):r.generateIdentifier(),"application"!==l||"DTLS/SCTP"!==u[2]){var p,m,v,_,g,b,y,x,w,k,C,E,S,I=r.parseRtpParameters(a);d||(C=r.getIceParameters(a,o),(E=r.getDtlsParameters(a,o)).role="client"),x=r.parseRtpEncodingParameters(a);var M=r.matchPrefix(a,"a=ssrc:").map(function(t){return r.parseSsrcMedia(t)}).filter(function(t){return"cname"===t.attribute})[0];M&&(S=M.value);var T=r.matchPrefix(a,"a=end-of-candidates",o).length>0,D=r.matchPrefix(a,"a=candidate:").map(function(t){return r.parseCandidate(t)}).filter(function(t){return"1"===t.component});if("offer"!==t.type||d)"answer"!==t.type||d||(m=(p=e.transceivers[c]).iceGatherer,v=p.iceTransport,_=p.dtlsTransport,g=p.rtpSender,b=p.rtpReceiver,y=p.sendEncodingParameters,w=p.localCapabilities,e.transceivers[c].recvEncodingParameters=x,e.transceivers[c].remoteCapabilities=I,e.transceivers[c].cname=S,(s||T)&&D.length&&v.setRemoteCandidates(D),e.usingBundle&&0!==c||(v.start(m,C,"controlling"),_.start(E)),e._transceive(p,"sendrecv"===f||"recvonly"===f,"sendrecv"===f||"sendonly"===f),!b||"sendrecv"!==f&&"sendonly"!==f?delete p.rtpReceiver:(k=b.track,i.push([k,b]),n.addTrack(k)));else{var R,P=e.usingBundle&&c>0?{iceGatherer:e.transceivers[0].iceGatherer,iceTransport:e.transceivers[0].iceTransport,dtlsTransport:e.transceivers[0].dtlsTransport}:e._createIceAndDtlsTransports(h,c);if(T&&P.iceTransport.setRemoteCandidates(D),(w=RTCRtpReceiver.getCapabilities(l)).codecs=w.codecs.filter(function(t){return"rtx"!==t.name}),y=[{ssrc:1001*(2*c+2)}],k=(b=new RTCRtpReceiver(P.dtlsTransport,l)).track,i.push([k,b]),n.addTrack(k),e.localStreams.length>0&&e.localStreams[0].getTracks().length>=c)"audio"===l?R=e.localStreams[0].getAudioTracks()[0]:"video"===l&&(R=e.localStreams[0].getVideoTracks()[0]),R&&(g=new RTCRtpSender(R,P.dtlsTransport));e.transceivers[c]={iceGatherer:P.iceGatherer,iceTransport:P.iceTransport,dtlsTransport:P.dtlsTransport,localCapabilities:w,remoteCapabilities:I,rtpSender:g,rtpReceiver:b,kind:l,mid:h,cname:S,sendEncodingParameters:y,recvEncodingParameters:x},e._transceive(e.transceivers[c],!1,"sendrecv"===f||"sendonly"===f)}}else e.transceivers[c]={mid:h,isDatachannel:!0}}),this.remoteDescription={type:t.type,sdp:t.sdp},t.type){case"offer":this._updateSignalingState("have-remote-offer");break;case"answer":this._updateSignalingState("stable");break;default:throw new TypeError('unsupported type "'+t.type+'"')}return n.getTracks().length&&(e.remoteStreams.push(n),window.setTimeout(function(){var t=new Event("addstream");t.stream=n,e.dispatchEvent(t),null!==e.onaddstream&&window.setTimeout(function(){e.onaddstream(t)},0),i.forEach(function(r){var i=r[0],a=r[1],o=new Event("track");o.track=i,o.receiver=a,o.streams=[n],e.dispatchEvent(t),null!==e.ontrack&&window.setTimeout(function(){e.ontrack(o)},0)})},0)),arguments.length>1&&"function"==typeof arguments[1]&&window.setTimeout(arguments[1],0),Promise.resolve()},window.RTCPeerConnection.prototype.close=function(){this.transceivers.forEach(function(t){t.iceTransport&&t.iceTransport.stop(),t.dtlsTransport&&t.dtlsTransport.stop(),t.rtpSender&&t.rtpSender.stop(),t.rtpReceiver&&t.rtpReceiver.stop()}),this._updateSignalingState("closed")},window.RTCPeerConnection.prototype._updateSignalingState=function(t){this.signalingState=t;var e=new Event("signalingstatechange");this.dispatchEvent(e),null!==this.onsignalingstatechange&&this.onsignalingstatechange(e)},window.RTCPeerConnection.prototype._maybeFireNegotiationNeeded=function(){var t=new Event("negotiationneeded");this.dispatchEvent(t),null!==this.onnegotiationneeded&&this.onnegotiationneeded(t)},window.RTCPeerConnection.prototype._updateConnectionState=function(){var t,e={new:0,closed:0,connecting:0,checking:0,connected:0,completed:0,failed:0};if(this.transceivers.forEach(function(t){e[t.iceTransport.state]++,e[t.dtlsTransport.state]++}),e.connected+=e.completed,t="new",e.failed>0?t="failed":e.connecting>0||e.checking>0?t="connecting":e.disconnected>0?t="disconnected":e.new>0?t="new":(e.connected>0||e.completed>0)&&(t="connected"),t!==this.iceConnectionState){this.iceConnectionState=t;var n=new Event("iceconnectionstatechange");this.dispatchEvent(n),null!==this.oniceconnectionstatechange&&this.oniceconnectionstatechange(n)}},window.RTCPeerConnection.prototype.createOffer=function(){var t,e=this;if(this._pendingOffer)throw new Error("createOffer called while there is a pending offer.");1===arguments.length&&"function"!=typeof arguments[0]?t=arguments[0]:3===arguments.length&&(t=arguments[2]);var n=[],i=0,a=0;if(this.localStreams.length&&(i=this.localStreams[0].getAudioTracks().length,a=this.localStreams[0].getVideoTracks().length),t){if(t.mandatory||t.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");void 0!==t.offerToReceiveAudio&&(i=t.offerToReceiveAudio),void 0!==t.offerToReceiveVideo&&(a=t.offerToReceiveVideo)}for(this.localStreams.length&&this.localStreams[0].getTracks().forEach(function(t){n.push({kind:t.kind,track:t,wantReceive:"audio"===t.kind?i>0:a>0}),"audio"===t.kind?i--:"video"===t.kind&&a--});i>0||a>0;)i>0&&(n.push({kind:"audio",wantReceive:!0}),i--),a>0&&(n.push({kind:"video",wantReceive:!0}),a--);var o=r.writeSessionBoilerplate(),s=[];n.forEach(function(t,n){var i,a,o=t.track,c=t.kind,u=r.generateIdentifier(),l=e.usingBundle&&n>0?{iceGatherer:s[0].iceGatherer,iceTransport:s[0].iceTransport,dtlsTransport:s[0].dtlsTransport}:e._createIceAndDtlsTransports(u,n),d=RTCRtpSender.getCapabilities(c);d.codecs=d.codecs.filter(function(t){return"rtx"!==t.name}),d.codecs.forEach(function(t){"H264"===t.name&&void 0===t.parameters["level-asymmetry-allowed"]&&(t.parameters["level-asymmetry-allowed"]="1")});var f=[{ssrc:1001*(2*n+1)}];o&&(i=new RTCRtpSender(o,l.dtlsTransport)),t.wantReceive&&(a=new RTCRtpReceiver(l.dtlsTransport,c)),s[n]={iceGatherer:l.iceGatherer,iceTransport:l.iceTransport,dtlsTransport:l.dtlsTransport,localCapabilities:d,remoteCapabilities:null,rtpSender:i,rtpReceiver:a,kind:c,mid:u,sendEncodingParameters:f,recvEncodingParameters:null}}),this.usingBundle&&(o+="a=group:BUNDLE "+s.map(function(t){return t.mid}).join(" ")+"\r\n"),n.forEach(function(t,n){var i=s[n];o+=r.writeMediaSection(i,i.localCapabilities,"offer",e.localStreams[0])}),this._pendingOffer=s;var c=new RTCSessionDescription({type:"offer",sdp:o});return arguments.length&&"function"==typeof arguments[0]&&window.setTimeout(arguments[0],0,c),Promise.resolve(c)},window.RTCPeerConnection.prototype.createAnswer=function(){var t=this,e=r.writeSessionBoilerplate();this.usingBundle&&(e+="a=group:BUNDLE "+this.transceivers.map(function(t){return t.mid}).join(" ")+"\r\n"),this.transceivers.forEach(function(n){if(n.isDatachannel)e+="m=application 0 DTLS/SCTP 5000\r\nc=IN IP4 0.0.0.0\r\na=mid:"+n.mid+"\r\n";else{var i=t._getCommonCapabilities(n.localCapabilities,n.remoteCapabilities);e+=r.writeMediaSection(n,i,"answer",t.localStreams[0])}});var n=new RTCSessionDescription({type:"answer",sdp:e});return arguments.length&&"function"==typeof arguments[0]&&window.setTimeout(arguments[0],0,n),Promise.resolve(n)},window.RTCPeerConnection.prototype.addIceCandidate=function(t){if(t){var e=t.sdpMLineIndex;if(t.sdpMid)for(var n=0;n<this.transceivers.length;n++)if(this.transceivers[n].mid===t.sdpMid){e=n;break}var i=this.transceivers[e];if(i){var a=Object.keys(t.candidate).length>0?r.parseCandidate(t.candidate):{};if("tcp"===a.protocol&&(0===a.port||9===a.port))return;if("1"!==a.component)return;"endOfCandidates"===a.type&&(a={}),i.iceTransport.addRemoteCandidate(a);var o=r.splitSections(this.remoteDescription.sdp);o[e+1]+=(a.type?t.candidate.trim():"a=end-of-candidates")+"\r\n",this.remoteDescription.sdp=o.join("")}}else this.transceivers.forEach(function(t){t.iceTransport.addRemoteCandidate({})});return arguments.length>1&&"function"==typeof arguments[1]&&window.setTimeout(arguments[1],0),Promise.resolve()},window.RTCPeerConnection.prototype.getStats=function(){var t=[];this.transceivers.forEach(function(e){["rtpSender","rtpReceiver","iceGatherer","iceTransport","dtlsTransport"].forEach(function(n){e[n]&&t.push(e[n].getStats())})});var e=arguments.length>1&&"function"==typeof arguments[1]&&arguments[1];return new Promise(function(n){var r=new Map;Promise.all(t).then(function(t){t.forEach(function(t){Object.keys(t).forEach(function(e){r.set(e,t[e]),r[e]=t[e]})}),e&&window.setTimeout(e,0,r),n(r)})})}}};t.exports={shimPeerConnection:a.shimPeerConnection,shimGetUserMedia:n(123)}},function(t,e,n){"use strict";t.exports=function(){var t=navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);navigator.mediaDevices.getUserMedia=function(e){return t(e).catch(function(t){return Promise.reject(function(t){return{name:{PermissionDeniedError:"NotAllowedError"}[t.name]||t.name,message:t.message,constraint:t.constraint,toString:function(){return this.name}}}(t))})}}},function(t,e,n){"use strict";var r=n(3).browserDetails,i={shimOnTrack:function(){"object"!=typeof window||!window.RTCPeerConnection||"ontrack"in window.RTCPeerConnection.prototype||Object.defineProperty(window.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(t){this._ontrack&&(this.removeEventListener("track",this._ontrack),this.removeEventListener("addstream",this._ontrackpoly)),this.addEventListener("track",this._ontrack=t),this.addEventListener("addstream",this._ontrackpoly=function(t){t.stream.getTracks().forEach(function(e){var n=new Event("track");n.track=e,n.receiver={track:e},n.streams=[t.stream],this.dispatchEvent(n)}.bind(this))}.bind(this))}})},shimSourceObject:function(){"object"==typeof window&&(!window.HTMLMediaElement||"srcObject"in window.HTMLMediaElement.prototype||Object.defineProperty(window.HTMLMediaElement.prototype,"srcObject",{get:function(){return this.mozSrcObject},set:function(t){this.mozSrcObject=t}}))},shimPeerConnection:function(){if("object"==typeof window&&(window.RTCPeerConnection||window.mozRTCPeerConnection)){window.RTCPeerConnection||(window.RTCPeerConnection=function(t,e){if(r.version<38&&t&&t.iceServers){for(var n=[],i=0;i<t.iceServers.length;i++){var a=t.iceServers[i];if(a.hasOwnProperty("urls"))for(var o=0;o<a.urls.length;o++){var s={url:a.urls[o]};0===a.urls[o].indexOf("turn")&&(s.username=a.username,s.credential=a.credential),n.push(s)}else n.push(t.iceServers[i])}t.iceServers=n}return new mozRTCPeerConnection(t,e)},window.RTCPeerConnection.prototype=mozRTCPeerConnection.prototype,mozRTCPeerConnection.generateCertificate&&Object.defineProperty(window.RTCPeerConnection,"generateCertificate",{get:function(){return mozRTCPeerConnection.generateCertificate}}),window.RTCSessionDescription=mozRTCSessionDescription,window.RTCIceCandidate=mozRTCIceCandidate),["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){var e=RTCPeerConnection.prototype[t];RTCPeerConnection.prototype[t]=function(){return arguments[0]=new("addIceCandidate"===t?RTCIceCandidate:RTCSessionDescription)(arguments[0]),e.apply(this,arguments)}});var t=RTCPeerConnection.prototype.addIceCandidate;if(RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?t.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())},r.version<48){var e=RTCPeerConnection.prototype.getStats;RTCPeerConnection.prototype.getStats=function(t,n,r){return e.apply(this,[t||null]).then(function(t){return function(t){var e=new Map;return Object.keys(t).forEach(function(n){e.set(n,t[n]),e[n]=t[n]}),e}(t)}).then(n,r)}}}}};t.exports={shimOnTrack:i.shimOnTrack,shimSourceObject:i.shimSourceObject,shimPeerConnection:i.shimPeerConnection,shimGetUserMedia:n(125)}},function(t,e,n){"use strict";var r=n(3).log,i=n(3).browserDetails;t.exports=function(){var t=function(t){return{name:{SecurityError:"NotAllowedError",PermissionDeniedError:"NotAllowedError"}[t.name]||t.name,message:{"The operation is insecure.":"The request is not allowed by the user agent or the platform in the current context."}[t.message]||t.message,constraint:t.constraint,toString:function(){return this.name+(this.message&&": ")+this.message}}},e=function(e,n,a){var o=function(t){if("object"!=typeof t||t.require)return t;var e=[];return Object.keys(t).forEach(function(n){if("require"!==n&&"advanced"!==n&&"mediaSource"!==n){var r=t[n]="object"==typeof t[n]?t[n]:{ideal:t[n]};if(void 0===r.min&&void 0===r.max&&void 0===r.exact||e.push(n),void 0!==r.exact&&("number"==typeof r.exact?r.min=r.max=r.exact:t[n]=r.exact,delete r.exact),void 0!==r.ideal){t.advanced=t.advanced||[];var i={};"number"==typeof r.ideal?i[n]={min:r.ideal,max:r.ideal}:i[n]=r.ideal,t.advanced.push(i),delete r.ideal,Object.keys(r).length||delete t[n]}}}),e.length&&(t.require=e),t};return e=JSON.parse(JSON.stringify(e)),i.version<38&&(r("spec: "+JSON.stringify(e)),e.audio&&(e.audio=o(e.audio)),e.video&&(e.video=o(e.video)),r("ff37: "+JSON.stringify(e))),navigator.mozGetUserMedia(e,n,function(e){a(t(e))})};if(navigator.mediaDevices||(navigator.mediaDevices={getUserMedia:function(t){return new Promise(function(n,r){e(t,n,r)})},addEventListener:function(){},removeEventListener:function(){}}),navigator.mediaDevices.enumerateDevices=navigator.mediaDevices.enumerateDevices||function(){return new Promise(function(t){t([{kind:"audioinput",deviceId:"default",label:"",groupId:""},{kind:"videoinput",deviceId:"default",label:"",groupId:""}])})},i.version<41){var n=navigator.mediaDevices.enumerateDevices.bind(navigator.mediaDevices);navigator.mediaDevices.enumerateDevices=function(){return n().then(void 0,function(t){if("NotFoundError"===t.name)return[];throw t})}}if(i.version<49){var a=navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);navigator.mediaDevices.getUserMedia=function(e){return a(e).then(function(t){if(e.audio&&!t.getAudioTracks().length||e.video&&!t.getVideoTracks().length)throw t.getTracks().forEach(function(t){t.stop()}),new DOMException("The object can not be found here.","NotFoundError");return t},function(e){return Promise.reject(t(e))})}}navigator.getUserMedia=function(t,n,r){if(i.version<44)return e(t,n,r);console.warn("navigator.getUserMedia has been replaced by navigator.mediaDevices.getUserMedia"),navigator.mediaDevices.getUserMedia(t).then(n,r)}}},function(t,e,n){"use strict";var r={shimGetUserMedia:function(){navigator.getUserMedia=navigator.webkitGetUserMedia}};t.exports={shimGetUserMedia:r.shimGetUserMedia}}])},t.exports=r()},function(t,e,n){var r=n(14);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(4),i=n(37),a=n(13);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],o={};o[t]=e(n),r(r.S+r.F*a(function(){n(1)}),"Object",o)}},function(t,e,n){var r=n(38),i=n(80),a=n(21),o=n(16),s=n(137);t.exports=function(t,e){var n=1==t,c=2==t,u=3==t,l=4==t,d=6==t,f=5==t||d,h=e||s;return function(e,s,p){for(var m,v,_=a(e),g=i(_),b=r(s,p,3),y=o(g.length),x=0,w=n?h(e,y):c?h(e,0):void 0;y>x;x++)if((f||x in g)&&(v=b(m=g[x],x,_),t))if(n)w[x]=v;else if(v)switch(t){case 3:return!0;case 5:return m;case 6:return x;case 2:w.push(m)}else if(l)return!1;return d?-1:u||l?l:w}}},function(t,e,n){"use strict";var r=n(35),i=n(10);function a(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function o(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function s(t){return 1===t.length?"0"+t:t}function c(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)n.push(parseInt(t[i]+t[i+1],16))}else for(var r=0,i=0;i<t.length;i++){var o=t.charCodeAt(i);o<128?n[r++]=o:o<2048?(n[r++]=o>>6|192,n[r++]=63&o|128):a(t,i)?(o=65536+((1023&o)<<10)+(1023&t.charCodeAt(++i)),n[r++]=o>>18|240,n[r++]=o>>12&63|128,n[r++]=o>>6&63|128,n[r++]=63&o|128):(n[r++]=o>>12|224,n[r++]=o>>6&63|128,n[r++]=63&o|128)}else for(i=0;i<t.length;i++)n[i]=0|t[i];return n},e.toHex=function(t){for(var e="",n=0;n<t.length;n++)e+=s(t[n].toString(16));return e},e.htonl=o,e.toHex32=function(t,e){for(var n="",r=0;r<t.length;r++){var i=t[r];"little"===e&&(i=o(i)),n+=c(i.toString(16))}return n},e.zero2=s,e.zero8=c,e.join32=function(t,e,n,i){var a=n-e;r(a%4==0);for(var o=new Array(a/4),s=0,c=e;s<o.length;s++,c+=4){var u;u="big"===i?t[c]<<24|t[c+1]<<16|t[c+2]<<8|t[c+3]:t[c+3]<<24|t[c+2]<<16|t[c+1]<<8|t[c],o[s]=u>>>0}return o},e.split32=function(t,e){for(var n=new Array(4*t.length),r=0,i=0;r<t.length;r++,i+=4){var a=t[r];"big"===e?(n[i]=a>>>24,n[i+1]=a>>>16&255,n[i+2]=a>>>8&255,n[i+3]=255&a):(n[i+3]=a>>>24,n[i+2]=a>>>16&255,n[i+1]=a>>>8&255,n[i]=255&a)}return n},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,n){return t+e+n>>>0},e.sum32_4=function(t,e,n,r){return t+e+n+r>>>0},e.sum32_5=function(t,e,n,r,i){return t+e+n+r+i>>>0},e.sum64=function(t,e,n,r){var i=t[e],a=r+t[e+1]>>>0,o=(a<r?1:0)+n+i;t[e]=o>>>0,t[e+1]=a},e.sum64_hi=function(t,e,n,r){return(e+r>>>0<e?1:0)+t+n>>>0},e.sum64_lo=function(t,e,n,r){return e+r>>>0},e.sum64_4_hi=function(t,e,n,r,i,a,o,s){var c=0,u=e;return c+=(u=u+r>>>0)<e?1:0,c+=(u=u+a>>>0)<a?1:0,t+n+i+o+(c+=(u=u+s>>>0)<s?1:0)>>>0},e.sum64_4_lo=function(t,e,n,r,i,a,o,s){return e+r+a+s>>>0},e.sum64_5_hi=function(t,e,n,r,i,a,o,s,c,u){var l=0,d=e;return l+=(d=d+r>>>0)<e?1:0,l+=(d=d+a>>>0)<a?1:0,l+=(d=d+s>>>0)<s?1:0,t+n+i+o+c+(l+=(d=d+u>>>0)<u?1:0)>>>0},e.sum64_5_lo=function(t,e,n,r,i,a,o,s,c,u){return e+r+a+s+u>>>0},e.rotr64_hi=function(t,e,n){return(e<<32-n|t>>>n)>>>0},e.rotr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0},e.shr64_hi=function(t,e,n){return t>>>n},e.shr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0}},function(t,e,n){var r;window,r=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}({"./src/index.js":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n("./src/sass/index.scss");var r,i=n("./src/js/init.js");var a=((r=i)&&r.__esModule?r:{default:r}).default.init;"undefined"!=typeof window&&(window.printJS=a),e.default=a},"./src/js/browser.js":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={isFirefox:function(){return"undefined"!=typeof InstallTrigger},isIE:function(){return-1!==navigator.userAgent.indexOf("MSIE")||!!document.documentMode},isEdge:function(){return!r.isIE()&&!!window.StyleMedia},isChrome:function(){return!!(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).chrome},isSafari:function(){return Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0||-1!==navigator.userAgent.toLowerCase().indexOf("safari")}};e.default=r},"./src/js/functions.js":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.addWrapper=function(t,e){return'<div style="font-family:'+e.font+" !important; font-size: "+e.font_size+' !important; width:100%;">'+t+"</div>"},e.capitalizePrint=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},e.collectStyles=function(t,e){var n="",i=(document.defaultView||window).getComputedStyle(t,"");return Object.keys(i).map(function(t){(-1!==e.targetStyles.indexOf("*")||-1!==e.targetStyle.indexOf(i[t])||function(t,e){for(var n=0;n<t.length;n++)if("object"===(void 0===e?"undefined":r(e))&&-1!==e.indexOf(t[n]))return!0;return!1}(e.targetStyles,i[t]))&&i.getPropertyValue(i[t])&&(n+=i[t]+":"+i.getPropertyValue(i[t])+";")}),n+="max-width: "+e.maxWidth+"px !important;"+e.font_size+" !important;"},e.addHeader=function(t,e){var n=document.createElement("div");if(s(e.header))n.innerHTML=e.header;else{var r=document.createElement("h1"),i=document.createTextNode(e.header);r.appendChild(i),r.setAttribute("style",e.headerStyle),n.appendChild(r)}t.insertBefore(n,t.childNodes[0])},e.cleanUp=function(t){t.showModal&&i.default.close();t.onLoadingEnd&&t.onLoadingEnd();(t.showModal||t.onLoadingStart)&&window.URL.revokeObjectURL(t.printable);if(t.onPrintDialogClose){var e="mouseover";(a.default.isChrome()||a.default.isFirefox())&&(e="focus");window.addEventListener(e,function n(){window.removeEventListener(e,n),t.onPrintDialogClose()})}},e.isRawHTML=s;var i=o(n("./src/js/modal.js")),a=o(n("./src/js/browser.js"));function o(t){return t&&t.__esModule?t:{default:t}}function s(t){return new RegExp("<([A-Za-z][A-Za-z0-9]*)\\b[^>]*>(.*?)</\\1>").test(t)}},"./src/js/html.js":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n("./src/js/functions.js"),a=n("./src/js/print.js"),o=(r=a)&&r.__esModule?r:{default:r};e.default={print:function(t,e){var n=document.getElementById(t.printable);n?(t.printableElement=function t(e,n){var r=e.cloneNode();var a=!0;var o=!1;var s=void 0;try{for(var c,u=e.childNodes[Symbol.iterator]();!(a=(c=u.next()).done);a=!0){var l=c.value;if(-1===n.ignoreElements.indexOf(l.id)){var d=t(l,n);r.appendChild(d)}}}catch(t){o=!0,s=t}finally{try{!a&&u.return&&u.return()}finally{if(o)throw s}}n.scanStyles&&1===e.nodeType&&r.setAttribute("style",(0,i.collectStyles)(e,n));switch(e.tagName){case"SELECT":r.value=e.value;break;case"CANVAS":r.getContext("2d").drawImage(e,0,0)}return r}(n,t),t.header&&(0,i.addHeader)(t.printableElement,t),o.default.send(t,e)):window.console.error("Invalid HTML element id: "+t.printable)}}},"./src/js/image.js":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n("./src/js/functions.js"),a=n("./src/js/print.js"),o=(r=a)&&r.__esModule?r:{default:r};e.default={print:function(t,e){t.printable.constructor!==Array&&(t.printable=[t.printable]),t.printableElement=document.createElement("div"),t.printable.forEach(function(e){var n=document.createElement("img");n.setAttribute("style",t.imageStyle),n.src=e;var r=document.createElement("div");r.appendChild(n),t.printableElement.appendChild(r)}),t.header&&(0,i.addHeader)(t.printableElement,t),o.default.send(t,e)}}},"./src/js/init.js":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=d(n("./src/js/browser.js")),a=d(n("./src/js/modal.js")),o=d(n("./src/js/pdf.js")),s=d(n("./src/js/html.js")),c=d(n("./src/js/raw-html.js")),u=d(n("./src/js/image.js")),l=d(n("./src/js/json.js"));function d(t){return t&&t.__esModule?t:{default:t}}var f=["pdf","html","image","json","raw-html"];e.default={init:function(){var t={printable:null,fallbackPrintable:null,type:"pdf",header:null,headerStyle:"font-weight: 300;",maxWidth:800,font:"TimesNewRoman",font_size:"12pt",honorMarginPadding:!0,honorColor:!1,properties:null,gridHeaderStyle:"font-weight: bold; padding: 5px; border: 1px solid #dddddd;",gridStyle:"border: 1px solid lightgray; margin-bottom: -1px;",showModal:!1,onError:function(t){throw t},onLoadingStart:null,onLoadingEnd:null,onPrintDialogClose:null,onPdfOpen:null,onBrowserIncompatible:function(){return!0},modalMessage:"Retrieving Document...",frameId:"printJS",printableElement:null,documentTitle:"Document",targetStyle:["clear","display","width","min-width","height","min-height","max-height"],targetStyles:["border","box","break","text-decoration"],ignoreElements:[],imageStyle:"max-width: 100%;",repeatTableHeader:!0,css:null,style:null,scanStyles:!0,base64:!1},e=arguments[0];if(void 0===e)throw new Error("printJS expects at least 1 attribute.");switch(void 0===e?"undefined":r(e)){case"string":t.printable=encodeURI(e),t.fallbackPrintable=t.printable,t.type=arguments[1]||t.type;break;case"object":for(var n in t.printable=e.printable,t.base64=void 0!==e.base64,t.fallbackPrintable=void 0!==e.fallbackPrintable?e.fallbackPrintable:t.printable,t.fallbackPrintable=t.base64?"data:application/pdf;base64,"+t.fallbackPrintable:t.fallbackPrintable,t)"printable"!==n&&"fallbackPrintable"!==n&&"base64"!==n&&(t[n]=void 0!==e[n]?e[n]:t[n]);break;default:throw new Error('Unexpected argument type! Expected "string" or "object", got '+(void 0===e?"undefined":r(e)))}if(!t.printable)throw new Error("Missing printable information.");if(!t.type||"string"!=typeof t.type||-1===f.indexOf(t.type.toLowerCase()))throw new Error("Invalid print type. Available types are: pdf, html, image and json.");t.showModal&&a.default.show(t),t.onLoadingStart&&t.onLoadingStart();var d=document.getElementById(t.frameId);d&&d.parentNode.removeChild(d);var h=void 0;switch((h=document.createElement("iframe")).setAttribute("style","visibility: hidden; height: 0; width: 0; position: absolute;"),h.setAttribute("id",t.frameId),"pdf"!==t.type&&(h.srcdoc="<html><head><title>"+t.documentTitle+"</title>",t.css&&(Array.isArray(t.css)||(t.css=[t.css]),t.css.forEach(function(t){h.srcdoc+='<link rel="stylesheet" href="'+t+'">'})),h.srcdoc+="</head><body></body></html>"),t.type){case"pdf":if(i.default.isFirefox()||i.default.isEdge()||i.default.isIE())try{if(console.info("PrintJS currently doesn't support PDF printing in Firefox, Internet Explorer and Edge."),!0===t.onBrowserIncompatible())window.open(t.fallbackPrintable,"_blank").focus(),t.onPdfOpen&&t.onPdfOpen()}catch(e){t.onError(e)}finally{t.showModal&&a.default.close(),t.onLoadingEnd&&t.onLoadingEnd()}else o.default.print(t,h);break;case"image":u.default.print(t,h);break;case"html":s.default.print(t,h);break;case"raw-html":c.default.print(t,h);break;case"json":l.default.print(t,h)}}}},"./src/js/json.js":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a=n("./src/js/functions.js"),o=n("./src/js/print.js"),s=(r=o)&&r.__esModule?r:{default:r};e.default={print:function(t,e){if("object"!==i(t.printable))throw new Error("Invalid javascript data object (JSON).");if("boolean"!=typeof t.repeatTableHeader)throw new Error("Invalid value for repeatTableHeader attribute (JSON).");if(!t.properties||!Array.isArray(t.properties))throw new Error("Invalid properties array for your JSON data.");t.properties=t.properties.map(function(e){return{field:"object"===(void 0===e?"undefined":i(e))?e.field:e,displayName:"object"===(void 0===e?"undefined":i(e))?e.displayName:e,columnSize:"object"===(void 0===e?"undefined":i(e))&&e.columnSize?e.columnSize+";":100/t.properties.length+"%;"}}),t.printableElement=document.createElement("div"),t.header&&(0,a.addHeader)(t.printableElement,t),t.printableElement.innerHTML+=function(t){var e=t.printable,n=t.properties,r='<table style="border-collapse: collapse; width: 100%;">';t.repeatTableHeader&&(r+="<thead>");r+="<tr>";for(var i=0;i<n.length;i++)r+='<th style="width:'+n[i].columnSize+";"+t.gridHeaderStyle+'">'+(0,a.capitalizePrint)(n[i].displayName)+"</th>";r+="</tr>",t.repeatTableHeader&&(r+="</thead>");r+="<tbody>";for(var o=0;o<e.length;o++){r+="<tr>";for(var s=0;s<n.length;s++){var c=e[o],u=n[s].field.split(".");if(u.length>1)for(var l=0;l<u.length;l++)c=c[u[l]];else c=c[n[s].field];r+='<td style="width:'+n[s].columnSize+t.gridStyle+'">'+c+"</td>"}r+="</tr>"}return r+="</tbody></table>"}(t),s.default.send(t,e)}}},"./src/js/modal.js":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={show:function(t){var e=document.createElement("div");e.setAttribute("style","font-family:sans-serif; display:table; text-align:center; font-weight:300; font-size:30px; left:0; top:0;position:fixed; z-index: 9990;color: #0460B5; width: 100%; height: 100%; background-color:rgba(255,255,255,.9);transition: opacity .3s ease;"),e.setAttribute("id","printJS-Modal");var n=document.createElement("div");n.setAttribute("style","display:table-cell; vertical-align:middle; padding-bottom:100px;");var i=document.createElement("div");i.setAttribute("class","printClose"),i.setAttribute("id","printClose"),n.appendChild(i);var a=document.createElement("span");a.setAttribute("class","printSpinner"),n.appendChild(a);var o=document.createTextNode(t.modalMessage);n.appendChild(o),e.appendChild(n),document.getElementsByTagName("body")[0].appendChild(e),document.getElementById("printClose").addEventListener("click",function(){r.close()})},close:function(){var t=document.getElementById("printJS-Modal");t.parentNode.removeChild(t)}};e.default=r},"./src/js/pdf.js":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n("./src/js/print.js"),a=(r=i)&&r.__esModule?r:{default:r},o=n("./src/js/functions.js");function s(t,e,n){var r=new window.Blob([n],{type:"application/pdf"});r=window.URL.createObjectURL(r),e.setAttribute("src",r),a.default.send(t,e)}e.default={print:function(t,e){if(t.base64){var n=Uint8Array.from(atob(t.printable),function(t){return t.charCodeAt(0)});s(t,e,n)}else{t.printable=/^(blob|http)/i.test(t.printable)?t.printable:window.location.origin+("/"!==t.printable.charAt(0)?"/"+t.printable:t.printable);var r=new window.XMLHttpRequest;r.responseType="arraybuffer",r.addEventListener("load",function(){if(-1===[200,201].indexOf(r.status))return(0,o.cleanUp)(t),void t.onError(r.statusText);s(t,e,r.response)}),r.open("GET",t.printable,!0),r.send()}}}},"./src/js/print.js":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n("./src/js/browser.js"),a=(r=i)&&r.__esModule?r:{default:r},o=n("./src/js/functions.js");var s={send:function(t,e){document.getElementsByTagName("body")[0].appendChild(e);var n=document.getElementById(t.frameId);n.onload=function(){if("pdf"!==t.type){var e=n.contentWindow||n.contentDocument;if(e.document&&(e=e.document),e.body.appendChild(t.printableElement),"pdf"!==t.type&&t.style){var r=document.createElement("style");r.innerHTML=t.style,e.head.appendChild(r)}var i=e.getElementsByTagName("img");i.length>0?function(t){var e=[],n=!0,r=!1,i=void 0;try{for(var a,o=t[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;e.push(u(s))}}catch(t){r=!0,i=t}finally{try{!n&&o.return&&o.return()}finally{if(r)throw i}}return Promise.all(e)}(i).then(function(){return c(n,t)}):c(n,t)}else c(n,t)}}};function c(t,e){try{if(t.focus(),a.default.isEdge()||a.default.isIE())try{t.contentWindow.document.execCommand("print",!1,null)}catch(e){t.contentWindow.print()}else t.contentWindow.print()}catch(t){e.onError(t)}finally{(0,o.cleanUp)(e)}}function u(t){return new Promise(function(e){!function n(){t&&void 0!==t.naturalWidth&&0!==t.naturalWidth&&t.complete?e():setTimeout(n,500)}()})}e.default=s},"./src/js/raw-html.js":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n("./src/js/print.js"),a=(r=i)&&r.__esModule?r:{default:r};e.default={print:function(t,e){t.printableElement=document.createElement("div"),t.printableElement.setAttribute("style","width:100%"),t.printableElement.innerHTML=t.printable,a.default.send(t,e)}}},"./src/sass/index.scss":function(t,e,n){},0:function(t,e,n){t.exports=n("./src/index.js")}}).default},t.exports=r()},function(t,e,n){"use strict";if(n(17)){var r=n(51),i=n(12),a=n(13),o=n(4),s=n(103),c=n(145),u=n(38),l=n(64),d=n(57),f=n(27),h=n(66),p=n(40),m=n(16),v=n(325),_=n(60),g=n(43),b=n(30),y=n(71),x=n(14),w=n(21),k=n(134),C=n(61),E=n(33),S=n(62).f,I=n(136),M=n(58),T=n(15),D=n(46),R=n(93),P=n(83),O=n(139),L=n(73),A=n(98),N=n(63),B=n(138),j=n(314),F=n(18),Y=n(32),$=F.f,z=Y.f,V=i.RangeError,H=i.TypeError,q=i.Uint8Array,W=Array.prototype,U=c.ArrayBuffer,G=c.DataView,K=D(0),X=D(2),J=D(3),Z=D(4),Q=D(5),tt=D(6),et=R(!0),nt=R(!1),rt=O.values,it=O.keys,at=O.entries,ot=W.lastIndexOf,st=W.reduce,ct=W.reduceRight,ut=W.join,lt=W.sort,dt=W.slice,ft=W.toString,ht=W.toLocaleString,pt=T("iterator"),mt=T("toStringTag"),vt=M("typed_constructor"),_t=M("def_constructor"),gt=s.CONSTR,bt=s.TYPED,yt=s.VIEW,xt=D(1,function(t,e){return St(P(t,t[_t]),e)}),wt=a(function(){return 1===new q(new Uint16Array([1]).buffer)[0]}),kt=!!q&&!!q.prototype.set&&a(function(){new q(1).set({})}),Ct=function(t,e){var n=p(t);if(n<0||n%e)throw V("Wrong offset!");return n},Et=function(t){if(x(t)&&bt in t)return t;throw H(t+" is not a typed array!")},St=function(t,e){if(!(x(t)&&vt in t))throw H("It is not a typed array constructor!");return new t(e)},It=function(t,e){return Mt(P(t,t[_t]),e)},Mt=function(t,e){for(var n=0,r=e.length,i=St(t,r);r>n;)i[n]=e[n++];return i},Tt=function(t,e,n){$(t,e,{get:function(){return this._d[n]}})},Dt=function(t){var e,n,r,i,a,o,s=w(t),c=arguments.length,l=c>1?arguments[1]:void 0,d=void 0!==l,f=I(s);if(void 0!=f&&!k(f)){for(o=f.call(s),r=[],e=0;!(a=o.next()).done;e++)r.push(a.value);s=r}for(d&&c>2&&(l=u(l,arguments[2],2)),e=0,n=m(s.length),i=St(this,n);n>e;e++)i[e]=d?l(s[e],e):s[e];return i},Rt=function(){for(var t=0,e=arguments.length,n=St(this,e);e>t;)n[t]=arguments[t++];return n},Pt=!!q&&a(function(){ht.call(new q(1))}),Ot=function(){return ht.apply(Pt?dt.call(Et(this)):Et(this),arguments)},Lt={copyWithin:function(t,e){return j.call(Et(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return Z(Et(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return B.apply(Et(this),arguments)},filter:function(t){return It(this,X(Et(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return Q(Et(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(Et(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){K(Et(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return nt(Et(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return et(Et(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ut.apply(Et(this),arguments)},lastIndexOf:function(t){return ot.apply(Et(this),arguments)},map:function(t){return xt(Et(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return st.apply(Et(this),arguments)},reduceRight:function(t){return ct.apply(Et(this),arguments)},reverse:function(){for(var t,e=Et(this).length,n=Math.floor(e/2),r=0;r<n;)t=this[r],this[r++]=this[--e],this[e]=t;return this},some:function(t){return J(Et(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return lt.call(Et(this),t)},subarray:function(t,e){var n=Et(this),r=n.length,i=_(t,r);return new(P(n,n[_t]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,m((void 0===e?r:_(e,r))-i))}},At=function(t,e){return It(this,dt.call(Et(this),t,e))},Nt=function(t){Et(this);var e=Ct(arguments[1],1),n=this.length,r=w(t),i=m(r.length),a=0;if(i+e>n)throw V("Wrong length!");for(;a<i;)this[e+a]=r[a++]},Bt={entries:function(){return at.call(Et(this))},keys:function(){return it.call(Et(this))},values:function(){return rt.call(Et(this))}},jt=function(t,e){return x(t)&&t[bt]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},Ft=function(t,e){return jt(t,e=g(e,!0))?d(2,t[e]):z(t,e)},Yt=function(t,e,n){return!(jt(t,e=g(e,!0))&&x(n)&&b(n,"value"))||b(n,"get")||b(n,"set")||n.configurable||b(n,"writable")&&!n.writable||b(n,"enumerable")&&!n.enumerable?$(t,e,n):(t[e]=n.value,t)};gt||(Y.f=Ft,F.f=Yt),o(o.S+o.F*!gt,"Object",{getOwnPropertyDescriptor:Ft,defineProperty:Yt}),a(function(){ft.call({})})&&(ft=ht=function(){return ut.call(this)});var $t=h({},Lt);h($t,Bt),f($t,pt,Bt.values),h($t,{slice:At,set:Nt,constructor:function(){},toString:ft,toLocaleString:Ot}),Tt($t,"buffer","b"),Tt($t,"byteOffset","o"),Tt($t,"byteLength","l"),Tt($t,"length","e"),$($t,mt,{get:function(){return this[bt]}}),t.exports=function(t,e,n,c){var u=t+((c=!!c)?"Clamped":"")+"Array",d="get"+t,h="set"+t,p=i[u],_=p||{},g=p&&E(p),b=!p||!s.ABV,w={},k=p&&p.prototype,I=function(t,n){$(t,n,{get:function(){return function(t,n){var r=t._d;return r.v[d](n*e+r.o,wt)}(this,n)},set:function(t){return function(t,n,r){var i=t._d;c&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),i.v[h](n*e+i.o,r,wt)}(this,n,t)},enumerable:!0})};b?(p=n(function(t,n,r,i){l(t,p,u,"_d");var a,o,s,c,d=0,h=0;if(x(n)){if(!(n instanceof U||"ArrayBuffer"==(c=y(n))||"SharedArrayBuffer"==c))return bt in n?Mt(p,n):Dt.call(p,n);a=n,h=Ct(r,e);var _=n.byteLength;if(void 0===i){if(_%e)throw V("Wrong length!");if((o=_-h)<0)throw V("Wrong length!")}else if((o=m(i)*e)+h>_)throw V("Wrong length!");s=o/e}else s=v(n),a=new U(o=s*e);for(f(t,"_d",{b:a,o:h,l:o,e:s,v:new G(a)});d<s;)I(t,d++)}),k=p.prototype=C($t),f(k,"constructor",p)):a(function(){p(1)})&&a(function(){new p(-1)})&&A(function(t){new p,new p(null),new p(1.5),new p(t)},!0)||(p=n(function(t,n,r,i){var a;return l(t,p,u),x(n)?n instanceof U||"ArrayBuffer"==(a=y(n))||"SharedArrayBuffer"==a?void 0!==i?new _(n,Ct(r,e),i):void 0!==r?new _(n,Ct(r,e)):new _(n):bt in n?Mt(p,n):Dt.call(p,n):new _(v(n))}),K(g!==Function.prototype?S(_).concat(S(g)):S(_),function(t){t in p||f(p,t,_[t])}),p.prototype=k,r||(k.constructor=p));var M=k[pt],T=!!M&&("values"==M.name||void 0==M.name),D=Bt.values;f(p,vt,!0),f(k,bt,u),f(k,yt,!0),f(k,_t,p),(c?new p(1)[mt]==u:mt in k)||$(k,mt,{get:function(){return u}}),w[u]=p,o(o.G+o.W+o.F*(p!=_),w),o(o.S,u,{BYTES_PER_ELEMENT:e}),o(o.S+o.F*a(function(){_.of.call(p,1)}),u,{from:Dt,of:Rt}),"BYTES_PER_ELEMENT"in k||f(k,"BYTES_PER_ELEMENT",e),o(o.P,u,Lt),N(u),o(o.P+o.F*kt,u,{set:Nt}),o(o.P+o.F*!T,u,Bt),r||k.toString==ft||(k.toString=ft),o(o.P+o.F*a(function(){new p(1).slice()}),u,{slice:At}),o(o.P+o.F*(a(function(){return[1,2].toLocaleString()!=new p([1,2]).toLocaleString()})||!a(function(){k.toLocaleString.call([1,2])})),u,{toLocaleString:Ot}),L[u]=T?M:D,r||T||f(k,pt,D)}}else t.exports=function(){}},function(t,e,n){var r=n(320),i=n(4),a=n(79)("metadata"),o=a.store||(a.store=new(n(323))),s=function(t,e,n){var i=o.get(t);if(!i){if(!n)return;o.set(t,i=new r)}var a=i.get(e);if(!a){if(!n)return;i.set(e,a=new r)}return a};t.exports={store:o,map:s,has:function(t,e,n){var r=s(e,n,!1);return void 0!==r&&r.has(t)},get:function(t,e,n){var r=s(e,n,!1);return void 0===r?void 0:r.get(t)},set:function(t,e,n,r){s(n,r,!0).set(t,e)},keys:function(t,e){var n=s(t,e,!1),r=[];return n&&n.forEach(function(t,e){r.push(e)}),r},key:function(t){return void 0===t||"symbol"==typeof t?t:String(t)},exp:function(t){i(i.S,"Reflect",t)}}},function(t,e){t.exports=!1},function(t,e,n){var r=n(58)("meta"),i=n(14),a=n(30),o=n(18).f,s=0,c=Object.isExtensible||function(){return!0},u=!n(13)(function(){return c(Object.preventExtensions({}))}),l=function(t){o(t,r,{value:{i:"O"+ ++s,w:{}}})},d=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!a(t,r)){if(!c(t))return"F";if(!e)return"E";l(t)}return t[r].i},getWeak:function(t,e){if(!a(t,r)){if(!c(t))return!0;if(!e)return!1;l(t)}return t[r].w},onFreeze:function(t){return u&&d.NEED&&c(t)&&!a(t,r)&&l(t),t}}},function(t,e,n){var r=n(15)("unscopables"),i=Array.prototype;void 0==i[r]&&n(27)(i,r,{}),t.exports=function(t){i[r][t]=!0}},function(t,e,n){"use strict";n.d(e,"b",function(){return a}),n.d(e,"a",function(){return s});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();Laravel.siteUrl;var i=Laravel.apiUrl,a={siteName:Laravel.siteName,socketUrl:Laravel.socketUrl},o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.base=e}return r(t,[{key:"path",value:function(t,e){t=t.split(".");for(var n=this,r=this.base,i=0;i<t.length&&n;i++)n.url&&(r+="/"+n.url),n=n[t[i]];if(n&&(r=r+"/"+("string"==typeof n?n:n.url)),e)for(var a in e)r=r.replace(":"+a,e[a]);return r}}]),t}(),s=Object.assign(new o(i),{url:"",login:{url:"login",refresh:"refresh"},logout:"logout",register:"register",password:{url:"password",forgot:"email",reset:"reset"},me:"me",users:{url:"users",activate:":id/activate",single:":id",restore:":id/restore"},profile:{url:"profile"},company:{url:"company",upd:"upd/",upload:"upload",drop:"drop"}})},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var i=(o=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),a=r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"});return[n].concat(a).concat([i]).join("\n")}var o;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i<this.length;i++){var a=this[i][0];"number"==typeof a&&(r[a]=!0)}for(i=0;i<t.length;i++){var o=t[i];"number"==typeof o[0]&&r[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]="("+o[2]+") and ("+n+")"),e.push(o))}},e}},function(t,e,n){var r=n(11).Buffer,i=n(277).Transform,a=n(281).StringDecoder;function o(t){i.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}n(10)(o,i),o.prototype.update=function(t,e,n){"string"==typeof t&&(t=r.from(t,e));var i=this._update(t);return this.hashMode?this:(n&&(i=this._toString(i,n)),i)},o.prototype.setAutoPadding=function(){},o.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},o.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},o.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},o.prototype._transform=function(t,e,n){var r;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){r=t}finally{n(r)}},o.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},o.prototype._finalOrDigest=function(t){var e=this.__final()||r.alloc(0);return t&&(e=this._toString(e,t,!0)),e},o.prototype._toString=function(t,e,n){if(this._decoder||(this._decoder=new a(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var r=this._decoder.write(t);return n&&(r+=this._decoder.end()),r},t.exports=o},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(299),i=n(122);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){var r=n(40),i=Math.max,a=Math.min;t.exports=function(t,e){return(t=r(t))<0?i(t+e,0):a(t,e)}},function(t,e,n){var r=n(8),i=n(300),a=n(122),o=n(121)("IE_PROTO"),s=function(){},c=function(){var t,e=n(119)("iframe"),r=a.length;for(e.style.display="none",n(123).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[a[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[o]=t):n=c(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(299),i=n(122).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){"use strict";var r=n(12),i=n(18),a=n(17),o=n(15)("species");t.exports=function(t){var e=r[t];a&&e&&!e[o]&&i.f(e,o,{configurable:!0,get:function(){return this}})}},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(38),i=n(312),a=n(134),o=n(8),s=n(16),c=n(136),u={},l={};(e=t.exports=function(t,e,n,d,f){var h,p,m,v,_=f?function(){return t}:c(t),g=r(n,d,e?2:1),b=0;if("function"!=typeof _)throw TypeError(t+" is not iterable!");if(a(_)){for(h=s(t.length);h>b;b++)if((v=e?g(o(p=t[b])[0],p[1]):g(t[b]))===u||v===l)return v}else for(m=_.call(t);!(p=m.next()).done;)if((v=i(m,g,p.value,e))===u||v===l)return v}).BREAK=u,e.RETURN=l},function(t,e,n){var r=n(28);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},function(t,e,n){var r=n(14);t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e,n){var r;"undefined"!=typeof self&&self,r=function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=1)}([function(e,n){e.exports=t},function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{lazy:"","full-width":"",width:t.width,disabled:t.disabled},model:{value:t.display,callback:function(e){t.display=e},expression:"display"}},[n("v-text-field",{attrs:{slot:"activator",label:t.label,value:t.formattedDatetime,disabled:t.disabled,loading:t.loading,"error-messages":t.errorMessages,"error-count":t.errorCount,error:t.error,"hide-details":t.hideDetails,"append-icon":t.appendIcon,"prepend-icon":t.prependIcon,readonly:""},slot:"activator"}),t._v(" "),n("v-card",[n("v-card-text",{staticStyle:{padding:"0"}},[n("v-tabs",{attrs:{"fixed-tabs":""},model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[n("v-tab",{key:"calendar"},[t._t("dateIcon",[n("v-icon",[t._v("event")])])],2),t._v(" "),n("v-tab",{key:"timer",attrs:{disabled:!t.dateSelected}},[t._t("timeIcon",[n("v-icon",[t._v("access_time")])])],2),t._v(" "),n("v-tab-item",{key:"calendar"},[n("v-date-picker",{attrs:{"full-width":"",scrollable:"",locale:t.locale,actions:""},model:{value:t.datePart,callback:function(e){t.datePart=e},expression:"datePart"}})],1),t._v(" "),n("v-tab-item",{key:"timer"},[n("v-time-picker",{ref:"timer",staticClass:"v-time-picker-custom",attrs:{"full-width":"",scrollable:"",format:t.timePickerFormat,actions:"","use-seconds":t.useSeconds},model:{value:t.timePart,callback:function(e){t.timePart=e},expression:"timePart"}})],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),t._t("actions",[n("v-btn",{attrs:{color:"grey lighten-1",flat:""},nativeOn:{click:function(e){return t.clearHandler(e)}}},[t._v(t._s(t.clearText)+" ")]),t._v(" "),n("v-btn",{attrs:{color:"green darken-1",flat:""},on:{click:t.okHandler}},[t._v(t._s(t.okText)+" ")])],{parent:this})],2)],1)],1)};r._withStripped=!0;var i=n(0),a=n.n(i),o=function(t,e,n,r,i,a,o,s){var c,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=[],u._compiled=!0),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,c):[c]}return{exports:t,options:u}}({name:"v-datetime-picker",model:{prop:"datetime",event:"input"},props:{datetime:{type:[Date,String],default:null},label:{type:String,default:""},width:{type:Number,default:340},format:{type:String,default:"YYYY-MM-DD HH:mm:ss"},timePickerFormat:{type:String,default:"24hr"},locale:{type:String,default:"en-us"},clearText:{type:String,default:"CLEAR"},okText:{type:String,default:"OK"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},errorMessages:{type:[String,Array],default:function(){return[]}},errorCount:{type:[Number,String],default:1},error:{type:Boolean,default:!1},hideDetails:{type:Boolean,default:!1},appendIcon:{type:String},prependIcon:{type:String},useSeconds:{type:Boolean,default:!1}},data:function(){return{display:!1,dateSelected:!1,timeSelected:!1,activeTab:0,selectedDatetime:null}},created:function(){this.datetime instanceof Date?this.selectedDatetime=this.datetime:("string"==typeof this.datetime||this.datetime instanceof String)&&(this.selectedDatetime=a()(this.datetime,this.format))},computed:{datePart:{get:function(){return this.selectedDatetime?a()(this.selectedDatetime).format("YYYY-MM-DD"):""},set:function(t){this.dateSelected=!0,this.activeTab=1;var e=a()(t,"YYYY-MM-DD"),n=this.selectedDatetime?a()(this.selectedDatetime).hour():0,r=this.selectedDatetime?a()(this.selectedDatetime).minute():0,i=a()().year(e.year()).month(e.month()).date(e.date()).hour(n).minute(r).second(0);this.selectedDatetime=i.toDate()}},timePart:{get:function(){return this.selectedDatetime?a()(this.selectedDatetime).format("HH:mm:ss"):"00:00:00"},set:function(t){this.timeSelected=!0;var e=a()(t,"HH:mm:ss"),n=a()(this.selectedDatetime).hour(e.hour()).minute(e.minute()).second(e.second());this.selectedDatetime=n.toDate()}},formattedDatetime:function(){return this.datetime?a()(this.datetime).format(this.format):""}},methods:{okHandler:function(){this.display=!1,this.activeTab=0,this.$refs.timer.selectingHour=!0,this.$emit("input",this.selectedDatetime)},clearHandler:function(){this.display=!1,this.activeTab=0,this.$refs.timer.selectingHour=!0,this.$emit("input",null)}}},r);o.options.__file="src/components/DatetimePicker.vue";var s=o.exports;e.default=function(t){t.component("v-datetime-picker",s)}}]).default},t.exports=r(n(5))},function(t,e,n){"use strict";var r=n(110),i=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=d;var a=n(88);a.inherits=n(10);var o=n(348),s=n(280);a.inherits(d,o);for(var c=i(s.prototype),u=0;u<c.length;u++){var l=c[u];d.prototype[l]||(d.prototype[l]=s.prototype[l])}function d(t){if(!(this instanceof d))return new d(t);o.call(this,t),s.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",f)}function f(){this.allowHalfOpen||this._writableState.ended||r.nextTick(h,this)}function h(t){t.end()}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(d.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),d.prototype._destroy=function(t,e){this.push(null),this.end(),r.nextTick(e,t)}},function(t,e,n){var r=n(18).f,i=n(30),a=n(15)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,a)&&r(t,a,{configurable:!0,value:e})}},function(t,e,n){var r=n(39),i=n(15)("toStringTag"),a="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,o;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:a?r(e):"Object"==(o=r(e))&&"function"==typeof e.callee?"Arguments":o}},function(t,e,n){var r=n(4),i=n(44),a=n(13),o=n(125),s="["+o+"]",c=RegExp("^"+s+s+"*"),u=RegExp(s+s+"*$"),l=function(t,e,n){var i={},s=a(function(){return!!o[t]()||"​…"!="​…"[t]()}),c=i[t]=s?e(d):o[t];n&&(i[n]=c),r(r.P+r.F*s,"String",i)},d=l.trim=function(t,e){return t=String(i(t)),1&e&&(t=t.replace(c,"")),2&e&&(t=t.replace(u,"")),t};t.exports=l},function(t,e){t.exports={}},function(t,e,n){var r=n(0)(n(837),n(842),!1,null,null,null);t.exports=r.exports},function(t,e){t.exports="/images/vendor/leaflet/dist/marker-shadow.png?44a526eed258222515aa21eaffd14a96"},function(t,e,n){"use strict";(function(e,r){var i=65536,a=4294967295;var o=n(11).Buffer,s=e.crypto||e.msCrypto;s&&s.getRandomValues?t.exports=function(t,e){if(t>a)throw new RangeError("requested too many random bytes");var n=o.allocUnsafe(t);if(t>0)if(t>i)for(var c=0;c<t;c+=i)s.getRandomValues(n.slice(c,c+i));else s.getRandomValues(n);if("function"==typeof e)return r.nextTick(function(){e(null,n)});return n}:t.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(e,n(20),n(26))},function(t,e,n){var r=n(11).Buffer;function i(t,e){this._block=r.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=r.from(t,e));for(var n=this._block,i=this._blockSize,a=t.length,o=this._len,s=0;s<a;){for(var c=o%i,u=Math.min(a-s,i-c),l=0;l<u;l++)n[c+l]=t[s+l];s+=u,(o+=u)%i==0&&this._update(n)}return this._len+=a,this},i.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var a=this._hash();return t?a.toString(t):a},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},function(t,e,n){var r,i=n(1381),a=n(393),o=n(1383),s=n(1384),c=n(1385);"undefined"!=typeof ArrayBuffer&&(r=n(1386));var u="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),l="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),d=u||l;e.protocol=3;var f=e.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},h=i(f),p={type:"error",data:"parser error"},m=n(1387);function v(t,e,n){for(var r=new Array(t.length),i=s(t.length,n),a=function(t,n,i){e(n,function(e,n){r[t]=n,i(e,r)})},o=0;o<t.length;o++)a(o,t[o],i)}e.encodePacket=function(t,n,r,i){"function"==typeof n&&(i=n,n=!1),"function"==typeof r&&(i=r,r=null);var a=void 0===t.data?void 0:t.data.buffer||t.data;if("undefined"!=typeof ArrayBuffer&&a instanceof ArrayBuffer)return function(t,n,r){if(!n)return e.encodeBase64Packet(t,r);var i=t.data,a=new Uint8Array(i),o=new Uint8Array(1+i.byteLength);o[0]=f[t.type];for(var s=0;s<a.length;s++)o[s+1]=a[s];return r(o.buffer)}(t,n,i);if(void 0!==m&&a instanceof m)return function(t,n,r){if(!n)return e.encodeBase64Packet(t,r);if(d)return function(t,n,r){if(!n)return e.encodeBase64Packet(t,r);var i=new FileReader;return i.onload=function(){e.encodePacket({type:t.type,data:i.result},n,!0,r)},i.readAsArrayBuffer(t.data)}(t,n,r);var i=new Uint8Array(1);i[0]=f[t.type];var a=new m([i.buffer,t.data]);return r(a)}(t,n,i);if(a&&a.base64)return function(t,n){var r="b"+e.packets[t.type]+t.data.data;return n(r)}(t,i);var o=f[t.type];return void 0!==t.data&&(o+=r?c.encode(String(t.data),{strict:!1}):String(t.data)),i(""+o)},e.encodeBase64Packet=function(t,n){var r,i="b"+e.packets[t.type];if(void 0!==m&&t.data instanceof m){var a=new FileReader;return a.onload=function(){var t=a.result.split(",")[1];n(i+t)},a.readAsDataURL(t.data)}try{r=String.fromCharCode.apply(null,new Uint8Array(t.data))}catch(e){for(var o=new Uint8Array(t.data),s=new Array(o.length),c=0;c<o.length;c++)s[c]=o[c];r=String.fromCharCode.apply(null,s)}return i+=btoa(r),n(i)},e.decodePacket=function(t,n,r){if(void 0===t)return p;if("string"==typeof t){if("b"===t.charAt(0))return e.decodeBase64Packet(t.substr(1),n);if(r&&!1===(t=function(t){try{t=c.decode(t,{strict:!1})}catch(t){return!1}return t}(t)))return p;var i=t.charAt(0);return Number(i)==i&&h[i]?t.length>1?{type:h[i],data:t.substring(1)}:{type:h[i]}:p}i=new Uint8Array(t)[0];var a=o(t,1);return m&&"blob"===n&&(a=new m([a])),{type:h[i],data:a}},e.decodeBase64Packet=function(t,e){var n=h[t.charAt(0)];if(!r)return{type:n,data:{base64:!0,data:t.substr(1)}};var i=r.decode(t.substr(1));return"blob"===e&&m&&(i=new m([i])),{type:n,data:i}},e.encodePayload=function(t,n,r){"function"==typeof n&&(r=n,n=null);var i=a(t);if(n&&i)return m&&!d?e.encodePayloadAsBlob(t,r):e.encodePayloadAsArrayBuffer(t,r);if(!t.length)return r("0:");v(t,function(t,r){e.encodePacket(t,!!i&&n,!1,function(t){r(null,function(t){return t.length+":"+t}(t))})},function(t,e){return r(e.join(""))})},e.decodePayload=function(t,n,r){if("string"!=typeof t)return e.decodePayloadAsBinary(t,n,r);var i;if("function"==typeof n&&(r=n,n=null),""===t)return r(p,0,1);for(var a,o,s="",c=0,u=t.length;c<u;c++){var l=t.charAt(c);if(":"===l){if(""===s||s!=(a=Number(s)))return r(p,0,1);if(s!=(o=t.substr(c+1,a)).length)return r(p,0,1);if(o.length){if(i=e.decodePacket(o,n,!1),p.type===i.type&&p.data===i.data)return r(p,0,1);if(!1===r(i,c+a,u))return}c+=a,s=""}else s+=l}return""!==s?r(p,0,1):void 0},e.encodePayloadAsArrayBuffer=function(t,n){if(!t.length)return n(new ArrayBuffer(0));v(t,function(t,n){e.encodePacket(t,!0,!0,function(t){return n(null,t)})},function(t,e){var r=e.reduce(function(t,e){var n;return t+(n="string"==typeof e?e.length:e.byteLength).toString().length+n+2},0),i=new Uint8Array(r),a=0;return e.forEach(function(t){var e="string"==typeof t,n=t;if(e){for(var r=new Uint8Array(t.length),o=0;o<t.length;o++)r[o]=t.charCodeAt(o);n=r.buffer}i[a++]=e?0:1;var s=n.byteLength.toString();for(o=0;o<s.length;o++)i[a++]=parseInt(s[o]);i[a++]=255;for(r=new Uint8Array(n),o=0;o<r.length;o++)i[a++]=r[o]}),n(i.buffer)})},e.encodePayloadAsBlob=function(t,n){v(t,function(t,n){e.encodePacket(t,!0,!0,function(t){var e=new Uint8Array(1);if(e[0]=1,"string"==typeof t){for(var r=new Uint8Array(t.length),i=0;i<t.length;i++)r[i]=t.charCodeAt(i);t=r.buffer,e[0]=0}var a=(t instanceof ArrayBuffer?t.byteLength:t.size).toString(),o=new Uint8Array(a.length+1);for(i=0;i<a.length;i++)o[i]=parseInt(a[i]);if(o[a.length]=255,m){var s=new m([e.buffer,o.buffer,t]);n(null,s)}})},function(t,e){return n(new m(e))})},e.decodePayloadAsBinary=function(t,n,r){"function"==typeof n&&(r=n,n=null);for(var i=t,a=[];i.byteLength>0;){for(var s=new Uint8Array(i),c=0===s[0],u="",l=1;255!==s[l];l++){if(u.length>310)return r(p,0,1);u+=s[l]}i=o(i,2+u.length),u=parseInt(u);var d=o(i,0,u);if(c)try{d=String.fromCharCode.apply(null,new Uint8Array(d))}catch(t){var f=new Uint8Array(d);d="";for(l=0;l<f.length;l++)d+=String.fromCharCode(f[l])}a.push(d),i=o(i,u)}var h=a.length;a.forEach(function(t,i){r(e.decodePacket(t,n,!0),i,h)})}},function(t,e,n){var r=n(37),i=n(12),a=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(51)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(39);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){"use strict";var r=n(8);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){var r=n(8),i=n(25),a=n(15)("species");t.exports=function(t,e){var n,o=r(t).constructor;return void 0===o||void 0==(n=r(o)[a])?e:i(n)}},function(t,e,n){"use strict";(function(t){n.d(e,"b",function(){return y});var r=("undefined"!=typeof window?window:void 0!==t?t:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function i(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}var a=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"==typeof n?n():n)||{}},o={namespaced:{configurable:!0}};o.namespaced.get=function(){return!!this._rawModule.namespaced},a.prototype.addChild=function(t,e){this._children[t]=e},a.prototype.removeChild=function(t){delete this._children[t]},a.prototype.getChild=function(t){return this._children[t]},a.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},a.prototype.forEachChild=function(t){i(this._children,t)},a.prototype.forEachGetter=function(t){this._rawModule.getters&&i(this._rawModule.getters,t)},a.prototype.forEachAction=function(t){this._rawModule.actions&&i(this._rawModule.actions,t)},a.prototype.forEachMutation=function(t){this._rawModule.mutations&&i(this._rawModule.mutations,t)},Object.defineProperties(a.prototype,o);var s=function(t){this.register([],t,!1)};s.prototype.get=function(t){return t.reduce(function(t,e){return t.getChild(e)},this.root)},s.prototype.getNamespace=function(t){var e=this.root;return t.reduce(function(t,n){return t+((e=e.getChild(n)).namespaced?n+"/":"")},"")},s.prototype.update=function(t){!function t(e,n,r){0;n.update(r);if(r.modules)for(var i in r.modules){if(!n.getChild(i))return void 0;t(e.concat(i),n.getChild(i),r.modules[i])}}([],this.root,t)},s.prototype.register=function(t,e,n){var r=this;void 0===n&&(n=!0);var o=new a(e,n);0===t.length?this.root=o:this.get(t.slice(0,-1)).addChild(t[t.length-1],o);e.modules&&i(e.modules,function(e,i){r.register(t.concat(i),e,n)})},s.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];e.getChild(n).runtime&&e.removeChild(n)};var c;var u=function(t){var e=this;void 0===t&&(t={}),!c&&"undefined"!=typeof window&&window.Vue&&_(window.Vue);var n=t.plugins;void 0===n&&(n=[]);var i=t.strict;void 0===i&&(i=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new s(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new c;var a=this,o=this.dispatch,u=this.commit;this.dispatch=function(t,e){return o.call(a,t,e)},this.commit=function(t,e,n){return u.call(a,t,e,n)},this.strict=i;var l=this._modules.root.state;p(this,l,[],this._modules.root),h(this,l),n.forEach(function(t){return t(e)}),(void 0!==t.devtools?t.devtools:c.config.devtools)&&function(t){r&&(t._devtoolHook=r,r.emit("vuex:init",t),r.on("vuex:travel-to-state",function(e){t.replaceState(e)}),t.subscribe(function(t,e){r.emit("vuex:mutation",t,e)}))}(this)},l={state:{configurable:!0}};function d(t,e){return e.indexOf(t)<0&&e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function f(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;p(t,n,[],t._modules.root,!0),h(t,n,e)}function h(t,e,n){var r=t._vm;t.getters={};var a={};i(t._wrappedGetters,function(e,n){a[n]=function(t,e){return function(){return t(e)}}(e,t),Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})});var o=c.config.silent;c.config.silent=!0,t._vm=new c({data:{$$state:e},computed:a}),c.config.silent=o,t.strict&&function(t){t._vm.$watch(function(){return this._data.$$state},function(){0},{deep:!0,sync:!0})}(t),r&&(n&&t._withCommit(function(){r._data.$$state=null}),c.nextTick(function(){return r.$destroy()}))}function p(t,e,n,r,i){var a=!n.length,o=t._modules.getNamespace(n);if(r.namespaced&&(t._modulesNamespaceMap[o]=r),!a&&!i){var s=m(e,n.slice(0,-1)),u=n[n.length-1];t._withCommit(function(){c.set(s,u,r.state)})}var l=r.context=function(t,e,n){var r=""===e,i={dispatch:r?t.dispatch:function(n,r,i){var a=v(n,r,i),o=a.payload,s=a.options,c=a.type;return s&&s.root||(c=e+c),t.dispatch(c,o)},commit:r?t.commit:function(n,r,i){var a=v(n,r,i),o=a.payload,s=a.options,c=a.type;s&&s.root||(c=e+c),t.commit(c,o,s)}};return Object.defineProperties(i,{getters:{get:r?function(){return t.getters}:function(){return function(t,e){var n={},r=e.length;return Object.keys(t.getters).forEach(function(i){if(i.slice(0,r)===e){var a=i.slice(r);Object.defineProperty(n,a,{get:function(){return t.getters[i]},enumerable:!0})}}),n}(t,e)}},state:{get:function(){return m(t.state,n)}}}),i}(t,o,n);r.forEachMutation(function(e,n){!function(t,e,n,r){(t._mutations[e]||(t._mutations[e]=[])).push(function(e){n.call(t,r.state,e)})}(t,o+n,e,l)}),r.forEachAction(function(e,n){var r=e.root?n:o+n,i=e.handler||e;!function(t,e,n,r){(t._actions[e]||(t._actions[e]=[])).push(function(e,i){var a,o=n.call(t,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:t.getters,rootState:t.state},e,i);return(a=o)&&"function"==typeof a.then||(o=Promise.resolve(o)),t._devtoolHook?o.catch(function(e){throw t._devtoolHook.emit("vuex:error",e),e}):o})}(t,r,i,l)}),r.forEachGetter(function(e,n){!function(t,e,n,r){if(t._wrappedGetters[e])return void 0;t._wrappedGetters[e]=function(t){return n(r.state,r.getters,t.state,t.getters)}}(t,o+n,e,l)}),r.forEachChild(function(r,a){p(t,e,n.concat(a),r,i)})}function m(t,e){return e.length?e.reduce(function(t,e){return t[e]},t):t}function v(t,e,n){var r;return null!==(r=t)&&"object"==typeof r&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function _(t){c&&t===c||function(t){if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:n});else{var e=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[n].concat(t.init):n,e.call(this,t)}}function n(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(c=t)}l.state.get=function(){return this._vm._data.$$state},l.state.set=function(t){0},u.prototype.commit=function(t,e,n){var r=this,i=v(t,e,n),a=i.type,o=i.payload,s=(i.options,{type:a,payload:o}),c=this._mutations[a];c&&(this._withCommit(function(){c.forEach(function(t){t(o)})}),this._subscribers.forEach(function(t){return t(s,r.state)}))},u.prototype.dispatch=function(t,e){var n=this,r=v(t,e),i=r.type,a=r.payload,o={type:i,payload:a},s=this._actions[i];if(s){try{this._actionSubscribers.filter(function(t){return t.before}).forEach(function(t){return t.before(o,n.state)})}catch(t){0}return(s.length>1?Promise.all(s.map(function(t){return t(a)})):s[0](a)).then(function(t){try{n._actionSubscribers.filter(function(t){return t.after}).forEach(function(t){return t.after(o,n.state)})}catch(t){0}return t})}},u.prototype.subscribe=function(t){return d(t,this._subscribers)},u.prototype.subscribeAction=function(t){return d("function"==typeof t?{before:t}:t,this._actionSubscribers)},u.prototype.watch=function(t,e,n){var r=this;return this._watcherVM.$watch(function(){return t(r.state,r.getters)},e,n)},u.prototype.replaceState=function(t){var e=this;this._withCommit(function(){e._vm._data.$$state=t})},u.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),p(this,this.state,t,this._modules.get(t),n.preserveState),h(this,this.state)},u.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var n=m(e.state,t.slice(0,-1));c.delete(n,t[t.length-1])}),f(this)},u.prototype.hotUpdate=function(t){this._modules.update(t),f(this,!0)},u.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(u.prototype,l);var g=k(function(t,e){var n={};return w(e).forEach(function(e){var r=e.key,i=e.val;n[r]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var r=C(this.$store,"mapState",t);if(!r)return;e=r.context.state,n=r.context.getters}return"function"==typeof i?i.call(this,e,n):e[i]},n[r].vuex=!0}),n}),b=k(function(t,e){var n={};return w(e).forEach(function(e){var r=e.key,i=e.val;n[r]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var r=this.$store.commit;if(t){var a=C(this.$store,"mapMutations",t);if(!a)return;r=a.context.commit}return"function"==typeof i?i.apply(this,[r].concat(e)):r.apply(this.$store,[i].concat(e))}}),n}),y=k(function(t,e){var n={};return w(e).forEach(function(e){var r=e.key,i=e.val;i=t+i,n[r]=function(){if(!t||C(this.$store,"mapGetters",t))return this.$store.getters[i]},n[r].vuex=!0}),n}),x=k(function(t,e){var n={};return w(e).forEach(function(e){var r=e.key,i=e.val;n[r]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var r=this.$store.dispatch;if(t){var a=C(this.$store,"mapActions",t);if(!a)return;r=a.context.dispatch}return"function"==typeof i?i.apply(this,[r].concat(e)):r.apply(this.$store,[i].concat(e))}}),n});function w(t){return Array.isArray(t)?t.map(function(t){return{key:t,val:t}}):Object.keys(t).map(function(e){return{key:e,val:t[e]}})}function k(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function C(t,e,n){return t._modulesNamespaceMap[n]}var E={Store:u,install:_,version:"3.1.1",mapState:g,mapMutations:b,mapGetters:y,mapActions:x,createNamespacedHelpers:function(t){return{mapState:g.bind(null,t),mapGetters:y.bind(null,t),mapMutations:b.bind(null,t),mapActions:x.bind(null,t)}}};e.a=E}).call(e,n(20))},function(t,e,n){var r="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!r)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var i=n(634),a={},o=r&&(document.head||document.getElementsByTagName("head")[0]),s=null,c=0,u=!1,l=function(){},d=null,f="data-vue-ssr-id",h="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function p(t){for(var e=0;e<t.length;e++){var n=t[e],r=a[n.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](n.parts[i]);for(;i<n.parts.length;i++)r.parts.push(v(n.parts[i]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{var o=[];for(i=0;i<n.parts.length;i++)o.push(v(n.parts[i]));a[n.id]={id:n.id,refs:1,parts:o}}}}function m(){var t=document.createElement("style");return t.type="text/css",o.appendChild(t),t}function v(t){var e,n,r=document.querySelector("style["+f+'~="'+t.id+'"]');if(r){if(u)return l;r.parentNode.removeChild(r)}if(h){var i=c++;r=s||(s=m()),e=b.bind(null,r,i,!1),n=b.bind(null,r,i,!0)}else r=m(),e=function(t,e){var n=e.css,r=e.media,i=e.sourceMap;r&&t.setAttribute("media",r);d.ssrId&&t.setAttribute(f,e.id);i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,r),n=function(){r.parentNode.removeChild(r)};return e(t),function(r){if(r){if(r.css===t.css&&r.media===t.media&&r.sourceMap===t.sourceMap)return;e(t=r)}else n()}}t.exports=function(t,e,n,r){u=n,d=r||{};var o=i(t,e);return p(o),function(e){for(var n=[],r=0;r<o.length;r++){var s=o[r];(c=a[s.id]).refs--,n.push(c)}e?p(o=i(t,e)):o=[];for(r=0;r<n.length;r++){var c;if(0===(c=n[r]).refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete a[c.id]}}}};var _,g=(_=[],function(t,e){return _[t]=e,_.filter(Boolean).join("\n")});function b(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=g(e,i);else{var a=document.createTextNode(i),o=t.childNodes;o[e]&&t.removeChild(o[e]),o.length?t.insertBefore(a,o[e]):t.appendChild(a)}}},function(t,e,n){"use strict";e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=n(76),e.createHash=e.Hash=n(87),e.createHmac=e.Hmac=n(354);var r=n(885),i=Object.keys(r),a=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);e.getHashes=function(){return a};var o=n(357);e.pbkdf2=o.pbkdf2,e.pbkdf2Sync=o.pbkdf2Sync;var s=n(887);e.Cipher=s.Cipher,e.createCipher=s.createCipher,e.Cipheriv=s.Cipheriv,e.createCipheriv=s.createCipheriv,e.Decipher=s.Decipher,e.createDecipher=s.createDecipher,e.Decipheriv=s.Decipheriv,e.createDecipheriv=s.createDecipheriv,e.getCiphers=s.getCiphers,e.listCiphers=s.listCiphers;var c=n(904);e.DiffieHellmanGroup=c.DiffieHellmanGroup,e.createDiffieHellmanGroup=c.createDiffieHellmanGroup,e.getDiffieHellman=c.getDiffieHellman,e.createDiffieHellman=c.createDiffieHellman,e.DiffieHellman=c.DiffieHellman;var u=n(909);e.createSign=u.createSign,e.Sign=u.Sign,e.createVerify=u.createVerify,e.Verify=u.Verify,e.createECDH=n(943);var l=n(944);e.publicEncrypt=l.publicEncrypt,e.privateEncrypt=l.privateEncrypt,e.publicDecrypt=l.publicDecrypt,e.privateDecrypt=l.privateDecrypt;var d=n(947);e.randomFill=d.randomFill,e.randomFillSync=d.randomFillSync,e.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},e.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(t,e,n){"use strict";var r=n(10),i=n(276),a=n(282),o=n(283),s=n(56);function c(t){s.call(this,"digest"),this._hash=t}r(c,s),c.prototype._update=function(t){this._hash.update(t)},c.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new i:"rmd160"===t||"ripemd160"===t?new a:new c(o(t))}},function(t,e,n){(function(t){function n(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===n(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===n(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===n(t)},e.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=t.isBuffer}).call(e,n(19).Buffer)},function(t,e,n){(function(e){t.exports=function(t,n){for(var r=Math.min(t.length,n.length),i=new e(r),a=0;a<r;++a)i[a]=t[a]^n[a];return i}}).call(e,n(19).Buffer)},function(t,e,n){"use strict";var r=n(47),i=n(35);function a(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=a,a.prototype.update=function(t,e){if(t=r.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var n=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-n,t.length),0===this.pending.length&&(this.pending=null),t=r.join32(t,0,t.length-n,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},a.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},a.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,n=e-(t+this.padLength)%e,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(t<<=3,"big"===this.endian){for(var a=8;a<this.padLength;a++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=t>>>24&255,r[i++]=t>>>16&255,r[i++]=t>>>8&255,r[i++]=255&t}else for(r[i++]=255&t,r[i++]=t>>>8&255,r[i++]=t>>>16&255,r[i++]=t>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,a=8;a<this.padLength;a++)r[i++]=0;return r}},function(t,e,n){var r=e;r.bignum=n(22),r.define=n(930).define,r.base=n(92),r.constants=n(374),r.decoders=n(935),r.encoders=n(937)},function(t,e,n){var r=e;r.Reporter=n(932).Reporter,r.DecoderBuffer=n(373).DecoderBuffer,r.EncoderBuffer=n(373).EncoderBuffer,r.Node=n(933)},function(t,e,n){var r=n(31),i=n(16),a=n(60);t.exports=function(t){return function(e,n,o){var s,c=r(e),u=i(c.length),l=a(o,u);if(t&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(39);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(40),i=n(44);t.exports=function(t){return function(e,n){var a,o,s=String(i(e)),c=r(n),u=s.length;return c<0||c>=u?t?"":void 0:(a=s.charCodeAt(c))<55296||a>56319||c+1===u||(o=s.charCodeAt(c+1))<56320||o>57343?t?s.charAt(c):a:t?s.slice(c,c+2):o-56320+(a-55296<<10)+65536}}},function(t,e,n){var r=n(14),i=n(39),a=n(15)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[a])?!!e:"RegExp"==i(t))}},function(t,e,n){var r=n(15)("iterator"),i=!1;try{var a=[7][r]();a.return=function(){i=!0},Array.from(a,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var a=[7],o=a[r]();o.next=function(){return{done:n=!0}},a[r]=function(){return o},t(a)}catch(t){}return n}},function(t,e,n){"use strict";var r=n(71),i=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var a=n.call(t,e);if("object"!=typeof a)throw new TypeError("RegExp exec method returned something other than an Object or null");return a}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},function(t,e,n){"use strict";n(316);var r=n(28),i=n(27),a=n(13),o=n(44),s=n(15),c=n(140),u=s("species"),l=!a(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}),d=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var f=s(t),h=!a(function(){var e={};return e[f]=function(){return 7},7!=""[t](e)}),p=h?!a(function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[u]=function(){return n}),n[f](""),!e}):void 0;if(!h||!p||"replace"===t&&!l||"split"===t&&!d){var m=/./[f],v=n(o,f,""[t],function(t,e,n,r,i){return e.exec===c?h&&!i?{done:!0,value:m.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),_=v[0],g=v[1];r(String.prototype,t,_),i(RegExp.prototype,f,2==e?function(t,e){return g.call(t,this,e)}:function(t){return g.call(t,this)})}}},function(t,e,n){var r=n(12).navigator;t.exports=r&&r.userAgent||""},function(t,e,n){"use strict";var r=n(12),i=n(4),a=n(28),o=n(66),s=n(52),c=n(65),u=n(64),l=n(14),d=n(13),f=n(98),h=n(70),p=n(126);t.exports=function(t,e,n,m,v,_){var g=r[t],b=g,y=v?"set":"add",x=b&&b.prototype,w={},k=function(t){var e=x[t];a(x,t,"delete"==t?function(t){return!(_&&!l(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(_&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return _&&!l(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof b&&(_||x.forEach&&!d(function(){(new b).entries().next()}))){var C=new b,E=C[y](_?{}:-0,1)!=C,S=d(function(){C.has(1)}),I=f(function(t){new b(t)}),M=!_&&d(function(){for(var t=new b,e=5;e--;)t[y](e,e);return!t.has(-0)});I||((b=e(function(e,n){u(e,b,t);var r=p(new g,e,b);return void 0!=n&&c(n,v,r[y],r),r})).prototype=x,x.constructor=b),(S||M)&&(k("delete"),k("has"),v&&k("get")),(M||E)&&k(y),_&&x.clear&&delete x.clear}else b=m.getConstructor(e,t,v,y),o(b.prototype,n),s.NEED=!0;return h(b,t),w[t]=b,i(i.G+i.W+i.F*(b!=g),w),_||m.setStrong(b,t,v),b}},function(t,e,n){for(var r,i=n(12),a=n(27),o=n(58),s=o("typed_array"),c=o("view"),u=!(!i.ArrayBuffer||!i.DataView),l=u,d=0,f="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");d<9;)(r=i[f[d++]])?(a(r.prototype,s,!0),a(r.prototype,c,!0)):l=!1;t.exports={ABV:u,CONSTR:l,TYPED:s,VIEW:c}},function(t,e,n){"use strict";t.exports=n(51)||!n(13)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete n(12)[t]})},function(t,e,n){"use strict";var r=n(4);t.exports=function(t){r(r.S,t,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}})}},function(t,e,n){"use strict";var r=n(4),i=n(25),a=n(38),o=n(65);t.exports=function(t){r(r.S,t,{from:function(t){var e,n,r,s,c=arguments[1];return i(this),(e=void 0!==c)&&i(c),void 0==t?new this:(n=[],e?(r=0,s=a(c,arguments[2],2),o(t,!1,function(t){n.push(s(t,r++))})):o(t,!1,n.push,n),new this(n))}})}},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function a(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new a(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new a(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(605),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(e,n(20))},function(t,e,n){var r=n(0)(n(769),n(770),!1,null,null,null);t.exports=r.exports},function(t,e,n){(function(t){"use strict";var e="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;t.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(t,r){return t?/-MMM-/.test(r)?n[t.month()]:e[t.month()]:e},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){"use strict";(function(e){void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,n,r,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var a,o,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,n)});case 3:return e.nextTick(function(){t.call(null,n,r)});case 4:return e.nextTick(function(){t.call(null,n,r,i)});default:for(a=new Array(s-1),o=0;o<a.length;)a[o++]=arguments[o];return e.nextTick(function(){t.apply(null,a)})}}}:t.exports=e}).call(e,n(26))},function(t,e,n){var r=n(11).Buffer;function i(t){r.isBuffer(t)||(t=r.from(t));for(var e=t.length/4|0,n=new Array(e),i=0;i<e;i++)n[i]=t.readUInt32BE(4*i);return n}function a(t){for(;0<t.length;t++)t[0]=0}function o(t,e,n,r,i){for(var a,o,s,c,u=n[0],l=n[1],d=n[2],f=n[3],h=t[0]^e[0],p=t[1]^e[1],m=t[2]^e[2],v=t[3]^e[3],_=4,g=1;g<i;g++)a=u[h>>>24]^l[p>>>16&255]^d[m>>>8&255]^f[255&v]^e[_++],o=u[p>>>24]^l[m>>>16&255]^d[v>>>8&255]^f[255&h]^e[_++],s=u[m>>>24]^l[v>>>16&255]^d[h>>>8&255]^f[255&p]^e[_++],c=u[v>>>24]^l[h>>>16&255]^d[p>>>8&255]^f[255&m]^e[_++],h=a,p=o,m=s,v=c;return a=(r[h>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&v])^e[_++],o=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[v>>>8&255]<<8|r[255&h])^e[_++],s=(r[m>>>24]<<24|r[v>>>16&255]<<16|r[h>>>8&255]<<8|r[255&p])^e[_++],c=(r[v>>>24]<<24|r[h>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^e[_++],[a>>>=0,o>>>=0,s>>>=0,c>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],c=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var n=[],r=[],i=[[],[],[],[]],a=[[],[],[],[]],o=0,s=0,c=0;c<256;++c){var u=s^s<<1^s<<2^s<<3^s<<4;u=u>>>8^255&u^99,n[o]=u,r[u]=o;var l=t[o],d=t[l],f=t[d],h=257*t[u]^16843008*u;i[0][o]=h<<24|h>>>8,i[1][o]=h<<16|h>>>16,i[2][o]=h<<8|h>>>24,i[3][o]=h,h=16843009*f^65537*d^257*l^16843008*o,a[0][u]=h<<24|h>>>8,a[1][u]=h<<16|h>>>16,a[2][u]=h<<8|h>>>24,a[3][u]=h,0===o?o=s=1:(o=l^t[t[t[f^l]]],s^=t[t[s]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:i,INV_SUB_MIX:a}}();function u(t){this._key=i(t),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var t=this._key,e=t.length,n=e+6,r=4*(n+1),i=[],a=0;a<e;a++)i[a]=t[a];for(a=e;a<r;a++){var o=i[a-1];a%e==0?(o=o<<8|o>>>24,o=c.SBOX[o>>>24]<<24|c.SBOX[o>>>16&255]<<16|c.SBOX[o>>>8&255]<<8|c.SBOX[255&o],o^=s[a/e|0]<<24):e>6&&a%e==4&&(o=c.SBOX[o>>>24]<<24|c.SBOX[o>>>16&255]<<16|c.SBOX[o>>>8&255]<<8|c.SBOX[255&o]),i[a]=i[a-e]^o}for(var u=[],l=0;l<r;l++){var d=r-l,f=i[d-(l%4?0:4)];u[l]=l<4||d<=4?f:c.INV_SUB_MIX[0][c.SBOX[f>>>24]]^c.INV_SUB_MIX[1][c.SBOX[f>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[f>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&f]]}this._nRounds=n,this._keySchedule=i,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(t){return o(t=i(t),this._keySchedule,c.SUB_MIX,c.SBOX,this._nRounds)},u.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),n=r.allocUnsafe(16);return n.writeUInt32BE(e[0],0),n.writeUInt32BE(e[1],4),n.writeUInt32BE(e[2],8),n.writeUInt32BE(e[3],12),n},u.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var n=o(t,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX,this._nRounds),a=r.allocUnsafe(16);return a.writeUInt32BE(n[0],0),a.writeUInt32BE(n[3],4),a.writeUInt32BE(n[2],8),a.writeUInt32BE(n[1],12),a},u.prototype.scrub=function(){a(this._keySchedule),a(this._invKeySchedule),a(this._key)},t.exports.AES=u},function(t,e,n){var r=n(11).Buffer,i=n(276);t.exports=function(t,e,n,a){if(r.isBuffer(t)||(t=r.from(t,"binary")),e&&(r.isBuffer(e)||(e=r.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var o=n/8,s=r.alloc(o),c=r.alloc(a||0),u=r.alloc(0);o>0||a>0;){var l=new i;l.update(u),l.update(t),e&&l.update(e),u=l.digest();var d=0;if(o>0){var f=s.length-o;d=Math.min(o,u.length),u.copy(s,f,0,d),o-=d}if(d<u.length&&a>0){var h=c.length-a,p=Math.min(a,u.length-d);u.copy(c,h,d,d+p),a-=p}}return u.fill(0),{key:s,iv:c}}},function(t,e,n){"use strict";var r=n(22),i=n(36),a=i.getNAF,o=i.getJSF,s=i.assert;function c(t,e){this.type=t,this.p=new r(e.p,16),this.red=e.prime?r.red(e.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=e.n&&new r(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=c,c.prototype.point=function(){throw new Error("Not implemented")},c.prototype.validate=function(){throw new Error("Not implemented")},c.prototype._fixedNafMul=function(t,e){s(t.precomputed);var n=t._getDoubles(),r=a(e,1),i=(1<<n.step+1)-(n.step%2==0?2:1);i/=3;for(var o=[],c=0;c<r.length;c+=n.step){var u=0;for(e=c+n.step-1;e>=c;e--)u=(u<<1)+r[e];o.push(u)}for(var l=this.jpoint(null,null,null),d=this.jpoint(null,null,null),f=i;f>0;f--){for(c=0;c<o.length;c++){(u=o[c])===f?d=d.mixedAdd(n.points[c]):u===-f&&(d=d.mixedAdd(n.points[c].neg()))}l=l.add(d)}return l.toP()},c.prototype._wnafMul=function(t,e){var n=4,r=t._getNAFPoints(n);n=r.wnd;for(var i=r.points,o=a(e,n),c=this.jpoint(null,null,null),u=o.length-1;u>=0;u--){for(e=0;u>=0&&0===o[u];u--)e++;if(u>=0&&e++,c=c.dblp(e),u<0)break;var l=o[u];s(0!==l),c="affine"===t.type?l>0?c.mixedAdd(i[l-1>>1]):c.mixedAdd(i[-l-1>>1].neg()):l>0?c.add(i[l-1>>1]):c.add(i[-l-1>>1].neg())}return"affine"===t.type?c.toP():c},c.prototype._wnafMulAdd=function(t,e,n,r,i){for(var s=this._wnafT1,c=this._wnafT2,u=this._wnafT3,l=0,d=0;d<r;d++){var f=(E=e[d])._getNAFPoints(t);s[d]=f.wnd,c[d]=f.points}for(d=r-1;d>=1;d-=2){var h=d-1,p=d;if(1===s[h]&&1===s[p]){var m=[e[h],null,null,e[p]];0===e[h].y.cmp(e[p].y)?(m[1]=e[h].add(e[p]),m[2]=e[h].toJ().mixedAdd(e[p].neg())):0===e[h].y.cmp(e[p].y.redNeg())?(m[1]=e[h].toJ().mixedAdd(e[p]),m[2]=e[h].add(e[p].neg())):(m[1]=e[h].toJ().mixedAdd(e[p]),m[2]=e[h].toJ().mixedAdd(e[p].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],_=o(n[h],n[p]);l=Math.max(_[0].length,l),u[h]=new Array(l),u[p]=new Array(l);for(var g=0;g<l;g++){var b=0|_[0][g],y=0|_[1][g];u[h][g]=v[3*(b+1)+(y+1)],u[p][g]=0,c[h]=m}}else u[h]=a(n[h],s[h]),u[p]=a(n[p],s[p]),l=Math.max(u[h].length,l),l=Math.max(u[p].length,l)}var x=this.jpoint(null,null,null),w=this._wnafT4;for(d=l;d>=0;d--){for(var k=0;d>=0;){var C=!0;for(g=0;g<r;g++)w[g]=0|u[g][d],0!==w[g]&&(C=!1);if(!C)break;k++,d--}if(d>=0&&k++,x=x.dblp(k),d<0)break;for(g=0;g<r;g++){var E,S=w[g];0!==S&&(S>0?E=c[g][S-1>>1]:S<0&&(E=c[g][-S-1>>1].neg()),x="affine"===E.type?x.mixedAdd(E):x.add(E))}}for(d=0;d<r;d++)c[d]=null;return i?x:x.toP()},c.BasePoint=u,u.prototype.eq=function(){throw new Error("Not implemented")},u.prototype.validate=function(){return this.curve.validate(this)},c.prototype.decodePoint=function(t,e){t=i.toArray(t,e);var n=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*n)return 6===t[0]?s(t[t.length-1]%2==0):7===t[0]&&s(t[t.length-1]%2==1),this.point(t.slice(1,1+n),t.slice(1+n,1+2*n));if((2===t[0]||3===t[0])&&t.length-1===n)return this.pointFromX(t.slice(1,1+n),3===t[0]);throw new Error("Unknown point format")},u.prototype.encodeCompressed=function(t){return this.encode(t,!0)},u.prototype._encode=function(t){var e=this.curve.p.byteLength(),n=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",e))},u.prototype.encode=function(t,e){return i.encode(this._encode(e),t)},u.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},u.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},u.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i<e;i+=t){for(var a=0;a<t;a++)r=r.dbl();n.push(r)}return{step:t,points:n}},u.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],n=(1<<t)-1,r=1===n?null:this.dbl(),i=1;i<n;i++)e[i]=e[i-1].add(r);return{wnd:t,points:e}},u.prototype._getBeta=function(){return null},u.prototype.dblp=function(t){for(var e=this,n=0;n<t;n++)e=e.dbl();return e}},function(t,e,n){var r=n(929),i=n(940),a=n(941),o=n(285),s=n(357),c=n(11).Buffer;function u(t){var e;"object"!=typeof t||c.isBuffer(t)||(e=t.passphrase,t=t.key),"string"==typeof t&&(t=c.from(t));var n,u,l=a(t,e),d=l.tag,f=l.data;switch(d){case"CERTIFICATE":u=r.certificate.decode(f,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(u||(u=r.PublicKey.decode(f,"der")),n=u.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPublicKey.decode(u.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return u.subjectPrivateKey=u.subjectPublicKey,{type:"ec",data:u};case"1.2.840.10040.4.1":return u.algorithm.params.pub_key=r.DSAparam.decode(u.subjectPublicKey.data,"der"),{type:"dsa",data:u.algorithm.params};default:throw new Error("unknown key id "+n)}throw new Error("unknown key type "+d);case"ENCRYPTED PRIVATE KEY":f=function(t,e){var n=t.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),a=i[t.algorithm.decrypt.cipher.algo.join(".")],u=t.algorithm.decrypt.cipher.iv,l=t.subjectPrivateKey,d=parseInt(a.split("-")[1],10)/8,f=s.pbkdf2Sync(e,n,r,d,"sha1"),h=o.createDecipheriv(a,f,u),p=[];return p.push(h.update(l)),p.push(h.final()),c.concat(p)}(f=r.EncryptedPrivateKey.decode(f,"der"),e);case"PRIVATE KEY":switch(n=(u=r.PrivateKey.decode(f,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPrivateKey.decode(u.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:u.algorithm.curve,privateKey:r.ECPrivateKey.decode(u.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return u.algorithm.params.priv_key=r.DSAparam.decode(u.subjectPrivateKey,"der"),{type:"dsa",params:u.algorithm.params};default:throw new Error("unknown key id "+n)}throw new Error("unknown key type "+d);case"RSA PUBLIC KEY":return r.RSAPublicKey.decode(f,"der");case"RSA PRIVATE KEY":return r.RSAPrivateKey.decode(f,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:r.DSAPrivateKey.decode(f,"der")};case"EC PRIVATE KEY":return{curve:(f=r.ECPrivateKey.decode(f,"der")).parameters.value,privateKey:f.privateKey};default:throw new Error("unknown key type "+d)}}t.exports=u,u.signature=r.signature},function(t,e,n){(function(r){e.log=function(...t){return"object"==typeof console&&console.log&&console.log(...t)},e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,t=>{"%%"!==t&&"%c"===t&&(i=++r)}),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}!t&&void 0!==r&&"env"in r&&(t=Object({MIX_PUSHER_APP_KEY:"",MIX_PUSHER_APP_CLUSTER:"mt1",NODE_ENV:"production"}).DEBUG);return t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.exports=n(1371)(e);const{formatters:i}=t.exports;i.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}).call(e,n(26))},function(t,e){e.encode=function(t){var e="";for(var n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e},e.decode=function(t){for(var e={},n=t.split("&"),r=0,i=n.length;r<i;r++){var a=n[r].split("=");e[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return e}},function(t,e){t.exports=function(t,e){var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e,n){(function(r){e.log=function(...t){return"object"==typeof console&&console.log&&console.log(...t)},e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,t=>{"%%"!==t&&"%c"===t&&(i=++r)}),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}!t&&void 0!==r&&"env"in r&&(t=Object({MIX_PUSHER_APP_KEY:"",MIX_PUSHER_APP_CLUSTER:"mt1",NODE_ENV:"production"}).DEBUG);return t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.exports=n(1388)(e);const{formatters:i}=t.exports;i.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}).call(e,n(26))},function(t,e,n){var r=n(14),i=n(12).document,a=r(i)&&r(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},function(t,e,n){var r=n(12),i=n(37),a=n(51),o=n(298),s=n(18).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=a?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:o.f(t)})}},function(t,e,n){var r=n(79)("keys"),i=n(58);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(12).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(14),i=n(8),a=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(38)(Function.call,n(32).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return a(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:a}},function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(t,e,n){var r=n(14),i=n(124).set;t.exports=function(t,e,n){var a,o=e.constructor;return o!==n&&"function"==typeof o&&(a=o.prototype)!==n.prototype&&r(a)&&i&&i(t,a),t}},function(t,e,n){"use strict";var r=n(40),i=n(44);t.exports=function(t){var e=String(i(this)),n="",a=r(t);if(a<0||a==1/0)throw RangeError("Count can't be negative");for(;a>0;(a>>>=1)&&(e+=e))1&a&&(n+=e);return n}},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},function(t,e,n){"use strict";var r=n(51),i=n(4),a=n(28),o=n(27),s=n(73),c=n(131),u=n(70),l=n(33),d=n(15)("iterator"),f=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,e,n,p,m,v,_){c(n,e,p);var g,b,y,x=function(t){if(!f&&t in E)return E[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},w=e+" Iterator",k="values"==m,C=!1,E=t.prototype,S=E[d]||E["@@iterator"]||m&&E[m],I=S||x(m),M=m?k?x("entries"):I:void 0,T="Array"==e&&E.entries||S;if(T&&(y=l(T.call(new t)))!==Object.prototype&&y.next&&(u(y,w,!0),r||"function"==typeof y[d]||o(y,d,h)),k&&S&&"values"!==S.name&&(C=!0,I=function(){return S.call(this)}),r&&!_||!f&&!C&&E[d]||o(E,d,I),s[e]=I,s[w]=h,m)if(g={values:k?I:x("values"),keys:v?I:x("keys"),entries:M},_)for(b in g)b in E||a(E,b,g[b]);else i(i.P+i.F*(f||C),e,g);return g}},function(t,e,n){"use strict";var r=n(61),i=n(57),a=n(70),o={};n(27)(o,n(15)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(o,{next:i(1,n)}),a(t,e+" Iterator")}},function(t,e,n){var r=n(97),i=n(44);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(t))}},function(t,e,n){var r=n(15)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e,n){var r=n(73),i=n(15)("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||a[i]===t)}},function(t,e,n){"use strict";var r=n(18),i=n(57);t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},function(t,e,n){var r=n(71),i=n(15)("iterator"),a=n(73);t.exports=n(37).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||a[r(t)]}},function(t,e,n){var r=n(494);t.exports=function(t,e){return new(r(t))(e)}},function(t,e,n){"use strict";var r=n(21),i=n(60),a=n(16);t.exports=function(t){for(var e=r(this),n=a(e.length),o=arguments.length,s=i(o>1?arguments[1]:void 0,n),c=o>2?arguments[2]:void 0,u=void 0===c?n:i(c,n);u>s;)e[s++]=t;return e}},function(t,e,n){"use strict";var r=n(53),i=n(315),a=n(73),o=n(31);t.exports=n(130)(Array,"Array",function(t,e){this._t=o(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(t,e,n){"use strict";var r,i,a=n(82),o=RegExp.prototype.exec,s=String.prototype.replace,c=o,u=(r=/a/,i=/b*/g,o.call(r,"a"),o.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),l=void 0!==/()??/.exec("")[1];(u||l)&&(c=function(t){var e,n,r,i,c=this;return l&&(n=new RegExp("^"+c.source+"$(?!\\s)",a.call(c))),u&&(e=c.lastIndex),r=o.call(c,t),u&&r&&(c.lastIndex=c.global?r.index+r[0].length:e),l&&r&&r.length>1&&s.call(r[0],n,function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)}),r}),t.exports=c},function(t,e,n){"use strict";var r=n(96)(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},function(t,e,n){var r,i,a,o=n(38),s=n(305),c=n(123),u=n(119),l=n(12),d=l.process,f=l.setImmediate,h=l.clearImmediate,p=l.MessageChannel,m=l.Dispatch,v=0,_={},g=function(){var t=+this;if(_.hasOwnProperty(t)){var e=_[t];delete _[t],e()}},b=function(t){g.call(t.data)};f&&h||(f=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return _[++v]=function(){s("function"==typeof t?t:Function(t),e)},r(v),v},h=function(t){delete _[t]},"process"==n(39)(d)?r=function(t){d.nextTick(o(g,t,1))}:m&&m.now?r=function(t){m.now(o(g,t,1))}:p?(a=(i=new p).port2,i.port1.onmessage=b,r=o(a.postMessage,a,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(t){l.postMessage(t+"","*")},l.addEventListener("message",b,!1)):r="onreadystatechange"in u("script")?function(t){c.appendChild(u("script")).onreadystatechange=function(){c.removeChild(this),g.call(t)}}:function(t){setTimeout(o(g,t,1),0)}),t.exports={set:f,clear:h}},function(t,e,n){var r=n(12),i=n(142).set,a=r.MutationObserver||r.WebKitMutationObserver,o=r.process,s=r.Promise,c="process"==n(39)(o);t.exports=function(){var t,e,n,u=function(){var r,i;for(c&&(r=o.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(c)n=function(){o.nextTick(u)};else if(!a||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var l=s.resolve(void 0);n=function(){l.then(u)}}else n=function(){i.call(r,u)};else{var d=!0,f=document.createTextNode("");new a(u).observe(f,{characterData:!0}),n=function(){f.data=d=!d}}return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},function(t,e,n){"use strict";var r=n(25);t.exports.f=function(t){return new function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=r(e),this.reject=r(n)}(t)}},function(t,e,n){"use strict";var r=n(12),i=n(17),a=n(51),o=n(103),s=n(27),c=n(66),u=n(13),l=n(64),d=n(40),f=n(16),h=n(325),p=n(62).f,m=n(18).f,v=n(138),_=n(70),g="prototype",b="Wrong index!",y=r.ArrayBuffer,x=r.DataView,w=r.Math,k=r.RangeError,C=r.Infinity,E=y,S=w.abs,I=w.pow,M=w.floor,T=w.log,D=w.LN2,R=i?"_b":"buffer",P=i?"_l":"byteLength",O=i?"_o":"byteOffset";function L(t,e,n){var r,i,a,o=new Array(n),s=8*n-e-1,c=(1<<s)-1,u=c>>1,l=23===e?I(2,-24)-I(2,-77):0,d=0,f=t<0||0===t&&1/t<0?1:0;for((t=S(t))!=t||t===C?(i=t!=t?1:0,r=c):(r=M(T(t)/D),t*(a=I(2,-r))<1&&(r--,a*=2),(t+=r+u>=1?l/a:l*I(2,1-u))*a>=2&&(r++,a/=2),r+u>=c?(i=0,r=c):r+u>=1?(i=(t*a-1)*I(2,e),r+=u):(i=t*I(2,u-1)*I(2,e),r=0));e>=8;o[d++]=255&i,i/=256,e-=8);for(r=r<<e|i,s+=e;s>0;o[d++]=255&r,r/=256,s-=8);return o[--d]|=128*f,o}function A(t,e,n){var r,i=8*n-e-1,a=(1<<i)-1,o=a>>1,s=i-7,c=n-1,u=t[c--],l=127&u;for(u>>=7;s>0;l=256*l+t[c],c--,s-=8);for(r=l&(1<<-s)-1,l>>=-s,s+=e;s>0;r=256*r+t[c],c--,s-=8);if(0===l)l=1-o;else{if(l===a)return r?NaN:u?-C:C;r+=I(2,e),l-=o}return(u?-1:1)*r*I(2,l-e)}function N(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function B(t){return[255&t]}function j(t){return[255&t,t>>8&255]}function F(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function Y(t){return L(t,52,8)}function $(t){return L(t,23,4)}function z(t,e,n){m(t[g],e,{get:function(){return this[n]}})}function V(t,e,n,r){var i=h(+n);if(i+e>t[P])throw k(b);var a=t[R]._b,o=i+t[O],s=a.slice(o,o+e);return r?s:s.reverse()}function H(t,e,n,r,i,a){var o=h(+n);if(o+e>t[P])throw k(b);for(var s=t[R]._b,c=o+t[O],u=r(+i),l=0;l<e;l++)s[c+l]=u[a?l:e-l-1]}if(o.ABV){if(!u(function(){y(1)})||!u(function(){new y(-1)})||u(function(){return new y,new y(1.5),new y(NaN),"ArrayBuffer"!=y.name})){for(var q,W=(y=function(t){return l(this,y),new E(h(t))})[g]=E[g],U=p(E),G=0;U.length>G;)(q=U[G++])in y||s(y,q,E[q]);a||(W.constructor=y)}var K=new x(new y(2)),X=x[g].setInt8;K.setInt8(0,2147483648),K.setInt8(1,2147483649),!K.getInt8(0)&&K.getInt8(1)||c(x[g],{setInt8:function(t,e){X.call(this,t,e<<24>>24)},setUint8:function(t,e){X.call(this,t,e<<24>>24)}},!0)}else y=function(t){l(this,y,"ArrayBuffer");var e=h(t);this._b=v.call(new Array(e),0),this[P]=e},x=function(t,e,n){l(this,x,"DataView"),l(t,y,"DataView");var r=t[P],i=d(e);if(i<0||i>r)throw k("Wrong offset!");if(i+(n=void 0===n?r-i:f(n))>r)throw k("Wrong length!");this[R]=t,this[O]=i,this[P]=n},i&&(z(y,"byteLength","_l"),z(x,"buffer","_b"),z(x,"byteLength","_l"),z(x,"byteOffset","_o")),c(x[g],{getInt8:function(t){return V(this,1,t)[0]<<24>>24},getUint8:function(t){return V(this,1,t)[0]},getInt16:function(t){var e=V(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=V(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return N(V(this,4,t,arguments[1]))},getUint32:function(t){return N(V(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return A(V(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return A(V(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){H(this,1,t,B,e)},setUint8:function(t,e){H(this,1,t,B,e)},setInt16:function(t,e){H(this,2,t,j,e,arguments[2])},setUint16:function(t,e){H(this,2,t,j,e,arguments[2])},setInt32:function(t,e){H(this,4,t,F,e,arguments[2])},setUint32:function(t,e){H(this,4,t,F,e,arguments[2])},setFloat32:function(t,e){H(this,4,t,$,e,arguments[2])},setFloat64:function(t,e){H(this,8,t,Y,e,arguments[2])}});_(y,"ArrayBuffer"),_(x,"DataView"),s(x[g],o.VIEW,!0),e.ArrayBuffer=y,e.DataView=x},function(t,e,n){"use strict";(function(e){var r=n(34),i=n(614),a={"Content-Type":"application/x-www-form-urlencoded"};function o(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var s,c={adapter:("undefined"!=typeof XMLHttpRequest?s=n(334):void 0!==e&&(s=n(334)),s),transformRequest:[function(t,e){return i(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(o(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)?(o(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],function(t){c.headers[t]={}}),r.forEach(["post","put","patch"],function(t){c.headers[t]=r.merge(a)}),t.exports=c}).call(e,n(26))},function(t,e,n){(function(t){"use strict";t.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(t){return/^nm$/i.test(t)},meridiem:function(t,e,n){return t<12?n?"vm":"VM":n?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(t){return t+(1===t||8===t||t>=20?"ste":"de")},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";var e={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},r=function(t){return 0===t?0:1===t?1:2===t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},i={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},a=function(t){return function(e,n,a,o){var s=r(e),c=i[t][r(e)];return 2===s&&(c=c[n?0:1]),c.replace(/%d/i,e)}},o=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];t.defineLocale("ar",{months:o,monthsShort:o,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(t){return"م"===t},meridiem:function(t,e,n){return t<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:a("s"),ss:a("s"),m:a("m"),mm:a("m"),h:a("h"),hh:a("h"),d:a("d"),dd:a("d"),M:a("M"),MM:a("M"),y:a("y"),yy:a("y")},preparse:function(t){return t.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(t){return n[t]}).replace(/،/g,",")},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]}).replace(/,/g,"،")},week:{dow:6,doy:12}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("ar-dz",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"أح_إث_ثلا_أر_خم_جم_سب".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("ar-kw",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:12}})})(n(5))},function(t,e,n){(function(t){"use strict";var e={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},n=function(t){return 0===t?0:1===t?1:2===t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},r={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},i=function(t){return function(e,i,a,o){var s=n(e),c=r[t][n(e)];return 2===s&&(c=c[i?0:1]),c.replace(/%d/i,e)}},a=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];t.defineLocale("ar-ly",{months:a,monthsShort:a,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(t){return"م"===t},meridiem:function(t,e,n){return t<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:i("s"),ss:i("s"),m:i("m"),mm:i("m"),h:i("h"),hh:i("h"),d:i("d"),dd:i("d"),M:i("M"),MM:i("M"),y:i("y"),yy:i("y")},preparse:function(t){return t.replace(/،/g,",")},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]}).replace(/,/g,"،")},week:{dow:6,doy:12}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:6,doy:12}})})(n(5))},function(t,e,n){(function(t){"use strict";var e={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"};t.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(t){return"م"===t},meridiem:function(t,e,n){return t<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(t){return t.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(t){return n[t]}).replace(/،/g,",")},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]}).replace(/,/g,"،")},week:{dow:0,doy:6}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";var e={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"};t.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"birneçə saniyə",ss:"%d saniyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(t){return/^(gündüz|axşam)$/.test(t)},meridiem:function(t,e,n){return t<4?"gecə":t<12?"səhər":t<17?"gündüz":"axşam"},dayOfMonthOrdinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(t){if(0===t)return t+"-ıncı";var n=t%10;return t+(e[n]||e[t%100-n]||e[t>=100?100:null])},week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";function e(t,e,n){var r,i;return"m"===n?e?"хвіліна":"хвіліну":"h"===n?e?"гадзіна":"гадзіну":t+" "+(r=+t,i={ss:e?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:e?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:e?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"}[n].split("_"),r%10==1&&r%100!=11?i[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?i[1]:i[2])}t.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:e,mm:e,h:e,hh:e,d:"дзень",dd:e,M:"месяц",MM:e,y:"год",yy:e},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(t){return/^(дня|вечара)$/.test(t)},meridiem:function(t,e,n){return t<4?"ночы":t<12?"раніцы":t<17?"дня":"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(t,e){switch(e){case"M":case"d":case"DDD":case"w":case"W":return t%10!=2&&t%10!=3||t%100==12||t%100==13?t+"-ы":t+"-і";case"D":return t+"-га";default:return t}},week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[В изминалата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[В изминалия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дни",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(t){var e=t%10,n=t%100;return 0===t?t+"-ев":0===n?t+"-ен":n>10&&n<20?t+"-ти":1===e?t+"-ви":2===e?t+"-ри":7===e||8===e?t+"-ми":t+"-ти"},week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des".split("_"),weekdays:"Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm"},calendar:{sameDay:"[Bi lɛrɛ] LT",nextDay:"[Sini lɛrɛ] LT",nextWeek:"dddd [don lɛrɛ] LT",lastDay:"[Kunu lɛrɛ] LT",lastWeek:"dddd [tɛmɛnen lɛrɛ] LT",sameElse:"L"},relativeTime:{future:"%s kɔnɔ",past:"a bɛ %s bɔ",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"lɛrɛ kelen",hh:"lɛrɛ %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";var e={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};t.defineLocale("bn",{months:"জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(t){return t.replace(/[১২৩৪৫৬৭৮৯০]/g,function(t){return n[t]})},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]})},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,meridiemHour:function(t,e){return 12===t&&(t=0),"রাত"===e&&t>=4||"দুপুর"===e&&t<5||"বিকাল"===e?t+12:t},meridiem:function(t,e,n){return t<4?"রাত":t<10?"সকাল":t<17?"দুপুর":t<20?"বিকাল":"রাত"},week:{dow:0,doy:6}})})(n(5))},function(t,e,n){(function(t){"use strict";var e={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},n={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"};t.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",ss:"%d སྐར་ཆ།",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(t){return t.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,function(t){return n[t]})},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]})},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(t,e){return 12===t&&(t=0),"མཚན་མོ"===e&&t>=4||"ཉིན་གུང"===e&&t<5||"དགོང་དག"===e?t+12:t},meridiem:function(t,e,n){return t<4?"མཚན་མོ":t<10?"ཞོགས་ཀས":t<17?"ཉིན་གུང":t<20?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}})})(n(5))},function(t,e,n){(function(t){"use strict";function e(t,e,n){return t+" "+function(t,e){if(2===e)return function(t){var e={m:"v",b:"v",d:"z"};if(void 0===e[t.charAt(0)])return t;return e[t.charAt(0)]+t.substring(1)}(t);return t}({mm:"munutenn",MM:"miz",dd:"devezh"}[n],t)}t.defineLocale("br",{months:"Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h[e]mm A",LTS:"h[e]mm:ss A",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY h[e]mm A",LLLL:"dddd, D [a viz] MMMM YYYY h[e]mm A"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc'hoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec'h da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s 'zo",s:"un nebeud segondennoù",ss:"%d eilenn",m:"ur vunutenn",mm:e,h:"un eur",hh:"%d eur",d:"un devezh",dd:e,M:"ur miz",MM:e,y:"ur bloaz",yy:function(t){switch(function t(e){return e>9?t(e%10):e}(t)){case 1:case 3:case 4:case 5:case 9:return t+" bloaz";default:return t+" vloaz"}}},dayOfMonthOrdinalParse:/\d{1,2}(añ|vet)/,ordinal:function(t){return t+(1===t?"añ":"vet")},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";function e(t,e,n){var r=t+" ";switch(n){case"ss":return r+=1===t?"sekunda":2===t||3===t||4===t?"sekunde":"sekundi";case"m":return e?"jedna minuta":"jedne minute";case"mm":return r+=1===t?"minuta":2===t||3===t||4===t?"minute":"minuta";case"h":return e?"jedan sat":"jednog sata";case"hh":return r+=1===t?"sat":2===t||3===t||4===t?"sata":"sati";case"dd":return r+=1===t?"dan":"dana";case"MM":return r+=1===t?"mjesec":2===t||3===t||4===t?"mjeseca":"mjeseci";case"yy":return r+=1===t?"godina":2===t||3===t||4===t?"godine":"godina"}}t.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:e,m:e,mm:e,h:e,hh:e,d:"dan",dd:e,M:"mjesec",MM:e,y:"godinu",yy:e},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("ca",{months:{standalone:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(t,e){var n=1===t?"r":2===t?"n":3===t?"r":4===t?"t":"è";return"w"!==e&&"W"!==e||(n="a"),t+n},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";var e="leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),n="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),r=[/^led/i,/^úno/i,/^bře/i,/^dub/i,/^kvě/i,/^(čvn|červen$|června)/i,/^(čvc|červenec|července)/i,/^srp/i,/^zář/i,/^říj/i,/^lis/i,/^pro/i],i=/^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;function a(t){return t>1&&t<5&&1!=~~(t/10)}function o(t,e,n,r){var i=t+" ";switch(n){case"s":return e||r?"pár sekund":"pár sekundami";case"ss":return e||r?i+(a(t)?"sekundy":"sekund"):i+"sekundami";case"m":return e?"minuta":r?"minutu":"minutou";case"mm":return e||r?i+(a(t)?"minuty":"minut"):i+"minutami";case"h":return e?"hodina":r?"hodinu":"hodinou";case"hh":return e||r?i+(a(t)?"hodiny":"hodin"):i+"hodinami";case"d":return e||r?"den":"dnem";case"dd":return e||r?i+(a(t)?"dny":"dní"):i+"dny";case"M":return e||r?"měsíc":"měsícem";case"MM":return e||r?i+(a(t)?"měsíce":"měsíců"):i+"měsíci";case"y":return e||r?"rok":"rokem";case"yy":return e||r?i+(a(t)?"roky":"let"):i+"lety"}}t.defineLocale("cs",{months:e,monthsShort:n,monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:o,ss:o,m:o,mm:o,h:o,hh:o,d:o,dd:o,M:o,MM:o,y:o,yy:o},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(t){return t+(/сехет$/i.exec(t)?"рен":/ҫул$/i.exec(t)?"тан":"ран")},past:"%s каялла",s:"пӗр-ик ҫеккунт",ss:"%d ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},dayOfMonthOrdinalParse:/\d{1,2}-мӗш/,ordinal:"%d-мӗш",week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(t){var e="";return t>20?e=40===t||50===t||60===t||80===t||100===t?"fed":"ain":t>0&&(e=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"][t]),t+e},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";function e(t,e,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[t+" Tage",t+" Tagen"],M:["ein Monat","einem Monat"],MM:[t+" Monate",t+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[t+" Jahre",t+" Jahren"]};return e?i[n][0]:i[n][1]}t.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:e,mm:"%d Minuten",h:e,hh:"%d Stunden",d:e,dd:e,M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";function e(t,e,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[t+" Tage",t+" Tagen"],M:["ein Monat","einem Monat"],MM:[t+" Monate",t+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[t+" Jahre",t+" Jahren"]};return e?i[n][0]:i[n][1]}t.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:e,mm:"%d Minuten",h:e,hh:"%d Stunden",d:e,dd:e,M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";function e(t,e,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[t+" Tage",t+" Tagen"],M:["ein Monat","einem Monat"],MM:[t+" Monate",t+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[t+" Jahre",t+" Jahren"]};return e?i[n][0]:i[n][1]}t.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:e,mm:"%d Minuten",h:e,hh:"%d Stunden",d:e,dd:e,M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";var e=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],n=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"];t.defineLocale("dv",{months:e,monthsShort:e,weekdays:n,weekdaysShort:n,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/މކ|މފ/,isPM:function(t){return"މފ"===t},meridiem:function(t,e,n){return t<12?"މކ":"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",ss:"d% ސިކުންތު",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(t){return t.replace(/،/g,",")},postformat:function(t){return t.replace(/,/g,"،")},week:{dow:7,doy:12}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(t,e){return t?"string"==typeof e&&/D/.test(e.substring(0,e.indexOf("MMMM")))?this._monthsGenitiveEl[t.month()]:this._monthsNominativeEl[t.month()]:this._monthsNominativeEl},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(t,e,n){return t>11?n?"μμ":"ΜΜ":n?"πμ":"ΠΜ"},isPM:function(t){return"μ"===(t+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(t,e){var n,r=this._calendarEl[t],i=e&&e.hours();return((n=r)instanceof Function||"[object Function]"===Object.prototype.toString.call(n))&&(r=r.apply(e)),r.replace("{}",i%12==1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",ss:"%d δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},dayOfMonthOrdinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("en-SG",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},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"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(t){var e=t%10;return t+(1==~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},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"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(t){var e=t%10;return t+(1==~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},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"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(t){var e=t%10;return t+(1==~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},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"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(t){var e=t%10;return t+(1==~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},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"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(t){var e=t%10;return t+(1==~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few 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"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(t){var e=t%10;return t+(1==~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},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"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(t){var e=t%10;return t+(1==~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec".split("_"),weekdays:"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_ĵaŭ_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_ĵa_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D[-a de] MMMM, YYYY",LLL:"D[-a de] MMMM, YYYY HH:mm",LLLL:"dddd, [la] D[-a de] MMMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(t){return"p"===t.charAt(0).toLowerCase()},meridiem:function(t,e,n){return t>11?n?"p.t.m.":"P.T.M.":n?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd [je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasinta] dddd [je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"antaŭ %s",s:"sekundoj",ss:"%d sekundoj",m:"minuto",mm:"%d minutoj",h:"horo",hh:"%d horoj",d:"tago",dd:"%d tagoj",M:"monato",MM:"%d monatoj",y:"jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";var e="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;t.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(t,r){return t?/-MMM-/.test(r)?n[t.month()]:e[t.month()]:e},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";var e="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;t.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(t,r){return t?/-MMM-/.test(r)?n[t.month()]:e[t.month()]:e},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:6}})})(n(5))},function(t,e,n){(function(t){"use strict";function e(t,e,n,r){var i={s:["mõne sekundi","mõni sekund","paar sekundit"],ss:[t+"sekundi",t+"sekundit"],m:["ühe minuti","üks minut"],mm:[t+" minuti",t+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[t+" tunni",t+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[t+" kuu",t+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[t+" aasta",t+" aastat"]};return e?i[n][2]?i[n][2]:i[n][1]:r?i[n][0]:i[n][1]}t.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:e,ss:e,m:e,mm:e,h:e,hh:e,d:e,dd:"%d päeva",M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";var e={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},n={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"};t.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(t){return/بعد از ظهر/.test(t)},meridiem:function(t,e,n){return t<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",ss:"ثانیه d%",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(t){return t.replace(/[۰-۹]/g,function(t){return n[t]}).replace(/،/g,",")},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]}).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}})})(n(5))},function(t,e,n){(function(t){"use strict";var e="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),n=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",e[7],e[8],e[9]];function r(t,r,i,a){var o="";switch(i){case"s":return a?"muutaman sekunnin":"muutama sekunti";case"ss":return a?"sekunnin":"sekuntia";case"m":return a?"minuutin":"minuutti";case"mm":o=a?"minuutin":"minuuttia";break;case"h":return a?"tunnin":"tunti";case"hh":o=a?"tunnin":"tuntia";break;case"d":return a?"päivän":"päivä";case"dd":o=a?"päivän":"päivää";break;case"M":return a?"kuukauden":"kuukausi";case"MM":o=a?"kuukauden":"kuukautta";break;case"y":return a?"vuoden":"vuosi";case"yy":o=a?"vuoden":"vuotta"}return o=function(t,r){return t<10?r?n[t]:e[t]:t}(t,a)+" "+o}t.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaður",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(t,e){switch(e){case"D":return t+(1===t?"er":"");default:case"M":case"Q":case"DDD":case"d":return t+(1===t?"er":"e");case"w":case"W":return t+(1===t?"re":"e")}},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(t,e){switch(e){default:case"M":case"Q":case"D":case"DDD":case"d":return t+(1===t?"er":"e");case"w":case"W":return t+(1===t?"re":"e")}}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(t,e){switch(e){default:case"M":case"Q":case"D":case"DDD":case"d":return t+(1===t?"er":"e");case"w":case"W":return t+(1===t?"re":"e")}},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";var e="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),n="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_");t.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(t,r){return t?/-MMM-/.test(r)?n[t.month()]:e[t.month()]:e},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(t){return t+(1===t||8===t||t>=20?"ste":"de")},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("ga",{months:["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Méitheamh","Iúil","Lúnasa","Meán Fómhair","Deaireadh Fómhair","Samhain","Nollaig"],monthsShort:["Eaná","Feab","Márt","Aibr","Beal","Méit","Iúil","Lúna","Meán","Deai","Samh","Noll"],monthsParseExact:!0,weekdays:["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Satharn"],weekdaysShort:["Dom","Lua","Mái","Céa","Déa","hAo","Sat"],weekdaysMin:["Do","Lu","Má","Ce","Dé","hA","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Amárach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inné aig] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s ó shin",s:"cúpla soicind",ss:"%d soicind",m:"nóiméad",mm:"%d nóiméad",h:"uair an chloig",hh:"%d uair an chloig",d:"lá",dd:"%d lá",M:"mí",MM:"%d mí",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(t){return t+(1===t?"d":t%10==2?"na":"mh")},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("gd",{months:["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],monthsShort:["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],monthsParseExact:!0,weekdays:["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],weekdaysShort:["Did","Dil","Dim","Dic","Dia","Dih","Dis"],weekdaysMin:["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(t){return t+(1===t?"d":t%10==2?"na":"mh")},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(t){return 0===t.indexOf("un")?"n"+t:"en "+t},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";function e(t,e,n,r){var i={s:["thodde secondanim","thodde second"],ss:[t+" secondanim",t+" second"],m:["eka mintan","ek minute"],mm:[t+" mintanim",t+" mintam"],h:["eka voran","ek vor"],hh:[t+" voranim",t+" voram"],d:["eka disan","ek dis"],dd:[t+" disanim",t+" dis"],M:["eka mhoinean","ek mhoino"],MM:[t+" mhoineanim",t+" mhoine"],y:["eka vorsan","ek voros"],yy:[t+" vorsanim",t+" vorsam"]};return e?i[n][0]:i[n][1]}t.defineLocale("gom-latn",{months:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Ieta to] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fatlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:e,ss:e,m:e,mm:e,h:e,hh:e,d:e,dd:e,M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(t,e){switch(e){case"D":return t+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return t}},week:{dow:1,doy:4},meridiemParse:/rati|sokalli|donparam|sanje/,meridiemHour:function(t,e){return 12===t&&(t=0),"rati"===e?t<4?t:t+12:"sokalli"===e?t:"donparam"===e?t>12?t:t+12:"sanje"===e?t+12:void 0},meridiem:function(t,e,n){return t<4?"rati":t<12?"sokalli":t<16?"donparam":t<20?"sanje":"rati"}})})(n(5))},function(t,e,n){(function(t){"use strict";var e={1:"૧",2:"૨",3:"૩",4:"૪",5:"૫",6:"૬",7:"૭",8:"૮",9:"૯",0:"૦"},n={"૧":"1","૨":"2","૩":"3","૪":"4","૫":"5","૬":"6","૭":"7","૮":"8","૯":"9","૦":"0"};t.defineLocale("gu",{months:"જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર".split("_"),monthsShort:"જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.".split("_"),monthsParseExact:!0,weekdays:"રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર".split("_"),weekdaysShort:"રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ".split("_"),weekdaysMin:"ર_સો_મં_બુ_ગુ_શુ_શ".split("_"),longDateFormat:{LT:"A h:mm વાગ્યે",LTS:"A h:mm:ss વાગ્યે",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm વાગ્યે",LLLL:"dddd, D MMMM YYYY, A h:mm વાગ્યે"},calendar:{sameDay:"[આજ] LT",nextDay:"[કાલે] LT",nextWeek:"dddd, LT",lastDay:"[ગઇકાલે] LT",lastWeek:"[પાછલા] dddd, LT",sameElse:"L"},relativeTime:{future:"%s મા",past:"%s પેહલા",s:"અમુક પળો",ss:"%d સેકંડ",m:"એક મિનિટ",mm:"%d મિનિટ",h:"એક કલાક",hh:"%d કલાક",d:"એક દિવસ",dd:"%d દિવસ",M:"એક મહિનો",MM:"%d મહિનો",y:"એક વર્ષ",yy:"%d વર્ષ"},preparse:function(t){return t.replace(/[૧૨૩૪૫૬૭૮૯૦]/g,function(t){return n[t]})},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]})},meridiemParse:/રાત|બપોર|સવાર|સાંજ/,meridiemHour:function(t,e){return 12===t&&(t=0),"રાત"===e?t<4?t:t+12:"સવાર"===e?t:"બપોર"===e?t>=10?t:t+12:"સાંજ"===e?t+12:void 0},meridiem:function(t,e,n){return t<4?"રાત":t<10?"સવાર":t<17?"બપોર":t<20?"સાંજ":"રાત"},week:{dow:0,doy:6}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",ss:"%d שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(t){return 2===t?"שעתיים":t+" שעות"},d:"יום",dd:function(t){return 2===t?"יומיים":t+" ימים"},M:"חודש",MM:function(t){return 2===t?"חודשיים":t+" חודשים"},y:"שנה",yy:function(t){return 2===t?"שנתיים":t%10==0&&10!==t?t+" שנה":t+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(t){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(t)},meridiem:function(t,e,n){return t<5?"לפנות בוקר":t<10?"בבוקר":t<12?n?'לפנה"צ':"לפני הצהריים":t<18?n?'אחה"צ':"אחרי הצהריים":"בערב"}})})(n(5))},function(t,e,n){(function(t){"use strict";var e={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};t.defineLocale("hi",{months:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",ss:"%d सेकंड",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(t){return t.replace(/[१२३४५६७८९०]/g,function(t){return n[t]})},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]})},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(t,e){return 12===t&&(t=0),"रात"===e?t<4?t:t+12:"सुबह"===e?t:"दोपहर"===e?t>=10?t:t+12:"शाम"===e?t+12:void 0},meridiem:function(t,e,n){return t<4?"रात":t<10?"सुबह":t<17?"दोपहर":t<20?"शाम":"रात"},week:{dow:0,doy:6}})})(n(5))},function(t,e,n){(function(t){"use strict";function e(t,e,n){var r=t+" ";switch(n){case"ss":return r+=1===t?"sekunda":2===t||3===t||4===t?"sekunde":"sekundi";case"m":return e?"jedna minuta":"jedne minute";case"mm":return r+=1===t?"minuta":2===t||3===t||4===t?"minute":"minuta";case"h":return e?"jedan sat":"jednog sata";case"hh":return r+=1===t?"sat":2===t||3===t||4===t?"sata":"sati";case"dd":return r+=1===t?"dan":"dana";case"MM":return r+=1===t?"mjesec":2===t||3===t||4===t?"mjeseca":"mjeseci";case"yy":return r+=1===t?"godina":2===t||3===t||4===t?"godine":"godina"}}t.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:e,m:e,mm:e,h:e,hh:e,d:"dan",dd:e,M:"mjesec",MM:e,y:"godinu",yy:e},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";var e="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");function n(t,e,n,r){var i=t;switch(n){case"s":return r||e?"néhány másodperc":"néhány másodperce";case"ss":return i+(r||e)?" másodperc":" másodperce";case"m":return"egy"+(r||e?" perc":" perce");case"mm":return i+(r||e?" perc":" perce");case"h":return"egy"+(r||e?" óra":" órája");case"hh":return i+(r||e?" óra":" órája");case"d":return"egy"+(r||e?" nap":" napja");case"dd":return i+(r||e?" nap":" napja");case"M":return"egy"+(r||e?" hónap":" hónapja");case"MM":return i+(r||e?" hónap":" hónapja");case"y":return"egy"+(r||e?" év":" éve");case"yy":return i+(r||e?" év":" éve")}return""}function r(t){return(t?"":"[múlt] ")+"["+e[this.day()]+"] LT[-kor]"}t.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(t){return"u"===t.charAt(1).toLowerCase()},meridiem:function(t,e,n){return t<12?!0===n?"de":"DE":!0===n?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return r.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return r.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",ss:"%d վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(t){return/^(ցերեկվա|երեկոյան)$/.test(t)},meridiem:function(t){return t<4?"գիշերվա":t<12?"առավոտվա":t<17?"ցերեկվա":"երեկոյան"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(t,e){switch(e){case"DDD":case"w":case"W":case"DDDo":return 1===t?t+"-ին":t+"-րդ";default:return t}},week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(t,e){return 12===t&&(t=0),"pagi"===e?t:"siang"===e?t>=11?t:t+12:"sore"===e||"malam"===e?t+12:void 0},meridiem:function(t,e,n){return t<11?"pagi":t<15?"siang":t<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";function e(t){return t%100==11||t%10!=1}function n(t,n,r,i){var a=t+" ";switch(r){case"s":return n||i?"nokkrar sekúndur":"nokkrum sekúndum";case"ss":return e(t)?a+(n||i?"sekúndur":"sekúndum"):a+"sekúnda";case"m":return n?"mínúta":"mínútu";case"mm":return e(t)?a+(n||i?"mínútur":"mínútum"):n?a+"mínúta":a+"mínútu";case"hh":return e(t)?a+(n||i?"klukkustundir":"klukkustundum"):a+"klukkustund";case"d":return n?"dagur":i?"dag":"degi";case"dd":return e(t)?n?a+"dagar":a+(i?"daga":"dögum"):n?a+"dagur":a+(i?"dag":"degi");case"M":return n?"mánuður":i?"mánuð":"mánuði";case"MM":return e(t)?n?a+"mánuðir":a+(i?"mánuði":"mánuðum"):n?a+"mánuður":a+(i?"mánuð":"mánuði");case"y":return n||i?"ár":"ári";case"yy":return e(t)?a+(n||i?"ár":"árum"):a+(n||i?"ár":"ári")}}t.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:n,ss:n,m:n,mm:n,h:"klukkustund",hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(t){return(/^[0-9].+$/.test(t)?"tra":"in")+" "+t},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(t){return(/^[0-9].+$/.test(t)?"tra":"in")+" "+t},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("ja",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiemParse:/午前|午後/i,isPM:function(t){return"午後"===t},meridiem:function(t,e,n){return t<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:function(t){return t.week()<this.week()?"[来週]dddd LT":"dddd LT"},lastDay:"[昨日] LT",lastWeek:function(t){return this.week()<t.week()?"[先週]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(t,e){switch(e){case"d":case"D":case"DDD":return t+"日";default:return t}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",ss:"%d秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(t,e){return 12===t&&(t=0),"enjing"===e?t:"siyang"===e?t>=11?t:t+12:"sonten"===e||"ndalu"===e?t+12:void 0},meridiem:function(t,e,n){return t<11?"enjing":t<15?"siyang":t<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("ka",{months:{standalone:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),format:"იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს".split("_")},monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(t){return/(წამი|წუთი|საათი|წელი)/.test(t)?t.replace(/ი$/,"ში"):t+"ში"},past:function(t){return/(წამი|წუთი|საათი|დღე|თვე)/.test(t)?t.replace(/(ი|ე)$/,"ის წინ"):/წელი/.test(t)?t.replace(/წელი$/,"წლის წინ"):void 0},s:"რამდენიმე წამი",ss:"%d წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(t){return 0===t?t:1===t?t+"-ლი":t<20||t<=100&&t%20==0||t%100==0?"მე-"+t:t+"-ე"},week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";var e={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"};t.defineLocale("kk",{months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",ss:"%d секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(ші|шы)/,ordinal:function(t){return t+(e[t]||e[t%10]||e[t>=100?100:null])},week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";var e={1:"១",2:"២",3:"៣",4:"៤",5:"៥",6:"៦",7:"៧",8:"៨",9:"៩",0:"០"},n={"១":"1","២":"2","៣":"3","៤":"4","៥":"5","៦":"6","៧":"7","៨":"8","៩":"9","០":"0"};t.defineLocale("km",{months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysMin:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ព្រឹក|ល្ងាច/,isPM:function(t){return"ល្ងាច"===t},meridiem:function(t,e,n){return t<12?"ព្រឹក":"ល្ងាច"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",ss:"%d វិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},dayOfMonthOrdinalParse:/ទី\d{1,2}/,ordinal:"ទី%d",preparse:function(t){return t.replace(/[១២៣៤៥៦៧៨៩០]/g,function(t){return n[t]})},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]})},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";var e={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},n={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"};t.defineLocale("kn",{months:"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್".split("_"),monthsShort:"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ".split("_"),monthsParseExact:!0,weekdays:"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ".split("_"),weekdaysShort:"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ".split("_"),weekdaysMin:"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[ಇಂದು] LT",nextDay:"[ನಾಳೆ] LT",nextWeek:"dddd, LT",lastDay:"[ನಿನ್ನೆ] LT",lastWeek:"[ಕೊನೆಯ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ನಂತರ",past:"%s ಹಿಂದೆ",s:"ಕೆಲವು ಕ್ಷಣಗಳು",ss:"%d ಸೆಕೆಂಡುಗಳು",m:"ಒಂದು ನಿಮಿಷ",mm:"%d ನಿಮಿಷ",h:"ಒಂದು ಗಂಟೆ",hh:"%d ಗಂಟೆ",d:"ಒಂದು ದಿನ",dd:"%d ದಿನ",M:"ಒಂದು ತಿಂಗಳು",MM:"%d ತಿಂಗಳು",y:"ಒಂದು ವರ್ಷ",yy:"%d ವರ್ಷ"},preparse:function(t){return t.replace(/[೧೨೩೪೫೬೭೮೯೦]/g,function(t){return n[t]})},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]})},meridiemParse:/ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,meridiemHour:function(t,e){return 12===t&&(t=0),"ರಾತ್ರಿ"===e?t<4?t:t+12:"ಬೆಳಿಗ್ಗೆ"===e?t:"ಮಧ್ಯಾಹ್ನ"===e?t>=10?t:t+12:"ಸಂಜೆ"===e?t+12:void 0},meridiem:function(t,e,n){return t<4?"ರಾತ್ರಿ":t<10?"ಬೆಳಿಗ್ಗೆ":t<17?"ಮಧ್ಯಾಹ್ನ":t<20?"ಸಂಜೆ":"ರಾತ್ರಿ"},dayOfMonthOrdinalParse:/\d{1,2}(ನೇ)/,ordinal:function(t){return t+"ನೇ"},week:{dow:0,doy:6}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},dayOfMonthOrdinalParse:/\d{1,2}(일|월|주)/,ordinal:function(t,e){switch(e){case"d":case"D":case"DDD":return t+"일";case"M":return t+"월";case"w":case"W":return t+"주";default:return t}},meridiemParse:/오전|오후/,isPM:function(t){return"오후"===t},meridiem:function(t,e,n){return t<12?"오전":"오후"}})})(n(5))},function(t,e,n){(function(t){"use strict";var e={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},r=["کانونی دووەم","شوبات","ئازار","نیسان","ئایار","حوزەیران","تەمموز","ئاب","ئەیلوول","تشرینی یەكەم","تشرینی دووەم","كانونی یەکەم"];t.defineLocale("ku",{months:r,monthsShort:r,weekdays:"یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌".split("_"),weekdaysShort:"یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌".split("_"),weekdaysMin:"ی_د_س_چ_پ_ه_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ئێواره‌|به‌یانی/,isPM:function(t){return/ئێواره‌/.test(t)},meridiem:function(t,e,n){return t<12?"به‌یانی":"ئێواره‌"},calendar:{sameDay:"[ئه‌مرۆ كاتژمێر] LT",nextDay:"[به‌یانی كاتژمێر] LT",nextWeek:"dddd [كاتژمێر] LT",lastDay:"[دوێنێ كاتژمێر] LT",lastWeek:"dddd [كاتژمێر] LT",sameElse:"L"},relativeTime:{future:"له‌ %s",past:"%s",s:"چه‌ند چركه‌یه‌ك",ss:"چركه‌ %d",m:"یه‌ك خوله‌ك",mm:"%d خوله‌ك",h:"یه‌ك كاتژمێر",hh:"%d كاتژمێر",d:"یه‌ك ڕۆژ",dd:"%d ڕۆژ",M:"یه‌ك مانگ",MM:"%d مانگ",y:"یه‌ك ساڵ",yy:"%d ساڵ"},preparse:function(t){return t.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(t){return n[t]}).replace(/،/g,",")},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]}).replace(/,/g,"،")},week:{dow:6,doy:12}})})(n(5))},function(t,e,n){(function(t){"use strict";var e={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"};t.defineLocale("ky",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгүн саат] LT",nextDay:"[Эртең саат] LT",nextWeek:"dddd [саат] LT",lastDay:"[Кечээ саат] LT",lastWeek:"[Өткөн аптанын] dddd [күнү] [саат] LT",sameElse:"L"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",ss:"%d секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(чи|чы|чү|чу)/,ordinal:function(t){return t+(e[t]||e[t%10]||e[t>=100?100:null])},week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";function e(t,e,n,r){var i={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return e?i[n][0]:i[n][1]}function n(t){if(t=parseInt(t,10),isNaN(t))return!1;if(t<0)return!0;if(t<10)return 4<=t&&t<=7;if(t<100){var e=t%10;return n(0===e?t/10:e)}if(t<1e4){for(;t>=10;)t/=10;return n(t)}return n(t/=1e3)}t.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:function(t){return n(t.substr(0,t.indexOf(" ")))?"a "+t:"an "+t},past:function(t){return n(t.substr(0,t.indexOf(" ")))?"viru "+t:"virun "+t},s:"e puer Sekonnen",ss:"%d Sekonnen",m:e,mm:"%d Minutten",h:e,hh:"%d Stonnen",d:e,dd:"%d Deeg",M:e,MM:"%d Méint",y:e,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(t){return"ຕອນແລງ"===t},meridiem:function(t,e,n){return t<12?"ຕອນເຊົ້າ":"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",ss:"%d ວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(ທີ່)\d{1,2}/,ordinal:function(t){return"ທີ່"+t}})})(n(5))},function(t,e,n){(function(t){"use strict";var e={ss:"sekundė_sekundžių_sekundes",m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"};function n(t,e,n,r){return e?i(n)[0]:r?i(n)[1]:i(n)[2]}function r(t){return t%10==0||t>10&&t<20}function i(t){return e[t].split("_")}function a(t,e,a,o){var s=t+" ";return 1===t?s+n(0,e,a[0],o):e?s+(r(t)?i(a)[1]:i(a)[0]):o?s+i(a)[1]:s+(r(t)?i(a)[1]:i(a)[2])}t.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:function(t,e,n,r){return e?"kelios sekundės":r?"kelių sekundžių":"kelias sekundes"},ss:a,m:n,mm:a,h:n,hh:a,d:n,dd:a,M:n,MM:a,y:n,yy:a},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(t){return t+"-oji"},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";var e={ss:"sekundes_sekundēm_sekunde_sekundes".split("_"),m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function n(t,e,n){return n?e%10==1&&e%100!=11?t[2]:t[3]:e%10==1&&e%100!=11?t[0]:t[1]}function r(t,r,i){return t+" "+n(e[i],t,r)}function i(t,r,i){return n(e[i],t,r)}t.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:function(t,e){return e?"dažas sekundes":"dažām sekundēm"},ss:r,m:i,mm:r,h:i,hh:r,d:i,dd:r,M:i,MM:r,y:i,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";var e={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(t,e){return 1===t?e[0]:t>=2&&t<=4?e[1]:e[2]},translate:function(t,n,r){var i=e.words[r];return 1===r.length?n?i[0]:i[1]:t+" "+e.correctGrammaticalCase(t,i)}};t.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:e.translate,m:e.translate,mm:e.translate,h:e.translate,hh:e.translate,d:"dan",dd:e.translate,M:"mjesec",MM:e.translate,y:"godinu",yy:e.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",ss:"%d hēkona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"после %s",past:"пред %s",s:"неколку секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",M:"месец",MM:"%d месеци",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(t){var e=t%10,n=t%100;return 0===t?t+"-ев":0===n?t+"-ен":n>10&&n<20?t+"-ти":1===e?t+"-ви":2===e?t+"-ри":7===e||8===e?t+"-ми":t+"-ти"},week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:!0,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",ss:"%d സെക്കൻഡ്",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(t,e){return 12===t&&(t=0),"രാത്രി"===e&&t>=4||"ഉച്ച കഴിഞ്ഞ്"===e||"വൈകുന്നേരം"===e?t+12:t},meridiem:function(t,e,n){return t<4?"രാത്രി":t<12?"രാവിലെ":t<17?"ഉച്ച കഴിഞ്ഞ്":t<20?"വൈകുന്നേരം":"രാത്രി"}})})(n(5))},function(t,e,n){(function(t){"use strict";function e(t,e,n,r){switch(n){case"s":return e?"хэдхэн секунд":"хэдхэн секундын";case"ss":return t+(e?" секунд":" секундын");case"m":case"mm":return t+(e?" минут":" минутын");case"h":case"hh":return t+(e?" цаг":" цагийн");case"d":case"dd":return t+(e?" өдөр":" өдрийн");case"M":case"MM":return t+(e?" сар":" сарын");case"y":case"yy":return t+(e?" жил":" жилийн");default:return t}}t.defineLocale("mn",{months:"Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар".split("_"),monthsShort:"1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар".split("_"),monthsParseExact:!0,weekdays:"Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба".split("_"),weekdaysShort:"Ням_Дав_Мяг_Лха_Пүр_Баа_Бям".split("_"),weekdaysMin:"Ня_Да_Мя_Лх_Пү_Ба_Бя".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY оны MMMMын D",LLL:"YYYY оны MMMMын D HH:mm",LLLL:"dddd, YYYY оны MMMMын D HH:mm"},meridiemParse:/ҮӨ|ҮХ/i,isPM:function(t){return"ҮХ"===t},meridiem:function(t,e,n){return t<12?"ҮӨ":"ҮХ"},calendar:{sameDay:"[Өнөөдөр] LT",nextDay:"[Маргааш] LT",nextWeek:"[Ирэх] dddd LT",lastDay:"[Өчигдөр] LT",lastWeek:"[Өнгөрсөн] dddd LT",sameElse:"L"},relativeTime:{future:"%s дараа",past:"%s өмнө",s:e,ss:e,m:e,mm:e,h:e,hh:e,d:e,dd:e,M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2} өдөр/,ordinal:function(t,e){switch(e){case"d":case"D":case"DDD":return t+" өдөр";default:return t}}})})(n(5))},function(t,e,n){(function(t){"use strict";var e={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};function r(t,e,n,r){var i="";if(e)switch(n){case"s":i="काही सेकंद";break;case"ss":i="%d सेकंद";break;case"m":i="एक मिनिट";break;case"mm":i="%d मिनिटे";break;case"h":i="एक तास";break;case"hh":i="%d तास";break;case"d":i="एक दिवस";break;case"dd":i="%d दिवस";break;case"M":i="एक महिना";break;case"MM":i="%d महिने";break;case"y":i="एक वर्ष";break;case"yy":i="%d वर्षे"}else switch(n){case"s":i="काही सेकंदां";break;case"ss":i="%d सेकंदां";break;case"m":i="एका मिनिटा";break;case"mm":i="%d मिनिटां";break;case"h":i="एका तासा";break;case"hh":i="%d तासां";break;case"d":i="एका दिवसा";break;case"dd":i="%d दिवसां";break;case"M":i="एका महिन्या";break;case"MM":i="%d महिन्यां";break;case"y":i="एका वर्षा";break;case"yy":i="%d वर्षां"}return i.replace(/%d/i,t)}t.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},preparse:function(t){return t.replace(/[१२३४५६७८९०]/g,function(t){return n[t]})},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]})},meridiemParse:/रात्री|सकाळी|दुपारी|सायंकाळी/,meridiemHour:function(t,e){return 12===t&&(t=0),"रात्री"===e?t<4?t:t+12:"सकाळी"===e?t:"दुपारी"===e?t>=10?t:t+12:"सायंकाळी"===e?t+12:void 0},meridiem:function(t,e,n){return t<4?"रात्री":t<10?"सकाळी":t<17?"दुपारी":t<20?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(t,e){return 12===t&&(t=0),"pagi"===e?t:"tengahari"===e?t>=11?t:t+12:"petang"===e||"malam"===e?t+12:void 0},meridiem:function(t,e,n){return t<11?"pagi":t<15?"tengahari":t<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(t,e){return 12===t&&(t=0),"pagi"===e?t:"tengahari"===e?t>=11?t:t+12:"petang"===e||"malam"===e?t+12:void 0},meridiem:function(t,e,n){return t<11?"pagi":t<15?"tengahari":t<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ".split("_"),weekdays:"Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt".split("_"),weekdaysShort:"Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib".split("_"),weekdaysMin:"Ħa_Tn_Tl_Er_Ħa_Ġi_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[Għada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-bieraħ fil-]LT",lastWeek:"dddd [li għadda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f’ %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"siegħa",hh:"%d siegħat",d:"ġurnata",dd:"%d ġranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";var e={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},n={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"};t.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",ss:"%d စက္ကန့်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(t){return t.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,function(t){return n[t]})},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]})},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";var e={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};t.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:!0,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(t){return t.replace(/[१२३४५६७८९०]/g,function(t){return n[t]})},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]})},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(t,e){return 12===t&&(t=0),"राति"===e?t<4?t:t+12:"बिहान"===e?t:"दिउँसो"===e?t>=10?t:t+12:"साँझ"===e?t+12:void 0},meridiem:function(t,e,n){return t<3?"राति":t<12?"बिहान":t<16?"दिउँसो":t<20?"साँझ":"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",ss:"%d सेकेण्ड",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}})})(n(5))},function(t,e,n){(function(t){"use strict";var e="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),r=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],i=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;t.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(t,r){return t?/-MMM-/.test(r)?n[t.month()]:e[t.month()]:e},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(t){return t+(1===t||8===t||t>=20?"ste":"de")},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";var e="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),r=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],i=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;t.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(t,r){return t?/-MMM-/.test(r)?n[t.month()]:e[t.month()]:e},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(t){return t+(1===t||8===t||t>=20?"ste":"de")},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"sun_mån_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_må_ty_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";var e={1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"},n={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"};t.defineLocale("pa-in",{months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),longDateFormat:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},calendar:{sameDay:"[ਅਜ] LT",nextDay:"[ਕਲ] LT",nextWeek:"[ਅਗਲਾ] dddd, LT",lastDay:"[ਕਲ] LT",lastWeek:"[ਪਿਛਲੇ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",ss:"%d ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"},preparse:function(t){return t.replace(/[੧੨੩੪੫੬੭੮੯੦]/g,function(t){return n[t]})},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]})},meridiemParse:/ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,meridiemHour:function(t,e){return 12===t&&(t=0),"ਰਾਤ"===e?t<4?t:t+12:"ਸਵੇਰ"===e?t:"ਦੁਪਹਿਰ"===e?t>=10?t:t+12:"ਸ਼ਾਮ"===e?t+12:void 0},meridiem:function(t,e,n){return t<4?"ਰਾਤ":t<10?"ਸਵੇਰ":t<17?"ਦੁਪਹਿਰ":t<20?"ਸ਼ਾਮ":"ਰਾਤ"},week:{dow:0,doy:6}})})(n(5))},function(t,e,n){(function(t){"use strict";var e="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),n="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_");function r(t){return t%10<5&&t%10>1&&~~(t/10)%10!=1}function i(t,e,n){var i=t+" ";switch(n){case"ss":return i+(r(t)?"sekundy":"sekund");case"m":return e?"minuta":"minutę";case"mm":return i+(r(t)?"minuty":"minut");case"h":return e?"godzina":"godzinę";case"hh":return i+(r(t)?"godziny":"godzin");case"MM":return i+(r(t)?"miesiące":"miesięcy");case"yy":return i+(r(t)?"lata":"lat")}}t.defineLocale("pl",{months:function(t,r){return t?""===r?"("+n[t.month()]+"|"+e[t.month()]+")":/D MMMM/.test(r)?n[t.month()]:e[t.month()]:e},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedzielę o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W środę o] LT";case 6:return"[W sobotę o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:i,m:i,mm:i,h:i,hh:i,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:i,y:"rok",yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("pt",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("pt-br",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº"})})(n(5))},function(t,e,n){(function(t){"use strict";function e(t,e,n){var r=" ";return(t%100>=20||t>=100&&t%100==0)&&(r=" de "),t+r+{ss:"secunde",mm:"minute",hh:"ore",dd:"zile",MM:"luni",yy:"ani"}[n]}t.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",ss:e,m:"un minut",mm:e,h:"o oră",hh:e,d:"o zi",dd:e,M:"o lună",MM:e,y:"un an",yy:e},week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";function e(t,e,n){var r,i;return"m"===n?e?"минута":"минуту":t+" "+(r=+t,i={ss:e?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:e?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[n].split("_"),r%10==1&&r%100!=11?i[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?i[1]:i[2])}var n=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i];t.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:n,longMonthsParse:n,shortMonthsParse:n,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня, в] LT",nextDay:"[Завтра, в] LT",lastDay:"[Вчера, в] LT",nextWeek:function(t){if(t.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}},lastWeek:function(t){if(t.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:e,m:e,mm:e,h:"час",hh:e,d:"день",dd:e,M:"месяц",MM:e,y:"год",yy:e},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(t){return/^(дня|вечера)$/.test(t)},meridiem:function(t,e,n){return t<4?"ночи":t<12?"утра":t<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(t,e){switch(e){case"M":case"d":case"DDD":return t+"-й";case"D":return t+"-го";case"w":case"W":return t+"-я";default:return t}},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";var e=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],n=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"];t.defineLocale("sd",{months:e,monthsShort:e,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(t){return"شام"===t},meridiem:function(t,e,n){return t<12?"صبح":"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",ss:"%d سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(t){return t.replace(/،/g,",")},postformat:function(t){return t.replace(/,/g,"،")},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",ss:"තත්පර %d",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},dayOfMonthOrdinalParse:/\d{1,2} වැනි/,ordinal:function(t){return t+" වැනි"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(t){return"ප.ව."===t||"පස් වරු"===t},meridiem:function(t,e,n){return t>11?n?"ප.ව.":"පස් වරු":n?"පෙ.ව.":"පෙර වරු"}})})(n(5))},function(t,e,n){(function(t){"use strict";var e="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),n="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");function r(t){return t>1&&t<5}function i(t,e,n,i){var a=t+" ";switch(n){case"s":return e||i?"pár sekúnd":"pár sekundami";case"ss":return e||i?a+(r(t)?"sekundy":"sekúnd"):a+"sekundami";case"m":return e?"minúta":i?"minútu":"minútou";case"mm":return e||i?a+(r(t)?"minúty":"minút"):a+"minútami";case"h":return e?"hodina":i?"hodinu":"hodinou";case"hh":return e||i?a+(r(t)?"hodiny":"hodín"):a+"hodinami";case"d":return e||i?"deň":"dňom";case"dd":return e||i?a+(r(t)?"dni":"dní"):a+"dňami";case"M":return e||i?"mesiac":"mesiacom";case"MM":return e||i?a+(r(t)?"mesiace":"mesiacov"):a+"mesiacmi";case"y":return e||i?"rok":"rokom";case"yy":return e||i?a+(r(t)?"roky":"rokov"):a+"rokmi"}}t.defineLocale("sk",{months:e,monthsShort:n,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:i,ss:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";function e(t,e,n,r){var i=t+" ";switch(n){case"s":return e||r?"nekaj sekund":"nekaj sekundami";case"ss":return i+=1===t?e?"sekundo":"sekundi":2===t?e||r?"sekundi":"sekundah":t<5?e||r?"sekunde":"sekundah":"sekund";case"m":return e?"ena minuta":"eno minuto";case"mm":return i+=1===t?e?"minuta":"minuto":2===t?e||r?"minuti":"minutama":t<5?e||r?"minute":"minutami":e||r?"minut":"minutami";case"h":return e?"ena ura":"eno uro";case"hh":return i+=1===t?e?"ura":"uro":2===t?e||r?"uri":"urama":t<5?e||r?"ure":"urami":e||r?"ur":"urami";case"d":return e||r?"en dan":"enim dnem";case"dd":return i+=1===t?e||r?"dan":"dnem":2===t?e||r?"dni":"dnevoma":e||r?"dni":"dnevi";case"M":return e||r?"en mesec":"enim mesecem";case"MM":return i+=1===t?e||r?"mesec":"mesecem":2===t?e||r?"meseca":"mesecema":t<5?e||r?"mesece":"meseci":e||r?"mesecev":"meseci";case"y":return e||r?"eno leto":"enim letom";case"yy":return i+=1===t?e||r?"leto":"letom":2===t?e||r?"leti":"letoma":t<5?e||r?"leta":"leti":e||r?"let":"leti"}}t.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:e,ss:e,m:e,mm:e,h:e,hh:e,d:e,dd:e,M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(t){return"M"===t.charAt(0)},meridiem:function(t,e,n){return t<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",ss:"%d sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";var e={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(t,e){return 1===t?e[0]:t>=2&&t<=4?e[1]:e[2]},translate:function(t,n,r){var i=e.words[r];return 1===r.length?n?i[0]:i[1]:t+" "+e.correctGrammaticalCase(t,i)}};t.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:e.translate,m:e.translate,mm:e.translate,h:e.translate,hh:e.translate,d:"dan",dd:e.translate,M:"mesec",MM:e.translate,y:"godinu",yy:e.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";var e={words:{ss:["секунда","секунде","секунди"],m:["један минут","једне минуте"],mm:["минут","минуте","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],dd:["дан","дана","дана"],MM:["месец","месеца","месеци"],yy:["година","године","година"]},correctGrammaticalCase:function(t,e){return 1===t?e[0]:t>=2&&t<=4?e[1]:e[2]},translate:function(t,n,r){var i=e.words[r];return 1===r.length?n?i[0]:i[1]:t+" "+e.correctGrammaticalCase(t,i)}};t.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:!0,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){return["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",ss:e.translate,m:e.translate,mm:e.translate,h:e.translate,hh:e.translate,d:"дан",dd:e.translate,M:"месец",MM:e.translate,y:"годину",yy:e.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(t,e,n){return t<11?"ekuseni":t<15?"emini":t<19?"entsambama":"ebusuku"},meridiemHour:function(t,e){return 12===t&&(t=0),"ekuseni"===e?t:"emini"===e?t>=11?t:t+12:"entsambama"===e||"ebusuku"===e?0===t?0:t+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(e|a)/,ordinal:function(t){var e=t%10;return t+(1==~~(t%100/10)?"e":1===e?"a":2===e?"a":"e")},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"masiku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";var e={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},n={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"};t.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",ss:"%d விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}வது/,ordinal:function(t){return t+"வது"},preparse:function(t){return t.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,function(t){return n[t]})},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]})},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(t,e,n){return t<2?" யாமம்":t<6?" வைகறை":t<10?" காலை":t<14?" நண்பகல்":t<18?" எற்பாடு":t<22?" மாலை":" யாமம்"},meridiemHour:function(t,e){return 12===t&&(t=0),"யாமம்"===e?t<2?t:t+12:"வைகறை"===e||"காலை"===e?t:"நண்பகல்"===e&&t>=10?t:t+12},week:{dow:0,doy:6}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:!0,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",ss:"%d సెకన్లు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}వ/,ordinal:"%dవ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(t,e){return 12===t&&(t=0),"రాత్రి"===e?t<4?t:t+12:"ఉదయం"===e?t:"మధ్యాహ్నం"===e?t>=10?t:t+12:"సాయంత్రం"===e?t+12:void 0},meridiem:function(t,e,n){return t<4?"రాత్రి":t<10?"ఉదయం":t<17?"మధ్యాహ్నం":t<20?"సాయంత్రం":"రాత్రి"},week:{dow:0,doy:6}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"minutu balun",ss:"minutu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(t){var e=t%10;return t+(1==~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";var e={0:"-ум",1:"-ум",2:"-юм",3:"-юм",4:"-ум",5:"-ум",6:"-ум",7:"-ум",8:"-ум",9:"-ум",10:"-ум",12:"-ум",13:"-ум",20:"-ум",30:"-юм",40:"-ум",50:"-ум",60:"-ум",70:"-ум",80:"-ум",90:"-ум",100:"-ум"};t.defineLocale("tg",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе".split("_"),weekdaysShort:"яшб_дшб_сшб_чшб_пшб_ҷум_шнб".split("_"),weekdaysMin:"яш_дш_сш_чш_пш_ҷм_шб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Имрӯз соати] LT",nextDay:"[Пагоҳ соати] LT",lastDay:"[Дирӯз соати] LT",nextWeek:"dddd[и] [ҳафтаи оянда соати] LT",lastWeek:"dddd[и] [ҳафтаи гузашта соати] LT",sameElse:"L"},relativeTime:{future:"баъди %s",past:"%s пеш",s:"якчанд сония",m:"як дақиқа",mm:"%d дақиқа",h:"як соат",hh:"%d соат",d:"як рӯз",dd:"%d рӯз",M:"як моҳ",MM:"%d моҳ",y:"як сол",yy:"%d сол"},meridiemParse:/шаб|субҳ|рӯз|бегоҳ/,meridiemHour:function(t,e){return 12===t&&(t=0),"шаб"===e?t<4?t:t+12:"субҳ"===e?t:"рӯз"===e?t>=11?t:t+12:"бегоҳ"===e?t+12:void 0},meridiem:function(t,e,n){return t<4?"шаб":t<11?"субҳ":t<16?"рӯз":t<19?"бегоҳ":"шаб"},dayOfMonthOrdinalParse:/\d{1,2}-(ум|юм)/,ordinal:function(t){return t+(e[t]||e[t%10]||e[t>=100?100:null])},week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:!0,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(t){return"หลังเที่ยง"===t},meridiem:function(t,e,n){return t<12?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",ss:"%d วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(t){return t},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";var e="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function n(t,n,r,i){var a=function(t){var n=Math.floor(t%1e3/100),r=Math.floor(t%100/10),i=t%10,a="";n>0&&(a+=e[n]+"vatlh");r>0&&(a+=(""!==a?" ":"")+e[r]+"maH");i>0&&(a+=(""!==a?" ":"")+e[i]);return""===a?"pagh":a}(t);switch(r){case"ss":return a+" lup";case"mm":return a+" tup";case"hh":return a+" rep";case"dd":return a+" jaj";case"MM":return a+" jar";case"yy":return a+" DIS"}}t.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:function(t){var e=t;return e=-1!==t.indexOf("jaj")?e.slice(0,-3)+"leS":-1!==t.indexOf("jar")?e.slice(0,-3)+"waQ":-1!==t.indexOf("DIS")?e.slice(0,-3)+"nem":e+" pIq"},past:function(t){var e=t;return e=-1!==t.indexOf("jaj")?e.slice(0,-3)+"Hu’":-1!==t.indexOf("jar")?e.slice(0,-3)+"wen":-1!==t.indexOf("DIS")?e.slice(0,-3)+"ben":e+" ret"},s:"puS lup",ss:n,m:"wa’ tup",mm:n,h:"wa’ rep",hh:n,d:"wa’ jaj",dd:n,M:"wa’ jar",MM:n,y:"wa’ DIS",yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";var e={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"};t.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(t,n){switch(n){case"d":case"D":case"Do":case"DD":return t;default:if(0===t)return t+"'ıncı";var r=t%10;return t+(e[r]||e[t%100-r]||e[t>=100?100:null])}},week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";function e(t,e,n,r){var i={s:["viensas secunds","'iensas secunds"],ss:[t+" secunds",t+" secunds"],m:["'n míut","'iens míut"],mm:[t+" míuts",t+" míuts"],h:["'n þora","'iensa þora"],hh:[t+" þoras",t+" þoras"],d:["'n ziua","'iensa ziua"],dd:[t+" ziuas",t+" ziuas"],M:["'n mes","'iens mes"],MM:[t+" mesen",t+" mesen"],y:["'n ar","'iens ar"],yy:[t+" ars",t+" ars"]};return r?i[n][0]:e?i[n][0]:i[n][1]}t.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(t){return"d'o"===t.toLowerCase()},meridiem:function(t,e,n){return t>11?n?"d'o":"D'O":n?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:e,ss:e,m:e,mm:e,h:e,hh:e,d:e,dd:e,M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",ss:"%d ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("ug-cn",{months:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),monthsShort:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),weekdays:"يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە".split("_"),weekdaysShort:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),weekdaysMin:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-يىلىM-ئاينىڭD-كۈنى",LLL:"YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm",LLLL:"dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm"},meridiemParse:/يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,meridiemHour:function(t,e){return 12===t&&(t=0),"يېرىم كېچە"===e||"سەھەر"===e||"چۈشتىن بۇرۇن"===e?t:"چۈشتىن كېيىن"===e||"كەچ"===e?t+12:t>=11?t:t+12},meridiem:function(t,e,n){var r=100*t+e;return r<600?"يېرىم كېچە":r<900?"سەھەر":r<1130?"چۈشتىن بۇرۇن":r<1230?"چۈش":r<1800?"چۈشتىن كېيىن":"كەچ"},calendar:{sameDay:"[بۈگۈن سائەت] LT",nextDay:"[ئەتە سائەت] LT",nextWeek:"[كېلەركى] dddd [سائەت] LT",lastDay:"[تۆنۈگۈن] LT",lastWeek:"[ئالدىنقى] dddd [سائەت] LT",sameElse:"L"},relativeTime:{future:"%s كېيىن",past:"%s بۇرۇن",s:"نەچچە سېكونت",ss:"%d سېكونت",m:"بىر مىنۇت",mm:"%d مىنۇت",h:"بىر سائەت",hh:"%d سائەت",d:"بىر كۈن",dd:"%d كۈن",M:"بىر ئاي",MM:"%d ئاي",y:"بىر يىل",yy:"%d يىل"},dayOfMonthOrdinalParse:/\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,ordinal:function(t,e){switch(e){case"d":case"D":case"DDD":return t+"-كۈنى";case"w":case"W":return t+"-ھەپتە";default:return t}},preparse:function(t){return t.replace(/،/g,",")},postformat:function(t){return t.replace(/,/g,"،")},week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";function e(t,e,n){var r,i;return"m"===n?e?"хвилина":"хвилину":"h"===n?e?"година":"годину":t+" "+(r=+t,i={ss:e?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:e?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:e?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[n].split("_"),r%10==1&&r%100!=11?i[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?i[1]:i[2])}function n(t){return function(){return t+"о"+(11===this.hours()?"б":"")+"] LT"}}t.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:function(t,e){var n={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};return!0===t?n.nominative.slice(1,7).concat(n.nominative.slice(0,1)):t?n[/(\[[ВвУу]\]) ?dddd/.test(e)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(e)?"genitive":"nominative"][t.day()]:n.nominative},weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:n("[Сьогодні "),nextDay:n("[Завтра "),lastDay:n("[Вчора "),nextWeek:n("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return n("[Минулої] dddd [").call(this);case 1:case 2:case 4:return n("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:e,m:e,mm:e,h:"годину",hh:e,d:"день",dd:e,M:"місяць",MM:e,y:"рік",yy:e},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(t){return/^(дня|вечора)$/.test(t)},meridiem:function(t,e,n){return t<4?"ночі":t<12?"ранку":t<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(t,e){switch(e){case"M":case"d":case"DDD":case"w":case"W":return t+"-й";case"D":return t+"-го";default:return t}},week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";var e=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],n=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"];t.defineLocale("ur",{months:e,monthsShort:e,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(t){return"شام"===t},meridiem:function(t,e,n){return t<12?"صبح":"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",ss:"%d سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(t){return t.replace(/،/g,",")},postformat:function(t){return t.replace(/,/g,"،")},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",ss:"%d фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(t){return/^ch$/i.test(t)},meridiem:function(t,e,n){return t<12?n?"sa":"SA":n?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần rồi lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",ss:"%d giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(t){return t},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:!0,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",ss:"%d s~écóñ~ds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1==~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",ss:"aayá %d",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(t,e){return 12===t&&(t=0),"凌晨"===e||"早上"===e||"上午"===e?t:"下午"===e||"晚上"===e?t+12:t>=11?t:t+12},meridiem:function(t,e,n){var r=100*t+e;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(t,e){switch(e){case"d":case"D":case"DDD":return t+"日";case"M":return t+"月";case"w":case"W":return t+"周";default:return t}},relativeTime:{future:"%s内",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(t,e){return 12===t&&(t=0),"凌晨"===e||"早上"===e||"上午"===e?t:"中午"===e?t>=11?t:t+12:"下午"===e||"晚上"===e?t+12:void 0},meridiem:function(t,e,n){var r=100*t+e;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(t,e){switch(e){case"d":case"D":case"DDD":return t+"日";case"M":return t+"月";case"w":case"W":return t+"週";default:return t}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})})(n(5))},function(t,e,n){(function(t){"use strict";t.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(t,e){return 12===t&&(t=0),"凌晨"===e||"早上"===e||"上午"===e?t:"中午"===e?t>=11?t:t+12:"下午"===e||"晚上"===e?t+12:void 0},meridiem:function(t,e,n){var r=100*t+e;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(t,e){switch(e){case"d":case"D":case"DDD":return t+"日";case"M":return t+"月";case"w":case"W":return t+"週";default:return t}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})})(n(5))},function(t,e){t.exports="/images/vendor/leaflet/dist/marker-icon.png?2273e3d8ad9264b7daa5bdbf8e6b47f8"},function(t,e,n){var r,i,a={},o=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=r.apply(this,arguments)),i}),s=function(t){var e={};return function(t){return void 0===e[t]&&(e[t]=function(t){return document.querySelector(t)}.call(this,t)),e[t]}}(),c=null,u=0,l=[],d=n(841);function f(t,e){for(var n=0;n<t.length;n++){var r=t[n],i=a[r.id];if(i){i.refs++;for(var o=0;o<i.parts.length;o++)i.parts[o](r.parts[o]);for(;o<r.parts.length;o++)i.parts.push(g(r.parts[o],e))}else{var s=[];for(o=0;o<r.parts.length;o++)s.push(g(r.parts[o],e));a[r.id]={id:r.id,refs:1,parts:s}}}}function h(t,e){for(var n=[],r={},i=0;i<t.length;i++){var a=t[i],o=e.base?a[0]+e.base:a[0],s={css:a[1],media:a[2],sourceMap:a[3]};r[o]?r[o].parts.push(s):n.push(r[o]={id:o,parts:[s]})}return n}function p(t,e){var n=s(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=l[l.length-1];if("top"===t.insertAt)r?r.nextSibling?n.insertBefore(e,r.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),l.push(e);else{if("bottom"!==t.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(e)}}function m(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=l.indexOf(t);e>=0&&l.splice(e,1)}function v(t){var e=document.createElement("style");return t.attrs.type="text/css",_(e,t.attrs),p(t,e),e}function _(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function g(t,e){var n,r,i,a;if(e.transform&&t.css){if(!(a=e.transform(t.css)))return function(){};t.css=a}if(e.singleton){var o=u++;n=c||(c=v(e)),r=x.bind(null,n,o,!1),i=x.bind(null,n,o,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return t.attrs.type="text/css",t.attrs.rel="stylesheet",_(e,t.attrs),p(t,e),e}(e),r=function(t,e,n){var r=n.css,i=n.sourceMap,a=void 0===e.convertToAbsoluteUrls&&i;(e.convertToAbsoluteUrls||a)&&(r=d(r));i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var o=new Blob([r],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(o),s&&URL.revokeObjectURL(s)}.bind(null,n,e),i=function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=v(e),r=function(t,e){var n=e.css,r=e.media;r&&t.setAttribute("media",r);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),i=function(){m(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||(e.singleton=o()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=h(t,e);return f(n,e),function(t){for(var r=[],i=0;i<n.length;i++){var o=n[i];(s=a[o.id]).refs--,r.push(s)}t&&f(h(t,e),e);for(i=0;i<r.length;i++){var s;if(0===(s=r[i]).refs){for(var c=0;c<s.parts.length;c++)s.parts[c]();delete a[s.id]}}}};var b,y=(b=[],function(t,e){return b[t]=e,b.filter(Boolean).join("\n")});function x(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=y(e,i);else{var a=document.createTextNode(i),o=t.childNodes;o[e]&&t.removeChild(o[e]),o.length?t.insertBefore(a,o[e]):t.appendChild(a)}}},function(t,e,n){"use strict";var r={};n.d(r,"getModelUris",function(){return R}),n.d(r,"TinyYolov2",function(){return Ot}),n.d(r,"TinyYolov2SizeType",function(){return Ct}),n.d(r,"TinyYolov2Options",function(){return Pt}),n.d(r,"validateConfig",function(){return St}),n.d(r,"convLayer",function(){return o}),n.d(r,"disposeUnusedWeightTensors",function(){return s}),n.d(r,"extractConvParamsFactory",function(){return c}),n.d(r,"extractFCParamsFactory",function(){return u}),n.d(r,"extractSeparableConvParamsFactory",function(){return d}),n.d(r,"loadSeparableConvParamsFactory",function(){return f}),n.d(r,"extractWeightEntryFactory",function(){return T}),n.d(r,"extractWeightsFactory",function(){return D}),n.d(r,"SeparableConvParams",function(){return l});var i=n(9),a=n(24);function o(t,e,n,r){return void 0===n&&(n="same"),void 0===r&&(r=!1),a.w(function(){var i=a.c(a.f(t,e.filters,[1,1],n),e.bias);return r?a.m(i):i})}function s(t,e){Object.keys(t).forEach(function(n){e.some(function(t){return t.originalPath===n})||t[n].dispose()})}function c(t,e){return function(n,r,i,o){var s=a.v(t(n*r*i*i),[i,i,n,r]),c=a.t(t(r));return e.push({paramPath:o+"/filters"},{paramPath:o+"/bias"}),{filters:s,bias:c}}}function u(t,e){return function(n,r,i){var o=a.u(t(n*r),[n,r]),s=a.t(t(r));return e.push({paramPath:i+"/weights"},{paramPath:i+"/bias"}),{weights:o,bias:s}}}var l=function(){return function(t,e,n){this.depthwise_filter=t,this.pointwise_filter=e,this.bias=n}}();function d(t,e){return function(n,r,i){var o=a.v(t(9*n),[3,3,n,1]),s=a.v(t(n*r),[1,1,n,r]),c=a.t(t(r));return e.push({paramPath:i+"/depthwise_filter"},{paramPath:i+"/pointwise_filter"},{paramPath:i+"/bias"}),new l(o,s,c)}}function f(t){return function(e){var n=t(e+"/depthwise_filter",4),r=t(e+"/pointwise_filter",4),i=t(e+"/bias",1);return new l(n,r,i)}}var h=function(){function t(t,e){if(!I(t)||!I(e))throw new Error("Dimensions.constructor - expected width and height to be valid numbers, instead have "+JSON.stringify({width:t,height:e}));this._width=t,this._height=e}return Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),t.prototype.reverse=function(){return new t(1/this.width,1/this.height)},t}(),p=function(){function t(t,e){this._x=t,this._y=e}return Object.defineProperty(t.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),t.prototype.add=function(e){return new t(this.x+e.x,this.y+e.y)},t.prototype.sub=function(e){return new t(this.x-e.x,this.y-e.y)},t.prototype.mul=function(e){return new t(this.x*e.x,this.y*e.y)},t.prototype.div=function(e){return new t(this.x/e.x,this.y/e.y)},t.prototype.abs=function(){return new t(Math.abs(this.x),Math.abs(this.y))},t.prototype.magnitude=function(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))},t.prototype.floor=function(){return new t(Math.floor(this.x),Math.floor(this.y))},t}();function m(t,e){return t instanceof a.a&&t.shape.length===e}function v(t){return m(t,1)}function _(t){return m(t,2)}function g(t){return m(t,3)}function b(t){return m(t,4)}function y(t){return t%1!=0}function x(t){return t%2==0}function w(t,e){void 0===e&&(e=2);var n=Math.pow(10,e);return Math.floor(t*n)/n}function k(t){return t&&t.width&&t.height}function C(t,e){var n=t.width,r=t.height,i=e/Math.max(r,n);return new h(Math.round(n*i),Math.round(r*i))}function E(t){return t.reduce(function(t,e){return t.add(e)},new p(0,0)).div(new p(t.length,t.length))}function S(t,e,n){return Array(t).fill(0).map(function(t,r){return e+r*n})}function I(t){return!!t&&t!==1/0&&t!==-1/0&&!isNaN(t)||0===t}function M(t){return I(t)&&0<=t&&t<=1}function T(t,e){return function(n,r,i){var a=t[n];if(!m(a,r))throw new Error("expected weightMap["+n+"] to be a Tensor"+r+"D, instead have "+a);return e.push({originalPath:n,paramPath:i||n}),a}}function D(t){var e=t;return{extractWeights:function(t){var n=e.slice(0,t);return e=e.slice(t),n},getRemainingWeights:function(){return e}}}function R(t,e){var n=e+"-weights_manifest.json";if(!t)return{modelBaseUri:"",manifestUri:n};if("/"===t)return{modelBaseUri:"/",manifestUri:"/"+n};var r=t.startsWith("http://")?"http://":t.startsWith("https://")?"https://":"",i=(t=t.replace(r,"")).split("/").filter(function(t){return t}),a=t.endsWith(".json")?i[i.length-1]:n,o=r+(t.endsWith(".json")?i.slice(0,i.length-1):i).join("/");return{modelBaseUri:o=t.startsWith("/")?"/"+o:o,manifestUri:"/"===o?"/"+a:o+"/"+a}}var P=n(7),O=function(){function t(e,n){void 0===n&&(n=!1);var r=e||{},i=[r.left,r.top,r.right,r.bottom].every(I),a=[r.x,r.y,r.width,r.height].every(I);if(!a&&!i)throw new Error("Box.constructor - expected box to be IBoundingBox | IRect, instead have "+JSON.stringify(r));var o=a?[r.x,r.y,r.width,r.height]:[r.left,r.top,r.right-r.left,r.bottom-r.top],s=o[0],c=o[1],u=o[2],l=o[3];t.assertIsValidBox({x:s,y:c,width:u,height:l},"Box.constructor",n),this._x=s,this._y=c,this._width=u,this._height=l}return t.isRect=function(t){return!!t&&[t.x,t.y,t.width,t.height].every(I)},t.assertIsValidBox=function(e,n,r){if(void 0===r&&(r=!1),!t.isRect(e))throw new Error(n+" - invalid box: "+JSON.stringify(e)+", expected object with properties x, y, width, height");if(!r&&(e.width<0||e.height<0))throw new Error(n+" - width ("+e.width+") and height ("+e.height+") must be positive numbers")},Object.defineProperty(t.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"area",{get:function(){return this.width*this.height},enumerable:!0,configurable:!0}),t.prototype.round=function(){var e=[this.x,this.y,this.width,this.height].map(function(t){return Math.round(t)});return new t({x:e[0],y:e[1],width:e[2],height:e[3]})},t.prototype.floor=function(){var e=[this.x,this.y,this.width,this.height].map(function(t){return Math.floor(t)});return new t({x:e[0],y:e[1],width:e[2],height:e[3]})},t.prototype.toSquare=function(){var e=this.x,n=this.y,r=this.width,i=this.height,a=Math.abs(r-i);return r<i&&(e-=a/2,r+=a),i<r&&(n-=a/2,i+=a),new t({x:e,y:n,width:r,height:i})},t.prototype.rescale=function(e){var n=k(e)?e.width:e,r=k(e)?e.height:e;return new t({x:this.x*n,y:this.y*r,width:this.width*n,height:this.height*r})},t.prototype.pad=function(e,n){var r=[this.x-e/2,this.y-n/2,this.width+e,this.height+n];return new t({x:r[0],y:r[1],width:r[2],height:r[3]})},t.prototype.clipAtImageBorders=function(e,n){var r=this.x,i=this.y,a=this.right,o=this.bottom,s=Math.max(r,0),c=Math.max(i,0),u=a-s,l=o-c;return new t({x:s,y:c,width:Math.min(u,e-s),height:Math.min(l,n-c)}).floor()},t.prototype.shift=function(e,n){var r=this.width,i=this.height;return new t({x:this.x+e,y:this.y+n,width:r,height:i})},t.prototype.padAtBorders=function(t,e){var n=this.width+1,r=this.height+1,i=n,a=r,o=this.left,s=this.top,c=this.right,u=this.bottom;return c>e&&(i=-c+e+n,c=e),u>t&&(a=-u+t+r,u=t),o<1&&(a=2-o,o=1),s<1&&(a=2-s,s=1),{dy:1,edy:a,dx:1,edx:i,y:s,ey:u,x:o,ex:c,w:n,h:r}},t.prototype.calibrate=function(e){return new t({left:this.left+e.left*this.width,top:this.top+e.top*this.height,right:this.right+e.right*this.width,bottom:this.bottom+e.bottom*this.height}).toSquare().round()},t}(),L=function(t){function e(e,n,r,i){return t.call(this,{left:e,top:n,right:r,bottom:i})||this}return P.c(e,t),e}(O),A=function(){function t(t,e,n,r,i){this._imageDims=new h(i.width,i.height),this._score=t,this._classScore=e,this._className=n,this._box=new O(r).rescale(this._imageDims)}return Object.defineProperty(t.prototype,"score",{get:function(){return this._score},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"classScore",{get:function(){return this._classScore},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"className",{get:function(){return this._className},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"box",{get:function(){return this._box},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageDims",{get:function(){return this._imageDims},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageWidth",{get:function(){return this.imageDims.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageHeight",{get:function(){return this.imageDims.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"relativeBox",{get:function(){return new O(this._box).rescale(this.imageDims.reverse())},enumerable:!0,configurable:!0}),t.prototype.forSize=function(e,n){return new t(this.score,this.classScore,this.className,this.relativeBox,{width:e,height:n})},t}();function N(){var t=window.fetch||function(){throw new Error("fetch - missing fetch implementation for browser environment")};return{Canvas:HTMLCanvasElement,Image:HTMLImageElement,ImageData:ImageData,Video:HTMLVideoElement,createCanvasElement:function(){return document.createElement("canvas")},createImageElement:function(){return document.createElement("img")},fetch:t,readFile:function(){throw new Error("readFile - filesystem not available for browser environment")}}}var B=n(381),j=n(949);function F(){return"object"==typeof window&&"undefined"!=typeof document&&"undefined"!=typeof HTMLImageElement&&"undefined"!=typeof HTMLCanvasElement&&"undefined"!=typeof HTMLVideoElement&&"undefined"!=typeof ImageData}var Y,$=n(950);function z(t){Y=t}function V(){F()&&z(N()),Object($.a)()&&z(Object(j.a)())}var H={getEnv:function(){if(!Y)throw new Error("getEnv - environment is not defined, check isNodejs() and isBrowser()");return Y},setEnv:z,initialize:V,createBrowserEnv:N,createFileSystem:B.a,createNodejsEnv:j.a,monkeyPatch:function(t){if(Y||V(),!Y)throw new Error("monkeyPatch - environment is not defined, check isNodejs() and isBrowser()");var e=t.Canvas,n=void 0===e?Y.Canvas:e,r=t.Image,i=void 0===r?Y.Image:r;Y.Canvas=n,Y.Image=i,Y.createCanvasElement=t.createCanvasElement||function(){return new n},Y.createImageElement=t.createImageElement||function(){return new i},Y.ImageData=t.ImageData||Y.ImageData,Y.Video=t.Video||Y.Video,Y.fetch=t.fetch||Y.fetch,Y.readFile=t.readFile||Y.readFile},isBrowser:F,isNodejs:$.a};function q(t){var e=H.getEnv(),n=e.Image,r=e.Video;return t instanceof n&&t.complete||t instanceof r&&t.readyState>=3}function W(t){return new Promise(function(e,n){if(t instanceof H.getEnv().Canvas||q(t))return e();function r(t){t.currentTarget&&(t.currentTarget.removeEventListener("load",r),t.currentTarget.removeEventListener("error",i),e(t))}function i(t){t.currentTarget&&(t.currentTarget.removeEventListener("load",r),t.currentTarget.removeEventListener("error",i),n(t))}t.addEventListener("load",r),t.addEventListener("error",i)})}function U(t){return new Promise(function(e,n){if(!(t instanceof Blob))return n("bufferToImage - expected buf to be of type: Blob");var r=new FileReader;r.onload=function(){if("string"!=typeof r.result)return n("bufferToImage - expected reader.result to be a string, in onload");var t=H.getEnv().createImageElement();t.onload=function(){return e(t)},t.onerror=n,t.src=r.result},r.onerror=n,r.readAsDataURL(t)})}function G(t){var e=t.getContext("2d");if(!e)throw new Error("canvas 2d context is null");return e}function K(t){var e=H.getEnv(),n=e.Image,r=e.Video;return t instanceof n?new h(t.naturalWidth,t.naturalHeight):t instanceof r?new h(t.videoWidth,t.videoHeight):new h(t.width,t.height)}function X(t){var e=t.width,n=t.height,r=(0,H.getEnv().createCanvasElement)();return r.width=e,r.height=n,r}function J(t,e){var n=H.getEnv().ImageData;if(!(t instanceof n||q(t)))throw new Error("createCanvasFromMedia - media has not finished loading yet");var r=e||K(t),i=r.width,a=r.height,o=X({width:i,height:a});return t instanceof n?G(o).putImageData(t,0,0):G(o).drawImage(t,0,0,i,a),o}function Z(t){return void 0===t&&(t={}),Object.assign({},{boxColor:"blue",textColor:"red",lineWidth:2,fontSize:20,fontStyle:"Georgia",withScore:!0,withClassName:!0},t)}function Q(t,e,n,r,i,a){var o=Object.assign(Z(),a||{});t.strokeStyle=o.boxColor,t.lineWidth=o.lineWidth,t.strokeRect(e,n,r,i)}V();var tt=function(t){function e(e,n){var r=t.call(this,e)||this;return r._text=n,r}return P.c(e,t),Object.defineProperty(e.prototype,"text",{get:function(){return this._text},enumerable:!0,configurable:!0}),e}(O),et=function(t){function e(e,n){var r=t.call(this,e)||this;return r._label=n,r}return P.c(e,t),e.assertIsValidLabeledBox=function(t,e){if(O.assertIsValidBox(t,e),!I(t.label))throw new Error(e+" - expected property label ("+t.label+") to be a number")},Object.defineProperty(e.prototype,"label",{get:function(){return this._label},enumerable:!0,configurable:!0}),e}(O),nt=function(t){function e(e,n,r,i){var a=t.call(this,e,n)||this;return a._score=r,a._classScore=i,a}return P.c(e,t),e.assertIsValidPredictedBox=function(t,e){if(et.assertIsValidLabeledBox(t,e),!M(t.score)||!M(t.classScore))throw new Error(e+" - expected properties score ("+t.score+") and ("+t.classScore+") to be a number between [0, 1]")},Object.defineProperty(e.prototype,"score",{get:function(){return this._score},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"classScore",{get:function(){return this._classScore},enumerable:!0,configurable:!0}),e}(et);function rt(t,e,n,r,i){void 0===i&&(i={});var a=Object.assign(Z(),i),o=2+a.lineWidth;t.fillStyle=a.textColor,t.font=a.fontSize+"px "+a.fontStyle,t.fillText(r,e+o,n+o+.6*a.fontSize)}function it(t){return H.isNodejs()||"string"!=typeof t?t:document.getElementById(t)}function at(t,e,n){var r=H.getEnv().Canvas,i=it(t);if(!(i instanceof r))throw new Error("drawDetection - expected canvas to be of type: HTMLCanvasElement");(Array.isArray(e)?e:[e]).forEach(function(t){var e=t instanceof A?t.box:t,r=e.x,a=e.y,o=e.width,s=e.height,c=Z(n),u=G(i);Q(u,r,a,o,s,c);var l=c.withScore,d=t instanceof tt?t.text:l&&t instanceof nt?""+w(t.score):t instanceof A?t.className+(l?" ("+w(t.score)+")":""):"";d&&rt(u,r,a+s,d,c)})}function ot(t,e){return P.b(this,void 0,void 0,function(){var n;return P.d(this,function(r){switch(r.label){case 0:return[4,(0,H.getEnv().fetch)(t,e)];case 1:if(!((n=r.sent()).status<400))throw new Error("failed to fetch: ("+n.status+") "+n.statusText+", from url: "+n.url);return[2,n]}})})}function st(t){return P.b(this,void 0,void 0,function(){var e,n;return P.d(this,function(r){switch(r.label){case 0:return[4,ot(t)];case 1:return[4,(e=r.sent()).blob()];case 2:if(!(n=r.sent()).type.startsWith("image/"))throw new Error("fetchImage - expected blob type to be of type image/*, instead have: "+n.type+", for url: "+e.url);return[2,U(n)]}})})}function ct(t){return P.b(this,void 0,void 0,function(){return P.d(this,function(e){switch(e.label){case 0:return[4,ot(t)];case 1:return[2,e.sent().json()]}})})}function ut(t){return P.b(this,void 0,void 0,function(){var e;return P.d(this,function(n){switch(n.label){case 0:return e=Float32Array.bind,[4,ot(t)];case 1:return[4,n.sent().arrayBuffer()];case 2:return[2,new(e.apply(Float32Array,[void 0,n.sent()]))]}})})}function lt(t,e){return P.b(this,void 0,void 0,function(){var n,r,i,o,s,c;return P.d(this,function(u){switch(u.label){case 0:return n=e||H.getEnv().createCanvasElement(),r=t.shape.slice(b(t)?1:0),i=r[0],o=r[1],s=r[2],c=a.w(function(){return t.as3D(i,o,s).toInt()}),[4,a.d.toPixels(c,n)];case 1:return u.sent(),c.dispose(),[2,n]}})})}function dt(t,e,n){void 0===n&&(n=!1);var r=H.getEnv(),i=r.Image,a=r.Canvas;if(!(t instanceof i||t instanceof a))throw new Error("imageToSquare - expected arg0 to be HTMLImageElement | HTMLCanvasElement");var o=K(t),s=e/Math.max(o.height,o.width),c=s*o.width,u=s*o.height,l=X({width:e,height:e}),d=t instanceof a?t:J(t),f=Math.abs(c-u)/2,h=n&&c<u?f:0,p=n&&u<c?f:0;return G(l).drawImage(d,h,p,c,u),l}function ft(t){var e=H.getEnv(),n=e.Image,r=e.Canvas,i=e.Video;return t instanceof n||t instanceof r||t instanceof i}function ht(t,e){return P.b(this,void 0,void 0,function(){var n,r,i,o;return P.d(this,function(s){switch(s.label){case 0:return n=R(t,e),r=n.manifestUri,i=n.modelBaseUri,[4,ct(r)];case 1:return o=s.sent(),[2,a.i.loadWeights(o,i)]}})})}function pt(t,e){return void 0===e&&(e=!1),a.w(function(){var n=t.shape.slice(1),r=n[0],i=n[1];if(r===i)return t;var o=Math.abs(r-i),s=Math.round(o*(e?.5:1)),c=r>i?2:1,u=function(e){var n=t.shape.slice();return n[c]=e,a.g(n,0)},l=u(s),d=o-l.shape[c],f=[e&&d?u(d):null,t,l].filter(function(t){return!!t}).map(function(t){return t.toFloat()});return a.e(f,c)})}var mt=function(){function t(t,e){void 0===e&&(e=!1);var n=this;if(this._imageTensors=[],this._canvases=[],this._treatAsBatchInput=!1,this._inputDimensions=[],!Array.isArray(t))throw new Error("NetInput.constructor - expected inputs to be an Array of TResolvedNetInput or to be instanceof tf.Tensor4D, instead have "+t);this._treatAsBatchInput=e,this._batchSize=t.length,t.forEach(function(t,e){if(g(t))return n._imageTensors[e]=t,void(n._inputDimensions[e]=t.shape);if(b(t)){var r=t.shape[0];if(1!==r)throw new Error("NetInput - tf.Tensor4D with batchSize "+r+" passed, but not supported in input array");return n._imageTensors[e]=t,void(n._inputDimensions[e]=t.shape.slice(1))}var i=t instanceof H.getEnv().Canvas?t:J(t);n._canvases[e]=i,n._inputDimensions[e]=[i.height,i.width,3]})}return Object.defineProperty(t.prototype,"imageTensors",{get:function(){return this._imageTensors},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"canvases",{get:function(){return this._canvases},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isBatchInput",{get:function(){return this.batchSize>1||this._treatAsBatchInput},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"batchSize",{get:function(){return this._batchSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inputDimensions",{get:function(){return this._inputDimensions},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inputSize",{get:function(){return this._inputSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"reshapedInputDimensions",{get:function(){var t=this;return S(this.batchSize,0,1).map(function(e,n){return t.getReshapedInputDimensions(n)})},enumerable:!0,configurable:!0}),t.prototype.getInput=function(t){return this.canvases[t]||this.imageTensors[t]},t.prototype.getInputDimensions=function(t){return this._inputDimensions[t]},t.prototype.getInputHeight=function(t){return this._inputDimensions[t][0]},t.prototype.getInputWidth=function(t){return this._inputDimensions[t][1]},t.prototype.getReshapedInputDimensions=function(t){if("number"!=typeof this.inputSize)throw new Error("getReshapedInputDimensions - inputSize not set, toBatchTensor has not been called yet");return C({width:this.getInputWidth(t),height:this.getInputHeight(t)},this.inputSize)},t.prototype.toBatchTensor=function(t,e){var n=this;return void 0===e&&(e=!0),this._inputSize=t,a.w(function(){var r=S(n.batchSize,0,1).map(function(r){var i=n.getInput(r);if(i instanceof a.a){var o=b(i)?i:i.expandDims();return(o=pt(o,e)).shape[1]===t&&o.shape[2]===t||(o=a.h.resizeBilinear(o,[t,t])),o.as3D(t,t,3)}if(i instanceof H.getEnv().Canvas)return a.d.fromPixels(dt(i,t,e));throw new Error("toBatchTensor - at batchIdx "+r+", expected input to be instanceof tf.Tensor or instanceof HTMLCanvasElement, instead have "+i)});return a.q(r.map(function(t){return t.toFloat()})).as4D(n.batchSize,t,t,3)})},t}();function vt(t){return P.b(this,void 0,void 0,function(){var e,n,r;return P.d(this,function(i){switch(i.label){case 0:if(t instanceof mt)return[2,t];if(!(e=Array.isArray(t)?t:[t]).length)throw new Error("toNetInput - empty array passed as input");return n=function(e){return Array.isArray(t)?" at input index "+e+":":""},(r=e.map(it)).forEach(function(t,r){if(!ft(t)&&!g(t)&&!b(t)){if("string"==typeof e[r])throw new Error("toNetInput -"+n(r)+" string passed, but could not resolve HTMLElement for element id "+e[r]);throw new Error("toNetInput -"+n(r)+" expected media to be of type HTMLImageElement | HTMLVideoElement | HTMLCanvasElement | tf.Tensor3D, or to be an element id")}if(b(t)){var i=t.shape[0];if(1!==i)throw new Error("toNetInput -"+n(r)+" tf.Tensor4D with batchSize "+i+" passed, but not supported in input array")}}),[4,Promise.all(r.map(function(t){return ft(t)&&W(t)}))];case 1:return i.sent(),[2,new mt(r,Array.isArray(t))]}})})}var _t=function(){function t(t){this._name=t,this._params=void 0,this._paramMappings=[]}return Object.defineProperty(t.prototype,"params",{get:function(){return this._params},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"paramMappings",{get:function(){return this._paramMappings},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isLoaded",{get:function(){return!!this.params},enumerable:!0,configurable:!0}),t.prototype.getParamFromPath=function(t){var e=this.traversePropertyPath(t);return e.obj[e.objProp]},t.prototype.reassignParamFromPath=function(t,e){var n=this.traversePropertyPath(t),r=n.obj,i=n.objProp;r[i].dispose(),r[i]=e},t.prototype.getParamList=function(){var t=this;return this._paramMappings.map(function(e){var n=e.paramPath;return{path:n,tensor:t.getParamFromPath(n)}})},t.prototype.getTrainableParams=function(){return this.getParamList().filter(function(t){return t.tensor instanceof a.b})},t.prototype.getFrozenParams=function(){return this.getParamList().filter(function(t){return!(t.tensor instanceof a.b)})},t.prototype.variable=function(){var t=this;this.getFrozenParams().forEach(function(e){var n=e.path,r=e.tensor;t.reassignParamFromPath(n,r.variable())})},t.prototype.freeze=function(){var t=this;this.getTrainableParams().forEach(function(e){var n=e.path,r=e.tensor,i=a.s(r.dataSync());r.dispose(),t.reassignParamFromPath(n,i)})},t.prototype.dispose=function(t){void 0===t&&(t=!0),this.getParamList().forEach(function(e){if(t&&e.tensor.isDisposed)throw new Error("param tensor has already been disposed for path "+e.path);e.tensor.dispose()}),this._params=void 0},t.prototype.serializeParams=function(){return new Float32Array(this.getParamList().map(function(t){var e=t.tensor;return Array.from(e.dataSync())}).reduce(function(t,e){return t.concat(e)}))},t.prototype.load=function(t){return P.b(this,void 0,void 0,function(){return P.d(this,function(e){switch(e.label){case 0:return t instanceof Float32Array?(this.extractWeights(t),[2]):[4,this.loadFromUri(t)];case 1:return e.sent(),[2]}})})},t.prototype.loadFromUri=function(t){return P.b(this,void 0,void 0,function(){var e;return P.d(this,function(n){switch(n.label){case 0:if(t&&"string"!=typeof t)throw new Error(this._name+".loadFromUri - expected model uri");return[4,ht(t,this.getDefaultModelName())];case 1:return e=n.sent(),this.loadFromWeightMap(e),[2]}})})},t.prototype.loadFromDisk=function(t){return P.b(this,void 0,void 0,function(){var e,n,r,i,o,s,c,u,l,d;return P.d(this,function(f){switch(f.label){case 0:if(t&&"string"!=typeof t)throw new Error(this._name+".loadFromDisk - expected model file path");return e=H.getEnv().readFile,n=R(t,this.getDefaultModelName()),r=n.manifestUri,i=n.modelBaseUri,o=function(t){return Promise.all(t.map(function(t){return e(t).then(function(t){return t.buffer})}))},s=a.i.weightsLoaderFactory(o),l=(u=JSON).parse,[4,e(r)];case 1:return c=l.apply(u,[f.sent().toString()]),[4,s(c,i)];case 2:return d=f.sent(),this.loadFromWeightMap(d),[2]}})})},t.prototype.loadFromWeightMap=function(t){var e=this.extractParamsFromWeigthMap(t),n=e.paramMappings,r=e.params;this._paramMappings=n,this._params=r},t.prototype.extractWeights=function(t){var e=this.extractParams(t),n=e.paramMappings,r=e.params;this._paramMappings=n,this._params=r},t.prototype.traversePropertyPath=function(t){if(!this.params)throw new Error("traversePropertyPath - model has no loaded params");var e=t.split("/").reduce(function(e,n){if(!e.nextObj.hasOwnProperty(n))throw new Error("traversePropertyPath - object does not have property "+n+", for path "+t);return{obj:e.nextObj,objProp:n,nextObj:e.nextObj[n]}},{nextObj:this.params}),n=e.obj,r=e.objProp;if(!(n&&r&&n[r]instanceof a.a))throw new Error("traversePropertyPath - parameter is not a tensor, for path "+t);return{obj:n,objProp:r}},t}();function gt(t,e,n){void 0===n&&(n=!0);var r=Math.max(0,Math.min(t.right,e.right)-Math.max(t.left,e.left))*Math.max(0,Math.min(t.bottom,e.bottom)-Math.max(t.top,e.top));return n?r/(t.area+e.area-r):r/Math.min(t.area,e.area)}function bt(t,e,n,r){void 0===r&&(r=!0);for(var i=e.map(function(t,e){return{score:t,boxIndex:e}}).sort(function(t,e){return t.score-e.score}).map(function(t){return t.boxIndex}),a=[],o=function(){var e=i.pop();a.push(e);for(var o=i,s=[],c=0;c<o.length;c++){var u=o[c],l=t[e],d=t[u];s.push(gt(l,d,r))}i=i.filter(function(t,e){return s[e]<=n})};i.length>0;)o();return a}function yt(t,e){return a.w(function(){var n=e[0],r=e[1],i=e[2],o=a.g(t.shape.slice(0,3).concat([1]),n),s=a.g(t.shape.slice(0,3).concat([1]),r),c=a.g(t.shape.slice(0,3).concat([1]),i),u=a.e([o,s,c],3);return a.r(t,u)})}function xt(t){for(var e=t.slice(),n=e.length-1;n>0;n--){var r=Math.floor(Math.random()*(n+1)),i=e[n];e[n]=e[r],e[r]=i}return e}function wt(t){return 1/(1+Math.exp(-t))}function kt(t){return Math.log(t/(1-t))}var Ct,Et=function(t){return"number"==typeof t};function St(t){if(!t)throw new Error("invalid config: "+t);if("boolean"!=typeof t.withSeparableConvs)throw new Error("config.withSeparableConvs has to be a boolean, have: "+t.withSeparableConvs);if(!Et(t.iouThreshold)||t.iouThreshold<0||t.iouThreshold>1)throw new Error("config.iouThreshold has to be a number between [0, 1], have: "+t.iouThreshold);if(!Array.isArray(t.classes)||!t.classes.length||!t.classes.every(function(t){return"string"==typeof t}))throw new Error("config.classes has to be an array class names: string[], have: "+JSON.stringify(t.classes));if(!Array.isArray(t.anchors)||!t.anchors.length||!t.anchors.map(function(t){return t||{}}).every(function(t){return Et(t.x)&&Et(t.y)}))throw new Error("config.anchors has to be an array of { x: number, y: number }, have: "+JSON.stringify(t.anchors));if(t.meanRgb&&(!Array.isArray(t.meanRgb)||3!==t.meanRgb.length||!t.meanRgb.every(Et)))throw new Error("config.meanRgb has to be an array of shape [number, number, number], have: "+JSON.stringify(t.meanRgb))}function It(t){return a.w(function(){var e=a.k(t,a.n(.10000000149011612));return a.c(a.m(a.r(t,e)),e)})}function Mt(t,e){return a.w(function(){var n=a.l(t,[[0,0],[1,1],[1,1],[0,0]]);return n=a.f(n,e.conv.filters,[1,1],"valid"),n=a.r(n,e.bn.sub),n=a.k(n,e.bn.truediv),It(n=a.c(n,e.conv.bias))})}function Tt(t,e){return a.w(function(){var n=a.l(t,[[0,0],[1,1],[1,1],[0,0]]);return n=a.o(n,e.depthwise_filter,e.pointwise_filter,[1,1],"valid"),It(n=a.c(n,e.bias))})}function Dt(t,e){var n=c(t,e);var r=d(t,e);return{extractConvParams:n,extractConvWithBatchNormParams:function(r,i,o){return{conv:n(r,i,3,o+"/conv"),bn:function(n,r){var i=a.t(t(n)),o=a.t(t(n));return e.push({paramPath:r+"/sub"},{paramPath:r+"/truediv"}),{sub:i,truediv:o}}(i,o+"/bn")}},extractSeparableConvParams:r}}function Rt(t,e){var n=T(t,e);function r(t){return{filters:n(t+"/filters",4),bias:n(t+"/bias",1)}}return{extractConvParams:r,extractConvWithBatchNormParams:function(t){return{conv:r(t+"/conv"),bn:function(t){return{sub:n(t+"/sub",1),truediv:n(t+"/truediv",1)}}(t+"/bn")}},extractSeparableConvParams:f(n)}}!function(t){t[t.XS=224]="XS",t[t.SM=320]="SM",t[t.MD=416]="MD",t[t.LG=608]="LG"}(Ct||(Ct={}));var Pt=function(){function t(t){var e=void 0===t?{}:t,n=e.inputSize,r=e.scoreThreshold;if(this._name="TinyYolov2Options",this._inputSize=n||416,this._scoreThreshold=r||.5,"number"!=typeof this._inputSize||this._inputSize%32!=0)throw new Error(this._name+" - expected inputSize to be a number divisible by 32");if("number"!=typeof this._scoreThreshold||this._scoreThreshold<=0||this._scoreThreshold>=1)throw new Error(this._name+" - expected scoreThreshold to be a number between 0 and 1")}return Object.defineProperty(t.prototype,"inputSize",{get:function(){return this._inputSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scoreThreshold",{get:function(){return this._scoreThreshold},enumerable:!0,configurable:!0}),t}(),Ot=function(t){function e(e){var n=t.call(this,"TinyYolov2")||this;return St(e),n._config=e,n}return P.c(e,t),Object.defineProperty(e.prototype,"config",{get:function(){return this._config},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"withClassScores",{get:function(){return this.config.withClassScores||this.config.classes.length>1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"boxEncodingSize",{get:function(){return 5+(this.withClassScores?this.config.classes.length:0)},enumerable:!0,configurable:!0}),e.prototype.runTinyYolov2=function(t,e){var n=Mt(t,e.conv0);return n=Mt(n=a.j(n,[2,2],[2,2],"same"),e.conv1),n=Mt(n=a.j(n,[2,2],[2,2],"same"),e.conv2),n=Mt(n=a.j(n,[2,2],[2,2],"same"),e.conv3),n=Mt(n=a.j(n,[2,2],[2,2],"same"),e.conv4),n=Mt(n=a.j(n,[2,2],[2,2],"same"),e.conv5),o(n=Mt(n=Mt(n=a.j(n,[2,2],[1,1],"same"),e.conv6),e.conv7),e.conv8,"valid",!1)},e.prototype.runMobilenet=function(t,e){var n=this.config.isFirstLayerConv2d?It(o(t,e.conv0,"valid",!1)):Tt(t,e.conv0);return n=Tt(n=a.j(n,[2,2],[2,2],"same"),e.conv1),n=Tt(n=a.j(n,[2,2],[2,2],"same"),e.conv2),n=Tt(n=a.j(n,[2,2],[2,2],"same"),e.conv3),n=Tt(n=a.j(n,[2,2],[2,2],"same"),e.conv4),n=Tt(n=a.j(n,[2,2],[2,2],"same"),e.conv5),n=a.j(n,[2,2],[1,1],"same"),n=e.conv6?Tt(n,e.conv6):n,o(n=e.conv7?Tt(n,e.conv7):n,e.conv8,"valid",!1)},e.prototype.forwardInput=function(t,e){var n=this,r=this.params;if(!r)throw new Error("TinyYolov2 - load model before inference");return a.w(function(){var i=t.toBatchTensor(e,!1).toFloat();return i=(i=n.config.meanRgb?yt(i,n.config.meanRgb):i).div(a.n(256)),n.config.withSeparableConvs?n.runMobilenet(i,r):n.runTinyYolov2(i,r)})},e.prototype.forward=function(t,e){return P.b(this,void 0,void 0,function(){var n;return P.d(this,function(r){switch(r.label){case 0:return n=this.forwardInput,[4,vt(t)];case 1:return[4,n.apply(this,[r.sent(),e])];case 2:return[2,r.sent()]}})})},e.prototype.detect=function(t,e){return void 0===e&&(e={}),P.b(this,void 0,void 0,function(){var n,r,i,o,s,c,u,l,d,f,h,p,m,v=this;return P.d(this,function(_){switch(_.label){case 0:return n=new Pt(e),r=n.inputSize,i=n.scoreThreshold,[4,vt(t)];case 1:return o=_.sent(),[4,this.forwardInput(o,r)];case 2:return s=_.sent(),c=a.w(function(){return a.x(s)[0].expandDims()}),u={width:o.getInputWidth(0),height:o.getInputHeight(0)},[4,this.extractBoxes(c,o.getReshapedInputDimensions(0),i)];case 3:return l=_.sent(),s.dispose(),c.dispose(),d=l.map(function(t){return t.box}),f=l.map(function(t){return t.score}),h=l.map(function(t){return t.classScore}),p=l.map(function(t){return v.config.classes[t.label]}),m=bt(d.map(function(t){return t.rescale(r)}),f,this.config.iouThreshold,!0),[2,m.map(function(t){return new A(f[t],h[t],p[t],d[t],u)})]}})})},e.prototype.getDefaultModelName=function(){return""},e.prototype.extractParamsFromWeigthMap=function(t){return function(t,e){var n,r=[],i=Rt(t,r),a=i.extractConvParams,o=i.extractConvWithBatchNormParams,c=i.extractSeparableConvParams;if(e.withSeparableConvs){var u=e.filterSizes&&e.filterSizes.length||9;n={conv0:e.isFirstLayerConv2d?a("conv0"):c("conv0"),conv1:c("conv1"),conv2:c("conv2"),conv3:c("conv3"),conv4:c("conv4"),conv5:c("conv5"),conv6:u>7?c("conv6"):void 0,conv7:u>8?c("conv7"):void 0,conv8:a("conv8")}}else n={conv0:o("conv0"),conv1:o("conv1"),conv2:o("conv2"),conv3:o("conv3"),conv4:o("conv4"),conv5:o("conv5"),conv6:o("conv6"),conv7:o("conv7"),conv8:a("conv8")};return s(t,r),{params:n,paramMappings:r}}(t,this.config)},e.prototype.extractParams=function(t){var n=this.config.filterSizes||e.DEFAULT_FILTER_SIZES,r=n?n.length:void 0;if(7!==r&&8!==r&&9!==r)throw new Error("TinyYolov2 - expected 7 | 8 | 9 convolutional filters, but found "+r+" filterSizes in config");return function(t,e,n,r){var i,a=D(t),o=a.extractWeights,s=a.getRemainingWeights,c=[],u=Dt(o,c),l=u.extractConvParams,d=u.extractConvWithBatchNormParams,f=u.extractSeparableConvParams;if(e.withSeparableConvs){var h=r[0],p=r[1],m=r[2],v=r[3],_=r[4],g=r[5],b=r[6],y=r[7],x=r[8];i={conv0:e.isFirstLayerConv2d?l(h,p,3,"conv0"):f(h,p,"conv0"),conv1:f(p,m,"conv1"),conv2:f(m,v,"conv2"),conv3:f(v,_,"conv3"),conv4:f(_,g,"conv4"),conv5:f(g,b,"conv5"),conv6:y?f(b,y,"conv6"):void 0,conv7:x?f(y,x,"conv7"):void 0,conv8:l(x||y||b,5*n,1,"conv8")}}else h=r[0],p=r[1],m=r[2],v=r[3],_=r[4],g=r[5],b=r[6],y=r[7],x=r[8],i={conv0:d(h,p,"conv0"),conv1:d(p,m,"conv1"),conv2:d(m,v,"conv2"),conv3:d(v,_,"conv3"),conv4:d(_,g,"conv4"),conv5:d(g,b,"conv5"),conv6:d(b,y,"conv6"),conv7:d(y,x,"conv7"),conv8:l(x,5*n,1,"conv8")};if(0!==s().length)throw new Error("weights remaing after extract: "+s().length);return{params:i,paramMappings:c}}(t,this.config,this.boxEncodingSize,n)},e.prototype.extractBoxes=function(t,e,n){return P.b(this,void 0,void 0,function(){var r,i,o,s,c,u,l,d,f,h,p,m,v,_,g,b,y,x,w,k,C,E,S,I,M,T,D,R,O,A=this;return P.d(this,function(N){switch(N.label){case 0:return r=e.width,i=e.height,o=Math.max(r,i),s=o/r,c=o/i,u=t.shape[1],l=this.config.anchors.length,d=a.w(function(){var e=t.reshape([u,u,l,A.boxEncodingSize]);return[e.slice([0,0,0,0],[u,u,l,4]),e.slice([0,0,0,4],[u,u,l,1]),A.withClassScores?a.p(e.slice([0,0,0,5],[u,u,l,A.config.classes.length]),3):a.n(0)]}),f=d[0],h=d[1],p=d[2],m=[],[4,h.array()];case 1:return v=N.sent(),[4,f.array()];case 2:_=N.sent(),g=0,N.label=3;case 3:if(!(g<u))return[3,12];b=0,N.label=4;case 4:if(!(b<u))return[3,11];y=0,N.label=5;case 5:return y<l?(x=wt(v[g][b][y][0]),!n||x>n?(w=(b+wt(_[g][b][y][0]))/u*s,k=(g+wt(_[g][b][y][1]))/u*c,C=Math.exp(_[g][b][y][2])*this.config.anchors[y].x/u*s,E=Math.exp(_[g][b][y][3])*this.config.anchors[y].y/u*c,S=w-C/2,I=k-E/2,M={row:g,col:b,anchor:y},this.withClassScores?[4,this.extractPredictedClass(p,M)]:[3,7]):[3,9]):[3,10];case 6:return O=N.sent(),[3,8];case 7:O={classScore:1,label:0},N.label=8;case 8:D=(T=O).classScore,R=T.label,m.push(P.a({box:new L(S,I,S+C,I+E),score:x,classScore:x*D,label:R},M)),N.label=9;case 9:return y++,[3,5];case 10:return b++,[3,4];case 11:return g++,[3,3];case 12:return f.dispose(),h.dispose(),p.dispose(),[2,m]}})})},e.prototype.extractPredictedClass=function(t,e){return P.b(this,void 0,void 0,function(){var n,r,i,a;return P.d(this,function(o){switch(o.label){case 0:return n=e.row,r=e.col,i=e.anchor,[4,t.array()];case 1:return a=o.sent(),[2,Array(this.config.classes.length).fill(0).map(function(t,e){return a[n][r][i][e]}).map(function(t,e){return{classScore:t,label:e}}).reduce(function(t,e){return t.classScore>e.classScore?t:e})]}})})},e.DEFAULT_FILTER_SIZES=[3,16,32,64,128,256,512,1024,1024],e}(_t),Lt=function(t){function e(e,n,r,i){return t.call(this,{x:e,y:n,width:r,height:i})||this}return P.c(e,t),e}(O),At=function(t){function e(e,n,r){return t.call(this,e,e,"",n,r)||this}return P.c(e,t),e.prototype.forSize=function(e,n){return t.prototype.forSize.call(this,e,n)},e}(A),Nt=function(){function t(t,e,n){void 0===n&&(n=new p(0,0));var r=e.width,i=e.height;this._imgDims=new h(r,i),this._shift=n,this._positions=t.map(function(t){return t.mul(new p(r,i)).add(n)})}return Object.defineProperty(t.prototype,"shift",{get:function(){return new p(this._shift.x,this._shift.y)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageWidth",{get:function(){return this._imgDims.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageHeight",{get:function(){return this._imgDims.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"positions",{get:function(){return this._positions},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"relativePositions",{get:function(){var t=this;return this._positions.map(function(e){return e.sub(t._shift).div(new p(t.imageWidth,t.imageHeight))})},enumerable:!0,configurable:!0}),t.prototype.forSize=function(t,e){return new this.constructor(this.relativePositions,{width:t,height:e})},t.prototype.shiftBy=function(t,e){return new this.constructor(this.relativePositions,this._imgDims,new p(t,e))},t.prototype.shiftByPoint=function(t){return this.shiftBy(t.x,t.y)},t.prototype.align=function(t){if(t){var e=t instanceof At?t.box.floor():t;return this.shiftBy(e.x,e.y).align()}var n=this.getRefPointsForAlignment(),r=n[0],i=n[1],a=n[2],o=function(t){return a.sub(t).magnitude()},s=(o(r)+o(i))/2,c=Math.floor(s/.45),u=E(n),l=Math.floor(Math.max(0,u.x-.5*c)),d=Math.floor(Math.max(0,u.y-.43*c));return new Lt(l,d,Math.min(c,this.imageWidth+l),Math.min(c,this.imageHeight+d))},t.prototype.getRefPointsForAlignment=function(){throw new Error("getRefPointsForAlignment not implemented by base class")},t}(),Bt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return P.c(e,t),e.prototype.getRefPointsForAlignment=function(){var t=this.positions;return[t[0],t[1],E([t[3],t[4]])]},e}(Nt),jt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return P.c(e,t),e.prototype.getJawOutline=function(){return this.positions.slice(0,17)},e.prototype.getLeftEyeBrow=function(){return this.positions.slice(17,22)},e.prototype.getRightEyeBrow=function(){return this.positions.slice(22,27)},e.prototype.getNose=function(){return this.positions.slice(27,36)},e.prototype.getLeftEye=function(){return this.positions.slice(36,42)},e.prototype.getRightEye=function(){return this.positions.slice(42,48)},e.prototype.getMouth=function(){return this.positions.slice(48,68)},e.prototype.getRefPointsForAlignment=function(){return[this.getLeftEye(),this.getRightEye(),this.getMouth()].map(E)},e}(Nt),Ft=function(){function t(t,e){this._label=t,this._distance=e}return Object.defineProperty(t.prototype,"label",{get:function(){return this._label},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"distance",{get:function(){return this._distance},enumerable:!0,configurable:!0}),t.prototype.toString=function(t){return void 0===t&&(t=!0),this.label+(t?" ("+w(this.distance)+")":"")},t}(),Yt=function(){function t(t,e){if("string"!=typeof t)throw new Error("LabeledFaceDescriptors - constructor expected label to be a string");if(!Array.isArray(e)||e.some(function(t){return!(t instanceof Float32Array)}))throw new Error("LabeledFaceDescriptors - constructor expected descriptors to be an array of Float32Array");this._label=t,this._descriptors=e}return Object.defineProperty(t.prototype,"label",{get:function(){return this._label},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"descriptors",{get:function(){return this._descriptors},enumerable:!0,configurable:!0}),t}();function $t(t,e,n){if(void 0===n&&(n=!1),t.beginPath(),e.slice(1).forEach(function(n,r){var i=n.x,a=n.y,o=e[r];t.moveTo(o.x,o.y),t.lineTo(i,a)}),n){var r=e[e.length-1],i=e[0];if(!r||!i)return;t.moveTo(r.x,r.y),t.lineTo(i.x,i.y)}t.stroke()}function zt(t,e,n){var r=it(t);if(!(r instanceof H.getEnv().Canvas))throw new Error("drawLandmarks - expected canvas to be of type: HTMLCanvasElement");var i=Object.assign(Z(n),n||{}),a=Object.assign({drawLines:!1},n||{}).drawLines,o=G(r),s=i.lineWidth,c=i.color,u=void 0===c?"blue":c;(Array.isArray(e)?e:[e]).forEach(function(t){if(a&&t instanceof jt)return o.strokeStyle=u,o.lineWidth=s,$t(o,t.getJawOutline()),$t(o,t.getLeftEyeBrow()),$t(o,t.getRightEyeBrow()),$t(o,t.getNose()),$t(o,t.getLeftEye(),!0),$t(o,t.getRightEye(),!0),void $t(o,t.getMouth(),!0);var e=s/2;o.fillStyle=u,t.positions.forEach(function(t){return o.fillRect(t.x-e,t.y-e,s,s)})})}function Vt(t,e,n){var r=it(t);if(!(r instanceof H.getEnv().Canvas))throw new Error("drawFaceExpressions - expected canvas to be of type: HTMLCanvasElement");var i=Object.assign(Z(n),n||{}),a=G(r),o=i.primaryColor,s=void 0===o?"red":o,c=i.secondaryColor,u=void 0===c?"blue":c,l=i.primaryFontSize,d=void 0===l?22:l,f=i.secondaryFontSize,h=void 0===f?16:f,p=i.minConfidence,m=void 0===p?.2:p;(Array.isArray(e)?e:[e]).forEach(function(t){var e=t.position,n=t.expressions,i=e.x,o=e.y,c=e.height||0,l=n.sort(function(t,e){return e.probability-t.probability}).filter(function(t){return t.probability>m}),f=o+c+l.length*d>r.height?-l.length*d:0;l.forEach(function(t,e){var n=t.expression+" ("+w(t.probability)+")";rt(a,i,o+c+e*d+f,n,{textColor:0===e?s:u,fontSize:0===e?d:h})})})}function Ht(t,e){return P.b(this,void 0,void 0,function(){var n,r,i,a,o,s;return P.d(this,function(c){switch(c.label){case 0:return n=H.getEnv().Canvas,r=t,t instanceof n?[3,5]:[4,vt(t)];case 1:if((i=c.sent()).batchSize>1)throw new Error("extractFaces - batchSize > 1 not supported");return(a=i.getInput(0))instanceof n?(o=a,[3,4]):[3,2];case 2:return[4,lt(a)];case 3:o=c.sent(),c.label=4;case 4:r=o,c.label=5;case 5:return s=G(r),[2,e.map(function(t){return t instanceof At?t.forSize(r.width,r.height).box.floor():t}).map(function(t){return t.clipAtImageBorders(r.width,r.height)}).map(function(t){var e=t.x,n=t.y,r=t.width,i=t.height,a=X({width:r,height:i});return G(a).putImageData(s.getImageData(e,n,r,i),0,0),a})]}})})}function qt(t,e){return P.b(this,void 0,void 0,function(){return P.d(this,function(n){if(!g(t)&&!b(t))throw new Error("extractFaceTensors - expected image tensor to be 3D or 4D");if(b(t)&&t.shape[0]>1)throw new Error("extractFaceTensors - batchSize > 1 not supported");return[2,i.H(function(){var n=t.shape.slice(b(t)?1:0),r=n[0],a=n[1],o=n[2];return e.map(function(t){return t instanceof At?t.forSize(a,r).box:t}).map(function(t){return t.clipAtImageBorders(a,r)}).map(function(e){var n=e.x,s=e.y,c=e.width,u=e.height;return i.z(t.as3D(r,a,o),[s,n,0],[u,c,o])})})]})})}function Wt(t,e,n){return i.H(function(){var r=i.w(t,e.depthwise_filter,e.pointwise_filter,n,"same");return r=i.b(r,e.bias)})}function Ut(t,e,n){return void 0===n&&(n=!1),i.H(function(){var r=i.t(n?i.b(i.h(t,e.conv0.filters,[2,2],"same"),e.conv0.bias):Wt(t,e.conv0,[2,2])),a=Wt(r,e.conv1,[1,1]),o=Wt(i.t(i.b(r,a)),e.conv2,[1,1]);return i.t(i.b(r,i.b(a,o)))})}function Gt(t,e,n,r){return void 0===n&&(n=!1),void 0===r&&(r=!0),i.H(function(){var a=i.t(n?i.b(i.h(t,e.conv0.filters,r?[2,2]:[1,1],"same"),e.conv0.bias):Wt(t,e.conv0,r?[2,2]:[1,1])),o=Wt(a,e.conv1,[1,1]),s=Wt(i.t(i.b(a,o)),e.conv2,[1,1]),c=Wt(i.t(i.b(a,i.b(o,s))),e.conv3,[1,1]);return i.t(i.b(a,i.b(o,i.b(s,c))))})}function Kt(t,e){function n(n,a,o){var s=i.G(t(9*n),[3,3,n,1]),c=i.G(t(n*a),[1,1,n,a]),u=i.D(t(a));return e.push({paramPath:o+"/depthwise_filter"},{paramPath:o+"/pointwise_filter"},{paramPath:o+"/bias"}),new r.SeparableConvParams(s,c,u)}var a=r.extractConvParamsFactory(t,e);function o(t,e,r,i){return void 0===i&&(i=!1),{conv0:i?a(t,e,3,r+"/conv0"):n(t,e,r+"/conv0"),conv1:n(e,e,r+"/conv1"),conv2:n(e,e,r+"/conv2")}}return{extractDenseBlock3Params:o,extractDenseBlock4Params:function(t,e,r,i){void 0===i&&(i=!1);var a=o(t,e,r,i);return{conv0:a.conv0,conv1:a.conv1,conv2:a.conv2,conv3:n(e,e,r+"/conv3")}}}}function Xt(t,e){var n=r.extractWeightEntryFactory(t,e);function i(t){return{filters:n(t+"/filters",4),bias:n(t+"/bias",1)}}function a(t){var e=n(t+"/depthwise_filter",4),i=n(t+"/pointwise_filter",4),a=n(t+"/bias",1);return new r.SeparableConvParams(e,i,a)}return{extractDenseBlock3Params:function(t,e){return void 0===e&&(e=!1),{conv0:e?i(t+"/conv0"):a(t+"/conv0"),conv1:a(t+"/conv1"),conv2:a(t+"/conv2")}},extractDenseBlock4Params:function(t,e){return void 0===e&&(e=!1),{conv0:e?i(t+"/conv0"):a(t+"/conv0"),conv1:a(t+"/conv1"),conv2:a(t+"/conv2"),conv3:a(t+"/conv3")}}}}var Jt=function(t){function e(){return t.call(this,"FaceFeatureExtractor")||this}return P.c(e,t),e.prototype.forwardInput=function(t){var e=this.params;if(!e)throw new Error("FaceFeatureExtractor - load model before inference");return i.H(function(){var n=Gt(yt(t.toBatchTensor(112,!0),[122.782,117.001,104.298]).div(i.v(255)),e.dense0,!0);return n=Gt(n=Gt(n=Gt(n,e.dense1),e.dense2),e.dense3),n=i.c(n,[7,7],[2,2],"valid")})},e.prototype.forward=function(t){return P.b(this,void 0,void 0,function(){var e;return P.d(this,function(n){switch(n.label){case 0:return e=this.forwardInput,[4,vt(t)];case 1:return[2,e.apply(this,[n.sent()])]}})})},e.prototype.getDefaultModelName=function(){return"face_feature_extractor_model"},e.prototype.extractParamsFromWeigthMap=function(t){return function(t){var e=[],n=Xt(t,e).extractDenseBlock4Params,i={dense0:n("dense0",!0),dense1:n("dense1"),dense2:n("dense2"),dense3:n("dense3")};return r.disposeUnusedWeightTensors(t,e),{params:i,paramMappings:e}}(t)},e.prototype.extractParams=function(t){return function(t){var e=[],n=r.extractWeightsFactory(t),i=n.extractWeights,a=n.getRemainingWeights,o=Kt(i,e).extractDenseBlock4Params,s=o(3,32,"dense0",!0),c=o(32,64,"dense1"),u=o(64,128,"dense2"),l=o(128,256,"dense3");if(0!==a().length)throw new Error("weights remaing after extract: "+a().length);return{paramMappings:e,params:{dense0:s,dense1:c,dense2:u,dense3:l}}}(t)},e}(_t);function Zt(t,e){return i.H(function(){return i.b(i.o(t,e.weights),e.bias)})}var Qt=function(t){function e(e,n){var r=t.call(this,e)||this;return r._faceFeatureExtractor=n,r}return P.c(e,t),Object.defineProperty(e.prototype,"faceFeatureExtractor",{get:function(){return this._faceFeatureExtractor},enumerable:!0,configurable:!0}),e.prototype.runNet=function(t){var e=this,n=this.params;if(!n)throw new Error(this._name+" - load model before inference");return i.H(function(){var r=t instanceof mt?e.faceFeatureExtractor.forwardInput(t):t;return Zt(r.as2D(r.shape[0],-1),n.fc)})},e.prototype.dispose=function(e){void 0===e&&(e=!0),this.faceFeatureExtractor.dispose(e),t.prototype.dispose.call(this,e)},e.prototype.loadClassifierParams=function(t){var e=this.extractClassifierParams(t),n=e.params,r=e.paramMappings;this._params=n,this._paramMappings=r},e.prototype.extractClassifierParams=function(t){return function(t,e,n){var i=[],a=r.extractWeightsFactory(t),o=a.extractWeights,s=a.getRemainingWeights,c=r.extractFCParamsFactory(o,i)(e,n,"fc");if(0!==s().length)throw new Error("weights remaing after extract: "+s().length);return{paramMappings:i,params:{fc:c}}}(t,this.getClassifierChannelsIn(),this.getClassifierChannelsOut())},e.prototype.extractParamsFromWeigthMap=function(t){var e=function(t){var e={},n={};return Object.keys(t).forEach(function(r){(r.startsWith("fc")?n:e)[r]=t[r]}),{featureExtractorMap:e,classifierMap:n}}(t),n=e.featureExtractorMap,i=e.classifierMap;return this.faceFeatureExtractor.loadFromWeightMap(n),function(t){var e,n=[],i=r.extractWeightEntryFactory(t,n),a={fc:(e="fc",{weights:i(e+"/weights",2),bias:i(e+"/bias",1)})};return r.disposeUnusedWeightTensors(t,n),{params:a,paramMappings:n}}(i)},e.prototype.extractParams=function(t){var e=this.getClassifierChannelsIn(),n=this.getClassifierChannelsOut(),r=n*e+n,i=t.slice(0,t.length-r),a=t.slice(t.length-r);return this.faceFeatureExtractor.extractWeights(i),this.extractClassifierParams(a)},e}(_t),te={neutral:0,happy:1,sad:2,angry:3,fearful:4,disgusted:5,surprised:6},ee=function(t){function e(e){return void 0===e&&(e=new Jt),t.call(this,"FaceExpressionNet",e)||this}return P.c(e,t),e.getFaceExpressionLabel=function(t){var e=te[t];if("number"!=typeof e)throw new Error("getFaceExpressionLabel - no label for faceExpression: "+t);return e},e.decodeProbabilites=function(t){if(7!==t.length)throw new Error("decodeProbabilites - expected probabilities.length to be 7, have: "+t.length);return Object.keys(te).map(function(e){return{expression:e,probability:t[te[e]]}})},e.prototype.forwardInput=function(t){var e=this;return i.H(function(){return i.A(e.runNet(t))})},e.prototype.forward=function(t){return P.b(this,void 0,void 0,function(){var e;return P.d(this,function(n){switch(n.label){case 0:return e=this.forwardInput,[4,vt(t)];case 1:return[2,e.apply(this,[n.sent()])]}})})},e.prototype.predictExpressions=function(t){return P.b(this,void 0,void 0,function(){var n,r,a,o,s=this;return P.d(this,function(c){switch(c.label){case 0:return[4,vt(t)];case 1:return n=c.sent(),[4,this.forwardInput(n)];case 2:return r=c.sent(),[4,Promise.all(i.K(r).map(function(t){return P.b(s,void 0,void 0,function(){var e;return P.d(this,function(n){switch(n.label){case 0:return[4,t.data()];case 1:return e=n.sent(),t.dispose(),[2,e]}})})}))];case 3:return a=c.sent(),r.dispose(),o=a.map(function(t){return e.decodeProbabilites(t)}),[2,n.isBatchInput?o:o[0]]}})})},e.prototype.getDefaultModelName=function(){return"face_expression_model"},e.prototype.getClassifierChannelsIn=function(){return 256},e.prototype.getClassifierChannelsOut=function(){return 7},e}(Qt),ne=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return P.c(e,t),e.prototype.postProcess=function(t,e,n){var r=n.map(function(t){var n=t.width,r=t.height,i=e/Math.max(r,n);return{width:n*i,height:r*i}}),a=r.length;return i.H(function(){var n=function(t,e){return i.B([i.m([68],t),i.m([68],e)],1).as2D(1,136).as1D()},o=function(t,e){var n=r[t],i=n.width,a=n.height;return e(i,a)?Math.abs(i-a)/2:0};return t.mul(i.m([a,136],e)).sub(i.B(Array.from(Array(a),function(t,e){return n(function(t){return o(t,function(t,e){return t<e})}(e),function(t){return o(t,function(t,e){return e<t})}(e))}))).div(i.B(Array.from(Array(a),function(t,e){return n(r[e].width,r[e].height)})))})},e.prototype.forwardInput=function(t){var e=this;return i.H(function(){var n=e.runNet(t);return e.postProcess(n,t.inputSize,t.inputDimensions.map(function(t){return{height:t[0],width:t[1]}}))})},e.prototype.forward=function(t){return P.b(this,void 0,void 0,function(){var e;return P.d(this,function(n){switch(n.label){case 0:return e=this.forwardInput,[4,vt(t)];case 1:return[2,e.apply(this,[n.sent()])]}})})},e.prototype.detectLandmarks=function(t){return P.b(this,void 0,void 0,function(){var e,n,r,a=this;return P.d(this,function(o){switch(o.label){case 0:return[4,vt(t)];case 1:return e=o.sent(),n=i.H(function(){return i.K(a.forwardInput(e))}),[4,Promise.all(n.map(function(t,n){return P.b(a,void 0,void 0,function(){var r,i,a,o,s;return P.d(this,function(c){switch(c.label){case 0:return a=(i=Array).from,[4,t.data()];case 1:return r=a.apply(i,[c.sent()]),o=r.filter(function(t,e){return x(e)}),s=r.filter(function(t,e){return!x(e)}),[2,new jt(Array(68).fill(0).map(function(t,e){return new p(o[e],s[e])}),{height:e.getInputHeight(n),width:e.getInputWidth(n)})]}})})}))];case 2:return r=o.sent(),n.forEach(function(t){return t.dispose()}),[2,e.isBatchInput?r:r[0]]}})})},e.prototype.getClassifierChannelsOut=function(){return 136},e}(Qt),re=function(t){function e(e){return void 0===e&&(e=new Jt),t.call(this,"FaceLandmark68Net",e)||this}return P.c(e,t),e.prototype.getDefaultModelName=function(){return"face_landmark_68_model"},e.prototype.getClassifierChannelsIn=function(){return 256},e}(ne);var ie=function(t){function e(){return t.call(this,"TinyFaceFeatureExtractor")||this}return P.c(e,t),e.prototype.forwardInput=function(t){var e=this.params;if(!e)throw new Error("TinyFaceFeatureExtractor - load model before inference");return i.H(function(){var n=Ut(yt(t.toBatchTensor(112,!0),[122.782,117.001,104.298]).div(i.v(255)),e.dense0,!0);return n=Ut(n=Ut(n,e.dense1),e.dense2),n=i.c(n,[14,14],[2,2],"valid")})},e.prototype.forward=function(t){return P.b(this,void 0,void 0,function(){var e;return P.d(this,function(n){switch(n.label){case 0:return e=this.forwardInput,[4,vt(t)];case 1:return[2,e.apply(this,[n.sent()])]}})})},e.prototype.getDefaultModelName=function(){return"face_feature_extractor_tiny_model"},e.prototype.extractParamsFromWeigthMap=function(t){return function(t){var e=[],n=Xt(t,e).extractDenseBlock3Params,i={dense0:n("dense0",!0),dense1:n("dense1"),dense2:n("dense2")};return r.disposeUnusedWeightTensors(t,e),{params:i,paramMappings:e}}(t)},e.prototype.extractParams=function(t){return function(t){var e=[],n=r.extractWeightsFactory(t),i=n.extractWeights,a=n.getRemainingWeights,o=Kt(i,e).extractDenseBlock3Params,s=o(3,32,"dense0",!0),c=o(32,64,"dense1"),u=o(64,128,"dense2");if(0!==a().length)throw new Error("weights remaing after extract: "+a().length);return{paramMappings:e,params:{dense0:s,dense1:c,dense2:u}}}(t)},e}(_t),ae=function(t){function e(e){return void 0===e&&(e=new ie),t.call(this,"FaceLandmark68TinyNet",e)||this}return P.c(e,t),e.prototype.getDefaultModelName=function(){return"face_landmark_68_tiny_model"},e.prototype.getClassifierChannelsIn=function(){return 128},e}(ne),oe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return P.c(e,t),e}(re);function se(t,e,n,r,a){void 0===a&&(a="same");var o=e.conv,s=o.filters,c=o.bias,u=i.h(t,s,n,a);return u=function(t,e){return i.b(i.r(t,e.weights),e.biases)}(u=i.b(u,c),e.scale),r?i.t(u):u}function ce(t,e){return se(t,e,[1,1],!1)}function ue(t,e){return se(t,e,[2,2],!0,"valid")}function le(t,e){function n(n,r,a,o){var s=function(e,n,r){var a=t(e),o=a.length/(n*r*r);if(y(o))throw new Error("depth has to be an integer: "+o+", weights.length: "+a.length+", numFilters: "+n+", filterSize: "+r);return i.H(function(){return i.J(i.G(a,[n,o,r,r]),[2,3,1,0])})}(n,r,a),c=i.D(t(r));return e.push({paramPath:o+"/filters"},{paramPath:o+"/bias"}),{filters:s,bias:c}}function r(r,a,o,s){return{conv:n(r,a,o,s+"/conv"),scale:function(n,r){var a=i.D(t(n)),o=i.D(t(n));return e.push({paramPath:r+"/weights"},{paramPath:r+"/biases"}),{weights:a,biases:o}}(a,s+"/scale")}}return{extractConvLayerParams:r,extractResidualLayerParams:function(t,e,n,i,a){return void 0===a&&(a=!1),{conv1:r((a?.5:1)*t,e,n,i+"/conv1"),conv2:r(t,e,n,i+"/conv2")}}}}function de(t,e){var n=r.extractWeightEntryFactory(t,e);function i(t){return{conv:{filters:n(t+"/conv/filters",4),bias:n(t+"/conv/bias",1)},scale:function(t){return{weights:n(t+"/scale/weights",1),biases:n(t+"/scale/biases",1)}}(t)}}return{extractConvLayerParams:i,extractResidualLayerParams:function(t){return{conv1:i(t+"/conv1"),conv2:i(t+"/conv2")}}}}function fe(t,e){var n=function(t,e){return se(t,e,[1,1],!0)}(t,e.conv1);return n=ce(n,e.conv2),n=i.b(n,t),n=i.t(n)}function he(t,e){var n=ue(t,e.conv1);n=ce(n,e.conv2);var r=i.c(t,2,2,"valid"),a=i.L(r.shape),o=r.shape[3]!==n.shape[3];if(r.shape[1]!==n.shape[1]||r.shape[2]!==n.shape[2]){var s=n.shape.slice();s[1]=1;var c=i.L(s),u=(n=i.g([n,c],1)).shape.slice();u[2]=1;var l=i.L(u);n=i.g([n,l],2)}return r=o?i.g([r,a],3):r,n=i.b(r,n),n=i.t(n)}var pe=function(t){function e(){return t.call(this,"FaceRecognitionNet")||this}return P.c(e,t),e.prototype.forwardInput=function(t){var e=this.params;if(!e)throw new Error("FaceRecognitionNet - load model before inference");return i.H(function(){var n=ue(yt(t.toBatchTensor(150,!0).toFloat(),[122.782,117.001,104.298]).div(i.v(256)),e.conv32_down),r=(n=he(n=fe(n=fe(n=he(n=fe(n=fe(n=he(n=fe(n=fe(n=fe(n=he(n=fe(n=fe(n=fe(n=i.q(n,3,2,"valid"),e.conv32_1),e.conv32_2),e.conv32_3),e.conv64_down),e.conv64_1),e.conv64_2),e.conv64_3),e.conv128_down),e.conv128_1),e.conv128_2),e.conv256_down),e.conv256_1),e.conv256_2),e.conv256_down_out)).mean([1,2]);return i.o(r,e.fc)})},e.prototype.forward=function(t){return P.b(this,void 0,void 0,function(){var e;return P.d(this,function(n){switch(n.label){case 0:return e=this.forwardInput,[4,vt(t)];case 1:return[2,e.apply(this,[n.sent()])]}})})},e.prototype.computeFaceDescriptor=function(t){return P.b(this,void 0,void 0,function(){var e,n,r,a=this;return P.d(this,function(o){switch(o.label){case 0:return[4,vt(t)];case 1:return e=o.sent(),n=i.H(function(){return i.K(a.forwardInput(e))}),[4,Promise.all(n.map(function(t){return t.data()}))];case 2:return r=o.sent(),n.forEach(function(t){return t.dispose()}),[2,e.isBatchInput?r:r[0]]}})})},e.prototype.getDefaultModelName=function(){return"face_recognition_model"},e.prototype.extractParamsFromWeigthMap=function(t){return function(t){var e=[],n=de(t,e),i=n.extractConvLayerParams,a=n.extractResidualLayerParams,o=i("conv32_down"),s=a("conv32_1"),c=a("conv32_2"),u=a("conv32_3"),l=a("conv64_down"),d=a("conv64_1"),f=a("conv64_2"),h=a("conv64_3"),p=a("conv128_down"),m=a("conv128_1"),v=a("conv128_2"),g=a("conv256_down"),b=a("conv256_1"),y=a("conv256_2"),x=a("conv256_down_out"),w=t.fc;if(e.push({originalPath:"fc",paramPath:"fc"}),!_(w))throw new Error("expected weightMap[fc] to be a Tensor2D, instead have "+w);var k={conv32_down:o,conv32_1:s,conv32_2:c,conv32_3:u,conv64_down:l,conv64_1:d,conv64_2:f,conv64_3:h,conv128_down:p,conv128_1:m,conv128_2:v,conv256_down:g,conv256_1:b,conv256_2:y,conv256_down_out:x,fc:w};return r.disposeUnusedWeightTensors(t,e),{params:k,paramMappings:e}}(t)},e.prototype.extractParams=function(t){return function(t){var e=r.extractWeightsFactory(t),n=e.extractWeights,a=e.getRemainingWeights,o=[],s=le(n,o),c=s.extractConvLayerParams,u=s.extractResidualLayerParams,l=c(4704,32,7,"conv32_down"),d=u(9216,32,3,"conv32_1"),f=u(9216,32,3,"conv32_2"),h=u(9216,32,3,"conv32_3"),p=u(36864,64,3,"conv64_down",!0),m=u(36864,64,3,"conv64_1"),v=u(36864,64,3,"conv64_2"),_=u(36864,64,3,"conv64_3"),g=u(147456,128,3,"conv128_down",!0),b=u(147456,128,3,"conv128_1"),y=u(147456,128,3,"conv128_2"),x=u(589824,256,3,"conv256_down",!0),w=u(589824,256,3,"conv256_1"),k=u(589824,256,3,"conv256_2"),C=u(589824,256,3,"conv256_down_out"),E=i.H(function(){return i.J(i.E(n(32768),[128,256]),[1,0])});if(o.push({paramPath:"fc"}),0!==a().length)throw new Error("weights remaing after extract: "+a().length);return{params:{conv32_down:l,conv32_1:d,conv32_2:f,conv32_3:h,conv64_down:p,conv64_1:m,conv64_2:v,conv64_3:_,conv128_down:g,conv128_1:b,conv128_2:y,conv256_down:x,conv256_1:w,conv256_2:k,conv256_down_out:C,fc:E},paramMappings:o}}(t)},e}(_t);function me(t){var e=new pe;return e.extractWeights(t),e}function ve(t,e){var n={descriptor:e};return Object.assign({},t,n)}function _e(t,e){var n={detection:e};return Object.assign({},t,n)}function ge(t,e){var n={expressions:e};return Object.assign({},t,n)}function be(t,e){var n=t.detection.box,r=e.shiftBy(n.x,n.y),i=r.align(),a=t.detection.imageDims,o={landmarks:r,unshiftedLandmarks:e,alignedRect:new At(t.detection.score,i.rescale(a.reverse()),a)};return Object.assign({},t,o)}var ye=function(){function t(t){var e=void 0===t?{}:t,n=e.minFaceSize,r=e.scaleFactor,i=e.maxNumScales,a=e.scoreThresholds,o=e.scaleSteps;if(this._name="MtcnnOptions",this._minFaceSize=n||20,this._scaleFactor=r||.709,this._maxNumScales=i||10,this._scoreThresholds=a||[.6,.7,.7],this._scaleSteps=o,"number"!=typeof this._minFaceSize||this._minFaceSize<0)throw new Error(this._name+" - expected minFaceSize to be a number > 0");if("number"!=typeof this._scaleFactor||this._scaleFactor<=0||this._scaleFactor>=1)throw new Error(this._name+" - expected scaleFactor to be a number between 0 and 1");if("number"!=typeof this._maxNumScales||this._maxNumScales<0)throw new Error(this._name+" - expected maxNumScales to be a number > 0");if(!Array.isArray(this._scoreThresholds)||3!==this._scoreThresholds.length||this._scoreThresholds.some(function(t){return"number"!=typeof t}))throw new Error(this._name+" - expected scoreThresholds to be an array of numbers of length 3");if(this._scaleSteps&&(!Array.isArray(this._scaleSteps)||this._scaleSteps.some(function(t){return"number"!=typeof t})))throw new Error(this._name+" - expected scaleSteps to be an array of numbers")}return Object.defineProperty(t.prototype,"minFaceSize",{get:function(){return this._minFaceSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scaleFactor",{get:function(){return this._scaleFactor},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxNumScales",{get:function(){return this._maxNumScales},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scoreThresholds",{get:function(){return this._scoreThresholds},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scaleSteps",{get:function(){return this._scaleSteps},enumerable:!0,configurable:!0}),t}();function xe(t,e){function n(n,r,a,o,s){var c=i.G(t(n*r*a*a),[a,a,n,r]),u=i.D(t(r));return e.push({paramPath:o+"/filters"},{paramPath:o+"/"+(s?"batch_norm_offset":"bias")}),{filters:c,bias:u}}function r(t,e,r,i){var a=n(t,e,r,i,!0);return{filters:a.filters,batch_norm_offset:a.bias}}function a(n,a,o){return{depthwise_conv:function(n,r){var a=i.G(t(9*n),[3,3,n,1]),o=i.D(t(n)),s=i.D(t(n)),c=i.D(t(n)),u=i.D(t(n));return e.push({paramPath:r+"/filters"},{paramPath:r+"/batch_norm_scale"},{paramPath:r+"/batch_norm_offset"},{paramPath:r+"/batch_norm_mean"},{paramPath:r+"/batch_norm_variance"}),{filters:a,batch_norm_scale:o,batch_norm_offset:s,batch_norm_mean:c,batch_norm_variance:u}}(n,o+"/depthwise_conv"),pointwise_conv:r(n,a,1,o+"/pointwise_conv")}}return{extractMobilenetV1Params:function(){return{conv_0:r(3,32,3,"mobilenetv1/conv_0"),conv_1:a(32,64,"mobilenetv1/conv_1"),conv_2:a(64,128,"mobilenetv1/conv_2"),conv_3:a(128,128,"mobilenetv1/conv_3"),conv_4:a(128,256,"mobilenetv1/conv_4"),conv_5:a(256,256,"mobilenetv1/conv_5"),conv_6:a(256,512,"mobilenetv1/conv_6"),conv_7:a(512,512,"mobilenetv1/conv_7"),conv_8:a(512,512,"mobilenetv1/conv_8"),conv_9:a(512,512,"mobilenetv1/conv_9"),conv_10:a(512,512,"mobilenetv1/conv_10"),conv_11:a(512,512,"mobilenetv1/conv_11"),conv_12:a(512,1024,"mobilenetv1/conv_12"),conv_13:a(1024,1024,"mobilenetv1/conv_13")}},extractPredictionLayerParams:function(){return{conv_0:r(1024,256,1,"prediction_layer/conv_0"),conv_1:r(256,512,3,"prediction_layer/conv_1"),conv_2:r(512,128,1,"prediction_layer/conv_2"),conv_3:r(128,256,3,"prediction_layer/conv_3"),conv_4:r(256,128,1,"prediction_layer/conv_4"),conv_5:r(128,256,3,"prediction_layer/conv_5"),conv_6:r(256,64,1,"prediction_layer/conv_6"),conv_7:r(64,128,3,"prediction_layer/conv_7"),box_predictor_0:{box_encoding_predictor:n(512,12,1,"prediction_layer/box_predictor_0/box_encoding_predictor"),class_predictor:n(512,9,1,"prediction_layer/box_predictor_0/class_predictor")},box_predictor_1:{box_encoding_predictor:n(1024,24,1,"prediction_layer/box_predictor_1/box_encoding_predictor"),class_predictor:n(1024,18,1,"prediction_layer/box_predictor_1/class_predictor")},box_predictor_2:{box_encoding_predictor:n(512,24,1,"prediction_layer/box_predictor_2/box_encoding_predictor"),class_predictor:n(512,18,1,"prediction_layer/box_predictor_2/class_predictor")},box_predictor_3:{box_encoding_predictor:n(256,24,1,"prediction_layer/box_predictor_3/box_encoding_predictor"),class_predictor:n(256,18,1,"prediction_layer/box_predictor_3/class_predictor")},box_predictor_4:{box_encoding_predictor:n(256,24,1,"prediction_layer/box_predictor_4/box_encoding_predictor"),class_predictor:n(256,18,1,"prediction_layer/box_predictor_4/class_predictor")},box_predictor_5:{box_encoding_predictor:n(128,24,1,"prediction_layer/box_predictor_5/box_encoding_predictor"),class_predictor:n(128,18,1,"prediction_layer/box_predictor_5/class_predictor")}}}}}function we(t){var e=[],n=function(t,e){var n=r.extractWeightEntryFactory(t,e);function i(t,e,r){return{filters:n(t+"/Conv2d_"+e+"_pointwise/weights",4,r+"/filters"),batch_norm_offset:n(t+"/Conv2d_"+e+"_pointwise/convolution_bn_offset",1,r+"/batch_norm_offset")}}function a(t){var e="mobilenetv1/conv_"+t,r="MobilenetV1/Conv2d_"+t+"_depthwise",a=e+"/depthwise_conv",o=e+"/pointwise_conv";return{depthwise_conv:{filters:n(r+"/depthwise_weights",4,a+"/filters"),batch_norm_scale:n(r+"/BatchNorm/gamma",1,a+"/batch_norm_scale"),batch_norm_offset:n(r+"/BatchNorm/beta",1,a+"/batch_norm_offset"),batch_norm_mean:n(r+"/BatchNorm/moving_mean",1,a+"/batch_norm_mean"),batch_norm_variance:n(r+"/BatchNorm/moving_variance",1,a+"/batch_norm_variance")},pointwise_conv:i("MobilenetV1",t,o)}}function o(t,e){return{filters:n(t+"/weights",4,e+"/filters"),bias:n(t+"/biases",1,e+"/bias")}}function s(t){return{box_encoding_predictor:o("Prediction/BoxPredictor_"+t+"/BoxEncodingPredictor","prediction_layer/box_predictor_"+t+"/box_encoding_predictor"),class_predictor:o("Prediction/BoxPredictor_"+t+"/ClassPredictor","prediction_layer/box_predictor_"+t+"/class_predictor")}}return{extractMobilenetV1Params:function(){return{conv_0:i("MobilenetV1",0,"mobilenetv1/conv_0"),conv_1:a(1),conv_2:a(2),conv_3:a(3),conv_4:a(4),conv_5:a(5),conv_6:a(6),conv_7:a(7),conv_8:a(8),conv_9:a(9),conv_10:a(10),conv_11:a(11),conv_12:a(12),conv_13:a(13)}},extractPredictionLayerParams:function(){return{conv_0:i("Prediction",0,"prediction_layer/conv_0"),conv_1:i("Prediction",1,"prediction_layer/conv_1"),conv_2:i("Prediction",2,"prediction_layer/conv_2"),conv_3:i("Prediction",3,"prediction_layer/conv_3"),conv_4:i("Prediction",4,"prediction_layer/conv_4"),conv_5:i("Prediction",5,"prediction_layer/conv_5"),conv_6:i("Prediction",6,"prediction_layer/conv_6"),conv_7:i("Prediction",7,"prediction_layer/conv_7"),box_predictor_0:s(0),box_predictor_1:s(1),box_predictor_2:s(2),box_predictor_3:s(3),box_predictor_4:s(4),box_predictor_5:s(5)}}}}(t,e),i=n.extractMobilenetV1Params,a=n.extractPredictionLayerParams,o=t["Output/extra_dim"];if(e.push({originalPath:"Output/extra_dim",paramPath:"output_layer/extra_dim"}),!g(o))throw new Error("expected weightMap['Output/extra_dim'] to be a Tensor3D, instead have "+o);var s={mobilenetv1:i(),prediction_layer:a(),output_layer:{extra_dim:o}};return r.disposeUnusedWeightTensors(t,e),{params:s,paramMappings:e}}function ke(t,e,n){return i.H(function(){var r=i.h(t,e.filters,n,"same");return r=i.b(r,e.batch_norm_offset),i.f(r,0,6)})}var Ce=.0010000000474974513;function Ee(t,e){return i.H(function(){var n=null,r=ke(t,e.conv_0,[2,2]);if([e.conv_1,e.conv_2,e.conv_3,e.conv_4,e.conv_5,e.conv_6,e.conv_7,e.conv_8,e.conv_9,e.conv_10,e.conv_11,e.conv_12,e.conv_13].forEach(function(t,e){var a,o,s,c=e+1,u=function(t){return[2,4,6,12].some(function(e){return e===t})?[2,2]:[1,1]}(c);a=r,o=t.depthwise_conv,s=u,r=ke(r=i.H(function(){var t=i.i(a,o.filters,s,"same");return t=i.d(t,o.batch_norm_mean,o.batch_norm_variance,o.batch_norm_offset,o.batch_norm_scale,Ce),i.f(t,0,6)}),t.pointwise_conv,[1,1]),11===c&&(n=r)}),null===n)throw new Error("mobileNetV1 - output of conv layer 11 is null");return{out:r,conv11:n}})}function Se(t,e,n){var r=t.arraySync(),i=Math.min(r[e][0],r[e][2]),a=Math.min(r[e][1],r[e][3]),o=Math.max(r[e][0],r[e][2]),s=Math.max(r[e][1],r[e][3]),c=Math.min(r[n][0],r[n][2]),u=Math.min(r[n][1],r[n][3]),l=Math.max(r[n][0],r[n][2]),d=Math.max(r[n][1],r[n][3]),f=(o-i)*(s-a),h=(l-c)*(d-u);if(f<=0||h<=0)return 0;var p=Math.max(i,c),m=Math.max(a,u),v=Math.min(o,l),_=Math.min(s,d),g=Math.max(v-p,0)*Math.max(_-m,0);return g/(f+h-g)}function Ie(t,e){var n=function(t){var e=i.K(i.J(t,[1,0])),n=[i.C(e[2],e[0]),i.C(e[3],e[1])];return{sizes:n,centers:[i.b(e[0],i.j(n[0],i.v(2))),i.b(e[1],i.j(n[1],i.v(2)))]}}(t),r=n.sizes,a=n.centers,o=i.K(i.J(e,[1,0])),s=i.j(i.r(i.k(i.j(o[2],i.v(5))),r[0]),i.v(2)),c=i.b(i.r(i.j(o[0],i.v(10)),r[0]),a[0]),u=i.j(i.r(i.k(i.j(o[3],i.v(5))),r[1]),i.v(2)),l=i.b(i.r(i.j(o[1],i.v(10)),r[1]),a[1]);return i.J(i.B([i.C(c,s),i.C(l,u),i.b(c,s),i.b(l,u)]),[1,0])}function Me(t,e){return i.H(function(){var n=t.shape[0];return{boxPredictionEncoding:i.u(r.convLayer(t,e.box_encoding_predictor),[n,-1,1,4]),classPrediction:i.u(r.convLayer(t,e.class_predictor),[n,-1,3])}})}var Te=function(){function t(t){var e=void 0===t?{}:t,n=e.minConfidence,r=e.maxResults;if(this._name="SsdMobilenetv1Options",this._minConfidence=n||.5,this._maxResults=r||100,"number"!=typeof this._minConfidence||this._minConfidence<=0||this._minConfidence>=1)throw new Error(this._name+" - expected minConfidence to be a number between 0 and 1");if("number"!=typeof this._maxResults)throw new Error(this._name+" - expected maxResults to be a number")}return Object.defineProperty(t.prototype,"minConfidence",{get:function(){return this._minConfidence},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxResults",{get:function(){return this._maxResults},enumerable:!0,configurable:!0}),t}(),De=function(t){function e(){return t.call(this,"SsdMobilenetv1")||this}return P.c(e,t),e.prototype.forwardInput=function(t){var e=this.params;if(!e)throw new Error("SsdMobilenetv1 - load model before inference");return i.H(function(){var n=t.toBatchTensor(512,!1).toFloat(),r=Ee(i.C(i.r(n,i.v(.007843137718737125)),i.v(1)),e.mobilenetv1),a=function(t,e,n){return i.H(function(){var r=ke(ke(t,n.conv_0,[1,1]),n.conv_1,[2,2]),a=ke(ke(r,n.conv_2,[1,1]),n.conv_3,[2,2]),o=ke(ke(a,n.conv_4,[1,1]),n.conv_5,[2,2]),s=ke(ke(o,n.conv_6,[1,1]),n.conv_7,[2,2]),c=Me(e,n.box_predictor_0),u=Me(t,n.box_predictor_1),l=Me(r,n.box_predictor_2),d=Me(a,n.box_predictor_3),f=Me(o,n.box_predictor_4),h=Me(s,n.box_predictor_5);return{boxPredictions:i.g([c.boxPredictionEncoding,u.boxPredictionEncoding,l.boxPredictionEncoding,d.boxPredictionEncoding,f.boxPredictionEncoding,h.boxPredictionEncoding],1),classPredictions:i.g([c.classPrediction,u.classPrediction,l.classPrediction,d.classPrediction,f.classPrediction,h.classPrediction],1)}})}(r.out,r.conv11,e.prediction_layer);return function(t,e,n){return i.H(function(){var r=t.shape[0],a=Ie(i.u(i.I(n.extra_dim,[r,1,1]),[-1,4]),i.u(t,[-1,4]));a=i.u(a,[r,a.shape[0]/r,4]);var o=i.x(i.y(e,[0,0,1],[-1,-1,-1])),s=i.y(o,[0,0,0],[-1,-1,1]);return s=i.u(s,[r,s.shape[1]]),{boxes:i.K(a),scores:i.K(s)}})}(a.boxPredictions,a.classPredictions,e.output_layer)})},e.prototype.forward=function(t){return P.b(this,void 0,void 0,function(){var e;return P.d(this,function(n){switch(n.label){case 0:return e=this.forwardInput,[4,vt(t)];case 1:return[2,e.apply(this,[n.sent()])]}})})},e.prototype.locateFaces=function(t,e){return void 0===e&&(e={}),P.b(this,void 0,void 0,function(){var n,r,i,a,o,s,c,u,l,d,f,h,p,m,v,_,g,b,y,x;return P.d(this,function(w){switch(w.label){case 0:return n=new Te(e),r=n.maxResults,i=n.minConfidence,[4,vt(t)];case 1:for(a=w.sent(),o=this.forwardInput(a),s=o.boxes,c=o.scores,u=s[0],l=c[0],d=1;d<s.length;d++)s[d].dispose(),c[d].dispose();return p=(h=Array).from,[4,l.data()];case 2:return f=p.apply(h,[w.sent()]),m=function(t,e,n,r,i){var a=t.shape[0],o=Math.min(n,a),s=[];return e.map(function(t,e){return{score:t,boxIndex:e}}).filter(function(t){return t.score>i}).sort(function(t,e){return e.score-t.score}).forEach(function(e){if(!(s.length>=o)){for(var n=e.score,a=s.length-1;a>=0;--a){var c=Se(t,e.boxIndex,s[a]);if(0!==c&&(e.score*=c<=r?1:0,e.score<=i))break}n===e.score&&s.push(e.boxIndex)}}),s}(u,f,r,.5,i),v=a.getReshapedInputDimensions(0),_=a.inputSize,g=_/v.width,b=_/v.height,y=u.arraySync(),x=m.map(function(t){var e=[Math.max(0,y[t][0]),Math.min(1,y[t][2])].map(function(t){return t*b}),n=e[0],r=e[1],i=[Math.max(0,y[t][1]),Math.min(1,y[t][3])].map(function(t){return t*g}),o=i[0],s=i[1];return new At(f[t],new Lt(o,n,s-o,r-n),{height:a.getInputHeight(0),width:a.getInputWidth(0)})}),u.dispose(),l.dispose(),[2,x]}})})},e.prototype.getDefaultModelName=function(){return"ssd_mobilenetv1_model"},e.prototype.extractParamsFromWeigthMap=function(t){return we(t)},e.prototype.extractParams=function(t){return function(t){var e=[],n=r.extractWeightsFactory(t),a=n.extractWeights,o=n.getRemainingWeights,s=xe(a,e),c=s.extractMobilenetV1Params,u=s.extractPredictionLayerParams,l=c(),d=u(),f={extra_dim:i.F(a(20472),[1,5118,4])};if(e.push({paramPath:"output_layer/extra_dim"}),0!==o().length)throw new Error("weights remaing after extract: "+o().length);return{params:{mobilenetv1:l,prediction_layer:d,output_layer:f},paramMappings:e}}(t)},e}(_t);function Re(t){var e=new De;return e.extractWeights(t),e}function Pe(t){return Re(t)}var Oe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return P.c(e,t),e}(De),Le=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._name="TinyFaceDetectorOptions",e}return P.c(e,t),e}(r.TinyYolov2Options),Ae=function(){function t(){}return t.prototype.then=function(t){return P.b(this,void 0,void 0,function(){var e;return P.d(this,function(n){switch(n.label){case 0:return e=t,[4,this.run()];case 1:return[2,e.apply(void 0,[n.sent()])]}})})},t.prototype.run=function(){return P.b(this,void 0,void 0,function(){return P.d(this,function(t){throw new Error("ComposableTask - run is not implemented")})})},t}();var Ne=2,Be=12;function je(t){var e=r.extractWeightsFactory(t),n=e.extractWeights,a=e.getRemainingWeights,o=[],s=function(t,e){var n=r.extractConvParamsFactory(t,e),a=r.extractFCParamsFactory(t,e);function o(n,r){var a=i.D(t(n));return e.push({paramPath:r}),a}function s(t,e,r){return void 0===r&&(r=!1),{conv1:n(t[0],t[1],3,e+"/conv1"),prelu1_alpha:o(t[1],e+"/prelu1_alpha"),conv2:n(t[1],t[2],3,e+"/conv2"),prelu2_alpha:o(t[2],e+"/prelu2_alpha"),conv3:n(t[2],t[3],r?2:3,e+"/conv3"),prelu3_alpha:o(t[3],e+"/prelu3_alpha")}}return{extractPNetParams:function(){var t=s([3,10,16,32],"pnet"),e=n(32,2,1,"pnet/conv4_1"),r=n(32,4,1,"pnet/conv4_2");return P.a({},t,{conv4_1:e,conv4_2:r})},extractRNetParams:function(){var t=s([3,28,48,64],"rnet",!0),e=a(576,128,"rnet/fc1"),n=o(128,"rnet/prelu4_alpha"),r=a(128,2,"rnet/fc2_1"),i=a(128,4,"rnet/fc2_2");return P.a({},t,{fc1:e,prelu4_alpha:n,fc2_1:r,fc2_2:i})},extractONetParams:function(){var t=s([3,32,64,64],"onet"),e=n(64,128,2,"onet/conv4"),r=o(128,"onet/prelu4_alpha"),i=a(1152,256,"onet/fc1"),c=o(256,"onet/prelu5_alpha"),u=a(256,2,"onet/fc2_1"),l=a(256,4,"onet/fc2_2"),d=a(256,10,"onet/fc2_3");return P.a({},t,{conv4:e,prelu4_alpha:r,fc1:i,prelu5_alpha:c,fc2_1:u,fc2_2:l,fc2_3:d})}}}(n,o),c=s.extractPNetParams,u=s.extractRNetParams,l=s.extractONetParams,d=c(),f=u(),h=l();if(0!==a().length)throw new Error("weights remaing after extract: "+a().length);return{params:{pnet:d,rnet:f,onet:h},paramMappings:o}}function Fe(t){var e=[],n=function(t,e){var n=r.extractWeightEntryFactory(t,e);function i(t){return{filters:n(t+"/weights",4,t+"/filters"),bias:n(t+"/bias",1)}}function a(t){return{weights:n(t+"/weights",2),bias:n(t+"/bias",1)}}function o(t){return n(t,1)}function s(t){return{conv1:i(t+"/conv1"),prelu1_alpha:o(t+"/prelu1_alpha"),conv2:i(t+"/conv2"),prelu2_alpha:o(t+"/prelu2_alpha"),conv3:i(t+"/conv3"),prelu3_alpha:o(t+"/prelu3_alpha")}}return{extractPNetParams:function(){var t=s("pnet"),e=i("pnet/conv4_1"),n=i("pnet/conv4_2");return P.a({},t,{conv4_1:e,conv4_2:n})},extractRNetParams:function(){var t=s("rnet"),e=a("rnet/fc1"),n=o("rnet/prelu4_alpha"),r=a("rnet/fc2_1"),i=a("rnet/fc2_2");return P.a({},t,{fc1:e,prelu4_alpha:n,fc2_1:r,fc2_2:i})},extractONetParams:function(){var t=s("onet"),e=i("onet/conv4"),n=o("onet/prelu4_alpha"),r=a("onet/fc1"),c=o("onet/prelu5_alpha"),u=a("onet/fc2_1"),l=a("onet/fc2_2"),d=a("onet/fc2_3");return P.a({},t,{conv4:e,prelu4_alpha:n,fc1:r,prelu5_alpha:c,fc2_1:u,fc2_2:l,fc2_3:d})}}}(t,e),i=n.extractPNetParams,a=n.extractRNetParams,o=n.extractONetParams,s=i(),c=a(),u=o();return r.disposeUnusedWeightTensors(t,e),{params:{pnet:s,rnet:c,onet:u},paramMappings:e}}function Ye(t,e){var n=e[0],r=e[1];return{height:Math.floor(n*t),width:Math.floor(r*t)}}var $e=function(t){function e(e,n,r,i){return t.call(this,{left:e,top:n,right:r,bottom:i},!0)||this}return P.c(e,t),e}(O);function ze(t){return i.H(function(){return i.r(i.C(t,i.v(127.5)),i.v(.0078125))})}function Ve(t,e){return i.H(function(){return i.b(i.t(t),i.r(e,i.s(i.t(i.s(t)))))})}function He(t,e,n){return void 0===n&&(n=!1),i.H(function(){var a=r.convLayer(t,e.conv1,"valid");return a=Ve(a,e.prelu1_alpha),a=i.q(a,n?[2,2]:[3,3],[2,2],"same"),a=Ve(a=r.convLayer(a,e.conv2,"valid"),e.prelu2_alpha),a=n?a:i.q(a,[3,3],[2,2],"valid"),a=Ve(a=r.convLayer(a,e.conv3,"valid"),e.prelu3_alpha)})}function qe(t,e,n,a,o){o.stage1=[];var s=e.map(function(e){return i.H(function(){var n={scale:e},o=function(t,e){return i.H(function(){var n=Ye(e,t.shape.slice(1)),r=n.height,a=n.width,o=ze(i.n.resizeBilinear(t,[r,a]));return i.J(o,[0,2,1,3])})}(t,e),s=Date.now(),c=function(t,e){return i.H(function(){var n=He(t,e,!0),a=r.convLayer(n,e.conv4_1,"valid"),o=i.l(i.p(a,3),3);return{prob:i.A(i.C(a,o),3),regions:r.convLayer(n,e.conv4_2,"valid")}})}(o,a),u=c.prob,l=c.regions;return n.pnet=Date.now()-s,{scoresTensor:i.K(i.K(u,3)[1])[0],regionsTensor:i.K(l)[0],scale:e,statsForScale:n}})}).map(function(t){var e=t.scoresTensor,r=t.regionsTensor,i=t.scale,a=t.statsForScale,s=function(t,e,n,r){for(var i=[],a=t.arraySync(),o=0;o<t.shape[0];o++)for(var s=0;s<t.shape[1];s++)a[o][s]>=r&&i.push(new p(s,o));return i.map(function(t){var r=new L(Math.round((t.y*Ne+1)/n),Math.round((t.x*Ne+1)/n),Math.round((t.y*Ne+Be)/n),Math.round((t.x*Ne+Be)/n)),i=a[t.y][t.x],o=e.arraySync();return{cell:r,score:i,region:new $e(o[t.y][t.x][0],o[t.y][t.x][1],o[t.y][t.x][2],o[t.y][t.x][3])}})}(e,r,i,n);if(e.dispose(),r.dispose(),!s.length)return o.stage1.push(a),[];var c=Date.now(),u=bt(s.map(function(t){return t.cell}),s.map(function(t){return t.score}),.5);return a.nms=Date.now()-c,a.numBoxes=u.length,o.stage1.push(a),u.map(function(t){return s[t]})}).reduce(function(t,e){return t.concat(e)},[]),c=[],u=[];if(s.length>0){var l=Date.now(),d=bt(s.map(function(t){return t.cell}),s.map(function(t){return t.score}),.7);o.stage1_nms=Date.now()-l,u=d.map(function(t){return s[t].score}),c=d.map(function(t){return s[t]}).map(function(t){var e=t.cell,n=t.region;return new L(e.left+n.left*e.width,e.top+n.top*e.height,e.right+n.right*e.width,e.bottom+n.bottom*e.height).toSquare().round()})}return{boxes:c,scores:u}}function We(t,e,n){var r=n.width,a=n.height;return P.b(this,void 0,void 0,function(){var n,o,s,c=this;return P.d(this,function(u){switch(u.label){case 0:return n=G(t),[4,Promise.all(e.map(function(e){return P.b(c,void 0,void 0,function(){var r,i,a,o,s,c,u,l;return P.d(this,function(d){return r=e.padAtBorders(t.height,t.width),i=r.y,a=r.ey,o=r.x,s=r.ex,c=o-1,u=i-1,l=n.getImageData(c,u,s-c,a-u),[2,H.isNodejs()?J(l):createImageBitmap(l)]})})}))];case 1:return o=u.sent(),s=[],o.forEach(function(t){var e=G(X({width:r,height:a}));e.drawImage(t,0,0,r,a);for(var n=e.getImageData(0,0,r,a).data,i=[],o=0;o<n.length;o+=4)i.push(n[o+2]),i.push(n[o+1]),i.push(n[o]);s.push(i)}),[2,s.map(function(t){return i.H(function(){return ze(i.J(i.G(t,[1,r,a,3]),[0,2,1,3]).toFloat())})})]}})})}function Ue(t,e,n,r,a){return P.b(this,void 0,void 0,function(){var o,s,c,u,l,d,f,h,p,m,v,_,g,b;return P.d(this,function(y){switch(y.label){case 0:return o=Date.now(),[4,We(t,e,{width:24,height:24})];case 1:return s=y.sent(),a.stage2_extractImagePatches=Date.now()-o,o=Date.now(),c=s.map(function(t){var e=function(t,e){return i.H(function(){var n=He(t,e),r=Ve(Zt(i.u(n,[n.shape[0],e.fc1.weights.shape[0]]),e.fc1),e.prelu4_alpha),a=Zt(r,e.fc2_1),o=i.l(i.p(a,1),1),s=i.A(i.C(a,o),1),c=Zt(r,e.fc2_2);return{scores:i.K(s,1)[1],regions:c}})}(t,r);return t.dispose(),e}),a.stage2_rnet=Date.now()-o,u=c.length>1?i.g(c.map(function(t){return t.scores})):c[0].scores,f=(d=Array).from,[4,u.data()];case 2:return l=f.apply(d,[y.sent()]),u.dispose(),h=l.map(function(t,e){return{score:t,idx:e}}).filter(function(t){return t.score>n}).map(function(t){return t.idx}),p=h.map(function(t){return e[t]}),m=h.map(function(t){return l[t]}),v=[],_=[],p.length>0&&(o=Date.now(),g=bt(p,m,.7),a.stage2_nms=Date.now()-o,b=g.map(function(t){var e=c[h[t]].regions.arraySync();return new $e(e[0][0],e[0][1],e[0][2],e[0][3])}),_=g.map(function(t){return m[t]}),v=g.map(function(t,e){return p[t].calibrate(b[e])})),c.forEach(function(t){t.regions.dispose(),t.scores.dispose()}),[2,{boxes:v,scores:_}]}})})}function Ge(t,e,n,a,o){return P.b(this,void 0,void 0,function(){var s,c,u,l,d,f,h,m,v,_,g,b,y,x,w;return P.d(this,function(k){switch(k.label){case 0:return s=Date.now(),[4,We(t,e,{width:48,height:48})];case 1:return c=k.sent(),o.stage3_extractImagePatches=Date.now()-s,s=Date.now(),u=c.map(function(t){var e=function(t,e){return i.H(function(){var n=He(t,e);n=i.q(n,[2,2],[2,2],"same"),n=Ve(n=r.convLayer(n,e.conv4,"valid"),e.prelu4_alpha);var a=Ve(Zt(i.u(n,[n.shape[0],e.fc1.weights.shape[0]]),e.fc1),e.prelu5_alpha),o=Zt(a,e.fc2_1),s=i.l(i.p(o,1),1),c=i.A(i.C(o,s),1),u=Zt(a,e.fc2_2),l=Zt(a,e.fc2_3);return{scores:i.K(c,1)[1],regions:u,points:l}})}(t,a);return t.dispose(),e}),o.stage3_onet=Date.now()-s,l=u.length>1?i.g(u.map(function(t){return t.scores})):u[0].scores,h=(f=Array).from,[4,l.data()];case 2:return d=h.apply(f,[k.sent()]),l.dispose(),m=d.map(function(t,e){return{score:t,idx:e}}).filter(function(t){return t.score>n}).map(function(t){return t.idx}),v=m.map(function(t){var e=u[t].regions.arraySync();return new $e(e[0][0],e[0][1],e[0][2],e[0][3])}),_=m.map(function(t,n){return e[t].calibrate(v[n])}),g=m.map(function(t){return d[t]}),b=[],y=[],x=[],_.length>0&&(s=Date.now(),w=bt(_,g,.7,!1),o.stage3_nms=Date.now()-s,b=w.map(function(t){return _[t]}),y=w.map(function(t){return g[t]}),x=w.map(function(t,e){return Array(5).fill(0).map(function(n,r){var i=u[t].points.arraySync();return new p(i[0][r]*(b[e].width+1)+b[e].left,i[0][r+5]*(b[e].height+1)+b[e].top)})})),u.forEach(function(t){t.regions.dispose(),t.scores.dispose(),t.points.dispose()}),[2,{boxes:b,scores:y,points:x}]}})})}var Ke=function(t){function e(){return t.call(this,"Mtcnn")||this}return P.c(e,t),e.prototype.forwardInput=function(t,e){return void 0===e&&(e={}),P.b(this,void 0,void 0,function(){var n,r,a,o,s,c,u,l,d,f,h,m,v,_,g,b,y,x,w,k,C;return P.d(this,function(E){switch(E.label){case 0:if(!(n=this.params))throw new Error("Mtcnn - load model before inference");if(!(r=t.canvases[0]))throw new Error("Mtcnn - inputCanvas is not defined, note that passing tensors into Mtcnn.forwardInput is not supported yet.");return a={},o=Date.now(),s=i.H(function(){return t=i.l(i.e.fromPixels(r)).toFloat(),i.H(function(){return i.B(i.K(t,3).reverse(),3)});var t}),c=function(t){return s.dispose(),a.total=Date.now()-o,t},u=s.shape.slice(1),l=u[0],d=u[1],f=new ye(e),h=f.minFaceSize,m=f.scaleFactor,v=f.maxNumScales,_=f.scoreThresholds,g=f.scaleSteps,b=(g||function(t,e,n){for(var r=n[0],i=n[1],a=Be/t,o=[],s=Math.min(r,i)*a,c=0;s>=12;)o.push(a*Math.pow(e,c)),s*=e,c+=1;return o}(h,m,[l,d])).filter(function(t){var e=Ye(t,[l,d]);return Math.min(e.width,e.height)>Be}).slice(0,v),a.scales=b,a.pyramid=b.map(function(t){return Ye(t,[l,d])}),y=Date.now(),[4,qe(s,b,_[0],n.pnet,a)];case 1:return x=E.sent(),a.total_stage1=Date.now()-y,x.boxes.length?(a.stage2_numInputBoxes=x.boxes.length,y=Date.now(),[4,Ue(r,x.boxes,_[1],n.rnet,a)]):[2,c({results:[],stats:a})];case 2:return w=E.sent(),a.total_stage2=Date.now()-y,w.boxes.length?(a.stage3_numInputBoxes=w.boxes.length,y=Date.now(),[4,Ge(r,w.boxes,_[2],n.onet,a)]):[2,c({results:[],stats:a})];case 3:return k=E.sent(),a.total_stage3=Date.now()-y,C=k.boxes.map(function(t,e){return be(_e({},new At(k.scores[e],new Lt(t.left/d,t.top/l,t.width/d,t.height/l),{height:l,width:d})),new Bt(k.points[e].map(function(e){return e.sub(new p(t.left,t.top)).div(new p(t.width,t.height))}),{width:t.width,height:t.height}))}),[2,c({results:C,stats:a})]}})})},e.prototype.forward=function(t,e){return void 0===e&&(e={}),P.b(this,void 0,void 0,function(){var n;return P.d(this,function(r){switch(r.label){case 0:return n=this.forwardInput,[4,vt(t)];case 1:return[4,n.apply(this,[r.sent(),e])];case 2:return[2,r.sent().results]}})})},e.prototype.forwardWithStats=function(t,e){return void 0===e&&(e={}),P.b(this,void 0,void 0,function(){var n;return P.d(this,function(r){switch(r.label){case 0:return n=this.forwardInput,[4,vt(t)];case 1:return[2,n.apply(this,[r.sent(),e])]}})})},e.prototype.getDefaultModelName=function(){return"mtcnn_model"},e.prototype.extractParamsFromWeigthMap=function(t){return Fe(t)},e.prototype.extractParams=function(t){return je(t)},e}(_t),Xe=.4,Je=[new p(1.603231,2.094468),new p(6.041143,7.080126),new p(2.882459,3.518061),new p(4.266906,5.178857),new p(9.041765,10.66308)],Ze=[117.001,114.697,97.404],Qe=function(t){function e(){var e={withSeparableConvs:!0,iouThreshold:Xe,classes:["face"],anchors:Je,meanRgb:Ze,isFirstLayerConv2d:!0,filterSizes:[3,16,32,64,128,256,512]};return t.call(this,e)||this}return P.c(e,t),Object.defineProperty(e.prototype,"anchors",{get:function(){return this.config.anchors},enumerable:!0,configurable:!0}),e.prototype.locateFaces=function(t,e){return P.b(this,void 0,void 0,function(){return P.d(this,function(n){switch(n.label){case 0:return[4,this.detect(t,e)];case 1:return[2,n.sent().map(function(t){return new At(t.score,t.relativeBox,{width:t.imageWidth,height:t.imageHeight})})]}})})},e.prototype.getDefaultModelName=function(){return"tiny_face_detector_model"},e.prototype.extractParamsFromWeigthMap=function(e){return t.prototype.extractParamsFromWeigthMap.call(this,e)},e}(r.TinyYolov2),tn=.4,en=[new p(.738768,.874946),new p(2.42204,2.65704),new p(4.30971,7.04493),new p(10.246,4.59428),new p(12.6868,11.8741)],nn=[new p(1.603231,2.094468),new p(6.041143,7.080126),new p(2.882459,3.518061),new p(4.266906,5.178857),new p(9.041765,10.66308)],rn=[117.001,114.697,97.404],an=function(t){function e(e){void 0===e&&(e=!0);var n=Object.assign({},{withSeparableConvs:e,iouThreshold:tn,classes:["face"]},e?{anchors:nn,meanRgb:rn}:{anchors:en,withClassScores:!0});return t.call(this,n)||this}return P.c(e,t),Object.defineProperty(e.prototype,"withSeparableConvs",{get:function(){return this.config.withSeparableConvs},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"anchors",{get:function(){return this.config.anchors},enumerable:!0,configurable:!0}),e.prototype.locateFaces=function(t,e){return P.b(this,void 0,void 0,function(){return P.d(this,function(n){switch(n.label){case 0:return[4,this.detect(t,e)];case 1:return[2,n.sent().map(function(t){return new At(t.score,t.relativeBox,{width:t.imageWidth,height:t.imageHeight})})]}})})},e.prototype.getDefaultModelName=function(){return this.withSeparableConvs?"tiny_yolov2_separable_conv_model":"tiny_yolov2_model"},e.prototype.extractParamsFromWeigthMap=function(e){return t.prototype.extractParamsFromWeigthMap.call(this,e)},e}(r.TinyYolov2);function on(t,e){void 0===e&&(e=!0);var n=new an(e);return n.extractWeights(t),n}var sn={ssdMobilenetv1:new De,tinyFaceDetector:new Qe,tinyYolov2:new an,mtcnn:new Ke,faceLandmark68Net:new re,faceLandmark68TinyNet:new ae,faceRecognitionNet:new pe,faceExpressionNet:new ee},cn=function(t,e){return sn.ssdMobilenetv1.locateFaces(t,e)},un=function(t,e){return sn.tinyFaceDetector.locateFaces(t,e)},ln=function(t,e){return sn.tinyYolov2.locateFaces(t,e)},dn=function(t,e){return sn.mtcnn.forward(t,e)},fn=function(t){return sn.faceLandmark68Net.detectLandmarks(t)},hn=function(t){return sn.faceLandmark68TinyNet.detectLandmarks(t)},pn=function(t){return sn.faceRecognitionNet.computeFaceDescriptor(t)},mn=function(t){return sn.faceExpressionNet.predictExpressions(t)},vn=function(t){return sn.ssdMobilenetv1.load(t)},_n=function(t){return sn.tinyFaceDetector.load(t)},gn=function(t){return sn.mtcnn.load(t)},bn=function(t){return sn.tinyYolov2.load(t)},yn=function(t){return sn.faceLandmark68Net.load(t)},xn=function(t){return sn.faceLandmark68TinyNet.load(t)},wn=function(t){return sn.faceRecognitionNet.load(t)},kn=function(t){return sn.faceExpressionNet.load(t)},Cn=vn,En=cn,Sn=fn,In=function(t){function e(e,n){var r=t.call(this)||this;return r.parentTask=e,r.input=n,r}return P.c(e,t),e}(Ae),Mn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return P.c(e,t),e.prototype.run=function(){return P.b(this,void 0,void 0,function(){var t,e,n,r,a,o=this;return P.d(this,function(s){switch(s.label){case 0:return[4,this.parentTask];case 1:return t=s.sent(),e=t.map(function(t){return t.alignedRect}),this.input instanceof i.a?[4,qt(this.input,e)]:[3,3];case 2:return r=s.sent(),[3,5];case 3:return[4,Ht(this.input,e)];case 4:r=s.sent(),s.label=5;case 5:return n=r,[4,Promise.all(t.map(function(t,e){return P.b(o,void 0,void 0,function(){var r;return P.d(this,function(i){switch(i.label){case 0:return[4,sn.faceRecognitionNet.computeFaceDescriptor(n[e])];case 1:return r=i.sent(),[2,ve(t,r)]}})})}))];case 6:return a=s.sent(),n.forEach(function(t){return t instanceof i.a&&t.dispose()}),[2,a]}})})},e}(In),Tn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return P.c(e,t),e.prototype.run=function(){return P.b(this,void 0,void 0,function(){var t,e,n,r,a;return P.d(this,function(o){switch(o.label){case 0:return[4,this.parentTask];case 1:return(t=o.sent())?(e=t.alignedRect,this.input instanceof i.a?[4,qt(this.input,[e])]:[3,3]):[2];case 2:return r=o.sent(),[3,5];case 3:return[4,Ht(this.input,[e])];case 4:r=o.sent(),o.label=5;case 5:return n=r,[4,sn.faceRecognitionNet.computeFaceDescriptor(n[0])];case 6:return a=o.sent(),n.forEach(function(t){return t instanceof i.a&&t.dispose()}),[2,ve(t,a)]}})})},e}(In),Dn=function(t){function e(e,n,r){var i=t.call(this)||this;return i.parentTask=e,i.input=n,i.useTinyLandmarkNet=r,i}return P.c(e,t),Object.defineProperty(e.prototype,"landmarkNet",{get:function(){return this.useTinyLandmarkNet?sn.faceLandmark68TinyNet:sn.faceLandmark68Net},enumerable:!0,configurable:!0}),e}(Ae),Rn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return P.c(e,t),e.prototype.run=function(){return P.b(this,void 0,void 0,function(){var t,e,n,r,a,o=this;return P.d(this,function(s){switch(s.label){case 0:return[4,this.parentTask];case 1:return t=s.sent(),e=t.map(function(t){return t.detection}),this.input instanceof i.a?[4,qt(this.input,e)]:[3,3];case 2:return r=s.sent(),[3,5];case 3:return[4,Ht(this.input,e)];case 4:r=s.sent(),s.label=5;case 5:return n=r,[4,Promise.all(n.map(function(t){return o.landmarkNet.detectLandmarks(t)}))];case 6:return a=s.sent(),n.forEach(function(t){return t instanceof i.a&&t.dispose()}),[2,t.map(function(t,e){return be(t,a[e])})]}})})},e.prototype.withFaceDescriptors=function(){return new Mn(this,this.input)},e}(Dn),Pn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return P.c(e,t),e.prototype.run=function(){return P.b(this,void 0,void 0,function(){var t,e,n,r,a;return P.d(this,function(o){switch(o.label){case 0:return[4,this.parentTask];case 1:return(t=o.sent())?(e=t.detection,this.input instanceof i.a?[4,qt(this.input,[e])]:[3,3]):[2];case 2:return r=o.sent(),[3,5];case 3:return[4,Ht(this.input,[e])];case 4:r=o.sent(),o.label=5;case 5:return n=r,[4,this.landmarkNet.detectLandmarks(n[0])];case 6:return a=o.sent(),n.forEach(function(t){return t instanceof i.a&&t.dispose()}),[2,be(t,a)]}})})},e.prototype.withFaceDescriptor=function(){return new Tn(this,this.input)},e}(Dn),On=function(t){function e(e,n){var r=t.call(this)||this;return r.parentTask=e,r.input=n,r}return P.c(e,t),e}(Ae),Ln=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return P.c(e,t),e.prototype.run=function(){return P.b(this,void 0,void 0,function(){var t,e,n,r,a;return P.d(this,function(o){switch(o.label){case 0:return[4,this.parentTask];case 1:return t=o.sent(),e=t.map(function(t){return t.detection}),this.input instanceof i.a?[4,qt(this.input,e)]:[3,3];case 2:return r=o.sent(),[3,5];case 3:return[4,Ht(this.input,e)];case 4:r=o.sent(),o.label=5;case 5:return n=r,[4,Promise.all(n.map(function(t){return sn.faceExpressionNet.predictExpressions(t)}))];case 6:return a=o.sent(),n.forEach(function(t){return t instanceof i.a&&t.dispose()}),[2,t.map(function(t,e){return ge(t,a[e])})]}})})},e.prototype.withFaceLandmarks=function(){return new Rn(this,this.input,!1)},e}(On),An=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return P.c(e,t),e.prototype.run=function(){return P.b(this,void 0,void 0,function(){var t,e,n,r,a;return P.d(this,function(o){switch(o.label){case 0:return[4,this.parentTask];case 1:return(t=o.sent())?(e=t.detection,this.input instanceof i.a?[4,qt(this.input,[e])]:[3,3]):[2];case 2:return r=o.sent(),[3,5];case 3:return[4,Ht(this.input,[e])];case 4:r=o.sent(),o.label=5;case 5:return n=r,[4,sn.faceExpressionNet.predictExpressions(n[0])];case 6:return a=o.sent(),n.forEach(function(t){return t instanceof i.a&&t.dispose()}),[2,ge(t,a)]}})})},e.prototype.withFaceLandmarks=function(){return new Pn(this,this.input,!1)},e}(On),Nn=function(t){function e(e,n){void 0===n&&(n=new Te);var r=t.call(this)||this;return r.input=e,r.options=n,r}return P.c(e,t),e}(Ae),Bn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return P.c(e,t),e.prototype.run=function(){return P.b(this,void 0,void 0,function(){var t,e,n,i;return P.d(this,function(a){switch(a.label){case 0:return e=(t=this).input,(n=t.options)instanceof ye?[4,sn.mtcnn.forward(e,n)]:[3,2];case 1:return[2,a.sent().map(function(t){return t.detection})];case 2:if(!(i=n instanceof Le?function(t){return sn.tinyFaceDetector.locateFaces(t,n)}:n instanceof Te?function(t){return sn.ssdMobilenetv1.locateFaces(t,n)}:n instanceof r.TinyYolov2Options?function(t){return sn.tinyYolov2.locateFaces(t,n)}:null))throw new Error("detectFaces - expected options to be instance of TinyFaceDetectorOptions | SsdMobilenetv1Options | MtcnnOptions | TinyYolov2Options");return[2,i(e)]}})})},e.prototype.runAndExtendWithFaceDetections=function(){var t=this;return new Promise(function(e){return P.b(t,void 0,void 0,function(){var t;return P.d(this,function(n){switch(n.label){case 0:return[4,this.run()];case 1:return t=n.sent(),[2,e(t.map(function(t){return _e({},t)}))]}})})})},e.prototype.withFaceLandmarks=function(t){return void 0===t&&(t=!1),new Rn(this.runAndExtendWithFaceDetections(),this.input,t)},e.prototype.withFaceExpressions=function(){return new Ln(this.runAndExtendWithFaceDetections(),this.input)},e}(Nn),jn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return P.c(e,t),e.prototype.run=function(){return P.b(this,void 0,void 0,function(){var t,e;return P.d(this,function(n){switch(n.label){case 0:return[4,new Bn(this.input,this.options)];case 1:return t=n.sent(),e=t[0],t.forEach(function(t){t.score>e.score&&(e=t)}),[2,e]}})})},e.prototype.runAndExtendWithFaceDetection=function(){var t=this;return new Promise(function(e){return P.b(t,void 0,void 0,function(){var t;return P.d(this,function(n){switch(n.label){case 0:return[4,this.run()];case 1:return t=n.sent(),[2,e(t?_e({},t):void 0)]}})})})},e.prototype.withFaceLandmarks=function(t){return void 0===t&&(t=!1),new Pn(this.runAndExtendWithFaceDetection(),this.input,t)},e.prototype.withFaceExpressions=function(){return new An(this.runAndExtendWithFaceDetection(),this.input)},e}(Nn);function Fn(t,e){return void 0===e&&(e=new Te),new jn(t,e)}function Yn(t,e){return void 0===e&&(e=new Te),new Bn(t,e)}function $n(t,e){return P.b(this,void 0,void 0,function(){return P.d(this,function(n){switch(n.label){case 0:return[4,Yn(t,new Te(e?{minConfidence:e}:{})).withFaceLandmarks().withFaceDescriptors()];case 1:return[2,n.sent()]}})})}function zn(t,e){return void 0===e&&(e={}),P.b(this,void 0,void 0,function(){return P.d(this,function(n){switch(n.label){case 0:return[4,Yn(t,new r.TinyYolov2Options(e)).withFaceLandmarks().withFaceDescriptors()];case 1:return[2,n.sent()]}})})}function Vn(t,e){return void 0===e&&(e={}),P.b(this,void 0,void 0,function(){return P.d(this,function(n){switch(n.label){case 0:return[4,Yn(t,new ye(e)).withFaceLandmarks().withFaceDescriptors()];case 1:return[2,n.sent()]}})})}var Hn=$n;function qn(t,e){if(t.length!==e.length)throw new Error("euclideanDistance: arr1.length !== arr2.length");var n=Array.from(t),r=Array.from(e);return Math.sqrt(n.map(function(t,e){return t-r[e]}).reduce(function(t,e){return t+Math.pow(e,2)},0))}var Wn=function(){function t(t,e){void 0===e&&(e=.6),this._distanceThreshold=e;var n=Array.isArray(t)?t:[t];if(!n.length)throw new Error("FaceRecognizer.constructor - expected atleast one input");var r=1,i=function(){return"person "+r++};this._labeledDescriptors=n.map(function(t){if(t instanceof Yt)return t;if(t instanceof Float32Array)return new Yt(i(),[t]);if(t.descriptor&&t.descriptor instanceof Float32Array)return new Yt(i(),[t.descriptor]);throw new Error("FaceRecognizer.constructor - expected inputs to be of type LabeledFaceDescriptors | WithFaceDescriptor<any> | Float32Array | Array<LabeledFaceDescriptors | WithFaceDescriptor<any> | Float32Array>")})}return Object.defineProperty(t.prototype,"labeledDescriptors",{get:function(){return this._labeledDescriptors},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"distanceThreshold",{get:function(){return this._distanceThreshold},enumerable:!0,configurable:!0}),t.prototype.computeMeanDistance=function(t,e){return e.map(function(e){return qn(e,t)}).reduce(function(t,e){return t+e},0)/(e.length||1)},t.prototype.matchDescriptor=function(t){var e=this;return this.labeledDescriptors.map(function(n){var r=n.descriptors,i=n.label;return new Ft(i,e.computeMeanDistance(t,r))}).reduce(function(t,e){return t.distance<e.distance?t:e})},t.prototype.findBestMatch=function(t){var e=this.matchDescriptor(t);return e.distance<this.distanceThreshold?e:new Ft("unknown",e.distance)},t}();function Un(t){var e=new Ke;return e.extractWeights(t),e}function Gn(t){var e=new Qe;return e.extractWeights(t),e}function Kn(t,e){var n=e.width,r=e.height;if(Array.isArray(t))return t.map(function(t){return Kn(t,{width:n,height:r})});var i=t.unshiftedLandmarks&&t.unshiftedLandmarks instanceof Nt,a=t.detection&&t.detection instanceof At;if(i){var o=t.detection.forSize(n,r),s=t.unshiftedLandmarks.forSize(o.box.width,o.box.height);return be(_e(t,o),s)}return a?_e(t,t.detection.forSize(n,r)):t instanceof Nt||t instanceof At?t.forSize(n,r):t}n.d(e,!1,function(){return i}),n.d(e,!1,function(){return r}),n.d(e,!1,function(){return H}),n.d(e,!1,function(){return wt}),n.d(e,!1,function(){return kt}),n.d(e,!1,function(){return m}),n.d(e,!1,function(){return v}),n.d(e,!1,function(){return _}),n.d(e,!1,function(){return g}),n.d(e,!1,function(){return b}),n.d(e,!1,function(){return y}),n.d(e,!1,function(){return x}),n.d(e,"h",function(){return w}),n.d(e,!1,function(){return k}),n.d(e,!1,function(){return C}),n.d(e,!1,function(){return E}),n.d(e,!1,function(){return S}),n.d(e,!1,function(){return I}),n.d(e,!1,function(){return M}),n.d(e,!1,function(){return _t}),n.d(e,!1,function(){return L}),n.d(e,!1,function(){return O}),n.d(e,!1,function(){return tt}),n.d(e,!1,function(){return h}),n.d(e,!1,function(){return et}),n.d(e,!1,function(){return A}),n.d(e,!1,function(){return p}),n.d(e,!1,function(){return nt}),n.d(e,!1,function(){return Lt}),n.d(e,!1,function(){return W}),n.d(e,!1,function(){return U}),n.d(e,!1,function(){return X}),n.d(e,!1,function(){return J}),n.d(e,!1,function(){return Q}),n.d(e,!1,function(){return at}),n.d(e,!1,function(){return rt}),n.d(e,"c",function(){return st}),n.d(e,!1,function(){return ct}),n.d(e,!1,function(){return ut}),n.d(e,!1,function(){return ot}),n.d(e,!1,function(){return G}),n.d(e,!1,function(){return Z}),n.d(e,!1,function(){return K}),n.d(e,!1,function(){return lt}),n.d(e,!1,function(){return dt}),n.d(e,!1,function(){return ft}),n.d(e,!1,function(){return q}),n.d(e,!1,function(){return ht}),n.d(e,!1,function(){return mt}),n.d(e,!1,function(){return it}),n.d(e,!1,function(){return vt}),n.d(e,!1,function(){return gt}),n.d(e,!1,function(){return bt}),n.d(e,!1,function(){return yt}),n.d(e,!1,function(){return pt}),n.d(e,!1,function(){return xt}),n.d(e,!1,function(){return At}),n.d(e,!1,function(){return Nt}),n.d(e,!1,function(){return Bt}),n.d(e,!1,function(){return jt}),n.d(e,!1,function(){return Ft}),n.d(e,!1,function(){return Yt}),n.d(e,!1,function(){return $t}),n.d(e,!1,function(){return zt}),n.d(e,!1,function(){return Vt}),n.d(e,!1,function(){return Ht}),n.d(e,!1,function(){return qt}),n.d(e,!1,function(){return ee}),n.d(e,!1,function(){return te}),n.d(e,!1,function(){return oe}),n.d(e,!1,function(){return re}),n.d(e,!1,function(){return ae}),n.d(e,!1,function(){return me}),n.d(e,!1,function(){return pe}),n.d(e,!1,function(){return ve}),n.d(e,!1,function(){return _e}),n.d(e,!1,function(){return ge}),n.d(e,!1,function(){return be}),n.d(e,!1,function(){return $n}),n.d(e,!1,function(){return zn}),n.d(e,!1,function(){return Vn}),n.d(e,!1,function(){return Hn}),n.d(e,!1,function(){return Ae}),n.d(e,!1,function(){return In}),n.d(e,!1,function(){return Mn}),n.d(e,!1,function(){return Tn}),n.d(e,!1,function(){return Fn}),n.d(e,!1,function(){return Yn}),n.d(e,!1,function(){return Nn}),n.d(e,!1,function(){return Bn}),n.d(e,!1,function(){return jn}),n.d(e,!1,function(){return Dn}),n.d(e,!1,function(){return Rn}),n.d(e,!1,function(){return Pn}),n.d(e,!1,function(){return Wn}),n.d(e,"g",function(){return sn}),n.d(e,!1,function(){return cn}),n.d(e,!1,function(){return un}),n.d(e,!1,function(){return ln}),n.d(e,!1,function(){return dn}),n.d(e,!1,function(){return fn}),n.d(e,!1,function(){return hn}),n.d(e,"a",function(){return pn}),n.d(e,!1,function(){return mn}),n.d(e,!1,function(){return vn}),n.d(e,"f",function(){return _n}),n.d(e,!1,function(){return gn}),n.d(e,!1,function(){return bn}),n.d(e,!1,function(){return yn}),n.d(e,"d",function(){return xn}),n.d(e,"e",function(){return wn}),n.d(e,!1,function(){return kn}),n.d(e,!1,function(){return Cn}),n.d(e,!1,function(){return En}),n.d(e,!1,function(){return Sn}),n.d(e,!1,function(){return Un}),n.d(e,!1,function(){return Ke}),n.d(e,!1,function(){return ye}),n.d(e,!1,function(){return Re}),n.d(e,!1,function(){return Pe}),n.d(e,!1,function(){return Oe}),n.d(e,!1,function(){return De}),n.d(e,!1,function(){return Te}),n.d(e,!1,function(){return Gn}),n.d(e,!1,function(){return Qe}),n.d(e,!1,function(){return Le}),n.d(e,!1,function(){return an}),n.d(e,!1,function(){return on}),n.d(e,"b",function(){return qn}),n.d(e,!1,function(){return Kn})},function(t,e,n){"use strict";var r=n(10),i=n(347),a=n(11).Buffer,o=new Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function c(t,e){return t<<e|t>>>32-e}function u(t,e,n,r,i,a,o){return c(t+(e&n|~e&r)+i+a|0,o)+e|0}function l(t,e,n,r,i,a,o){return c(t+(e&r|n&~r)+i+a|0,o)+e|0}function d(t,e,n,r,i,a,o){return c(t+(e^n^r)+i+a|0,o)+e|0}function f(t,e,n,r,i,a,o){return c(t+(n^(e|~r))+i+a|0,o)+e|0}r(s,i),s.prototype._update=function(){for(var t=o,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var n=this._a,r=this._b,i=this._c,a=this._d;r=f(r=f(r=f(r=f(r=d(r=d(r=d(r=d(r=l(r=l(r=l(r=l(r=u(r=u(r=u(r=u(r,i=u(i,a=u(a,n=u(n,r,i,a,t[0],3614090360,7),r,i,t[1],3905402710,12),n,r,t[2],606105819,17),a,n,t[3],3250441966,22),i=u(i,a=u(a,n=u(n,r,i,a,t[4],4118548399,7),r,i,t[5],1200080426,12),n,r,t[6],2821735955,17),a,n,t[7],4249261313,22),i=u(i,a=u(a,n=u(n,r,i,a,t[8],1770035416,7),r,i,t[9],2336552879,12),n,r,t[10],4294925233,17),a,n,t[11],2304563134,22),i=u(i,a=u(a,n=u(n,r,i,a,t[12],1804603682,7),r,i,t[13],4254626195,12),n,r,t[14],2792965006,17),a,n,t[15],1236535329,22),i=l(i,a=l(a,n=l(n,r,i,a,t[1],4129170786,5),r,i,t[6],3225465664,9),n,r,t[11],643717713,14),a,n,t[0],3921069994,20),i=l(i,a=l(a,n=l(n,r,i,a,t[5],3593408605,5),r,i,t[10],38016083,9),n,r,t[15],3634488961,14),a,n,t[4],3889429448,20),i=l(i,a=l(a,n=l(n,r,i,a,t[9],568446438,5),r,i,t[14],3275163606,9),n,r,t[3],4107603335,14),a,n,t[8],1163531501,20),i=l(i,a=l(a,n=l(n,r,i,a,t[13],2850285829,5),r,i,t[2],4243563512,9),n,r,t[7],1735328473,14),a,n,t[12],2368359562,20),i=d(i,a=d(a,n=d(n,r,i,a,t[5],4294588738,4),r,i,t[8],2272392833,11),n,r,t[11],1839030562,16),a,n,t[14],4259657740,23),i=d(i,a=d(a,n=d(n,r,i,a,t[1],2763975236,4),r,i,t[4],1272893353,11),n,r,t[7],4139469664,16),a,n,t[10],3200236656,23),i=d(i,a=d(a,n=d(n,r,i,a,t[13],681279174,4),r,i,t[0],3936430074,11),n,r,t[3],3572445317,16),a,n,t[6],76029189,23),i=d(i,a=d(a,n=d(n,r,i,a,t[9],3654602809,4),r,i,t[12],3873151461,11),n,r,t[15],530742520,16),a,n,t[2],3299628645,23),i=f(i,a=f(a,n=f(n,r,i,a,t[0],4096336452,6),r,i,t[7],1126891415,10),n,r,t[14],2878612391,15),a,n,t[5],4237533241,21),i=f(i,a=f(a,n=f(n,r,i,a,t[12],1700485571,6),r,i,t[3],2399980690,10),n,r,t[10],4293915773,15),a,n,t[1],2240044497,21),i=f(i,a=f(a,n=f(n,r,i,a,t[8],1873313359,6),r,i,t[15],4264355552,10),n,r,t[6],2734768916,15),a,n,t[13],1309151649,21),i=f(i,a=f(a,n=f(n,r,i,a,t[4],4149444226,6),r,i,t[11],3174756917,10),n,r,t[2],718787259,15),a,n,t[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+r|0,this._c=this._c+i|0,this._d=this._d+a|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=a.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=s},function(t,e,n){t.exports=i;var r=n(278).EventEmitter;function i(){r.call(this)}n(10)(i,r),i.Readable=n(279),i.Writable=n(876),i.Duplex=n(877),i.Transform=n(878),i.PassThrough=n(879),i.Stream=i,i.prototype.pipe=function(t,e){var n=this;function i(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",i),t.on("drain",a),t._isStdio||e&&!1===e.end||(n.on("end",s),n.on("close",c));var o=!1;function s(){o||(o=!0,t.end())}function c(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function u(t){if(l(),0===r.listenerCount(this,"error"))throw t}function l(){n.removeListener("data",i),t.removeListener("drain",a),n.removeListener("end",s),n.removeListener("close",c),n.removeListener("error",u),t.removeListener("error",u),n.removeListener("end",l),n.removeListener("close",l),t.removeListener("close",l)}return n.on("error",u),t.on("error",u),n.on("end",l),n.on("close",l),t.on("close",l),t.emit("pipe",n),t}},function(t,e,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,a=i&&"function"==typeof i.apply?i.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var o=Number.isNaN||function(t){return t!=t};function s(){s.init.call(this)}t.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function u(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function l(t,e,n,r){var i,a,o,s;if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);if(void 0===(a=t._events)?(a=t._events=Object.create(null),t._eventsCount=0):(void 0!==a.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),a=t._events),o=a[e]),void 0===o)o=a[e]=n,++t._eventsCount;else if("function"==typeof o?o=a[e]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=u(t))>0&&o.length>i&&!o.warned){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=o.length,s=c,console&&console.warn&&console.warn(s)}return t}function d(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=function(){for(var t=[],e=0;e<arguments.length;e++)t.push(arguments[e]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,a(this.listener,this.target,t))}.bind(r);return i.listener=n,r.wrapFn=i,i}function f(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(i):p(i,i.length)}function h(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function p(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(t){if("number"!=typeof t||t<0||o(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");c=t}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||o(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var r="error"===t,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var c=i[t];if(void 0===c)return!1;if("function"==typeof c)a(c,this,e);else{var u=c.length,l=p(c,u);for(n=0;n<u;++n)a(l[n],this,e)}return!0},s.prototype.addListener=function(t,e){return l(this,t,e,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(t,e){return l(this,t,e,!0)},s.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e);return this.on(t,d(this,t,e)),this},s.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e);return this.prependListener(t,d(this,t,e)),this},s.prototype.removeListener=function(t,e){var n,r,i,a,o;if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e);if(void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===e||n[a].listener===e){o=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,i),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,o||e)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(t){var e,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var i,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(i=a[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},s.prototype.listeners=function(t){return f(this,t,!0)},s.prototype.rawListeners=function(t){return f(this,t,!1)},s.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):h.call(t,e)},s.prototype.listenerCount=h,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(t,e,n){(e=t.exports=n(348)).Stream=e,e.Readable=e,e.Writable=n(280),e.Duplex=n(69),e.Transform=n(351),e.PassThrough=n(875)},function(t,e,n){"use strict";(function(e,r,i){var a=n(110);function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;t.entry=null;for(;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=g;var s,c=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?r:a.nextTick;g.WritableState=_;var u=n(88);u.inherits=n(10);var l={deprecate:n(874)},d=n(349),f=n(11).Buffer,h=i.Uint8Array||function(){};var p,m=n(350);function v(){}function _(t,e){s=s||n(69),t=t||{};var r=e instanceof s;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,u=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(u||0===u)?u:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===t.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,r,i){--e.pendingcb,n?(a.nextTick(i,r),a.nextTick(C,t,e),t._writableState.errorEmitted=!0,t.emit("error",r)):(i(r),t._writableState.errorEmitted=!0,t.emit("error",r),C(t,e))}(t,n,r,e,i);else{var o=w(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||x(t,n),r?c(y,t,n,o,i):y(t,n,o,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function g(t){if(s=s||n(69),!(p.call(g,this)||this instanceof s))return new g(t);this._writableState=new _(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),d.call(this)}function b(t,e,n,r,i,a,o){e.writelen=r,e.writecb=o,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,a,e.onwrite),e.sync=!1}function y(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),C(t,e)}function x(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,i=new Array(r),a=e.corkedRequestsFree;a.entry=n;for(var s=0,c=!0;n;)i[s]=n,n.isBuf||(c=!1),n=n.next,s+=1;i.allBuffers=c,b(t,e,!0,e.length,i,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new o(e),e.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,l=n.encoding,d=n.callback;if(b(t,e,!1,e.objectMode?1:u.length,u,l,d),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function w(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function k(t,e){t._final(function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),C(t,e)})}function C(t,e){var n=w(e);return n&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,a.nextTick(k,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),n}u.inherits(g,d),_.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(_.prototype,"buffer",{get:l.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===g&&(t&&t._writableState instanceof _)}})):p=function(t){return t instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(t,e,n){var r,i=this._writableState,o=!1,s=!i.objectMode&&(r=t,f.isBuffer(r)||r instanceof h);return s&&!f.isBuffer(t)&&(t=function(t){return f.from(t)}(t)),"function"==typeof e&&(n=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof n&&(n=v),i.ended?function(t,e){var n=new Error("write after end");t.emit("error",n),a.nextTick(e,n)}(this,n):(s||function(t,e,n,r){var i=!0,o=!1;return null===n?o=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),a.nextTick(r,o),i=!1),i}(this,i,t,n))&&(i.pendingcb++,o=function(t,e,n,r,i,a){if(!n){var o=function(t,e,n){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=f.from(e,n));return e}(e,r,i);r!==o&&(n=!0,i="buffer",r=o)}var s=e.objectMode?1:r.length;e.length+=s;var c=e.length<e.highWaterMark;c||(e.needDrain=!0);if(e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:a,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else b(t,e,!1,s,r,i,a);return c}(this,i,s,t,e,n)),o},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||x(this,t))},g.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(t,e,n){var r=this._writableState;"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!==t&&void 0!==t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(t,e,n){e.ending=!0,C(t,e),n&&(e.finished?a.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,r,n)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),g.prototype.destroy=m.destroy,g.prototype._undestroy=m.undestroy,g.prototype._destroy=function(t,e){this.end(),e(t)}}).call(e,n(26),n(107).setImmediate,n(20))},function(t,e,n){"use strict";var r=n(11).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=c,this.end=u,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=l,this.end=d,e=3;break;default:return this.write=f,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function o(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function c(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function l(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function d(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function f(t){return t.toString(this.encoding)}function h(t){return t&&t.length?this.write(t):""}e.StringDecoder=a,a.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<t.length?e?e+this.text(t,n):this.text(t,n):e||""},a.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},a.prototype.text=function(t,e){var n=function(t,e,n){var r=e.length-1;if(r<n)return 0;var i=o(e[r]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if((i=o(e[r]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if((i=o(e[r]))>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},a.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,n){"use strict";var r=n(19).Buffer,i=n(10),a=n(347),o=new Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],c=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],u=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],l=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],d=[0,1518500249,1859775393,2400959708,2840853838],f=[1352829926,1548603684,1836072691,2053994217,0];function h(){a.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(t,e){return t<<e|t>>>32-e}function m(t,e,n,r,i,a,o,s){return p(t+(e^n^r)+a+o|0,s)+i|0}function v(t,e,n,r,i,a,o,s){return p(t+(e&n|~e&r)+a+o|0,s)+i|0}function _(t,e,n,r,i,a,o,s){return p(t+((e|~n)^r)+a+o|0,s)+i|0}function g(t,e,n,r,i,a,o,s){return p(t+(e&r|n&~r)+a+o|0,s)+i|0}function b(t,e,n,r,i,a,o,s){return p(t+(e^(n|~r))+a+o|0,s)+i|0}i(h,a),h.prototype._update=function(){for(var t=o,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var n=0|this._a,r=0|this._b,i=0|this._c,a=0|this._d,h=0|this._e,y=0|this._a,x=0|this._b,w=0|this._c,k=0|this._d,C=0|this._e,E=0;E<80;E+=1){var S,I;E<16?(S=m(n,r,i,a,h,t[s[E]],d[0],u[E]),I=b(y,x,w,k,C,t[c[E]],f[0],l[E])):E<32?(S=v(n,r,i,a,h,t[s[E]],d[1],u[E]),I=g(y,x,w,k,C,t[c[E]],f[1],l[E])):E<48?(S=_(n,r,i,a,h,t[s[E]],d[2],u[E]),I=_(y,x,w,k,C,t[c[E]],f[2],l[E])):E<64?(S=g(n,r,i,a,h,t[s[E]],d[3],u[E]),I=v(y,x,w,k,C,t[c[E]],f[3],l[E])):(S=b(n,r,i,a,h,t[s[E]],d[4],u[E]),I=m(y,x,w,k,C,t[c[E]],f[4],l[E])),n=h,h=a,a=p(i,10),i=r,r=S,y=C,C=k,k=p(w,10),w=x,x=I}var M=this._b+i+k|0;this._b=this._c+a+C|0,this._c=this._d+h+y|0,this._d=this._e+n+x|0,this._e=this._a+r+w|0,this._a=M},h.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=r.alloc?r.alloc(20):new r(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=h},function(t,e,n){(e=t.exports=function(t){t=t.toLowerCase();var n=e[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n}).sha=n(880),e.sha1=n(881),e.sha224=n(882),e.sha256=n(352),e.sha384=n(883),e.sha512=n(353)},function(t,e,n){"use strict";e.utils=n(889),e.Cipher=n(890),e.DES=n(891),e.CBC=n(892),e.EDE=n(893)},function(t,e,n){var r=n(894),i=n(902),a=n(363);e.createCipher=e.Cipher=r.createCipher,e.createCipheriv=e.Cipheriv=r.createCipheriv,e.createDecipher=e.Decipher=i.createDecipher,e.createDecipheriv=e.Decipheriv=i.createDecipheriv,e.listCiphers=e.getCiphers=function(){return Object.keys(a)}},function(t,e,n){var r={ECB:n(895),CBC:n(896),CFB:n(897),CFB8:n(898),CFB1:n(899),OFB:n(900),CTR:n(361),GCM:n(361)},i=n(363);for(var a in i)i[a].module=r[i[a].mode];t.exports=i},function(t,e,n){var r;function i(t){this.rand=t}if(t.exports=function(t){return r||(r=new i(null)),r.generate(t)},t.exports.Rand=i,i.prototype.generate=function(t){return this._rand(t)},i.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),n=0;n<e.length;n++)e[n]=this.rand.getByte();return e},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var a=n(906);if("function"!=typeof a.randomBytes)throw new Error("Not supported");i.prototype._rand=function(t){return a.randomBytes(t)}}catch(t){}},function(t,e,n){(function(e){var r=n(22),i=n(76);function a(t,n){var i=function(t){var e=o(t);return{blinder:e.toRed(r.mont(t.modulus)).redPow(new r(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(n),a=n.modulus.byteLength(),s=(r.mont(n.modulus),new r(t).mul(i.blinder).umod(n.modulus)),c=s.toRed(r.mont(n.prime1)),u=s.toRed(r.mont(n.prime2)),l=n.coefficient,d=n.prime1,f=n.prime2,h=c.redPow(n.exponent1),p=u.redPow(n.exponent2);h=h.fromRed(),p=p.fromRed();var m=h.isub(p).imul(l).umod(d);return m.imul(f),p.iadd(m),new e(p.imul(i.unblinder).umod(n.modulus).toArray(!1,a))}function o(t){for(var e=t.modulus.byteLength(),n=new r(i(e));n.cmp(t.modulus)>=0||!n.umod(t.prime1)||!n.umod(t.prime2);)n=new r(i(e));return n}t.exports=a,a.getr=o}).call(e,n(19).Buffer)},function(t,e,n){"use strict";var r=e;r.version=n(911).version,r.utils=n(36),r.rand=n(287),r.curve=n(369),r.curves=n(290),r.ec=n(922),r.eddsa=n(926)},function(t,e,n){"use strict";var r,i=e,a=n(291),o=n(369),s=n(36).assert;function c(t){"short"===t.type?this.curve=new o.short(t):"edwards"===t.type?this.curve=new o.edwards(t):this.curve=new o.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var n=new c(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:n}),n}})}i.PresetCurve=c,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=n(921)}catch(t){r=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},function(t,e,n){var r=e;r.utils=n(47),r.common=n(90),r.sha=n(915),r.ripemd=n(919),r.hmac=n(920),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},function(t,e,n){"use strict";var r=n(383);n.n(r);n.o(r,"QrcodeCapture")&&n.d(e,"QrcodeCapture",function(){return r.QrcodeCapture}),n.o(r,"QrcodeDropZone")&&n.d(e,"QrcodeDropZone",function(){return r.QrcodeDropZone}),n.o(r,"QrcodeStream")&&n.d(e,"QrcodeStream",function(){return r.QrcodeStream});var i=n(961);n.n(i)},function(t,e,n){var r=n(1372)("socket.io-parser"),i=n(1375),a=n(1376),o=n(388),s=n(389);function c(){}e.protocol=4,e.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],e.CONNECT=0,e.DISCONNECT=1,e.EVENT=2,e.ACK=3,e.ERROR=4,e.BINARY_EVENT=5,e.BINARY_ACK=6,e.Encoder=c,e.Decoder=d;var u=e.ERROR+'"encode error"';function l(t){var n=""+t.type;if(e.BINARY_EVENT!==t.type&&e.BINARY_ACK!==t.type||(n+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(n+=t.nsp+","),null!=t.id&&(n+=t.id),null!=t.data){var i=function(t){try{return JSON.stringify(t)}catch(t){return!1}}(t.data);if(!1===i)return u;n+=i}return r("encoded %j as %s",t,n),n}function d(){this.reconstructor=null}function f(t){this.reconPack=t,this.buffers=[]}function h(t){return{type:e.ERROR,data:"parser error: "+t}}c.prototype.encode=function(t,n){(r("encoding packet %j",t),e.BINARY_EVENT===t.type||e.BINARY_ACK===t.type)?function(t,e){a.removeBlobs(t,function(t){var n=a.deconstructPacket(t),r=l(n.packet),i=n.buffers;i.unshift(r),e(i)})}(t,n):n([l(t)])},i(d.prototype),d.prototype.add=function(t){var n;if("string"==typeof t)n=function(t){var n=0,i={type:Number(t.charAt(0))};if(null==e.types[i.type])return h("unknown packet type "+i.type);if(e.BINARY_EVENT===i.type||e.BINARY_ACK===i.type){for(var a="";"-"!==t.charAt(++n)&&(a+=t.charAt(n),n!=t.length););if(a!=Number(a)||"-"!==t.charAt(n))throw new Error("Illegal attachments");i.attachments=Number(a)}if("/"===t.charAt(n+1))for(i.nsp="";++n;){var s=t.charAt(n);if(","===s)break;if(i.nsp+=s,n===t.length)break}else i.nsp="/";var c=t.charAt(n+1);if(""!==c&&Number(c)==c){for(i.id="";++n;){var s=t.charAt(n);if(null==s||Number(s)!=s){--n;break}if(i.id+=t.charAt(n),n===t.length)break}i.id=Number(i.id)}if(t.charAt(++n)){var u=function(t){try{return JSON.parse(t)}catch(t){return!1}}(t.substr(n)),l=!1!==u&&(i.type===e.ERROR||o(u));if(!l)return h("invalid payload");i.data=u}return r("decoded %s as %j",t,i),i}(t),e.BINARY_EVENT===n.type||e.BINARY_ACK===n.type?(this.reconstructor=new f(n),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",n)):this.emit("decoded",n);else{if(!s(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(n=this.reconstructor.takeBinaryData(t))&&(this.reconstructor=null,this.emit("decoded",n))}},d.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},f.prototype.takeBinaryData=function(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){var e=a.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null},f.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(t,e,n){var r=n(1379);t.exports=function(t){var e=t.xdomain,n=t.xscheme,i=t.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!e||r))return new XMLHttpRequest}catch(t){}try{if("undefined"!=typeof XDomainRequest&&!n&&i)return new XDomainRequest}catch(t){}if(!e)try{return new(self[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}},function(t,e,n){var r=n(78),i=n(296);function a(t){this.path=t.path,this.hostname=t.hostname,this.port=t.port,this.secure=t.secure,this.query=t.query,this.timestampParam=t.timestampParam,this.timestampRequests=t.timestampRequests,this.readyState="",this.agent=t.agent||!1,this.socket=t.socket,this.enablesXDR=t.enablesXDR,this.withCredentials=t.withCredentials,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.forceNode=t.forceNode,this.isReactNative=t.isReactNative,this.extraHeaders=t.extraHeaders,this.localAddress=t.localAddress}t.exports=a,i(a.prototype),a.prototype.onError=function(t,e){var n=new Error(t);return n.type="TransportError",n.description=e,this.emit("error",n),this},a.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},a.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},a.prototype.send=function(t){if("open"!==this.readyState)throw new Error("Transport not open");this.write(t)},a.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},a.prototype.onData=function(t){var e=r.decodePacket(t,this.socket.binaryType);this.onPacket(e)},a.prototype.onPacket=function(t){this.emit("packet",t)},a.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(t,e,n){function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}t.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var i=0;i<r.length;i++)if((n=r[i])===e||n.fn===e){r.splice(i,1);break}return this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),n=this._callbacks["$"+t];if(n)for(var r=0,i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,e);return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e,n){t.exports=!n(17)&&!n(13)(function(){return 7!=Object.defineProperty(n(119)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){e.f=n(15)},function(t,e,n){var r=n(30),i=n(31),a=n(93)(!1),o=n(121)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),c=0,u=[];for(n in s)n!=o&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~a(u,n)||u.push(n));return u}},function(t,e,n){var r=n(18),i=n(8),a=n(59);t.exports=n(17)?Object.defineProperties:function(t,e){i(t);for(var n,o=a(e),s=o.length,c=0;s>c;)r.f(t,n=o[c++],e[n]);return t}},function(t,e,n){var r=n(31),i=n(62).f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return o&&"[object Window]"==a.call(t)?function(t){try{return i(t)}catch(t){return o.slice()}}(t):i(r(t))}},function(t,e,n){"use strict";var r=n(17),i=n(59),a=n(94),o=n(81),s=n(21),c=n(80),u=Object.assign;t.exports=!u||n(13)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r})?function(t,e){for(var n=s(t),u=arguments.length,l=1,d=a.f,f=o.f;u>l;)for(var h,p=c(arguments[l++]),m=d?i(p).concat(d(p)):i(p),v=m.length,_=0;v>_;)h=m[_++],r&&!f.call(p,h)||(n[h]=p[h]);return n}:u},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){"use strict";var r=n(25),i=n(14),a=n(305),o=[].slice,s={};t.exports=Function.bind||function(t){var e=r(this),n=o.call(arguments,1),c=function(){var r=n.concat(o.call(arguments));return this instanceof c?function(t,e,n){if(!(e in s)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";s[e]=Function("F,a","return new F("+r.join(",")+")")}return s[e](t,n)}(e,r.length,r):a(e,r,t)};return i(e.prototype)&&(c.prototype=e.prototype),c}},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(12).parseInt,i=n(72).trim,a=n(125),o=/^[-+]?0[xX]/;t.exports=8!==r(a+"08")||22!==r(a+"0x16")?function(t,e){var n=i(String(t),3);return r(n,e>>>0||(o.test(n)?16:10))}:r},function(t,e,n){var r=n(12).parseFloat,i=n(72).trim;t.exports=1/r(n(125)+"-0")!=-1/0?function(t){var e=i(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},function(t,e,n){var r=n(39);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},function(t,e,n){var r=n(14),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,n){var r=n(128),i=Math.pow,a=i(2,-52),o=i(2,-23),s=i(2,127)*(2-o),c=i(2,-126);t.exports=Math.fround||function(t){var e,n,i=Math.abs(t),u=r(t);return i<c?u*(i/c/o+1/a-1/a)*c*o:(n=(e=(1+o/a)*i)-(e-i))>s||n!=n?u*(1/0):u*n}},function(t,e,n){var r=n(8);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var a=t.return;throw void 0!==a&&r(a.call(t)),e}}},function(t,e,n){var r=n(25),i=n(21),a=n(80),o=n(16);t.exports=function(t,e,n,s,c){r(e);var u=i(t),l=a(u),d=o(u.length),f=c?d-1:0,h=c?-1:1;if(n<2)for(;;){if(f in l){s=l[f],f+=h;break}if(f+=h,c?f<0:d<=f)throw TypeError("Reduce of empty array with no initial value")}for(;c?f>=0:d>f;f+=h)f in l&&(s=e(s,l[f],f,u));return s}},function(t,e,n){"use strict";var r=n(21),i=n(60),a=n(16);t.exports=[].copyWithin||function(t,e){var n=r(this),o=a(n.length),s=i(t,o),c=i(e,o),u=arguments.length>2?arguments[2]:void 0,l=Math.min((void 0===u?o:i(u,o))-c,o-s),d=1;for(c<s&&s<c+l&&(d=-1,c+=l-1,s+=l-1);l-- >0;)c in n?n[s]=n[c]:delete n[s],s+=d,c+=d;return n}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var r=n(140);n(4)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(t,e,n){n(17)&&"g"!=/./g.flags&&n(18).f(RegExp.prototype,"flags",{configurable:!0,get:n(82)})},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var r=n(8),i=n(14),a=n(144);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=a.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var r=n(321),i=n(67);t.exports=n(102)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(i(this,"Map"),t);return e&&e.v},set:function(t,e){return r.def(i(this,"Map"),0===t?0:t,e)}},r,!0)},function(t,e,n){"use strict";var r=n(18).f,i=n(61),a=n(66),o=n(38),s=n(64),c=n(65),u=n(130),l=n(315),d=n(63),f=n(17),h=n(52).fastKey,p=n(67),m=f?"_s":"size",v=function(t,e){var n,r=h(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,u){var l=t(function(t,r){s(t,l,e,"_i"),t._t=e,t._i=i(null),t._f=void 0,t._l=void 0,t[m]=0,void 0!=r&&c(r,n,t[u],t)});return a(l.prototype,{clear:function(){for(var t=p(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[m]=0},delete:function(t){var n=p(this,e),r=v(n,t);if(r){var i=r.n,a=r.p;delete n._i[r.i],r.r=!0,a&&(a.n=i),i&&(i.p=a),n._f==r&&(n._f=i),n._l==r&&(n._l=a),n[m]--}return!!r},forEach:function(t){p(this,e);for(var n,r=o(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!v(p(this,e),t)}}),f&&r(l.prototype,"size",{get:function(){return p(this,e)[m]}}),l},def:function(t,e,n){var r,i,a=v(t,e);return a?a.v=n:(t._l=a={i:i=h(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=a),r&&(r.n=a),t[m]++,"F"!==i&&(t._i[i]=a)),t},getEntry:v,setStrong:function(t,e,n){u(t,e,function(t,n){this._t=p(t,e),this._k=n,this._l=void 0},function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?l(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,l(1))},n?"entries":"values",!n,!0),d(e)}}},function(t,e,n){"use strict";var r=n(321),i=n(67);t.exports=n(102)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(i(this,"Set"),t=0===t?0:t,t)}},r)},function(t,e,n){"use strict";var r,i=n(12),a=n(46)(0),o=n(28),s=n(52),c=n(302),u=n(324),l=n(14),d=n(67),f=n(67),h=!i.ActiveXObject&&"ActiveXObject"in i,p=s.getWeak,m=Object.isExtensible,v=u.ufstore,_=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},g={get:function(t){if(l(t)){var e=p(t);return!0===e?v(d(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return u.def(d(this,"WeakMap"),t,e)}},b=t.exports=n(102)("WeakMap",_,g,u,!0,!0);f&&h&&(c((r=u.getConstructor(_,"WeakMap")).prototype,g),s.NEED=!0,a(["delete","has","get","set"],function(t){var e=b.prototype,n=e[t];o(e,t,function(e,i){if(l(e)&&!m(e)){this._f||(this._f=new r);var a=this._f[t](e,i);return"set"==t?this:a}return n.call(this,e,i)})}))},function(t,e,n){"use strict";var r=n(66),i=n(52).getWeak,a=n(8),o=n(14),s=n(64),c=n(65),u=n(46),l=n(30),d=n(67),f=u(5),h=u(6),p=0,m=function(t){return t._l||(t._l=new v)},v=function(){this.a=[]},_=function(t,e){return f(t.a,function(t){return t[0]===e})};v.prototype={get:function(t){var e=_(this,t);if(e)return e[1]},has:function(t){return!!_(this,t)},set:function(t,e){var n=_(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=h(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,a){var u=t(function(t,r){s(t,u,e,"_i"),t._t=e,t._i=p++,t._l=void 0,void 0!=r&&c(r,n,t[a],t)});return r(u.prototype,{delete:function(t){if(!o(t))return!1;var n=i(t);return!0===n?m(d(this,e)).delete(t):n&&l(n,this._i)&&delete n[this._i]},has:function(t){if(!o(t))return!1;var n=i(t);return!0===n?m(d(this,e)).has(t):n&&l(n,this._i)}}),u},def:function(t,e,n){var r=i(a(e),!0);return!0===r?m(t).set(e,n):r[t._i]=n,t},ufstore:m}},function(t,e,n){var r=n(40),i=n(16);t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=i(e);if(e!==n)throw RangeError("Wrong length!");return n}},function(t,e,n){var r=n(62),i=n(94),a=n(8),o=n(12).Reflect;t.exports=o&&o.ownKeys||function(t){var e=r.f(a(t)),n=i.f;return n?e.concat(n(t)):e}},function(t,e,n){"use strict";var r=n(95),i=n(14),a=n(16),o=n(38),s=n(15)("isConcatSpreadable");t.exports=function t(e,n,c,u,l,d,f,h){for(var p,m,v=l,_=0,g=!!f&&o(f,h,3);_<u;){if(_ in c){if(p=g?g(c[_],_,n):c[_],m=!1,i(p)&&(m=void 0!==(m=p[s])?!!m:r(p)),m&&d>0)v=t(e,n,p,a(p.length),v,d-1)-1;else{if(v>=9007199254740991)throw TypeError();e[v]=p}v++}_++}return v}},function(t,e,n){var r=n(16),i=n(127),a=n(44);t.exports=function(t,e,n,o){var s=String(a(t)),c=s.length,u=void 0===n?" ":String(n),l=r(e);if(l<=c||""==u)return s;var d=l-c,f=i.call(u,Math.ceil(d/u.length));return f.length>d&&(f=f.slice(0,d)),o?f+s:s+f}},function(t,e,n){var r=n(17),i=n(59),a=n(31),o=n(81).f;t.exports=function(t){return function(e){for(var n,s=a(e),c=i(s),u=c.length,l=0,d=[];u>l;)n=c[l++],r&&!o.call(s,n)||d.push(t?[n,s[n]]:s[n]);return d}}},function(t,e,n){var r=n(71),i=n(331);t.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn't generic");return i(this)}}},function(t,e,n){var r=n(65);t.exports=function(t,e){var n=[];return r(t,!1,n.push,n,e),n}},function(t,e){t.exports=Math.scale||function(t,e,n,r,i){return 0===arguments.length||t!=t||e!=e||n!=n||r!=r||i!=i?NaN:t===1/0||t===-1/0?t:(t-e)*(i-r)/(n-e)+r}},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},function(t,e,n){"use strict";var r=n(34),i=n(615),a=n(617),o=n(618),s=n(619),c=n(335);t.exports=function(t){return new Promise(function(e,u){var l=t.data,d=t.headers;r.isFormData(l)&&delete d["Content-Type"];var f=new XMLHttpRequest;if(t.auth){var h=t.auth.username||"",p=t.auth.password||"";d.Authorization="Basic "+btoa(h+":"+p)}if(f.open(t.method.toUpperCase(),a(t.url,t.params,t.paramsSerializer),!0),f.timeout=t.timeout,f.onreadystatechange=function(){if(f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in f?o(f.getAllResponseHeaders()):null,r={data:t.responseType&&"text"!==t.responseType?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:n,config:t,request:f};i(e,u,r),f=null}},f.onerror=function(){u(c("Network Error",t,null,f)),f=null},f.ontimeout=function(){u(c("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",f)),f=null},r.isStandardBrowserEnv()){var m=n(620),v=(t.withCredentials||s(t.url))&&t.xsrfCookieName?m.read(t.xsrfCookieName):void 0;v&&(d[t.xsrfHeaderName]=v)}if("setRequestHeader"in f&&r.forEach(d,function(t,e){void 0===l&&"content-type"===e.toLowerCase()?delete d[e]:f.setRequestHeader(e,t)}),t.withCredentials&&(f.withCredentials=!0),t.responseType)try{f.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&f.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){f&&(f.abort(),u(t),f=null)}),void 0===l&&(l=null),f.send(l)})}},function(t,e,n){"use strict";var r=n(616);t.exports=function(t,e,n,i,a){var o=new Error(t);return r(o,e,n,i,a)}},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,e,n){var r=n(0)(n(636),n(637),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";var r={titlecase:function(t){return t.replace(/_/g," ").replace(/[\u00C0-\u1FFF\u2C00-\uD7FF\w]+\s*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1)})}},i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.a={data:function(){return{loading:!1,valid:!0,labels:{},form:{},rules:{},errors:{}}},created:function(){var t=this;for(var e in this.form)if(null!==this.form[e]&&"object"===i(this.form[e]))for(var n in this.form[e]){var a=e+"."+n;this.errors[a]=[],this.labels[a]||(this.labels[a]=r.titlecase(n))}else this.errors[e]=[],this.labels[e]||(this.labels[e]=r.titlecase(e));this.rules.required=function(e){return function(n){return!!n||"The "+(t.labels&&t.labels[e]&&t.labels[e].toLowerCase()+" ")+"field is required"}}},methods:{handleErrors:function(t){t?this.setErrors(t):this.clearErrors()},setErrors:function(t){for(var e in this.errors)this.errors[e]=t[e]||[]},clearErrors:function(){for(var t in this.errors)this.errors[t]=[]}}}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){(function(t){"use strict";var e=Object.freeze;function n(t){var e,n,r,i;for(n=1,r=arguments.length;n<r;n++)for(e in i=arguments[n])t[e]=i[e];return t}Object.freeze=function(t){return t};var r=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function i(t,e){var n=Array.prototype.slice;if(t.bind)return t.bind.apply(t,n.call(arguments,1));var r=n.call(arguments,2);return function(){return t.apply(e,r.length?r.concat(n.call(arguments)):arguments)}}var a=0;function o(t){return t._leaflet_id=t._leaflet_id||++a,t._leaflet_id}function s(t,e,n){var r,i,a,o;return o=function(){r=!1,i&&(a.apply(n,i),i=!1)},a=function(){r?i=arguments:(t.apply(n,arguments),setTimeout(o,e),r=!0)}}function c(t,e,n){var r=e[1],i=e[0],a=r-i;return t===r&&n?t:((t-i)%a+a)%a+i}function u(){return!1}function l(t,e){return e=void 0===e?6:e,+(Math.round(t+"e+"+e)+"e-"+e)}function d(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function f(t){return d(t).split(/\s+/)}function h(t,e){for(var n in t.hasOwnProperty("options")||(t.options=t.options?r(t.options):{}),e)t.options[n]=e[n];return t.options}function p(t,e,n){var r=[];for(var i in t)r.push(encodeURIComponent(n?i.toUpperCase():i)+"="+encodeURIComponent(t[i]));return(e&&-1!==e.indexOf("?")?"&":"?")+r.join("&")}var m=/\{ *([\w_-]+) *\}/g;function v(t,e){return t.replace(m,function(t,n){var r=e[n];if(void 0===r)throw new Error("No value provided for variable "+t);return"function"==typeof r&&(r=r(e)),r})}var _=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function g(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}var b="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function y(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var x=0;function w(t){var e=+new Date,n=Math.max(0,16-(e-x));return x=e+n,window.setTimeout(t,n)}var k=window.requestAnimationFrame||y("RequestAnimationFrame")||w,C=window.cancelAnimationFrame||y("CancelAnimationFrame")||y("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function E(t,e,n){if(!n||k!==w)return k.call(window,i(t,e));t.call(e)}function S(t){t&&C.call(window,t)}var I=(Object.freeze||Object)({freeze:e,extend:n,create:r,bind:i,lastId:a,stamp:o,throttle:s,wrapNum:c,falseFn:u,formatNum:l,trim:d,splitWords:f,setOptions:h,getParamString:p,template:v,isArray:_,indexOf:g,emptyImageUrl:b,requestFn:k,cancelFn:C,requestAnimFrame:E,cancelAnimFrame:S});function M(){}M.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},i=e.__super__=this.prototype,a=r(i);for(var o in a.constructor=e,e.prototype=a,this)this.hasOwnProperty(o)&&"prototype"!==o&&"__super__"!==o&&(e[o]=this[o]);return t.statics&&(n(e,t.statics),delete t.statics),t.includes&&(!function(t){if("undefined"==typeof L||!L||!L.Mixin)return;t=_(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}(t.includes),n.apply(null,[a].concat(t.includes)),delete t.includes),a.options&&(t.options=n(r(a.options),t.options)),n(a,t),a._initHooks=[],a.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=a._initHooks.length;t<e;t++)a._initHooks[t].call(this)}},e},M.include=function(t){return n(this.prototype,t),this},M.mergeOptions=function(t){return n(this.prototype.options,t),this},M.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var T={on:function(t,e,n){if("object"==typeof t)for(var r in t)this._on(r,t[r],e);else for(var i=0,a=(t=f(t)).length;i<a;i++)this._on(t[i],e,n);return this},off:function(t,e,n){if(t)if("object"==typeof t)for(var r in t)this._off(r,t[r],e);else for(var i=0,a=(t=f(t)).length;i<a;i++)this._off(t[i],e,n);else delete this._events;return this},_on:function(t,e,n){this._events=this._events||{};var r=this._events[t];r||(r=[],this._events[t]=r),n===this&&(n=void 0);for(var i={fn:e,ctx:n},a=r,o=0,s=a.length;o<s;o++)if(a[o].fn===e&&a[o].ctx===n)return;a.push(i)},_off:function(t,e,n){var r,i,a;if(this._events&&(r=this._events[t]))if(e){if(n===this&&(n=void 0),r)for(i=0,a=r.length;i<a;i++){var o=r[i];if(o.ctx===n&&o.fn===e)return o.fn=u,this._firingCount&&(this._events[t]=r=r.slice()),void r.splice(i,1)}}else{for(i=0,a=r.length;i<a;i++)r[i].fn=u;delete this._events[t]}},fire:function(t,e,r){if(!this.listens(t,r))return this;var i=n({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var a=this._events[t];if(a){this._firingCount=this._firingCount+1||1;for(var o=0,s=a.length;o<s;o++){var c=a[o];c.fn.call(c.ctx||this,i)}this._firingCount--}}return r&&this._propagateEvent(i),this},listens:function(t,e){var n=this._events&&this._events[t];if(n&&n.length)return!0;if(e)for(var r in this._eventParents)if(this._eventParents[r].listens(t,e))return!0;return!1},once:function(t,e,n){if("object"==typeof t){for(var r in t)this.once(r,t[r],e);return this}var a=i(function(){this.off(t,e,n).off(t,a,n)},this);return this.on(t,e,n).on(t,a,n)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[o(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[o(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,n({layer:t.target,propagatedFrom:t.target},t),!0)}};T.addEventListener=T.on,T.removeEventListener=T.clearAllEventListeners=T.off,T.addOneTimeEventListener=T.once,T.fireEvent=T.fire,T.hasEventListeners=T.listens;var D=M.extend(T);function R(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}var P=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function O(t,e,n){return t instanceof R?t:_(t)?new R(t[0],t[1]):void 0===t||null===t?t:"object"==typeof t&&"x"in t&&"y"in t?new R(t.x,t.y):new R(t,e,n)}function A(t,e){if(t)for(var n=e?[t,e]:t,r=0,i=n.length;r<i;r++)this.extend(n[r])}function N(t,e){return!t||t instanceof A?t:new A(t,e)}function B(t,e){if(t)for(var n=e?[t,e]:t,r=0,i=n.length;r<i;r++)this.extend(n[r])}function j(t,e){return t instanceof B?t:new B(t,e)}function F(t,e,n){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==n&&(this.alt=+n)}function Y(t,e,n){return t instanceof F?t:_(t)&&"object"!=typeof t[0]?3===t.length?new F(t[0],t[1],t[2]):2===t.length?new F(t[0],t[1]):null:void 0===t||null===t?t:"object"==typeof t&&"lat"in t?new F(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new F(t,e,n)}R.prototype={clone:function(){return new R(this.x,this.y)},add:function(t){return this.clone()._add(O(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(O(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new R(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new R(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=P(this.x),this.y=P(this.y),this},distanceTo:function(t){var e=(t=O(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=O(t)).x===this.x&&t.y===this.y},contains:function(t){return t=O(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+l(this.x)+", "+l(this.y)+")"}},A.prototype={extend:function(t){return t=O(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new R((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new R(this.min.x,this.max.y)},getTopRight:function(){return new R(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,n;return(t="number"==typeof t[0]||t instanceof R?O(t):N(t))instanceof A?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=N(t);var e=this.min,n=this.max,r=t.min,i=t.max,a=i.x>=e.x&&r.x<=n.x,o=i.y>=e.y&&r.y<=n.y;return a&&o},overlaps:function(t){t=N(t);var e=this.min,n=this.max,r=t.min,i=t.max,a=i.x>e.x&&r.x<n.x,o=i.y>e.y&&r.y<n.y;return a&&o},isValid:function(){return!(!this.min||!this.max)}},B.prototype={extend:function(t){var e,n,r=this._southWest,i=this._northEast;if(t instanceof F)e=t,n=t;else{if(!(t instanceof B))return t?this.extend(Y(t)||j(t)):this;if(e=t._southWest,n=t._northEast,!e||!n)return this}return r||i?(r.lat=Math.min(e.lat,r.lat),r.lng=Math.min(e.lng,r.lng),i.lat=Math.max(n.lat,i.lat),i.lng=Math.max(n.lng,i.lng)):(this._southWest=new F(e.lat,e.lng),this._northEast=new F(n.lat,n.lng)),this},pad:function(t){var e=this._southWest,n=this._northEast,r=Math.abs(e.lat-n.lat)*t,i=Math.abs(e.lng-n.lng)*t;return new B(new F(e.lat-r,e.lng-i),new F(n.lat+r,n.lng+i))},getCenter:function(){return new F((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new F(this.getNorth(),this.getWest())},getSouthEast:function(){return new F(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof F||"lat"in t?Y(t):j(t);var e,n,r=this._southWest,i=this._northEast;return t instanceof B?(e=t.getSouthWest(),n=t.getNorthEast()):e=n=t,e.lat>=r.lat&&n.lat<=i.lat&&e.lng>=r.lng&&n.lng<=i.lng},intersects:function(t){t=j(t);var e=this._southWest,n=this._northEast,r=t.getSouthWest(),i=t.getNorthEast(),a=i.lat>=e.lat&&r.lat<=n.lat,o=i.lng>=e.lng&&r.lng<=n.lng;return a&&o},overlaps:function(t){t=j(t);var e=this._southWest,n=this._northEast,r=t.getSouthWest(),i=t.getNorthEast(),a=i.lat>e.lat&&r.lat<n.lat,o=i.lng>e.lng&&r.lng<n.lng;return a&&o},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=j(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},F.prototype={equals:function(t,e){return!!t&&(t=Y(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+l(this.lat,t)+", "+l(this.lng,t)+")"},distanceTo:function(t){return V.distance(this,Y(t))},wrap:function(){return V.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return j([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new F(this.lat,this.lng,this.alt)}};var $,z={latLngToPoint:function(t,e){var n=this.projection.project(t),r=this.scale(e);return this.transformation._transform(n,r)},pointToLatLng:function(t,e){var n=this.scale(e),r=this.transformation.untransform(t,n);return this.projection.unproject(r)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,n=this.scale(t);return new A(this.transformation.transform(e.min,n),this.transformation.transform(e.max,n))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?c(t.lng,this.wrapLng,!0):t.lng;return new F(this.wrapLat?c(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),n=this.wrapLatLng(e),r=e.lat-n.lat,i=e.lng-n.lng;if(0===r&&0===i)return t;var a=t.getSouthWest(),o=t.getNorthEast();return new B(new F(a.lat-r,a.lng-i),new F(o.lat-r,o.lng-i))}},V=n({},z,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,r=t.lat*n,i=e.lat*n,a=Math.sin((e.lat-t.lat)*n/2),o=Math.sin((e.lng-t.lng)*n/2),s=a*a+Math.cos(r)*Math.cos(i)*o*o,c=2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s));return this.R*c}}),H={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,n=this.MAX_LATITUDE,r=Math.max(Math.min(n,t.lat),-n),i=Math.sin(r*e);return new R(this.R*t.lng*e,this.R*Math.log((1+i)/(1-i))/2)},unproject:function(t){var e=180/Math.PI;return new F((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:($=6378137*Math.PI,new A([-$,-$],[$,$]))};function q(t,e,n,r){if(_(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=n,this._d=r}function W(t,e,n,r){return new q(t,e,n,r)}q.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new R((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var U=n({},V,{code:"EPSG:3857",projection:H,transformation:function(){var t=.5/(Math.PI*H.R);return W(t,.5,-t,.5)}()}),G=n({},U,{code:"EPSG:900913"});function K(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function X(t,e){var n,r,i,a,o,s,c="";for(n=0,i=t.length;n<i;n++){for(r=0,a=(o=t[n]).length;r<a;r++)s=o[r],c+=(r?"L":"M")+s.x+" "+s.y;c+=e?It?"z":"x":""}return c||"M0 0"}var J=document.documentElement.style,Z="ActiveXObject"in window,Q=Z&&!document.addEventListener,tt="msLaunchUri"in navigator&&!("documentMode"in document),et=Tt("webkit"),nt=Tt("android"),rt=Tt("android 2")||Tt("android 3"),it=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),at=nt&&Tt("Google")&&it<537&&!("AudioNode"in window),ot=!!window.opera,st=Tt("chrome"),ct=Tt("gecko")&&!et&&!ot&&!Z,ut=!st&&Tt("safari"),lt=Tt("phantom"),dt="OTransition"in J,ft=0===navigator.platform.indexOf("Win"),ht=Z&&"transition"in J,pt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!rt,mt="MozPerspective"in J,vt=!window.L_DISABLE_3D&&(ht||pt||mt)&&!dt&&!lt,_t="undefined"!=typeof orientation||Tt("mobile"),gt=_t&&et,bt=_t&&pt,yt=!window.PointerEvent&&window.MSPointerEvent,xt=!(!window.PointerEvent&&!yt),wt=!window.L_NO_TOUCH&&(xt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),kt=_t&&ot,Ct=_t&&ct,Et=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,St=!!document.createElement("canvas").getContext,It=!(!document.createElementNS||!K("svg").createSVGRect),Mt=!It&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function Tt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Dt=(Object.freeze||Object)({ie:Z,ielt9:Q,edge:tt,webkit:et,android:nt,android23:rt,androidStock:at,opera:ot,chrome:st,gecko:ct,safari:ut,phantom:lt,opera12:dt,win:ft,ie3d:ht,webkit3d:pt,gecko3d:mt,any3d:vt,mobile:_t,mobileWebkit:gt,mobileWebkit3d:bt,msPointer:yt,pointer:xt,touch:wt,mobileOpera:kt,mobileGecko:Ct,retina:Et,canvas:St,svg:It,vml:Mt}),Rt=yt?"MSPointerDown":"pointerdown",Pt=yt?"MSPointerMove":"pointermove",Ot=yt?"MSPointerUp":"pointerup",Lt=yt?"MSPointerCancel":"pointercancel",At=["INPUT","SELECT","OPTION"],Nt={},Bt=!1,jt=0;function Ft(t,e,n,r){return"touchstart"===e?function(t,e,n){var r=i(function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(At.indexOf(t.target.tagName)<0))return;Ne(t)}Vt(t,e)});t["_leaflet_touchstart"+n]=r,t.addEventListener(Rt,r,!1),Bt||(document.documentElement.addEventListener(Rt,Yt,!0),document.documentElement.addEventListener(Pt,$t,!0),document.documentElement.addEventListener(Ot,zt,!0),document.documentElement.addEventListener(Lt,zt,!0),Bt=!0)}(t,n,r):"touchmove"===e?function(t,e,n){var r=function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&Vt(t,e)};t["_leaflet_touchmove"+n]=r,t.addEventListener(Pt,r,!1)}(t,n,r):"touchend"===e&&function(t,e,n){var r=function(t){Vt(t,e)};t["_leaflet_touchend"+n]=r,t.addEventListener(Ot,r,!1),t.addEventListener(Lt,r,!1)}(t,n,r),this}function Yt(t){Nt[t.pointerId]=t,jt++}function $t(t){Nt[t.pointerId]&&(Nt[t.pointerId]=t)}function zt(t){delete Nt[t.pointerId],jt--}function Vt(t,e){for(var n in t.touches=[],Nt)t.touches.push(Nt[n]);t.changedTouches=[t],e(t)}var Ht=yt?"MSPointerDown":xt?"pointerdown":"touchstart",qt=yt?"MSPointerUp":xt?"pointerup":"touchend",Wt="_leaflet_";function Ut(t,e,n){var r,i,a=!1,o=250;function s(t){var e;if(xt){if(!tt||"mouse"===t.pointerType)return;e=jt}else e=t.touches.length;if(!(e>1)){var n=Date.now(),s=n-(r||n);i=t.touches?t.touches[0]:t,a=s>0&&s<=o,r=n}}function c(t){if(a&&!i.cancelBubble){if(xt){if(!tt||"mouse"===t.pointerType)return;var n,o,s={};for(o in i)n=i[o],s[o]=n&&n.bind?n.bind(i):n;i=s}i.type="dblclick",i.button=0,e(i),r=null}}return t[Wt+Ht+n]=s,t[Wt+qt+n]=c,t[Wt+"dblclick"+n]=e,t.addEventListener(Ht,s,!1),t.addEventListener(qt,c,!1),t.addEventListener("dblclick",e,!1),this}function Gt(t,e){var n=t[Wt+Ht+e],r=t[Wt+qt+e],i=t[Wt+"dblclick"+e];return t.removeEventListener(Ht,n,!1),t.removeEventListener(qt,r,!1),tt||t.removeEventListener("dblclick",i,!1),this}var Kt,Xt,Jt,Zt,Qt,te=ve(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ee=ve(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ne="webkitTransition"===ee||"OTransition"===ee?ee+"End":"transitionend";function re(t){return"string"==typeof t?document.getElementById(t):t}function ie(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var r=document.defaultView.getComputedStyle(t,null);n=r?r[e]:null}return"auto"===n?null:n}function ae(t,e,n){var r=document.createElement(t);return r.className=e||"",n&&n.appendChild(r),r}function oe(t){var e=t.parentNode;e&&e.removeChild(t)}function se(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ce(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ue(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function le(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=pe(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function de(t,e){if(void 0!==t.classList)for(var n=f(e),r=0,i=n.length;r<i;r++)t.classList.add(n[r]);else if(!le(t,e)){var a=pe(t);he(t,(a?a+" ":"")+e)}}function fe(t,e){void 0!==t.classList?t.classList.remove(e):he(t,d((" "+pe(t)+" ").replace(" "+e+" "," ")))}function he(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function pe(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function me(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&function(t,e){var n=!1,r="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(r)}catch(t){if(1===e)return}e=Math.round(100*e),n?(n.Enabled=100!==e,n.Opacity=e):t.style.filter+=" progid:"+r+"(opacity="+e+")"}(t,e)}function ve(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function _e(t,e,n){var r=e||new R(0,0);t.style[te]=(ht?"translate("+r.x+"px,"+r.y+"px)":"translate3d("+r.x+"px,"+r.y+"px,0)")+(n?" scale("+n+")":"")}function ge(t,e){t._leaflet_pos=e,vt?_e(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function be(t){return t._leaflet_pos||new R(0,0)}if("onselectstart"in document)Kt=function(){Me(window,"selectstart",Ne)},Xt=function(){De(window,"selectstart",Ne)};else{var ye=ve(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Kt=function(){if(ye){var t=document.documentElement.style;Jt=t[ye],t[ye]="none"}},Xt=function(){ye&&(document.documentElement.style[ye]=Jt,Jt=void 0)}}function xe(){Me(window,"dragstart",Ne)}function we(){De(window,"dragstart",Ne)}function ke(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Ce(),Zt=t,Qt=t.style.outline,t.style.outline="none",Me(window,"keydown",Ce))}function Ce(){Zt&&(Zt.style.outline=Qt,Zt=void 0,Qt=void 0,De(window,"keydown",Ce))}function Ee(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Se(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Ie=(Object.freeze||Object)({TRANSFORM:te,TRANSITION:ee,TRANSITION_END:ne,get:re,getStyle:ie,create:ae,remove:oe,empty:se,toFront:ce,toBack:ue,hasClass:le,addClass:de,removeClass:fe,setClass:he,getClass:pe,setOpacity:me,testProp:ve,setTransform:_e,setPosition:ge,getPosition:be,disableTextSelection:Kt,enableTextSelection:Xt,disableImageDrag:xe,enableImageDrag:we,preventOutline:ke,restoreOutline:Ce,getSizedParentNode:Ee,getScale:Se});function Me(t,e,n,r){if("object"==typeof e)for(var i in e)Re(t,i,e[i],n);else for(var a=0,o=(e=f(e)).length;a<o;a++)Re(t,e[a],n,r);return this}var Te="_leaflet_events";function De(t,e,n,r){if("object"==typeof e)for(var i in e)Pe(t,i,e[i],n);else if(e)for(var a=0,o=(e=f(e)).length;a<o;a++)Pe(t,e[a],n,r);else{for(var s in t[Te])Pe(t,s,t[Te][s]);delete t[Te]}return this}function Re(t,e,n,r){var i=e+o(n)+(r?"_"+o(r):"");if(t[Te]&&t[Te][i])return this;var a=function(e){return n.call(r||t,e||window.event)},s=a;xt&&0===e.indexOf("touch")?Ft(t,e,a,i):!wt||"dblclick"!==e||!Ut||xt&&st?"addEventListener"in t?"mousewheel"===e?t.addEventListener("onwheel"in t?"wheel":"mousewheel",a,!1):"mouseenter"===e||"mouseleave"===e?(a=function(e){e=e||window.event,qe(t,e)&&s(e)},t.addEventListener("mouseenter"===e?"mouseover":"mouseout",a,!1)):("click"===e&&nt&&(a=function(t){!function(t,e){var n=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,r=$e&&n-$e;if(r&&r>100&&r<500||t.target._simulatedClick&&!t._simulated)return void Be(t);$e=n,e(t)}(t,s)}),t.addEventListener(e,a,!1)):"attachEvent"in t&&t.attachEvent("on"+e,a):Ut(t,a,i),t[Te]=t[Te]||{},t[Te][i]=a}function Pe(t,e,n,r){var i=e+o(n)+(r?"_"+o(r):""),a=t[Te]&&t[Te][i];if(!a)return this;xt&&0===e.indexOf("touch")?function(t,e,n){var r=t["_leaflet_"+e+n];"touchstart"===e?t.removeEventListener(Rt,r,!1):"touchmove"===e?t.removeEventListener(Pt,r,!1):"touchend"===e&&(t.removeEventListener(Ot,r,!1),t.removeEventListener(Lt,r,!1))}(t,e,i):!wt||"dblclick"!==e||!Gt||xt&&st?"removeEventListener"in t?"mousewheel"===e?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",a,!1):t.removeEventListener("mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,a,!1):"detachEvent"in t&&t.detachEvent("on"+e,a):Gt(t,i),t[Te][i]=null}function Oe(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,He(t),this}function Le(t){return Re(t,"mousewheel",Oe),this}function Ae(t){return Me(t,"mousedown touchstart dblclick",Oe),Re(t,"click",Ve),this}function Ne(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Be(t){return Ne(t),Oe(t),this}function je(t,e){if(!e)return new R(t.clientX,t.clientY);var n=Se(e),r=n.boundingClientRect;return new R((t.clientX-r.left)/n.x-e.clientLeft,(t.clientY-r.top)/n.y-e.clientTop)}var Fe=ft&&st?2*window.devicePixelRatio:ct?window.devicePixelRatio:1;function Ye(t){return tt?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Fe:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}var $e,ze={};function Ve(t){ze[t.type]=!0}function He(t){var e=ze[t.type];return ze[t.type]=!1,e}function qe(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(t){return!1}return n!==t}var We=(Object.freeze||Object)({on:Me,off:De,stopPropagation:Oe,disableScrollPropagation:Le,disableClickPropagation:Ae,preventDefault:Ne,stop:Be,getMousePosition:je,getWheelDelta:Ye,fakeStop:Ve,skipped:He,isExternalTarget:qe,addListener:Me,removeListener:De}),Ue=D.extend({run:function(t,e,n,r){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(r||.5,.2),this._startPos=be(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=E(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;e<n?this._runFrame(this._easeOut(e/n),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),ge(this._el,n),this.fire("step")},_complete:function(){S(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Ge=D.extend({options:{crs:U,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=h(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=i(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(Y(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ee&&vt&&!kt&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Me(this._proxy,ne,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,r){if((e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(Y(t),e,this.options.maxBounds),r=r||{},this._stop(),this._loaded&&!r.reset&&!0!==r)&&(void 0!==r.animate&&(r.zoom=n({animate:r.animate},r.zoom),r.pan=n({animate:r.animate,duration:r.duration},r.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,r.zoom):this._tryAnimatedPan(t,r.pan)))return clearTimeout(this._sizeTimer),this;return this._resetView(t,e),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(vt?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(vt?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,n){var r=this.getZoomScale(e),i=this.getSize().divideBy(2),a=(t instanceof R?t:this.latLngToContainerPoint(t)).subtract(i).multiplyBy(1-1/r),o=this.containerPointToLatLng(i.add(a));return this.setView(o,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():j(t);var n=O(e.paddingTopLeft||e.padding||[0,0]),r=O(e.paddingBottomRight||e.padding||[0,0]),i=this.getBoundsZoom(t,!1,n.add(r));if((i="number"==typeof e.maxZoom?Math.min(e.maxZoom,i):i)===1/0)return{center:t.getCenter(),zoom:i};var a=r.subtract(n).divideBy(2),o=this.project(t.getSouthWest(),i),s=this.project(t.getNorthEast(),i);return{center:this.unproject(o.add(s).divideBy(2).add(a),i),zoom:i}},fitBounds:function(t,e){if(!(t=j(t)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(t,e);return this.setView(n.center,n.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(t=O(t).round(),e=e||{},!t.x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Ue,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){de(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,n,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,n){if(!1===(n=n||{}).animate||!vt)return this.setView(t,e,n);this._stop();var r=this.project(this.getCenter()),i=this.project(t),a=this.getSize(),o=this._zoom;t=Y(t),e=void 0===e?o:e;var s=Math.max(a.x,a.y),c=s*this.getZoomScale(o,e),u=i.distanceTo(r)||1,l=1.42,d=l*l;function f(t){var e=(c*c-s*s+(t?-1:1)*d*d*u*u)/(2*(t?c:s)*d*u),n=Math.sqrt(e*e+1)-e;return n<1e-9?-18:Math.log(n)}function h(t){return(Math.exp(t)-Math.exp(-t))/2}function p(t){return(Math.exp(t)+Math.exp(-t))/2}var m=f(0);function v(t){return s*(p(m)*(h(e=m+l*t)/p(e))-h(m))/d;var e}var _=Date.now(),g=(f(1)-m)/l,b=n.duration?1e3*n.duration:1e3*g*.8;return this._moveStart(!0,n.noMoveStart),function n(){var a=(Date.now()-_)/b,c=function(t){return 1-Math.pow(1-t,1.5)}(a)*g;a<=1?(this._flyToFrame=E(n,this),this._move(this.unproject(r.add(i.subtract(r).multiplyBy(v(c)/u)),o),this.getScaleZoom(s/function(t){return s*(p(m)/p(m+l*t))}(c),o),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,e){var n=this._getBoundsCenterZoom(t,e);return this.flyTo(n.center,n.zoom,e)},setMaxBounds:function(t){return(t=j(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),r=this._limitCenter(n,this._zoom,j(t));return n.equals(r)||this.panTo(r,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=O((e=e||{}).paddingTopLeft||e.padding||[0,0]),r=O(e.paddingBottomRight||e.padding||[0,0]),i=this.getCenter(),a=this.project(i),o=this.project(t),s=this.getPixelBounds(),c=s.getSize().divideBy(2),u=N([s.min.add(n),s.max.subtract(r)]);if(!u.contains(o)){this._enforcingBounds=!0;var l=a.subtract(o),d=O(o.x+l.x,o.y+l.y);(o.x<u.min.x||o.x>u.max.x)&&(d.x=a.x-l.x,l.x>0?d.x+=c.x-n.x:d.x-=c.x-r.x),(o.y<u.min.y||o.y>u.max.y)&&(d.y=a.y-l.y,l.y>0?d.y+=c.y-n.y:d.y-=c.y-r.y),this.panTo(this.unproject(d),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=n({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var r=this.getSize(),a=e.divideBy(2).round(),o=r.divideBy(2).round(),s=a.subtract(o);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(i(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:r})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=n({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=i(this._handleGeolocationResponse,this),r=i(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,r,t):navigator.geolocation.getCurrentPosition(e,r,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})},_handleGeolocationResponse:function(t){var e=new F(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),r=this._locateOptions;if(r.setView){var i=this.getBoundsZoom(n);this.setView(e,r.maxZoom?Math.min(i,r.maxZoom):i)}var a={latlng:e,bounds:n,timestamp:t.timestamp};for(var o in t.coords)"number"==typeof t.coords[o]&&(a[o]=t.coords[o]);this.fire("locationfound",a)},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),oe(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(S(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)oe(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=ae("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new B(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=j(t),n=O(n||[0,0]);var r=this.getZoom()||0,i=this.getMinZoom(),a=this.getMaxZoom(),o=t.getNorthWest(),s=t.getSouthEast(),c=this.getSize().subtract(n),u=N(this.project(s,r),this.project(o,r)).getSize(),l=vt?this.options.zoomSnap:1,d=c.x/u.x,f=c.y/u.y,h=e?Math.max(d,f):Math.min(d,f);return r=this.getScaleZoom(h,r),l&&(r=Math.round(r/(l/100))*(l/100),r=e?Math.ceil(r/l)*l:Math.floor(r/l)*l),Math.max(i,Math.min(a,r))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new R(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new A(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=void 0===e?this._zoom:e;var r=n.zoom(t*n.scale(e));return isNaN(r)?1/0:r},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(Y(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(O(t),e)},layerPointToLatLng:function(t){var e=O(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(Y(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(Y(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(j(t))},distance:function(t,e){return this.options.crs.distance(Y(t),Y(e))},containerPointToLayerPoint:function(t){return O(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return O(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(O(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(Y(t)))},mouseEventToContainerPoint:function(t){return je(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=re(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Me(e,"scroll",this._onScroll,this),this._containerId=o(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&vt,de(t,"leaflet-container"+(wt?" leaflet-touch":"")+(Et?" leaflet-retina":"")+(Q?" leaflet-oldie":"")+(ut?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=ie(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ge(this._mapPane,new R(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(de(t.markerPane,"leaflet-zoom-hide"),de(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){ge(this._mapPane,new R(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var r=this._zoom!==e;this._moveStart(r,!1)._move(t,e)._moveEnd(r),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n){void 0===e&&(e=this._zoom);var r=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(r||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return S(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){ge(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[o(this._container)]=this;var e=t?De:Me;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),vt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){S(this._resizeRequest),this._resizeRequest=E(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,r=[],i="mouseout"===e||"mouseover"===e,a=t.target||t.srcElement,s=!1;a;){if((n=this._targets[o(a)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(n)){s=!0;break}if(n&&n.listens(e,!0)){if(i&&!qe(a,t))break;if(r.push(n),i)break}if(a===this._container)break;a=a.parentNode}return r.length||s||i||!qe(a,t)||(r=[this]),r},_handleDOMEvent:function(t){if(this._loaded&&!He(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||ke(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,r){if("click"===t.type){var i=n({},t);i.type="preclick",this._fireDOMEvent(i,i.type,r)}if(!t._stopped&&(r=(r||[]).concat(this._findEventTargets(t,e))).length){var a=r[0];"contextmenu"===e&&a.listens(e,!0)&&Ne(t);var o={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var s=a.getLatLng&&(!a._radius||a._radius<=10);o.containerPoint=s?this.latLngToContainerPoint(a.getLatLng()):this.mouseEventToContainerPoint(t),o.layerPoint=this.containerPointToLayerPoint(o.containerPoint),o.latlng=s?a.getLatLng():this.layerPointToLatLng(o.layerPoint)}for(var c=0;c<r.length;c++)if(r[c].fire(e,o,!0),o.originalEvent._stopped||!1===r[c].options.bubblingMouseEvents&&-1!==g(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return be(this._mapPane)||new R(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,n){var r=this._getNewPixelOrigin(n,e);return this.project(t,e)._subtract(r)},_latLngBoundsToNewLayerBounds:function(t,e,n){var r=this._getNewPixelOrigin(n,e);return N([this.project(t.getSouthWest(),e)._subtract(r),this.project(t.getNorthWest(),e)._subtract(r),this.project(t.getSouthEast(),e)._subtract(r),this.project(t.getNorthEast(),e)._subtract(r)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,n){if(!n)return t;var r=this.project(t,e),i=this.getSize().divideBy(2),a=new A(r.subtract(i),r.add(i)),o=this._getBoundsOffset(a,n,e);return o.round().equals([0,0])?t:this.unproject(r.add(o),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),r=new A(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(r,e))},_getBoundsOffset:function(t,e,n){var r=N(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),i=r.min.subtract(t.min),a=r.max.subtract(t.max);return new R(this._rebound(i.x,-a.x),this._rebound(i.y,-a.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),r=vt?this.options.zoomSnap:1;return r&&(t=Math.round(t/r)*r),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){fe(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n))&&(this.panBy(n,e),!0)},_createAnimProxy:function(){var t=this._proxy=ae("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=te,n=this._proxy.style[e];_e(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",function(){var t=this.getCenter(),e=this.getZoom();_e(this._proxy,this.project(t,e),this.getZoomScale(e,1))},this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){oe(this._proxy),delete this._proxy},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var r=this.getZoomScale(e),i=this._getCenterOffset(t)._divideBy(1-1/r);return!(!0!==n.animate&&!this.getSize().contains(i))&&(E(function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,n,r){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,de(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:r}),setTimeout(i(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&fe(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),E(function(){this._moveEnd(!0)},this))}});var Ke=M.extend({options:{position:"topright"},initialize:function(t){h(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),r=t._controlCorners[n];return de(e,"leaflet-control"),-1!==n.indexOf("bottom")?r.insertBefore(e,r.firstChild):r.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(oe(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Xe=function(t){return new Ke(t)};Ge.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=ae("div",e+"control-container",this._container);function r(r,i){var a=e+r+" "+e+i;t[r+i]=ae("div",a,n)}r("top","left"),r("top","right"),r("bottom","left"),r("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)oe(this._controlCorners[t]);oe(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Je=Ke.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,r){return n<r?-1:r<n?1:0}},initialize:function(t,e,n){for(var r in h(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[r],r);for(r in e)this._addLayer(e[r],r,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return Ke.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(o(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){de(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(de(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):fe(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return fe(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=ae("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Ae(e),Le(e);var r=this._section=ae("section",t+"-list");n&&(this._map.on("click",this.collapse,this),nt||Me(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var i=this._layersLink=ae("a",t+"-toggle",e);i.href="#",i.title="Layers",wt?(Me(i,"click",Be),Me(i,"click",this.expand,this)):Me(i,"focus",this.expand,this),n||this.expand(),this._baseLayersList=ae("div",t+"-base",r),this._separator=ae("div",t+"-separator",r),this._overlaysList=ae("div",t+"-overlays",r),e.appendChild(r)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&o(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort(i(function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;se(this._baseLayersList),se(this._overlaysList),this._layerControlInputs=[];var t,e,n,r,i=0;for(n=0;n<this._layers.length;n++)r=this._layers[n],this._addItem(r),e=e||r.overlay,t=t||!r.overlay,i+=r.overlay?0:1;return this.options.hideSingleBase&&(t=t&&i>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(o(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",r=document.createElement("div");return r.innerHTML=n,r.firstChild},_addItem:function(t){var e,n=document.createElement("label"),r=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=r):e=this._createRadioElement("leaflet-base-layers_"+o(this),r),this._layerControlInputs.push(e),e.layerId=o(t.layer),Me(e,"click",this._onInputClick,this);var i=document.createElement("span");i.innerHTML=" "+t.name;var a=document.createElement("div");return n.appendChild(a),a.appendChild(e),a.appendChild(i),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,r=[],i=[];this._handlingClick=!0;for(var a=n.length-1;a>=0;a--)t=n[a],e=this._getLayer(t.layerId).layer,t.checked?r.push(e):t.checked||i.push(e);for(a=0;a<i.length;a++)this._map.hasLayer(i[a])&&this._map.removeLayer(i[a]);for(a=0;a<r.length;a++)this._map.hasLayer(r[a])||this._map.addLayer(r[a]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,n=this._layerControlInputs,r=this._map.getZoom(),i=n.length-1;i>=0;i--)t=n[i],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&r<e.options.minZoom||void 0!==e.options.maxZoom&&r>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),Ze=Ke.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"&#x2212;",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=ae("div",e+" leaflet-bar"),r=this.options;return this._zoomInButton=this._createButton(r.zoomInText,r.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(r.zoomOutText,r.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,r,i){var a=ae("a",n,r);return a.innerHTML=t,a.href="#",a.title=e,a.setAttribute("role","button"),a.setAttribute("aria-label",e),Ae(a),Me(a,"click",Be),Me(a,"click",i,this),Me(a,"click",this._refocusOnMap,this),a},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";fe(this._zoomInButton,e),fe(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&de(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&de(this._zoomInButton,e)}});Ge.mergeOptions({zoomControl:!0}),Ge.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ze,this.addControl(this.zoomControl))});var Qe=Ke.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e=ae("div","leaflet-control-scale"),n=this.options;return this._addScales(n,"leaflet-control-scale-line",e),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=ae("div",e,n)),t.imperial&&(this._iScale=ae("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},_updateImperial:function(t){var e,n,r,i=3.2808399*t;i>5280?(e=i/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mi",n/e)):(r=this._getRoundNum(i),this._updateScale(this._iScale,r+" ft",r/i))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),tn=Ke.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){h(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=ae("div","leaflet-control-attribution"),Ae(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(" | ")}}});Ge.mergeOptions({attributionControl:!0}),Ge.addInitHook(function(){this.options.attributionControl&&(new tn).addTo(this)});Ke.Layers=Je,Ke.Zoom=Ze,Ke.Scale=Qe,Ke.Attribution=tn,Xe.layers=function(t,e,n){return new Je(t,e,n)},Xe.zoom=function(t){return new Ze(t)},Xe.scale=function(t){return new Qe(t)},Xe.attribution=function(t){return new tn(t)};var en=M.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});en.addTo=function(t,e){return t.addHandler(e,this),this};var nn,rn={Events:T},an=wt?"touchstart mousedown":"mousedown",on={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},sn={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},cn=D.extend({options:{clickTolerance:3},initialize:function(t,e,n,r){h(this,r),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(Me(this._dragStartTarget,an,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(cn._dragging===this&&this.finishDrag(),De(this._dragStartTarget,an,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!le(this._element,"leaflet-zoom-anim")&&!(cn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(cn._dragging=this,this._preventOutline&&ke(this._element),xe(),Kt(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Ee(this._element);this._startPoint=new R(e.clientX,e.clientY),this._parentScale=Se(n),Me(document,sn[t.type],this._onMove,this),Me(document,on[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new R(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,Ne(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=be(this._element).subtract(n),de(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),de(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,S(this._animRequest),this._lastEvent=t,this._animRequest=E(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),ge(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in fe(document.body,"leaflet-dragging"),this._lastTarget&&(fe(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),sn)De(document,sn[t],this._onMove,this),De(document,on[t],this._onUp,this);we(),Xt(),this._moved&&this._moving&&(S(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,cn._dragging=!1}});function un(t,e){if(!e||!t.length)return t.slice();var n=e*e;return t=function(t,e){var n=t.length,r=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);r[0]=r[n-1]=1,function t(e,n,r,i,a){var o,s,c,u=0;for(s=i+1;s<=a-1;s++)(c=pn(e[s],e[i],e[a],!0))>u&&(o=s,u=c);u>r&&(n[o]=1,t(e,n,r,i,o),t(e,n,r,o,a))}(t,r,e,0,n-1);var i,a=[];for(i=0;i<n;i++)r[i]&&a.push(t[i]);return a}(t=function(t,e){for(var n=[t[0]],r=1,i=0,a=t.length;r<a;r++)o=t[r],s=t[i],void 0,void 0,c=s.x-o.x,u=s.y-o.y,c*c+u*u>e&&(n.push(t[r]),i=r);var o,s,c,u;i<a-1&&n.push(t[a-1]);return n}(t,n),n)}function ln(t,e,n){return Math.sqrt(pn(t,e,n,!0))}function dn(t,e,n,r,i){var a,o,s,c=r?nn:hn(t,n),u=hn(e,n);for(nn=u;;){if(!(c|u))return[t,e];if(c&u)return!1;s=hn(o=fn(t,e,a=c||u,n,i),n),a===c?(t=o,c=s):(e=o,u=s)}}function fn(t,e,n,r,i){var a,o,s=e.x-t.x,c=e.y-t.y,u=r.min,l=r.max;return 8&n?(a=t.x+s*(l.y-t.y)/c,o=l.y):4&n?(a=t.x+s*(u.y-t.y)/c,o=u.y):2&n?(a=l.x,o=t.y+c*(l.x-t.x)/s):1&n&&(a=u.x,o=t.y+c*(u.x-t.x)/s),new R(a,o,i)}function hn(t,e){var n=0;return t.x<e.min.x?n|=1:t.x>e.max.x&&(n|=2),t.y<e.min.y?n|=4:t.y>e.max.y&&(n|=8),n}function pn(t,e,n,r){var i,a=e.x,o=e.y,s=n.x-a,c=n.y-o,u=s*s+c*c;return u>0&&((i=((t.x-a)*s+(t.y-o)*c)/u)>1?(a=n.x,o=n.y):i>0&&(a+=s*i,o+=c*i)),s=t.x-a,c=t.y-o,r?s*s+c*c:new R(a,o)}function mn(t){return!_(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function vn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),mn(t)}var _n=(Object.freeze||Object)({simplify:un,pointToSegmentDistance:ln,closestPointOnSegment:function(t,e,n){return pn(t,e,n)},clipSegment:dn,_getEdgeIntersection:fn,_getBitCode:hn,_sqClosestPointOnSegment:pn,isFlat:mn,_flat:vn});function gn(t,e,n){var r,i,a,o,s,c,u,l,d,f=[1,4,2,8];for(i=0,u=t.length;i<u;i++)t[i]._code=hn(t[i],e);for(o=0;o<4;o++){for(l=f[o],r=[],i=0,a=(u=t.length)-1;i<u;a=i++)s=t[i],c=t[a],s._code&l?c._code&l||((d=fn(c,s,l,e,n))._code=hn(d,e),r.push(d)):(c._code&l&&((d=fn(c,s,l,e,n))._code=hn(d,e),r.push(d)),r.push(s));t=r}return t}var bn=(Object.freeze||Object)({clipPolygon:gn}),yn={project:function(t){return new R(t.lng,t.lat)},unproject:function(t){return new F(t.y,t.x)},bounds:new A([-180,-90],[180,90])},xn={R:6378137,R_MINOR:6356752.314245179,bounds:new A([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,r=t.lat*e,i=this.R_MINOR/n,a=Math.sqrt(1-i*i),o=a*Math.sin(r),s=Math.tan(Math.PI/4-r/2)/Math.pow((1-o)/(1+o),a/2);return r=-n*Math.log(Math.max(s,1e-10)),new R(t.lng*e*n,r)},unproject:function(t){for(var e,n=180/Math.PI,r=this.R,i=this.R_MINOR/r,a=Math.sqrt(1-i*i),o=Math.exp(-t.y/r),s=Math.PI/2-2*Math.atan(o),c=0,u=.1;c<15&&Math.abs(u)>1e-7;c++)e=a*Math.sin(s),e=Math.pow((1-e)/(1+e),a/2),s+=u=Math.PI/2-2*Math.atan(o*e)-s;return new F(s*n,t.x*n/r)}},wn=(Object.freeze||Object)({LonLat:yn,Mercator:xn,SphericalMercator:H}),kn=n({},V,{code:"EPSG:3395",projection:xn,transformation:function(){var t=.5/(Math.PI*xn.R);return W(t,.5,-t,.5)}()}),Cn=n({},V,{code:"EPSG:4326",projection:yn,transformation:W(1/180,1,-1/180,.5)}),En=n({},z,{projection:yn,transformation:W(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,r=e.lat-t.lat;return Math.sqrt(n*n+r*r)},infinite:!0});z.Earth=V,z.EPSG3395=kn,z.EPSG3857=U,z.EPSG900913=G,z.EPSG4326=Cn,z.Simple=En;var Sn=D.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[o(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[o(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var n=this.getEvents();e.on(n,this),this.once("remove",function(){e.off(n,this)},this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});Ge.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=o(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=o(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&o(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?_(t)?t:[t]:[]).length;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[o(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=o(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,n=this._getZoomSpan();for(var r in this._zoomBoundLayers){var i=this._zoomBoundLayers[r].options;t=void 0===i.minZoom?t:Math.min(t,i.minZoom),e=void 0===i.maxZoom?e:Math.max(e,i.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var In=Sn.extend({initialize:function(t,e){var n,r;if(h(this,e),this._layers={},t)for(n=0,r=t.length;n<r;n++)this.addLayer(t[n])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,n,r=Array.prototype.slice.call(arguments,1);for(e in this._layers)(n=this._layers[e])[t]&&n[t].apply(n,r);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return o(t)}}),Mn=In.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),In.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),In.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new B;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),Tn=M.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){h(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var n=this._getIconUrl(t);if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var r=this._createImg(n,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(r,t),r},_setIconStyles:function(t,e){var n=this.options,r=n[e+"Size"];"number"==typeof r&&(r=[r,r]);var i=O(r),a=O("shadow"===e&&n.shadowAnchor||n.iconAnchor||i&&i.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(n.className||""),a&&(t.style.marginLeft=-a.x+"px",t.style.marginTop=-a.y+"px"),i&&(t.style.width=i.x+"px",t.style.height=i.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Et&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});var Dn=Tn.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return Dn.imagePath||(Dn.imagePath=this._detectIconPath()),(this.options.imagePath||Dn.imagePath)+Tn.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=ae("div","leaflet-default-icon-path",document.body),e=ie(t,"background-image")||ie(t,"backgroundImage");return document.body.removeChild(t),e=null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Rn=en.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new cn(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),de(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&fe(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,n=e._map,r=this._marker.options.autoPanSpeed,i=this._marker.options.autoPanPadding,a=be(e._icon),o=n.getPixelBounds(),s=n.getPixelOrigin(),c=N(o.min._subtract(s).add(i),o.max._subtract(s).subtract(i));if(!c.contains(a)){var u=O((Math.max(c.max.x,a.x)-c.max.x)/(o.max.x-c.max.x)-(Math.min(c.min.x,a.x)-c.min.x)/(o.min.x-c.min.x),(Math.max(c.max.y,a.y)-c.max.y)/(o.max.y-c.max.y)-(Math.min(c.min.y,a.y)-c.min.y)/(o.min.y-c.min.y)).multiplyBy(r);n.panBy(u,{animate:!1}),this._draggable._newPos._add(u),this._draggable._startPos._add(u),ge(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=E(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup().fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(S(this._panRequest),this._panRequest=E(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,n=e._shadow,r=be(e._icon),i=e._map.layerPointToLatLng(r);n&&ge(n,r),e._latlng=i,t.latlng=i,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){S(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Pn=Sn.extend({options:{icon:new Dn,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){h(this,e),this._latlng=Y(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=Y(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=t.icon.createIcon(this._icon),r=!1;n!==this._icon&&(this._icon&&this._removeIcon(),r=!0,t.title&&(n.title=t.title),"IMG"===n.tagName&&(n.alt=t.alt||"")),de(n,e),t.keyboard&&(n.tabIndex="0"),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var i=t.icon.createShadow(this._shadow),a=!1;i!==this._shadow&&(this._removeShadow(),a=!0),i&&(de(i,e),i.alt=""),this._shadow=i,t.opacity<1&&this._updateOpacity(),r&&this.getPane().appendChild(this._icon),this._initInteraction(),i&&a&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),oe(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&oe(this._shadow),this._shadow=null},_setPos:function(t){ge(this._icon,t),this._shadow&&ge(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(de(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Rn)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Rn(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&me(this._icon,t),this._shadow&&me(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});var On=Sn.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return h(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t.hasOwnProperty("weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),Ln=On.extend({options:{fill:!0,radius:10},initialize:function(t,e){h(this,e),this._latlng=Y(t),this._radius=this.options.radius},setLatLng:function(t){return this._latlng=Y(t),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return On.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,n=this._clickTolerance(),r=[t+n,e+n];this._pxBounds=new A(this._point.subtract(r),this._point.add(r))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});var An=Ln.extend({initialize:function(t,e,r){if("number"==typeof e&&(e=n({},r,{radius:e})),h(this,e),this._latlng=Y(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new B(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:On.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,n=this._map,r=n.options.crs;if(r.distance===V.distance){var i=Math.PI/180,a=this._mRadius/V.R/i,o=n.project([e+a,t]),s=n.project([e-a,t]),c=o.add(s).divideBy(2),u=n.unproject(c).lat,l=Math.acos((Math.cos(a*i)-Math.sin(e*i)*Math.sin(u*i))/(Math.cos(e*i)*Math.cos(u*i)))/i;(isNaN(l)||0===l)&&(l=a/Math.cos(Math.PI/180*e)),this._point=c.subtract(n.getPixelOrigin()),this._radius=isNaN(l)?0:c.x-n.project([u,t-l]).x,this._radiusY=c.y-o.y}else{var d=r.unproject(r.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(d).x}this._updateBounds()}});var Nn=On.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){h(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,n,r=1/0,i=null,a=pn,o=0,s=this._parts.length;o<s;o++)for(var c=this._parts[o],u=1,l=c.length;u<l;u++){var d=a(t,e=c[u-1],n=c[u],!0);d<r&&(r=d,i=a(t,e,n))}return i&&(i.distance=Math.sqrt(r)),i},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,r,i,a,o,s=this._rings[0],c=s.length;if(!c)return null;for(t=0,e=0;t<c-1;t++)e+=s[t].distanceTo(s[t+1])/2;if(0===e)return this._map.layerPointToLatLng(s[0]);for(t=0,r=0;t<c-1;t++)if(i=s[t],a=s[t+1],(r+=n=i.distanceTo(a))>e)return o=(r-e)/n,this._map.layerPointToLatLng([a.x-o*(a.x-i.x),a.y-o*(a.y-i.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=Y(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new B,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return mn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=mn(t),r=0,i=t.length;r<i;r++)n?(e[r]=Y(t[r]),this._bounds.extend(e[r])):e[r]=this._convertLatLngs(t[r]);return e},_project:function(){var t=new A;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new R(t,t);this._pxBounds=new A([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)])},_projectLatlngs:function(t,e,n){var r,i,a=t[0]instanceof F,o=t.length;if(a){for(i=[],r=0;r<o;r++)i[r]=this._map.latLngToLayerPoint(t[r]),n.extend(i[r]);e.push(i)}else for(r=0;r<o;r++)this._projectLatlngs(t[r],e,n)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,n,r,i,a,o,s,c=this._parts;for(e=0,r=0,i=this._rings.length;e<i;e++)for(n=0,a=(s=this._rings[e]).length;n<a-1;n++)(o=dn(s[n],s[n+1],t,n,!0))&&(c[r]=c[r]||[],c[r].push(o[0]),o[1]===s[n+1]&&n!==a-2||(c[r].push(o[1]),r++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,r=t.length;n<r;n++)t[n]=un(t[n],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var n,r,i,a,o,s,c=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,a=this._parts.length;n<a;n++)for(r=0,i=(o=(s=this._parts[n]).length)-1;r<o;i=r++)if((e||0!==r)&&ln(t,s[i],s[r])<=c)return!0;return!1}});Nn._flat=vn;var Bn=Nn.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,r,i,a,o,s,c,u=this._rings[0],l=u.length;if(!l)return null;for(a=o=s=0,t=0,e=l-1;t<l;e=t++)n=u[t],r=u[e],i=n.y*r.x-r.y*n.x,o+=(n.x+r.x)*i,s+=(n.y+r.y)*i,a+=3*i;return c=0===a?u[0]:[o/a,s/a],this._map.layerPointToLatLng(c)},_convertLatLngs:function(t){var e=Nn.prototype._convertLatLngs.call(this,t),n=e.length;return n>=2&&e[0]instanceof F&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){Nn.prototype._setLatLngs.call(this,t),mn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return mn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new R(e,e);if(t=new A(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var r,i=0,a=this._rings.length;i<a;i++)(r=gn(this._rings[i],t,!0)).length&&this._parts.push(r)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,n,r,i,a,o,s,c,u=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,s=this._parts.length;i<s;i++)for(a=0,o=(c=(e=this._parts[i]).length)-1;a<c;o=a++)n=e[a],r=e[o],n.y>t.y!=r.y>t.y&&t.x<(r.x-n.x)*(t.y-n.y)/(r.y-n.y)+n.x&&(u=!u);return u||Nn.prototype._containsPoint.call(this,t,!0)}});var jn=Mn.extend({initialize:function(t,e){h(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,r,i=_(t)?t:t.features;if(i){for(e=0,n=i.length;e<n;e++)((r=i[e]).geometries||r.geometry||r.features||r.coordinates)&&this.addData(r);return this}var a=this.options;if(a.filter&&!a.filter(t))return this;var o=Fn(t,a);return o?(o.feature=qn(t),o.defaultOptions=o.options,this.resetStyle(o),a.onEachFeature&&a.onEachFeature(t,o),this.addLayer(o)):this},resetStyle:function(t){return t.options=n({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this},setStyle:function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function Fn(t,e){var n,r,i,a,o="Feature"===t.type?t.geometry:t,s=o?o.coordinates:null,c=[],u=e&&e.pointToLayer,l=e&&e.coordsToLatLng||Yn;if(!s&&!o)return null;switch(o.type){case"Point":return n=l(s),u?u(t,n):new Pn(n);case"MultiPoint":for(i=0,a=s.length;i<a;i++)n=l(s[i]),c.push(u?u(t,n):new Pn(n));return new Mn(c);case"LineString":case"MultiLineString":return r=$n(s,"LineString"===o.type?0:1,l),new Nn(r,e);case"Polygon":case"MultiPolygon":return r=$n(s,"Polygon"===o.type?1:2,l),new Bn(r,e);case"GeometryCollection":for(i=0,a=o.geometries.length;i<a;i++){var d=Fn({geometry:o.geometries[i],type:"Feature",properties:t.properties},e);d&&c.push(d)}return new Mn(c);default:throw new Error("Invalid GeoJSON object.")}}function Yn(t){return new F(t[1],t[0],t[2])}function $n(t,e,n){for(var r,i=[],a=0,o=t.length;a<o;a++)r=e?$n(t[a],e-1,n):(n||Yn)(t[a]),i.push(r);return i}function zn(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[l(t.lng,e),l(t.lat,e),l(t.alt,e)]:[l(t.lng,e),l(t.lat,e)]}function Vn(t,e,n,r){for(var i=[],a=0,o=t.length;a<o;a++)i.push(e?Vn(t[a],e-1,n,r):zn(t[a],r));return!e&&n&&i.push(i[0]),i}function Hn(t,e){return t.feature?n({},t.feature,{geometry:e}):qn(e)}function qn(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var Wn={toGeoJSON:function(t){return Hn(this,{type:"Point",coordinates:zn(this.getLatLng(),t)})}};function Un(t,e){return new jn(t,e)}Pn.include(Wn),An.include(Wn),Ln.include(Wn),Nn.include({toGeoJSON:function(t){var e=!mn(this._latlngs),n=Vn(this._latlngs,e?1:0,!1,t);return Hn(this,{type:(e?"Multi":"")+"LineString",coordinates:n})}}),Bn.include({toGeoJSON:function(t){var e=!mn(this._latlngs),n=e&&!mn(this._latlngs[0]),r=Vn(this._latlngs,n?2:e?1:0,!0,t);return e||(r=[r]),Hn(this,{type:(n?"Multi":"")+"Polygon",coordinates:r})}}),In.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(n){e.push(n.toGeoJSON(t).geometry.coordinates)}),Hn(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var n="GeometryCollection"===e,r=[];return this.eachLayer(function(e){if(e.toGeoJSON){var i=e.toGeoJSON(t);if(n)r.push(i.geometry);else{var a=qn(i);"FeatureCollection"===a.type?r.push.apply(r,a.features):r.push(a)}}}),n?Hn(this,{geometries:r,type:"GeometryCollection"}):{type:"FeatureCollection",features:r}}});var Gn=Un,Kn=Sn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=j(e),h(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(de(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){oe(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&ce(this._image),this},bringToBack:function(){return this._map&&ue(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=j(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:ae("img");de(e,"leaflet-image-layer"),this._zoomAnimated&&de(e,"leaflet-zoom-animated"),this.options.className&&de(e,this.options.className),e.onselectstart=u,e.onmousemove=u,e.onload=i(this.fire,this,"load"),e.onerror=i(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;_e(this._image,n,e)},_reset:function(){var t=this._image,e=new A(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();ge(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){me(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}}),Xn=Kn.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:ae("video");if(de(e,"leaflet-image-layer"),this._zoomAnimated&&de(e,"leaflet-zoom-animated"),e.onselectstart=u,e.onmousemove=u,e.onloadeddata=i(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),r=[],a=0;a<n.length;a++)r.push(n[a].src);this._url=n.length>0?r:[e.src]}else{_(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&e.style.hasOwnProperty("objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop;for(var o=0;o<this._url.length;o++){var s=ae("source");s.src=this._url[o],e.appendChild(s)}}}});var Jn=Kn.extend({_initImage:function(){var t=this._image=this._url;de(t,"leaflet-image-layer"),this._zoomAnimated&&de(t,"leaflet-zoom-animated"),t.onselectstart=u,t.onmousemove=u}});var Zn=Sn.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){h(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&me(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&me(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(me(this._container,0),this._removeTimeout=setTimeout(i(oe,void 0,this._container),200)):oe(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=Y(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&ce(this._container),this},bringToBack:function(){return this._map&&ue(this._container),this},_prepareOpen:function(t,e,n){if(e instanceof Sn||(n=e,e=t),e instanceof Mn)for(var r in t._layers){e=t._layers[r];break}if(!n)if(e.getCenter)n=e.getCenter();else{if(!e.getLatLng)throw new Error("Unable to get source layer LatLng.");n=e.getLatLng()}return this._source=e,this.update(),n},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=O(this.options.offset),n=this._getAnchor();this._zoomAnimated?ge(this._container,t.add(n)):e=e.add(t).add(n);var r=this._containerBottom=-e.y,i=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=r+"px",this._container.style.left=i+"px"}},_getAnchor:function(){return[0,0]}}),Qn=Zn.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){Zn.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof On||this._source.on("preclick",Oe))},onRemove:function(t){Zn.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof On||this._source.off("preclick",Oe))},getEvents:function(){var t=Zn.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=ae("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=ae("div",t+"-content-wrapper",e);if(this._contentNode=ae("div",t+"-content",n),Ae(n),Le(this._contentNode),Me(n,"contextmenu",Oe),this._tipContainer=ae("div",t+"-tip-container",e),this._tip=ae("div",t+"-tip",this._tipContainer),this.options.closeButton){var r=this._closeButton=ae("a",t+"-close-button",e);r.href="#close",r.innerHTML="&#215;",Me(r,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var r=t.offsetHeight,i=this.options.maxHeight;i&&r>i?(e.height=i+"px",de(t,"leaflet-popup-scrolled")):fe(t,"leaflet-popup-scrolled"),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();ge(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(ie(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,r=this._containerWidth,i=new R(this._containerLeft,-n-this._containerBottom);i._add(be(this._container));var a=t.layerPointToContainerPoint(i),o=O(this.options.autoPanPadding),s=O(this.options.autoPanPaddingTopLeft||o),c=O(this.options.autoPanPaddingBottomRight||o),u=t.getSize(),l=0,d=0;a.x+r+c.x>u.x&&(l=a.x+r-u.x+c.x),a.x-l-s.x<0&&(l=a.x-s.x),a.y+n+c.y>u.y&&(d=a.y+n-u.y+c.y),a.y-d-s.y<0&&(d=a.y-s.y),(l||d)&&t.fire("autopanstart").panBy([l,d])}},_onCloseButtonClick:function(t){this._close(),Be(t)},_getAnchor:function(){return O(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Ge.mergeOptions({closePopupOnClick:!0}),Ge.include({openPopup:function(t,e,n){return t instanceof Qn||(t=new Qn(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Sn.include({bindPopup:function(t,e){return t instanceof Qn?(h(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new Qn(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(Be(t),e instanceof On?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var tr=Zn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){Zn.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){Zn.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=Zn.prototype.getEvents.call(this);return wt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ae("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e=this._map,n=this._container,r=e.latLngToContainerPoint(e.getCenter()),i=e.layerPointToContainerPoint(t),a=this.options.direction,o=n.offsetWidth,s=n.offsetHeight,c=O(this.options.offset),u=this._getAnchor();"top"===a?t=t.add(O(-o/2+c.x,-s+c.y+u.y,!0)):"bottom"===a?t=t.subtract(O(o/2-c.x,-c.y,!0)):"center"===a?t=t.subtract(O(o/2+c.x,s/2-u.y+c.y,!0)):"right"===a||"auto"===a&&i.x<r.x?(a="right",t=t.add(O(c.x+u.x,u.y-s/2+c.y,!0))):(a="left",t=t.subtract(O(o+u.x-c.x,s/2-u.y-c.y,!0))),fe(n,"leaflet-tooltip-right"),fe(n,"leaflet-tooltip-left"),fe(n,"leaflet-tooltip-top"),fe(n,"leaflet-tooltip-bottom"),de(n,"leaflet-tooltip-"+a),ge(n,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&me(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return O(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});Ge.include({openTooltip:function(t,e,n){return t instanceof tr||(t=new tr(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),Sn.include({bindTooltip:function(t,e){return t instanceof tr?(h(t,e),this._tooltip=t,t._source=this):(this._tooltip&&!e||(this._tooltip=new tr(e,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),wt&&(n.click=this._openTooltip)),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){return this._tooltip&&this._map&&(e=this._tooltip._prepareOpen(this,t,e),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(de(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(fe(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var e=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(e,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,n,r=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(e),r=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(r)}});var er=Tn.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;if(n.html instanceof Element?(se(e),e.appendChild(n.html)):e.innerHTML=!1!==n.html?n.html:"",n.bgPos){var r=O(n.bgPos);e.style.backgroundPosition=-r.x+"px "+-r.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});Tn.Default=Dn;var nr=Sn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:_t,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){h(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),oe(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ce(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ue(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=s(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof R?t:new R(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,n=this.getPane().children,r=-t(-1/0,1/0),i=0,a=n.length;i<a;i++)e=n[i].style.zIndex,n[i]!==this._container&&e&&(r=t(r,+e));isFinite(r)&&(this.options.zIndex=r+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Q){me(this._container,this.options.opacity);var t=+new Date,e=!1,n=!1;for(var r in this._tiles){var i=this._tiles[r];if(i.current&&i.loaded){var a=Math.min(1,(t-i.loaded)/200);me(i.el,a),a<1?e=!0:(i.active?n=!0:this._onOpaqueTile(i),i.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),e&&(S(this._fadeFrame),this._fadeFrame=E(this._updateOpacity,this))}},_onOpaqueTile:u,_initContainer:function(){this._container||(this._container=ae("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var n in this._levels)this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=e-Math.abs(t-n),this._onUpdateLevel(n)):(oe(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var r=this._levels[t],i=this._map;return r||((r=this._levels[t]={}).el=ae("div","leaflet-tile-container leaflet-zoom-animated",this._container),r.el.style.zIndex=e,r.origin=i.project(i.unproject(i.getPixelOrigin()),t).round(),r.zoom=t,this._setZoomTransform(r,i.getCenter(),i.getZoom()),r.el.offsetWidth,this._onCreateLevel(r)),this._level=r,r}},_onUpdateLevel:u,_onRemoveLevel:u,_onCreateLevel:u,_pruneTiles:function(){if(this._map){var t,e,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var r=e.coords;this._retainParent(r.x,r.y,r.z,r.z-5)||this._retainChildren(r.x,r.y,r.z,r.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)oe(this._levels[t].el),this._onRemoveLevel(t),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,n,r){var i=Math.floor(t/2),a=Math.floor(e/2),o=n-1,s=new R(+i,+a);s.z=+o;var c=this._tileCoordsToKey(s),u=this._tiles[c];return u&&u.active?(u.retain=!0,!0):(u&&u.loaded&&(u.retain=!0),o>r&&this._retainParent(i,a,o,r))},_retainChildren:function(t,e,n,r){for(var i=2*t;i<2*t+2;i++)for(var a=2*e;a<2*e+2;a++){var o=new R(i,a);o.z=n+1;var s=this._tileCoordsToKey(o),c=this._tiles[s];c&&c.active?c.retain=!0:(c&&c.loaded&&(c.retain=!0),n+1<r&&this._retainChildren(i,a,n+1,r))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,n,r){var i=this._clampZoom(Math.round(e));(void 0!==this.options.maxZoom&&i>this.options.maxZoom||void 0!==this.options.minZoom&&i<this.options.minZoom)&&(i=void 0);var a=this.options.updateWhenZooming&&i!==this._tileZoom;r&&!a||(this._tileZoom=i,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==i&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var n in this._levels)this._setZoomTransform(this._levels[n],t,e)},_setZoomTransform:function(t,e,n){var r=this._map.getZoomScale(n,t.zoom),i=t.origin.multiplyBy(r).subtract(this._map._getNewPixelOrigin(e,n)).round();vt?_e(t.el,i,r):ge(t.el,i)},_resetGrid:function(){var t=this._map,e=t.options.crs,n=this._tileSize=this.getTileSize(),r=this._tileZoom,i=this._map.getPixelWorldBounds(this._tileZoom);i&&(this._globalTileRange=this._pxBoundsToTileRange(i)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],r).x/n.x),Math.ceil(t.project([0,e.wrapLng[1]],r).x/n.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],r).y/n.x),Math.ceil(t.project([e.wrapLat[1],0],r).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,n=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),r=e.getZoomScale(n,this._tileZoom),i=e.project(t,this._tileZoom).floor(),a=e.getSize().divideBy(2*r);return new A(i.subtract(a),i.add(a))},_update:function(t){var e=this._map;if(e){var n=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var r=this._getTiledPixelBounds(t),i=this._pxBoundsToTileRange(r),a=i.getCenter(),o=[],s=this.options.keepBuffer,c=new A(i.getBottomLeft().subtract([s,-s]),i.getTopRight().add([s,-s]));if(!(isFinite(i.min.x)&&isFinite(i.min.y)&&isFinite(i.max.x)&&isFinite(i.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var u in this._tiles){var l=this._tiles[u].coords;l.z===this._tileZoom&&c.contains(new R(l.x,l.y))||(this._tiles[u].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(t,n);else{for(var d=i.min.y;d<=i.max.y;d++)for(var f=i.min.x;f<=i.max.x;f++){var h=new R(f,d);if(h.z=this._tileZoom,this._isValidTile(h)){var p=this._tiles[this._tileCoordsToKey(h)];p?p.current=!0:o.push(h)}}if(o.sort(function(t,e){return t.distanceTo(a)-e.distanceTo(a)}),0!==o.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(f=0;f<o.length;f++)this._addTile(o[f],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var n=this._globalTileRange;if(!e.wrapLng&&(t.x<n.min.x||t.x>n.max.x)||!e.wrapLat&&(t.y<n.min.y||t.y>n.max.y))return!1}if(!this.options.bounds)return!0;var r=this._tileCoordsToBounds(t);return j(this.options.bounds).overlaps(r)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),r=t.scaleBy(n),i=r.add(n);return[e.unproject(r,t.z),e.unproject(i,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new B(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new R(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(oe(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){de(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,Q&&this.options.opacity<1&&me(t,this.options.opacity),nt&&!rt&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var n=this._getTilePos(t),r=this._tileCoordsToKey(t),a=this.createTile(this._wrapCoords(t),i(this._tileReady,this,t));this._initTile(a),this.createTile.length<2&&E(i(this._tileReady,this,t,null,a)),ge(a,n),this._tiles[r]={el:a,coords:t,current:!0},e.appendChild(a),this.fire("tileloadstart",{tile:a,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var r=this._tileCoordsToKey(t);(n=this._tiles[r])&&(n.loaded=+new Date,this._map._fadeAnimated?(me(n.el,0),S(this._fadeFrame),this._fadeFrame=E(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(de(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Q||!this._map._fadeAnimated?E(this._pruneTiles,this):setTimeout(i(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new R(this._wrapX?c(t.x,this._wrapX):t.x,this._wrapY?c(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new A(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});var rr=nr.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=h(this,e)).detectRetina&&Et&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),nt||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return Me(n,"load",i(this._tileOnLoad,this,e,n)),Me(n,"error",i(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:Et?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var r=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=r),e["-y"]=r}return v(this._url,n(e,this.options))},_tileOnLoad:function(t,e){Q?setTimeout(i(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var r=this.options.errorTileUrl;r&&e.getAttribute("src")!==r&&(e.src=r),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,n=this.options.zoomReverse,r=this.options.zoomOffset;return n&&(t=e-t),t+r},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=u,e.onerror=u,e.complete||(e.src=b,oe(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return at||e.el.setAttribute("src",b),nr.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==b))return nr.prototype._tileReady.call(this,t,e,n)}});function ir(t,e){return new rr(t,e)}var ar=rr.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var r=n({},this.defaultWmsParams);for(var i in e)i in this.options||(r[i]=e[i]);var a=(e=h(this,e)).detectRetina&&Et?2:1,o=this.getTileSize();r.width=o.x*a,r.height=o.y*a,this.wmsParams=r},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,rr.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,r=N(n.project(e[0]),n.project(e[1])),i=r.min,a=r.max,o=(this._wmsVersion>=1.3&&this._crs===Cn?[i.y,i.x,a.y,a.x]:[i.x,i.y,a.x,a.y]).join(","),s=rr.prototype.getTileUrl.call(this,t);return s+p(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+o},setParams:function(t,e){return n(this.wmsParams,t),e||this.redraw(),this}});rr.WMS=ar,ir.wms=function(t,e){return new ar(t,e)};var or=Sn.extend({options:{padding:.1,tolerance:0},initialize:function(t){h(this,t),o(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&de(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var n=this._map.getZoomScale(e,this._zoom),r=be(this._container),i=this._map.getSize().multiplyBy(.5+this.options.padding),a=this._map.project(this._center,e),o=this._map.project(t,e).subtract(a),s=i.multiplyBy(-n).add(r).add(i).subtract(o);vt?_e(this._container,s,n):ge(this._container,s)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new A(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),sr=or.extend({getEvents:function(){var t=or.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){or.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Me(t,"mousemove",s(this._onMouseMove,32,this),this),Me(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Me(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){S(this._redrawRequest),delete this._ctx,oe(this._container),De(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){or.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),r=Et?2:1;ge(e,t.min),e.width=r*n.x,e.height=r*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",Et&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){or.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[o(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,n=e.next,r=e.prev;n?n.prev=r:this._drawLast=r,r?r.next=n:this._drawFirst=n,delete t._order,delete this._layers[o(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,n,r=t.options.dashArray.split(/[, ]+/),i=[];for(n=0;n<r.length;n++){if(e=Number(r[n]),isNaN(e))return;i.push(e)}t.options._dashArray=i}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||E(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new A,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var n=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var r=this._drawFirst;r;r=r.next)t=r.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var n,r,i,a,o=t._parts,s=o.length,c=this._ctx;if(s){for(c.beginPath(),n=0;n<s;n++){for(r=0,i=o[n].length;r<i;r++)a=o[n][r],c[r?"lineTo":"moveTo"](a.x,a.y);e&&c.closePath()}this._fillStroke(c,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,n=this._ctx,r=Math.max(Math.round(t._radius),1),i=(Math.max(Math.round(t._radiusY),1)||r)/r;1!==i&&(n.save(),n.scale(1,i)),n.beginPath(),n.arc(e.x,e.y/i,r,0,2*Math.PI,!1),1!==i&&n.restore(),this._fillStroke(n,t)}},_fillStroke:function(t,e){var n=e.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor||n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())},_onClick:function(t){for(var e,n,r=this._map.mouseEventToLayerPoint(t),i=this._drawFirst;i;i=i.next)(e=i.layer).options.interactive&&e._containsPoint(r)&&!this._map._draggableMoved(e)&&(n=e);n&&(Ve(t),this._fireEvent([n],t))},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(fe(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(t,e){for(var n,r,i=this._drawFirst;i;i=i.next)(n=i.layer).options.interactive&&n._containsPoint(e)&&(r=n);r!==this._hoveredLayer&&(this._handleMouseOut(t),r&&(de(this._container,"leaflet-interactive"),this._fireEvent([r],t,"mouseover"),this._hoveredLayer=r)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_fireEvent:function(t,e,n){this._map._fireDOMEvent(e,n||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var n=e.next,r=e.prev;n&&(n.prev=r,r?r.next=n:n&&(this._drawFirst=n),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var n=e.next,r=e.prev;r&&(r.next=n,n?n.prev=r:r&&(this._drawLast=r),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function cr(t){return St?new sr(t):null}var ur=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),lr={_initContainer:function(){this._container=ae("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(or.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=ur("shape");de(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=ur("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[o(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;oe(e),t.removeInteractiveTarget(e),delete this._layers[o(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,r=t.options,i=t._container;i.stroked=!!r.stroke,i.filled=!!r.fill,r.stroke?(e||(e=t._stroke=ur("stroke")),i.appendChild(e),e.weight=r.weight+"px",e.color=r.color,e.opacity=r.opacity,r.dashArray?e.dashStyle=_(r.dashArray)?r.dashArray.join(" "):r.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=r.lineCap.replace("butt","flat"),e.joinstyle=r.lineJoin):e&&(i.removeChild(e),t._stroke=null),r.fill?(n||(n=t._fill=ur("fill")),i.appendChild(n),n.color=r.fillColor||r.color,n.opacity=r.fillOpacity):n&&(i.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),r=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+r+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){ce(t._container)},_bringToBack:function(t){ue(t._container)}},dr=Mt?ur:K,fr=or.extend({getEvents:function(){var t=or.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=dr("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=dr("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){oe(this._container),De(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){or.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),ge(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=dr("path");t.options.className&&de(e,t.options.className),t.options.interactive&&de(e,"leaflet-interactive"),this._updateStyle(t),this._layers[o(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){oe(t._path),t.removeInteractiveTarget(t._path),delete this._layers[o(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,X(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),r="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",i=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+r+2*n+",0 "+r+2*-n+",0 ";this._setPath(t,i)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){ce(t._path)},_bringToBack:function(t){ue(t._path)}});function hr(t){return It||Mt?new fr(t):null}Mt&&fr.include(lr),Ge.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&cr(t)||hr(t)}});var pr=Bn.extend({initialize:function(t,e){Bn.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=j(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});fr.create=dr,fr.pointsToPath=X,jn.geometryToLayer=Fn,jn.coordsToLatLng=Yn,jn.coordsToLatLngs=$n,jn.latLngToCoords=zn,jn.latLngsToCoords=Vn,jn.getFeature=Hn,jn.asFeature=qn,Ge.mergeOptions({boxZoom:!0});var mr=en.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){Me(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){De(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){oe(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Kt(),xe(),this._startPoint=this._map.mouseEventToContainerPoint(t),Me(document,{contextmenu:Be,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ae("div","leaflet-zoom-box",this._container),de(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new A(this._point,this._startPoint),n=e.getSize();ge(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(oe(this._box),fe(this._container,"leaflet-crosshair")),Xt(),we(),De(document,{contextmenu:Be,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(i(this._resetState,this),0);var e=new B(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});Ge.addInitHook("addHandler","boxZoom",mr),Ge.mergeOptions({doubleClickZoom:!0});var vr=en.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),r=e.options.zoomDelta,i=t.originalEvent.shiftKey?n-r:n+r;"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}});Ge.addInitHook("addHandler","doubleClickZoom",vr),Ge.mergeOptions({dragging:!0,inertia:!rt,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var _r=en.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new cn(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}de(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){fe(this._map._container,"leaflet-grab"),fe(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=j(this._map.options.maxBounds);this._offsetLimit=N(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,r=this._draggable._newPos.x,i=(r-e+n)%t+e-n,a=(r+e+n)%t-e-n,o=Math.abs(i+n)<Math.abs(a+n)?i:a;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=o},_onDragEnd:function(t){var e=this._map,n=e.options,r=!n.inertia||this._times.length<2;if(e.fire("dragend",t),r)e.fire("moveend");else{this._prunePositions(+new Date);var i=this._lastPos.subtract(this._positions[0]),a=(this._lastTime-this._times[0])/1e3,o=n.easeLinearity,s=i.multiplyBy(o/a),c=s.distanceTo([0,0]),u=Math.min(n.inertiaMaxSpeed,c),l=s.multiplyBy(u/c),d=u/(n.inertiaDeceleration*o),f=l.multiplyBy(-d/2).round();f.x||f.y?(f=e._limitOffset(f,e.options.maxBounds),E(function(){e.panBy(f,{duration:d,easeLinearity:o,noMoveStart:!0,animate:!0})})):e.fire("moveend")}}});Ge.addInitHook("addHandler","dragging",_r),Ge.mergeOptions({keyboard:!0,keyboardPanDelta:80});var gr=en.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),Me(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),De(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,n=t.scrollTop||e.scrollTop,r=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(r,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,n,r=this._panKeys={},i=this.keyCodes;for(e=0,n=i.left.length;e<n;e++)r[i.left[e]]=[-1*t,0];for(e=0,n=i.right.length;e<n;e++)r[i.right[e]]=[t,0];for(e=0,n=i.down.length;e<n;e++)r[i.down[e]]=[0,t];for(e=0,n=i.up.length;e<n;e++)r[i.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,n,r=this._zoomKeys={},i=this.keyCodes;for(e=0,n=i.zoomIn.length;e<n;e++)r[i.zoomIn[e]]=t;for(e=0,n=i.zoomOut.length;e<n;e++)r[i.zoomOut[e]]=-t},_addHooks:function(){Me(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){De(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,n=t.keyCode,r=this._map;if(n in this._panKeys)r._panAnim&&r._panAnim._inProgress||(e=this._panKeys[n],t.shiftKey&&(e=O(e).multiplyBy(3)),r.panBy(e),r.options.maxBounds&&r.panInsideBounds(r.options.maxBounds));else if(n in this._zoomKeys)r.setZoom(r.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!r._popup||!r._popup.options.closeOnEscapeKey)return;r.closePopup()}Be(t)}}});Ge.addInitHook("addHandler","keyboard",gr),Ge.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var br=en.extend({addHooks:function(){Me(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){De(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Ye(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var r=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(i(this._performZoom,this),r),Be(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),n=this._map.options.zoomSnap||0;t._stop();var r=this._delta/(4*this._map.options.wheelPxPerZoomLevel),i=4*Math.log(2/(1+Math.exp(-Math.abs(r))))/Math.LN2,a=n?Math.ceil(i/n)*n:i,o=t._limitZoom(e+(this._delta>0?a:-a))-e;this._delta=0,this._startTime=null,o&&("center"===t.options.scrollWheelZoom?t.setZoom(e+o):t.setZoomAround(this._lastMousePos,e+o))}});Ge.addInitHook("addHandler","scrollWheelZoom",br),Ge.mergeOptions({tap:!0,tapTolerance:15});var yr=en.extend({addHooks:function(){Me(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){De(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(Ne(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],n=e.target;this._startPos=this._newPos=new R(e.clientX,e.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&de(n,"leaflet-active"),this._holdTimeout=setTimeout(i(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))},this),1e3),this._simulateEvent("mousedown",e),Me(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),De(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],n=e.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&fe(n,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new R(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var n=document.createEvent("MouseEvents");n._simulated=!0,e.target._simulatedClick=!0,n.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(n)}});wt&&!xt&&Ge.addInitHook("addHandler","tap",yr),Ge.mergeOptions({touchZoom:wt&&!rt,bounceAtZoomLimits:!0});var xr=en.extend({addHooks:function(){de(this._map._container,"leaflet-touch-zoom"),Me(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){fe(this._map._container,"leaflet-touch-zoom"),De(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),r=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(r)._divideBy(2))),this._startDist=n.distanceTo(r),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Me(document,"touchmove",this._onTouchMove,this),Me(document,"touchend",this._onTouchEnd,this),Ne(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),r=e.mouseEventToContainerPoint(t.touches[1]),a=n.distanceTo(r)/this._startDist;if(this._zoom=e.getScaleZoom(a,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&a<1||this._zoom>e.getMaxZoom()&&a>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===a)return}else{var o=n._add(r)._divideBy(2)._subtract(this._centerPoint);if(1===a&&0===o.x&&0===o.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(o),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),S(this._animRequest);var s=i(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=E(s,this,!0),Ne(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,S(this._animRequest),De(document,"touchmove",this._onTouchMove),De(document,"touchend",this._onTouchEnd),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});Ge.addInitHook("addHandler","touchZoom",xr),Ge.BoxZoom=mr,Ge.DoubleClickZoom=vr,Ge.Drag=_r,Ge.Keyboard=gr,Ge.ScrollWheelZoom=br,Ge.Tap=yr,Ge.TouchZoom=xr,Object.freeze=e,t.version="1.5.1+build.2e3e0ffb",t.Control=Ke,t.control=Xe,t.Browser=Dt,t.Evented=D,t.Mixin=rn,t.Util=I,t.Class=M,t.Handler=en,t.extend=n,t.bind=i,t.stamp=o,t.setOptions=h,t.DomEvent=We,t.DomUtil=Ie,t.PosAnimation=Ue,t.Draggable=cn,t.LineUtil=_n,t.PolyUtil=bn,t.Point=R,t.point=O,t.Bounds=A,t.bounds=N,t.Transformation=q,t.transformation=W,t.Projection=wn,t.LatLng=F,t.latLng=Y,t.LatLngBounds=B,t.latLngBounds=j,t.CRS=z,t.GeoJSON=jn,t.geoJSON=Un,t.geoJson=Gn,t.Layer=Sn,t.LayerGroup=In,t.layerGroup=function(t,e){return new In(t,e)},t.FeatureGroup=Mn,t.featureGroup=function(t){return new Mn(t)},t.ImageOverlay=Kn,t.imageOverlay=function(t,e,n){return new Kn(t,e,n)},t.VideoOverlay=Xn,t.videoOverlay=function(t,e,n){return new Xn(t,e,n)},t.SVGOverlay=Jn,t.svgOverlay=function(t,e,n){return new Jn(t,e,n)},t.DivOverlay=Zn,t.Popup=Qn,t.popup=function(t,e){return new Qn(t,e)},t.Tooltip=tr,t.tooltip=function(t,e){return new tr(t,e)},t.Icon=Tn,t.icon=function(t){return new Tn(t)},t.DivIcon=er,t.divIcon=function(t){return new er(t)},t.Marker=Pn,t.marker=function(t,e){return new Pn(t,e)},t.TileLayer=rr,t.tileLayer=ir,t.GridLayer=nr,t.gridLayer=function(t){return new nr(t)},t.SVG=fr,t.svg=hr,t.Renderer=or,t.Canvas=sr,t.canvas=cr,t.Path=On,t.CircleMarker=Ln,t.circleMarker=function(t,e){return new Ln(t,e)},t.Circle=An,t.circle=function(t,e,n){return new An(t,e,n)},t.Polyline=Nn,t.polyline=function(t,e){return new Nn(t,e)},t.Polygon=Bn,t.polygon=function(t,e){return new Bn(t,e)},t.Rectangle=pr,t.rectangle=function(t,e){return new pr(t,e)},t.Map=Ge,t.map=function(t,e){return new Ge(t,e)};var wr=window.L;t.noConflict=function(){return window.L=wr,this},window.L=t})(e)},function(t,e,n){var r=n(838);"string"==typeof r&&(r=[[t.i,r,""]]);var i={transform:void 0};n(274)(r,i);r.locals&&(t.exports=r.locals)},function(t,e){t.exports=function(t){return"string"!=typeof t?t:(/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),/["'() \t\n]/.test(t)?'"'+t.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':t)}},function(t,e){t.exports="/images/vendor/leaflet/dist/marker-icon-2x.png?401d815dc206b8dc1b17cd0e37695975"},function(t,e,n){var r=n(0)(n(856),n(857),!1,null,null,null);t.exports=r.exports},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){"use strict";var r=n(11).Buffer,i=n(277).Transform;function a(t){i.call(this),this._block=r.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}n(10)(a,i),a.prototype._transform=function(t,e,n){var r=null;try{this.update(t,e)}catch(t){r=t}n(r)},a.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},a.prototype.update=function(t,e){if(function(t,e){if(!r.isBuffer(t)&&"string"!=typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(t)||(t=r.from(t,e));for(var n=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var a=this._blockOffset;a<this._blockSize;)n[a++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)n[this._blockOffset++]=t[i++];for(var o=0,s=8*t.length;s>0;++o)this._length[o]+=s,(s=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*s);return this},a.prototype._update=function(){throw new Error("_update is not implemented")},a.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return e},a.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=a},function(t,e,n){"use strict";(function(e,r){var i=n(110);t.exports=b;var a,o=n(346);b.ReadableState=g;n(278).EventEmitter;var s=function(t,e){return t.listeners(e).length},c=n(349),u=n(11).Buffer,l=e.Uint8Array||function(){};var d=n(88);d.inherits=n(10);var f=n(871),h=void 0;h=f&&f.debuglog?f.debuglog("stream"):function(){};var p,m=n(872),v=n(350);d.inherits(b,c);var _=["error","close","destroy","pause","resume"];function g(t,e){a=a||n(69),t=t||{};var r=e instanceof a;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,o=t.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=n(281).StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function b(t){if(a=a||n(69),!(this instanceof b))return new b(t);this._readableState=new g(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),c.call(this)}function y(t,e,n,r,i){var a,o=t._readableState;null===e?(o.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,C(t)}(t,o)):(i||(a=function(t,e){var n;r=e,u.isBuffer(r)||r instanceof l||"string"==typeof e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(o,e)),a?t.emit("error",a):o.objectMode||e&&e.length>0?("string"==typeof e||o.objectMode||Object.getPrototypeOf(e)===u.prototype||(e=function(t){return u.from(t)}(e)),r?o.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):x(t,o,e,!0):o.ended?t.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(e=o.decoder.write(e),o.objectMode||0!==e.length?x(t,o,e,!1):S(t,o)):x(t,o,e,!1))):r||(o.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(o)}function x(t,e,n,r){e.flowing&&0===e.length&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&C(t)),S(t,e)}Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),b.prototype.destroy=v.destroy,b.prototype._undestroy=v.undestroy,b.prototype._destroy=function(t,e){this.push(null),e(t)},b.prototype.push=function(t,e){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof t&&((e=e||r.defaultEncoding)!==r.encoding&&(t=u.from(t,e),e=""),n=!0),y(this,t,e,!1,n)},b.prototype.unshift=function(t){return y(this,t,null,!0,!1)},b.prototype.isPaused=function(){return!1===this._readableState.flowing},b.prototype.setEncoding=function(t){return p||(p=n(281).StringDecoder),this._readableState.decoder=new p(t),this._readableState.encoding=t,this};var w=8388608;function k(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=w?t=w:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function C(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(h("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(E,t):E(t))}function E(t){h("emit readable"),t.emit("readable"),D(t)}function S(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(I,t,e))}function I(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(h("maybeReadMore read 0"),t.read(0),n!==e.length);)n=e.length;e.readingMore=!1}function M(t){h("readable nexttick read 0"),t.read(0)}function T(t,e){e.reading||(h("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),D(t),e.flowing&&!e.reading&&t.read(0)}function D(t){var e=t._readableState;for(h("flow",e.flowing);e.flowing&&null!==t.read(););}function R(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=function(t,e,n){var r;t<e.head.data.length?(r=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):r=t===e.head.data.length?e.shift():n?function(t,e){var n=e.head,r=1,i=n.data;t-=i.length;for(;n=n.next;){var a=n.data,o=t>a.length?a.length:t;if(o===a.length?i+=a:i+=a.slice(0,t),0===(t-=o)){o===a.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=a.slice(o));break}++r}return e.length-=r,i}(t,e):function(t,e){var n=u.allocUnsafe(t),r=e.head,i=1;r.data.copy(n),t-=r.data.length;for(;r=r.next;){var a=r.data,o=t>a.length?a.length:t;if(a.copy(n,n.length-t,0,o),0===(t-=o)){o===a.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=a.slice(o));break}++i}return e.length-=i,n}(t,e);return r}(t,e.buffer,e.decoder),n);var n}function P(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(O,e,t))}function O(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function L(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}b.prototype.read=function(t){h("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return h("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?P(this):C(this),null;if(0===(t=k(t,e))&&e.ended)return 0===e.length&&P(this),null;var r,i=e.needReadable;return h("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&h("length less than watermark",i=!0),e.ended||e.reading?h("reading or ended",i=!1):i&&(h("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=k(n,e))),null===(r=t>0?R(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&P(this)),null!==r&&this.emit("data",r),r},b.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(t,e){var n=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=t;break;case 1:a.pipes=[a.pipes,t];break;default:a.pipes.push(t)}a.pipesCount+=1,h("pipe count=%d opts=%j",a.pipesCount,e);var c=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?l:b;function u(e,r){h("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,h("cleanup"),t.removeListener("close",_),t.removeListener("finish",g),t.removeListener("drain",d),t.removeListener("error",v),t.removeListener("unpipe",u),n.removeListener("end",l),n.removeListener("end",b),n.removeListener("data",m),f=!0,!a.awaitDrain||t._writableState&&!t._writableState.needDrain||d())}function l(){h("onend"),t.end()}a.endEmitted?i.nextTick(c):n.once("end",c),t.on("unpipe",u);var d=function(t){return function(){var e=t._readableState;h("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,D(t))}}(n);t.on("drain",d);var f=!1;var p=!1;function m(e){h("ondata"),p=!1,!1!==t.write(e)||p||((1===a.pipesCount&&a.pipes===t||a.pipesCount>1&&-1!==L(a.pipes,t))&&!f&&(h("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}function v(e){h("onerror",e),b(),t.removeListener("error",v),0===s(t,"error")&&t.emit("error",e)}function _(){t.removeListener("finish",g),b()}function g(){h("onfinish"),t.removeListener("close",_),b()}function b(){h("unpipe"),n.unpipe(t)}return n.on("data",m),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?o(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",v),t.once("close",_),t.once("finish",g),t.emit("pipe",n),a.flowing||(h("pipe resume"),n.resume()),t},b.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n),this);if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<i;a++)r[a].emit("unpipe",this,n);return this}var o=L(e.pipes,t);return-1===o?this:(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,n),this)},b.prototype.on=function(t,e){var n=c.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&C(this):i.nextTick(M,this))}return n},b.prototype.addListener=b.prototype.on,b.prototype.resume=function(){var t=this._readableState;return t.flowing||(h("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(T,t,e))}(this,t)),this},b.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this},b.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",function(){if(h("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)}),t.on("data",function(i){(h("wrapped data"),n.decoder&&(i=n.decoder.write(i)),!n.objectMode||null!==i&&void 0!==i)&&((n.objectMode||i&&i.length)&&(e.push(i)||(r=!0,t.pause())))}),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var a=0;a<_.length;a++)t.on(_[a],this.emit.bind(this,_[a]));return this._read=function(e){h("wrapped _read",e),r&&(r=!1,t.resume())},this},Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),b._fromList=R}).call(e,n(20),n(26))},function(t,e,n){t.exports=n(278).EventEmitter},function(t,e,n){"use strict";var r=n(110);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var n=this,a=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return a||o?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||r.nextTick(i,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?(r.nextTick(i,n,t),n._writableState&&(n._writableState.errorEmitted=!0)):e&&e(t)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,n){"use strict";t.exports=a;var r=n(69),i=n(88);function a(t){if(!(this instanceof a))return new a(t);r.call(this,t),this._transformState={afterTransform:function(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",o)}function o(){var t=this;"function"==typeof this._flush?this._flush(function(e,n){s(t,e,n)}):s(this,null,null)}function s(t,e,n){if(e)return t.emit("error",e);if(null!=n&&t.push(n),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=n(10),i.inherits(a,r),a.prototype.push=function(t,e){return this._transformState.needTransform=!1,r.prototype.push.call(this,t,e)},a.prototype._transform=function(t,e,n){throw new Error("_transform() is not implemented")},a.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},a.prototype._destroy=function(t,e){var n=this;r.prototype._destroy.call(this,t,function(t){e(t),n.emit("close")})}},function(t,e,n){var r=n(10),i=n(77),a=n(11).Buffer,o=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=new Array(64);function c(){this.init(),this._w=s,i.call(this,64,56)}function u(t,e,n){return n^t&(e^n)}function l(t,e,n){return t&e|n&(t|e)}function d(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function f(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function h(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}r(c,i),c.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},c.prototype._update=function(t){for(var e,n=this._w,r=0|this._a,i=0|this._b,a=0|this._c,s=0|this._d,c=0|this._e,p=0|this._f,m=0|this._g,v=0|this._h,_=0;_<16;++_)n[_]=t.readInt32BE(4*_);for(;_<64;++_)n[_]=0|(((e=n[_-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+n[_-7]+h(n[_-15])+n[_-16];for(var g=0;g<64;++g){var b=v+f(c)+u(c,p,m)+o[g]+n[g]|0,y=d(r)+l(r,i,a)|0;v=m,m=p,p=c,c=s+b|0,s=a,a=i,i=r,r=b+y|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=v+this._h|0},c.prototype._hash=function(){var t=a.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=c},function(t,e,n){var r=n(10),i=n(77),a=n(11).Buffer,o=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function c(){this.init(),this._w=s,i.call(this,128,112)}function u(t,e,n){return n^t&(e^n)}function l(t,e,n){return t&e|n&(t|e)}function d(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function f(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function h(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function v(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function _(t,e){return t>>>0<e>>>0?1:0}r(c,i),c.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},c.prototype._update=function(t){for(var e=this._w,n=0|this._ah,r=0|this._bh,i=0|this._ch,a=0|this._dh,s=0|this._eh,c=0|this._fh,g=0|this._gh,b=0|this._hh,y=0|this._al,x=0|this._bl,w=0|this._cl,k=0|this._dl,C=0|this._el,E=0|this._fl,S=0|this._gl,I=0|this._hl,M=0;M<32;M+=2)e[M]=t.readInt32BE(4*M),e[M+1]=t.readInt32BE(4*M+4);for(;M<160;M+=2){var T=e[M-30],D=e[M-30+1],R=h(T,D),P=p(D,T),O=m(T=e[M-4],D=e[M-4+1]),L=v(D,T),A=e[M-14],N=e[M-14+1],B=e[M-32],j=e[M-32+1],F=P+N|0,Y=R+A+_(F,P)|0;Y=(Y=Y+O+_(F=F+L|0,L)|0)+B+_(F=F+j|0,j)|0,e[M]=Y,e[M+1]=F}for(var $=0;$<160;$+=2){Y=e[$],F=e[$+1];var z=l(n,r,i),V=l(y,x,w),H=d(n,y),q=d(y,n),W=f(s,C),U=f(C,s),G=o[$],K=o[$+1],X=u(s,c,g),J=u(C,E,S),Z=I+U|0,Q=b+W+_(Z,I)|0;Q=(Q=(Q=Q+X+_(Z=Z+J|0,J)|0)+G+_(Z=Z+K|0,K)|0)+Y+_(Z=Z+F|0,F)|0;var tt=q+V|0,et=H+z+_(tt,q)|0;b=g,I=S,g=c,S=E,c=s,E=C,s=a+Q+_(C=k+Z|0,k)|0,a=i,k=w,i=r,w=x,r=n,x=y,n=Q+et+_(y=Z+tt|0,Z)|0}this._al=this._al+y|0,this._bl=this._bl+x|0,this._cl=this._cl+w|0,this._dl=this._dl+k|0,this._el=this._el+C|0,this._fl=this._fl+E|0,this._gl=this._gl+S|0,this._hl=this._hl+I|0,this._ah=this._ah+n+_(this._al,y)|0,this._bh=this._bh+r+_(this._bl,x)|0,this._ch=this._ch+i+_(this._cl,w)|0,this._dh=this._dh+a+_(this._dl,k)|0,this._eh=this._eh+s+_(this._el,C)|0,this._fh=this._fh+c+_(this._fl,E)|0,this._gh=this._gh+g+_(this._gl,S)|0,this._hh=this._hh+b+_(this._hl,I)|0},c.prototype._hash=function(){var t=a.allocUnsafe(64);function e(e,n,r){t.writeInt32BE(e,r),t.writeInt32BE(n,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=c},function(t,e,n){"use strict";var r=n(10),i=n(884),a=n(56),o=n(11).Buffer,s=n(355),c=n(282),u=n(283),l=o.alloc(128);function d(t,e){a.call(this,"digest"),"string"==typeof e&&(e=o.from(e));var n="sha512"===t||"sha384"===t?128:64;(this._alg=t,this._key=e,e.length>n)?e=("rmd160"===t?new c:u(t)).update(e).digest():e.length<n&&(e=o.concat([e,l],n));for(var r=this._ipad=o.allocUnsafe(n),i=this._opad=o.allocUnsafe(n),s=0;s<n;s++)r[s]=54^e[s],i[s]=92^e[s];this._hash="rmd160"===t?new c:u(t),this._hash.update(r)}r(d,a),d.prototype._update=function(t){this._hash.update(t)},d.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new c:u(this._alg)).update(this._opad).update(t).digest()},t.exports=function(t,e){return"rmd160"===(t=t.toLowerCase())||"ripemd160"===t?new d("rmd160",e):"md5"===t?new i(s,e):new d(t,e)}},function(t,e,n){var r=n(276);t.exports=function(t){return(new r).update(t).digest()}},function(t,e){t.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},function(t,e,n){e.pbkdf2=n(886),e.pbkdf2Sync=n(360)},function(t,e,n){(function(e){var n=Math.pow(2,30)-1;function r(t,n){if("string"!=typeof t&&!e.isBuffer(t))throw new TypeError(n+" must be a buffer or string")}t.exports=function(t,e,i,a){if(r(t,"Password"),r(e,"Salt"),"number"!=typeof i)throw new TypeError("Iterations not a number");if(i<0)throw new TypeError("Bad iterations");if("number"!=typeof a)throw new TypeError("Key length not a number");if(a<0||a>n||a!=a)throw new TypeError("Bad key length")}}).call(e,n(19).Buffer)},function(t,e,n){(function(e){var n;e.browser?n="utf-8":n=parseInt(e.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary";t.exports=n}).call(e,n(26))},function(t,e,n){var r=n(355),i=n(282),a=n(283),o=n(358),s=n(359),c=n(11).Buffer,u=c.alloc(128),l={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function d(t,e,n){var o=function(t){return"rmd160"===t||"ripemd160"===t?function(t){return(new i).update(t).digest()}:"md5"===t?r:function(e){return a(t).update(e).digest()}}(t),s="sha512"===t||"sha384"===t?128:64;e.length>s?e=o(e):e.length<s&&(e=c.concat([e,u],s));for(var d=c.allocUnsafe(s+l[t]),f=c.allocUnsafe(s+l[t]),h=0;h<s;h++)d[h]=54^e[h],f[h]=92^e[h];var p=c.allocUnsafe(s+n+4);d.copy(p,0,0,s),this.ipad1=p,this.ipad2=d,this.opad=f,this.alg=t,this.blocksize=s,this.hash=o,this.size=l[t]}d.prototype.run=function(t,e){return t.copy(e,this.blocksize),this.hash(e).copy(this.opad,this.blocksize),this.hash(this.opad)},t.exports=function(t,e,n,r,i){o(t,e,n,r),c.isBuffer(t)||(t=c.from(t,s)),c.isBuffer(e)||(e=c.from(e,s));var a=new d(i=i||"sha1",t,e.length),u=c.allocUnsafe(r),f=c.allocUnsafe(e.length+4);e.copy(f,0,0,e.length);for(var h=0,p=l[i],m=Math.ceil(r/p),v=1;v<=m;v++){f.writeUInt32BE(v,e.length);for(var _=a.run(f,a.ipad1),g=_,b=1;b<n;b++){g=a.run(g,a.ipad2);for(var y=0;y<p;y++)_[y]^=g[y]}_.copy(u,h),h+=p}return u}},function(t,e,n){var r=n(89),i=n(11).Buffer,a=n(362);function o(t){var e=t._cipher.encryptBlockRaw(t._prev);return a(t._prev),e}e.encrypt=function(t,e){var n=Math.ceil(e.length/16),a=t._cache.length;t._cache=i.concat([t._cache,i.allocUnsafe(16*n)]);for(var s=0;s<n;s++){var c=o(t),u=a+16*s;t._cache.writeUInt32BE(c[0],u+0),t._cache.writeUInt32BE(c[1],u+4),t._cache.writeUInt32BE(c[2],u+8),t._cache.writeUInt32BE(c[3],u+12)}var l=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),r(e,l)}},function(t,e){t.exports=function(t){for(var e,n=t.length;n--;){if(255!==(e=t.readUInt8(n))){e++,t.writeUInt8(e,n);break}t.writeUInt8(0,n)}}},function(t,e){t.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}},function(t,e,n){var r=n(111),i=n(11).Buffer,a=n(56),o=n(10),s=n(901),c=n(89),u=n(362);function l(t,e,n,o){a.call(this);var c=i.alloc(4,0);this._cipher=new r.AES(e);var l=this._cipher.encryptBlock(c);this._ghash=new s(l),n=function(t,e,n){if(12===e.length)return t._finID=i.concat([e,i.from([0,0,0,1])]),i.concat([e,i.from([0,0,0,2])]);var r=new s(n),a=e.length,o=a%16;r.update(e),o&&(o=16-o,r.update(i.alloc(o,0))),r.update(i.alloc(8,0));var c=8*a,l=i.alloc(8);l.writeUIntBE(c,0,8),r.update(l),t._finID=r.state;var d=i.from(t._finID);return u(d),d}(this,n,l),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=o,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}o(l,a),l.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=i.alloc(e,0),this._ghash.update(e))}this._called=!0;var n=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(n),this._len+=t.length,n},l.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=c(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var n=0;t.length!==e.length&&n++;for(var r=Math.min(t.length,e.length),i=0;i<r;++i)n+=t[i]^e[i];return n}(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()},l.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},l.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},l.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length},t.exports=l},function(t,e,n){var r=n(111),i=n(11).Buffer,a=n(56);function o(t,e,n,o){a.call(this),this._cipher=new r.AES(e),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=o,this._mode=t}n(10)(o,a),o.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},o.prototype._final=function(){this._cipher.scrub()},t.exports=o},function(t,e,n){var r=n(76);t.exports=g,g.simpleSieve=v,g.fermatTest=_;var i=n(22),a=new i(24),o=new(n(367)),s=new i(1),c=new i(2),u=new i(5),l=(new i(16),new i(8),new i(10)),d=new i(3),f=(new i(7),new i(11)),h=new i(4),p=(new i(12),null);function m(){if(null!==p)return p;var t=[];t[0]=2;for(var e=1,n=3;n<1048576;n+=2){for(var r=Math.ceil(Math.sqrt(n)),i=0;i<e&&t[i]<=r&&n%t[i]!=0;i++);e!==i&&t[i]<=r||(t[e++]=n)}return p=t,t}function v(t){for(var e=m(),n=0;n<e.length;n++)if(0===t.modn(e[n]))return 0===t.cmpn(e[n]);return!0}function _(t){var e=i.mont(t);return 0===c.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)}function g(t,e){if(t<16)return new i(2===e||5===e?[140,123]:[140,39]);var n,p;for(e=new i(e);;){for(n=new i(r(Math.ceil(t/8)));n.bitLength()>t;)n.ishrn(1);if(n.isEven()&&n.iadd(s),n.testn(1)||n.iadd(c),e.cmp(c)){if(!e.cmp(u))for(;n.mod(l).cmp(d);)n.iadd(h)}else for(;n.mod(a).cmp(f);)n.iadd(h);if(v(p=n.shrn(1))&&v(n)&&_(p)&&_(n)&&o.test(p)&&o.test(n))return n}}},function(t,e,n){var r=n(22),i=n(287);function a(t){this.rand=t||new i.Rand}t.exports=a,a.create=function(t){return new a(t)},a.prototype._randbelow=function(t){var e=t.bitLength(),n=Math.ceil(e/8);do{var i=new r(this.rand.generate(n))}while(i.cmp(t)>=0);return i},a.prototype._randrange=function(t,e){var n=e.sub(t);return t.add(this._randbelow(n))},a.prototype.test=function(t,e,n){var i=t.bitLength(),a=r.mont(t),o=new r(1).toRed(a);e||(e=Math.max(1,i/48|0));for(var s=t.subn(1),c=0;!s.testn(c);c++);for(var u=t.shrn(c),l=s.toRed(a);e>0;e--){var d=this._randrange(new r(2),s);n&&n(d);var f=d.toRed(a).redPow(u);if(0!==f.cmp(o)&&0!==f.cmp(l)){for(var h=1;h<c;h++){if(0===(f=f.redSqr()).cmp(o))return!1;if(0===f.cmp(l))break}if(h===c)return!1}}return!0},a.prototype.getDivisor=function(t,e){var n=t.bitLength(),i=r.mont(t),a=new r(1).toRed(i);e||(e=Math.max(1,n/48|0));for(var o=t.subn(1),s=0;!o.testn(s);s++);for(var c=t.shrn(s),u=o.toRed(i);e>0;e--){var l=this._randrange(new r(2),o),d=t.gcd(l);if(0!==d.cmpn(1))return d;var f=l.toRed(i).redPow(c);if(0!==f.cmp(a)&&0!==f.cmp(u)){for(var h=1;h<s;h++){if(0===(f=f.redSqr()).cmp(a))return f.fromRed().subn(1).gcd(t);if(0===f.cmp(u))break}if(h===s)return(f=f.redSqr()).fromRed().subn(1).gcd(t)}}return!1}},function(t,e,n){"use strict";var r=e;function i(t){return 1===t.length?"0"+t:t}function a(t){for(var e="",n=0;n<t.length;n++)e+=i(t[n].toString(16));return e}r.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"!=typeof t){for(var r=0;r<t.length;r++)n[r]=0|t[r];return n}if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),r=0;r<t.length;r+=2)n.push(parseInt(t[r]+t[r+1],16));else for(r=0;r<t.length;r++){var i=t.charCodeAt(r),a=i>>8,o=255&i;a?n.push(a,o):n.push(o)}return n},r.zero2=i,r.toHex=a,r.encode=function(t,e){return"hex"===e?a(t):t}},function(t,e,n){"use strict";var r=e;r.base=n(113),r.short=n(912),r.mont=n(913),r.edwards=n(914)},function(t,e,n){"use strict";var r=n(47).rotr32;function i(t,e,n){return t&e^~t&n}function a(t,e,n){return t&e^t&n^e&n}function o(t,e,n){return t^e^n}e.ft_1=function(t,e,n,r){return 0===t?i(e,n,r):1===t||3===t?o(e,n,r):2===t?a(e,n,r):void 0},e.ch32=i,e.maj32=a,e.p32=o,e.s0_256=function(t){return r(t,2)^r(t,13)^r(t,22)},e.s1_256=function(t){return r(t,6)^r(t,11)^r(t,25)},e.g0_256=function(t){return r(t,7)^r(t,18)^t>>>3},e.g1_256=function(t){return r(t,17)^r(t,19)^t>>>10}},function(t,e,n){"use strict";var r=n(47),i=n(90),a=n(370),o=n(35),s=r.sum32,c=r.sum32_4,u=r.sum32_5,l=a.ch32,d=a.maj32,f=a.s0_256,h=a.s1_256,p=a.g0_256,m=a.g1_256,v=i.BlockHash,_=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function g(){if(!(this instanceof g))return new g;v.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=_,this.W=new Array(64)}r.inherits(g,v),t.exports=g,g.blockSize=512,g.outSize=256,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(t,e){for(var n=this.W,r=0;r<16;r++)n[r]=t[e+r];for(;r<n.length;r++)n[r]=c(m(n[r-2]),n[r-7],p(n[r-15]),n[r-16]);var i=this.h[0],a=this.h[1],v=this.h[2],_=this.h[3],g=this.h[4],b=this.h[5],y=this.h[6],x=this.h[7];for(o(this.k.length===n.length),r=0;r<n.length;r++){var w=u(x,h(g),l(g,b,y),this.k[r],n[r]),k=s(f(i),d(i,a,v));x=y,y=b,b=g,g=s(_,w),_=v,v=a,a=i,i=s(w,k)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],a),this.h[2]=s(this.h[2],v),this.h[3]=s(this.h[3],_),this.h[4]=s(this.h[4],g),this.h[5]=s(this.h[5],b),this.h[6]=s(this.h[6],y),this.h[7]=s(this.h[7],x)},g.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(t,e,n){"use strict";var r=n(47),i=n(90),a=n(35),o=r.rotr64_hi,s=r.rotr64_lo,c=r.shr64_hi,u=r.shr64_lo,l=r.sum64,d=r.sum64_hi,f=r.sum64_lo,h=r.sum64_4_hi,p=r.sum64_4_lo,m=r.sum64_5_hi,v=r.sum64_5_lo,_=i.BlockHash,g=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function b(){if(!(this instanceof b))return new b;_.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}function y(t,e,n,r,i){var a=t&n^~t&i;return a<0&&(a+=4294967296),a}function x(t,e,n,r,i,a){var o=e&r^~e&a;return o<0&&(o+=4294967296),o}function w(t,e,n,r,i){var a=t&n^t&i^n&i;return a<0&&(a+=4294967296),a}function k(t,e,n,r,i,a){var o=e&r^e&a^r&a;return o<0&&(o+=4294967296),o}function C(t,e){var n=o(t,e,28)^o(e,t,2)^o(e,t,7);return n<0&&(n+=4294967296),n}function E(t,e){var n=s(t,e,28)^s(e,t,2)^s(e,t,7);return n<0&&(n+=4294967296),n}function S(t,e){var n=o(t,e,14)^o(t,e,18)^o(e,t,9);return n<0&&(n+=4294967296),n}function I(t,e){var n=s(t,e,14)^s(t,e,18)^s(e,t,9);return n<0&&(n+=4294967296),n}function M(t,e){var n=o(t,e,1)^o(t,e,8)^c(t,e,7);return n<0&&(n+=4294967296),n}function T(t,e){var n=s(t,e,1)^s(t,e,8)^u(t,e,7);return n<0&&(n+=4294967296),n}function D(t,e){var n=o(t,e,19)^o(e,t,29)^c(t,e,6);return n<0&&(n+=4294967296),n}function R(t,e){var n=s(t,e,19)^s(e,t,29)^u(t,e,6);return n<0&&(n+=4294967296),n}r.inherits(b,_),t.exports=b,b.blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.prototype._prepareBlock=function(t,e){for(var n=this.W,r=0;r<32;r++)n[r]=t[e+r];for(;r<n.length;r+=2){var i=D(n[r-4],n[r-3]),a=R(n[r-4],n[r-3]),o=n[r-14],s=n[r-13],c=M(n[r-30],n[r-29]),u=T(n[r-30],n[r-29]),l=n[r-32],d=n[r-31];n[r]=h(i,a,o,s,c,u,l,d),n[r+1]=p(i,a,o,s,c,u,l,d)}},b.prototype._update=function(t,e){this._prepareBlock(t,e);var n=this.W,r=this.h[0],i=this.h[1],o=this.h[2],s=this.h[3],c=this.h[4],u=this.h[5],h=this.h[6],p=this.h[7],_=this.h[8],g=this.h[9],b=this.h[10],M=this.h[11],T=this.h[12],D=this.h[13],R=this.h[14],P=this.h[15];a(this.k.length===n.length);for(var O=0;O<n.length;O+=2){var L=R,A=P,N=S(_,g),B=I(_,g),j=y(_,g,b,M,T),F=x(_,g,b,M,T,D),Y=this.k[O],$=this.k[O+1],z=n[O],V=n[O+1],H=m(L,A,N,B,j,F,Y,$,z,V),q=v(L,A,N,B,j,F,Y,$,z,V);L=C(r,i),A=E(r,i),N=w(r,i,o,s,c),B=k(r,i,o,s,c,u);var W=d(L,A,N,B),U=f(L,A,N,B);R=T,P=D,T=b,D=M,b=_,M=g,_=d(h,p,H,q),g=f(p,p,H,q),h=c,p=u,c=o,u=s,o=r,s=i,r=d(H,q,W,U),i=f(H,q,W,U)}l(this.h,0,r,i),l(this.h,2,o,s),l(this.h,4,c,u),l(this.h,6,h,p),l(this.h,8,_,g),l(this.h,10,b,M),l(this.h,12,T,D),l(this.h,14,R,P)},b.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(t,e,n){var r=n(10),i=n(92).Reporter,a=n(19).Buffer;function o(t,e){i.call(this,e),a.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function s(t,e){if(Array.isArray(t))this.length=0,this.value=t.map(function(t){return t instanceof s||(t=new s(t,e)),this.length+=t.length,t},this);else if("number"==typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"==typeof t)this.value=t,this.length=a.byteLength(t);else{if(!a.isBuffer(t))return e.error("Unsupported type: "+typeof t);this.value=t,this.length=t.length}}r(o,i),e.DecoderBuffer=o,o.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},o.prototype.restore=function(t){var e=new o(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,i.prototype.restore.call(this,t.reporter),e},o.prototype.isEmpty=function(){return this.offset===this.length},o.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},o.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");var n=new o(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+t,this.offset+=t,n},o.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},e.EncoderBuffer=s,s.prototype.join=function(t,e){return t||(t=new a(this.length)),e||(e=0),0===this.length?t:(Array.isArray(this.value)?this.value.forEach(function(n){n.join(t,e),e+=n.length}):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):a.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length),t)}},function(t,e,n){var r=e;r._reverse=function(t){var e={};return Object.keys(t).forEach(function(n){(0|n)==n&&(n|=0);var r=t[n];e[r]=n}),e},r.der=n(934)},function(t,e,n){var r=n(10),i=n(91),a=i.base,o=i.bignum,s=i.constants.der;function c(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new u,this.tree._init(t.body)}function u(t){a.Node.call(this,"der",t)}function l(t,e){var n=t.readUInt8(e);if(t.isError(n))return n;var r=s.tagClass[n>>6],i=0==(32&n);if(31==(31&n)){var a=n;for(n=0;128==(128&a);){if(a=t.readUInt8(e),t.isError(a))return a;n<<=7,n|=127&a}}else n&=31;return{cls:r,primitive:i,tag:n,tagStr:s.tag[n]}}function d(t,e,n){var r=t.readUInt8(n);if(t.isError(r))return r;if(!e&&128===r)return null;if(0==(128&r))return r;var i=127&r;if(i>4)return t.error("length octect is too long");r=0;for(var a=0;a<i;a++){r<<=8;var o=t.readUInt8(n);if(t.isError(o))return o;r|=o}return r}t.exports=c,c.prototype.decode=function(t,e){return t instanceof a.DecoderBuffer||(t=new a.DecoderBuffer(t,e)),this.tree._decode(t,e)},r(u,a.Node),u.prototype._peekTag=function(t,e,n){if(t.isEmpty())return!1;var r=t.save(),i=l(t,'Failed to peek tag: "'+e+'"');return t.isError(i)?i:(t.restore(r),i.tag===e||i.tagStr===e||i.tagStr+"of"===e||n)},u.prototype._decodeTag=function(t,e,n){var r=l(t,'Failed to decode tag of "'+e+'"');if(t.isError(r))return r;var i=d(t,r.primitive,'Failed to get length of "'+e+'"');if(t.isError(i))return i;if(!n&&r.tag!==e&&r.tagStr!==e&&r.tagStr+"of"!==e)return t.error('Failed to match tag: "'+e+'"');if(r.primitive||null!==i)return t.skip(i,'Failed to match body of: "'+e+'"');var a=t.save(),o=this._skipUntilEnd(t,'Failed to skip indefinite length body: "'+this.tag+'"');return t.isError(o)?o:(i=t.offset-a.offset,t.restore(a),t.skip(i,'Failed to match body of: "'+e+'"'))},u.prototype._skipUntilEnd=function(t,e){for(;;){var n=l(t,e);if(t.isError(n))return n;var r,i=d(t,n.primitive,e);if(t.isError(i))return i;if(r=n.primitive||null!==i?t.skip(i):this._skipUntilEnd(t,e),t.isError(r))return r;if("end"===n.tagStr)break}},u.prototype._decodeList=function(t,e,n,r){for(var i=[];!t.isEmpty();){var a=this._peekTag(t,"end");if(t.isError(a))return a;var o=n.decode(t,"der",r);if(t.isError(o)&&a)break;i.push(o)}return i},u.prototype._decodeStr=function(t,e){if("bitstr"===e){var n=t.readUInt8();return t.isError(n)?n:{unused:n,data:t.raw()}}if("bmpstr"===e){var r=t.raw();if(r.length%2==1)return t.error("Decoding of string type: bmpstr length mismatch");for(var i="",a=0;a<r.length/2;a++)i+=String.fromCharCode(r.readUInt16BE(2*a));return i}if("numstr"===e){var o=t.raw().toString("ascii");return this._isNumstr(o)?o:t.error("Decoding of string type: numstr unsupported characters")}if("octstr"===e)return t.raw();if("objDesc"===e)return t.raw();if("printstr"===e){var s=t.raw().toString("ascii");return this._isPrintstr(s)?s:t.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(e)?t.raw().toString():t.error("Decoding of string type: "+e+" unsupported")},u.prototype._decodeObjid=function(t,e,n){for(var r,i=[],a=0;!t.isEmpty();){var o=t.readUInt8();a<<=7,a|=127&o,0==(128&o)&&(i.push(a),a=0)}128&o&&i.push(a);var s=i[0]/40|0,c=i[0]%40;if(r=n?i:[s,c].concat(i.slice(1)),e){var u=e[r.join(" ")];void 0===u&&(u=e[r.join(".")]),void 0!==u&&(r=u)}return r},u.prototype._decodeTime=function(t,e){var n=t.raw().toString();if("gentime"===e)var r=0|n.slice(0,4),i=0|n.slice(4,6),a=0|n.slice(6,8),o=0|n.slice(8,10),s=0|n.slice(10,12),c=0|n.slice(12,14);else{if("utctime"!==e)return t.error("Decoding "+e+" time is not supported yet");r=0|n.slice(0,2),i=0|n.slice(2,4),a=0|n.slice(4,6),o=0|n.slice(6,8),s=0|n.slice(8,10),c=0|n.slice(10,12);r=r<70?2e3+r:1900+r}return Date.UTC(r,i-1,a,o,s,c,0)},u.prototype._decodeNull=function(t){return null},u.prototype._decodeBool=function(t){var e=t.readUInt8();return t.isError(e)?e:0!==e},u.prototype._decodeInt=function(t,e){var n=t.raw(),r=new o(n);return e&&(r=e[r.toString(10)]||r),r},u.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getDecoder("der").tree}},function(t,e,n){var r=n(10),i=n(19).Buffer,a=n(91),o=a.base,s=a.constants.der;function c(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new u,this.tree._init(t.body)}function u(t){o.Node.call(this,"der",t)}function l(t){return t<10?"0"+t:t}t.exports=c,c.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},r(u,o.Node),u.prototype._encodeComposite=function(t,e,n,r){var a,o=function(t,e,n,r){var i;"seqof"===t?t="seq":"setof"===t&&(t="set");if(s.tagByName.hasOwnProperty(t))i=s.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return r.error("Unknown tag: "+t);i=t}if(i>=31)return r.error("Multi-octet tag encoding unsupported");e||(i|=32);return i|=s.tagClassByName[n||"universal"]<<6}(t,e,n,this.reporter);if(r.length<128)return(a=new i(2))[0]=o,a[1]=r.length,this._createEncoderBuffer([a,r]);for(var c=1,u=r.length;u>=256;u>>=8)c++;(a=new i(2+c))[0]=o,a[1]=128|c;u=1+c;for(var l=r.length;l>0;u--,l>>=8)a[u]=255&l;return this._createEncoderBuffer([a,r])},u.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){for(var n=new i(2*t.length),r=0;r<t.length;r++)n.writeUInt16BE(t.charCodeAt(r),2*r);return this._createEncoderBuffer(n)}return"numstr"===e?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===e?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(e)?this._createEncoderBuffer(t):"objDesc"===e?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+e+" unsupported")},u.prototype._encodeObjid=function(t,e,n){if("string"==typeof t){if(!e)return this.reporter.error("string objid given, but no values map found");if(!e.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=e[t].split(/[\s\.]+/g);for(var r=0;r<t.length;r++)t[r]|=0}else if(Array.isArray(t)){t=t.slice();for(r=0;r<t.length;r++)t[r]|=0}if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!n){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}var a=0;for(r=0;r<t.length;r++){var o=t[r];for(a++;o>=128;o>>=7)a++}var s=new i(a),c=s.length-1;for(r=t.length-1;r>=0;r--){o=t[r];for(s[c--]=127&o;(o>>=7)>0;)s[c--]=128|127&o}return this._createEncoderBuffer(s)},u.prototype._encodeTime=function(t,e){var n,r=new Date(t);return"gentime"===e?n=[l(r.getFullYear()),l(r.getUTCMonth()+1),l(r.getUTCDate()),l(r.getUTCHours()),l(r.getUTCMinutes()),l(r.getUTCSeconds()),"Z"].join(""):"utctime"===e?n=[l(r.getFullYear()%100),l(r.getUTCMonth()+1),l(r.getUTCDate()),l(r.getUTCHours()),l(r.getUTCMinutes()),l(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(n,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!i.isBuffer(t)){var n=t.toArray();!t.sign&&128&n[0]&&n.unshift(0),t=new i(n)}if(i.isBuffer(t)){var r=t.length;0===t.length&&r++;var a=new i(r);return t.copy(a),0===t.length&&(a[0]=0),this._createEncoderBuffer(a)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);r=1;for(var o=t;o>=256;o>>=8)r++;for(o=(a=new Array(r)).length-1;o>=0;o--)a[o]=255&t,t>>=8;return 128&a[0]&&a.unshift(0),this._createEncoderBuffer(new i(a))},u.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},u.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},u.prototype._skipDefault=function(t,e,n){var r,i=this._baseState;if(null===i.default)return!1;var a=t.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,e,n).join()),a.length!==i.defaultBuffer.length)return!1;for(r=0;r<a.length;r++)if(a[r]!==i.defaultBuffer[r])return!1;return!0}},function(t,e){t.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},function(t,e,n){var r=n(87),i=n(11).Buffer;function a(t){var e=i.allocUnsafe(4);return e.writeUInt32BE(t,0),e}t.exports=function(t,e){for(var n,o=i.alloc(0),s=0;o.length<e;)n=a(s++),o=i.concat([o,r("sha1").update(t).update(n).digest()]);return o.slice(0,e)}},function(t,e){t.exports=function(t,e){for(var n=t.length,r=-1;++r<n;)t[r]^=e[r];return t}},function(t,e,n){var r=n(22),i=n(11).Buffer;t.exports=function(t,e){return i.from(t.toRed(r.mont(e.modulus)).redPow(new r(e.publicExponent)).fromRed().toArray())}},function(t,e,n){"use strict";e.a=function(t){var e="";if(!t)try{t=n(948)}catch(t){e=t.toString()}return{readFile:t?function(e){return new Promise(function(n,r){t.readFile(e,function(t,e){return t?r(t):n(e)})})}:function(){throw new Error("readFile - failed to require fs in nodejs environment with error: "+e)}}}},function(t,e,n){const r=n(957);e.parseFont=r,e.createCanvas=function(t,e){return Object.assign(document.createElement("canvas"),{width:t,height:e})},e.createImageData=function(t,e,n){switch(arguments.length){case 0:return new ImageData;case 1:return new ImageData(t);case 2:return new ImageData(t,e);default:return new ImageData(t,e,n)}},e.loadImage=function(t,e){return new Promise(function(n,r){const i=Object.assign(document.createElement("img"),e);function a(){i.onload=null,i.onerror=null}i.onload=function(){a(),n(i)},i.onerror=function(){a(),r(new Error('Failed to load the image "'+t+'"'))},i.src=t})}},function(t,e,n){(function(e){t.exports=function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=69)}([function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(33)("wks"),i=n(22),a=n(1).Symbol,o="function"==typeof a;(t.exports=function(t){return r[t]||(r[t]=o&&a[t]||(o?a:i)("Symbol."+t))}).store=r},function(t,e,n){var r=n(1),i=n(0),a=n(13),o=n(9),s=n(10),c=function(t,e,n){var u,l,d,f=t&c.F,h=t&c.G,p=t&c.S,m=t&c.P,v=t&c.B,_=t&c.W,g=h?i:i[e]||(i[e]={}),b=g.prototype,y=h?r:p?r[e]:(r[e]||{}).prototype;for(u in h&&(n=e),n)(l=!f&&y&&void 0!==y[u])&&s(g,u)||(d=l?y[u]:n[u],g[u]=h&&"function"!=typeof y[u]?n[u]:v&&l?a(d,r):_&&y[u]==d?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(d):m&&"function"==typeof d?a(Function.call,d):d,m&&((g.virtual||(g.virtual={}))[u]=d,t&c.R&&b&&!b[u]&&o(b,u,d)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){var r=n(5),i=n(47),a=n(28),o=Object.defineProperty;e.f=n(8)?Object.defineProperty:function(t,e,n){if(r(t),e=a(e,!0),r(n),i)try{return o(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(7);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){"use strict";function r(t,e,n){var r=t.match(e);return r&&r.length>=n&&parseInt(r[n],10)}var i=!0,a=!0;t.exports={extractVersion:r,wrapPeerConnectionEvent:function(t,e,n){if(t.RTCPeerConnection){var r=t.RTCPeerConnection.prototype,i=r.addEventListener;r.addEventListener=function(t,r){if(t!==e)return i.apply(this,arguments);var a=function(t){var e=n(t);e&&r(e)};return this._eventMap=this._eventMap||{},this._eventMap[r]=a,i.apply(this,[t,a])};var a=r.removeEventListener;r.removeEventListener=function(t,n){if(t!==e||!this._eventMap||!this._eventMap[n])return a.apply(this,arguments);var r=this._eventMap[n];return delete this._eventMap[n],a.apply(this,[t,r])},Object.defineProperty(r,"on"+e,{get:function(){return this["_on"+e]},set:function(t){this["_on"+e]&&(this.removeEventListener(e,this["_on"+e]),delete this["_on"+e]),t&&this.addEventListener(e,this["_on"+e]=t)},enumerable:!0,configurable:!0})}},disableLog:function(t){return"boolean"!=typeof t?new Error("Argument type: "+typeof t+". Please use a boolean."):(i=t,t?"adapter.js logging disabled":"adapter.js logging enabled")},disableWarnings:function(t){return"boolean"!=typeof t?new Error("Argument type: "+typeof t+". Please use a boolean."):(a=!t,"adapter.js deprecation warnings "+(t?"disabled":"enabled"))},log:function(){if("object"==typeof window){if(i)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}},deprecated:function(t,e){a&&console.warn(t+" is deprecated, please use "+e+" instead.")},detectBrowser:function(t){var e=t&&t.navigator,n={browser:null,version:null};if(void 0===t||!t.navigator)return n.browser="Not a browser.",n;if(e.mozGetUserMedia)n.browser="firefox",n.version=r(e.userAgent,/Firefox\/(\d+)\./,1);else if(e.webkitGetUserMedia)n.browser="chrome",n.version=r(e.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(e.mediaDevices&&e.userAgent.match(/Edge\/(\d+).(\d+)$/))n.browser="edge",n.version=r(e.userAgent,/Edge\/(\d+).(\d+)$/,2);else{if(!t.RTCPeerConnection||!e.userAgent.match(/AppleWebKit\/(\d+)\./))return n.browser="Not a supported browser.",n;n.browser="safari",n.version=r(e.userAgent,/AppleWebKit\/(\d+)\./,1)}return n}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){t.exports=!n(16)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(4),i=n(17);t.exports=n(8)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){t.exports=n(93)},function(t,e,n){"use strict";e.__esModule=!0;var r=function(t){return t&&t.__esModule?t:{default:t}}(n(44));e.default=function(t){return function(){var e=t.apply(this,arguments);return new r.default(function(t,n){return function i(a,o){try{var s=e[a](o),c=s.value}catch(t){return void n(t)}if(!s.done)return r.default.resolve(c).then(function(t){i("next",t)},function(t){i("throw",t)});t(c)}("next")})}}},function(t,e,n){var r=n(21);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var r=n(77),i=n(26);t.exports=function(t){return r(i(t))}},function(t,e){t.exports=!0},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports={}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t,e,n,r){var i,a=t=t||{},o=typeof t.default;"object"!==o&&"function"!==o||(i=t,a=t.default);var s="function"==typeof a?a.options:a;if(e&&(s.render=e.render,s.staticRenderFns=e.staticRenderFns),n&&(s._scopeId=n),r){var c=s.computed||(s.computed={});Object.keys(r).forEach(function(t){var e=r[t];c[t]=function(){return e}})}return{esModule:i,exports:a,options:s}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(4).f,i=n(10),a=n(2)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,a)&&r(t,a,{configurable:!0,value:e})}},function(t,e,n){"use strict";var r=n(74)(!0);n(46)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(7),i=n(1).document,a=r(i)&&r(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},function(t,e,n){var r=n(7);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(5),i=n(76),a=n(34),o=n(32)("IE_PROTO"),s=function(){},c=function(){var t,e=n(27)("iframe"),r=a.length;for(e.style.display="none",n(50).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[a[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[o]=t):n=c(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(49),i=n(34);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){var r=n(25),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){var r=n(33)("keys"),i=n(22);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e,n){var r=n(0),i=n(1),a=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(15)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(26);t.exports=function(t){return Object(r(t))}},function(t,e,n){"use strict";var r=n(21);t.exports.f=function(t){return new function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=r(e),this.reject=r(n)}(t)}},function(t,e,n){"use strict";n.d(e,"b",function(){return l}),e.a=function(t,e){var n=e.detectHandler,r=e.locateHandler,i=e.minDelay,a=null,o=null,s=performance.now(),c=new u.a,l=!1,d=!0;return c.onmessage=function(t){l=!1;var e=t.data,i=e.content,s=e.location;null!==i&&i!==a&&n(t.data),s!==o&&r(s),a=i||a,o=s},function e(n){if(d){if(window.requestAnimationFrame(e),n-s>=i&&(s=n,!1===l)){l=!0;var r=t.captureFrame();c.postMessage(r,[r.data.buffer])}}else c.terminate()}(),function(){d=!1}};var r=n(11),i=n.n(r),a=n(12),o=n.n(a),s=n(38),c=n(95),u=n.n(c),l=function(){var t=o()(i.a.mark(function t(e){var n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return(n=new u.a).postMessage(e,[e.data.buffer]),t.next=4,Object(s.a)(n,"message");case 4:return r=t.sent,n.terminate(),t.abrupt("return",r.data);case 7:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},function(t,e,n){"use strict";function r(t,e,n){var r,i;void 0===n&&(n="error");var a=new Promise(function(t,e){r=t,i=e});return t.addEventListener(e,r),t.addEventListener(n,i),a.finally(function(){t.removeEventListener(e,r),t.removeEventListener(n,i)}),a}n.d(e,"a",function(){return r})},function(t,e,n){e.f=n(2)},function(t,e,n){var r=n(1),i=n(0),a=n(15),o=n(39),s=n(4).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=a?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:o.f(t)})}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){"use strict";function r(t,e,n){var r=Math.min(1,d.width/e,d.height/n),i=r*e,a=r*n;return f.drawImage(t,0,0,i,a),f.getImageData(0,0,i,a)}function i(t){return r(t,t.naturalWidth,t.naturalHeight)}e.c=function(t){return r(t,t.videoWidth,t.videoHeight)},n.d(e,"b",function(){return h}),n.d(e,"a",function(){return p});var a=n(11),o=n.n(a),s=n(12),c=n.n(s),u=n(63),l=n(38),d=document.createElement("canvas"),f=d.getContext("2d");d.width=1920,d.height=1080;var h=function(){var t=c()(o.a.mark(function t(e){var n;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.startsWith("http")||!1!==e.includes(location.host)){t.next=2;break}throw new u.b;case 2:return(n=document.createElement("img")).src=e,t.next=6,Object(l.a)(n,"load");case 6:return t.abrupt("return",i(n));case 7:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),p=function(){var t=c()(o.a.mark(function t(e){var n,r,i;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!/image.*/.test(e.type)){t.next=10;break}return(n=new FileReader).readAsDataURL(e),t.next=5,Object(l.a)(n,"load");case 5:return r=t.sent,i=r.target.result,t.abrupt("return",h(i));case 10:throw new u.a;case 11:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},function(t,e,n){var r=n(20)(n(140),null,null,null);t.exports=r.exports},function(t,e,n){t.exports={default:n(73),__esModule:!0}},function(t,e){},function(t,e,n){"use strict";var r=n(15),i=n(3),a=n(48),o=n(9),s=n(18),c=n(75),u=n(23),l=n(51),d=n(2)("iterator"),f=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,e,n,p,m,v,_){c(n,e,p);var g,b,y,x=function(t){if(!f&&t in E)return E[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},w=e+" Iterator",k="values"==m,C=!1,E=t.prototype,S=E[d]||E["@@iterator"]||m&&E[m],I=S||x(m),M=m?k?x("entries"):I:void 0,T="Array"==e&&E.entries||S;if(T&&(y=l(T.call(new t)))!==Object.prototype&&y.next&&(u(y,w,!0),r||"function"==typeof y[d]||o(y,d,h)),k&&S&&"values"!==S.name&&(C=!0,I=function(){return S.call(this)}),r&&!_||!f&&!C&&E[d]||o(E,d,I),s[e]=I,s[w]=h,m)if(g={values:k?I:x("values"),keys:v?I:x("keys"),entries:M},_)for(b in g)b in E||a(E,b,g[b]);else i(i.P+i.F*(f||C),e,g);return g}},function(t,e,n){t.exports=!n(8)&&!n(16)(function(){return 7!=Object.defineProperty(n(27)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){t.exports=n(9)},function(t,e,n){var r=n(10),i=n(14),a=n(78)(!1),o=n(32)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),c=0,u=[];for(n in s)n!=o&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~a(u,n)||u.push(n));return u}},function(t,e,n){var r=n(1).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(10),i=n(35),a=n(32)("IE_PROTO"),o=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?o:null}},function(t,e,n){n(80);for(var r=n(1),i=n(9),a=n(18),o=n(2)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),c=0;c<s.length;c++){var u=s[c],l=r[u],d=l&&l.prototype;d&&!d[o]&&i(d,o,u),a[u]=a.Array}},function(t,e,n){var r=n(19),i=n(2)("toStringTag"),a="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,o;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:a?r(e):"Object"==(o=r(e))&&"function"==typeof e.callee?"Arguments":o}},function(t,e,n){var r=n(5);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var a=t.return;throw void 0!==a&&r(a.call(t)),e}}},function(t,e,n){var r=n(18),i=n(2)("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||a[i]===t)}},function(t,e,n){var r=n(53),i=n(2)("iterator"),a=n(18);t.exports=n(0).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||a[r(t)]}},function(t,e,n){var r=n(5),i=n(21),a=n(2)("species");t.exports=function(t,e){var n,o=r(t).constructor;return void 0===o||void 0==(n=r(o)[a])?e:i(n)}},function(t,e,n){var r,i,a,o=n(13),s=n(86),c=n(50),u=n(27),l=n(1),d=l.process,f=l.setImmediate,h=l.clearImmediate,p=l.MessageChannel,m=l.Dispatch,v=0,_={},g=function(){var t=+this;if(_.hasOwnProperty(t)){var e=_[t];delete _[t],e()}},b=function(t){g.call(t.data)};f&&h||(f=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return _[++v]=function(){s("function"==typeof t?t:Function(t),e)},r(v),v},h=function(t){delete _[t]},"process"==n(19)(d)?r=function(t){d.nextTick(o(g,t,1))}:m&&m.now?r=function(t){m.now(o(g,t,1))}:p?(a=(i=new p).port2,i.port1.onmessage=b,r=o(a.postMessage,a,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(t){l.postMessage(t+"","*")},l.addEventListener("message",b,!1)):r="onreadystatechange"in u("script")?function(t){c.appendChild(u("script")).onreadystatechange=function(){c.removeChild(this),g.call(t)}}:function(t){setTimeout(o(g,t,1),0)}),t.exports={set:f,clear:h}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var r=n(5),i=n(7),a=n(36);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=a.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){var r=n(2)("iterator"),i=!1;try{var a=[7][r]();a.return=function(){i=!0},Array.from(a,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var a=[7],o=a[r]();o.next=function(){return{done:n=!0}},a[r]=function(){return o},t(a)}catch(t){}return n}},function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";n.d(e,"b",function(){return d}),n.d(e,"a",function(){return f}),n.d(e,"d",function(){return h}),n.d(e,"c",function(){return p});var r=n(116),i=n.n(r),a=n(62),o=n.n(a),s=n(120),c=n.n(s),u=n(132),l=n.n(u),d=function(t){function e(){o()(this,e);var t=c()(this,(e.__proto__||i()(e)).call(this,"can't process cross-origin image"));return t.name="DropImageFetchError",t}return l()(e,t),e}(Error),f=function(t){function e(){o()(this,e);var t=c()(this,(e.__proto__||i()(e)).call(this,"drag-and-dropped file is not of type image and can't be decoded"));return t.name="DropImageDecodeError",t}return l()(e,t),e}(Error),h=function(t){function e(){o()(this,e);var t=c()(this,(e.__proto__||i()(e)).call(this,"this browser has no Stream API support"));return t.name="StreamApiNotSupportedError",t}return l()(e,t),e}(Error),p=function(t){function e(){o()(this,e);var t=c()(this,(e.__proto__||i()(e)).call(this,"camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP."));return t.name="InsecureContextError",t}return l()(e,t),e}(Error)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=r(n(121)),a=r(n(123)),o="function"==typeof a.default&&"symbol"==typeof i.default?function(t){return typeof t}:function(t){return t&&"function"==typeof a.default&&t.constructor===a.default&&t!==a.default.prototype?"symbol":typeof t};e.default="function"==typeof a.default&&"symbol"===o(i.default)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof a.default&&t.constructor===a.default&&t!==a.default.prototype?"symbol":void 0===t?"undefined":o(t)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(49),i=n(34).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){var r=n(41),i=n(17),a=n(14),o=n(28),s=n(10),c=n(47),u=Object.getOwnPropertyDescriptor;e.f=n(8)?u:function(t,e){if(t=a(t),e=o(e,!0),c)try{return u(t,e)}catch(t){}if(s(t,e))return i(!r.f.call(t,e),t[e])}},function(t,e,n){"use strict";e.__esModule=!0;var r=function(t){return t&&t.__esModule?t:{default:t}}(n(144));e.default=function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return(0,r.default)(t)}},function(t,n,r){"use strict";function i(t){t.component("qrcode-stream",o.a),t.component("qrcode-capture",c.a),t.component("qrcode-drop-zone",l.a)}Object.defineProperty(n,"__esModule",{value:!0}),n.install=i;var a=r(70),o=r.n(a),s=r(142),c=r.n(s),u=r(149),l=r.n(u);r.d(n,"QrcodeStream",function(){return o.a}),r.d(n,"QrcodeCapture",function(){return c.a}),r.d(n,"QrcodeDropZone",function(){return l.a});var d={install:i};n.default=d;var f=null;"undefined"!=typeof window?f=window.Vue:void 0!==e&&(f=e.Vue),f&&f.use(d)},function(t,e,n){n(71);var r=n(20)(n(72),n(141),"data-v-1f90552a",null);t.exports=r.exports},function(t,e){},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(44),i=n.n(r),a=n(11),o=n.n(a),s=n(12),c=n.n(s),u=n(37),l=n(97),d=n(98),f=n(43),h=n.n(f);e.default={name:"qrcode-stream",mixins:[h.a],props:{camera:{type:String,default:"auto",validator:function(t){return["auto","rear","front","off"].includes(t)}},track:{type:[Function,Boolean],default:!0}},data:function(){return{cameraInstance:null,destroyed:!1,stopScanning:function(){}}},computed:{shouldStream:function(){return!1===this.destroyed&&"off"!==this.camera},shouldScan:function(){return!0===this.shouldStream&&null!==this.cameraInstance},scanInterval:function(){return!1===this.track?500:40},trackRepaintFunction:function(){return!0===this.track?Object(l.a)({color:"#ff0000"}):!1===this.track?void 0:this.track},constraints:function(){var t={audio:!1,video:{width:{min:360,ideal:640,max:1920},height:{min:240,ideal:480,max:1080}}};switch(this.camera){case"auto":return t.video.facingMode={ideal:"environment"},t;case"rear":return t.video.facingMode={exact:"environment"},t;case"front":return t.video.facingMode={exact:"user"},t;case"off":default:return}}},watch:{shouldStream:function(t){if(!t){var e=this.cameraInstance.captureFrame();this.paintPauseFrame(e)}},shouldScan:function(t){t?(this.clearPauseFrame(),this.clearTrackingLayer(),this.startScanning()):this.stopScanning()},constraints:function(){this.$emit("init",this.init())}},mounted:function(){this.$emit("init",this.init())},beforeDestroy:function(){this.beforeResetCamera(),this.stopScanning(),this.destroyed=!0},methods:{init:function(){var t=this;return c()(o.a.mark(function e(){return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.beforeResetCamera(),void 0!==t.constraints){e.next=5;break}t.cameraInstance=null,e.next=9;break;case 5:return e.next=7,Object(d.a)(t.constraints,t.$refs.video);case 7:t.cameraInstance=e.sent,t.destroyed&&t.cameraInstance.stop();case 9:case"end":return e.stop()}},e,t)}))()},startScanning:function(){var t=this;this.stopScanning=Object(u.a)(this.cameraInstance,{detectHandler:function(e){t.onDetect(i.a.resolve(e))},locateHandler:this.onLocate,minDelay:this.scanInterval})},beforeResetCamera:function(){null!==this.cameraInstance&&(this.cameraInstance.stop(),this.cameraInstance=null)},onLocate:function(t){void 0===this.trackRepaintFunction||null===t?this.clearTrackingLayer():this.repaintTrackingLayer(t)},normalizeLocation:function(t,e,n){var r={};for(var i in n)r[i]={x:Math.floor(n[i].x*t),y:Math.floor(n[i].y*e)};return r},repaintTrackingLayer:function(t){var e=this,n=this.$refs.video,r=this.$refs.trackingLayer,i=r.getContext("2d"),a=n.offsetWidth,o=n.offsetHeight,s=n.videoWidth,c=n.videoHeight;window.requestAnimationFrame(function(){r.width=a,r.height=o;var n=a/s,u=o/c;t=e.normalizeLocation(n,u,t),e.trackRepaintFunction(t,i)})},clearTrackingLayer:function(){var t=this.$refs.trackingLayer,e=t.getContext("2d");window.requestAnimationFrame(function(){e.clearRect(0,0,t.width,t.height)})},paintPauseFrame:function(t){var e=this.$refs.pauseFrame,n=e.getContext("2d");window.requestAnimationFrame(function(){e.width=t.width,e.height=t.height,n.putImageData(t,0,0)})},clearPauseFrame:function(){var t=this.$refs.pauseFrame,e=t.getContext("2d");window.requestAnimationFrame(function(){e.clearRect(0,0,t.width,t.height)})}}}},function(t,e,n){n(45),n(24),n(52),n(83),n(91),n(92),t.exports=n(0).Promise},function(t,e,n){var r=n(25),i=n(26);t.exports=function(t){return function(e,n){var a,o,s=String(i(e)),c=r(n),u=s.length;return c<0||c>=u?t?"":void 0:(a=s.charCodeAt(c))<55296||a>56319||c+1===u||(o=s.charCodeAt(c+1))<56320||o>57343?t?s.charAt(c):a:t?s.slice(c,c+2):o-56320+(a-55296<<10)+65536}}},function(t,e,n){"use strict";var r=n(29),i=n(17),a=n(23),o={};n(9)(o,n(2)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(o,{next:i(1,n)}),a(t,e+" Iterator")}},function(t,e,n){var r=n(4),i=n(5),a=n(30);t.exports=n(8)?Object.defineProperties:function(t,e){i(t);for(var n,o=a(e),s=o.length,c=0;s>c;)r.f(t,n=o[c++],e[n]);return t}},function(t,e,n){var r=n(19);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(14),i=n(31),a=n(79);t.exports=function(t){return function(e,n,o){var s,c=r(e),u=i(c.length),l=a(o,u);if(t&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var r=n(25),i=Math.max,a=Math.min;t.exports=function(t,e){return(t=r(t))<0?i(t+e,0):a(t,e)}},function(t,e,n){"use strict";var r=n(81),i=n(82),a=n(18),o=n(14);t.exports=n(46)(Array,"Array",function(t,e){this._t=o(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var r,i,a,o,s=n(15),c=n(1),u=n(13),l=n(53),d=n(3),f=n(7),h=n(21),p=n(84),m=n(85),v=n(57),_=n(58).set,g=n(87)(),b=n(36),y=n(59),x=n(88),w=n(60),k=c.TypeError,C=c.process,E=C&&C.versions,S=E&&E.v8||"",I=c.Promise,M="process"==l(C),T=function(){},D=i=b.f,R=!!function(){try{var t=I.resolve(1),e=(t.constructor={})[n(2)("species")]=function(t){t(T,T)};return(M||"function"==typeof PromiseRejectionEvent)&&t.then(T)instanceof e&&0!==S.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(t){}}(),P=function(t){var e;return!(!f(t)||"function"!=typeof(e=t.then))&&e},O=function(t,e){if(!t._n){t._n=!0;var n=t._c;g(function(){for(var r=t._v,i=1==t._s,a=0;n.length>a;)!function(e){var n,a,o,s=i?e.ok:e.fail,c=e.resolve,u=e.reject,l=e.domain;try{s?(i||(2==t._h&&N(t),t._h=1),!0===s?n=r:(l&&l.enter(),n=s(r),l&&(l.exit(),o=!0)),n===e.promise?u(k("Promise-chain cycle")):(a=P(n))?a.call(n,c,u):c(n)):u(r)}catch(t){l&&!o&&l.exit(),u(t)}}(n[a++]);t._c=[],t._n=!1,e&&!t._h&&L(t)})}},L=function(t){_.call(c,function(){var e,n,r,i=t._v,a=A(t);if(a&&(e=y(function(){M?C.emit("unhandledRejection",i,t):(n=c.onunhandledrejection)?n({promise:t,reason:i}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=M||A(t)?2:1),t._a=void 0,a&&e.e)throw e.v})},A=function(t){return 1!==t._h&&0===(t._a||t._c).length},N=function(t){_.call(c,function(){var e;M?C.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})})},B=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),O(e,!0))},j=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw k("Promise can't be resolved itself");(e=P(t))?g(function(){var r={_w:n,_d:!1};try{e.call(t,u(j,r,1),u(B,r,1))}catch(t){B.call(r,t)}}):(n._v=t,n._s=1,O(n,!1))}catch(t){B.call({_w:n,_d:!1},t)}}};R||(I=function(t){p(this,I,"Promise","_h"),h(t),r.call(this);try{t(u(j,this,1),u(B,this,1))}catch(t){B.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(89)(I.prototype,{then:function(t,e){var n=D(v(this,I));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=M?C.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&O(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),a=function(){var t=new r;this.promise=t,this.resolve=u(j,t,1),this.reject=u(B,t,1)},b.f=D=function(t){return t===I||t===o?new a(t):i(t)}),d(d.G+d.W+d.F*!R,{Promise:I}),n(23)(I,"Promise"),n(90)("Promise"),o=n(0).Promise,d(d.S+d.F*!R,"Promise",{reject:function(t){var e=D(this);return(0,e.reject)(t),e.promise}}),d(d.S+d.F*(s||!R),"Promise",{resolve:function(t){return w(s&&this===o?I:this,t)}}),d(d.S+d.F*!(R&&n(61)(function(t){I.all(t).catch(T)})),"Promise",{all:function(t){var e=this,n=D(e),r=n.resolve,i=n.reject,a=y(function(){var n=[],a=0,o=1;m(t,!1,function(t){var s=a++,c=!1;n.push(void 0),o++,e.resolve(t).then(function(t){c||(c=!0,n[s]=t,--o||r(n))},i)}),--o||r(n)});return a.e&&i(a.v),n.promise},race:function(t){var e=this,n=D(e),r=n.reject,i=y(function(){m(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}})},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(13),i=n(54),a=n(55),o=n(5),s=n(31),c=n(56),u={},l={};(e=t.exports=function(t,e,n,d,f){var h,p,m,v,_=f?function(){return t}:c(t),g=r(n,d,e?2:1),b=0;if("function"!=typeof _)throw TypeError(t+" is not iterable!");if(a(_)){for(h=s(t.length);h>b;b++)if((v=e?g(o(p=t[b])[0],p[1]):g(t[b]))===u||v===l)return v}else for(m=_.call(t);!(p=m.next()).done;)if((v=i(m,g,p.value,e))===u||v===l)return v}).BREAK=u,e.RETURN=l},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(1),i=n(58).set,a=r.MutationObserver||r.WebKitMutationObserver,o=r.process,s=r.Promise,c="process"==n(19)(o);t.exports=function(){var t,e,n,u=function(){var r,i;for(c&&(r=o.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(c)n=function(){o.nextTick(u)};else if(!a||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var l=s.resolve(void 0);n=function(){l.then(u)}}else n=function(){i.call(r,u)};else{var d=!0,f=document.createTextNode("");new a(u).observe(f,{characterData:!0}),n=function(){f.data=d=!d}}return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},function(t,e,n){var r=n(1).navigator;t.exports=r&&r.userAgent||""},function(t,e,n){var r=n(9);t.exports=function(t,e,n){for(var i in e)n&&t[i]?t[i]=e[i]:r(t,i,e[i]);return t}},function(t,e,n){"use strict";var r=n(1),i=n(0),a=n(4),o=n(8),s=n(2)("species");t.exports=function(t){var e="function"==typeof i[t]?i[t]:r[t];o&&e&&!e[s]&&a.f(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,n){"use strict";var r=n(3),i=n(0),a=n(1),o=n(57),s=n(60);r(r.P+r.R,"Promise",{finally:function(t){var e=o(this,i.Promise||a.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then(function(){return n})}:t,n?function(n){return s(e,t()).then(function(){throw n})}:t)}})},function(t,e,n){"use strict";var r=n(3),i=n(36),a=n(59);r(r.S,"Promise",{try:function(t){var e=i.f(this),n=a(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){var r=function(){return this}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,a=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n(94),i)r.regeneratorRuntime=a;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},function(t,e){!function(e){"use strict";function n(t,e,n,r){var a=e&&e.prototype instanceof i?e:i,o=Object.create(a.prototype),s=new h(r||[]);return o._invoke=u(t,n,s),o}function r(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function i(){}function a(){}function o(){}function s(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function c(t){function e(n,i,a,o){var s=r(t[n],t,i);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&g.call(u,"__await")?Promise.resolve(u.__await).then(function(t){e("next",t,a,o)},function(t){e("throw",t,a,o)}):Promise.resolve(u).then(function(t){c.value=t,a(c)},o)}o(s.arg)}var n;this._invoke=function(t,r){function i(){return new Promise(function(n,i){e(t,r,n,i)})}return n=n?n.then(i,i):i()}}function u(t,e,n){var i=E;return function(a,o){if(i===I)throw new Error("Generator is already running");if(i===M){if("throw"===a)throw o;return m()}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var c=l(s,n);if(c){if(c===T)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===E)throw i=M,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=I;var u=r(t,e,n);if("normal"===u.type){if(i=n.done?M:S,u.arg===T)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=M,n.method="throw",n.arg=u.arg)}}}function l(t,e){var n=t.iterator[e.method];if(n===v){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=v,l(t,e),"throw"===e.method))return T;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return T}var i=r(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,T;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=v),e.delegate=null,T):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,T)}function d(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function f(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function h(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(d,this),this.reset(!0)}function p(t){if(t){var e=t[y];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(g.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=v,e.done=!0,e};return r.next=r}}return{next:m}}function m(){return{value:v,done:!0}}var v,_=Object.prototype,g=_.hasOwnProperty,b="function"==typeof Symbol?Symbol:{},y=b.iterator||"@@iterator",x=b.asyncIterator||"@@asyncIterator",w=b.toStringTag||"@@toStringTag",k="object"==typeof t,C=e.regeneratorRuntime;if(C)k&&(t.exports=C);else{(C=e.regeneratorRuntime=k?t.exports:{}).wrap=n;var E="suspendedStart",S="suspendedYield",I="executing",M="completed",T={},D={};D[y]=function(){return this};var R=Object.getPrototypeOf,P=R&&R(R(p([])));P&&P!==_&&g.call(P,y)&&(D=P);var O=o.prototype=i.prototype=Object.create(D);a.prototype=O.constructor=o,o.constructor=a,o[w]=a.displayName="GeneratorFunction",C.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===a||"GeneratorFunction"===(e.displayName||e.name))},C.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,o):(t.__proto__=o,w in t||(t[w]="GeneratorFunction")),t.prototype=Object.create(O),t},C.awrap=function(t){return{__await:t}},s(c.prototype),c.prototype[x]=function(){return this},C.AsyncIterator=c,C.async=function(t,e,r,i){var a=new c(n(t,e,r,i));return C.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},s(O),O[w]="Generator",O[y]=function(){return this},O.toString=function(){return"[object Generator]"},C.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},C.values=p,h.prototype={constructor:h,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=v,this.done=!1,this.delegate=null,this.method="next",this.arg=v,this.tryEntries.forEach(f),!t)for(var e in this)"t"===e.charAt(0)&&g.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=v)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){function e(e,r){return a.type="throw",a.arg=t,n.next=e,r&&(n.method="next",n.arg=v),!!r}if(this.done)throw t;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var o=g.call(i,"catchLoc"),s=g.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,T):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),T},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),f(n),T}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;f(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:p(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=v),T}}}}(function(){return this}()||Function("return this")())},function(t,e,n){t.exports=function(){return n(96)('!function(o){function e(t){if(r[t])return r[t].exports;var c=r[t]={i:t,l:!1,exports:{}};return o[t].call(c.exports,c,c.exports,e),c.l=!0,c.exports}var r={};e.m=o,e.c=r,e.d=function(o,r,t){e.o(o,r)||Object.defineProperty(o,r,{configurable:!1,enumerable:!0,get:t})},e.n=function(o){var r=o&&o.__esModule?function(){return o.default}:function(){return o};return e.d(r,"a",r),r},e.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},e.p="",e(e.s=0)}([function(o,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=r(1),c=r.n(t);self.addEventListener("message",function(o){var e=o.data,r=c()(e.data,e.width,e.height,{inversionAttempts:"dontInvert"}),t=null,s=null;null!==r&&(t=r.data,s=r.location);var a={content:t,location:s,imageData:e};self.postMessage(a,[e.data.buffer])})},function(o,e,r){!function(e,r){o.exports=r()}("undefined"!=typeof self&&self,function(){return function(o){function e(t){if(r[t])return r[t].exports;var c=r[t]={i:t,l:!1,exports:{}};return o[t].call(c.exports,c,c.exports,e),c.l=!0,c.exports}var r={};return e.m=o,e.c=r,e.d=function(o,r,t){e.o(o,r)||Object.defineProperty(o,r,{configurable:!1,enumerable:!0,get:t})},e.n=function(o){var r=o&&o.__esModule?function(){return o.default}:function(){return o};return e.d(r,"a",r),r},e.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},e.p="",e(e.s=3)}([function(o,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function o(o,e){this.width=e,this.height=o.length/e,this.data=o}return o.createEmpty=function(e,r){return new o(new Uint8ClampedArray(e*r),e)},o.prototype.get=function(o,e){return!(o<0||o>=this.width||e<0||e>=this.height)&&!!this.data[e*this.width+o]},o.prototype.set=function(o,e,r){this.data[e*this.width+o]=r?1:0},o.prototype.setRegion=function(o,e,r,t,c){for(var s=e;s<e+t;s++)for(var a=o;a<o+r;a++)this.set(a,s,!!c)},o}();e.BitMatrix=t},function(o,e,r){"use strict";function t(o,e){return o^e}Object.defineProperty(e,"__esModule",{value:!0});var c=r(2);e.addOrSubtractGF=t;var s=function(){function o(o,e,r){this.primitive=o,this.size=e,this.generatorBase=r,this.expTable=new Array(this.size),this.logTable=new Array(this.size);for(var t=1,s=0;s<this.size;s++)this.expTable[s]=t,(t*=2)>=this.size&&(t=(t^this.primitive)&this.size-1);for(var s=0;s<this.size-1;s++)this.logTable[this.expTable[s]]=s;this.zero=new c.default(this,Uint8ClampedArray.from([0])),this.one=new c.default(this,Uint8ClampedArray.from([1]))}return o.prototype.multiply=function(o,e){return 0===o||0===e?0:this.expTable[(this.logTable[o]+this.logTable[e])%(this.size-1)]},o.prototype.inverse=function(o){if(0===o)throw new Error("Can\'t invert 0");return this.expTable[this.size-this.logTable[o]-1]},o.prototype.buildMonomial=function(o,e){if(o<0)throw new Error("Invalid monomial degree less than 0");if(0===e)return this.zero;var r=new Uint8ClampedArray(o+1);return r[0]=e,new c.default(this,r)},o.prototype.log=function(o){if(0===o)throw new Error("Can\'t take log(0)");return this.logTable[o]},o.prototype.exp=function(o){return this.expTable[o]},o}();e.default=s},function(o,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=r(1),c=function(){function o(o,e){if(0===e.length)throw new Error("No coefficients.");this.field=o;var r=e.length;if(r>1&&0===e[0]){for(var t=1;t<r&&0===e[t];)t++;if(t===r)this.coefficients=o.zero.coefficients;else{this.coefficients=new Uint8ClampedArray(r-t);for(var c=0;c<this.coefficients.length;c++)this.coefficients[c]=e[t+c]}}else this.coefficients=e}return o.prototype.degree=function(){return this.coefficients.length-1},o.prototype.isZero=function(){return 0===this.coefficients[0]},o.prototype.getCoefficient=function(o){return this.coefficients[this.coefficients.length-1-o]},o.prototype.addOrSubtract=function(e){if(this.isZero())return e;if(e.isZero())return this;var r=this.coefficients,c=e.coefficients;r.length>c.length&&(d=[c,r],r=d[0],c=d[1]);for(var s=new Uint8ClampedArray(c.length),a=c.length-r.length,n=0;n<a;n++)s[n]=c[n];for(var n=a;n<c.length;n++)s[n]=t.addOrSubtractGF(r[n-a],c[n]);return new o(this.field,s);var d},o.prototype.multiply=function(e){if(0===e)return this.field.zero;if(1===e)return this;for(var r=this.coefficients.length,t=new Uint8ClampedArray(r),c=0;c<r;c++)t[c]=this.field.multiply(this.coefficients[c],e);return new o(this.field,t)},o.prototype.multiplyPoly=function(e){if(this.isZero()||e.isZero())return this.field.zero;for(var r=this.coefficients,c=r.length,s=e.coefficients,a=s.length,n=new Uint8ClampedArray(c+a-1),d=0;d<c;d++)for(var l=r[d],i=0;i<a;i++)n[d+i]=t.addOrSubtractGF(n[d+i],this.field.multiply(l,s[i]));return new o(this.field,n)},o.prototype.multiplyByMonomial=function(e,r){if(e<0)throw new Error("Invalid degree less than 0");if(0===r)return this.field.zero;for(var t=this.coefficients.length,c=new Uint8ClampedArray(t+e),s=0;s<t;s++)c[s]=this.field.multiply(this.coefficients[s],r);return new o(this.field,c)},o.prototype.evaluateAt=function(o){var e=0;if(0===o)return this.getCoefficient(0);var r=this.coefficients.length;if(1===o)return this.coefficients.forEach(function(o){e=t.addOrSubtractGF(e,o)}),e;e=this.coefficients[0];for(var c=1;c<r;c++)e=t.addOrSubtractGF(this.field.multiply(o,e),this.coefficients[c]);return e},o}();e.default=c},function(o,e,r){"use strict";function t(o){var e=d.locate(o);if(!e)return null;var r=n.extract(o,e),t=a.decode(r.matrix);return t?{binaryData:t.bytes,data:t.text,chunks:t.chunks,location:{topRightCorner:r.mappingFunction(e.dimension,0),topLeftCorner:r.mappingFunction(0,0),bottomRightCorner:r.mappingFunction(e.dimension,e.dimension),bottomLeftCorner:r.mappingFunction(0,e.dimension),topRightFinderPattern:e.topRight,topLeftFinderPattern:e.topLeft,bottomLeftFinderPattern:e.bottomLeft,bottomRightAlignmentPattern:e.alignmentPattern}}:null}function c(o,e,r,c){void 0===c&&(c={});var a=l;Object.keys(a||{}).forEach(function(o){a[o]=c[o]||a[o]});var n="attemptBoth"===a.inversionAttempts||"invertFirst"===a.inversionAttempts,d="onlyInvert"===a.inversionAttempts||"invertFirst"===a.inversionAttempts,i=s.binarize(o,e,r,n),B=i.binarized,k=i.inverted,u=t(d?k:B);return u||"attemptBoth"!==a.inversionAttempts&&"invertFirst"!==a.inversionAttempts||(u=t(d?B:k)),u}Object.defineProperty(e,"__esModule",{value:!0});var s=r(4),a=r(5),n=r(11),d=r(12),l={inversionAttempts:"attemptBoth"};c.default=c,e.default=c},function(o,e,r){"use strict";function t(o,e,r){return o<e?e:o>r?r:o}function c(o,e,r,c){if(o.length!==e*r*4)throw new Error("Malformed data passed to binarizer.");for(var l=new d(e,r),i=0;i<e;i++)for(var B=0;B<r;B++){var k=o[4*(B*e+i)+0],u=o[4*(B*e+i)+1],C=o[4*(B*e+i)+2];l.set(i,B,.2126*k+.7152*u+.0722*C)}for(var m=Math.ceil(e/a),f=Math.ceil(r/a),w=new d(m,f),P=0;P<f;P++)for(var v=0;v<m;v++){for(var h=0,p=1/0,b=0,B=0;B<a;B++)for(var i=0;i<a;i++){var y=l.get(v*a+i,P*a+B);h+=y,p=Math.min(p,y),b=Math.max(b,y)}var g=h/Math.pow(a,2);if(b-p<=n&&(g=p/2,P>0&&v>0)){var x=(w.get(v,P-1)+2*w.get(v-1,P)+w.get(v-1,P-1))/4;p<x&&(g=x)}w.set(v,P,g)}var M=s.BitMatrix.createEmpty(e,r),L=null;c&&(L=s.BitMatrix.createEmpty(e,r));for(var P=0;P<f;P++)for(var v=0;v<m;v++){for(var N=t(v,2,m-3),I=t(P,2,f-3),h=0,O=-2;O<=2;O++)for(var z=-2;z<=2;z++)h+=w.get(N+O,I+z);for(var S=h/25,O=0;O<a;O++)for(var z=0;z<a;z++){var i=v*a+O,B=P*a+z,X=l.get(i,B);M.set(i,B,X<=S),c&&L.set(i,B,!(X<=S))}}return c?{binarized:M,inverted:L}:{binarized:M}}Object.defineProperty(e,"__esModule",{value:!0});var s=r(0),a=8,n=24,d=function(){function o(o,e){this.width=o,this.data=new Uint8ClampedArray(o*e)}return o.prototype.get=function(o,e){return this.data[e*this.width+o]},o.prototype.set=function(o,e,r){this.data[e*this.width+o]=r},o}();e.binarize=c},function(o,e,r){"use strict";function t(o,e){for(var r=o^e,t=0;r;)t++,r&=r-1;return t}function c(o,e){return e<<1|o}function s(o){var e=17+4*o.versionNumber,r=k.BitMatrix.createEmpty(e,e);r.setRegion(0,0,9,9,!0),r.setRegion(e-8,0,8,9,!0),r.setRegion(0,e-8,9,8,!0);for(var t=0,c=o.alignmentPatternCenters;t<c.length;t++)for(var s=c[t],a=0,n=o.alignmentPatternCenters;a<n.length;a++){var d=n[a];6===s&&6===d||6===s&&d===e-7||s===e-7&&6===d||r.setRegion(s-2,d-2,5,5,!0)}return r.setRegion(6,9,1,e-17,!0),r.setRegion(9,6,e-17,1,!0),o.versionNumber>6&&(r.setRegion(e-11,0,3,6,!0),r.setRegion(0,e-11,6,3,!0)),r}function a(o,e,r){for(var t=w[r.dataMask],a=o.height,n=s(e),d=[],l=0,i=0,B=!0,k=a-1;k>0;k-=2){6===k&&k--;for(var u=0;u<a;u++)for(var C=B?a-1-u:u,m=0;m<2;m++){var f=k-m;if(!n.get(f,C)){i++;var P=o.get(f,C);t({y:C,x:f})&&(P=!P),l=c(P,l),8===i&&(d.push(l),i=0,l=0)}}B=!B}return d}function n(o){var e=o.height,r=Math.floor((e-17)/4);if(r<=6)return m.VERSIONS[r-1];for(var s=0,a=5;a>=0;a--)for(var n=e-9;n>=e-11;n--)s=c(o.get(n,a),s);for(var d=0,n=5;n>=0;n--)for(var a=e-9;a>=e-11;a--)d=c(o.get(n,a),d);for(var l,i=1/0,B=0,k=m.VERSIONS;B<k.length;B++){var u=k[B];if(u.infoBits===s||u.infoBits===d)return u;var C=t(s,u.infoBits);C<i&&(l=u,i=C),C=t(d,u.infoBits),C<i&&(l=u,i=C)}return i<=3?l:void 0}function d(o){for(var e=0,r=0;r<=8;r++)6!==r&&(e=c(o.get(r,8),e));for(var s=7;s>=0;s--)6!==s&&(e=c(o.get(8,s),e));for(var a=o.height,n=0,s=a-1;s>=a-7;s--)n=c(o.get(8,s),n);for(var r=a-8;r<a;r++)n=c(o.get(r,8),n);for(var d=1/0,l=null,i=0,B=f;i<B.length;i++){var k=B[i],u=k.bits,C=k.formatInfo;if(u===e||u===n)return C;var m=t(e,u);m<d&&(l=C,d=m),e!==n&&(m=t(n,u))<d&&(l=C,d=m)}return d<=3?l:null}function l(o,e,r){var t=e.errorCorrectionLevels[r],c=[],s=0;if(t.ecBlocks.forEach(function(o){for(var e=0;e<o.numBlocks;e++)c.push({numDataCodewords:o.dataCodewordsPerBlock,codewords:[]}),s+=o.dataCodewordsPerBlock+t.ecCodewordsPerBlock}),o.length<s)return null;o=o.slice(0,s);for(var a=t.ecBlocks[0].dataCodewordsPerBlock,n=0;n<a;n++)for(var d=0,l=c;d<l.length;d++){var i=l[d];i.codewords.push(o.shift())}if(t.ecBlocks.length>1)for(var B=t.ecBlocks[0].numBlocks,k=t.ecBlocks[1].numBlocks,n=0;n<k;n++)c[B+n].codewords.push(o.shift());for(;o.length>0;)for(var u=0,C=c;u<C.length;u++){var i=C[u];i.codewords.push(o.shift())}return c}function i(o){var e=n(o);if(!e)return null;var r=d(o);if(!r)return null;var t=a(o,e,r),c=l(t,e,r.errorCorrectionLevel);if(!c)return null;for(var s=c.reduce(function(o,e){return o+e.numDataCodewords},0),i=new Uint8ClampedArray(s),B=0,k=0,m=c;k<m.length;k++){var f=m[k],w=C.decode(f.codewords,f.codewords.length-f.numDataCodewords);if(!w)return null;for(var P=0;P<f.numDataCodewords;P++)i[B++]=w[P]}try{return u.decode(i,e.versionNumber)}catch(o){return null}}function B(o){if(null==o)return null;var e=i(o);if(e)return e;for(var r=0;r<o.width;r++)for(var t=r+1;t<o.height;t++)o.get(r,t)!==o.get(t,r)&&(o.set(r,t,!o.get(r,t)),o.set(t,r,!o.get(t,r)));return i(o)}Object.defineProperty(e,"__esModule",{value:!0});var k=r(0),u=r(6),C=r(9),m=r(10),f=[{bits:21522,formatInfo:{errorCorrectionLevel:1,dataMask:0}},{bits:20773,formatInfo:{errorCorrectionLevel:1,dataMask:1}},{bits:24188,formatInfo:{errorCorrectionLevel:1,dataMask:2}},{bits:23371,formatInfo:{errorCorrectionLevel:1,dataMask:3}},{bits:17913,formatInfo:{errorCorrectionLevel:1,dataMask:4}},{bits:16590,formatInfo:{errorCorrectionLevel:1,dataMask:5}},{bits:20375,formatInfo:{errorCorrectionLevel:1,dataMask:6}},{bits:19104,formatInfo:{errorCorrectionLevel:1,dataMask:7}},{bits:30660,formatInfo:{errorCorrectionLevel:0,dataMask:0}},{bits:29427,formatInfo:{errorCorrectionLevel:0,dataMask:1}},{bits:32170,formatInfo:{errorCorrectionLevel:0,dataMask:2}},{bits:30877,formatInfo:{errorCorrectionLevel:0,dataMask:3}},{bits:26159,formatInfo:{errorCorrectionLevel:0,dataMask:4}},{bits:25368,formatInfo:{errorCorrectionLevel:0,dataMask:5}},{bits:27713,formatInfo:{errorCorrectionLevel:0,dataMask:6}},{bits:26998,formatInfo:{errorCorrectionLevel:0,dataMask:7}},{bits:5769,formatInfo:{errorCorrectionLevel:3,dataMask:0}},{bits:5054,formatInfo:{errorCorrectionLevel:3,dataMask:1}},{bits:7399,formatInfo:{errorCorrectionLevel:3,dataMask:2}},{bits:6608,formatInfo:{errorCorrectionLevel:3,dataMask:3}},{bits:1890,formatInfo:{errorCorrectionLevel:3,dataMask:4}},{bits:597,formatInfo:{errorCorrectionLevel:3,dataMask:5}},{bits:3340,formatInfo:{errorCorrectionLevel:3,dataMask:6}},{bits:2107,formatInfo:{errorCorrectionLevel:3,dataMask:7}},{bits:13663,formatInfo:{errorCorrectionLevel:2,dataMask:0}},{bits:12392,formatInfo:{errorCorrectionLevel:2,dataMask:1}},{bits:16177,formatInfo:{errorCorrectionLevel:2,dataMask:2}},{bits:14854,formatInfo:{errorCorrectionLevel:2,dataMask:3}},{bits:9396,formatInfo:{errorCorrectionLevel:2,dataMask:4}},{bits:8579,formatInfo:{errorCorrectionLevel:2,dataMask:5}},{bits:11994,formatInfo:{errorCorrectionLevel:2,dataMask:6}},{bits:11245,formatInfo:{errorCorrectionLevel:2,dataMask:7}}],w=[function(o){return(o.y+o.x)%2==0},function(o){return o.y%2==0},function(o){return o.x%3==0},function(o){return(o.y+o.x)%3==0},function(o){return(Math.floor(o.y/2)+Math.floor(o.x/3))%2==0},function(o){return o.x*o.y%2+o.x*o.y%3==0},function(o){return(o.y*o.x%2+o.y*o.x%3)%2==0},function(o){return((o.y+o.x)%2+o.y*o.x%3)%2==0}];e.decode=B},function(o,e,r){"use strict";function t(o,e){for(var r=[],t="",c=[10,12,14][e],s=o.readBits(c);s>=3;){var a=o.readBits(10);if(a>=1e3)throw new Error("Invalid numeric value above 999");var n=Math.floor(a/100),d=Math.floor(a/10)%10,l=a%10;r.push(48+n,48+d,48+l),t+=n.toString()+d.toString()+l.toString(),s-=3}if(2===s){var a=o.readBits(7);if(a>=100)throw new Error("Invalid numeric value above 99");var n=Math.floor(a/10),d=a%10;r.push(48+n,48+d),t+=n.toString()+d.toString()}else if(1===s){var a=o.readBits(4);if(a>=10)throw new Error("Invalid numeric value above 9");r.push(48+a),t+=a.toString()}return{bytes:r,text:t}}function c(o,e){for(var r=[],t="",c=[9,11,13][e],s=o.readBits(c);s>=2;){var a=o.readBits(11),n=Math.floor(a/45),d=a%45;r.push(k[n].charCodeAt(0),k[d].charCodeAt(0)),t+=k[n]+k[d],s-=2}if(1===s){var n=o.readBits(6);r.push(k[n].charCodeAt(0)),t+=k[n]}return{bytes:r,text:t}}function s(o,e){for(var r=[],t="",c=[8,16,16][e],s=o.readBits(c),a=0;a<s;a++){var n=o.readBits(8);r.push(n)}try{t+=decodeURIComponent(r.map(function(o){return"%"+("0"+o.toString(16)).substr(-2)}).join(""))}catch(o){}return{bytes:r,text:t}}function a(o,e){for(var r=[],t="",c=[8,10,12][e],s=o.readBits(c),a=0;a<s;a++){var n=o.readBits(13),d=Math.floor(n/192)<<8|n%192;d+=d<7936?33088:49472,r.push(d>>8,255&d),t+=String.fromCharCode(i.shiftJISTable[d])}return{bytes:r,text:t}}function n(o,e){for(var r=new l.BitStream(o),n=e<=9?0:e<=26?1:2,i={text:"",bytes:[],chunks:[]};r.available()>=4;){var k=r.readBits(4);if(k===B.Terminator)return i;if(k===B.ECI)0===r.readBits(1)?i.chunks.push({type:d.ECI,assignmentNumber:r.readBits(7)}):0===r.readBits(1)?i.chunks.push({type:d.ECI,assignmentNumber:r.readBits(14)}):0===r.readBits(1)?i.chunks.push({type:d.ECI,assignmentNumber:r.readBits(21)}):i.chunks.push({type:d.ECI,assignmentNumber:-1});else if(k===B.Numeric){var u=t(r,n);i.text+=u.text,(w=i.bytes).push.apply(w,u.bytes),i.chunks.push({type:d.Numeric,text:u.text})}else if(k===B.Alphanumeric){var C=c(r,n);i.text+=C.text,(P=i.bytes).push.apply(P,C.bytes),i.chunks.push({type:d.Alphanumeric,text:C.text})}else if(k===B.Byte){var m=s(r,n);i.text+=m.text,(v=i.bytes).push.apply(v,m.bytes),i.chunks.push({type:d.Byte,bytes:m.bytes,text:m.text})}else if(k===B.Kanji){var f=a(r,n);i.text+=f.text,(h=i.bytes).push.apply(h,f.bytes),i.chunks.push({type:d.Kanji,bytes:f.bytes,text:f.text})}}var w,P,v,h}Object.defineProperty(e,"__esModule",{value:!0});var d,l=r(7),i=r(8);!function(o){o.Numeric="numeric",o.Alphanumeric="alphanumeric",o.Byte="byte",o.Kanji="kanji",o.ECI="eci"}(d=e.Mode||(e.Mode={}));var B;!function(o){o[o.Terminator=0]="Terminator",o[o.Numeric=1]="Numeric",o[o.Alphanumeric=2]="Alphanumeric",o[o.Byte=4]="Byte",o[o.Kanji=8]="Kanji",o[o.ECI=7]="ECI"}(B||(B={}));var k=["0","1","2","3","4","5","6","7","8","9","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"," ","$","%","*","+","-",".","/",":"];e.decode=n},function(o,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function o(o){this.byteOffset=0,this.bitOffset=0,this.bytes=o}return o.prototype.readBits=function(o){if(o<1||o>32||o>this.available())throw new Error("Cannot read "+o.toString()+" bits");var e=0;if(this.bitOffset>0){var r=8-this.bitOffset,t=o<r?o:r,c=r-t,s=255>>8-t<<c;e=(this.bytes[this.byteOffset]&s)>>c,o-=t,this.bitOffset+=t,8===this.bitOffset&&(this.bitOffset=0,this.byteOffset++)}if(o>0){for(;o>=8;)e=e<<8|255&this.bytes[this.byteOffset],this.byteOffset++,o-=8;if(o>0){var c=8-o,s=255>>c<<c;e=e<<o|(this.bytes[this.byteOffset]&s)>>c,this.bitOffset+=o}}return e},o.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},o}();e.BitStream=t},function(o,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shiftJISTable={32:32,33:33,34:34,35:35,36:36,37:37,38:38,39:39,40:40,41:41,42:42,43:43,44:44,45:45,46:46,47:47,48:48,49:49,50:50,51:51,52:52,53:53,54:54,55:55,56:56,57:57,58:58,59:59,60:60,61:61,62:62,63:63,64:64,65:65,66:66,67:67,68:68,69:69,70:70,71:71,72:72,73:73,74:74,75:75,76:76,77:77,78:78,79:79,80:80,81:81,82:82,83:83,84:84,85:85,86:86,87:87,88:88,89:89,90:90,91:91,92:165,93:93,94:94,95:95,96:96,97:97,98:98,99:99,100:100,101:101,102:102,103:103,104:104,105:105,106:106,107:107,108:108,109:109,110:110,111:111,112:112,113:113,114:114,115:115,116:116,117:117,118:118,119:119,120:120,121:121,122:122,123:123,124:124,125:125,126:8254,33088:12288,33089:12289,33090:12290,33091:65292,33092:65294,33093:12539,33094:65306,33095:65307,33096:65311,33097:65281,33098:12443,33099:12444,33100:180,33101:65344,33102:168,33103:65342,33104:65507,33105:65343,33106:12541,33107:12542,33108:12445,33109:12446,33110:12291,33111:20189,33112:12293,33113:12294,33114:12295,33115:12540,33116:8213,33117:8208,33118:65295,33119:92,33120:12316,33121:8214,33122:65372,33123:8230,33124:8229,33125:8216,33126:8217,33127:8220,33128:8221,33129:65288,33130:65289,33131:12308,33132:12309,33133:65339,33134:65341,33135:65371,33136:65373,33137:12296,33138:12297,33139:12298,33140:12299,33141:12300,33142:12301,33143:12302,33144:12303,33145:12304,33146:12305,33147:65291,33148:8722,33149:177,33150:215,33152:247,33153:65309,33154:8800,33155:65308,33156:65310,33157:8806,33158:8807,33159:8734,33160:8756,33161:9794,33162:9792,33163:176,33164:8242,33165:8243,33166:8451,33167:65509,33168:65284,33169:162,33170:163,33171:65285,33172:65283,33173:65286,33174:65290,33175:65312,33176:167,33177:9734,33178:9733,33179:9675,33180:9679,33181:9678,33182:9671,33183:9670,33184:9633,33185:9632,33186:9651,33187:9650,33188:9661,33189:9660,33190:8251,33191:12306,33192:8594,33193:8592,33194:8593,33195:8595,33196:12307,33208:8712,33209:8715,33210:8838,33211:8839,33212:8834,33213:8835,33214:8746,33215:8745,33224:8743,33225:8744,33226:172,33227:8658,33228:8660,33229:8704,33230:8707,33242:8736,33243:8869,33244:8978,33245:8706,33246:8711,33247:8801,33248:8786,33249:8810,33250:8811,33251:8730,33252:8765,33253:8733,33254:8757,33255:8747,33256:8748,33264:8491,33265:8240,33266:9839,33267:9837,33268:9834,33269:8224,33270:8225,33271:182,33276:9711,33359:65296,33360:65297,33361:65298,33362:65299,33363:65300,33364:65301,33365:65302,33366:65303,33367:65304,33368:65305,33376:65313,33377:65314,33378:65315,33379:65316,33380:65317,33381:65318,33382:65319,33383:65320,33384:65321,33385:65322,33386:65323,33387:65324,33388:65325,33389:65326,33390:65327,33391:65328,33392:65329,33393:65330,33394:65331,33395:65332,33396:65333,33397:65334,33398:65335,33399:65336,33400:65337,33401:65338,33409:65345,33410:65346,33411:65347,33412:65348,33413:65349,33414:65350,33415:65351,33416:65352,33417:65353,33418:65354,33419:65355,33420:65356,33421:65357,33422:65358,33423:65359,33424:65360,33425:65361,33426:65362,33427:65363,33428:65364,33429:65365,33430:65366,33431:65367,33432:65368,33433:65369,33434:65370,33439:12353,33440:12354,33441:12355,33442:12356,33443:12357,33444:12358,33445:12359,33446:12360,33447:12361,33448:12362,33449:12363,33450:12364,33451:12365,33452:12366,33453:12367,33454:12368,33455:12369,33456:12370,33457:12371,33458:12372,33459:12373,33460:12374,33461:12375,33462:12376,33463:12377,33464:12378,33465:12379,33466:12380,33467:12381,33468:12382,33469:12383,33470:12384,33471:12385,33472:12386,33473:12387,33474:12388,33475:12389,33476:12390,33477:12391,33478:12392,33479:12393,33480:12394,33481:12395,33482:12396,33483:12397,33484:12398,33485:12399,33486:12400,33487:12401,33488:12402,33489:12403,33490:12404,33491:12405,33492:12406,33493:12407,33494:12408,33495:12409,33496:12410,33497:12411,33498:12412,33499:12413,33500:12414,33501:12415,33502:12416,33503:12417,33504:12418,33505:12419,33506:12420,33507:12421,33508:12422,33509:12423,33510:12424,33511:12425,33512:12426,33513:12427,33514:12428,33515:12429,33516:12430,33517:12431,33518:12432,33519:12433,33520:12434,33521:12435,33600:12449,33601:12450,33602:12451,33603:12452,33604:12453,33605:12454,33606:12455,33607:12456,33608:12457,33609:12458,33610:12459,33611:12460,33612:12461,33613:12462,33614:12463,33615:12464,33616:12465,33617:12466,33618:12467,33619:12468,33620:12469,33621:12470,33622:12471,33623:12472,33624:12473,33625:12474,33626:12475,33627:12476,33628:12477,33629:12478,33630:12479,33631:12480,33632:12481,33633:12482,33634:12483,33635:12484,33636:12485,33637:12486,33638:12487,33639:12488,33640:12489,33641:12490,33642:12491,33643:12492,33644:12493,33645:12494,33646:12495,33647:12496,33648:12497,33649:12498,33650:12499,33651:12500,33652:12501,33653:12502,33654:12503,33655:12504,33656:12505,33657:12506,33658:12507,33659:12508,33660:12509,33661:12510,33662:12511,33664:12512,33665:12513,33666:12514,33667:12515,33668:12516,33669:12517,33670:12518,33671:12519,33672:12520,33673:12521,33674:12522,33675:12523,33676:12524,33677:12525,33678:12526,33679:12527,33680:12528,33681:12529,33682:12530,33683:12531,33684:12532,33685:12533,33686:12534,33695:913,33696:914,33697:915,33698:916,33699:917,33700:918,33701:919,33702:920,33703:921,33704:922,33705:923,33706:924,33707:925,33708:926,33709:927,33710:928,33711:929,33712:931,33713:932,33714:933,33715:934,33716:935,33717:936,33718:937,33727:945,33728:946,33729:947,33730:948,33731:949,33732:950,33733:951,33734:952,33735:953,33736:954,33737:955,33738:956,33739:957,33740:958,33741:959,33742:960,33743:961,33744:963,33745:964,33746:965,33747:966,33748:967,33749:968,33750:969,33856:1040,33857:1041,33858:1042,33859:1043,33860:1044,33861:1045,33862:1025,33863:1046,33864:1047,33865:1048,33866:1049,33867:1050,33868:1051,33869:1052,33870:1053,33871:1054,33872:1055,33873:1056,33874:1057,33875:1058,33876:1059,33877:1060,33878:1061,33879:1062,33880:1063,33881:1064,33882:1065,33883:1066,33884:1067,33885:1068,33886:1069,33887:1070,33888:1071,33904:1072,33905:1073,33906:1074,33907:1075,33908:1076,33909:1077,33910:1105,33911:1078,33912:1079,33913:1080,33914:1081,33915:1082,33916:1083,33917:1084,33918:1085,33920:1086,33921:1087,33922:1088,33923:1089,33924:1090,33925:1091,33926:1092,33927:1093,33928:1094,33929:1095,33930:1096,33931:1097,33932:1098,33933:1099,33934:1100,33935:1101,33936:1102,33937:1103,33951:9472,33952:9474,33953:9484,33954:9488,33955:9496,33956:9492,33957:9500,33958:9516,33959:9508,33960:9524,33961:9532,33962:9473,33963:9475,33964:9487,33965:9491,33966:9499,33967:9495,33968:9507,33969:9523,33970:9515,33971:9531,33972:9547,33973:9504,33974:9519,33975:9512,33976:9527,33977:9535,33978:9501,33979:9520,33980:9509,33981:9528,33982:9538,34975:20124,34976:21782,34977:23043,34978:38463,34979:21696,34980:24859,34981:25384,34982:23030,34983:36898,34984:33909,34985:33564,34986:31312,34987:24746,34988:25569,34989:28197,34990:26093,34991:33894,34992:33446,34993:39925,34994:26771,34995:22311,34996:26017,34997:25201,34998:23451,34999:22992,35e3:34427,35001:39156,35002:32098,35003:32190,35004:39822,35005:25110,35006:31903,35007:34999,35008:23433,35009:24245,35010:25353,35011:26263,35012:26696,35013:38343,35014:38797,35015:26447,35016:20197,35017:20234,35018:20301,35019:20381,35020:20553,35021:22258,35022:22839,35023:22996,35024:23041,35025:23561,35026:24799,35027:24847,35028:24944,35029:26131,35030:26885,35031:28858,35032:30031,35033:30064,35034:31227,35035:32173,35036:32239,35037:32963,35038:33806,35039:34915,35040:35586,35041:36949,35042:36986,35043:21307,35044:20117,35045:20133,35046:22495,35047:32946,35048:37057,35049:30959,35050:19968,35051:22769,35052:28322,35053:36920,35054:31282,35055:33576,35056:33419,35057:39983,35058:20801,35059:21360,35060:21693,35061:21729,35062:22240,35063:23035,35064:24341,35065:39154,35066:28139,35067:32996,35068:34093,35136:38498,35137:38512,35138:38560,35139:38907,35140:21515,35141:21491,35142:23431,35143:28879,35144:32701,35145:36802,35146:38632,35147:21359,35148:40284,35149:31418,35150:19985,35151:30867,35152:33276,35153:28198,35154:22040,35155:21764,35156:27421,35157:34074,35158:39995,35159:23013,35160:21417,35161:28006,35162:29916,35163:38287,35164:22082,35165:20113,35166:36939,35167:38642,35168:33615,35169:39180,35170:21473,35171:21942,35172:23344,35173:24433,35174:26144,35175:26355,35176:26628,35177:27704,35178:27891,35179:27945,35180:29787,35181:30408,35182:31310,35183:38964,35184:33521,35185:34907,35186:35424,35187:37613,35188:28082,35189:30123,35190:30410,35191:39365,35192:24742,35193:35585,35194:36234,35195:38322,35196:27022,35197:21421,35198:20870,35200:22290,35201:22576,35202:22852,35203:23476,35204:24310,35205:24616,35206:25513,35207:25588,35208:27839,35209:28436,35210:28814,35211:28948,35212:29017,35213:29141,35214:29503,35215:32257,35216:33398,35217:33489,35218:34199,35219:36960,35220:37467,35221:40219,35222:22633,35223:26044,35224:27738,35225:29989,35226:20985,35227:22830,35228:22885,35229:24448,35230:24540,35231:25276,35232:26106,35233:27178,35234:27431,35235:27572,35236:29579,35237:32705,35238:35158,35239:40236,35240:40206,35241:40644,35242:23713,35243:27798,35244:33659,35245:20740,35246:23627,35247:25014,35248:33222,35249:26742,35250:29281,35251:20057,35252:20474,35253:21368,35254:24681,35255:28201,35256:31311,35257:38899,35258:19979,35259:21270,35260:20206,35261:20309,35262:20285,35263:20385,35264:20339,35265:21152,35266:21487,35267:22025,35268:22799,35269:23233,35270:23478,35271:23521,35272:31185,35273:26247,35274:26524,35275:26550,35276:27468,35277:27827,35278:28779,35279:29634,35280:31117,35281:31166,35282:31292,35283:31623,35284:33457,35285:33499,35286:33540,35287:33655,35288:33775,35289:33747,35290:34662,35291:35506,35292:22057,35293:36008,35294:36838,35295:36942,35296:38686,35297:34442,35298:20420,35299:23784,35300:25105,35301:29273,35302:30011,35303:33253,35304:33469,35305:34558,35306:36032,35307:38597,35308:39187,35309:39381,35310:20171,35311:20250,35312:35299,35313:22238,35314:22602,35315:22730,35316:24315,35317:24555,35318:24618,35319:24724,35320:24674,35321:25040,35322:25106,35323:25296,35324:25913,35392:39745,35393:26214,35394:26800,35395:28023,35396:28784,35397:30028,35398:30342,35399:32117,35400:33445,35401:34809,35402:38283,35403:38542,35404:35997,35405:20977,35406:21182,35407:22806,35408:21683,35409:23475,35410:23830,35411:24936,35412:27010,35413:28079,35414:30861,35415:33995,35416:34903,35417:35442,35418:37799,35419:39608,35420:28012,35421:39336,35422:34521,35423:22435,35424:26623,35425:34510,35426:37390,35427:21123,35428:22151,35429:21508,35430:24275,35431:25313,35432:25785,35433:26684,35434:26680,35435:27579,35436:29554,35437:30906,35438:31339,35439:35226,35440:35282,35441:36203,35442:36611,35443:37101,35444:38307,35445:38548,35446:38761,35447:23398,35448:23731,35449:27005,35450:38989,35451:38990,35452:25499,35453:31520,35454:27179,35456:27263,35457:26806,35458:39949,35459:28511,35460:21106,35461:21917,35462:24688,35463:25324,35464:27963,35465:28167,35466:28369,35467:33883,35468:35088,35469:36676,35470:19988,35471:39993,35472:21494,35473:26907,35474:27194,35475:38788,35476:26666,35477:20828,35478:31427,35479:33970,35480:37340,35481:37772,35482:22107,35483:40232,35484:26658,35485:33541,35486:33841,35487:31909,35488:21e3,35489:33477,35490:29926,35491:20094,35492:20355,35493:20896,35494:23506,35495:21002,35496:21208,35497:21223,35498:24059,35499:21914,35500:22570,35501:23014,35502:23436,35503:23448,35504:23515,35505:24178,35506:24185,35507:24739,35508:24863,35509:24931,35510:25022,35511:25563,35512:25954,35513:26577,35514:26707,35515:26874,35516:27454,35517:27475,35518:27735,35519:28450,35520:28567,35521:28485,35522:29872,35523:29976,35524:30435,35525:30475,35526:31487,35527:31649,35528:31777,35529:32233,35530:32566,35531:32752,35532:32925,35533:33382,35534:33694,35535:35251,35536:35532,35537:36011,35538:36996,35539:37969,35540:38291,35541:38289,35542:38306,35543:38501,35544:38867,35545:39208,35546:33304,35547:20024,35548:21547,35549:23736,35550:24012,35551:29609,35552:30284,35553:30524,35554:23721,35555:32747,35556:36107,35557:38593,35558:38929,35559:38996,35560:39e3,35561:20225,35562:20238,35563:21361,35564:21916,35565:22120,35566:22522,35567:22855,35568:23305,35569:23492,35570:23696,35571:24076,35572:24190,35573:24524,35574:25582,35575:26426,35576:26071,35577:26082,35578:26399,35579:26827,35580:26820,35648:27231,35649:24112,35650:27589,35651:27671,35652:27773,35653:30079,35654:31048,35655:23395,35656:31232,35657:32e3,35658:24509,35659:35215,35660:35352,35661:36020,35662:36215,35663:36556,35664:36637,35665:39138,35666:39438,35667:39740,35668:20096,35669:20605,35670:20736,35671:22931,35672:23452,35673:25135,35674:25216,35675:25836,35676:27450,35677:29344,35678:30097,35679:31047,35680:32681,35681:34811,35682:35516,35683:35696,35684:25516,35685:33738,35686:38816,35687:21513,35688:21507,35689:21931,35690:26708,35691:27224,35692:35440,35693:30759,35694:26485,35695:40653,35696:21364,35697:23458,35698:33050,35699:34384,35700:36870,35701:19992,35702:20037,35703:20167,35704:20241,35705:21450,35706:21560,35707:23470,35708:24339,35709:24613,35710:25937,35712:26429,35713:27714,35714:27762,35715:27875,35716:28792,35717:29699,35718:31350,35719:31406,35720:31496,35721:32026,35722:31998,35723:32102,35724:26087,35725:29275,35726:21435,35727:23621,35728:24040,35729:25298,35730:25312,35731:25369,35732:28192,35733:34394,35734:35377,35735:36317,35736:37624,35737:28417,35738:31142,35739:39770,35740:20136,35741:20139,35742:20140,35743:20379,35744:20384,35745:20689,35746:20807,35747:31478,35748:20849,35749:20982,35750:21332,35751:21281,35752:21375,35753:21483,35754:21932,35755:22659,35756:23777,35757:24375,35758:24394,35759:24623,35760:24656,35761:24685,35762:25375,35763:25945,35764:27211,35765:27841,35766:29378,35767:29421,35768:30703,35769:33016,35770:33029,35771:33288,35772:34126,35773:37111,35774:37857,35775:38911,35776:39255,35777:39514,35778:20208,35779:20957,35780:23597,35781:26241,35782:26989,35783:23616,35784:26354,35785:26997,35786:29577,35787:26704,35788:31873,35789:20677,35790:21220,35791:22343,35792:24062,35793:37670,35794:26020,35795:27427,35796:27453,35797:29748,35798:31105,35799:31165,35800:31563,35801:32202,35802:33465,35803:33740,35804:34943,35805:35167,35806:35641,35807:36817,35808:37329,35809:21535,35810:37504,35811:20061,35812:20534,35813:21477,35814:21306,35815:29399,35816:29590,35817:30697,35818:33510,35819:36527,35820:39366,35821:39368,35822:39378,35823:20855,35824:24858,35825:34398,35826:21936,35827:31354,35828:20598,35829:23507,35830:36935,35831:38533,35832:20018,35833:27355,35834:37351,35835:23633,35836:23624,35904:25496,35905:31391,35906:27795,35907:38772,35908:36705,35909:31402,35910:29066,35911:38536,35912:31874,35913:26647,35914:32368,35915:26705,35916:37740,35917:21234,35918:21531,35919:34219,35920:35347,35921:32676,35922:36557,35923:37089,35924:21350,35925:34952,35926:31041,35927:20418,35928:20670,35929:21009,35930:20804,35931:21843,35932:22317,35933:29674,35934:22411,35935:22865,35936:24418,35937:24452,35938:24693,35939:24950,35940:24935,35941:25001,35942:25522,35943:25658,35944:25964,35945:26223,35946:26690,35947:28179,35948:30054,35949:31293,35950:31995,35951:32076,35952:32153,35953:32331,35954:32619,35955:33550,35956:33610,35957:34509,35958:35336,35959:35427,35960:35686,35961:36605,35962:38938,35963:40335,35964:33464,35965:36814,35966:39912,35968:21127,35969:25119,35970:25731,35971:28608,35972:38553,35973:26689,35974:20625,35975:27424,35976:27770,35977:28500,35978:31348,35979:32080,35980:34880,35981:35363,35982:26376,35983:20214,35984:20537,35985:20518,35986:20581,35987:20860,35988:21048,35989:21091,35990:21927,35991:22287,35992:22533,35993:23244,35994:24314,35995:25010,35996:25080,35997:25331,35998:25458,35999:26908,36e3:27177,36001:29309,36002:29356,36003:29486,36004:30740,36005:30831,36006:32121,36007:30476,36008:32937,36009:35211,36010:35609,36011:36066,36012:36562,36013:36963,36014:37749,36015:38522,36016:38997,36017:39443,36018:40568,36019:20803,36020:21407,36021:21427,36022:24187,36023:24358,36024:28187,36025:28304,36026:29572,36027:29694,36028:32067,36029:33335,36030:35328,36031:35578,36032:38480,36033:20046,36034:20491,36035:21476,36036:21628,36037:22266,36038:22993,36039:23396,36040:24049,36041:24235,36042:24359,36043:25144,36044:25925,36045:26543,36046:28246,36047:29392,36048:31946,36049:34996,36050:32929,36051:32993,36052:33776,36053:34382,36054:35463,36055:36328,36056:37431,36057:38599,36058:39015,36059:40723,36060:20116,36061:20114,36062:20237,36063:21320,36064:21577,36065:21566,36066:23087,36067:24460,36068:24481,36069:24735,36070:26791,36071:27278,36072:29786,36073:30849,36074:35486,36075:35492,36076:35703,36077:37264,36078:20062,36079:39881,36080:20132,36081:20348,36082:20399,36083:20505,36084:20502,36085:20809,36086:20844,36087:21151,36088:21177,36089:21246,36090:21402,36091:21475,36092:21521,36160:21518,36161:21897,36162:22353,36163:22434,36164:22909,36165:23380,36166:23389,36167:23439,36168:24037,36169:24039,36170:24055,36171:24184,36172:24195,36173:24218,36174:24247,36175:24344,36176:24658,36177:24908,36178:25239,36179:25304,36180:25511,36181:25915,36182:26114,36183:26179,36184:26356,36185:26477,36186:26657,36187:26775,36188:27083,36189:27743,36190:27946,36191:28009,36192:28207,36193:28317,36194:30002,36195:30343,36196:30828,36197:31295,36198:31968,36199:32005,36200:32024,36201:32094,36202:32177,36203:32789,36204:32771,36205:32943,36206:32945,36207:33108,36208:33167,36209:33322,36210:33618,36211:34892,36212:34913,36213:35611,36214:36002,36215:36092,36216:37066,36217:37237,36218:37489,36219:30783,36220:37628,36221:38308,36222:38477,36224:38917,36225:39321,36226:39640,36227:40251,36228:21083,36229:21163,36230:21495,36231:21512,36232:22741,36233:25335,36234:28640,36235:35946,36236:36703,36237:40633,36238:20811,36239:21051,36240:21578,36241:22269,36242:31296,36243:37239,36244:40288,36245:40658,36246:29508,36247:28425,36248:33136,36249:29969,36250:24573,36251:24794,36252:39592,36253:29403,36254:36796,36255:27492,36256:38915,36257:20170,36258:22256,36259:22372,36260:22718,36261:23130,36262:24680,36263:25031,36264:26127,36265:26118,36266:26681,36267:26801,36268:28151,36269:30165,36270:32058,36271:33390,36272:39746,36273:20123,36274:20304,36275:21449,36276:21766,36277:23919,36278:24038,36279:24046,36280:26619,36281:27801,36282:29811,36283:30722,36284:35408,36285:37782,36286:35039,36287:22352,36288:24231,36289:25387,36290:20661,36291:20652,36292:20877,36293:26368,36294:21705,36295:22622,36296:22971,36297:23472,36298:24425,36299:25165,36300:25505,36301:26685,36302:27507,36303:28168,36304:28797,36305:37319,36306:29312,36307:30741,36308:30758,36309:31085,36310:25998,36311:32048,36312:33756,36313:35009,36314:36617,36315:38555,36316:21092,36317:22312,36318:26448,36319:32618,36320:36001,36321:20916,36322:22338,36323:38442,36324:22586,36325:27018,36326:32948,36327:21682,36328:23822,36329:22524,36330:30869,36331:40442,36332:20316,36333:21066,36334:21643,36335:25662,36336:26152,36337:26388,36338:26613,36339:31364,36340:31574,36341:32034,36342:37679,36343:26716,36344:39853,36345:31545,36346:21273,36347:20874,36348:21047,36416:23519,36417:25334,36418:25774,36419:25830,36420:26413,36421:27578,36422:34217,36423:38609,36424:30352,36425:39894,36426:25420,36427:37638,36428:39851,36429:30399,36430:26194,36431:19977,36432:20632,36433:21442,36434:23665,36435:24808,36436:25746,36437:25955,36438:26719,36439:29158,36440:29642,36441:29987,36442:31639,36443:32386,36444:34453,36445:35715,36446:36059,36447:37240,36448:39184,36449:26028,36450:26283,36451:27531,36452:20181,36453:20180,36454:20282,36455:20351,36456:21050,36457:21496,36458:21490,36459:21987,36460:22235,36461:22763,36462:22987,36463:22985,36464:23039,36465:23376,36466:23629,36467:24066,36468:24107,36469:24535,36470:24605,36471:25351,36472:25903,36473:23388,36474:26031,36475:26045,36476:26088,36477:26525,36478:27490,36480:27515,36481:27663,36482:29509,36483:31049,36484:31169,36485:31992,36486:32025,36487:32043,36488:32930,36489:33026,36490:33267,36491:35222,36492:35422,36493:35433,36494:35430,36495:35468,36496:35566,36497:36039,36498:36060,36499:38604,36500:39164,36501:27503,36502:20107,36503:20284,36504:20365,36505:20816,36506:23383,36507:23546,36508:24904,36509:25345,36510:26178,36511:27425,36512:28363,36513:27835,36514:29246,36515:29885,36516:30164,36517:30913,36518:31034,36519:32780,36520:32819,36521:33258,36522:33940,36523:36766,36524:27728,36525:40575,36526:24335,36527:35672,36528:40235,36529:31482,36530:36600,36531:23437,36532:38635,36533:19971,36534:21489,36535:22519,36536:22833,36537:23241,36538:23460,36539:24713,36540:28287,36541:28422,36542:30142,36543:36074,36544:23455,36545:34048,36546:31712,36547:20594,36548:26612,36549:33437,36550:23649,36551:34122,36552:32286,36553:33294,36554:20889,36555:23556,36556:25448,36557:36198,36558:26012,36559:29038,36560:31038,36561:32023,36562:32773,36563:35613,36564:36554,36565:36974,36566:34503,36567:37034,36568:20511,36569:21242,36570:23610,36571:26451,36572:28796,36573:29237,36574:37196,36575:37320,36576:37675,36577:33509,36578:23490,36579:24369,36580:24825,36581:20027,36582:21462,36583:23432,36584:25163,36585:26417,36586:27530,36587:29417,36588:29664,36589:31278,36590:33131,36591:36259,36592:37202,36593:39318,36594:20754,36595:21463,36596:21610,36597:23551,36598:25480,36599:27193,36600:32172,36601:38656,36602:22234,36603:21454,36604:21608,36672:23447,36673:23601,36674:24030,36675:20462,36676:24833,36677:25342,36678:27954,36679:31168,36680:31179,36681:32066,36682:32333,36683:32722,36684:33261,36685:33311,36686:33936,36687:34886,36688:35186,36689:35728,36690:36468,36691:36655,36692:36913,36693:37195,36694:37228,36695:38598,36696:37276,36697:20160,36698:20303,36699:20805,36700:21313,36701:24467,36702:25102,36703:26580,36704:27713,36705:28171,36706:29539,36707:32294,36708:37325,36709:37507,36710:21460,36711:22809,36712:23487,36713:28113,36714:31069,36715:32302,36716:31899,36717:22654,36718:29087,36719:20986,36720:34899,36721:36848,36722:20426,36723:23803,36724:26149,36725:30636,36726:31459,36727:33308,36728:39423,36729:20934,36730:24490,36731:26092,36732:26991,36733:27529,36734:28147,36736:28310,36737:28516,36738:30462,36739:32020,36740:24033,36741:36981,36742:37255,36743:38918,36744:20966,36745:21021,36746:25152,36747:26257,36748:26329,36749:28186,36750:24246,36751:32210,36752:32626,36753:26360,36754:34223,36755:34295,36756:35576,36757:21161,36758:21465,36759:22899,36760:24207,36761:24464,36762:24661,36763:37604,36764:38500,36765:20663,36766:20767,36767:21213,36768:21280,36769:21319,36770:21484,36771:21736,36772:21830,36773:21809,36774:22039,36775:22888,36776:22974,36777:23100,36778:23477,36779:23558,36780:23567,36781:23569,36782:23578,36783:24196,36784:24202,36785:24288,36786:24432,36787:25215,36788:25220,36789:25307,36790:25484,36791:25463,36792:26119,36793:26124,36794:26157,36795:26230,36796:26494,36797:26786,36798:27167,36799:27189,36800:27836,36801:28040,36802:28169,36803:28248,36804:28988,36805:28966,36806:29031,36807:30151,36808:30465,36809:30813,36810:30977,36811:31077,36812:31216,36813:31456,36814:31505,36815:31911,36816:32057,36817:32918,36818:33750,36819:33931,36820:34121,36821:34909,36822:35059,36823:35359,36824:35388,36825:35412,36826:35443,36827:35937,36828:36062,36829:37284,36830:37478,36831:37758,36832:37912,36833:38556,36834:38808,36835:19978,36836:19976,36837:19998,36838:20055,36839:20887,36840:21104,36841:22478,36842:22580,36843:22732,36844:23330,36845:24120,36846:24773,36847:25854,36848:26465,36849:26454,36850:27972,36851:29366,36852:30067,36853:31331,36854:33976,36855:35698,36856:37304,36857:37664,36858:22065,36859:22516,36860:39166,36928:25325,36929:26893,36930:27542,36931:29165,36932:32340,36933:32887,36934:33394,36935:35302,36936:39135,36937:34645,36938:36785,36939:23611,36940:20280,36941:20449,36942:20405,36943:21767,36944:23072,36945:23517,36946:23529,36947:24515,36948:24910,36949:25391,36950:26032,36951:26187,36952:26862,36953:27035,36954:28024,36955:28145,36956:30003,36957:30137,36958:30495,36959:31070,36960:31206,36961:32051,36962:33251,36963:33455,36964:34218,36965:35242,36966:35386,36967:36523,36968:36763,36969:36914,36970:37341,36971:38663,36972:20154,36973:20161,36974:20995,36975:22645,36976:22764,36977:23563,36978:29978,36979:23613,36980:33102,36981:35338,36982:36805,36983:38499,36984:38765,36985:31525,36986:35535,36987:38920,36988:37218,36989:22259,36990:21416,36992:36887,36993:21561,36994:22402,36995:24101,36996:25512,36997:27700,36998:28810,36999:30561,37e3:31883,37001:32736,37002:34928,37003:36930,37004:37204,37005:37648,37006:37656,37007:38543,37008:29790,37009:39620,37010:23815,37011:23913,37012:25968,37013:26530,37014:36264,37015:38619,37016:25454,37017:26441,37018:26905,37019:33733,37020:38935,37021:38592,37022:35070,37023:28548,37024:25722,37025:23544,37026:19990,37027:28716,37028:30045,37029:26159,37030:20932,37031:21046,37032:21218,37033:22995,37034:24449,37035:24615,37036:25104,37037:25919,37038:25972,37039:26143,37040:26228,37041:26866,37042:26646,37043:27491,37044:28165,37045:29298,37046:29983,37047:30427,37048:31934,37049:32854,37050:22768,37051:35069,37052:35199,37053:35488,37054:35475,37055:35531,37056:36893,37057:37266,37058:38738,37059:38745,37060:25993,37061:31246,37062:33030,37063:38587,37064:24109,37065:24796,37066:25114,37067:26021,37068:26132,37069:26512,37070:30707,37071:31309,37072:31821,37073:32318,37074:33034,37075:36012,37076:36196,37077:36321,37078:36447,37079:30889,37080:20999,37081:25305,37082:25509,37083:25666,37084:25240,37085:35373,37086:31363,37087:31680,37088:35500,37089:38634,37090:32118,37091:33292,37092:34633,37093:20185,37094:20808,37095:21315,37096:21344,37097:23459,37098:23554,37099:23574,37100:24029,37101:25126,37102:25159,37103:25776,37104:26643,37105:26676,37106:27849,37107:27973,37108:27927,37109:26579,37110:28508,37111:29006,37112:29053,37113:26059,37114:31359,37115:31661,37116:32218,37184:32330,37185:32680,37186:33146,37187:33307,37188:33337,37189:34214,37190:35438,37191:36046,37192:36341,37193:36984,37194:36983,37195:37549,37196:37521,37197:38275,37198:39854,37199:21069,37200:21892,37201:28472,37202:28982,37203:20840,37204:31109,37205:32341,37206:33203,37207:31950,37208:22092,37209:22609,37210:23720,37211:25514,37212:26366,37213:26365,37214:26970,37215:29401,37216:30095,37217:30094,37218:30990,37219:31062,37220:31199,37221:31895,37222:32032,37223:32068,37224:34311,37225:35380,37226:38459,37227:36961,37228:40736,37229:20711,37230:21109,37231:21452,37232:21474,37233:20489,37234:21930,37235:22766,37236:22863,37237:29245,37238:23435,37239:23652,37240:21277,37241:24803,37242:24819,37243:25436,37244:25475,37245:25407,37246:25531,37248:25805,37249:26089,37250:26361,37251:24035,37252:27085,37253:27133,37254:28437,37255:29157,37256:20105,37257:30185,37258:30456,37259:31379,37260:31967,37261:32207,37262:32156,37263:32865,37264:33609,37265:33624,37266:33900,37267:33980,37268:34299,37269:35013,37270:36208,37271:36865,37272:36973,37273:37783,37274:38684,37275:39442,37276:20687,37277:22679,37278:24974,37279:33235,37280:34101,37281:36104,37282:36896,37283:20419,37284:20596,37285:21063,37286:21363,37287:24687,37288:25417,37289:26463,37290:28204,37291:36275,37292:36895,37293:20439,37294:23646,37295:36042,37296:26063,37297:32154,37298:21330,37299:34966,37300:20854,37301:25539,37302:23384,37303:23403,37304:23562,37305:25613,37306:26449,37307:36956,37308:20182,37309:22810,37310:22826,37311:27760,37312:35409,37313:21822,37314:22549,37315:22949,37316:24816,37317:25171,37318:26561,37319:33333,37320:26965,37321:38464,37322:39364,37323:39464,37324:20307,37325:22534,37326:23550,37327:32784,37328:23729,37329:24111,37330:24453,37331:24608,37332:24907,37333:25140,37334:26367,37335:27888,37336:28382,37337:32974,37338:33151,37339:33492,37340:34955,37341:36024,37342:36864,37343:36910,37344:38538,37345:40667,37346:39899,37347:20195,37348:21488,37349:22823,37350:31532,37351:37261,37352:38988,37353:40441,37354:28381,37355:28711,37356:21331,37357:21828,37358:23429,37359:25176,37360:25246,37361:25299,37362:27810,37363:28655,37364:29730,37365:35351,37366:37944,37367:28609,37368:35582,37369:33592,37370:20967,37371:34552,37372:21482,37440:21481,37441:20294,37442:36948,37443:36784,37444:22890,37445:33073,37446:24061,37447:31466,37448:36799,37449:26842,37450:35895,37451:29432,37452:40008,37453:27197,37454:35504,37455:20025,37456:21336,37457:22022,37458:22374,37459:25285,37460:25506,37461:26086,37462:27470,37463:28129,37464:28251,37465:28845,37466:30701,37467:31471,37468:31658,37469:32187,37470:32829,37471:32966,37472:34507,37473:35477,37474:37723,37475:22243,37476:22727,37477:24382,37478:26029,37479:26262,37480:27264,37481:27573,37482:30007,37483:35527,37484:20516,37485:30693,37486:22320,37487:24347,37488:24677,37489:26234,37490:27744,37491:30196,37492:31258,37493:32622,37494:33268,37495:34584,37496:36933,37497:39347,37498:31689,37499:30044,37500:31481,37501:31569,37502:33988,37504:36880,37505:31209,37506:31378,37507:33590,37508:23265,37509:30528,37510:20013,37511:20210,37512:23449,37513:24544,37514:25277,37515:26172,37516:26609,37517:27880,37518:34411,37519:34935,37520:35387,37521:37198,37522:37619,37523:39376,37524:27159,37525:28710,37526:29482,37527:33511,37528:33879,37529:36015,37530:19969,37531:20806,37532:20939,37533:21899,37534:23541,37535:24086,37536:24115,37537:24193,37538:24340,37539:24373,37540:24427,37541:24500,37542:25074,37543:25361,37544:26274,37545:26397,37546:28526,37547:29266,37548:30010,37549:30522,37550:32884,37551:33081,37552:33144,37553:34678,37554:35519,37555:35548,37556:36229,37557:36339,37558:37530,37559:38263,37560:38914,37561:40165,37562:21189,37563:25431,37564:30452,37565:26389,37566:27784,37567:29645,37568:36035,37569:37806,37570:38515,37571:27941,37572:22684,37573:26894,37574:27084,37575:36861,37576:37786,37577:30171,37578:36890,37579:22618,37580:26626,37581:25524,37582:27131,37583:20291,37584:28460,37585:26584,37586:36795,37587:34086,37588:32180,37589:37716,37590:26943,37591:28528,37592:22378,37593:22775,37594:23340,37595:32044,37596:29226,37597:21514,37598:37347,37599:40372,37600:20141,37601:20302,37602:20572,37603:20597,37604:21059,37605:35998,37606:21576,37607:22564,37608:23450,37609:24093,37610:24213,37611:24237,37612:24311,37613:24351,37614:24716,37615:25269,37616:25402,37617:25552,37618:26799,37619:27712,37620:30855,37621:31118,37622:31243,37623:32224,37624:33351,37625:35330,37626:35558,37627:36420,37628:36883,37696:37048,37697:37165,37698:37336,37699:40718,37700:27877,37701:25688,37702:25826,37703:25973,37704:28404,37705:30340,37706:31515,37707:36969,37708:37841,37709:28346,37710:21746,37711:24505,37712:25764,37713:36685,37714:36845,37715:37444,37716:20856,37717:22635,37718:22825,37719:23637,37720:24215,37721:28155,37722:32399,37723:29980,37724:36028,37725:36578,37726:39003,37727:28857,37728:20253,37729:27583,37730:28593,37731:3e4,37732:38651,37733:20814,37734:21520,37735:22581,37736:22615,37737:22956,37738:23648,37739:24466,37740:26007,37741:26460,37742:28193,37743:30331,37744:33759,37745:36077,37746:36884,37747:37117,37748:37709,37749:30757,37750:30778,37751:21162,37752:24230,37753:22303,37754:22900,37755:24594,37756:20498,37757:20826,37758:20908,37760:20941,37761:20992,37762:21776,37763:22612,37764:22616,37765:22871,37766:23445,37767:23798,37768:23947,37769:24764,37770:25237,37771:25645,37772:26481,37773:26691,37774:26812,37775:26847,37776:30423,37777:28120,37778:28271,37779:28059,37780:28783,37781:29128,37782:24403,37783:30168,37784:31095,37785:31561,37786:31572,37787:31570,37788:31958,37789:32113,37790:21040,37791:33891,37792:34153,37793:34276,37794:35342,37795:35588,37796:35910,37797:36367,37798:36867,37799:36879,37800:37913,37801:38518,37802:38957,37803:39472,37804:38360,37805:20685,37806:21205,37807:21516,37808:22530,37809:23566,37810:24999,37811:25758,37812:27934,37813:30643,37814:31461,37815:33012,37816:33796,37817:36947,37818:37509,37819:23776,37820:40199,37821:21311,37822:24471,37823:24499,37824:28060,37825:29305,37826:30563,37827:31167,37828:31716,37829:27602,37830:29420,37831:35501,37832:26627,37833:27233,37834:20984,37835:31361,37836:26932,37837:23626,37838:40182,37839:33515,37840:23493,37841:37193,37842:28702,37843:22136,37844:23663,37845:24775,37846:25958,37847:27788,37848:35930,37849:36929,37850:38931,37851:21585,37852:26311,37853:37389,37854:22856,37855:37027,37856:20869,37857:20045,37858:20970,37859:34201,37860:35598,37861:28760,37862:25466,37863:37707,37864:26978,37865:39348,37866:32260,37867:30071,37868:21335,37869:26976,37870:36575,37871:38627,37872:27741,37873:20108,37874:23612,37875:24336,37876:36841,37877:21250,37878:36049,37879:32905,37880:34425,37881:24319,37882:26085,37883:20083,37884:20837,37952:22914,37953:23615,37954:38894,37955:20219,37956:22922,37957:24525,37958:35469,37959:28641,37960:31152,37961:31074,37962:23527,37963:33905,37964:29483,37965:29105,37966:24180,37967:24565,37968:25467,37969:25754,37970:29123,37971:31896,37972:20035,37973:24316,37974:20043,37975:22492,37976:22178,37977:24745,37978:28611,37979:32013,37980:33021,37981:33075,37982:33215,37983:36786,37984:35223,37985:34468,37986:24052,37987:25226,37988:25773,37989:35207,37990:26487,37991:27874,37992:27966,37993:29750,37994:30772,37995:23110,37996:32629,37997:33453,37998:39340,37999:20467,38e3:24259,38001:25309,38002:25490,38003:25943,38004:26479,38005:30403,38006:29260,38007:32972,38008:32954,38009:36649,38010:37197,38011:20493,38012:22521,38013:23186,38014:26757,38016:26995,38017:29028,38018:29437,38019:36023,38020:22770,38021:36064,38022:38506,38023:36889,38024:34687,38025:31204,38026:30695,38027:33833,38028:20271,38029:21093,38030:21338,38031:25293,38032:26575,38033:27850,38034:30333,38035:31636,38036:31893,38037:33334,38038:34180,38039:36843,38040:26333,38041:28448,38042:29190,38043:32283,38044:33707,38045:39361,38046:40614,38047:20989,38048:31665,38049:30834,38050:31672,38051:32903,38052:31560,38053:27368,38054:24161,38055:32908,38056:30033,38057:30048,38058:20843,38059:37474,38060:28300,38061:30330,38062:37271,38063:39658,38064:20240,38065:32624,38066:25244,38067:31567,38068:38309,38069:40169,38070:22138,38071:22617,38072:34532,38073:38588,38074:20276,38075:21028,38076:21322,38077:21453,38078:21467,38079:24070,38080:25644,38081:26001,38082:26495,38083:27710,38084:27726,38085:29256,38086:29359,38087:29677,38088:30036,38089:32321,38090:33324,38091:34281,38092:36009,38093:31684,38094:37318,38095:29033,38096:38930,38097:39151,38098:25405,38099:26217,38100:30058,38101:30436,38102:30928,38103:34115,38104:34542,38105:21290,38106:21329,38107:21542,38108:22915,38109:24199,38110:24444,38111:24754,38112:25161,38113:25209,38114:25259,38115:26e3,38116:27604,38117:27852,38118:30130,38119:30382,38120:30865,38121:31192,38122:32203,38123:32631,38124:32933,38125:34987,38126:35513,38127:36027,38128:36991,38129:38750,38130:39131,38131:27147,38132:31800,38133:20633,38134:23614,38135:24494,38136:26503,38137:27608,38138:29749,38139:30473,38140:32654,38208:40763,38209:26570,38210:31255,38211:21305,38212:30091,38213:39661,38214:24422,38215:33181,38216:33777,38217:32920,38218:24380,38219:24517,38220:30050,38221:31558,38222:36924,38223:26727,38224:23019,38225:23195,38226:32016,38227:30334,38228:35628,38229:20469,38230:24426,38231:27161,38232:27703,38233:28418,38234:29922,38235:31080,38236:34920,38237:35413,38238:35961,38239:24287,38240:25551,38241:30149,38242:31186,38243:33495,38244:37672,38245:37618,38246:33948,38247:34541,38248:39981,38249:21697,38250:24428,38251:25996,38252:27996,38253:28693,38254:36007,38255:36051,38256:38971,38257:25935,38258:29942,38259:19981,38260:20184,38261:22496,38262:22827,38263:23142,38264:23500,38265:20904,38266:24067,38267:24220,38268:24598,38269:25206,38270:25975,38272:26023,38273:26222,38274:28014,38275:29238,38276:31526,38277:33104,38278:33178,38279:33433,38280:35676,38281:36e3,38282:36070,38283:36212,38284:38428,38285:38468,38286:20398,38287:25771,38288:27494,38289:33310,38290:33889,38291:34154,38292:37096,38293:23553,38294:26963,38295:39080,38296:33914,38297:34135,38298:20239,38299:21103,38300:24489,38301:24133,38302:26381,38303:31119,38304:33145,38305:35079,38306:35206,38307:28149,38308:24343,38309:25173,38310:27832,38311:20175,38312:29289,38313:39826,38314:20998,38315:21563,38316:22132,38317:22707,38318:24996,38319:25198,38320:28954,38321:22894,38322:31881,38323:31966,38324:32027,38325:38640,38326:25991,38327:32862,38328:19993,38329:20341,38330:20853,38331:22592,38332:24163,38333:24179,38334:24330,38335:26564,38336:20006,38337:34109,38338:38281,38339:38491,38340:31859,38341:38913,38342:20731,38343:22721,38344:30294,38345:30887,38346:21029,38347:30629,38348:34065,38349:31622,38350:20559,38351:22793,38352:29255,38353:31687,38354:32232,38355:36794,38356:36820,38357:36941,38358:20415,38359:21193,38360:23081,38361:24321,38362:38829,38363:20445,38364:33303,38365:37610,38366:22275,38367:25429,38368:27497,38369:29995,38370:35036,38371:36628,38372:31298,38373:21215,38374:22675,38375:24917,38376:25098,38377:26286,38378:27597,38379:31807,38380:33769,38381:20515,38382:20472,38383:21253,38384:21574,38385:22577,38386:22857,38387:23453,38388:23792,38389:23791,38390:23849,38391:24214,38392:25265,38393:25447,38394:25918,38395:26041,38396:26379,38464:27861,38465:27873,38466:28921,38467:30770,38468:32299,38469:32990,38470:33459,38471:33804,38472:34028,38473:34562,38474:35090,38475:35370,38476:35914,38477:37030,38478:37586,38479:39165,38480:40179,38481:40300,38482:20047,38483:20129,38484:20621,38485:21078,38486:22346,38487:22952,38488:24125,38489:24536,38490:24537,38491:25151,38492:26292,38493:26395,38494:26576,38495:26834,38496:20882,38497:32033,38498:32938,38499:33192,38500:35584,38501:35980,38502:36031,38503:37502,38504:38450,38505:21536,38506:38956,38507:21271,38508:20693,38509:21340,38510:22696,38511:25778,38512:26420,38513:29287,38514:30566,38515:31302,38516:37350,38517:21187,38518:27809,38519:27526,38520:22528,38521:24140,38522:22868,38523:26412,38524:32763,38525:20961,38526:30406,38528:25705,38529:30952,38530:39764,38531:40635,38532:22475,38533:22969,38534:26151,38535:26522,38536:27598,38537:21737,38538:27097,38539:24149,38540:33180,38541:26517,38542:39850,38543:26622,38544:40018,38545:26717,38546:20134,38547:20451,38548:21448,38549:25273,38550:26411,38551:27819,38552:36804,38553:20397,38554:32365,38555:40639,38556:19975,38557:24930,38558:28288,38559:28459,38560:34067,38561:21619,38562:26410,38563:39749,38564:24051,38565:31637,38566:23724,38567:23494,38568:34588,38569:28234,38570:34001,38571:31252,38572:33032,38573:22937,38574:31885,38575:27665,38576:30496,38577:21209,38578:22818,38579:28961,38580:29279,38581:30683,38582:38695,38583:40289,38584:26891,38585:23167,38586:23064,38587:20901,38588:21517,38589:21629,38590:26126,38591:30431,38592:36855,38593:37528,38594:40180,38595:23018,38596:29277,38597:28357,38598:20813,38599:26825,38600:32191,38601:32236,38602:38754,38603:40634,38604:25720,38605:27169,38606:33538,38607:22916,38608:23391,38609:27611,38610:29467,38611:30450,38612:32178,38613:32791,38614:33945,38615:20786,38616:26408,38617:40665,38618:30446,38619:26466,38620:21247,38621:39173,38622:23588,38623:25147,38624:31870,38625:36016,38626:21839,38627:24758,38628:32011,38629:38272,38630:21249,38631:20063,38632:20918,38633:22812,38634:29242,38635:32822,38636:37326,38637:24357,38638:30690,38639:21380,38640:24441,38641:32004,38642:34220,38643:35379,38644:36493,38645:38742,38646:26611,38647:34222,38648:37971,38649:24841,38650:24840,38651:27833,38652:30290,38720:35565,38721:36664,38722:21807,38723:20305,38724:20778,38725:21191,38726:21451,38727:23461,38728:24189,38729:24736,38730:24962,38731:25558,38732:26377,38733:26586,38734:28263,38735:28044,38736:29494,38737:29495,38738:30001,38739:31056,38740:35029,38741:35480,38742:36938,38743:37009,38744:37109,38745:38596,38746:34701,38747:22805,38748:20104,38749:20313,38750:19982,38751:35465,38752:36671,38753:38928,38754:20653,38755:24188,38756:22934,38757:23481,38758:24248,38759:25562,38760:25594,38761:25793,38762:26332,38763:26954,38764:27096,38765:27915,38766:28342,38767:29076,38768:29992,38769:31407,38770:32650,38771:32768,38772:33865,38773:33993,38774:35201,38775:35617,38776:36362,38777:36965,38778:38525,38779:39178,38780:24958,38781:25233,38782:27442,38784:27779,38785:28020,38786:32716,38787:32764,38788:28096,38789:32645,38790:34746,38791:35064,38792:26469,38793:33713,38794:38972,38795:38647,38796:27931,38797:32097,38798:33853,38799:37226,38800:20081,38801:21365,38802:23888,38803:27396,38804:28651,38805:34253,38806:34349,38807:35239,38808:21033,38809:21519,38810:23653,38811:26446,38812:26792,38813:29702,38814:29827,38815:30178,38816:35023,38817:35041,38818:37324,38819:38626,38820:38520,38821:24459,38822:29575,38823:31435,38824:33870,38825:25504,38826:30053,38827:21129,38828:27969,38829:28316,38830:29705,38831:30041,38832:30827,38833:31890,38834:38534,38835:31452,38836:40845,38837:20406,38838:24942,38839:26053,38840:34396,38841:20102,38842:20142,38843:20698,38844:20001,38845:20940,38846:23534,38847:26009,38848:26753,38849:28092,38850:29471,38851:30274,38852:30637,38853:31260,38854:31975,38855:33391,38856:35538,38857:36988,38858:37327,38859:38517,38860:38936,38861:21147,38862:32209,38863:20523,38864:21400,38865:26519,38866:28107,38867:29136,38868:29747,38869:33256,38870:36650,38871:38563,38872:40023,38873:40607,38874:29792,38875:22593,38876:28057,38877:32047,38878:39006,38879:20196,38880:20278,38881:20363,38882:20919,38883:21169,38884:23994,38885:24604,38886:29618,38887:31036,38888:33491,38889:37428,38890:38583,38891:38646,38892:38666,38893:40599,38894:40802,38895:26278,38896:27508,38897:21015,38898:21155,38899:28872,38900:35010,38901:24265,38902:24651,38903:24976,38904:28451,38905:29001,38906:31806,38907:32244,38908:32879,38976:34030,38977:36899,38978:37676,38979:21570,38980:39791,38981:27347,38982:28809,38983:36034,38984:36335,38985:38706,38986:21172,38987:23105,38988:24266,38989:24324,38990:26391,38991:27004,38992:27028,38993:28010,38994:28431,38995:29282,38996:29436,38997:31725,38998:32769,38999:32894,39e3:34635,39001:37070,39002:20845,39003:40595,39004:31108,39005:32907,39006:37682,39007:35542,39008:20525,39009:21644,39010:35441,39011:27498,39012:36036,39013:33031,39014:24785,39015:26528,39016:40434,39017:20121,39018:20120,39019:39952,39020:35435,39021:34241,39022:34152,39023:26880,39024:28286,39025:30871,39026:33109,39071:24332,39072:19984,39073:19989,39074:20010,39075:20017,39076:20022,39077:20028,39078:20031,39079:20034,39080:20054,39081:20056,39082:20098,39083:20101,39084:35947,39085:20106,39086:33298,39087:24333,39088:20110,39089:20126,39090:20127,39091:20128,39092:20130,39093:20144,39094:20147,39095:20150,39096:20174,39097:20173,39098:20164,39099:20166,39100:20162,39101:20183,39102:20190,39103:20205,39104:20191,39105:20215,39106:20233,39107:20314,39108:20272,39109:20315,39110:20317,39111:20311,39112:20295,39113:20342,39114:20360,39115:20367,39116:20376,39117:20347,39118:20329,39119:20336,39120:20369,39121:20335,39122:20358,39123:20374,39124:20760,39125:20436,39126:20447,39127:20430,39128:20440,39129:20443,39130:20433,39131:20442,39132:20432,39133:20452,39134:20453,39135:20506,39136:20520,39137:20500,39138:20522,39139:20517,39140:20485,39141:20252,39142:20470,39143:20513,39144:20521,39145:20524,39146:20478,39147:20463,39148:20497,39149:20486,39150:20547,39151:20551,39152:26371,39153:20565,39154:20560,39155:20552,39156:20570,39157:20566,39158:20588,39159:20600,39160:20608,39161:20634,39162:20613,39163:20660,39164:20658,39232:20681,39233:20682,39234:20659,39235:20674,39236:20694,39237:20702,39238:20709,39239:20717,39240:20707,39241:20718,39242:20729,39243:20725,39244:20745,39245:20737,39246:20738,39247:20758,39248:20757,39249:20756,39250:20762,39251:20769,39252:20794,39253:20791,39254:20796,39255:20795,39256:20799,39257:20800,39258:20818,39259:20812,39260:20820,39261:20834,39262:31480,39263:20841,39264:20842,39265:20846,39266:20864,39267:20866,39268:22232,39269:20876,39270:20873,39271:20879,39272:20881,39273:20883,39274:20885,39275:20886,39276:20900,39277:20902,39278:20898,39279:20905,39280:20906,39281:20907,39282:20915,39283:20913,39284:20914,39285:20912,39286:20917,39287:20925,39288:20933,39289:20937,39290:20955,39291:20960,39292:34389,39293:20969,39294:20973,39296:20976,39297:20981,39298:20990,39299:20996,39300:21003,39301:21012,39302:21006,39303:21031,39304:21034,39305:21038,39306:21043,39307:21049,39308:21071,39309:21060,39310:21067,39311:21068,39312:21086,39313:21076,39314:21098,39315:21108,39316:21097,39317:21107,39318:21119,39319:21117,39320:21133,39321:21140,39322:21138,39323:21105,39324:21128,39325:21137,39326:36776,39327:36775,39328:21164,39329:21165,39330:21180,39331:21173,39332:21185,39333:21197,39334:21207,39335:21214,39336:21219,39337:21222,39338:39149,39339:21216,39340:21235,39341:21237,39342:21240,39343:21241,39344:21254,39345:21256,39346:30008,39347:21261,39348:21264,39349:21263,39350:21269,39351:21274,39352:21283,39353:21295,39354:21297,39355:21299,39356:21304,39357:21312,39358:21318,39359:21317,39360:19991,39361:21321,39362:21325,39363:20950,39364:21342,39365:21353,39366:21358,39367:22808,39368:21371,39369:21367,39370:21378,39371:21398,39372:21408,39373:21414,39374:21413,39375:21422,39376:21424,39377:21430,39378:21443,39379:31762,39380:38617,39381:21471,39382:26364,39383:29166,39384:21486,39385:21480,39386:21485,39387:21498,39388:21505,39389:21565,39390:21568,39391:21548,39392:21549,39393:21564,39394:21550,39395:21558,39396:21545,39397:21533,39398:21582,39399:21647,39400:21621,39401:21646,39402:21599,39403:21617,39404:21623,39405:21616,39406:21650,39407:21627,39408:21632,39409:21622,39410:21636,39411:21648,39412:21638,39413:21703,39414:21666,39415:21688,39416:21669,39417:21676,39418:21700,39419:21704,39420:21672,39488:21675,39489:21698,39490:21668,39491:21694,39492:21692,39493:21720,39494:21733,39495:21734,39496:21775,39497:21780,39498:21757,39499:21742,39500:21741,39501:21754,39502:21730,39503:21817,39504:21824,39505:21859,39506:21836,39507:21806,39508:21852,39509:21829,39510:21846,39511:21847,39512:21816,39513:21811,39514:21853,39515:21913,39516:21888,39517:21679,39518:21898,39519:21919,39520:21883,39521:21886,39522:21912,39523:21918,39524:21934,39525:21884,39526:21891,39527:21929,39528:21895,39529:21928,39530:21978,39531:21957,39532:21983,39533:21956,39534:21980,39535:21988,39536:21972,39537:22036,39538:22007,39539:22038,39540:22014,39541:22013,39542:22043,39543:22009,39544:22094,39545:22096,39546:29151,39547:22068,39548:22070,39549:22066,39550:22072,39552:22123,39553:22116,39554:22063,39555:22124,39556:22122,39557:22150,39558:22144,39559:22154,39560:22176,39561:22164,39562:22159,39563:22181,39564:22190,39565:22198,39566:22196,39567:22210,39568:22204,39569:22209,39570:22211,39571:22208,39572:22216,39573:22222,39574:22225,39575:22227,39576:22231,39577:22254,39578:22265,39579:22272,39580:22271,39581:22276,39582:22281,39583:22280,39584:22283,39585:22285,39586:22291,39587:22296,39588:22294,39589:21959,39590:22300,39591:22310,39592:22327,39593:22328,39594:22350,39595:22331,39596:22336,39597:22351,39598:22377,39599:22464,39600:22408,39601:22369,39602:22399,39603:22409,39604:22419,39605:22432,39606:22451,39607:22436,39608:22442,39609:22448,39610:22467,39611:22470,39612:22484,39613:22482,39614:22483,39615:22538,39616:22486,39617:22499,39618:22539,39619:22553,39620:22557,39621:22642,39622:22561,39623:22626,39624:22603,39625:22640,39626:27584,39627:22610,39628:22589,39629:22649,39630:22661,39631:22713,39632:22687,39633:22699,39634:22714,39635:22750,39636:22715,39637:22712,39638:22702,39639:22725,39640:22739,39641:22737,39642:22743,39643:22745,39644:22744,39645:22757,39646:22748,39647:22756,39648:22751,39649:22767,39650:22778,39651:22777,39652:22779,39653:22780,39654:22781,39655:22786,39656:22794,39657:22800,39658:22811,39659:26790,39660:22821,39661:22828,39662:22829,39663:22834,39664:22840,39665:22846,39666:31442,39667:22869,39668:22864,39669:22862,39670:22874,39671:22872,39672:22882,39673:22880,39674:22887,39675:22892,39676:22889,39744:22904,39745:22913,39746:22941,39747:20318,39748:20395,39749:22947,39750:22962,39751:22982,39752:23016,39753:23004,39754:22925,39755:23001,39756:23002,39757:23077,39758:23071,39759:23057,39760:23068,39761:23049,39762:23066,39763:23104,39764:23148,39765:23113,39766:23093,39767:23094,39768:23138,39769:23146,39770:23194,39771:23228,39772:23230,39773:23243,39774:23234,39775:23229,39776:23267,39777:23255,39778:23270,39779:23273,39780:23254,39781:23290,39782:23291,39783:23308,39784:23307,39785:23318,39786:23346,39787:23248,39788:23338,39789:23350,39790:23358,39791:23363,39792:23365,39793:23360,39794:23377,39795:23381,39796:23386,39797:23387,39798:23397,39799:23401,39800:23408,39801:23411,39802:23413,39803:23416,39804:25992,39805:23418,39806:23424,39808:23427,39809:23462,39810:23480,39811:23491,39812:23495,39813:23497,39814:23508,39815:23504,39816:23524,39817:23526,39818:23522,39819:23518,39820:23525,39821:23531,39822:23536,39823:23542,39824:23539,39825:23557,39826:23559,39827:23560,39828:23565,39829:23571,39830:23584,39831:23586,39832:23592,39833:23608,39834:23609,39835:23617,39836:23622,39837:23630,39838:23635,39839:23632,39840:23631,39841:23409,39842:23660,39843:23662,39844:20066,39845:23670,39846:23673,39847:23692,39848:23697,39849:23700,39850:22939,39851:23723,39852:23739,39853:23734,39854:23740,39855:23735,39856:23749,39857:23742,39858:23751,39859:23769,39860:23785,39861:23805,39862:23802,39863:23789,39864:23948,39865:23786,39866:23819,39867:23829,39868:23831,39869:23900,39870:23839,39871:23835,39872:23825,39873:23828,39874:23842,39875:23834,39876:23833,39877:23832,39878:23884,39879:23890,39880:23886,39881:23883,39882:23916,39883:23923,39884:23926,39885:23943,39886:23940,39887:23938,39888:23970,39889:23965,39890:23980,39891:23982,39892:23997,39893:23952,39894:23991,39895:23996,39896:24009,39897:24013,39898:24019,39899:24018,39900:24022,39901:24027,39902:24043,39903:24050,39904:24053,39905:24075,39906:24090,39907:24089,39908:24081,39909:24091,39910:24118,39911:24119,39912:24132,39913:24131,39914:24128,39915:24142,39916:24151,39917:24148,39918:24159,39919:24162,39920:24164,39921:24135,39922:24181,39923:24182,39924:24186,39925:40636,39926:24191,39927:24224,39928:24257,39929:24258,39930:24264,39931:24272,39932:24271,4e4:24278,40001:24291,40002:24285,40003:24282,40004:24283,40005:24290,40006:24289,40007:24296,40008:24297,40009:24300,40010:24305,40011:24307,40012:24304,40013:24308,40014:24312,40015:24318,40016:24323,40017:24329,40018:24413,40019:24412,40020:24331,40021:24337,40022:24342,40023:24361,40024:24365,40025:24376,40026:24385,40027:24392,40028:24396,40029:24398,40030:24367,40031:24401,40032:24406,40033:24407,40034:24409,40035:24417,40036:24429,40037:24435,40038:24439,40039:24451,40040:24450,40041:24447,40042:24458,40043:24456,40044:24465,40045:24455,40046:24478,40047:24473,40048:24472,40049:24480,40050:24488,40051:24493,40052:24508,40053:24534,40054:24571,40055:24548,40056:24568,40057:24561,40058:24541,40059:24755,40060:24575,40061:24609,40062:24672,40064:24601,40065:24592,40066:24617,40067:24590,40068:24625,40069:24603,40070:24597,40071:24619,40072:24614,40073:24591,40074:24634,40075:24666,40076:24641,40077:24682,40078:24695,40079:24671,40080:24650,40081:24646,40082:24653,40083:24675,40084:24643,40085:24676,40086:24642,40087:24684,40088:24683,40089:24665,40090:24705,40091:24717,40092:24807,40093:24707,40094:24730,40095:24708,40096:24731,40097:24726,40098:24727,40099:24722,40100:24743,40101:24715,40102:24801,40103:24760,40104:24800,40105:24787,40106:24756,40107:24560,40108:24765,40109:24774,40110:24757,40111:24792,40112:24909,40113:24853,40114:24838,40115:24822,40116:24823,40117:24832,40118:24820,40119:24826,40120:24835,40121:24865,40122:24827,40123:24817,40124:24845,40125:24846,40126:24903,40127:24894,40128:24872,40129:24871,40130:24906,40131:24895,40132:24892,40133:24876,40134:24884,40135:24893,40136:24898,40137:24900,40138:24947,40139:24951,40140:24920,40141:24921,40142:24922,40143:24939,40144:24948,40145:24943,40146:24933,40147:24945,40148:24927,40149:24925,40150:24915,40151:24949,40152:24985,40153:24982,40154:24967,40155:25004,40156:24980,40157:24986,40158:24970,40159:24977,40160:25003,40161:25006,40162:25036,40163:25034,40164:25033,40165:25079,40166:25032,40167:25027,40168:25030,40169:25018,40170:25035,40171:32633,40172:25037,40173:25062,40174:25059,40175:25078,40176:25082,40177:25076,40178:25087,40179:25085,40180:25084,40181:25086,40182:25088,40183:25096,40184:25097,40185:25101,40186:25100,40187:25108,40188:25115,40256:25118,40257:25121,40258:25130,40259:25134,40260:25136,40261:25138,40262:25139,40263:25153,40264:25166,40265:25182,40266:25187,40267:25179,40268:25184,40269:25192,40270:25212,40271:25218,40272:25225,40273:25214,40274:25234,40275:25235,40276:25238,40277:25300,40278:25219,40279:25236,40280:25303,40281:25297,40282:25275,40283:25295,40284:25343,40285:25286,40286:25812,40287:25288,40288:25308,40289:25292,40290:25290,40291:25282,40292:25287,40293:25243,40294:25289,40295:25356,40296:25326,40297:25329,40298:25383,40299:25346,40300:25352,40301:25327,40302:25333,40303:25424,40304:25406,40305:25421,40306:25628,40307:25423,40308:25494,40309:25486,40310:25472,40311:25515,40312:25462,40313:25507,40314:25487,40315:25481,40316:25503,40317:25525,40318:25451,40320:25449,40321:25534,40322:25577,40323:25536,40324:25542,40325:25571,40326:25545,40327:25554,40328:25590,40329:25540,40330:25622,40331:25652,40332:25606,40333:25619,40334:25638,40335:25654,40336:25885,40337:25623,40338:25640,40339:25615,40340:25703,40341:25711,40342:25718,40343:25678,40344:25898,40345:25749,40346:25747,40347:25765,40348:25769,40349:25736,40350:25788,40351:25818,40352:25810,40353:25797,40354:25799,40355:25787,40356:25816,40357:25794,40358:25841,40359:25831,40360:33289,40361:25824,40362:25825,40363:25260,40364:25827,40365:25839,40366:25900,40367:25846,40368:25844,40369:25842,40370:25850,40371:25856,40372:25853,40373:25880,40374:25884,40375:25861,40376:25892,40377:25891,40378:25899,40379:25908,40380:25909,40381:25911,40382:25910,40383:25912,40384:30027,40385:25928,40386:25942,40387:25941,40388:25933,40389:25944,40390:25950,40391:25949,40392:25970,40393:25976,40394:25986,40395:25987,40396:35722,40397:26011,40398:26015,40399:26027,40400:26039,40401:26051,40402:26054,40403:26049,40404:26052,40405:26060,40406:26066,40407:26075,40408:26073,40409:26080,40410:26081,40411:26097,40412:26482,40413:26122,40414:26115,40415:26107,40416:26483,40417:26165,40418:26166,40419:26164,40420:26140,40421:26191,40422:26180,40423:26185,40424:26177,40425:26206,40426:26205,40427:26212,40428:26215,40429:26216,40430:26207,40431:26210,40432:26224,40433:26243,40434:26248,40435:26254,40436:26249,40437:26244,40438:26264,40439:26269,40440:26305,40441:26297,40442:26313,40443:26302,40444:26300,40512:26308,40513:26296,40514:26326,40515:26330,40516:26336,40517:26175,40518:26342,40519:26345,40520:26352,40521:26357,40522:26359,40523:26383,40524:26390,40525:26398,40526:26406,40527:26407,40528:38712,40529:26414,40530:26431,40531:26422,40532:26433,40533:26424,40534:26423,40535:26438,40536:26462,40537:26464,40538:26457,40539:26467,40540:26468,40541:26505,40542:26480,40543:26537,40544:26492,40545:26474,40546:26508,40547:26507,40548:26534,40549:26529,40550:26501,40551:26551,40552:26607,40553:26548,40554:26604,40555:26547,40556:26601,40557:26552,40558:26596,40559:26590,40560:26589,40561:26594,40562:26606,40563:26553,40564:26574,40565:26566,40566:26599,40567:27292,40568:26654,40569:26694,40570:26665,40571:26688,40572:26701,40573:26674,40574:26702,40576:26803,40577:26667,40578:26713,40579:26723,40580:26743,40581:26751,40582:26783,40583:26767,40584:26797,40585:26772,40586:26781,40587:26779,40588:26755,40589:27310,40590:26809,40591:26740,40592:26805,40593:26784,40594:26810,40595:26895,40596:26765,40597:26750,40598:26881,40599:26826,40600:26888,40601:26840,40602:26914,40603:26918,40604:26849,40605:26892,40606:26829,40607:26836,40608:26855,40609:26837,40610:26934,40611:26898,40612:26884,40613:26839,40614:26851,40615:26917,40616:26873,40617:26848,40618:26863,40619:26920,40620:26922,40621:26906,40622:26915,40623:26913,40624:26822,40625:27001,40626:26999,40627:26972,40628:27e3,40629:26987,40630:26964,40631:27006,40632:26990,40633:26937,40634:26996,40635:26941,40636:26969,40637:26928,40638:26977,40639:26974,40640:26973,40641:27009,40642:26986,40643:27058,40644:27054,40645:27088,40646:27071,40647:27073,40648:27091,40649:27070,40650:27086,40651:23528,40652:27082,40653:27101,40654:27067,40655:27075,40656:27047,40657:27182,40658:27025,40659:27040,40660:27036,40661:27029,40662:27060,40663:27102,40664:27112,40665:27138,40666:27163,40667:27135,40668:27402,40669:27129,40670:27122,40671:27111,40672:27141,40673:27057,40674:27166,40675:27117,40676:27156,40677:27115,40678:27146,40679:27154,40680:27329,40681:27171,40682:27155,40683:27204,40684:27148,40685:27250,40686:27190,40687:27256,40688:27207,40689:27234,40690:27225,40691:27238,40692:27208,40693:27192,40694:27170,40695:27280,40696:27277,40697:27296,40698:27268,40699:27298,40700:27299,40768:27287,40769:34327,40770:27323,40771:27331,40772:27330,40773:27320,40774:27315,40775:27308,40776:27358,40777:27345,40778:27359,40779:27306,40780:27354,40781:27370,40782:27387,40783:27397,40784:34326,40785:27386,40786:27410,40787:27414,40788:39729,40789:27423,40790:27448,40791:27447,40792:30428,40793:27449,40794:39150,40795:27463,40796:27459,40797:27465,40798:27472,40799:27481,40800:27476,40801:27483,40802:27487,40803:27489,40804:27512,40805:27513,40806:27519,40807:27520,40808:27524,40809:27523,40810:27533,40811:27544,40812:27541,40813:27550,40814:27556,40815:27562,40816:27563,40817:27567,40818:27570,40819:27569,40820:27571,40821:27575,40822:27580,40823:27590,40824:27595,40825:27603,40826:27615,40827:27628,40828:27627,40829:27635,40830:27631,40832:40638,40833:27656,40834:27667,40835:27668,40836:27675,40837:27684,40838:27683,40839:27742,40840:27733,40841:27746,40842:27754,40843:27778,40844:27789,40845:27802,40846:27777,40847:27803,40848:27774,40849:27752,40850:27763,40851:27794,40852:27792,40853:27844,40854:27889,40855:27859,40856:27837,40857:27863,40858:27845,40859:27869,40860:27822,40861:27825,40862:27838,40863:27834,40864:27867,40865:27887,40866:27865,40867:27882,40868:27935,40869:34893,40870:27958,40871:27947,40872:27965,40873:27960,40874:27929,40875:27957,40876:27955,40877:27922,40878:27916,40879:28003,40880:28051,40881:28004,40882:27994,40883:28025,40884:27993,40885:28046,40886:28053,40887:28644,40888:28037,40889:28153,40890:28181,40891:28170,40892:28085,40893:28103,40894:28134,40895:28088,40896:28102,40897:28140,40898:28126,40899:28108,40900:28136,40901:28114,40902:28101,40903:28154,40904:28121,40905:28132,40906:28117,40907:28138,40908:28142,40909:28205,40910:28270,40911:28206,40912:28185,40913:28274,40914:28255,40915:28222,40916:28195,40917:28267,40918:28203,40919:28278,40920:28237,40921:28191,40922:28227,40923:28218,40924:28238,40925:28196,40926:28415,40927:28189,40928:28216,40929:28290,40930:28330,40931:28312,40932:28361,40933:28343,40934:28371,40935:28349,40936:28335,40937:28356,40938:28338,40939:28372,40940:28373,40941:28303,40942:28325,40943:28354,40944:28319,40945:28481,40946:28433,40947:28748,40948:28396,40949:28408,40950:28414,40951:28479,40952:28402,40953:28465,40954:28399,40955:28466,40956:28364,161:65377,162:65378,163:65379,164:65380,165:65381,166:65382,167:65383,168:65384,169:65385,170:65386,171:65387,172:65388,173:65389,174:65390,175:65391,176:65392,177:65393,178:65394,179:65395,180:65396,181:65397,182:65398,183:65399,184:65400,185:65401,186:65402,187:65403,188:65404,189:65405,190:65406,191:65407,192:65408,193:65409,194:65410,195:65411,196:65412,197:65413,198:65414,199:65415,200:65416,201:65417,202:65418,203:65419,204:65420,205:65421,206:65422,207:65423,208:65424,209:65425,210:65426,211:65427,212:65428,213:65429,214:65430,215:65431,216:65432,217:65433,218:65434,219:65435,220:65436,221:65437,222:65438,223:65439,57408:28478,57409:28435,57410:28407,57411:28550,57412:28538,57413:28536,57414:28545,57415:28544,57416:28527,57417:28507,57418:28659,57419:28525,57420:28546,57421:28540,57422:28504,57423:28558,57424:28561,57425:28610,57426:28518,57427:28595,57428:28579,57429:28577,57430:28580,57431:28601,57432:28614,57433:28586,57434:28639,57435:28629,57436:28652,57437:28628,57438:28632,57439:28657,57440:28654,57441:28635,57442:28681,57443:28683,57444:28666,57445:28689,57446:28673,57447:28687,57448:28670,57449:28699,57450:28698,57451:28532,57452:28701,57453:28696,57454:28703,57455:28720,57456:28734,57457:28722,57458:28753,57459:28771,57460:28825,57461:28818,57462:28847,57463:28913,57464:28844,57465:28856,57466:28851,57467:28846,57468:28895,57469:28875,57470:28893,57472:28889,57473:28937,57474:28925,57475:28956,57476:28953,57477:29029,57478:29013,57479:29064,57480:29030,57481:29026,57482:29004,57483:29014,57484:29036,57485:29071,57486:29179,57487:29060,57488:29077,57489:29096,57490:29100,57491:29143,57492:29113,57493:29118,57494:29138,57495:29129,57496:29140,57497:29134,57498:29152,57499:29164,57500:29159,57501:29173,57502:29180,57503:29177,57504:29183,57505:29197,57506:29200,57507:29211,57508:29224,57509:29229,57510:29228,57511:29232,57512:29234,57513:29243,57514:29244,57515:29247,57516:29248,57517:29254,57518:29259,57519:29272,57520:29300,57521:29310,57522:29314,57523:29313,57524:29319,57525:29330,57526:29334,57527:29346,57528:29351,57529:29369,57530:29362,57531:29379,57532:29382,57533:29380,57534:29390,57535:29394,57536:29410,57537:29408,57538:29409,57539:29433,57540:29431,57541:20495,57542:29463,57543:29450,57544:29468,57545:29462,57546:29469,57547:29492,57548:29487,57549:29481,57550:29477,57551:29502,57552:29518,57553:29519,57554:40664,57555:29527,57556:29546,57557:29544,57558:29552,57559:29560,57560:29557,57561:29563,57562:29562,57563:29640,57564:29619,57565:29646,57566:29627,57567:29632,57568:29669,57569:29678,57570:29662,57571:29858,57572:29701,57573:29807,57574:29733,57575:29688,57576:29746,57577:29754,57578:29781,57579:29759,57580:29791,57581:29785,57582:29761,57583:29788,57584:29801,57585:29808,57586:29795,57587:29802,57588:29814,57589:29822,57590:29835,57591:29854,57592:29863,57593:29898,57594:29903,57595:29908,57596:29681,57664:29920,57665:29923,57666:29927,57667:29929,57668:29934,57669:29938,57670:29936,57671:29937,57672:29944,57673:29943,57674:29956,57675:29955,57676:29957,57677:29964,57678:29966,57679:29965,57680:29973,57681:29971,57682:29982,57683:29990,57684:29996,57685:30012,57686:30020,57687:30029,57688:30026,57689:30025,57690:30043,57691:30022,57692:30042,57693:30057,57694:30052,57695:30055,57696:30059,57697:30061,57698:30072,57699:30070,57700:30086,57701:30087,57702:30068,57703:30090,57704:30089,57705:30082,57706:30100,57707:30106,57708:30109,57709:30117,57710:30115,57711:30146,57712:30131,57713:30147,57714:30133,57715:30141,57716:30136,57717:30140,57718:30129,57719:30157,57720:30154,57721:30162,57722:30169,57723:30179,57724:30174,57725:30206,57726:30207,57728:30204,57729:30209,57730:30192,57731:30202,57732:30194,57733:30195,57734:30219,57735:30221,57736:30217,57737:30239,57738:30247,57739:30240,57740:30241,57741:30242,57742:30244,57743:30260,57744:30256,57745:30267,57746:30279,57747:30280,57748:30278,57749:30300,57750:30296,57751:30305,57752:30306,57753:30312,57754:30313,57755:30314,57756:30311,57757:30316,57758:30320,57759:30322,57760:30326,57761:30328,57762:30332,57763:30336,57764:30339,57765:30344,57766:30347,57767:30350,57768:30358,57769:30355,57770:30361,57771:30362,57772:30384,57773:30388,57774:30392,57775:30393,57776:30394,57777:30402,57778:30413,57779:30422,57780:30418,57781:30430,57782:30433,57783:30437,57784:30439,57785:30442,57786:34351,57787:30459,57788:30472,57789:30471,57790:30468,57791:30505,57792:30500,57793:30494,57794:30501,57795:30502,57796:30491,57797:30519,57798:30520,57799:30535,57800:30554,57801:30568,57802:30571,57803:30555,57804:30565,57805:30591,57806:30590,57807:30585,57808:30606,57809:30603,57810:30609,57811:30624,57812:30622,57813:30640,57814:30646,57815:30649,57816:30655,57817:30652,57818:30653,57819:30651,57820:30663,57821:30669,57822:30679,57823:30682,57824:30684,57825:30691,57826:30702,57827:30716,57828:30732,57829:30738,57830:31014,57831:30752,57832:31018,57833:30789,57834:30862,57835:30836,57836:30854,57837:30844,57838:30874,57839:30860,57840:30883,57841:30901,57842:30890,57843:30895,57844:30929,57845:30918,57846:30923,57847:30932,57848:30910,57849:30908,57850:30917,57851:30922,57852:30956,57920:30951,57921:30938,57922:30973,57923:30964,57924:30983,57925:30994,57926:30993,57927:31001,57928:31020,57929:31019,57930:31040,57931:31072,57932:31063,57933:31071,57934:31066,57935:31061,57936:31059,57937:31098,57938:31103,57939:31114,57940:31133,57941:31143,57942:40779,57943:31146,57944:31150,57945:31155,57946:31161,57947:31162,57948:31177,57949:31189,57950:31207,57951:31212,57952:31201,57953:31203,57954:31240,57955:31245,57956:31256,57957:31257,57958:31264,57959:31263,57960:31104,57961:31281,57962:31291,57963:31294,57964:31287,57965:31299,57966:31319,57967:31305,57968:31329,57969:31330,57970:31337,57971:40861,57972:31344,57973:31353,57974:31357,57975:31368,57976:31383,57977:31381,57978:31384,57979:31382,57980:31401,57981:31432,57982:31408,57984:31414,57985:31429,57986:31428,57987:31423,57988:36995,57989:31431,57990:31434,57991:31437,57992:31439,57993:31445,57994:31443,57995:31449,57996:31450,57997:31453,57998:31457,57999:31458,58e3:31462,58001:31469,58002:31472,58003:31490,58004:31503,58005:31498,58006:31494,58007:31539,58008:31512,58009:31513,58010:31518,58011:31541,58012:31528,58013:31542,58014:31568,58015:31610,58016:31492,58017:31565,58018:31499,58019:31564,58020:31557,58021:31605,58022:31589,58023:31604,58024:31591,58025:31600,58026:31601,58027:31596,58028:31598,58029:31645,58030:31640,58031:31647,58032:31629,58033:31644,58034:31642,58035:31627,58036:31634,58037:31631,58038:31581,58039:31641,58040:31691,58041:31681,58042:31692,58043:31695,58044:31668,58045:31686,58046:31709,58047:31721,58048:31761,58049:31764,58050:31718,58051:31717,58052:31840,58053:31744,58054:31751,58055:31763,58056:31731,58057:31735,58058:31767,58059:31757,58060:31734,58061:31779,58062:31783,58063:31786,58064:31775,58065:31799,58066:31787,58067:31805,58068:31820,58069:31811,58070:31828,58071:31823,58072:31808,58073:31824,58074:31832,58075:31839,58076:31844,58077:31830,58078:31845,58079:31852,58080:31861,58081:31875,58082:31888,58083:31908,58084:31917,58085:31906,58086:31915,58087:31905,58088:31912,58089:31923,58090:31922,58091:31921,58092:31918,58093:31929,58094:31933,58095:31936,58096:31941,58097:31938,58098:31960,58099:31954,58100:31964,58101:31970,58102:39739,58103:31983,58104:31986,58105:31988,58106:31990,58107:31994,58108:32006,58176:32002,58177:32028,58178:32021,58179:32010,58180:32069,58181:32075,58182:32046,58183:32050,58184:32063,58185:32053,58186:32070,58187:32115,58188:32086,58189:32078,58190:32114,58191:32104,58192:32110,58193:32079,58194:32099,58195:32147,58196:32137,58197:32091,58198:32143,58199:32125,58200:32155,58201:32186,58202:32174,58203:32163,58204:32181,58205:32199,58206:32189,58207:32171,58208:32317,58209:32162,58210:32175,58211:32220,58212:32184,58213:32159,58214:32176,58215:32216,58216:32221,58217:32228,58218:32222,58219:32251,58220:32242,58221:32225,58222:32261,58223:32266,58224:32291,58225:32289,58226:32274,58227:32305,58228:32287,58229:32265,58230:32267,58231:32290,58232:32326,58233:32358,58234:32315,58235:32309,58236:32313,58237:32323,58238:32311,58240:32306,58241:32314,58242:32359,58243:32349,58244:32342,58245:32350,58246:32345,58247:32346,58248:32377,58249:32362,58250:32361,58251:32380,58252:32379,58253:32387,58254:32213,58255:32381,58256:36782,58257:32383,58258:32392,58259:32393,58260:32396,58261:32402,58262:32400,58263:32403,58264:32404,58265:32406,58266:32398,58267:32411,58268:32412,58269:32568,58270:32570,58271:32581,58272:32588,58273:32589,58274:32590,58275:32592,58276:32593,58277:32597,58278:32596,58279:32600,58280:32607,58281:32608,58282:32616,58283:32617,58284:32615,58285:32632,58286:32642,58287:32646,58288:32643,58289:32648,58290:32647,58291:32652,58292:32660,58293:32670,58294:32669,58295:32666,58296:32675,58297:32687,58298:32690,58299:32697,58300:32686,58301:32694,58302:32696,58303:35697,58304:32709,58305:32710,58306:32714,58307:32725,58308:32724,58309:32737,58310:32742,58311:32745,58312:32755,58313:32761,58314:39132,58315:32774,58316:32772,58317:32779,58318:32786,58319:32792,58320:32793,58321:32796,58322:32801,58323:32808,58324:32831,58325:32827,58326:32842,58327:32838,58328:32850,58329:32856,58330:32858,58331:32863,58332:32866,58333:32872,58334:32883,58335:32882,58336:32880,58337:32886,58338:32889,58339:32893,58340:32895,58341:32900,58342:32902,58343:32901,58344:32923,58345:32915,58346:32922,58347:32941,58348:20880,58349:32940,58350:32987,58351:32997,58352:32985,58353:32989,58354:32964,58355:32986,58356:32982,58357:33033,58358:33007,58359:33009,58360:33051,58361:33065,58362:33059,58363:33071,58364:33099,58432:38539,58433:33094,58434:33086,58435:33107,58436:33105,58437:33020,58438:33137,58439:33134,58440:33125,58441:33126,58442:33140,58443:33155,58444:33160,58445:33162,58446:33152,58447:33154,58448:33184,58449:33173,58450:33188,58451:33187,58452:33119,58453:33171,58454:33193,58455:33200,58456:33205,58457:33214,58458:33208,58459:33213,58460:33216,58461:33218,58462:33210,58463:33225,58464:33229,58465:33233,58466:33241,58467:33240,58468:33224,58469:33242,58470:33247,58471:33248,58472:33255,58473:33274,58474:33275,58475:33278,58476:33281,58477:33282,58478:33285,58479:33287,58480:33290,58481:33293,58482:33296,58483:33302,58484:33321,58485:33323,58486:33336,58487:33331,58488:33344,58489:33369,58490:33368,58491:33373,58492:33370,58493:33375,58494:33380,58496:33378,58497:33384,58498:33386,58499:33387,58500:33326,58501:33393,58502:33399,58503:33400,58504:33406,58505:33421,58506:33426,58507:33451,58508:33439,58509:33467,58510:33452,58511:33505,58512:33507,58513:33503,58514:33490,58515:33524,58516:33523,58517:33530,58518:33683,58519:33539,58520:33531,58521:33529,58522:33502,58523:33542,58524:33500,58525:33545,58526:33497,58527:33589,58528:33588,58529:33558,58530:33586,58531:33585,58532:33600,58533:33593,58534:33616,58535:33605,58536:33583,58537:33579,58538:33559,58539:33560,58540:33669,58541:33690,58542:33706,58543:33695,58544:33698,58545:33686,58546:33571,58547:33678,58548:33671,58549:33674,58550:33660,58551:33717,58552:33651,58553:33653,58554:33696,58555:33673,58556:33704,58557:33780,58558:33811,58559:33771,58560:33742,58561:33789,58562:33795,58563:33752,58564:33803,58565:33729,58566:33783,58567:33799,58568:33760,58569:33778,58570:33805,58571:33826,58572:33824,58573:33725,58574:33848,58575:34054,58576:33787,58577:33901,58578:33834,58579:33852,58580:34138,58581:33924,58582:33911,58583:33899,58584:33965,58585:33902,58586:33922,58587:33897,58588:33862,58589:33836,58590:33903,58591:33913,58592:33845,58593:33994,58594:33890,58595:33977,58596:33983,58597:33951,58598:34009,58599:33997,58600:33979,58601:34010,58602:34e3,58603:33985,58604:33990,58605:34006,58606:33953,58607:34081,58608:34047,58609:34036,58610:34071,58611:34072,58612:34092,58613:34079,58614:34069,58615:34068,58616:34044,58617:34112,58618:34147,58619:34136,58620:34120,58688:34113,58689:34306,58690:34123,58691:34133,58692:34176,58693:34212,58694:34184,58695:34193,58696:34186,58697:34216,58698:34157,58699:34196,58700:34203,58701:34282,58702:34183,58703:34204,58704:34167,58705:34174,58706:34192,58707:34249,58708:34234,58709:34255,58710:34233,58711:34256,58712:34261,58713:34269,58714:34277,58715:34268,58716:34297,58717:34314,58718:34323,58719:34315,58720:34302,58721:34298,58722:34310,58723:34338,58724:34330,58725:34352,58726:34367,58727:34381,58728:20053,58729:34388,58730:34399,58731:34407,58732:34417,58733:34451,58734:34467,58735:34473,58736:34474,58737:34443,58738:34444,58739:34486,58740:34479,58741:34500,58742:34502,58743:34480,58744:34505,58745:34851,58746:34475,58747:34516,58748:34526,58749:34537,58750:34540,58752:34527,58753:34523,58754:34543,58755:34578,58756:34566,58757:34568,58758:34560,58759:34563,58760:34555,58761:34577,58762:34569,58763:34573,58764:34553,58765:34570,58766:34612,58767:34623,58768:34615,58769:34619,58770:34597,58771:34601,58772:34586,58773:34656,58774:34655,58775:34680,58776:34636,58777:34638,58778:34676,58779:34647,58780:34664,58781:34670,58782:34649,58783:34643,58784:34659,58785:34666,58786:34821,58787:34722,58788:34719,58789:34690,58790:34735,58791:34763,58792:34749,58793:34752,58794:34768,58795:38614,58796:34731,58797:34756,58798:34739,58799:34759,58800:34758,58801:34747,58802:34799,58803:34802,58804:34784,58805:34831,58806:34829,58807:34814,58808:34806,58809:34807,58810:34830,58811:34770,58812:34833,58813:34838,58814:34837,58815:34850,58816:34849,58817:34865,58818:34870,58819:34873,58820:34855,58821:34875,58822:34884,58823:34882,58824:34898,58825:34905,58826:34910,58827:34914,58828:34923,58829:34945,58830:34942,58831:34974,58832:34933,58833:34941,58834:34997,58835:34930,58836:34946,58837:34967,58838:34962,58839:34990,58840:34969,58841:34978,58842:34957,58843:34980,58844:34992,58845:35007,58846:34993,58847:35011,58848:35012,58849:35028,58850:35032,58851:35033,58852:35037,58853:35065,58854:35074,58855:35068,58856:35060,58857:35048,58858:35058,58859:35076,58860:35084,58861:35082,58862:35091,58863:35139,58864:35102,58865:35109,58866:35114,58867:35115,58868:35137,58869:35140,58870:35131,58871:35126,58872:35128,58873:35148,58874:35101,58875:35168,58876:35166,58944:35174,58945:35172,58946:35181,58947:35178,58948:35183,58949:35188,58950:35191,58951:35198,58952:35203,58953:35208,58954:35210,58955:35219,58956:35224,58957:35233,58958:35241,58959:35238,58960:35244,58961:35247,58962:35250,58963:35258,58964:35261,58965:35263,58966:35264,58967:35290,58968:35292,58969:35293,58970:35303,58971:35316,58972:35320,58973:35331,58974:35350,58975:35344,58976:35340,58977:35355,58978:35357,58979:35365,58980:35382,58981:35393,58982:35419,58983:35410,58984:35398,58985:35400,58986:35452,58987:35437,58988:35436,58989:35426,58990:35461,58991:35458,58992:35460,58993:35496,58994:35489,58995:35473,58996:35493,58997:35494,58998:35482,58999:35491,59e3:35524,59001:35533,59002:35522,59003:35546,59004:35563,59005:35571,59006:35559,59008:35556,59009:35569,59010:35604,59011:35552,59012:35554,59013:35575,59014:35550,59015:35547,59016:35596,59017:35591,59018:35610,59019:35553,59020:35606,59021:35600,59022:35607,59023:35616,59024:35635,59025:38827,59026:35622,59027:35627,59028:35646,59029:35624,59030:35649,59031:35660,59032:35663,59033:35662,59034:35657,59035:35670,59036:35675,59037:35674,59038:35691,59039:35679,59040:35692,59041:35695,59042:35700,59043:35709,59044:35712,59045:35724,59046:35726,59047:35730,59048:35731,59049:35734,59050:35737,59051:35738,59052:35898,59053:35905,59054:35903,59055:35912,59056:35916,59057:35918,59058:35920,59059:35925,59060:35938,59061:35948,59062:35960,59063:35962,59064:35970,59065:35977,59066:35973,59067:35978,59068:35981,59069:35982,59070:35988,59071:35964,59072:35992,59073:25117,59074:36013,59075:36010,59076:36029,59077:36018,59078:36019,59079:36014,59080:36022,59081:36040,59082:36033,59083:36068,59084:36067,59085:36058,59086:36093,59087:36090,59088:36091,59089:36100,59090:36101,59091:36106,59092:36103,59093:36111,59094:36109,59095:36112,59096:40782,59097:36115,59098:36045,59099:36116,59100:36118,59101:36199,59102:36205,59103:36209,59104:36211,59105:36225,59106:36249,59107:36290,59108:36286,59109:36282,59110:36303,59111:36314,59112:36310,59113:36300,59114:36315,59115:36299,59116:36330,59117:36331,59118:36319,59119:36323,59120:36348,59121:36360,59122:36361,59123:36351,59124:36381,59125:36382,59126:36368,59127:36383,59128:36418,59129:36405,59130:36400,59131:36404,59132:36426,59200:36423,59201:36425,59202:36428,59203:36432,59204:36424,59205:36441,59206:36452,59207:36448,59208:36394,59209:36451,59210:36437,59211:36470,59212:36466,59213:36476,59214:36481,59215:36487,59216:36485,59217:36484,59218:36491,59219:36490,59220:36499,59221:36497,59222:36500,59223:36505,59224:36522,59225:36513,59226:36524,59227:36528,59228:36550,59229:36529,59230:36542,59231:36549,59232:36552,59233:36555,59234:36571,59235:36579,59236:36604,59237:36603,59238:36587,59239:36606,59240:36618,59241:36613,59242:36629,59243:36626,59244:36633,59245:36627,59246:36636,59247:36639,59248:36635,59249:36620,59250:36646,59251:36659,59252:36667,59253:36665,59254:36677,59255:36674,59256:36670,59257:36684,59258:36681,59259:36678,59260:36686,59261:36695,59262:36700,59264:36706,59265:36707,59266:36708,59267:36764,59268:36767,59269:36771,59270:36781,59271:36783,59272:36791,59273:36826,59274:36837,59275:36834,59276:36842,59277:36847,59278:36999,59279:36852,59280:36869,59281:36857,59282:36858,59283:36881,59284:36885,59285:36897,59286:36877,59287:36894,59288:36886,59289:36875,59290:36903,59291:36918,59292:36917,59293:36921,59294:36856,59295:36943,59296:36944,59297:36945,59298:36946,59299:36878,59300:36937,59301:36926,59302:36950,59303:36952,59304:36958,59305:36968,59306:36975,59307:36982,59308:38568,59309:36978,59310:36994,59311:36989,59312:36993,59313:36992,59314:37002,59315:37001,59316:37007,59317:37032,59318:37039,59319:37041,59320:37045,59321:37090,59322:37092,59323:25160,59324:37083,59325:37122,59326:37138,59327:37145,59328:37170,59329:37168,59330:37194,59331:37206,59332:37208,59333:37219,59334:37221,59335:37225,59336:37235,59337:37234,59338:37259,59339:37257,59340:37250,59341:37282,59342:37291,59343:37295,59344:37290,59345:37301,59346:37300,59347:37306,59348:37312,59349:37313,59350:37321,59351:37323,59352:37328,59353:37334,59354:37343,59355:37345,59356:37339,59357:37372,59358:37365,59359:37366,59360:37406,59361:37375,59362:37396,59363:37420,59364:37397,59365:37393,59366:37470,59367:37463,59368:37445,59369:37449,59370:37476,59371:37448,59372:37525,59373:37439,59374:37451,59375:37456,59376:37532,59377:37526,59378:37523,59379:37531,59380:37466,59381:37583,59382:37561,59383:37559,59384:37609,59385:37647,59386:37626,59387:37700,59388:37678,59456:37657,59457:37666,59458:37658,59459:37667,59460:37690,59461:37685,59462:37691,59463:37724,59464:37728,59465:37756,59466:37742,59467:37718,59468:37808,59469:37804,59470:37805,59471:37780,59472:37817,59473:37846,59474:37847,59475:37864,59476:37861,59477:37848,59478:37827,59479:37853,59480:37840,59481:37832,59482:37860,59483:37914,59484:37908,59485:37907,59486:37891,59487:37895,59488:37904,59489:37942,59490:37931,59491:37941,59492:37921,59493:37946,59494:37953,59495:37970,59496:37956,59497:37979,59498:37984,59499:37986,59500:37982,59501:37994,59502:37417,59503:38e3,59504:38005,59505:38007,59506:38013,59507:37978,59508:38012,59509:38014,59510:38017,59511:38015,59512:38274,59513:38279,59514:38282,59515:38292,59516:38294,59517:38296,59518:38297,59520:38304,59521:38312,59522:38311,59523:38317,59524:38332,59525:38331,59526:38329,59527:38334,59528:38346,59529:28662,59530:38339,59531:38349,59532:38348,59533:38357,59534:38356,59535:38358,59536:38364,59537:38369,59538:38373,59539:38370,59540:38433,59541:38440,59542:38446,59543:38447,59544:38466,59545:38476,59546:38479,59547:38475,59548:38519,59549:38492,59550:38494,59551:38493,59552:38495,59553:38502,59554:38514,59555:38508,59556:38541,59557:38552,59558:38549,59559:38551,59560:38570,59561:38567,59562:38577,59563:38578,59564:38576,59565:38580,59566:38582,59567:38584,59568:38585,59569:38606,59570:38603,59571:38601,59572:38605,59573:35149,59574:38620,59575:38669,59576:38613,59577:38649,59578:38660,59579:38662,59580:38664,59581:38675,59582:38670,59583:38673,59584:38671,59585:38678,59586:38681,59587:38692,59588:38698,59589:38704,59590:38713,59591:38717,59592:38718,59593:38724,59594:38726,59595:38728,59596:38722,59597:38729,59598:38748,59599:38752,59600:38756,59601:38758,59602:38760,59603:21202,59604:38763,59605:38769,59606:38777,59607:38789,59608:38780,59609:38785,59610:38778,59611:38790,59612:38795,59613:38799,59614:38800,59615:38812,59616:38824,59617:38822,59618:38819,59619:38835,59620:38836,59621:38851,59622:38854,59623:38856,59624:38859,59625:38876,59626:38893,59627:40783,59628:38898,59629:31455,59630:38902,59631:38901,59632:38927,59633:38924,59634:38968,59635:38948,59636:38945,59637:38967,59638:38973,59639:38982,59640:38991,59641:38987,59642:39019,59643:39023,59644:39024,59712:39025,59713:39028,59714:39027,59715:39082,59716:39087,59717:39089,59718:39094,59719:39108,59720:39107,59721:39110,59722:39145,59723:39147,59724:39171,59725:39177,59726:39186,59727:39188,59728:39192,59729:39201,59730:39197,59731:39198,59732:39204,59733:39200,59734:39212,59735:39214,59736:39229,59737:39230,59738:39234,59739:39241,59740:39237,59741:39248,59742:39243,59743:39249,59744:39250,59745:39244,59746:39253,59747:39319,59748:39320,59749:39333,59750:39341,59751:39342,59752:39356,59753:39391,59754:39387,59755:39389,59756:39384,59757:39377,59758:39405,59759:39406,59760:39409,59761:39410,59762:39419,59763:39416,59764:39425,59765:39439,59766:39429,59767:39394,59768:39449,59769:39467,59770:39479,59771:39493,59772:39490,59773:39488,59774:39491,59776:39486,59777:39509,59778:39501,59779:39515,59780:39511,59781:39519,59782:39522,59783:39525,59784:39524,59785:39529,59786:39531,59787:39530,59788:39597,59789:39600,59790:39612,59791:39616,59792:39631,59793:39633,59794:39635,59795:39636,59796:39646,59797:39647,59798:39650,59799:39651,59800:39654,59801:39663,59802:39659,59803:39662,59804:39668,59805:39665,59806:39671,59807:39675,59808:39686,59809:39704,59810:39706,59811:39711,59812:39714,59813:39715,59814:39717,59815:39719,59816:39720,59817:39721,59818:39722,59819:39726,59820:39727,59821:39730,59822:39748,59823:39747,59824:39759,59825:39757,59826:39758,59827:39761,59828:39768,59829:39796,59830:39827,59831:39811,59832:39825,59833:39830,59834:39831,59835:39839,59836:39840,59837:39848,59838:39860,59839:39872,59840:39882,59841:39865,59842:39878,59843:39887,59844:39889,59845:39890,59846:39907,59847:39906,59848:39908,59849:39892,59850:39905,59851:39994,59852:39922,59853:39921,59854:39920,59855:39957,59856:39956,59857:39945,59858:39955,59859:39948,59860:39942,59861:39944,59862:39954,59863:39946,59864:39940,59865:39982,59866:39963,59867:39973,59868:39972,59869:39969,59870:39984,59871:40007,59872:39986,59873:40006,59874:39998,59875:40026,59876:40032,59877:40039,59878:40054,59879:40056,59880:40167,59881:40172,59882:40176,59883:40201,59884:40200,59885:40171,59886:40195,59887:40198,59888:40234,59889:40230,59890:40367,59891:40227,59892:40223,59893:40260,59894:40213,59895:40210,59896:40257,59897:40255,59898:40254,59899:40262,59900:40264,59968:40285,59969:40286,59970:40292,59971:40273,59972:40272,59973:40281,59974:40306,59975:40329,59976:40327,59977:40363,59978:40303,59979:40314,59980:40346,59981:40356,59982:40361,59983:40370,59984:40388,59985:40385,59986:40379,59987:40376,59988:40378,59989:40390,59990:40399,59991:40386,59992:40409,59993:40403,59994:40440,59995:40422,59996:40429,59997:40431,59998:40445,59999:40474,6e4:40475,60001:40478,60002:40565,60003:40569,60004:40573,60005:40577,60006:40584,60007:40587,60008:40588,60009:40594,60010:40597,60011:40593,60012:40605,60013:40613,60014:40617,60015:40632,60016:40618,60017:40621,60018:38753,60019:40652,60020:40654,60021:40655,60022:40656,60023:40660,60024:40668,60025:40670,60026:40669,60027:40672,60028:40677,60029:40680,60030:40687,60032:40692,60033:40694,60034:40695,60035:40697,60036:40699,60037:40700,60038:40701,60039:40711,60040:40712,60041:30391,60042:40725,60043:40737,60044:40748,60045:40766,60046:40778,60047:40786,60048:40788,60049:40803,60050:40799,60051:40800,60052:40801,60053:40806,60054:40807,60055:40812,60056:40810,60057:40823,60058:40818,60059:40822,60060:40853,60061:40860,60062:40864,60063:22575,60064:27079,60065:36953,60066:29796,60067:20956,60068:29081}},function(o,e,r){"use strict";function t(o,e,r,t){e.degree()<r.degree()&&(w=[r,e],e=w[0],r=w[1]);for(var c=e,s=r,a=o.zero,n=o.one;s.degree()>=t/2;){var d=c,l=a;if(c=s,a=n,c.isZero())return null;s=d;for(var i=o.zero,B=c.getCoefficient(c.degree()),k=o.inverse(B);s.degree()>=c.degree()&&!s.isZero();){var u=s.degree()-c.degree(),C=o.multiply(s.getCoefficient(s.degree()),k);i=i.addOrSubtract(o.buildMonomial(u,C)),s=s.addOrSubtract(c.multiplyByMonomial(u,C))}if(n=i.multiplyPoly(a).addOrSubtract(l),s.degree()>=c.degree())return null}var m=n.getCoefficient(0);if(0===m)return null;var f=o.inverse(m);return[n.multiply(f),s.multiply(f)];var w}function c(o,e){var r=e.degree();if(1===r)return[e.getCoefficient(1)];for(var t=new Array(r),c=0,s=1;s<o.size&&c<r;s++)0===e.evaluateAt(s)&&(t[c]=o.inverse(s),c++);return c!==r?null:t}function s(o,e,r){for(var t=r.length,c=new Array(t),s=0;s<t;s++){for(var a=o.inverse(r[s]),d=1,l=0;l<t;l++)s!==l&&(d=o.multiply(d,n.addOrSubtractGF(1,o.multiply(r[l],a))));c[s]=o.multiply(e.evaluateAt(a),o.inverse(d)),0!==o.generatorBase&&(c[s]=o.multiply(c[s],a))}return c}function a(o,e){var r=new Uint8ClampedArray(o.length);r.set(o);for(var a=new n.default(285,256,0),l=new d.default(a,r),i=new Uint8ClampedArray(e),B=!1,k=0;k<e;k++){var u=l.evaluateAt(a.exp(k+a.generatorBase));i[i.length-1-k]=u,0!==u&&(B=!0)}if(!B)return r;var C=new d.default(a,i),m=t(a,a.buildMonomial(e,1),C,e);if(null===m)return null;var f=c(a,m[0]);if(null==f)return null;for(var w=s(a,m[1],f),P=0;P<f.length;P++){var v=r.length-1-a.log(f[P]);if(v<0)return null;r[v]=n.addOrSubtractGF(r[v],w[P])}return r}Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),d=r(2);e.decode=a},function(o,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VERSIONS=[{infoBits:null,versionNumber:1,alignmentPatternCenters:[],errorCorrectionLevels:[{ecCodewordsPerBlock:7,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:13,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:13}]},{ecCodewordsPerBlock:17,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:9}]}]},{infoBits:null,versionNumber:2,alignmentPatternCenters:[6,18],errorCorrectionLevels:[{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:34}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:28}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]}]},{infoBits:null,versionNumber:3,alignmentPatternCenters:[6,22],errorCorrectionLevels:[{ecCodewordsPerBlock:15,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:55}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:13}]}]},{infoBits:null,versionNumber:4,alignmentPatternCenters:[6,26],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:80}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:32}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:9}]}]},{infoBits:null,versionNumber:5,alignmentPatternCenters:[6,30],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:43}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:11},{numBlocks:2,dataCodewordsPerBlock:12}]}]},{infoBits:null,versionNumber:6,alignmentPatternCenters:[6,34],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:27}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:31892,versionNumber:7,alignmentPatternCenters:[6,22,38],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:78}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:31}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:13},{numBlocks:1,dataCodewordsPerBlock:14}]}]},{infoBits:34236,versionNumber:8,alignmentPatternCenters:[6,24,42],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:97}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:38},{numBlocks:2,dataCodewordsPerBlock:39}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:18},{numBlocks:2,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:14},{numBlocks:2,dataCodewordsPerBlock:15}]}]},{infoBits:39577,versionNumber:9,alignmentPatternCenters:[6,26,46],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:36},{numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:12},{numBlocks:4,dataCodewordsPerBlock:13}]}]},{infoBits:42195,versionNumber:10,alignmentPatternCenters:[6,28,50],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68},{numBlocks:2,dataCodewordsPerBlock:69}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:43},{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]}]},{infoBits:48118,versionNumber:11,alignmentPatternCenters:[6,30,54],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:81}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:50},{numBlocks:4,dataCodewordsPerBlock:51}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:22},{numBlocks:4,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:12},{numBlocks:8,dataCodewordsPerBlock:13}]}]},{infoBits:51042,versionNumber:12,alignmentPatternCenters:[6,32,58],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:92},{numBlocks:2,dataCodewordsPerBlock:93}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:36},{numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:20},{numBlocks:6,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:55367,versionNumber:13,alignmentPatternCenters:[6,34,62],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:107}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:37},{numBlocks:1,dataCodewordsPerBlock:38}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:20},{numBlocks:4,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:11},{numBlocks:4,dataCodewordsPerBlock:12}]}]},{infoBits:58893,versionNumber:14,alignmentPatternCenters:[6,26,46,66],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:115},{numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:40},{numBlocks:5,dataCodewordsPerBlock:41}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:16},{numBlocks:5,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:5,dataCodewordsPerBlock:13}]}]},{infoBits:63784,versionNumber:15,alignmentPatternCenters:[6,26,48,70],errorCorrectionLevels:[{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:87},{numBlocks:1,dataCodewordsPerBlock:88}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:41},{numBlocks:5,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:7,dataCodewordsPerBlock:13}]}]},{infoBits:68472,versionNumber:16,alignmentPatternCenters:[6,26,50,74],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:98},{numBlocks:1,dataCodewordsPerBlock:99}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:70749,versionNumber:17,alignmentPatternCenters:[6,30,54,78],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:1,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22},{numBlocks:15,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:17,dataCodewordsPerBlock:15}]}]},{infoBits:76311,versionNumber:18,alignmentPatternCenters:[6,30,56,82],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:120},{numBlocks:1,dataCodewordsPerBlock:121}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:43},{numBlocks:4,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},{numBlocks:1,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:19,dataCodewordsPerBlock:15}]}]},{infoBits:79154,versionNumber:19,alignmentPatternCenters:[6,30,58,86],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:113},{numBlocks:4,dataCodewordsPerBlock:114}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:44},{numBlocks:11,dataCodewordsPerBlock:45}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:21},{numBlocks:4,dataCodewordsPerBlock:22}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:13},{numBlocks:16,dataCodewordsPerBlock:14}]}]},{infoBits:84390,versionNumber:20,alignmentPatternCenters:[6,34,62,90],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:41},{numBlocks:13,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},{numBlocks:5,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:15},{numBlocks:10,dataCodewordsPerBlock:16}]}]},{infoBits:87683,versionNumber:21,alignmentPatternCenters:[6,28,50,72,94],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:116},{numBlocks:4,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},{numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:16},{numBlocks:6,dataCodewordsPerBlock:17}]}]},{infoBits:92361,versionNumber:22,alignmentPatternCenters:[6,26,50,74,98],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:111},{numBlocks:7,dataCodewordsPerBlock:112}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},{numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:13}]}]},{infoBits:96236,versionNumber:23,alignmentPatternCenters:[6,30,54,74,102],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:121},{numBlocks:5,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:47},{numBlocks:14,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:16,dataCodewordsPerBlock:15},{numBlocks:14,dataCodewordsPerBlock:16}]}]},{infoBits:102084,versionNumber:24,alignmentPatternCenters:[6,28,54,80,106],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:45},{numBlocks:14,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},{numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:30,dataCodewordsPerBlock:16},{numBlocks:2,dataCodewordsPerBlock:17}]}]},{infoBits:102881,versionNumber:25,alignmentPatternCenters:[6,32,58,84,110],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:106},{numBlocks:4,dataCodewordsPerBlock:107}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:47},{numBlocks:13,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:110507,versionNumber:26,alignmentPatternCenters:[6,30,58,86,114],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:114},{numBlocks:2,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:46},{numBlocks:4,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:28,dataCodewordsPerBlock:22},{numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:33,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]}]},{infoBits:110734,versionNumber:27,alignmentPatternCenters:[6,34,62,90,118],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:23},{numBlocks:26,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:15},{numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:117786,versionNumber:28,alignmentPatternCenters:[6,26,50,74,98,122],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:117},{numBlocks:10,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:45},{numBlocks:23,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:24},{numBlocks:31,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:31,dataCodewordsPerBlock:16}]}]},{infoBits:119615,versionNumber:29,alignmentPatternCenters:[6,30,54,78,102,126],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:116},{numBlocks:7,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:21,dataCodewordsPerBlock:45},{numBlocks:7,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:23},{numBlocks:37,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:15},{numBlocks:26,dataCodewordsPerBlock:16}]}]},{infoBits:126325,versionNumber:30,alignmentPatternCenters:[6,26,52,78,104,130],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:115},{numBlocks:10,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:47},{numBlocks:10,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},{numBlocks:25,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},{numBlocks:25,dataCodewordsPerBlock:16}]}]},{infoBits:127568,versionNumber:31,alignmentPatternCenters:[6,30,56,82,108,134],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:3,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:46},{numBlocks:29,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:24},{numBlocks:1,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},{numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:133589,versionNumber:32,alignmentPatternCenters:[6,34,60,86,112,138],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:24},{numBlocks:35,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:15},{numBlocks:35,dataCodewordsPerBlock:16}]}]},{infoBits:136944,versionNumber:33,alignmentPatternCenters:[6,30,58,86,114,142],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115},{numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:21,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:24},{numBlocks:19,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:141498,versionNumber:34,alignmentPatternCenters:[6,34,62,90,118,146],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:6,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:44,dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:59,dataCodewordsPerBlock:16},{numBlocks:1,dataCodewordsPerBlock:17}]}]},{infoBits:145311,versionNumber:35,alignmentPatternCenters:[6,30,54,78,102,126,150],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:121},{numBlocks:7,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:47},{numBlocks:26,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:39,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:41,dataCodewordsPerBlock:16}]}]},{infoBits:150283,versionNumber:36,alignmentPatternCenters:[6,24,50,76,102,128,154],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:121},{numBlocks:14,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:47},{numBlocks:34,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:46,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:64,dataCodewordsPerBlock:16}]}]},{infoBits:152622,versionNumber:37,alignmentPatternCenters:[6,28,54,80,106,132,158],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:46},{numBlocks:14,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:49,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:24,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:158308,versionNumber:38,alignmentPatternCenters:[6,32,58,84,110,136,162],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:122},{numBlocks:18,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:46},{numBlocks:32,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:48,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:15},{numBlocks:32,dataCodewordsPerBlock:16}]}]},{infoBits:161089,versionNumber:39,alignmentPatternCenters:[6,26,54,82,110,138,166],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:40,dataCodewordsPerBlock:47},{numBlocks:7,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:43,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:15},{numBlocks:67,dataCodewordsPerBlock:16}]}]},{infoBits:167017,versionNumber:40,alignmentPatternCenters:[6,30,58,86,114,142,170],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:118},{numBlocks:6,dataCodewordsPerBlock:119}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:18,dataCodewordsPerBlock:47},{numBlocks:31,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:24},{numBlocks:34,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:15},{numBlocks:61,dataCodewordsPerBlock:16}]}]}]},function(o,e,r){"use strict";function t(o,e,r,t){var c=o.x-e.x+r.x-t.x,s=o.y-e.y+r.y-t.y;if(0===c&&0===s)return{a11:e.x-o.x,a12:e.y-o.y,a13:0,a21:r.x-e.x,a22:r.y-e.y,a23:0,a31:o.x,a32:o.y,a33:1};var a=e.x-r.x,n=t.x-r.x,d=e.y-r.y,l=t.y-r.y,i=a*l-n*d,B=(c*l-n*s)/i,k=(a*s-c*d)/i;return{a11:e.x-o.x+B*e.x,a12:e.y-o.y+B*e.y,a13:B,a21:t.x-o.x+k*t.x,a22:t.y-o.y+k*t.y,a23:k,a31:o.x,a32:o.y,a33:1}}function c(o,e,r,c){var s=t(o,e,r,c);return{a11:s.a22*s.a33-s.a23*s.a32,a12:s.a13*s.a32-s.a12*s.a33,a13:s.a12*s.a23-s.a13*s.a22,a21:s.a23*s.a31-s.a21*s.a33,a22:s.a11*s.a33-s.a13*s.a31,a23:s.a13*s.a21-s.a11*s.a23,a31:s.a21*s.a32-s.a22*s.a31,a32:s.a12*s.a31-s.a11*s.a32,a33:s.a11*s.a22-s.a12*s.a21}}function s(o,e){return{a11:o.a11*e.a11+o.a21*e.a12+o.a31*e.a13,a12:o.a12*e.a11+o.a22*e.a12+o.a32*e.a13,a13:o.a13*e.a11+o.a23*e.a12+o.a33*e.a13,a21:o.a11*e.a21+o.a21*e.a22+o.a31*e.a23,a22:o.a12*e.a21+o.a22*e.a22+o.a32*e.a23,a23:o.a13*e.a21+o.a23*e.a22+o.a33*e.a23,a31:o.a11*e.a31+o.a21*e.a32+o.a31*e.a33,a32:o.a12*e.a31+o.a22*e.a32+o.a32*e.a33,a33:o.a13*e.a31+o.a23*e.a32+o.a33*e.a33}}function a(o,e){for(var r=c({x:3.5,y:3.5},{x:e.dimension-3.5,y:3.5},{x:e.dimension-6.5,y:e.dimension-6.5},{x:3.5,y:e.dimension-3.5}),a=t(e.topLeft,e.topRight,e.alignmentPattern,e.bottomLeft),d=s(a,r),l=n.BitMatrix.createEmpty(e.dimension,e.dimension),i=function(o,e){var r=d.a13*o+d.a23*e+d.a33;return{x:(d.a11*o+d.a21*e+d.a31)/r,y:(d.a12*o+d.a22*e+d.a32)/r}},B=0;B<e.dimension;B++)for(var k=0;k<e.dimension;k++){var u=k+.5,C=B+.5,m=i(u,C);l.set(k,B,o.get(Math.floor(m.x),Math.floor(m.y)))}return{matrix:l,mappingFunction:i}}Object.defineProperty(e,"__esModule",{value:!0});var n=r(0);e.extract=a},function(o,e,r){"use strict";function t(o){return o.reduce(function(o,e){return o+e})}function c(o,e,r){var t,c,s,a=C(o,e),n=C(e,r),d=C(o,r);return n>=a&&n>=d?(l=[e,o,r],t=l[0],c=l[1],s=l[2]):d>=n&&d>=a?(i=[o,e,r],t=i[0],c=i[1],s=i[2]):(B=[o,r,e],t=B[0],c=B[1],s=B[2]),(s.x-c.x)*(t.y-c.y)-(s.y-c.y)*(t.x-c.x)<0&&(k=[s,t],t=k[0],s=k[1]),{bottomLeft:t,topLeft:c,topRight:s};var l,i,B,k}function s(o,e,r,c){var s=(t(n(o,r,c,5))/7+t(n(o,e,c,5))/7+t(n(r,o,c,5))/7+t(n(e,o,c,5))/7)/4;if(s<1)throw new Error("Invalid module size");var a=Math.round(C(o,e)/s),d=Math.round(C(o,r)/s),l=Math.floor((a+d)/2)+7;switch(l%4){case 0:l++;break;case 2:l--}return{dimension:l,moduleSize:s}}function a(o,e,r,t){var c,s,a,n,d=[{x:Math.floor(o.x),y:Math.floor(o.y)}],l=Math.abs(e.y-o.y)>Math.abs(e.x-o.x);l?(c=Math.floor(o.y),s=Math.floor(o.x),a=Math.floor(e.y),n=Math.floor(e.x)):(c=Math.floor(o.x),s=Math.floor(o.y),a=Math.floor(e.x),n=Math.floor(e.y));for(var i=Math.abs(a-c),B=Math.abs(n-s),k=Math.floor(-i/2),u=c<a?1:-1,m=s<n?1:-1,f=!0,w=c,P=s;w!==a+u;w+=u){var v=l?P:w,h=l?w:P;if(r.get(v,h)!==f&&(f=!f,d.push({x:v,y:h}),d.length===t+1))break;if((k+=B)>0){if(P===n)break;P+=m,k-=i}}for(var p=[],b=0;b<t;b++)d[b]&&d[b+1]?p.push(C(d[b],d[b+1])):p.push(0);return p}function n(o,e,r,t){var c=e.y-o.y,s=e.x-o.x,n=a(o,e,r,Math.ceil(t/2)),d=a(o,{x:o.x-s,y:o.y-c},r,Math.ceil(t/2)),l=n.shift()+d.shift()-1;return(i=d.concat(l)).concat.apply(i,n);var i}function d(o,e){var r=t(o)/t(e),c=0;return e.forEach(function(e,t){c+=Math.pow(o[t]-e*r,2)}),{averageSize:r,error:c}}function l(o,e,r){try{var t=n(o,{x:-1,y:o.y},r,e.length),c=n(o,{x:o.x,y:-1},r,e.length),s={x:Math.max(0,o.x-o.y)-1,y:Math.max(0,o.y-o.x)-1},a=n(o,s,r,e.length),l={x:Math.min(r.width,o.x+o.y)+1,y:Math.min(r.height,o.y+o.x)+1},i=n(o,l,r,e.length),B=d(t,e),k=d(c,e),u=d(a,e),C=d(i,e),m=Math.sqrt(B.error*B.error+k.error*k.error+u.error*u.error+C.error*C.error),f=(B.averageSize+k.averageSize+u.averageSize+C.averageSize)/4;return m+(Math.pow(B.averageSize-f,2)+Math.pow(k.averageSize-f,2)+Math.pow(u.averageSize-f,2)+Math.pow(C.averageSize-f,2))/f}catch(o){return 1/0}}function i(o){for(var e=[],r=[],a=[],n=[],d=0;d<=o.height;d++)!function(c){for(var s=0,d=!1,l=[0,0,0,0,0],i=-1;i<=o.width;i++)!function(e){var a=o.get(e,c);if(a===d)s++;else{l=[l[1],l[2],l[3],l[4],s],s=1,d=a;var i=t(l)/7,B=Math.abs(l[0]-i)<i&&Math.abs(l[1]-i)<i&&Math.abs(l[2]-3*i)<3*i&&Math.abs(l[3]-i)<i&&Math.abs(l[4]-i)<i&&!a,C=t(l.slice(-3))/3,m=Math.abs(l[2]-C)<C&&Math.abs(l[3]-C)<C&&Math.abs(l[4]-C)<C&&a;if(B){var f=e-l[3]-l[4],w=f-l[2],P={startX:w,endX:f,y:c},v=r.filter(function(o){return w>=o.bottom.startX&&w<=o.bottom.endX||f>=o.bottom.startX&&w<=o.bottom.endX||w<=o.bottom.startX&&f>=o.bottom.endX&&l[2]/(o.bottom.endX-o.bottom.startX)<u&&l[2]/(o.bottom.endX-o.bottom.startX)>k});v.length>0?v[0].bottom=P:r.push({top:P,bottom:P})}if(m){var h=e-l[4],p=h-l[3],P={startX:p,y:c,endX:h},v=n.filter(function(o){return p>=o.bottom.startX&&p<=o.bottom.endX||h>=o.bottom.startX&&p<=o.bottom.endX||p<=o.bottom.startX&&h>=o.bottom.endX&&l[2]/(o.bottom.endX-o.bottom.startX)<u&&l[2]/(o.bottom.endX-o.bottom.startX)>k});v.length>0?v[0].bottom=P:n.push({top:P,bottom:P})}}}(i);e.push.apply(e,r.filter(function(o){return o.bottom.y!==c&&o.bottom.y-o.top.y>=2})),r=r.filter(function(o){return o.bottom.y===c}),a.push.apply(a,n.filter(function(o){return o.bottom.y!==c})),n=n.filter(function(o){return o.bottom.y===c})}(d);e.push.apply(e,r.filter(function(o){return o.bottom.y-o.top.y>=2})),a.push.apply(a,n);var i=e.filter(function(o){return o.bottom.y-o.top.y>=2}).map(function(e){var r=(e.top.startX+e.top.endX+e.bottom.startX+e.bottom.endX)/4,c=(e.top.y+e.bottom.y+1)/2;if(o.get(Math.round(r),Math.round(c))){var s=[e.top.endX-e.top.startX,e.bottom.endX-e.bottom.startX,e.bottom.y-e.top.y+1],a=t(s)/s.length;return{score:l({x:Math.round(r),y:Math.round(c)},[1,1,3,1,1],o),x:r,y:c,size:a}}}).filter(function(o){return!!o}).sort(function(o,e){return o.score-e.score}).map(function(o,e,r){if(e>B)return null;var t=r.filter(function(o,r){return e!==r}).map(function(e){return{x:e.x,y:e.y,score:e.score+Math.pow(e.size-o.size,2)/o.size,size:e.size}}).sort(function(o,e){return o.score-e.score});if(t.length<2)return null;var c=o.score+t[0].score+t[1].score;return{points:[o].concat(t.slice(0,2)),score:c}}).filter(function(o){return!!o}).sort(function(o,e){return o.score-e.score});if(0===i.length)return null;var m,f,w=c(i[0].points[0],i[0].points[1],i[0].points[2]),P=w.topRight,v=w.topLeft,h=w.bottomLeft;try{L=s(v,P,h,o),m=L.dimension,f=L.moduleSize}catch(o){return null}var p={x:P.x-v.x+h.x,y:P.y-v.y+h.y},b=(C(v,h)+C(v,P))/2/f,y=1-3/b,g={x:v.x+y*(p.x-v.x),y:v.y+y*(p.y-v.y)},x=a.map(function(e){var r=(e.top.startX+e.top.endX+e.bottom.startX+e.bottom.endX)/4,c=(e.top.y+e.bottom.y+1)/2;if(o.get(Math.floor(r),Math.floor(c))){var s=[e.top.endX-e.top.startX,e.bottom.endX-e.bottom.startX,e.bottom.y-e.top.y+1];t(s);return{x:r,y:c,score:l({x:Math.floor(r),y:Math.floor(c)},[1,1,1],o)+C({x:r,y:c},g)}}}).filter(function(o){return!!o}).sort(function(o,e){return o.score-e.score}),M=b>=15&&x.length?x[0]:g;return{alignmentPattern:{x:M.x,y:M.y},bottomLeft:{x:h.x,y:h.y},dimension:m,topLeft:{x:v.x,y:v.y},topRight:{x:P.x,y:P.y}};var L}Object.defineProperty(e,"__esModule",{value:!0});var B=4,k=.5,u=1.5,C=function(o,e){return Math.sqrt(Math.pow(e.x-o.x,2)+Math.pow(e.y-o.y,2))};e.locate=i}]).default})}]);',null)}},function(t,e,n){"use strict";var r=window.URL||window.webkitURL;t.exports=function(t,e){try{try{var n;try{(n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder)).append(t),n=n.getBlob()}catch(e){n=new Blob([t])}return new Worker(r.createObjectURL(n))}catch(e){return new Worker("data:application/javascript,"+encodeURIComponent(t))}}catch(t){if(!e)throw Error("Inline worker is not supported");return new Worker(e)}}},function(t,e,n){"use strict";e.a=function(t){var e=t.color;return function(t,n){var r=t.topLeftCorner,i=t.topRightCorner,a=t.bottomLeftCorner,o=t.bottomRightCorner;n.strokeStyle=e,n.beginPath(),n.moveTo(r.x,r.y),n.lineTo(a.x,a.y),n.lineTo(o.x,o.y),n.lineTo(i.x,i.y),n.lineTo(r.x,r.y),n.closePath(),n.stroke()}}},function(t,e,n){"use strict";var r=n(11),i=n.n(r),a=n(12),o=n.n(a),s=n(62),c=n.n(s),u=n(99),l=n.n(u),d=n(103),f=n.n(d),h=n(63),p=n(42),m=n(38),v=function(){function t(e,n){c()(this,t),this.videoEl=e,this.stream=n}return l()(t,[{key:"stop",value:function(){this.stream.getTracks().forEach(function(t){return t.stop()})}},{key:"captureFrame",value:function(){return Object(p.c)(this.videoEl)}}]),t}(),_=!0!==window.isSecureContext,g=!(navigator&&(navigator.getUserMedia||navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)),b=!1;e.a=function(){var t=o()(i.a.mark(function t(e,n){var r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!_){t.next=2;break}throw new h.c;case 2:if(!g){t.next=4;break}throw new h.d;case 4:return!1===b&&(f()({window:window}),b=!0),t.next=7,navigator.mediaDevices.getUserMedia(e);case 7:return r=t.sent,void 0!==n.srcObject?n.srcObject=r:void 0!==n.mozSrcObject?n.mozSrcObject=r:window.URL.createObjectURL?n.src=window.URL.createObjectURL(r):window.webkitURL?n.src=window.webkitURL.createObjectURL(r):n.src=r,t.next=11,Object(m.a)(n,"loadeddata");case 11:return t.abrupt("return",new v(n,r));case 12:case"end":return t.stop()}},t,this)}));return function(e,n){return t.apply(this,arguments)}}()},function(t,e,n){"use strict";e.__esModule=!0;var r=function(t){return t&&t.__esModule?t:{default:t}}(n(100));e.default=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,r.default)(t,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}()},function(t,e,n){t.exports={default:n(101),__esModule:!0}},function(t,e,n){n(102);var r=n(0).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},function(t,e,n){var r=n(3);r(r.S+r.F*!n(8),"Object",{defineProperty:n(4).f})},function(t,e,n){"use strict";var r=n(6);t.exports=function(t,e){var i=t&&t.window,a={shimChrome:!0,shimFirefox:!0,shimEdge:!0,shimSafari:!0};for(var o in e)hasOwnProperty.call(e,o)&&(a[o]=e[o]);var s=r.log,c=r.detectBrowser(i),u=n(104)||null,l=n(106)||null,d=n(111)||null,f=n(113)||null,h=n(114)||null,p={browserDetails:c,commonShim:h,extractVersion:r.extractVersion,disableLog:r.disableLog,disableWarnings:r.disableWarnings};switch(c.browser){case"chrome":if(!u||!u.shimPeerConnection||!a.shimChrome)return s("Chrome shim is not included in this adapter release."),p;s("adapter.js shimming chrome."),p.browserShim=u,h.shimCreateObjectURL(i),u.shimGetUserMedia(i),u.shimMediaStream(i),u.shimSourceObject(i),u.shimPeerConnection(i),u.shimOnTrack(i),u.shimAddTrackRemoveTrack(i),u.shimGetSendersWithDtmf(i),u.shimSenderReceiverGetStats(i),u.fixNegotiationNeeded(i),h.shimRTCIceCandidate(i),h.shimMaxMessageSize(i),h.shimSendThrowTypeError(i);break;case"firefox":if(!d||!d.shimPeerConnection||!a.shimFirefox)return s("Firefox shim is not included in this adapter release."),p;s("adapter.js shimming firefox."),p.browserShim=d,h.shimCreateObjectURL(i),d.shimGetUserMedia(i),d.shimSourceObject(i),d.shimPeerConnection(i),d.shimOnTrack(i),d.shimRemoveStream(i),d.shimSenderGetStats(i),d.shimReceiverGetStats(i),d.shimRTCDataChannel(i),h.shimRTCIceCandidate(i),h.shimMaxMessageSize(i),h.shimSendThrowTypeError(i);break;case"edge":if(!l||!l.shimPeerConnection||!a.shimEdge)return s("MS edge shim is not included in this adapter release."),p;s("adapter.js shimming edge."),p.browserShim=l,h.shimCreateObjectURL(i),l.shimGetUserMedia(i),l.shimPeerConnection(i),l.shimReplaceTrack(i),l.shimGetDisplayMedia(i),h.shimMaxMessageSize(i),h.shimSendThrowTypeError(i);break;case"safari":if(!f||!a.shimSafari)return s("Safari shim is not included in this adapter release."),p;s("adapter.js shimming safari."),p.browserShim=f,h.shimCreateObjectURL(i),f.shimRTCIceServerUrls(i),f.shimCreateOfferLegacy(i),f.shimCallbacksAPI(i),f.shimLocalStreamsAPI(i),f.shimRemoteStreamsAPI(i),f.shimTrackEventTransceiver(i),f.shimGetUserMedia(i),h.shimRTCIceCandidate(i),h.shimMaxMessageSize(i),h.shimSendThrowTypeError(i);break;default:s("Unsupported browser!")}return p}},function(t,e,n){"use strict";function r(t,e,n){var r=n?"outbound-rtp":"inbound-rtp",i=new Map;if(null===e)return i;var a=[];return t.forEach(function(t){"track"===t.type&&t.trackIdentifier===e.id&&a.push(t)}),a.forEach(function(e){t.forEach(function(n){n.type===r&&n.trackId===e.id&&function t(e,n,r){n&&!r.has(n.id)&&(r.set(n.id,n),Object.keys(n).forEach(function(i){i.endsWith("Id")?t(e,e.get(n[i]),r):i.endsWith("Ids")&&n[i].forEach(function(n){t(e,e.get(n),r)})}))}(t,n,i)})}),i}var i=n(6),a=i.log;t.exports={shimGetUserMedia:n(105),shimMediaStream:function(t){t.MediaStream=t.MediaStream||t.webkitMediaStream},shimOnTrack:function(t){if("object"!=typeof t||!t.RTCPeerConnection||"ontrack"in t.RTCPeerConnection.prototype)i.wrapPeerConnectionEvent(t,"track",function(t){return t.transceiver||Object.defineProperty(t,"transceiver",{value:{receiver:t.receiver}}),t});else{Object.defineProperty(t.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(t){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=t)},enumerable:!0,configurable:!0});var e=t.RTCPeerConnection.prototype.setRemoteDescription;t.RTCPeerConnection.prototype.setRemoteDescription=function(){var n=this;return n._ontrackpoly||(n._ontrackpoly=function(e){e.stream.addEventListener("addtrack",function(r){var i;i=t.RTCPeerConnection.prototype.getReceivers?n.getReceivers().find(function(t){return t.track&&t.track.id===r.track.id}):{track:r.track};var a=new Event("track");a.track=r.track,a.receiver=i,a.transceiver={receiver:i},a.streams=[e.stream],n.dispatchEvent(a)}),e.stream.getTracks().forEach(function(r){var i;i=t.RTCPeerConnection.prototype.getReceivers?n.getReceivers().find(function(t){return t.track&&t.track.id===r.id}):{track:r};var a=new Event("track");a.track=r,a.receiver=i,a.transceiver={receiver:i},a.streams=[e.stream],n.dispatchEvent(a)})},n.addEventListener("addstream",n._ontrackpoly)),e.apply(n,arguments)}}},shimGetSendersWithDtmf:function(t){if("object"==typeof t&&t.RTCPeerConnection&&!("getSenders"in t.RTCPeerConnection.prototype)&&"createDTMFSender"in t.RTCPeerConnection.prototype){var e=function(t,e){return{track:e,get dtmf(){return void 0===this._dtmf&&("audio"===e.kind?this._dtmf=t.createDTMFSender(e):this._dtmf=null),this._dtmf},_pc:t}};if(!t.RTCPeerConnection.prototype.getSenders){t.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};var n=t.RTCPeerConnection.prototype.addTrack;t.RTCPeerConnection.prototype.addTrack=function(t,r){var i=this,a=n.apply(i,arguments);return a||(a=e(i,t),i._senders.push(a)),a};var r=t.RTCPeerConnection.prototype.removeTrack;t.RTCPeerConnection.prototype.removeTrack=function(t){var e=this;r.apply(e,arguments);var n=e._senders.indexOf(t);-1!==n&&e._senders.splice(n,1)}}var i=t.RTCPeerConnection.prototype.addStream;t.RTCPeerConnection.prototype.addStream=function(t){var n=this;n._senders=n._senders||[],i.apply(n,[t]),t.getTracks().forEach(function(t){n._senders.push(e(n,t))})};var a=t.RTCPeerConnection.prototype.removeStream;t.RTCPeerConnection.prototype.removeStream=function(t){var e=this;e._senders=e._senders||[],a.apply(e,[t]),t.getTracks().forEach(function(t){var n=e._senders.find(function(e){return e.track===t});n&&e._senders.splice(e._senders.indexOf(n),1)})}}else if("object"==typeof t&&t.RTCPeerConnection&&"getSenders"in t.RTCPeerConnection.prototype&&"createDTMFSender"in t.RTCPeerConnection.prototype&&t.RTCRtpSender&&!("dtmf"in t.RTCRtpSender.prototype)){var o=t.RTCPeerConnection.prototype.getSenders;t.RTCPeerConnection.prototype.getSenders=function(){var t=this,e=o.apply(t,[]);return e.forEach(function(e){e._pc=t}),e},Object.defineProperty(t.RTCRtpSender.prototype,"dtmf",{get:function(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}},shimSenderReceiverGetStats:function(t){if("object"==typeof t&&t.RTCPeerConnection&&t.RTCRtpSender&&t.RTCRtpReceiver){if(!("getStats"in t.RTCRtpSender.prototype)){var e=t.RTCPeerConnection.prototype.getSenders;e&&(t.RTCPeerConnection.prototype.getSenders=function(){var t=this,n=e.apply(t,[]);return n.forEach(function(e){e._pc=t}),n});var n=t.RTCPeerConnection.prototype.addTrack;n&&(t.RTCPeerConnection.prototype.addTrack=function(){var t=n.apply(this,arguments);return t._pc=this,t}),t.RTCRtpSender.prototype.getStats=function(){var t=this;return this._pc.getStats().then(function(e){return r(e,t.track,!0)})}}if(!("getStats"in t.RTCRtpReceiver.prototype)){var a=t.RTCPeerConnection.prototype.getReceivers;a&&(t.RTCPeerConnection.prototype.getReceivers=function(){var t=this,e=a.apply(t,[]);return e.forEach(function(e){e._pc=t}),e}),i.wrapPeerConnectionEvent(t,"track",function(t){return t.receiver._pc=t.srcElement,t}),t.RTCRtpReceiver.prototype.getStats=function(){var t=this;return this._pc.getStats().then(function(e){return r(e,t.track,!1)})}}if("getStats"in t.RTCRtpSender.prototype&&"getStats"in t.RTCRtpReceiver.prototype){var o=t.RTCPeerConnection.prototype.getStats;t.RTCPeerConnection.prototype.getStats=function(){var e=this;if(arguments.length>0&&arguments[0]instanceof t.MediaStreamTrack){var n,r,i,a=arguments[0];return e.getSenders().forEach(function(t){t.track===a&&(n?i=!0:n=t)}),e.getReceivers().forEach(function(t){return t.track===a&&(r?i=!0:r=t),t.track===a}),i||n&&r?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):n?n.getStats():r?r.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return o.apply(e,arguments)}}}},shimSourceObject:function(t){var e=t&&t.URL;"object"==typeof t&&(!t.HTMLMediaElement||"srcObject"in t.HTMLMediaElement.prototype||Object.defineProperty(t.HTMLMediaElement.prototype,"srcObject",{get:function(){return this._srcObject},set:function(t){var n=this;this._srcObject=t,this.src&&e.revokeObjectURL(this.src),t?(this.src=e.createObjectURL(t),t.addEventListener("addtrack",function(){n.src&&e.revokeObjectURL(n.src),n.src=e.createObjectURL(t)}),t.addEventListener("removetrack",function(){n.src&&e.revokeObjectURL(n.src),n.src=e.createObjectURL(t)})):this.src=""}}))},shimAddTrackRemoveTrackWithNative:function(t){t.RTCPeerConnection.prototype.getLocalStreams=function(){var t=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(function(e){return t._shimmedLocalStreams[e][0]})};var e=t.RTCPeerConnection.prototype.addTrack;t.RTCPeerConnection.prototype.addTrack=function(t,n){if(!n)return e.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};var r=e.apply(this,arguments);return this._shimmedLocalStreams[n.id]?-1===this._shimmedLocalStreams[n.id].indexOf(r)&&this._shimmedLocalStreams[n.id].push(r):this._shimmedLocalStreams[n.id]=[n,r],r};var n=t.RTCPeerConnection.prototype.addStream;t.RTCPeerConnection.prototype.addStream=function(t){var e=this;this._shimmedLocalStreams=this._shimmedLocalStreams||{},t.getTracks().forEach(function(t){if(e.getSenders().find(function(e){return e.track===t}))throw new DOMException("Track already exists.","InvalidAccessError")});var r=e.getSenders();n.apply(this,arguments);var i=e.getSenders().filter(function(t){return-1===r.indexOf(t)});this._shimmedLocalStreams[t.id]=[t].concat(i)};var r=t.RTCPeerConnection.prototype.removeStream;t.RTCPeerConnection.prototype.removeStream=function(t){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[t.id],r.apply(this,arguments)};var i=t.RTCPeerConnection.prototype.removeTrack;t.RTCPeerConnection.prototype.removeTrack=function(t){var e=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},t&&Object.keys(this._shimmedLocalStreams).forEach(function(n){var r=e._shimmedLocalStreams[n].indexOf(t);-1!==r&&e._shimmedLocalStreams[n].splice(r,1),1===e._shimmedLocalStreams[n].length&&delete e._shimmedLocalStreams[n]}),i.apply(this,arguments)}},shimAddTrackRemoveTrack:function(t){function e(t,e){var n=e.sdp;return Object.keys(t._reverseStreams||[]).forEach(function(e){var r=t._reverseStreams[e],i=t._streams[r.id];n=n.replace(new RegExp(i.id,"g"),r.id)}),new RTCSessionDescription({type:e.type,sdp:n})}if(t.RTCPeerConnection){var n=i.detectBrowser(t);if(t.RTCPeerConnection.prototype.addTrack&&n.version>=65)return this.shimAddTrackRemoveTrackWithNative(t);var r=t.RTCPeerConnection.prototype.getLocalStreams;t.RTCPeerConnection.prototype.getLocalStreams=function(){var t=this,e=r.apply(this);return t._reverseStreams=t._reverseStreams||{},e.map(function(e){return t._reverseStreams[e.id]})};var a=t.RTCPeerConnection.prototype.addStream;t.RTCPeerConnection.prototype.addStream=function(e){var n=this;if(n._streams=n._streams||{},n._reverseStreams=n._reverseStreams||{},e.getTracks().forEach(function(t){if(n.getSenders().find(function(e){return e.track===t}))throw new DOMException("Track already exists.","InvalidAccessError")}),!n._reverseStreams[e.id]){var r=new t.MediaStream(e.getTracks());n._streams[e.id]=r,n._reverseStreams[r.id]=e,e=r}a.apply(n,[e])};var o=t.RTCPeerConnection.prototype.removeStream;t.RTCPeerConnection.prototype.removeStream=function(t){var e=this;e._streams=e._streams||{},e._reverseStreams=e._reverseStreams||{},o.apply(e,[e._streams[t.id]||t]),delete e._reverseStreams[e._streams[t.id]?e._streams[t.id].id:t.id],delete e._streams[t.id]},t.RTCPeerConnection.prototype.addTrack=function(e,n){var r=this;if("closed"===r.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");var i=[].slice.call(arguments,1);if(1!==i.length||!i[0].getTracks().find(function(t){return t===e}))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(r.getSenders().find(function(t){return t.track===e}))throw new DOMException("Track already exists.","InvalidAccessError");r._streams=r._streams||{},r._reverseStreams=r._reverseStreams||{};var a=r._streams[n.id];if(a)a.addTrack(e),Promise.resolve().then(function(){r.dispatchEvent(new Event("negotiationneeded"))});else{var o=new t.MediaStream([e]);r._streams[n.id]=o,r._reverseStreams[o.id]=n,r.addStream(o)}return r.getSenders().find(function(t){return t.track===e})},["createOffer","createAnswer"].forEach(function(n){var r=t.RTCPeerConnection.prototype[n];t.RTCPeerConnection.prototype[n]=function(){var t=this,n=arguments;return arguments.length&&"function"==typeof arguments[0]?r.apply(t,[function(r){var i=e(t,r);n[0].apply(null,[i])},function(t){n[1]&&n[1].apply(null,t)},arguments[2]]):r.apply(t,arguments).then(function(n){return e(t,n)})}});var s=t.RTCPeerConnection.prototype.setLocalDescription;t.RTCPeerConnection.prototype.setLocalDescription=function(){var t=this;return arguments.length&&arguments[0].type?(arguments[0]=function(t,e){var n=e.sdp;return Object.keys(t._reverseStreams||[]).forEach(function(e){var r=t._reverseStreams[e],i=t._streams[r.id];n=n.replace(new RegExp(r.id,"g"),i.id)}),new RTCSessionDescription({type:e.type,sdp:n})}(t,arguments[0]),s.apply(t,arguments)):s.apply(t,arguments)};var c=Object.getOwnPropertyDescriptor(t.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(t.RTCPeerConnection.prototype,"localDescription",{get:function(){var t=c.get.apply(this);return""===t.type?t:e(this,t)}}),t.RTCPeerConnection.prototype.removeTrack=function(t){var e,n=this;if("closed"===n.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!t._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(t._pc!==n)throw new DOMException("Sender was not created by this connection.","InvalidAccessError");n._streams=n._streams||{},Object.keys(n._streams).forEach(function(r){n._streams[r].getTracks().find(function(e){return t.track===e})&&(e=n._streams[r])}),e&&(1===e.getTracks().length?n.removeStream(n._reverseStreams[e.id]):e.removeTrack(t.track),n.dispatchEvent(new Event("negotiationneeded")))}}},shimPeerConnection:function(t){var e=i.detectBrowser(t);if(!t.RTCPeerConnection&&t.webkitRTCPeerConnection&&(t.RTCPeerConnection=function(e,n){return a("PeerConnection"),e&&e.iceTransportPolicy&&(e.iceTransports=e.iceTransportPolicy),new t.webkitRTCPeerConnection(e,n)},t.RTCPeerConnection.prototype=t.webkitRTCPeerConnection.prototype,t.webkitRTCPeerConnection.generateCertificate&&Object.defineProperty(t.RTCPeerConnection,"generateCertificate",{get:function(){return t.webkitRTCPeerConnection.generateCertificate}})),t.RTCPeerConnection){var n=t.RTCPeerConnection.prototype.getStats;t.RTCPeerConnection.prototype.getStats=function(t,e,r){var i=this,a=arguments;if(arguments.length>0&&"function"==typeof t)return n.apply(this,arguments);if(0===n.length&&(0===arguments.length||"function"!=typeof arguments[0]))return n.apply(this,[]);var o=function(t){var e={};return t.result().forEach(function(t){var n={id:t.id,timestamp:t.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[t.type]||t.type};t.names().forEach(function(e){n[e]=t.stat(e)}),e[n.id]=n}),e},s=function(t){return new Map(Object.keys(t).map(function(e){return[e,t[e]]}))};if(arguments.length>=2){return n.apply(this,[function(t){a[1](s(o(t)))},arguments[0]])}return new Promise(function(t,e){n.apply(i,[function(e){t(s(o(e)))},e])}).then(e,r)},e.version<51&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(e){var n=t.RTCPeerConnection.prototype[e];t.RTCPeerConnection.prototype[e]=function(){var t=arguments,e=this,r=new Promise(function(r,i){n.apply(e,[t[0],r,i])});return t.length<2?r:r.then(function(){t[1].apply(null,[])},function(e){t.length>=3&&t[2].apply(null,[e])})}}),e.version<52&&["createOffer","createAnswer"].forEach(function(e){var n=t.RTCPeerConnection.prototype[e];t.RTCPeerConnection.prototype[e]=function(){var t=this;if(arguments.length<1||1===arguments.length&&"object"==typeof arguments[0]){var e=1===arguments.length?arguments[0]:void 0;return new Promise(function(r,i){n.apply(t,[r,i,e])})}return n.apply(this,arguments)}}),["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(e){var n=t.RTCPeerConnection.prototype[e];t.RTCPeerConnection.prototype[e]=function(){return arguments[0]=new("addIceCandidate"===e?t.RTCIceCandidate:t.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}});var r=t.RTCPeerConnection.prototype.addIceCandidate;t.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?r.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}},fixNegotiationNeeded:function(t){i.wrapPeerConnectionEvent(t,"negotiationneeded",function(t){if("stable"===t.target.signalingState)return t})},shimGetDisplayMedia:function(t,e){if(t.navigator&&t.navigator.mediaDevices&&!("getDisplayMedia"in t.navigator.mediaDevices)){if("function"!=typeof e)return void console.error("shimGetDisplayMedia: getSourceId argument is not a function");t.navigator.mediaDevices.getDisplayMedia=function(n){return e(n).then(function(e){var r=n.video&&n.video.width,i=n.video&&n.video.height,a=n.video&&n.video.frameRate;return n.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:e,maxFrameRate:a||3}},r&&(n.video.mandatory.maxWidth=r),i&&(n.video.mandatory.maxHeight=i),t.navigator.mediaDevices.getUserMedia(n)})},t.navigator.getDisplayMedia=function(e){return i.deprecated("navigator.getDisplayMedia","navigator.mediaDevices.getDisplayMedia"),t.navigator.mediaDevices.getDisplayMedia(e)}}}}},function(t,e,n){"use strict";var r=n(6),i=r.log;t.exports=function(t){var e=r.detectBrowser(t),n=t&&t.navigator,a=function(t){if("object"!=typeof t||t.mandatory||t.optional)return t;var e={};return Object.keys(t).forEach(function(n){if("require"!==n&&"advanced"!==n&&"mediaSource"!==n){var r="object"==typeof t[n]?t[n]:{ideal:t[n]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);var i=function(t,e){return t?t+e.charAt(0).toUpperCase()+e.slice(1):"deviceId"===e?"sourceId":e};if(void 0!==r.ideal){e.optional=e.optional||[];var a={};"number"==typeof r.ideal?(a[i("min",n)]=r.ideal,e.optional.push(a),(a={})[i("max",n)]=r.ideal,e.optional.push(a)):(a[i("",n)]=r.ideal,e.optional.push(a))}void 0!==r.exact&&"number"!=typeof r.exact?(e.mandatory=e.mandatory||{},e.mandatory[i("",n)]=r.exact):["min","max"].forEach(function(t){void 0!==r[t]&&(e.mandatory=e.mandatory||{},e.mandatory[i(t,n)]=r[t])})}}),t.advanced&&(e.optional=(e.optional||[]).concat(t.advanced)),e},o=function(t,r){if(e.version>=61)return r(t);if((t=JSON.parse(JSON.stringify(t)))&&"object"==typeof t.audio){var o=function(t,e,n){e in t&&!(n in t)&&(t[n]=t[e],delete t[e])};o((t=JSON.parse(JSON.stringify(t))).audio,"autoGainControl","googAutoGainControl"),o(t.audio,"noiseSuppression","googNoiseSuppression"),t.audio=a(t.audio)}if(t&&"object"==typeof t.video){var s=t.video.facingMode;s=s&&("object"==typeof s?s:{ideal:s});var c,u=e.version<66;if(s&&("user"===s.exact||"environment"===s.exact||"user"===s.ideal||"environment"===s.ideal)&&(!n.mediaDevices.getSupportedConstraints||!n.mediaDevices.getSupportedConstraints().facingMode||u))if(delete t.video.facingMode,"environment"===s.exact||"environment"===s.ideal?c=["back","rear"]:"user"!==s.exact&&"user"!==s.ideal||(c=["front"]),c)return n.mediaDevices.enumerateDevices().then(function(e){var n=(e=e.filter(function(t){return"videoinput"===t.kind})).find(function(t){return c.some(function(e){return-1!==t.label.toLowerCase().indexOf(e)})});return!n&&e.length&&-1!==c.indexOf("back")&&(n=e[e.length-1]),n&&(t.video.deviceId=s.exact?{exact:n.deviceId}:{ideal:n.deviceId}),t.video=a(t.video),i("chrome: "+JSON.stringify(t)),r(t)});t.video=a(t.video)}return i("chrome: "+JSON.stringify(t)),r(t)},s=function(t){return e.version>=64?t:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[t.name]||t.name,message:t.message,constraint:t.constraint||t.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}};n.getUserMedia=function(t,e,r){o(t,function(t){n.webkitGetUserMedia(t,e,function(t){r&&r(s(t))})})};var c=function(t){return new Promise(function(e,r){n.getUserMedia(t,e,r)})};if(n.mediaDevices||(n.mediaDevices={getUserMedia:c,enumerateDevices:function(){return new Promise(function(e){var n={audio:"audioinput",video:"videoinput"};return t.MediaStreamTrack.getSources(function(t){e(t.map(function(t){return{label:t.label,kind:n[t.kind],deviceId:t.id,groupId:""}}))})})},getSupportedConstraints:function(){return{deviceId:!0,echoCancellation:!0,facingMode:!0,frameRate:!0,height:!0,width:!0}}}),n.mediaDevices.getUserMedia){var u=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(t){return o(t,function(t){return u(t).then(function(e){if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(function(t){t.stop()}),new DOMException("","NotFoundError");return e},function(t){return Promise.reject(s(t))})})}}else n.mediaDevices.getUserMedia=function(t){return c(t)};void 0===n.mediaDevices.addEventListener&&(n.mediaDevices.addEventListener=function(){i("Dummy mediaDevices.addEventListener called.")}),void 0===n.mediaDevices.removeEventListener&&(n.mediaDevices.removeEventListener=function(){i("Dummy mediaDevices.removeEventListener called.")})}},function(t,e,n){"use strict";var r=n(6),i=n(107),a=n(108);t.exports={shimGetUserMedia:n(110),shimPeerConnection:function(t){var e=r.detectBrowser(t);if(t.RTCIceGatherer&&(t.RTCIceCandidate||(t.RTCIceCandidate=function(t){return t}),t.RTCSessionDescription||(t.RTCSessionDescription=function(t){return t}),e.version<15025)){var n=Object.getOwnPropertyDescriptor(t.MediaStreamTrack.prototype,"enabled");Object.defineProperty(t.MediaStreamTrack.prototype,"enabled",{set:function(t){n.set.call(this,t);var e=new Event("enabled");e.enabled=t,this.dispatchEvent(e)}})}!t.RTCRtpSender||"dtmf"in t.RTCRtpSender.prototype||Object.defineProperty(t.RTCRtpSender.prototype,"dtmf",{get:function(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=new t.RTCDtmfSender(this):"video"===this.track.kind&&(this._dtmf=null)),this._dtmf}}),t.RTCDtmfSender&&!t.RTCDTMFSender&&(t.RTCDTMFSender=t.RTCDtmfSender);var o=a(t,e.version);t.RTCPeerConnection=function(t){return t&&t.iceServers&&(t.iceServers=i(t.iceServers)),new o(t)},t.RTCPeerConnection.prototype=o.prototype},shimReplaceTrack:function(t){!t.RTCRtpSender||"replaceTrack"in t.RTCRtpSender.prototype||(t.RTCRtpSender.prototype.replaceTrack=t.RTCRtpSender.prototype.setTrack)},shimGetDisplayMedia:function(t,e){if("getDisplayMedia"in t.navigator&&t.navigator.mediaDevices&&!("getDisplayMedia"in t.navigator.mediaDevices)){var n=t.navigator.getDisplayMedia;t.navigator.mediaDevices.getDisplayMedia=function(e){return n.call(t.navigator,e)},t.navigator.getDisplayMedia=function(e){return r.deprecated("navigator.getDisplayMedia","navigator.mediaDevices.getDisplayMedia"),n.call(t.navigator,e)}}}}},function(t,e,n){"use strict";var r=n(6);t.exports=function(t,e){var n=!1;return(t=JSON.parse(JSON.stringify(t))).filter(function(t){if(t&&(t.urls||t.url)){var i=t.urls||t.url;t.url&&!t.urls&&r.deprecated("RTCIceServer.url","RTCIceServer.urls");var a="string"==typeof i;return a&&(i=[i]),i=i.filter(function(t){return 0!==t.indexOf("turn:")||-1===t.indexOf("transport=udp")||-1!==t.indexOf("turn:[")||n?0===t.indexOf("stun:")&&e>=14393&&-1===t.indexOf("?transport=udp"):(n=!0,!0)}),delete t.url,t.urls=a?i[0]:i,!!i.length}})}},function(t,e,n){"use strict";function r(t,e,n,r,i){var a=c.writeRtpDescription(t.kind,e);if(a+=c.writeIceParameters(t.iceGatherer.getLocalParameters()),a+=c.writeDtlsParameters(t.dtlsTransport.getLocalParameters(),"offer"===n?"actpass":i||"active"),a+="a=mid:"+t.mid+"\r\n",t.rtpSender&&t.rtpReceiver?a+="a=sendrecv\r\n":t.rtpSender?a+="a=sendonly\r\n":t.rtpReceiver?a+="a=recvonly\r\n":a+="a=inactive\r\n",t.rtpSender){var o=t.rtpSender._initialTrackId||t.rtpSender.track.id;t.rtpSender._initialTrackId=o;var s="msid:"+(r?r.id:"-")+" "+o+"\r\n";a+="a="+s,a+="a=ssrc:"+t.sendEncodingParameters[0].ssrc+" "+s,t.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+t.sendEncodingParameters[0].rtx.ssrc+" "+s,a+="a=ssrc-group:FID "+t.sendEncodingParameters[0].ssrc+" "+t.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return a+="a=ssrc:"+t.sendEncodingParameters[0].ssrc+" cname:"+c.localCName+"\r\n",t.rtpSender&&t.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+t.sendEncodingParameters[0].rtx.ssrc+" cname:"+c.localCName+"\r\n"),a}function i(t,e){var n={codecs:[],headerExtensions:[],fecMechanisms:[]},r=function(t,e){t=parseInt(t,10);for(var n=0;n<e.length;n++)if(e[n].payloadType===t||e[n].preferredPayloadType===t)return e[n]},i=function(t,e,n,i){var a=r(t.parameters.apt,n),o=r(e.parameters.apt,i);return a&&o&&a.name.toLowerCase()===o.name.toLowerCase()};return t.codecs.forEach(function(r){for(var a=0;a<e.codecs.length;a++){var o=e.codecs[a];if(r.name.toLowerCase()===o.name.toLowerCase()&&r.clockRate===o.clockRate){if("rtx"===r.name.toLowerCase()&&r.parameters&&o.parameters.apt&&!i(r,o,t.codecs,e.codecs))continue;(o=JSON.parse(JSON.stringify(o))).numChannels=Math.min(r.numChannels,o.numChannels),n.codecs.push(o),o.rtcpFeedback=o.rtcpFeedback.filter(function(t){for(var e=0;e<r.rtcpFeedback.length;e++)if(r.rtcpFeedback[e].type===t.type&&r.rtcpFeedback[e].parameter===t.parameter)return!0;return!1});break}}}),t.headerExtensions.forEach(function(t){for(var r=0;r<e.headerExtensions.length;r++){var i=e.headerExtensions[r];if(t.uri===i.uri){n.headerExtensions.push(i);break}}}),n}function a(t,e,n){return-1!=={offer:{setLocalDescription:["stable","have-local-offer"],setRemoteDescription:["stable","have-remote-offer"]},answer:{setLocalDescription:["have-remote-offer","have-local-pranswer"],setRemoteDescription:["have-local-offer","have-remote-pranswer"]}}[e][t].indexOf(n)}function o(t,e){var n=t.getRemoteCandidates().find(function(t){return e.foundation===t.foundation&&e.ip===t.ip&&e.port===t.port&&e.priority===t.priority&&e.protocol===t.protocol&&e.type===t.type});return n||t.addRemoteCandidate(e),!n}function s(t,e){var n=new Error(e);return n.name=t,n.code={NotSupportedError:9,InvalidStateError:11,InvalidAccessError:15,TypeError:void 0,OperationError:void 0}[t],n}var c=n(109);t.exports=function(t,e){function n(e,n){n.addTrack(e),n.dispatchEvent(new t.MediaStreamTrackEvent("addtrack",{track:e}))}function u(e,n){n.removeTrack(e),n.dispatchEvent(new t.MediaStreamTrackEvent("removetrack",{track:e}))}function l(e,n,r,i){var a=new Event("track");a.track=n,a.receiver=r,a.transceiver={receiver:r},a.streams=i,t.setTimeout(function(){e._dispatchEvent("track",a)})}var d=function(n){var r=this,i=document.createDocumentFragment();if(["addEventListener","removeEventListener","dispatchEvent"].forEach(function(t){r[t]=i[t].bind(i)}),this.canTrickleIceCandidates=null,this.needNegotiation=!1,this.localStreams=[],this.remoteStreams=[],this._localDescription=null,this._remoteDescription=null,this.signalingState="stable",this.iceConnectionState="new",this.connectionState="new",this.iceGatheringState="new",n=JSON.parse(JSON.stringify(n||{})),this.usingBundle="max-bundle"===n.bundlePolicy,"negotiate"===n.rtcpMuxPolicy)throw s("NotSupportedError","rtcpMuxPolicy 'negotiate' is not supported");switch(n.rtcpMuxPolicy||(n.rtcpMuxPolicy="require"),n.iceTransportPolicy){case"all":case"relay":break;default:n.iceTransportPolicy="all"}switch(n.bundlePolicy){case"balanced":case"max-compat":case"max-bundle":break;default:n.bundlePolicy="balanced"}if(n.iceServers=function(t,e){var n=!1;return(t=JSON.parse(JSON.stringify(t))).filter(function(t){if(t&&(t.urls||t.url)){var r=t.urls||t.url;t.url&&!t.urls&&console.warn("RTCIceServer.url is deprecated! Use urls instead.");var i="string"==typeof r;return i&&(r=[r]),r=r.filter(function(t){return 0!==t.indexOf("turn:")||-1===t.indexOf("transport=udp")||-1!==t.indexOf("turn:[")||n?0===t.indexOf("stun:")&&e>=14393&&-1===t.indexOf("?transport=udp"):(n=!0,!0)}),delete t.url,t.urls=i?r[0]:r,!!r.length}})}(n.iceServers||[],e),this._iceGatherers=[],n.iceCandidatePoolSize)for(var a=n.iceCandidatePoolSize;a>0;a--)this._iceGatherers.push(new t.RTCIceGatherer({iceServers:n.iceServers,gatherPolicy:n.iceTransportPolicy}));else n.iceCandidatePoolSize=0;this._config=n,this.transceivers=[],this._sdpSessionId=c.generateSessionId(),this._sdpSessionVersion=0,this._dtlsRole=void 0,this._isClosed=!1};Object.defineProperty(d.prototype,"localDescription",{configurable:!0,get:function(){return this._localDescription}}),Object.defineProperty(d.prototype,"remoteDescription",{configurable:!0,get:function(){return this._remoteDescription}}),d.prototype.onicecandidate=null,d.prototype.onaddstream=null,d.prototype.ontrack=null,d.prototype.onremovestream=null,d.prototype.onsignalingstatechange=null,d.prototype.oniceconnectionstatechange=null,d.prototype.onconnectionstatechange=null,d.prototype.onicegatheringstatechange=null,d.prototype.onnegotiationneeded=null,d.prototype.ondatachannel=null,d.prototype._dispatchEvent=function(t,e){this._isClosed||(this.dispatchEvent(e),"function"==typeof this["on"+t]&&this["on"+t](e))},d.prototype._emitGatheringStateChange=function(){var t=new Event("icegatheringstatechange");this._dispatchEvent("icegatheringstatechange",t)},d.prototype.getConfiguration=function(){return this._config},d.prototype.getLocalStreams=function(){return this.localStreams},d.prototype.getRemoteStreams=function(){return this.remoteStreams},d.prototype._createTransceiver=function(t,e){var n=this.transceivers.length>0,r={track:null,iceGatherer:null,iceTransport:null,dtlsTransport:null,localCapabilities:null,remoteCapabilities:null,rtpSender:null,rtpReceiver:null,kind:t,mid:null,sendEncodingParameters:null,recvEncodingParameters:null,stream:null,associatedRemoteMediaStreams:[],wantReceive:!0};if(this.usingBundle&&n)r.iceTransport=this.transceivers[0].iceTransport,r.dtlsTransport=this.transceivers[0].dtlsTransport;else{var i=this._createIceAndDtlsTransports();r.iceTransport=i.iceTransport,r.dtlsTransport=i.dtlsTransport}return e||this.transceivers.push(r),r},d.prototype.addTrack=function(e,n){if(this._isClosed)throw s("InvalidStateError","Attempted to call addTrack on a closed peerconnection.");if(this.transceivers.find(function(t){return t.track===e}))throw s("InvalidAccessError","Track already exists.");for(var r,i=0;i<this.transceivers.length;i++)this.transceivers[i].track||this.transceivers[i].kind!==e.kind||(r=this.transceivers[i]);return r||(r=this._createTransceiver(e.kind)),this._maybeFireNegotiationNeeded(),-1===this.localStreams.indexOf(n)&&this.localStreams.push(n),r.track=e,r.stream=n,r.rtpSender=new t.RTCRtpSender(e,r.dtlsTransport),r.rtpSender},d.prototype.addStream=function(t){var n=this;if(e>=15025)t.getTracks().forEach(function(e){n.addTrack(e,t)});else{var r=t.clone();t.getTracks().forEach(function(t,e){var n=r.getTracks()[e];t.addEventListener("enabled",function(t){n.enabled=t.enabled})}),r.getTracks().forEach(function(t){n.addTrack(t,r)})}},d.prototype.removeTrack=function(e){if(this._isClosed)throw s("InvalidStateError","Attempted to call removeTrack on a closed peerconnection.");if(!(e instanceof t.RTCRtpSender))throw new TypeError("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.");var n=this.transceivers.find(function(t){return t.rtpSender===e});if(!n)throw s("InvalidAccessError","Sender was not created by this connection.");var r=n.stream;n.rtpSender.stop(),n.rtpSender=null,n.track=null,n.stream=null,-1===this.transceivers.map(function(t){return t.stream}).indexOf(r)&&this.localStreams.indexOf(r)>-1&&this.localStreams.splice(this.localStreams.indexOf(r),1),this._maybeFireNegotiationNeeded()},d.prototype.removeStream=function(t){var e=this;t.getTracks().forEach(function(t){var n=e.getSenders().find(function(e){return e.track===t});n&&e.removeTrack(n)})},d.prototype.getSenders=function(){return this.transceivers.filter(function(t){return!!t.rtpSender}).map(function(t){return t.rtpSender})},d.prototype.getReceivers=function(){return this.transceivers.filter(function(t){return!!t.rtpReceiver}).map(function(t){return t.rtpReceiver})},d.prototype._createIceGatherer=function(e,n){var r=this;if(n&&e>0)return this.transceivers[0].iceGatherer;if(this._iceGatherers.length)return this._iceGatherers.shift();var i=new t.RTCIceGatherer({iceServers:this._config.iceServers,gatherPolicy:this._config.iceTransportPolicy});return Object.defineProperty(i,"state",{value:"new",writable:!0}),this.transceivers[e].bufferedCandidateEvents=[],this.transceivers[e].bufferCandidates=function(t){var n=!t.candidate||0===Object.keys(t.candidate).length;i.state=n?"completed":"gathering",null!==r.transceivers[e].bufferedCandidateEvents&&r.transceivers[e].bufferedCandidateEvents.push(t)},i.addEventListener("localcandidate",this.transceivers[e].bufferCandidates),i},d.prototype._gather=function(e,n){var r=this,i=this.transceivers[n].iceGatherer;if(!i.onlocalcandidate){var a=this.transceivers[n].bufferedCandidateEvents;this.transceivers[n].bufferedCandidateEvents=null,i.removeEventListener("localcandidate",this.transceivers[n].bufferCandidates),i.onlocalcandidate=function(t){if(!(r.usingBundle&&n>0)){var a=new Event("icecandidate");a.candidate={sdpMid:e,sdpMLineIndex:n};var o=t.candidate,s=!o||0===Object.keys(o).length;if(s)"new"!==i.state&&"gathering"!==i.state||(i.state="completed");else{"new"===i.state&&(i.state="gathering"),o.component=1,o.ufrag=i.getLocalParameters().usernameFragment;var u=c.writeCandidate(o);a.candidate=Object.assign(a.candidate,c.parseCandidate(u)),a.candidate.candidate=u,a.candidate.toJSON=function(){return{candidate:a.candidate.candidate,sdpMid:a.candidate.sdpMid,sdpMLineIndex:a.candidate.sdpMLineIndex,usernameFragment:a.candidate.usernameFragment}}}var l=c.getMediaSections(r._localDescription.sdp);l[a.candidate.sdpMLineIndex]+=s?"a=end-of-candidates\r\n":"a="+a.candidate.candidate+"\r\n",r._localDescription.sdp=c.getDescription(r._localDescription.sdp)+l.join("");var d=r.transceivers.every(function(t){return t.iceGatherer&&"completed"===t.iceGatherer.state});"gathering"!==r.iceGatheringState&&(r.iceGatheringState="gathering",r._emitGatheringStateChange()),s||r._dispatchEvent("icecandidate",a),d&&(r._dispatchEvent("icecandidate",new Event("icecandidate")),r.iceGatheringState="complete",r._emitGatheringStateChange())}},t.setTimeout(function(){a.forEach(function(t){i.onlocalcandidate(t)})},0)}},d.prototype._createIceAndDtlsTransports=function(){var e=this,n=new t.RTCIceTransport(null);n.onicestatechange=function(){e._updateIceConnectionState(),e._updateConnectionState()};var r=new t.RTCDtlsTransport(n);return r.ondtlsstatechange=function(){e._updateConnectionState()},r.onerror=function(){Object.defineProperty(r,"state",{value:"failed",writable:!0}),e._updateConnectionState()},{iceTransport:n,dtlsTransport:r}},d.prototype._disposeIceAndDtlsTransports=function(t){var e=this.transceivers[t].iceGatherer;e&&(delete e.onlocalcandidate,delete this.transceivers[t].iceGatherer);var n=this.transceivers[t].iceTransport;n&&(delete n.onicestatechange,delete this.transceivers[t].iceTransport);var r=this.transceivers[t].dtlsTransport;r&&(delete r.ondtlsstatechange,delete r.onerror,delete this.transceivers[t].dtlsTransport)},d.prototype._transceive=function(t,n,r){var a=i(t.localCapabilities,t.remoteCapabilities);n&&t.rtpSender&&(a.encodings=t.sendEncodingParameters,a.rtcp={cname:c.localCName,compound:t.rtcpParameters.compound},t.recvEncodingParameters.length&&(a.rtcp.ssrc=t.recvEncodingParameters[0].ssrc),t.rtpSender.send(a)),r&&t.rtpReceiver&&a.codecs.length>0&&("video"===t.kind&&t.recvEncodingParameters&&e<15019&&t.recvEncodingParameters.forEach(function(t){delete t.rtx}),t.recvEncodingParameters.length?a.encodings=t.recvEncodingParameters:a.encodings=[{}],a.rtcp={compound:t.rtcpParameters.compound},t.rtcpParameters.cname&&(a.rtcp.cname=t.rtcpParameters.cname),t.sendEncodingParameters.length&&(a.rtcp.ssrc=t.sendEncodingParameters[0].ssrc),t.rtpReceiver.receive(a))},d.prototype.setLocalDescription=function(t){var e,n,r=this;if(-1===["offer","answer"].indexOf(t.type))return Promise.reject(s("TypeError",'Unsupported type "'+t.type+'"'));if(!a("setLocalDescription",t.type,r.signalingState)||r._isClosed)return Promise.reject(s("InvalidStateError","Can not set local "+t.type+" in state "+r.signalingState));if("offer"===t.type)e=c.splitSections(t.sdp),n=e.shift(),e.forEach(function(t,e){var n=c.parseRtpParameters(t);r.transceivers[e].localCapabilities=n}),r.transceivers.forEach(function(t,e){r._gather(t.mid,e)});else if("answer"===t.type){e=c.splitSections(r._remoteDescription.sdp),n=e.shift();var o=c.matchPrefix(n,"a=ice-lite").length>0;e.forEach(function(t,e){var a=r.transceivers[e],s=a.iceGatherer,u=a.iceTransport,l=a.dtlsTransport,d=a.localCapabilities,f=a.remoteCapabilities;if(!(c.isRejected(t)&&0===c.matchPrefix(t,"a=bundle-only").length||a.rejected)){var h=c.getIceParameters(t,n),p=c.getDtlsParameters(t,n);o&&(p.role="server"),r.usingBundle&&0!==e||(r._gather(a.mid,e),"new"===u.state&&u.start(s,h,o?"controlling":"controlled"),"new"===l.state&&l.start(p));var m=i(d,f);r._transceive(a,m.codecs.length>0,!1)}})}return r._localDescription={type:t.type,sdp:t.sdp},"offer"===t.type?r._updateSignalingState("have-local-offer"):r._updateSignalingState("stable"),Promise.resolve()},d.prototype.setRemoteDescription=function(r){var d=this;if(-1===["offer","answer"].indexOf(r.type))return Promise.reject(s("TypeError",'Unsupported type "'+r.type+'"'));if(!a("setRemoteDescription",r.type,d.signalingState)||d._isClosed)return Promise.reject(s("InvalidStateError","Can not set remote "+r.type+" in state "+d.signalingState));var f={};d.remoteStreams.forEach(function(t){f[t.id]=t});var h=[],p=c.splitSections(r.sdp),m=p.shift(),v=c.matchPrefix(m,"a=ice-lite").length>0,_=c.matchPrefix(m,"a=group:BUNDLE ").length>0;d.usingBundle=_;var g=c.matchPrefix(m,"a=ice-options:")[0];return d.canTrickleIceCandidates=!!g&&g.substr(14).split(" ").indexOf("trickle")>=0,p.forEach(function(a,s){var l=c.splitLines(a),p=c.getKind(a),g=c.isRejected(a)&&0===c.matchPrefix(a,"a=bundle-only").length,b=l[0].substr(2).split(" ")[2],y=c.getDirection(a,m),x=c.parseMsid(a),w=c.getMid(a)||c.generateIdentifier();if(g||"application"===p&&("DTLS/SCTP"===b||"UDP/DTLS/SCTP"===b))d.transceivers[s]={mid:w,kind:p,protocol:b,rejected:!0};else{!g&&d.transceivers[s]&&d.transceivers[s].rejected&&(d.transceivers[s]=d._createTransceiver(p,!0));var k,C,E,S,I,M,T,D,R,P,O,L=c.parseRtpParameters(a);g||(P=c.getIceParameters(a,m),(O=c.getDtlsParameters(a,m)).role="client"),T=c.parseRtpEncodingParameters(a);var A=c.parseRtcpParameters(a),N=c.matchPrefix(a,"a=end-of-candidates",m).length>0,B=c.matchPrefix(a,"a=candidate:").map(function(t){return c.parseCandidate(t)}).filter(function(t){return 1===t.component});if(("offer"===r.type||"answer"===r.type)&&!g&&_&&s>0&&d.transceivers[s]&&(d._disposeIceAndDtlsTransports(s),d.transceivers[s].iceGatherer=d.transceivers[0].iceGatherer,d.transceivers[s].iceTransport=d.transceivers[0].iceTransport,d.transceivers[s].dtlsTransport=d.transceivers[0].dtlsTransport,d.transceivers[s].rtpSender&&d.transceivers[s].rtpSender.setTransport(d.transceivers[0].dtlsTransport),d.transceivers[s].rtpReceiver&&d.transceivers[s].rtpReceiver.setTransport(d.transceivers[0].dtlsTransport)),"offer"!==r.type||g){if("answer"===r.type&&!g)C=(k=d.transceivers[s]).iceGatherer,E=k.iceTransport,S=k.dtlsTransport,I=k.rtpReceiver,M=k.sendEncodingParameters,D=k.localCapabilities,d.transceivers[s].recvEncodingParameters=T,d.transceivers[s].remoteCapabilities=L,d.transceivers[s].rtcpParameters=A,B.length&&"new"===E.state&&(!v&&!N||_&&0!==s?B.forEach(function(t){o(k.iceTransport,t)}):E.setRemoteCandidates(B)),_&&0!==s||("new"===E.state&&E.start(C,P,"controlling"),"new"===S.state&&S.start(O)),!i(k.localCapabilities,k.remoteCapabilities).codecs.filter(function(t){return"rtx"===t.name.toLowerCase()}).length&&k.sendEncodingParameters[0].rtx&&delete k.sendEncodingParameters[0].rtx,d._transceive(k,"sendrecv"===y||"recvonly"===y,"sendrecv"===y||"sendonly"===y),!I||"sendrecv"!==y&&"sendonly"!==y?delete k.rtpReceiver:(R=I.track,x?(f[x.stream]||(f[x.stream]=new t.MediaStream),n(R,f[x.stream]),h.push([R,I,f[x.stream]])):(f.default||(f.default=new t.MediaStream),n(R,f.default),h.push([R,I,f.default])))}else{(k=d.transceivers[s]||d._createTransceiver(p)).mid=w,k.iceGatherer||(k.iceGatherer=d._createIceGatherer(s,_)),B.length&&"new"===k.iceTransport.state&&(!N||_&&0!==s?B.forEach(function(t){o(k.iceTransport,t)}):k.iceTransport.setRemoteCandidates(B)),D=t.RTCRtpReceiver.getCapabilities(p),e<15019&&(D.codecs=D.codecs.filter(function(t){return"rtx"!==t.name})),M=k.sendEncodingParameters||[{ssrc:1001*(2*s+2)}];var j,F=!1;if("sendrecv"===y||"sendonly"===y){if(F=!k.rtpReceiver,I=k.rtpReceiver||new t.RTCRtpReceiver(k.dtlsTransport,p),F)R=I.track,x&&"-"===x.stream||(x?(f[x.stream]||(f[x.stream]=new t.MediaStream,Object.defineProperty(f[x.stream],"id",{get:function(){return x.stream}})),Object.defineProperty(R,"id",{get:function(){return x.track}}),j=f[x.stream]):(f.default||(f.default=new t.MediaStream),j=f.default)),j&&(n(R,j),k.associatedRemoteMediaStreams.push(j)),h.push([R,I,j])}else k.rtpReceiver&&k.rtpReceiver.track&&(k.associatedRemoteMediaStreams.forEach(function(t){var e=t.getTracks().find(function(t){return t.id===k.rtpReceiver.track.id});e&&u(e,t)}),k.associatedRemoteMediaStreams=[]);k.localCapabilities=D,k.remoteCapabilities=L,k.rtpReceiver=I,k.rtcpParameters=A,k.sendEncodingParameters=M,k.recvEncodingParameters=T,d._transceive(d.transceivers[s],!1,F)}}}),void 0===d._dtlsRole&&(d._dtlsRole="offer"===r.type?"active":"passive"),d._remoteDescription={type:r.type,sdp:r.sdp},"offer"===r.type?d._updateSignalingState("have-remote-offer"):d._updateSignalingState("stable"),Object.keys(f).forEach(function(e){var n=f[e];if(n.getTracks().length){if(-1===d.remoteStreams.indexOf(n)){d.remoteStreams.push(n);var r=new Event("addstream");r.stream=n,t.setTimeout(function(){d._dispatchEvent("addstream",r)})}h.forEach(function(t){var e=t[0],r=t[1];n.id===t[2].id&&l(d,e,r,[n])})}}),h.forEach(function(t){t[2]||l(d,t[0],t[1],[])}),t.setTimeout(function(){d&&d.transceivers&&d.transceivers.forEach(function(t){t.iceTransport&&"new"===t.iceTransport.state&&t.iceTransport.getRemoteCandidates().length>0&&(console.warn("Timeout for addRemoteCandidate. Consider sending an end-of-candidates notification"),t.iceTransport.addRemoteCandidate({}))})},4e3),Promise.resolve()},d.prototype.close=function(){this.transceivers.forEach(function(t){t.iceTransport&&t.iceTransport.stop(),t.dtlsTransport&&t.dtlsTransport.stop(),t.rtpSender&&t.rtpSender.stop(),t.rtpReceiver&&t.rtpReceiver.stop()}),this._isClosed=!0,this._updateSignalingState("closed")},d.prototype._updateSignalingState=function(t){this.signalingState=t;var e=new Event("signalingstatechange");this._dispatchEvent("signalingstatechange",e)},d.prototype._maybeFireNegotiationNeeded=function(){var e=this;"stable"===this.signalingState&&!0!==this.needNegotiation&&(this.needNegotiation=!0,t.setTimeout(function(){if(e.needNegotiation){e.needNegotiation=!1;var t=new Event("negotiationneeded");e._dispatchEvent("negotiationneeded",t)}},0))},d.prototype._updateIceConnectionState=function(){var t,e={new:0,closed:0,checking:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach(function(t){t.iceTransport&&!t.rejected&&e[t.iceTransport.state]++}),t="new",e.failed>0?t="failed":e.checking>0?t="checking":e.disconnected>0?t="disconnected":e.new>0?t="new":e.connected>0?t="connected":e.completed>0&&(t="completed"),t!==this.iceConnectionState){this.iceConnectionState=t;var n=new Event("iceconnectionstatechange");this._dispatchEvent("iceconnectionstatechange",n)}},d.prototype._updateConnectionState=function(){var t,e={new:0,closed:0,connecting:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach(function(t){t.iceTransport&&t.dtlsTransport&&!t.rejected&&(e[t.iceTransport.state]++,e[t.dtlsTransport.state]++)}),e.connected+=e.completed,t="new",e.failed>0?t="failed":e.connecting>0?t="connecting":e.disconnected>0?t="disconnected":e.new>0?t="new":e.connected>0&&(t="connected"),t!==this.connectionState){this.connectionState=t;var n=new Event("connectionstatechange");this._dispatchEvent("connectionstatechange",n)}},d.prototype.createOffer=function(){var n=this;if(n._isClosed)return Promise.reject(s("InvalidStateError","Can not call createOffer after close"));var i=n.transceivers.filter(function(t){return"audio"===t.kind}).length,a=n.transceivers.filter(function(t){return"video"===t.kind}).length,o=arguments[0];if(o){if(o.mandatory||o.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");void 0!==o.offerToReceiveAudio&&(i=!0===o.offerToReceiveAudio?1:!1===o.offerToReceiveAudio?0:o.offerToReceiveAudio),void 0!==o.offerToReceiveVideo&&(a=!0===o.offerToReceiveVideo?1:!1===o.offerToReceiveVideo?0:o.offerToReceiveVideo)}for(n.transceivers.forEach(function(t){"audio"===t.kind?--i<0&&(t.wantReceive=!1):"video"===t.kind&&--a<0&&(t.wantReceive=!1)});i>0||a>0;)i>0&&(n._createTransceiver("audio"),i--),a>0&&(n._createTransceiver("video"),a--);var u=c.writeSessionBoilerplate(n._sdpSessionId,n._sdpSessionVersion++);n.transceivers.forEach(function(r,i){var a=r.track,o=r.kind,s=r.mid||c.generateIdentifier();r.mid=s,r.iceGatherer||(r.iceGatherer=n._createIceGatherer(i,n.usingBundle));var u=t.RTCRtpSender.getCapabilities(o);e<15019&&(u.codecs=u.codecs.filter(function(t){return"rtx"!==t.name})),u.codecs.forEach(function(t){"H264"===t.name&&void 0===t.parameters["level-asymmetry-allowed"]&&(t.parameters["level-asymmetry-allowed"]="1"),r.remoteCapabilities&&r.remoteCapabilities.codecs&&r.remoteCapabilities.codecs.forEach(function(e){t.name.toLowerCase()===e.name.toLowerCase()&&t.clockRate===e.clockRate&&(t.preferredPayloadType=e.payloadType)})}),u.headerExtensions.forEach(function(t){(r.remoteCapabilities&&r.remoteCapabilities.headerExtensions||[]).forEach(function(e){t.uri===e.uri&&(t.id=e.id)})});var l=r.sendEncodingParameters||[{ssrc:1001*(2*i+1)}];a&&e>=15019&&"video"===o&&!l[0].rtx&&(l[0].rtx={ssrc:l[0].ssrc+1}),r.wantReceive&&(r.rtpReceiver=new t.RTCRtpReceiver(r.dtlsTransport,o)),r.localCapabilities=u,r.sendEncodingParameters=l}),"max-compat"!==n._config.bundlePolicy&&(u+="a=group:BUNDLE "+n.transceivers.map(function(t){return t.mid}).join(" ")+"\r\n"),u+="a=ice-options:trickle\r\n",n.transceivers.forEach(function(t,e){u+=r(t,t.localCapabilities,"offer",t.stream,n._dtlsRole),u+="a=rtcp-rsize\r\n",!t.iceGatherer||"new"===n.iceGatheringState||0!==e&&n.usingBundle||(t.iceGatherer.getLocalCandidates().forEach(function(t){t.component=1,u+="a="+c.writeCandidate(t)+"\r\n"}),"completed"===t.iceGatherer.state&&(u+="a=end-of-candidates\r\n"))});var l=new t.RTCSessionDescription({type:"offer",sdp:u});return Promise.resolve(l)},d.prototype.createAnswer=function(){var n=this;if(n._isClosed)return Promise.reject(s("InvalidStateError","Can not call createAnswer after close"));if("have-remote-offer"!==n.signalingState&&"have-local-pranswer"!==n.signalingState)return Promise.reject(s("InvalidStateError","Can not call createAnswer in signalingState "+n.signalingState));var a=c.writeSessionBoilerplate(n._sdpSessionId,n._sdpSessionVersion++);n.usingBundle&&(a+="a=group:BUNDLE "+n.transceivers.map(function(t){return t.mid}).join(" ")+"\r\n"),a+="a=ice-options:trickle\r\n";var o=c.getMediaSections(n._remoteDescription.sdp).length;n.transceivers.forEach(function(t,s){if(!(s+1>o)){if(t.rejected)return"application"===t.kind?"DTLS/SCTP"===t.protocol?a+="m=application 0 DTLS/SCTP 5000\r\n":a+="m=application 0 "+t.protocol+" webrtc-datachannel\r\n":"audio"===t.kind?a+="m=audio 0 UDP/TLS/RTP/SAVPF 0\r\na=rtpmap:0 PCMU/8000\r\n":"video"===t.kind&&(a+="m=video 0 UDP/TLS/RTP/SAVPF 120\r\na=rtpmap:120 VP8/90000\r\n"),void(a+="c=IN IP4 0.0.0.0\r\na=inactive\r\na=mid:"+t.mid+"\r\n");var c;if(t.stream)"audio"===t.kind?c=t.stream.getAudioTracks()[0]:"video"===t.kind&&(c=t.stream.getVideoTracks()[0]),c&&e>=15019&&"video"===t.kind&&!t.sendEncodingParameters[0].rtx&&(t.sendEncodingParameters[0].rtx={ssrc:t.sendEncodingParameters[0].ssrc+1});var u=i(t.localCapabilities,t.remoteCapabilities);!u.codecs.filter(function(t){return"rtx"===t.name.toLowerCase()}).length&&t.sendEncodingParameters[0].rtx&&delete t.sendEncodingParameters[0].rtx,a+=r(t,u,"answer",t.stream,n._dtlsRole),t.rtcpParameters&&t.rtcpParameters.reducedSize&&(a+="a=rtcp-rsize\r\n")}});var u=new t.RTCSessionDescription({type:"answer",sdp:a});return Promise.resolve(u)},d.prototype.addIceCandidate=function(t){var e,n=this;return t&&void 0===t.sdpMLineIndex&&!t.sdpMid?Promise.reject(new TypeError("sdpMLineIndex or sdpMid required")):new Promise(function(r,i){if(!n._remoteDescription)return i(s("InvalidStateError","Can not add ICE candidate without a remote description"));if(t&&""!==t.candidate){var a=t.sdpMLineIndex;if(t.sdpMid)for(var u=0;u<n.transceivers.length;u++)if(n.transceivers[u].mid===t.sdpMid){a=u;break}var l=n.transceivers[a];if(!l)return i(s("OperationError","Can not add ICE candidate"));if(l.rejected)return r();var d=Object.keys(t.candidate).length>0?c.parseCandidate(t.candidate):{};if("tcp"===d.protocol&&(0===d.port||9===d.port))return r();if(d.component&&1!==d.component)return r();if((0===a||a>0&&l.iceTransport!==n.transceivers[0].iceTransport)&&!o(l.iceTransport,d))return i(s("OperationError","Can not add ICE candidate"));var f=t.candidate.trim();0===f.indexOf("a=")&&(f=f.substr(2)),(e=c.getMediaSections(n._remoteDescription.sdp))[a]+="a="+(d.type?f:"end-of-candidates")+"\r\n",n._remoteDescription.sdp=c.getDescription(n._remoteDescription.sdp)+e.join("")}else for(var h=0;h<n.transceivers.length&&(n.transceivers[h].rejected||(n.transceivers[h].iceTransport.addRemoteCandidate({}),(e=c.getMediaSections(n._remoteDescription.sdp))[h]+="a=end-of-candidates\r\n",n._remoteDescription.sdp=c.getDescription(n._remoteDescription.sdp)+e.join(""),!n.usingBundle));h++);r()})},d.prototype.getStats=function(e){if(e&&e instanceof t.MediaStreamTrack){var n=null;if(this.transceivers.forEach(function(t){t.rtpSender&&t.rtpSender.track===e?n=t.rtpSender:t.rtpReceiver&&t.rtpReceiver.track===e&&(n=t.rtpReceiver)}),!n)throw s("InvalidAccessError","Invalid selector.");return n.getStats()}var r=[];return this.transceivers.forEach(function(t){["rtpSender","rtpReceiver","iceGatherer","iceTransport","dtlsTransport"].forEach(function(e){t[e]&&r.push(t[e].getStats())})}),Promise.all(r).then(function(t){var e=new Map;return t.forEach(function(t){t.forEach(function(t){e.set(t.id,t)})}),e})},["RTCRtpSender","RTCRtpReceiver","RTCIceGatherer","RTCIceTransport","RTCDtlsTransport"].forEach(function(e){var n=t[e];if(n&&n.prototype&&n.prototype.getStats){var r=n.prototype.getStats;n.prototype.getStats=function(){return r.apply(this).then(function(t){var e=new Map;return Object.keys(t).forEach(function(n){t[n].type=function(t){return{inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[t.type]||t.type}(t[n]),e.set(n,t[n])}),e})}}});var f=["createOffer","createAnswer"];return f.forEach(function(t){var e=d.prototype[t];d.prototype[t]=function(){var t=arguments;return"function"==typeof t[0]||"function"==typeof t[1]?e.apply(this,[arguments[2]]).then(function(e){"function"==typeof t[0]&&t[0].apply(null,[e])},function(e){"function"==typeof t[1]&&t[1].apply(null,[e])}):e.apply(this,arguments)}}),(f=["setLocalDescription","setRemoteDescription","addIceCandidate"]).forEach(function(t){var e=d.prototype[t];d.prototype[t]=function(){var t=arguments;return"function"==typeof t[1]||"function"==typeof t[2]?e.apply(this,arguments).then(function(){"function"==typeof t[1]&&t[1].apply(null)},function(e){"function"==typeof t[2]&&t[2].apply(null,[e])}):e.apply(this,arguments)}}),["getStats"].forEach(function(t){var e=d.prototype[t];d.prototype[t]=function(){var t=arguments;return"function"==typeof t[1]?e.apply(this,arguments).then(function(){"function"==typeof t[1]&&t[1].apply(null)}):e.apply(this,arguments)}}),d}},function(t,e,n){"use strict";var r={generateIdentifier:function(){return Math.random().toString(36).substr(2,10)}};r.localCName=r.generateIdentifier(),r.splitLines=function(t){return t.trim().split("\n").map(function(t){return t.trim()})},r.splitSections=function(t){return t.split("\nm=").map(function(t,e){return(e>0?"m="+t:t).trim()+"\r\n"})},r.getDescription=function(t){var e=r.splitSections(t);return e&&e[0]},r.getMediaSections=function(t){var e=r.splitSections(t);return e.shift(),e},r.matchPrefix=function(t,e){return r.splitLines(t).filter(function(t){return 0===t.indexOf(e)})},r.parseCandidate=function(t){for(var e,n={foundation:(e=0===t.indexOf("a=candidate:")?t.substring(12).split(" "):t.substring(10).split(" "))[0],component:parseInt(e[1],10),protocol:e[2].toLowerCase(),priority:parseInt(e[3],10),ip:e[4],port:parseInt(e[5],10),type:e[7]},r=8;r<e.length;r+=2)switch(e[r]){case"raddr":n.relatedAddress=e[r+1];break;case"rport":n.relatedPort=parseInt(e[r+1],10);break;case"tcptype":n.tcpType=e[r+1];break;case"ufrag":n.ufrag=e[r+1],n.usernameFragment=e[r+1];break;default:n[e[r]]=e[r+1]}return n},r.writeCandidate=function(t){var e=[];e.push(t.foundation),e.push(t.component),e.push(t.protocol.toUpperCase()),e.push(t.priority),e.push(t.ip),e.push(t.port);var n=t.type;return e.push("typ"),e.push(n),"host"!==n&&t.relatedAddress&&t.relatedPort&&(e.push("raddr"),e.push(t.relatedAddress),e.push("rport"),e.push(t.relatedPort)),t.tcpType&&"tcp"===t.protocol.toLowerCase()&&(e.push("tcptype"),e.push(t.tcpType)),(t.usernameFragment||t.ufrag)&&(e.push("ufrag"),e.push(t.usernameFragment||t.ufrag)),"candidate:"+e.join(" ")},r.parseIceOptions=function(t){return t.substr(14).split(" ")},r.parseRtpMap=function(t){var e=t.substr(9).split(" "),n={payloadType:parseInt(e.shift(),10)};return e=e[0].split("/"),n.name=e[0],n.clockRate=parseInt(e[1],10),n.channels=3===e.length?parseInt(e[2],10):1,n.numChannels=n.channels,n},r.writeRtpMap=function(t){var e=t.payloadType;void 0!==t.preferredPayloadType&&(e=t.preferredPayloadType);var n=t.channels||t.numChannels||1;return"a=rtpmap:"+e+" "+t.name+"/"+t.clockRate+(1!==n?"/"+n:"")+"\r\n"},r.parseExtmap=function(t){var e=t.substr(9).split(" ");return{id:parseInt(e[0],10),direction:e[0].indexOf("/")>0?e[0].split("/")[1]:"sendrecv",uri:e[1]}},r.writeExtmap=function(t){return"a=extmap:"+(t.id||t.preferredId)+(t.direction&&"sendrecv"!==t.direction?"/"+t.direction:"")+" "+t.uri+"\r\n"},r.parseFmtp=function(t){for(var e,n={},r=t.substr(t.indexOf(" ")+1).split(";"),i=0;i<r.length;i++)n[(e=r[i].trim().split("="))[0].trim()]=e[1];return n},r.writeFmtp=function(t){var e="",n=t.payloadType;if(void 0!==t.preferredPayloadType&&(n=t.preferredPayloadType),t.parameters&&Object.keys(t.parameters).length){var r=[];Object.keys(t.parameters).forEach(function(e){t.parameters[e]?r.push(e+"="+t.parameters[e]):r.push(e)}),e+="a=fmtp:"+n+" "+r.join(";")+"\r\n"}return e},r.parseRtcpFb=function(t){var e=t.substr(t.indexOf(" ")+1).split(" ");return{type:e.shift(),parameter:e.join(" ")}},r.writeRtcpFb=function(t){var e="",n=t.payloadType;return void 0!==t.preferredPayloadType&&(n=t.preferredPayloadType),t.rtcpFeedback&&t.rtcpFeedback.length&&t.rtcpFeedback.forEach(function(t){e+="a=rtcp-fb:"+n+" "+t.type+(t.parameter&&t.parameter.length?" "+t.parameter:"")+"\r\n"}),e},r.parseSsrcMedia=function(t){var e=t.indexOf(" "),n={ssrc:parseInt(t.substr(7,e-7),10)},r=t.indexOf(":",e);return r>-1?(n.attribute=t.substr(e+1,r-e-1),n.value=t.substr(r+1)):n.attribute=t.substr(e+1),n},r.getMid=function(t){var e=r.matchPrefix(t,"a=mid:")[0];if(e)return e.substr(6)},r.parseFingerprint=function(t){var e=t.substr(14).split(" ");return{algorithm:e[0].toLowerCase(),value:e[1]}},r.getDtlsParameters=function(t,e){return{role:"auto",fingerprints:r.matchPrefix(t+e,"a=fingerprint:").map(r.parseFingerprint)}},r.writeDtlsParameters=function(t,e){var n="a=setup:"+e+"\r\n";return t.fingerprints.forEach(function(t){n+="a=fingerprint:"+t.algorithm+" "+t.value+"\r\n"}),n},r.getIceParameters=function(t,e){var n=r.splitLines(t);return{usernameFragment:(n=n.concat(r.splitLines(e))).filter(function(t){return 0===t.indexOf("a=ice-ufrag:")})[0].substr(12),password:n.filter(function(t){return 0===t.indexOf("a=ice-pwd:")})[0].substr(10)}},r.writeIceParameters=function(t){return"a=ice-ufrag:"+t.usernameFragment+"\r\na=ice-pwd:"+t.password+"\r\n"},r.parseRtpParameters=function(t){for(var e={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},n=r.splitLines(t)[0].split(" "),i=3;i<n.length;i++){var a=n[i],o=r.matchPrefix(t,"a=rtpmap:"+a+" ")[0];if(o){var s=r.parseRtpMap(o),c=r.matchPrefix(t,"a=fmtp:"+a+" ");switch(s.parameters=c.length?r.parseFmtp(c[0]):{},s.rtcpFeedback=r.matchPrefix(t,"a=rtcp-fb:"+a+" ").map(r.parseRtcpFb),e.codecs.push(s),s.name.toUpperCase()){case"RED":case"ULPFEC":e.fecMechanisms.push(s.name.toUpperCase())}}}return r.matchPrefix(t,"a=extmap:").forEach(function(t){e.headerExtensions.push(r.parseExtmap(t))}),e},r.writeRtpDescription=function(t,e){var n="";n+="m="+t+" ",n+=e.codecs.length>0?"9":"0",n+=" UDP/TLS/RTP/SAVPF ",n+=e.codecs.map(function(t){return void 0!==t.preferredPayloadType?t.preferredPayloadType:t.payloadType}).join(" ")+"\r\n",n+="c=IN IP4 0.0.0.0\r\n",n+="a=rtcp:9 IN IP4 0.0.0.0\r\n",e.codecs.forEach(function(t){n+=r.writeRtpMap(t),n+=r.writeFmtp(t),n+=r.writeRtcpFb(t)});var i=0;return e.codecs.forEach(function(t){t.maxptime>i&&(i=t.maxptime)}),i>0&&(n+="a=maxptime:"+i+"\r\n"),n+="a=rtcp-mux\r\n",e.headerExtensions&&e.headerExtensions.forEach(function(t){n+=r.writeExtmap(t)}),n},r.parseRtpEncodingParameters=function(t){var e,n=[],i=r.parseRtpParameters(t),a=-1!==i.fecMechanisms.indexOf("RED"),o=-1!==i.fecMechanisms.indexOf("ULPFEC"),s=r.matchPrefix(t,"a=ssrc:").map(function(t){return r.parseSsrcMedia(t)}).filter(function(t){return"cname"===t.attribute}),c=s.length>0&&s[0].ssrc,u=r.matchPrefix(t,"a=ssrc-group:FID").map(function(t){return t.substr(17).split(" ").map(function(t){return parseInt(t,10)})});u.length>0&&u[0].length>1&&u[0][0]===c&&(e=u[0][1]),i.codecs.forEach(function(t){if("RTX"===t.name.toUpperCase()&&t.parameters.apt){var r={ssrc:c,codecPayloadType:parseInt(t.parameters.apt,10)};c&&e&&(r.rtx={ssrc:e}),n.push(r),a&&((r=JSON.parse(JSON.stringify(r))).fec={ssrc:e,mechanism:o?"red+ulpfec":"red"},n.push(r))}}),0===n.length&&c&&n.push({ssrc:c});var l=r.matchPrefix(t,"b=");return l.length&&(l=0===l[0].indexOf("b=TIAS:")?parseInt(l[0].substr(7),10):0===l[0].indexOf("b=AS:")?1e3*parseInt(l[0].substr(5),10)*.95-16e3:void 0,n.forEach(function(t){t.maxBitrate=l})),n},r.parseRtcpParameters=function(t){var e={},n=r.matchPrefix(t,"a=ssrc:").map(function(t){return r.parseSsrcMedia(t)}).filter(function(t){return"cname"===t.attribute})[0];n&&(e.cname=n.value,e.ssrc=n.ssrc);var i=r.matchPrefix(t,"a=rtcp-rsize");e.reducedSize=i.length>0,e.compound=0===i.length;var a=r.matchPrefix(t,"a=rtcp-mux");return e.mux=a.length>0,e},r.parseMsid=function(t){var e,n=r.matchPrefix(t,"a=msid:");if(1===n.length)return{stream:(e=n[0].substr(7).split(" "))[0],track:e[1]};var i=r.matchPrefix(t,"a=ssrc:").map(function(t){return r.parseSsrcMedia(t)}).filter(function(t){return"msid"===t.attribute});return i.length>0?{stream:(e=i[0].value.split(" "))[0],track:e[1]}:void 0},r.generateSessionId=function(){return Math.random().toString().substr(2,21)},r.writeSessionBoilerplate=function(t,e){var n=void 0!==e?e:2;return"v=0\r\no=thisisadapterortc "+(t||r.generateSessionId())+" "+n+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},r.writeMediaSection=function(t,e,n,i){var a=r.writeRtpDescription(t.kind,e);if(a+=r.writeIceParameters(t.iceGatherer.getLocalParameters()),a+=r.writeDtlsParameters(t.dtlsTransport.getLocalParameters(),"offer"===n?"actpass":"active"),a+="a=mid:"+t.mid+"\r\n",t.direction?a+="a="+t.direction+"\r\n":t.rtpSender&&t.rtpReceiver?a+="a=sendrecv\r\n":t.rtpSender?a+="a=sendonly\r\n":t.rtpReceiver?a+="a=recvonly\r\n":a+="a=inactive\r\n",t.rtpSender){var o="msid:"+i.id+" "+t.rtpSender.track.id+"\r\n";a+="a="+o,a+="a=ssrc:"+t.sendEncodingParameters[0].ssrc+" "+o,t.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+t.sendEncodingParameters[0].rtx.ssrc+" "+o,a+="a=ssrc-group:FID "+t.sendEncodingParameters[0].ssrc+" "+t.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return a+="a=ssrc:"+t.sendEncodingParameters[0].ssrc+" cname:"+r.localCName+"\r\n",t.rtpSender&&t.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+t.sendEncodingParameters[0].rtx.ssrc+" cname:"+r.localCName+"\r\n"),a},r.getDirection=function(t,e){for(var n=r.splitLines(t),i=0;i<n.length;i++)switch(n[i]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return n[i].substr(2)}return e?r.getDirection(e):"sendrecv"},r.getKind=function(t){return r.splitLines(t)[0].split(" ")[0].substr(2)},r.isRejected=function(t){return"0"===t.split(" ",2)[1]},r.parseMLine=function(t){var e=r.splitLines(t)[0].substr(2).split(" ");return{kind:e[0],port:parseInt(e[1],10),protocol:e[2],fmt:e.slice(3).join(" ")}},r.parseOLine=function(t){var e=r.matchPrefix(t,"o=")[0].substr(2).split(" ");return{username:e[0],sessionId:e[1],sessionVersion:parseInt(e[2],10),netType:e[3],addressType:e[4],address:e[5]}},t.exports=r},function(t,e,n){"use strict";t.exports=function(t){var e=t&&t.navigator,n=e.mediaDevices.getUserMedia.bind(e.mediaDevices);e.mediaDevices.getUserMedia=function(t){return n(t).catch(function(t){return Promise.reject(function(t){return{name:{PermissionDeniedError:"NotAllowedError"}[t.name]||t.name,message:t.message,constraint:t.constraint,toString:function(){return this.name}}}(t))})}}},function(t,e,n){"use strict";var r=n(6);t.exports={shimGetUserMedia:n(112),shimOnTrack:function(t){"object"!=typeof t||!t.RTCPeerConnection||"ontrack"in t.RTCPeerConnection.prototype||Object.defineProperty(t.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(t){this._ontrack&&(this.removeEventListener("track",this._ontrack),this.removeEventListener("addstream",this._ontrackpoly)),this.addEventListener("track",this._ontrack=t),this.addEventListener("addstream",this._ontrackpoly=function(t){t.stream.getTracks().forEach(function(e){var n=new Event("track");n.track=e,n.receiver={track:e},n.transceiver={receiver:n.receiver},n.streams=[t.stream],this.dispatchEvent(n)}.bind(this))}.bind(this))},enumerable:!0,configurable:!0}),"object"==typeof t&&t.RTCTrackEvent&&"receiver"in t.RTCTrackEvent.prototype&&!("transceiver"in t.RTCTrackEvent.prototype)&&Object.defineProperty(t.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})},shimSourceObject:function(t){"object"==typeof t&&(!t.HTMLMediaElement||"srcObject"in t.HTMLMediaElement.prototype||Object.defineProperty(t.HTMLMediaElement.prototype,"srcObject",{get:function(){return this.mozSrcObject},set:function(t){this.mozSrcObject=t}}))},shimPeerConnection:function(t){var e=r.detectBrowser(t);if("object"==typeof t&&(t.RTCPeerConnection||t.mozRTCPeerConnection)){t.RTCPeerConnection||(t.RTCPeerConnection=function(n,r){if(e.version<38&&n&&n.iceServers){for(var i=[],a=0;a<n.iceServers.length;a++){var o=n.iceServers[a];if(o.hasOwnProperty("urls"))for(var s=0;s<o.urls.length;s++){var c={url:o.urls[s]};0===o.urls[s].indexOf("turn")&&(c.username=o.username,c.credential=o.credential),i.push(c)}else i.push(n.iceServers[a])}n.iceServers=i}return new t.mozRTCPeerConnection(n,r)},t.RTCPeerConnection.prototype=t.mozRTCPeerConnection.prototype,t.mozRTCPeerConnection.generateCertificate&&Object.defineProperty(t.RTCPeerConnection,"generateCertificate",{get:function(){return t.mozRTCPeerConnection.generateCertificate}}),t.RTCSessionDescription=t.mozRTCSessionDescription,t.RTCIceCandidate=t.mozRTCIceCandidate),["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(e){var n=t.RTCPeerConnection.prototype[e];t.RTCPeerConnection.prototype[e]=function(){return arguments[0]=new("addIceCandidate"===e?t.RTCIceCandidate:t.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}});var n=t.RTCPeerConnection.prototype.addIceCandidate;t.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?n.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())};var i={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},a=t.RTCPeerConnection.prototype.getStats;t.RTCPeerConnection.prototype.getStats=function(t,n,r){return a.apply(this,[t||null]).then(function(t){if(e.version<48&&(t=function(t){var e=new Map;return Object.keys(t).forEach(function(n){e.set(n,t[n]),e[n]=t[n]}),e}(t)),e.version<53&&!n)try{t.forEach(function(t){t.type=i[t.type]||t.type})}catch(e){if("TypeError"!==e.name)throw e;t.forEach(function(e,n){t.set(n,Object.assign({},e,{type:i[e.type]||e.type}))})}return t}).then(n,r)}}},shimSenderGetStats:function(t){if("object"==typeof t&&t.RTCPeerConnection&&t.RTCRtpSender&&!(t.RTCRtpSender&&"getStats"in t.RTCRtpSender.prototype)){var e=t.RTCPeerConnection.prototype.getSenders;e&&(t.RTCPeerConnection.prototype.getSenders=function(){var t=this,n=e.apply(t,[]);return n.forEach(function(e){e._pc=t}),n});var n=t.RTCPeerConnection.prototype.addTrack;n&&(t.RTCPeerConnection.prototype.addTrack=function(){var t=n.apply(this,arguments);return t._pc=this,t}),t.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}},shimReceiverGetStats:function(t){if("object"==typeof t&&t.RTCPeerConnection&&t.RTCRtpSender&&!(t.RTCRtpSender&&"getStats"in t.RTCRtpReceiver.prototype)){var e=t.RTCPeerConnection.prototype.getReceivers;e&&(t.RTCPeerConnection.prototype.getReceivers=function(){var t=this,n=e.apply(t,[]);return n.forEach(function(e){e._pc=t}),n}),r.wrapPeerConnectionEvent(t,"track",function(t){return t.receiver._pc=t.srcElement,t}),t.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}},shimRemoveStream:function(t){!t.RTCPeerConnection||"removeStream"in t.RTCPeerConnection.prototype||(t.RTCPeerConnection.prototype.removeStream=function(t){var e=this;r.deprecated("removeStream","removeTrack"),this.getSenders().forEach(function(n){n.track&&-1!==t.getTracks().indexOf(n.track)&&e.removeTrack(n)})})},shimRTCDataChannel:function(t){t.DataChannel&&!t.RTCDataChannel&&(t.RTCDataChannel=t.DataChannel)},shimGetDisplayMedia:function(t,e){!t.navigator||!t.navigator.mediaDevices||"getDisplayMedia"in t.navigator.mediaDevices||(t.navigator.mediaDevices.getDisplayMedia=function(n){if(!n||!n.video){var r=new DOMException("getDisplayMedia without video constraints is undefined");return r.name="NotFoundError",r.code=8,Promise.reject(r)}return!0===n.video?n.video={mediaSource:e}:n.video.mediaSource=e,t.navigator.mediaDevices.getUserMedia(n)},t.navigator.getDisplayMedia=function(e){return r.deprecated("navigator.getDisplayMedia","navigator.mediaDevices.getDisplayMedia"),t.navigator.mediaDevices.getDisplayMedia(e)})}}},function(t,e,n){"use strict";var r=n(6),i=r.log;t.exports=function(t){var e=r.detectBrowser(t),n=t&&t.navigator,a=t&&t.MediaStreamTrack,o=function(t){return{name:{InternalError:"NotReadableError",NotSupportedError:"TypeError",PermissionDeniedError:"NotAllowedError",SecurityError:"NotAllowedError"}[t.name]||t.name,message:{"The operation is insecure.":"The request is not allowed by the user agent or the platform in the current context."}[t.message]||t.message,constraint:t.constraint,toString:function(){return this.name+(this.message&&": ")+this.message}}},s=function(t,r,a){var s=function(t){if("object"!=typeof t||t.require)return t;var e=[];return Object.keys(t).forEach(function(n){if("require"!==n&&"advanced"!==n&&"mediaSource"!==n){var r=t[n]="object"==typeof t[n]?t[n]:{ideal:t[n]};if(void 0===r.min&&void 0===r.max&&void 0===r.exact||e.push(n),void 0!==r.exact&&("number"==typeof r.exact?r.min=r.max=r.exact:t[n]=r.exact,delete r.exact),void 0!==r.ideal){t.advanced=t.advanced||[];var i={};"number"==typeof r.ideal?i[n]={min:r.ideal,max:r.ideal}:i[n]=r.ideal,t.advanced.push(i),delete r.ideal,Object.keys(r).length||delete t[n]}}}),e.length&&(t.require=e),t};return t=JSON.parse(JSON.stringify(t)),e.version<38&&(i("spec: "+JSON.stringify(t)),t.audio&&(t.audio=s(t.audio)),t.video&&(t.video=s(t.video)),i("ff37: "+JSON.stringify(t))),n.mozGetUserMedia(t,r,function(t){a(o(t))})};if(n.mediaDevices||(n.mediaDevices={getUserMedia:function(t){return new Promise(function(e,n){s(t,e,n)})},addEventListener:function(){},removeEventListener:function(){}}),n.mediaDevices.enumerateDevices=n.mediaDevices.enumerateDevices||function(){return new Promise(function(t){t([{kind:"audioinput",deviceId:"default",label:"",groupId:""},{kind:"videoinput",deviceId:"default",label:"",groupId:""}])})},e.version<41){var c=n.mediaDevices.enumerateDevices.bind(n.mediaDevices);n.mediaDevices.enumerateDevices=function(){return c().then(void 0,function(t){if("NotFoundError"===t.name)return[];throw t})}}if(e.version<49){var u=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(t){return u(t).then(function(e){if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(function(t){t.stop()}),new DOMException("The object can not be found here.","NotFoundError");return e},function(t){return Promise.reject(o(t))})}}if(!(e.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){var l=function(t,e,n){e in t&&!(n in t)&&(t[n]=t[e],delete t[e])},d=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(t){return"object"==typeof t&&"object"==typeof t.audio&&(t=JSON.parse(JSON.stringify(t)),l(t.audio,"autoGainControl","mozAutoGainControl"),l(t.audio,"noiseSuppression","mozNoiseSuppression")),d(t)},a&&a.prototype.getSettings){var f=a.prototype.getSettings;a.prototype.getSettings=function(){var t=f.apply(this,arguments);return l(t,"mozAutoGainControl","autoGainControl"),l(t,"mozNoiseSuppression","noiseSuppression"),t}}if(a&&a.prototype.applyConstraints){var h=a.prototype.applyConstraints;a.prototype.applyConstraints=function(t){return"audio"===this.kind&&"object"==typeof t&&(t=JSON.parse(JSON.stringify(t)),l(t,"autoGainControl","mozAutoGainControl"),l(t,"noiseSuppression","mozNoiseSuppression")),h.apply(this,[t])}}}n.getUserMedia=function(t,i,a){if(e.version<44)return s(t,i,a);r.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(t).then(i,a)}}},function(t,e,n){"use strict";var r=n(6);t.exports={shimLocalStreamsAPI:function(t){if("object"==typeof t&&t.RTCPeerConnection){if("getLocalStreams"in t.RTCPeerConnection.prototype||(t.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),"getStreamById"in t.RTCPeerConnection.prototype||(t.RTCPeerConnection.prototype.getStreamById=function(t){var e=null;return this._localStreams&&this._localStreams.forEach(function(n){n.id===t&&(e=n)}),this._remoteStreams&&this._remoteStreams.forEach(function(n){n.id===t&&(e=n)}),e}),!("addStream"in t.RTCPeerConnection.prototype)){var e=t.RTCPeerConnection.prototype.addTrack;t.RTCPeerConnection.prototype.addStream=function(t){this._localStreams||(this._localStreams=[]),-1===this._localStreams.indexOf(t)&&this._localStreams.push(t);var n=this;t.getTracks().forEach(function(r){e.call(n,r,t)})},t.RTCPeerConnection.prototype.addTrack=function(t,n){return n&&(this._localStreams?-1===this._localStreams.indexOf(n)&&this._localStreams.push(n):this._localStreams=[n]),e.call(this,t,n)}}"removeStream"in t.RTCPeerConnection.prototype||(t.RTCPeerConnection.prototype.removeStream=function(t){this._localStreams||(this._localStreams=[]);var e=this._localStreams.indexOf(t);if(-1!==e){this._localStreams.splice(e,1);var n=this,r=t.getTracks();this.getSenders().forEach(function(t){-1!==r.indexOf(t.track)&&n.removeTrack(t)})}})}},shimRemoteStreamsAPI:function(t){if("object"==typeof t&&t.RTCPeerConnection&&("getRemoteStreams"in t.RTCPeerConnection.prototype||(t.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in t.RTCPeerConnection.prototype))){Object.defineProperty(t.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(t){this._onaddstream&&this.removeEventListener("addstream",this._onaddstream),this.addEventListener("addstream",this._onaddstream=t)}});var e=t.RTCPeerConnection.prototype.setRemoteDescription;t.RTCPeerConnection.prototype.setRemoteDescription=function(){var t=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(e){e.streams.forEach(function(e){if(t._remoteStreams||(t._remoteStreams=[]),!(t._remoteStreams.indexOf(e)>=0)){t._remoteStreams.push(e);var n=new Event("addstream");n.stream=e,t.dispatchEvent(n)}})}),e.apply(t,arguments)}}},shimCallbacksAPI:function(t){if("object"==typeof t&&t.RTCPeerConnection){var e=t.RTCPeerConnection.prototype,n=e.createOffer,r=e.createAnswer,i=e.setLocalDescription,a=e.setRemoteDescription,o=e.addIceCandidate;e.createOffer=function(t,e){var r=arguments.length>=2?arguments[2]:arguments[0],i=n.apply(this,[r]);return e?(i.then(t,e),Promise.resolve()):i},e.createAnswer=function(t,e){var n=arguments.length>=2?arguments[2]:arguments[0],i=r.apply(this,[n]);return e?(i.then(t,e),Promise.resolve()):i};var s=function(t,e,n){var r=i.apply(this,[t]);return n?(r.then(e,n),Promise.resolve()):r};e.setLocalDescription=s,s=function(t,e,n){var r=a.apply(this,[t]);return n?(r.then(e,n),Promise.resolve()):r},e.setRemoteDescription=s,s=function(t,e,n){var r=o.apply(this,[t]);return n?(r.then(e,n),Promise.resolve()):r},e.addIceCandidate=s}},shimGetUserMedia:function(t){var e=t&&t.navigator;e.getUserMedia||(e.webkitGetUserMedia?e.getUserMedia=e.webkitGetUserMedia.bind(e):e.mediaDevices&&e.mediaDevices.getUserMedia&&(e.getUserMedia=function(t,n,r){e.mediaDevices.getUserMedia(t).then(n,r)}.bind(e)))},shimRTCIceServerUrls:function(t){var e=t.RTCPeerConnection;t.RTCPeerConnection=function(t,n){if(t&&t.iceServers){for(var i=[],a=0;a<t.iceServers.length;a++){var o=t.iceServers[a];!o.hasOwnProperty("urls")&&o.hasOwnProperty("url")?(r.deprecated("RTCIceServer.url","RTCIceServer.urls"),(o=JSON.parse(JSON.stringify(o))).urls=o.url,delete o.url,i.push(o)):i.push(t.iceServers[a])}t.iceServers=i}return new e(t,n)},t.RTCPeerConnection.prototype=e.prototype,"generateCertificate"in t.RTCPeerConnection&&Object.defineProperty(t.RTCPeerConnection,"generateCertificate",{get:function(){return e.generateCertificate}})},shimTrackEventTransceiver:function(t){"object"==typeof t&&t.RTCPeerConnection&&"receiver"in t.RTCTrackEvent.prototype&&!t.RTCTransceiver&&Object.defineProperty(t.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})},shimCreateOfferLegacy:function(t){var e=t.RTCPeerConnection.prototype.createOffer;t.RTCPeerConnection.prototype.createOffer=function(t){var n=this;if(t){void 0!==t.offerToReceiveAudio&&(t.offerToReceiveAudio=!!t.offerToReceiveAudio);var r=n.getTransceivers().find(function(t){return t.sender.track&&"audio"===t.sender.track.kind});!1===t.offerToReceiveAudio&&r?"sendrecv"===r.direction?r.setDirection?r.setDirection("sendonly"):r.direction="sendonly":"recvonly"===r.direction&&(r.setDirection?r.setDirection("inactive"):r.direction="inactive"):!0!==t.offerToReceiveAudio||r||n.addTransceiver("audio"),void 0!==t.offerToReceiveVideo&&(t.offerToReceiveVideo=!!t.offerToReceiveVideo);var i=n.getTransceivers().find(function(t){return t.sender.track&&"video"===t.sender.track.kind});!1===t.offerToReceiveVideo&&i?"sendrecv"===i.direction?i.setDirection("sendonly"):"recvonly"===i.direction&&i.setDirection("inactive"):!0!==t.offerToReceiveVideo||i||n.addTransceiver("video")}return e.apply(n,arguments)}}}},function(t,e,n){"use strict";var r=n(115),i=n(6);t.exports={shimRTCIceCandidate:function(t){if(t.RTCIceCandidate&&!(t.RTCIceCandidate&&"foundation"in t.RTCIceCandidate.prototype)){var e=t.RTCIceCandidate;t.RTCIceCandidate=function(t){if("object"==typeof t&&t.candidate&&0===t.candidate.indexOf("a=")&&((t=JSON.parse(JSON.stringify(t))).candidate=t.candidate.substr(2)),t.candidate&&t.candidate.length){var n=new e(t),i=r.parseCandidate(t.candidate),a=Object.assign(n,i);return a.toJSON=function(){return{candidate:a.candidate,sdpMid:a.sdpMid,sdpMLineIndex:a.sdpMLineIndex,usernameFragment:a.usernameFragment}},a}return new e(t)},t.RTCIceCandidate.prototype=e.prototype,i.wrapPeerConnectionEvent(t,"icecandidate",function(e){return e.candidate&&Object.defineProperty(e,"candidate",{value:new t.RTCIceCandidate(e.candidate),writable:"false"}),e})}},shimCreateObjectURL:function(t){var e=t&&t.URL;if("object"==typeof t&&t.HTMLMediaElement&&"srcObject"in t.HTMLMediaElement.prototype&&e.createObjectURL&&e.revokeObjectURL){var n=e.createObjectURL.bind(e),r=e.revokeObjectURL.bind(e),a=new Map,o=0;e.createObjectURL=function(t){if("getTracks"in t){var e="polyblob:"+ ++o;return a.set(e,t),i.deprecated("URL.createObjectURL(stream)","elem.srcObject = stream"),e}return n(t)},e.revokeObjectURL=function(t){r(t),a.delete(t)};var s=Object.getOwnPropertyDescriptor(t.HTMLMediaElement.prototype,"src");Object.defineProperty(t.HTMLMediaElement.prototype,"src",{get:function(){return s.get.apply(this)},set:function(t){return this.srcObject=a.get(t)||null,s.set.apply(this,[t])}});var c=t.HTMLMediaElement.prototype.setAttribute;t.HTMLMediaElement.prototype.setAttribute=function(){return 2===arguments.length&&"src"===(""+arguments[0]).toLowerCase()&&(this.srcObject=a.get(arguments[1])||null),c.apply(this,arguments)}}},shimMaxMessageSize:function(t){if(!t.RTCSctpTransport&&t.RTCPeerConnection){var e=i.detectBrowser(t);"sctp"in t.RTCPeerConnection.prototype||Object.defineProperty(t.RTCPeerConnection.prototype,"sctp",{get:function(){return void 0===this._sctp?null:this._sctp}});var n=function(t){var e=r.splitSections(t.sdp);return e.shift(),e.some(function(t){var e=r.parseMLine(t);return e&&"application"===e.kind&&-1!==e.protocol.indexOf("SCTP")})},a=function(t){var n=65536;return"firefox"===e.browser&&(n=e.version<57?-1===t?16384:2147483637:e.version<60?57===e.version?65535:65536:2147483637),n},o=function(t,n){var i=65536;"firefox"===e.browser&&57===e.version&&(i=65535);var a=r.matchPrefix(t.sdp,"a=max-message-size:");return a.length>0?i=parseInt(a[0].substr(19),10):"firefox"===e.browser&&-1!==n&&(i=2147483637),i},s=t.RTCPeerConnection.prototype.setRemoteDescription;t.RTCPeerConnection.prototype.setRemoteDescription=function(){var t=this;if(t._sctp=null,n(arguments[0])){var e,r=function(t){var e=t.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===e||e.length<2)return-1;var n=parseInt(e[1],10);return n!=n?-1:n}(arguments[0]),i=a(r),c=o(arguments[0],r);e=0===i&&0===c?Number.POSITIVE_INFINITY:0===i||0===c?Math.max(i,c):Math.min(i,c);var u={};Object.defineProperty(u,"maxMessageSize",{get:function(){return e}}),t._sctp=u}return s.apply(t,arguments)}}},shimSendThrowTypeError:function(t){function e(t,e){var n=t.send;t.send=function(){var r=arguments[0],i=r.length||r.size||r.byteLength;if("open"===t.readyState&&e.sctp&&i>e.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+e.sctp.maxMessageSize+" bytes)");return n.apply(t,arguments)}}if(t.RTCPeerConnection&&"createDataChannel"in t.RTCPeerConnection.prototype){var n=t.RTCPeerConnection.prototype.createDataChannel;t.RTCPeerConnection.prototype.createDataChannel=function(){var t=n.apply(this,arguments);return e(t,this),t},i.wrapPeerConnectionEvent(t,"datachannel",function(t){return e(t.channel,t.target),t})}}}},function(t,e,n){"use strict";var r={generateIdentifier:function(){return Math.random().toString(36).substr(2,10)}};r.localCName=r.generateIdentifier(),r.splitLines=function(t){return t.trim().split("\n").map(function(t){return t.trim()})},r.splitSections=function(t){return t.split("\nm=").map(function(t,e){return(e>0?"m="+t:t).trim()+"\r\n"})},r.getDescription=function(t){var e=r.splitSections(t);return e&&e[0]},r.getMediaSections=function(t){var e=r.splitSections(t);return e.shift(),e},r.matchPrefix=function(t,e){return r.splitLines(t).filter(function(t){return 0===t.indexOf(e)})},r.parseCandidate=function(t){for(var e,n={foundation:(e=0===t.indexOf("a=candidate:")?t.substring(12).split(" "):t.substring(10).split(" "))[0],component:parseInt(e[1],10),protocol:e[2].toLowerCase(),priority:parseInt(e[3],10),ip:e[4],address:e[4],port:parseInt(e[5],10),type:e[7]},r=8;r<e.length;r+=2)switch(e[r]){case"raddr":n.relatedAddress=e[r+1];break;case"rport":n.relatedPort=parseInt(e[r+1],10);break;case"tcptype":n.tcpType=e[r+1];break;case"ufrag":n.ufrag=e[r+1],n.usernameFragment=e[r+1];break;default:n[e[r]]=e[r+1]}return n},r.writeCandidate=function(t){var e=[];e.push(t.foundation),e.push(t.component),e.push(t.protocol.toUpperCase()),e.push(t.priority),e.push(t.address||t.ip),e.push(t.port);var n=t.type;return e.push("typ"),e.push(n),"host"!==n&&t.relatedAddress&&t.relatedPort&&(e.push("raddr"),e.push(t.relatedAddress),e.push("rport"),e.push(t.relatedPort)),t.tcpType&&"tcp"===t.protocol.toLowerCase()&&(e.push("tcptype"),e.push(t.tcpType)),(t.usernameFragment||t.ufrag)&&(e.push("ufrag"),e.push(t.usernameFragment||t.ufrag)),"candidate:"+e.join(" ")},r.parseIceOptions=function(t){return t.substr(14).split(" ")},r.parseRtpMap=function(t){var e=t.substr(9).split(" "),n={payloadType:parseInt(e.shift(),10)};return e=e[0].split("/"),n.name=e[0],n.clockRate=parseInt(e[1],10),n.channels=3===e.length?parseInt(e[2],10):1,n.numChannels=n.channels,n},r.writeRtpMap=function(t){var e=t.payloadType;void 0!==t.preferredPayloadType&&(e=t.preferredPayloadType);var n=t.channels||t.numChannels||1;return"a=rtpmap:"+e+" "+t.name+"/"+t.clockRate+(1!==n?"/"+n:"")+"\r\n"},r.parseExtmap=function(t){var e=t.substr(9).split(" ");return{id:parseInt(e[0],10),direction:e[0].indexOf("/")>0?e[0].split("/")[1]:"sendrecv",uri:e[1]}},r.writeExtmap=function(t){return"a=extmap:"+(t.id||t.preferredId)+(t.direction&&"sendrecv"!==t.direction?"/"+t.direction:"")+" "+t.uri+"\r\n"},r.parseFmtp=function(t){for(var e,n={},r=t.substr(t.indexOf(" ")+1).split(";"),i=0;i<r.length;i++)n[(e=r[i].trim().split("="))[0].trim()]=e[1];return n},r.writeFmtp=function(t){var e="",n=t.payloadType;if(void 0!==t.preferredPayloadType&&(n=t.preferredPayloadType),t.parameters&&Object.keys(t.parameters).length){var r=[];Object.keys(t.parameters).forEach(function(e){t.parameters[e]?r.push(e+"="+t.parameters[e]):r.push(e)}),e+="a=fmtp:"+n+" "+r.join(";")+"\r\n"}return e},r.parseRtcpFb=function(t){var e=t.substr(t.indexOf(" ")+1).split(" ");return{type:e.shift(),parameter:e.join(" ")}},r.writeRtcpFb=function(t){var e="",n=t.payloadType;return void 0!==t.preferredPayloadType&&(n=t.preferredPayloadType),t.rtcpFeedback&&t.rtcpFeedback.length&&t.rtcpFeedback.forEach(function(t){e+="a=rtcp-fb:"+n+" "+t.type+(t.parameter&&t.parameter.length?" "+t.parameter:"")+"\r\n"}),e},r.parseSsrcMedia=function(t){var e=t.indexOf(" "),n={ssrc:parseInt(t.substr(7,e-7),10)},r=t.indexOf(":",e);return r>-1?(n.attribute=t.substr(e+1,r-e-1),n.value=t.substr(r+1)):n.attribute=t.substr(e+1),n},r.parseSsrcGroup=function(t){var e=t.substr(13).split(" ");return{semantics:e.shift(),ssrcs:e.map(function(t){return parseInt(t,10)})}},r.getMid=function(t){var e=r.matchPrefix(t,"a=mid:")[0];if(e)return e.substr(6)},r.parseFingerprint=function(t){var e=t.substr(14).split(" ");return{algorithm:e[0].toLowerCase(),value:e[1]}},r.getDtlsParameters=function(t,e){return{role:"auto",fingerprints:r.matchPrefix(t+e,"a=fingerprint:").map(r.parseFingerprint)}},r.writeDtlsParameters=function(t,e){var n="a=setup:"+e+"\r\n";return t.fingerprints.forEach(function(t){n+="a=fingerprint:"+t.algorithm+" "+t.value+"\r\n"}),n},r.getIceParameters=function(t,e){var n=r.splitLines(t);return{usernameFragment:(n=n.concat(r.splitLines(e))).filter(function(t){return 0===t.indexOf("a=ice-ufrag:")})[0].substr(12),password:n.filter(function(t){return 0===t.indexOf("a=ice-pwd:")})[0].substr(10)}},r.writeIceParameters=function(t){return"a=ice-ufrag:"+t.usernameFragment+"\r\na=ice-pwd:"+t.password+"\r\n"},r.parseRtpParameters=function(t){for(var e={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},n=r.splitLines(t)[0].split(" "),i=3;i<n.length;i++){var a=n[i],o=r.matchPrefix(t,"a=rtpmap:"+a+" ")[0];if(o){var s=r.parseRtpMap(o),c=r.matchPrefix(t,"a=fmtp:"+a+" ");switch(s.parameters=c.length?r.parseFmtp(c[0]):{},s.rtcpFeedback=r.matchPrefix(t,"a=rtcp-fb:"+a+" ").map(r.parseRtcpFb),e.codecs.push(s),s.name.toUpperCase()){case"RED":case"ULPFEC":e.fecMechanisms.push(s.name.toUpperCase())}}}return r.matchPrefix(t,"a=extmap:").forEach(function(t){e.headerExtensions.push(r.parseExtmap(t))}),e},r.writeRtpDescription=function(t,e){var n="";n+="m="+t+" ",n+=e.codecs.length>0?"9":"0",n+=" UDP/TLS/RTP/SAVPF ",n+=e.codecs.map(function(t){return void 0!==t.preferredPayloadType?t.preferredPayloadType:t.payloadType}).join(" ")+"\r\n",n+="c=IN IP4 0.0.0.0\r\n",n+="a=rtcp:9 IN IP4 0.0.0.0\r\n",e.codecs.forEach(function(t){n+=r.writeRtpMap(t),n+=r.writeFmtp(t),n+=r.writeRtcpFb(t)});var i=0;return e.codecs.forEach(function(t){t.maxptime>i&&(i=t.maxptime)}),i>0&&(n+="a=maxptime:"+i+"\r\n"),n+="a=rtcp-mux\r\n",e.headerExtensions&&e.headerExtensions.forEach(function(t){n+=r.writeExtmap(t)}),n},r.parseRtpEncodingParameters=function(t){var e,n=[],i=r.parseRtpParameters(t),a=-1!==i.fecMechanisms.indexOf("RED"),o=-1!==i.fecMechanisms.indexOf("ULPFEC"),s=r.matchPrefix(t,"a=ssrc:").map(function(t){return r.parseSsrcMedia(t)}).filter(function(t){return"cname"===t.attribute}),c=s.length>0&&s[0].ssrc,u=r.matchPrefix(t,"a=ssrc-group:FID").map(function(t){return t.substr(17).split(" ").map(function(t){return parseInt(t,10)})});u.length>0&&u[0].length>1&&u[0][0]===c&&(e=u[0][1]),i.codecs.forEach(function(t){if("RTX"===t.name.toUpperCase()&&t.parameters.apt){var r={ssrc:c,codecPayloadType:parseInt(t.parameters.apt,10)};c&&e&&(r.rtx={ssrc:e}),n.push(r),a&&((r=JSON.parse(JSON.stringify(r))).fec={ssrc:c,mechanism:o?"red+ulpfec":"red"},n.push(r))}}),0===n.length&&c&&n.push({ssrc:c});var l=r.matchPrefix(t,"b=");return l.length&&(l=0===l[0].indexOf("b=TIAS:")?parseInt(l[0].substr(7),10):0===l[0].indexOf("b=AS:")?1e3*parseInt(l[0].substr(5),10)*.95-16e3:void 0,n.forEach(function(t){t.maxBitrate=l})),n},r.parseRtcpParameters=function(t){var e={},n=r.matchPrefix(t,"a=ssrc:").map(function(t){return r.parseSsrcMedia(t)}).filter(function(t){return"cname"===t.attribute})[0];n&&(e.cname=n.value,e.ssrc=n.ssrc);var i=r.matchPrefix(t,"a=rtcp-rsize");e.reducedSize=i.length>0,e.compound=0===i.length;var a=r.matchPrefix(t,"a=rtcp-mux");return e.mux=a.length>0,e},r.parseMsid=function(t){var e,n=r.matchPrefix(t,"a=msid:");if(1===n.length)return{stream:(e=n[0].substr(7).split(" "))[0],track:e[1]};var i=r.matchPrefix(t,"a=ssrc:").map(function(t){return r.parseSsrcMedia(t)}).filter(function(t){return"msid"===t.attribute});return i.length>0?{stream:(e=i[0].value.split(" "))[0],track:e[1]}:void 0},r.generateSessionId=function(){return Math.random().toString().substr(2,21)},r.writeSessionBoilerplate=function(t,e,n){var i,a=void 0!==e?e:2;return i=t||r.generateSessionId(),"v=0\r\no="+(n||"thisisadapterortc")+" "+i+" "+a+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},r.writeMediaSection=function(t,e,n,i){var a=r.writeRtpDescription(t.kind,e);if(a+=r.writeIceParameters(t.iceGatherer.getLocalParameters()),a+=r.writeDtlsParameters(t.dtlsTransport.getLocalParameters(),"offer"===n?"actpass":"active"),a+="a=mid:"+t.mid+"\r\n",t.direction?a+="a="+t.direction+"\r\n":t.rtpSender&&t.rtpReceiver?a+="a=sendrecv\r\n":t.rtpSender?a+="a=sendonly\r\n":t.rtpReceiver?a+="a=recvonly\r\n":a+="a=inactive\r\n",t.rtpSender){var o="msid:"+i.id+" "+t.rtpSender.track.id+"\r\n";a+="a="+o,a+="a=ssrc:"+t.sendEncodingParameters[0].ssrc+" "+o,t.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+t.sendEncodingParameters[0].rtx.ssrc+" "+o,a+="a=ssrc-group:FID "+t.sendEncodingParameters[0].ssrc+" "+t.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return a+="a=ssrc:"+t.sendEncodingParameters[0].ssrc+" cname:"+r.localCName+"\r\n",t.rtpSender&&t.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+t.sendEncodingParameters[0].rtx.ssrc+" cname:"+r.localCName+"\r\n"),a},r.getDirection=function(t,e){for(var n=r.splitLines(t),i=0;i<n.length;i++)switch(n[i]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return n[i].substr(2)}return e?r.getDirection(e):"sendrecv"},r.getKind=function(t){return r.splitLines(t)[0].split(" ")[0].substr(2)},r.isRejected=function(t){return"0"===t.split(" ",2)[1]},r.parseMLine=function(t){var e=r.splitLines(t)[0].substr(2).split(" ");return{kind:e[0],port:parseInt(e[1],10),protocol:e[2],fmt:e.slice(3).join(" ")}},r.parseOLine=function(t){var e=r.matchPrefix(t,"o=")[0].substr(2).split(" ");return{username:e[0],sessionId:e[1],sessionVersion:parseInt(e[2],10),netType:e[3],addressType:e[4],address:e[5]}},r.isValidSDP=function(t){if("string"!=typeof t||0===t.length)return!1;for(var e=r.splitLines(t),n=0;n<e.length;n++)if(e[n].length<2||"="!==e[n].charAt(1))return!1;return!0},t.exports=r},function(t,e,n){t.exports={default:n(117),__esModule:!0}},function(t,e,n){n(118),t.exports=n(0).Object.getPrototypeOf},function(t,e,n){var r=n(35),i=n(51);n(119)("getPrototypeOf",function(){return function(t){return i(r(t))}})},function(t,e,n){var r=n(3),i=n(0),a=n(16);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],o={};o[t]=e(n),r(r.S+r.F*a(function(){n(1)}),"Object",o)}},function(t,e,n){"use strict";e.__esModule=!0;var r=function(t){return t&&t.__esModule?t:{default:t}}(n(64));e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":(0,r.default)(e))&&"function"!=typeof e?t:e}},function(t,e,n){t.exports={default:n(122),__esModule:!0}},function(t,e,n){n(24),n(52),t.exports=n(39).f("iterator")},function(t,e,n){t.exports={default:n(124),__esModule:!0}},function(t,e,n){n(125),n(45),n(130),n(131),t.exports=n(0).Symbol},function(t,e,n){"use strict";var r=n(1),i=n(10),a=n(8),o=n(3),s=n(48),c=n(126).KEY,u=n(16),l=n(33),d=n(23),f=n(22),h=n(2),p=n(39),m=n(40),v=n(127),_=n(128),g=n(5),b=n(7),y=n(14),x=n(28),w=n(17),k=n(29),C=n(129),E=n(67),S=n(4),I=n(30),M=E.f,T=S.f,D=C.f,R=r.Symbol,P=r.JSON,O=P&&P.stringify,L=h("_hidden"),A=h("toPrimitive"),N={}.propertyIsEnumerable,B=l("symbol-registry"),j=l("symbols"),F=l("op-symbols"),Y=Object.prototype,$="function"==typeof R,z=r.QObject,V=!z||!z.prototype||!z.prototype.findChild,H=a&&u(function(){return 7!=k(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=M(Y,e);r&&delete Y[e],T(t,e,n),r&&t!==Y&&T(Y,e,r)}:T,q=function(t){var e=j[t]=k(R.prototype);return e._k=t,e},W=$&&"symbol"==typeof R.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof R},U=function(t,e,n){return t===Y&&U(F,e,n),g(t),e=x(e,!0),g(n),i(j,e)?(n.enumerable?(i(t,L)&&t[L][e]&&(t[L][e]=!1),n=k(n,{enumerable:w(0,!1)})):(i(t,L)||T(t,L,w(1,{})),t[L][e]=!0),H(t,e,n)):T(t,e,n)},G=function(t,e){g(t);for(var n,r=v(e=y(e)),i=0,a=r.length;a>i;)U(t,n=r[i++],e[n]);return t},K=function(t){var e=N.call(this,t=x(t,!0));return!(this===Y&&i(j,t)&&!i(F,t))&&(!(e||!i(this,t)||!i(j,t)||i(this,L)&&this[L][t])||e)},X=function(t,e){if(t=y(t),e=x(e,!0),t!==Y||!i(j,e)||i(F,e)){var n=M(t,e);return!n||!i(j,e)||i(t,L)&&t[L][e]||(n.enumerable=!0),n}},J=function(t){for(var e,n=D(y(t)),r=[],a=0;n.length>a;)i(j,e=n[a++])||e==L||e==c||r.push(e);return r},Z=function(t){for(var e,n=t===Y,r=D(n?F:y(t)),a=[],o=0;r.length>o;)!i(j,e=r[o++])||n&&!i(Y,e)||a.push(j[e]);return a};$||(s((R=function(){if(this instanceof R)throw TypeError("Symbol is not a constructor!");var t=f(arguments.length>0?arguments[0]:void 0),e=function(n){this===Y&&e.call(F,n),i(this,L)&&i(this[L],t)&&(this[L][t]=!1),H(this,t,w(1,n))};return a&&V&&H(Y,t,{configurable:!0,set:e}),q(t)}).prototype,"toString",function(){return this._k}),E.f=X,S.f=U,n(66).f=C.f=J,n(41).f=K,n(65).f=Z,a&&!n(15)&&s(Y,"propertyIsEnumerable",K,!0),p.f=function(t){return q(h(t))}),o(o.G+o.W+o.F*!$,{Symbol:R});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;Q.length>tt;)h(Q[tt++]);for(var et=I(h.store),nt=0;et.length>nt;)m(et[nt++]);o(o.S+o.F*!$,"Symbol",{for:function(t){return i(B,t+="")?B[t]:B[t]=R(t)},keyFor:function(t){if(!W(t))throw TypeError(t+" is not a symbol!");for(var e in B)if(B[e]===t)return e},useSetter:function(){V=!0},useSimple:function(){V=!1}}),o(o.S+o.F*!$,"Object",{create:function(t,e){return void 0===e?k(t):G(k(t),e)},defineProperty:U,defineProperties:G,getOwnPropertyDescriptor:X,getOwnPropertyNames:J,getOwnPropertySymbols:Z}),P&&o(o.S+o.F*(!$||u(function(){var t=R();return"[null]"!=O([t])||"{}"!=O({a:t})||"{}"!=O(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(b(e)||void 0!==t)&&!W(t))return _(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!W(e))return e}),r[1]=e,O.apply(P,r)}}),R.prototype[A]||n(9)(R.prototype,A,R.prototype.valueOf),d(R,"Symbol"),d(Math,"Math",!0),d(r.JSON,"JSON",!0)},function(t,e,n){var r=n(22)("meta"),i=n(7),a=n(10),o=n(4).f,s=0,c=Object.isExtensible||function(){return!0},u=!n(16)(function(){return c(Object.preventExtensions({}))}),l=function(t){o(t,r,{value:{i:"O"+ ++s,w:{}}})},d=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!a(t,r)){if(!c(t))return"F";if(!e)return"E";l(t)}return t[r].i},getWeak:function(t,e){if(!a(t,r)){if(!c(t))return!0;if(!e)return!1;l(t)}return t[r].w},onFreeze:function(t){return u&&d.NEED&&c(t)&&!a(t,r)&&l(t),t}}},function(t,e,n){var r=n(30),i=n(65),a=n(41);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var o,s=n(t),c=a.f,u=0;s.length>u;)c.call(t,o=s[u++])&&e.push(o);return e}},function(t,e,n){var r=n(19);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(14),i=n(66).f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return o&&"[object Window]"==a.call(t)?function(t){try{return i(t)}catch(t){return o.slice()}}(t):i(r(t))}},function(t,e,n){n(40)("asyncIterator")},function(t,e,n){n(40)("observable")},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=r(n(133)),a=r(n(137)),o=r(n(64));e.default=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":(0,o.default)(e)));t.prototype=(0,a.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(i.default?(0,i.default)(t,e):t.__proto__=e)}},function(t,e,n){t.exports={default:n(134),__esModule:!0}},function(t,e,n){n(135),t.exports=n(0).Object.setPrototypeOf},function(t,e,n){var r=n(3);r(r.S,"Object",{setPrototypeOf:n(136).set})},function(t,e,n){var r=n(7),i=n(5),a=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(13)(Function.call,n(67).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return a(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:a}},function(t,e,n){t.exports={default:n(138),__esModule:!0}},function(t,e,n){n(139);var r=n(0).Object;t.exports=function(t,e){return r.create(t,e)}},function(t,e,n){var r=n(3);r(r.S,"Object",{create:n(29)})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(11),i=n.n(r),a=n(12),o=n.n(a);e.default={methods:{onDetect:function(t){var e=this;return o()(i.a.mark(function n(){var r,a;return i.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return e.$emit("detect",t),n.prev=1,n.next=4,t;case 4:r=n.sent,null!==(a=r.content)&&e.$emit("decode",a),n.next=11;break;case 9:n.prev=9,n.t0=n.catch(1);case 11:case"end":return n.stop()}},n,e,[[1,9]])}))()}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"wrapper"},[n("div",{staticClass:"inside"},[n("video",{directives:[{name:"show",rawName:"v-show",value:t.shouldScan,expression:"shouldScan"}],ref:"video",staticClass:"camera",attrs:{autoplay:"",muted:"",playsinline:""},domProps:{muted:!0}}),t._v(" "),n("canvas",{directives:[{name:"show",rawName:"v-show",value:!t.shouldScan,expression:"!shouldScan"}],ref:"pauseFrame",staticClass:"pause-frame"}),t._v(" "),n("canvas",{ref:"trackingLayer",staticClass:"tracking-layer"}),t._v(" "),n("div",{staticClass:"overlay"},[t._t("default")],2)])])},staticRenderFns:[]}},function(t,e,n){var r=n(20)(n(143),n(148),null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(11),i=n.n(r),a=n(12),o=n.n(a),s=n(68),c=n.n(s),u=n(37),l=n(42),d=n(43),f=n.n(d);e.default={name:"qrcode-capture",mixins:[f.a],methods:{onChangeInput:function(t){[].concat(c()(t.target.files)).map(this.processFile).forEach(this.onDetect)},processFile:function(t){var e=this;return o()(i.a.mark(function n(){var r,a;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.a)(t);case 2:return r=e.sent,e.next=5,Object(u.b)(r);case 5:return a=e.sent,e.abrupt("return",a);case 7:case"end":return e.stop()}},n,e)}))()}}}},function(t,e,n){t.exports={default:n(145),__esModule:!0}},function(t,e,n){n(24),n(146),t.exports=n(0).Array.from},function(t,e,n){"use strict";var r=n(13),i=n(3),a=n(35),o=n(54),s=n(55),c=n(31),u=n(147),l=n(56);i(i.S+i.F*!n(61)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,i,d,f=a(t),h="function"==typeof this?this:Array,p=arguments.length,m=p>1?arguments[1]:void 0,v=void 0!==m,_=0,g=l(f);if(v&&(m=r(m,p>2?arguments[2]:void 0,2)),void 0==g||h==Array&&s(g))for(n=new h(e=c(f.length));e>_;_++)u(n,_,v?m(f[_],_):f[_]);else for(d=g.call(f),n=new h;!(i=d.next()).done;_++)u(n,_,v?o(d,m,[i.value,_],!0):i.value);return n.length=_,n}})},function(t,e,n){"use strict";var r=n(4),i=n(17);t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",{attrs:{type:"file",name:"image",accept:"image/*",capture:"environment",multiple:""},on:{change:t.onChangeInput}})},staticRenderFns:[]}},function(t,e,n){var r=n(20)(n(150),n(151),null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(11),i=n.n(r),a=n(12),o=n.n(a),s=n(68),c=n.n(s),u=n(37),l=n(42),d=n(43),f=n.n(d);e.default={name:"qrcode-drop-zone",mixins:[f.a],methods:{onDragOver:function(t){this.$emit("dragover",t)},onDrop:function(t){var e=this,n=t.dataTransfer;this.onDragOver(!1);var r=[].concat(c()(n.files)),i=n.getData("text/uri-list");r.forEach(function(t){e.onDetect(e.processFile(t))}),""!==i&&this.onDetect(this.processUrl(i))},processFile:function(t){var e=this;return o()(i.a.mark(function n(){var r,a;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.a)(t);case 2:return r=e.sent,e.next=5,Object(u.b)(r);case 5:return a=e.sent,e.abrupt("return",a);case 7:case"end":return e.stop()}},n,e)}))()},processUrl:function(t){var e=this;return o()(i.a.mark(function n(){var r,a;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.b)(t);case 2:return r=e.sent,e.next=5,Object(u.b)(r);case 5:return a=e.sent,e.abrupt("return",a);case 7:case"end":return e.stop()}},n,e)}))()}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{on:{drop:function(e){return e.preventDefault(),e.stopPropagation(),t.onDrop(e)},dragenter:function(e){return e.preventDefault(),e.stopPropagation(),t.onDragOver(!0)},dragleave:function(e){return e.preventDefault(),e.stopPropagation(),t.onDragOver(!1)},dragover:function(t){t.preventDefault(),t.stopPropagation()}}},[t._t("default")],2)},staticRenderFns:[]}}])}).call(e,n(20))},function(t,e,n){var r=n(0)(n(1185),n(1186),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AclRule=e.AclCreate=e.AclInstaller=void 0;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(1359);function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o={initial:"",router:null,notfound:{path:"",forwardQueryParams:!1}},s=void 0;e.AclInstaller=function(t){s=t,(0,i._install)(t,o)},e.AclCreate=function t(e){a(this,t),o=e,(0,i._install)(s,o)},e.AclRule=function(){function t(e){a(this,t),this.current=e}return r(t,[{key:"or",value:function(t){return this.current+=""===this.current?t:"||"+t,this}},{key:"and",value:function(t){return this.current+=""===this.current?t:"&&"+t,this}},{key:"generate",value:function(){return this.current.split("||").map(function(t){return t.split("&&")})}}]),t}()},function(t,e){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];t.exports=function(t){var e=t,i=t.indexOf("["),a=t.indexOf("]");-1!=i&&-1!=a&&(t=t.substring(0,i)+t.substring(i,a).replace(/:/g,";")+t.substring(a,t.length));for(var o=n.exec(t||""),s={},c=14;c--;)s[r[c]]=o[c]||"";return-1!=i&&-1!=a&&(s.source=e,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s}},function(t,e){var n=1e3,r=60*n,i=60*r,a=24*i,o=7*a,s=365.25*a;function c(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}t.exports=function(t,e){e=e||{};var u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!e)return;var c=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*s;case"weeks":case"week":case"w":return c*o;case"days":case"day":case"d":return c*a;case"hours":case"hour":case"hrs":case"hr":case"h":return c*i;case"minutes":case"minute":case"mins":case"min":case"m":return c*r;case"seconds":case"second":case"secs":case"sec":case"s":return c*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(t);if("number"===u&&isFinite(t))return e.long?function(t){var e=Math.abs(t);if(e>=a)return c(t,e,a,"day");if(e>=i)return c(t,e,i,"hour");if(e>=r)return c(t,e,r,"minute");if(e>=n)return c(t,e,n,"second");return t+" ms"}(t):function(t){var e=Math.abs(t);if(e>=a)return Math.round(t/a)+"d";if(e>=i)return Math.round(t/i)+"h";if(e>=r)return Math.round(t/r)+"m";if(e>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){(function(e){t.exports=function(t){return n&&e.isBuffer(t)||r&&(t instanceof ArrayBuffer||i(t))};var n="function"==typeof e&&"function"==typeof e.isBuffer,r="function"==typeof ArrayBuffer,i=function(t){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer}}).call(e,n(19).Buffer)},function(t,e,n){var r=n(1377),i=n(396),a=n(397),o=n(293),s=n(398),c=n(399),u=n(115)("socket.io-client:manager"),l=n(395),d=n(1393),f=Object.prototype.hasOwnProperty;function h(t,e){if(!(this instanceof h))return new h(t,e);t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.nsps={},this.subs=[],this.opts=e,this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(e.randomizationFactor||.5),this.backoff=new d({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this.readyState="closed",this.uri=t,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=e.parser||o;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=!1!==e.autoConnect,this.autoConnect&&this.open()}t.exports=h,h.prototype.emitAll=function(){for(var t in this.emit.apply(this,arguments),this.nsps)f.call(this.nsps,t)&&this.nsps[t].emit.apply(this.nsps[t],arguments)},h.prototype.updateSocketIds=function(){for(var t in this.nsps)f.call(this.nsps,t)&&(this.nsps[t].id=this.generateId(t))},h.prototype.generateId=function(t){return("/"===t?"":t+"#")+this.engine.id},a(h.prototype),h.prototype.reconnection=function(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection},h.prototype.reconnectionAttempts=function(t){return arguments.length?(this._reconnectionAttempts=t,this):this._reconnectionAttempts},h.prototype.reconnectionDelay=function(t){return arguments.length?(this._reconnectionDelay=t,this.backoff&&this.backoff.setMin(t),this):this._reconnectionDelay},h.prototype.randomizationFactor=function(t){return arguments.length?(this._randomizationFactor=t,this.backoff&&this.backoff.setJitter(t),this):this._randomizationFactor},h.prototype.reconnectionDelayMax=function(t){return arguments.length?(this._reconnectionDelayMax=t,this.backoff&&this.backoff.setMax(t),this):this._reconnectionDelayMax},h.prototype.timeout=function(t){return arguments.length?(this._timeout=t,this):this._timeout},h.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},h.prototype.open=h.prototype.connect=function(t,e){if(u("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;u("opening %s",this.uri),this.engine=r(this.uri,this.opts);var n=this.engine,i=this;this.readyState="opening",this.skipReconnect=!1;var a=s(n,"open",function(){i.onopen(),t&&t()}),o=s(n,"error",function(e){if(u("connect_error"),i.cleanup(),i.readyState="closed",i.emitAll("connect_error",e),t){var n=new Error("Connection error");n.data=e,t(n)}else i.maybeReconnectOnOpen()});if(!1!==this._timeout){var c=this._timeout;u("connect attempt will timeout after %d",c);var l=setTimeout(function(){u("connect attempt timed out after %d",c),a.destroy(),n.close(),n.emit("error","timeout"),i.emitAll("connect_timeout",c)},c);this.subs.push({destroy:function(){clearTimeout(l)}})}return this.subs.push(a),this.subs.push(o),this},h.prototype.onopen=function(){u("open"),this.cleanup(),this.readyState="open",this.emit("open");var t=this.engine;this.subs.push(s(t,"data",c(this,"ondata"))),this.subs.push(s(t,"ping",c(this,"onping"))),this.subs.push(s(t,"pong",c(this,"onpong"))),this.subs.push(s(t,"error",c(this,"onerror"))),this.subs.push(s(t,"close",c(this,"onclose"))),this.subs.push(s(this.decoder,"decoded",c(this,"ondecoded")))},h.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},h.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},h.prototype.ondata=function(t){this.decoder.add(t)},h.prototype.ondecoded=function(t){this.emit("packet",t)},h.prototype.onerror=function(t){u("error",t),this.emitAll("error",t)},h.prototype.socket=function(t,e){var n=this.nsps[t];if(!n){n=new i(this,t,e),this.nsps[t]=n;var r=this;n.on("connecting",a),n.on("connect",function(){n.id=r.generateId(t)}),this.autoConnect&&a()}function a(){~l(r.connecting,n)||r.connecting.push(n)}return n},h.prototype.destroy=function(t){var e=l(this.connecting,t);~e&&this.connecting.splice(e,1),this.connecting.length||this.close()},h.prototype.packet=function(t){u("writing packet %j",t);var e=this;t.query&&0===t.type&&(t.nsp+="?"+t.query),e.encoding?e.packetBuffer.push(t):(e.encoding=!0,this.encoder.encode(t,function(n){for(var r=0;r<n.length;r++)e.engine.write(n[r],t.options);e.encoding=!1,e.processPacketQueue()}))},h.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var t=this.packetBuffer.shift();this.packet(t)}},h.prototype.cleanup=function(){u("cleanup");for(var t=this.subs.length,e=0;e<t;e++){this.subs.shift().destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},h.prototype.close=h.prototype.disconnect=function(){u("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},h.prototype.onclose=function(t){u("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",t),this._reconnection&&!this.skipReconnect&&this.reconnect()},h.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var t=this;if(this.backoff.attempts>=this._reconnectionAttempts)u("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var e=this.backoff.duration();u("will wait %dms before reconnect attempt",e),this.reconnecting=!0;var n=setTimeout(function(){t.skipReconnect||(u("attempting reconnect"),t.emitAll("reconnect_attempt",t.backoff.attempts),t.emitAll("reconnecting",t.backoff.attempts),t.skipReconnect||t.open(function(e){e?(u("reconnect attempt error"),t.reconnecting=!1,t.reconnect(),t.emitAll("reconnect_error",e.data)):(u("reconnect success"),t.onreconnect())}))},e);this.subs.push({destroy:function(){clearTimeout(n)}})}},h.prototype.onreconnect=function(){var t=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",t)}},function(t,e,n){var r=n(294),i=n(1380),a=n(1389),o=n(1390);e.polling=function(t){var e=!1,n=!1,o=!1!==t.jsonp;if("undefined"!=typeof location){var s="https:"===location.protocol,c=location.port;c||(c=s?443:80),e=t.hostname!==location.hostname||c!==t.port,n=t.secure!==s}if(t.xdomain=e,t.xscheme=n,"open"in new r(t)&&!t.forceJSONP)return new i(t);if(!o)throw new Error("JSONP disabled");return new a(t)},e.websocket=o},function(t,e,n){var r=n(295),i=n(116),a=n(78),o=n(117),s=n(394),c=n(118)("engine.io-client:polling");t.exports=l;var u=null!=new(n(294))({xdomain:!1}).responseType;function l(t){var e=t&&t.forceBase64;u&&!e||(this.supportsBinary=!1),r.call(this,t)}o(l,r),l.prototype.name="polling",l.prototype.doOpen=function(){this.poll()},l.prototype.pause=function(t){var e=this;function n(){c("paused"),e.readyState="paused",t()}if(this.readyState="pausing",this.polling||!this.writable){var r=0;this.polling&&(c("we are currently polling - waiting to pause"),r++,this.once("pollComplete",function(){c("pre-pause polling complete"),--r||n()})),this.writable||(c("we are currently writing - waiting to pause"),r++,this.once("drain",function(){c("pre-pause writing complete"),--r||n()}))}else n()},l.prototype.poll=function(){c("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},l.prototype.onData=function(t){var e=this;c("polling got data %s",t);a.decodePayload(t,this.socket.binaryType,function(t,n,r){if("opening"===e.readyState&&e.onOpen(),"close"===t.type)return e.onClose(),!1;e.onPacket(t)}),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():c('ignoring poll - transport state "%s"',this.readyState))},l.prototype.doClose=function(){var t=this;function e(){c("writing close packet"),t.write([{type:"close"}])}"open"===this.readyState?(c("transport open - closing"),e()):(c("transport not open - deferring close"),this.once("open",e))},l.prototype.write=function(t){var e=this;this.writable=!1;var n=function(){e.writable=!0,e.emit("drain")};a.encodePayload(t,this.supportsBinary,function(t){e.doWrite(t,n)})},l.prototype.uri=function(){var t=this.query||{},e=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(t[this.timestampParam]=s()),this.supportsBinary||t.sid||(t.b64=1),t=i.encode(t),this.port&&("https"===e&&443!==Number(this.port)||"http"===e&&80!==Number(this.port))&&(n=":"+this.port),t.length&&(t="?"+t),e+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+t}},function(t,e,n){(function(e){var r=n(1382),i=Object.prototype.toString,a="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===i.call(Blob),o="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===i.call(File);t.exports=function t(n){if(!n||"object"!=typeof n)return!1;if(r(n)){for(var i=0,s=n.length;i<s;i++)if(t(n[i]))return!0;return!1}if("function"==typeof e&&e.isBuffer&&e.isBuffer(n)||"function"==typeof ArrayBuffer&&n instanceof ArrayBuffer||a&&n instanceof Blob||o&&n instanceof File)return!0;if(n.toJSON&&"function"==typeof n.toJSON&&1===arguments.length)return t(n.toJSON(),!0);for(var c in n)if(Object.prototype.hasOwnProperty.call(n,c)&&t(n[c]))return!0;return!1}}).call(e,n(19).Buffer)},function(t,e,n){"use strict";var r,i="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),a=64,o={},s=0,c=0;function u(t){var e="";do{e=i[t%a]+e,t=Math.floor(t/a)}while(t>0);return e}function l(){var t=u(+new Date);return t!==r?(s=0,r=t):t+"."+u(s++)}for(;c<a;c++)o[i[c]]=c;l.encode=u,l.decode=function(t){var e=0;for(c=0;c<t.length;c++)e=e*a+o[t.charAt(c)];return e},t.exports=l},function(t,e){var n=[].indexOf;t.exports=function(t,e){if(n)return t.indexOf(e);for(var r=0;r<t.length;++r)if(t[r]===e)return r;return-1}},function(t,e,n){var r=n(293),i=n(397),a=n(1392),o=n(398),s=n(399),c=n(115)("socket.io-client:socket"),u=n(116),l=n(393);t.exports=h;var d={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},f=i.prototype.emit;function h(t,e,n){this.io=t,this.nsp=e,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},n&&n.query&&(this.query=n.query),this.io.autoConnect&&this.open()}i(h.prototype),h.prototype.subEvents=function(){if(!this.subs){var t=this.io;this.subs=[o(t,"open",s(this,"onopen")),o(t,"packet",s(this,"onpacket")),o(t,"close",s(this,"onclose"))]}},h.prototype.open=h.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting"),this)},h.prototype.send=function(){var t=a(arguments);return t.unshift("message"),this.emit.apply(this,t),this},h.prototype.emit=function(t){if(d.hasOwnProperty(t))return f.apply(this,arguments),this;var e=a(arguments),n={type:(void 0!==this.flags.binary?this.flags.binary:l(e))?r.BINARY_EVENT:r.EVENT,data:e,options:{}};return n.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof e[e.length-1]&&(c("emitting packet with ack id %d",this.ids),this.acks[this.ids]=e.pop(),n.id=this.ids++),this.connected?this.packet(n):this.sendBuffer.push(n),this.flags={},this},h.prototype.packet=function(t){t.nsp=this.nsp,this.io.packet(t)},h.prototype.onopen=function(){if(c("transport is open - connecting"),"/"!==this.nsp)if(this.query){var t="object"==typeof this.query?u.encode(this.query):this.query;c("sending connect packet with query %s",t),this.packet({type:r.CONNECT,query:t})}else this.packet({type:r.CONNECT})},h.prototype.onclose=function(t){c("close (%s)",t),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",t)},h.prototype.onpacket=function(t){var e=t.nsp===this.nsp,n=t.type===r.ERROR&&"/"===t.nsp;if(e||n)switch(t.type){case r.CONNECT:this.onconnect();break;case r.EVENT:case r.BINARY_EVENT:this.onevent(t);break;case r.ACK:case r.BINARY_ACK:this.onack(t);break;case r.DISCONNECT:this.ondisconnect();break;case r.ERROR:this.emit("error",t.data)}},h.prototype.onevent=function(t){var e=t.data||[];c("emitting event %j",e),null!=t.id&&(c("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?f.apply(this,e):this.receiveBuffer.push(e)},h.prototype.ack=function(t){var e=this,n=!1;return function(){if(!n){n=!0;var i=a(arguments);c("sending ack %j",i),e.packet({type:l(i)?r.BINARY_ACK:r.ACK,id:t,data:i})}}},h.prototype.onack=function(t){var e=this.acks[t.id];"function"==typeof e?(c("calling ack %s with %j",t.id,t.data),e.apply(this,t.data),delete this.acks[t.id]):c("bad ack %s",t.id)},h.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},h.prototype.emitBuffered=function(){var t;for(t=0;t<this.receiveBuffer.length;t++)f.apply(this,this.receiveBuffer[t]);for(this.receiveBuffer=[],t=0;t<this.sendBuffer.length;t++)this.packet(this.sendBuffer[t]);this.sendBuffer=[]},h.prototype.ondisconnect=function(){c("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},h.prototype.destroy=function(){if(this.subs){for(var t=0;t<this.subs.length;t++)this.subs[t].destroy();this.subs=null}this.io.destroy(this)},h.prototype.close=h.prototype.disconnect=function(){return this.connected&&(c("performing disconnect (%s)",this.nsp),this.packet({type:r.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},h.prototype.compress=function(t){return this.flags.compress=t,this},h.prototype.binary=function(t){return this.flags.binary=t,this}},function(t,e,n){function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}t.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var i=0;i<r.length;i++)if((n=r[i])===e||n.fn===e){r.splice(i,1);break}return this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),n=this._callbacks["$"+t];if(n)for(var r=0,i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,e);return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e){t.exports=function(t,e,n){return t.on(e,n),{destroy:function(){t.removeListener(e,n)}}}},function(t,e){var n=[].slice;t.exports=function(t,e){if("string"==typeof e&&(e=t[e]),"function"!=typeof e)throw new Error("bind() requires a function");var r=n.call(arguments,2);return function(){return e.apply(t,r.concat(n.call(arguments)))}}},function(t,e,n){n(401),n(1398),t.exports=n(1399)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});n(402);var r=n(2),i=n.n(r),a=n(606),o=n.n(a),s=n(1),c=n.n(s);function u(t,e){0}function l(t){return Object.prototype.toString.call(t).indexOf("Error")>-1}function d(t,e){return e instanceof t||e&&(e.name===t.name||e._name===t._name)}function f(t,e){for(var n in e)t[n]=e[n];return t}var h={name:"RouterView",functional:!0,props:{name:{type:String,default:"default"}},render:function(t,e){var n=e.props,r=e.children,i=e.parent,a=e.data;a.routerView=!0;for(var o=i.$createElement,s=n.name,c=i.$route,u=i._routerViewCache||(i._routerViewCache={}),l=0,d=!1;i&&i._routerRoot!==i;){var h=i.$vnode&&i.$vnode.data;h&&(h.routerView&&l++,h.keepAlive&&i._inactive&&(d=!0)),i=i.$parent}if(a.routerViewDepth=l,d)return o(u[s],a,r);var p=c.matched[l];if(!p)return u[s]=null,o();var m=u[s]=p.components[s];a.registerRouteInstance=function(t,e){var n=p.instances[s];(e&&n!==t||!e&&n===t)&&(p.instances[s]=e)},(a.hook||(a.hook={})).prepatch=function(t,e){p.instances[s]=e.componentInstance},a.hook.init=function(t){t.data.keepAlive&&t.componentInstance&&t.componentInstance!==p.instances[s]&&(p.instances[s]=t.componentInstance)};var v=a.props=function(t,e){switch(typeof e){case"undefined":return;case"object":return e;case"function":return e(t);case"boolean":return e?t.params:void 0;default:0}}(c,p.props&&p.props[s]);if(v){v=a.props=f({},v);var _=a.attrs=a.attrs||{};for(var g in v)m.props&&g in m.props||(_[g]=v[g],delete v[g])}return o(m,a,r)}};var p=/[!'()*]/g,m=function(t){return"%"+t.charCodeAt(0).toString(16)},v=/%2C/g,_=function(t){return encodeURIComponent(t).replace(p,m).replace(v,",")},g=decodeURIComponent;function b(t){var e={};return(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach(function(t){var n=t.replace(/\+/g," ").split("="),r=g(n.shift()),i=n.length>0?g(n.join("=")):null;void 0===e[r]?e[r]=i:Array.isArray(e[r])?e[r].push(i):e[r]=[e[r],i]}),e):e}function y(t){var e=t?Object.keys(t).map(function(e){var n=t[e];if(void 0===n)return"";if(null===n)return _(e);if(Array.isArray(n)){var r=[];return n.forEach(function(t){void 0!==t&&(null===t?r.push(_(e)):r.push(_(e)+"="+_(t)))}),r.join("&")}return _(e)+"="+_(n)}).filter(function(t){return t.length>0}).join("&"):null;return e?"?"+e:""}var x=/\/?$/;function w(t,e,n,r){var i=r&&r.options.stringifyQuery,a=e.query||{};try{a=k(a)}catch(t){}var o={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:a,params:e.params||{},fullPath:E(e,i),matched:t?function(t){var e=[];for(;t;)e.unshift(t),t=t.parent;return e}(t):[]};return n&&(o.redirectedFrom=E(n,i)),Object.freeze(o)}function k(t){if(Array.isArray(t))return t.map(k);if(t&&"object"==typeof t){var e={};for(var n in t)e[n]=k(t[n]);return e}return t}var C=w(null,{path:"/"});function E(t,e){var n=t.path,r=t.query;void 0===r&&(r={});var i=t.hash;return void 0===i&&(i=""),(n||"/")+(e||y)(r)+i}function S(t,e){return e===C?t===e:!!e&&(t.path&&e.path?t.path.replace(x,"")===e.path.replace(x,"")&&t.hash===e.hash&&I(t.query,e.query):!(!t.name||!e.name)&&(t.name===e.name&&t.hash===e.hash&&I(t.query,e.query)&&I(t.params,e.params)))}function I(t,e){if(void 0===t&&(t={}),void 0===e&&(e={}),!t||!e)return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(n){var r=t[n],i=e[n];return"object"==typeof r&&"object"==typeof i?I(r,i):String(r)===String(i)})}function M(t,e,n){var r=t.charAt(0);if("/"===r)return t;if("?"===r||"#"===r)return e+t;var i=e.split("/");n&&i[i.length-1]||i.pop();for(var a=t.replace(/^\//,"").split("/"),o=0;o<a.length;o++){var s=a[o];".."===s?i.pop():"."!==s&&i.push(s)}return""!==i[0]&&i.unshift(""),i.join("/")}function T(t){return t.replace(/\/\//g,"/")}var D=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},R=q,P=B,O=function(t,e){return F(B(t,e))},L=F,A=H,N=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function B(t,e){for(var n,r=[],i=0,a=0,o="",s=e&&e.delimiter||"/";null!=(n=N.exec(t));){var c=n[0],u=n[1],l=n.index;if(o+=t.slice(a,l),a=l+c.length,u)o+=u[1];else{var d=t[a],f=n[2],h=n[3],p=n[4],m=n[5],v=n[6],_=n[7];o&&(r.push(o),o="");var g=null!=f&&null!=d&&d!==f,b="+"===v||"*"===v,y="?"===v||"*"===v,x=n[2]||s,w=p||m;r.push({name:h||i++,prefix:f||"",delimiter:x,optional:y,repeat:b,partial:g,asterisk:!!_,pattern:w?$(w):_?".*":"[^"+Y(x)+"]+?"})}}return a<t.length&&(o+=t.substr(a)),o&&r.push(o),r}function j(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function F(t){for(var e=new Array(t.length),n=0;n<t.length;n++)"object"==typeof t[n]&&(e[n]=new RegExp("^(?:"+t[n].pattern+")$"));return function(n,r){for(var i="",a=n||{},o=(r||{}).pretty?j:encodeURIComponent,s=0;s<t.length;s++){var c=t[s];if("string"!=typeof c){var u,l=a[c.name];if(null==l){if(c.optional){c.partial&&(i+=c.prefix);continue}throw new TypeError('Expected "'+c.name+'" to be defined')}if(D(l)){if(!c.repeat)throw new TypeError('Expected "'+c.name+'" to not repeat, but received `'+JSON.stringify(l)+"`");if(0===l.length){if(c.optional)continue;throw new TypeError('Expected "'+c.name+'" to not be empty')}for(var d=0;d<l.length;d++){if(u=o(l[d]),!e[s].test(u))throw new TypeError('Expected all "'+c.name+'" to match "'+c.pattern+'", but received `'+JSON.stringify(u)+"`");i+=(0===d?c.prefix:c.delimiter)+u}}else{if(u=c.asterisk?encodeURI(l).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}):o(l),!e[s].test(u))throw new TypeError('Expected "'+c.name+'" to match "'+c.pattern+'", but received "'+u+'"');i+=c.prefix+u}}else i+=c}return i}}function Y(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function $(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function z(t,e){return t.keys=e,t}function V(t){return t.sensitive?"":"i"}function H(t,e,n){D(e)||(n=e||n,e=[]);for(var r=(n=n||{}).strict,i=!1!==n.end,a="",o=0;o<t.length;o++){var s=t[o];if("string"==typeof s)a+=Y(s);else{var c=Y(s.prefix),u="(?:"+s.pattern+")";e.push(s),s.repeat&&(u+="(?:"+c+u+")*"),a+=u=s.optional?s.partial?c+"("+u+")?":"(?:"+c+"("+u+"))?":c+"("+u+")"}}var l=Y(n.delimiter||"/"),d=a.slice(-l.length)===l;return r||(a=(d?a.slice(0,-l.length):a)+"(?:"+l+"(?=$))?"),a+=i?"$":r&&d?"":"(?="+l+"|$)",z(new RegExp("^"+a,V(n)),e)}function q(t,e,n){return D(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?function(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return z(t,e)}(t,e):D(t)?function(t,e,n){for(var r=[],i=0;i<t.length;i++)r.push(q(t[i],e,n).source);return z(new RegExp("(?:"+r.join("|")+")",V(n)),e)}(t,e,n):function(t,e,n){return H(B(t,n),e,n)}(t,e,n)}R.parse=P,R.compile=O,R.tokensToFunction=L,R.tokensToRegExp=A;var W=Object.create(null);function U(t,e,n){e=e||{};try{var r=W[t]||(W[t]=R.compile(t));return e.pathMatch&&(e[0]=e.pathMatch),r(e,{pretty:!0})}catch(t){return""}finally{delete e[0]}}function G(t,e,n,r){var i="string"==typeof t?{path:t}:t;if(i._normalized)return i;if(i.name)return f({},t);if(!i.path&&i.params&&e){(i=f({},i))._normalized=!0;var a=f(f({},e.params),i.params);if(e.name)i.name=e.name,i.params=a;else if(e.matched.length){var o=e.matched[e.matched.length-1].path;i.path=U(o,a,e.path)}else 0;return i}var s=function(t){var e="",n="",r=t.indexOf("#");r>=0&&(e=t.slice(r),t=t.slice(0,r));var i=t.indexOf("?");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{path:t,query:n,hash:e}}(i.path||""),c=e&&e.path||"/",u=s.path?M(s.path,c,n||i.append):c,l=function(t,e,n){void 0===e&&(e={});var r,i=n||b;try{r=i(t||"")}catch(t){r={}}for(var a in e)r[a]=e[a];return r}(s.query,i.query,r&&r.options.parseQuery),d=i.hash||s.hash;return d&&"#"!==d.charAt(0)&&(d="#"+d),{_normalized:!0,path:u,query:l,hash:d}}var K,X=[String,Object],J=[String,Array],Z=function(){},Q={name:"RouterLink",props:{to:{type:X,required:!0},tag:{type:String,default:"a"},exact:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,event:{type:J,default:"click"}},render:function(t){var e=this,n=this.$router,r=this.$route,i=n.resolve(this.to,r,this.append),a=i.location,o=i.route,s=i.href,c={},u=n.options.linkActiveClass,l=n.options.linkExactActiveClass,d=null==u?"router-link-active":u,h=null==l?"router-link-exact-active":l,p=null==this.activeClass?d:this.activeClass,m=null==this.exactActiveClass?h:this.exactActiveClass,v=o.redirectedFrom?w(null,G(o.redirectedFrom),null,n):o;c[m]=S(r,v),c[p]=this.exact?c[m]:function(t,e){return 0===t.path.replace(x,"/").indexOf(e.path.replace(x,"/"))&&(!e.hash||t.hash===e.hash)&&function(t,e){for(var n in e)if(!(n in t))return!1;return!0}(t.query,e.query)}(r,v);var _=function(t){tt(t)&&(e.replace?n.replace(a,Z):n.push(a,Z))},g={click:tt};Array.isArray(this.event)?this.event.forEach(function(t){g[t]=_}):g[this.event]=_;var b={class:c},y=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:s,route:o,navigate:_,isActive:c[p],isExactActive:c[m]});if(y){if(1===y.length)return y[0];if(y.length>1||!y.length)return 0===y.length?t():t("span",{},y)}if("a"===this.tag)b.on=g,b.attrs={href:s};else{var k=function t(e){if(e)for(var n,r=0;r<e.length;r++){if("a"===(n=e[r]).tag)return n;if(n.children&&(n=t(n.children)))return n}}(this.$slots.default);if(k){k.isStatic=!1;var C=k.data=f({},k.data);for(var E in C.on=C.on||{},C.on){var I=C.on[E];E in g&&(C.on[E]=Array.isArray(I)?I:[I])}for(var M in g)M in C.on?C.on[M].push(g[M]):C.on[M]=_;(k.data.attrs=f({},k.data.attrs)).href=s}else b.on=g}return t(this.tag,b,this.$slots.default)}};function tt(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||void 0!==t.button&&0!==t.button)){if(t.currentTarget&&t.currentTarget.getAttribute){var e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function et(t){if(!et.installed||K!==t){et.installed=!0,K=t;var e=function(t){return void 0!==t},n=function(t,n){var r=t.$options._parentVnode;e(r)&&e(r=r.data)&&e(r=r.registerRouteInstance)&&r(t,n)};t.mixin({beforeCreate:function(){e(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),t.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,n(this,this)},destroyed:function(){n(this)}}),Object.defineProperty(t.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(t.prototype,"$route",{get:function(){return this._routerRoot._route}}),t.component("RouterView",h),t.component("RouterLink",Q);var r=t.config.optionMergeStrategies;r.beforeRouteEnter=r.beforeRouteLeave=r.beforeRouteUpdate=r.created}}var nt="undefined"!=typeof window;function rt(t,e,n,r){var i=e||[],a=n||Object.create(null),o=r||Object.create(null);t.forEach(function(t){!function t(e,n,r,i,a,o){var s=i.path;var c=i.name;0;var u=i.pathToRegexpOptions||{};var l=function(t,e,n){n||(t=t.replace(/\/$/,""));if("/"===t[0])return t;if(null==e)return t;return T(e.path+"/"+t)}(s,a,u.strict);"boolean"==typeof i.caseSensitive&&(u.sensitive=i.caseSensitive);var d={path:l,regex:function(t,e){var n=R(t,[],e);return n}(l,u),components:i.components||{default:i.component},instances:{},name:c,parent:a,matchAs:o,redirect:i.redirect,beforeEnter:i.beforeEnter,meta:i.meta||{},props:null==i.props?{}:i.components?i.props:{default:i.props}};i.children&&i.children.forEach(function(i){var a=o?T(o+"/"+i.path):void 0;t(e,n,r,i,d,a)});n[d.path]||(e.push(d.path),n[d.path]=d);if(void 0!==i.alias)for(var f=Array.isArray(i.alias)?i.alias:[i.alias],h=0;h<f.length;++h){var p=f[h];0;var m={path:p,children:i.children};t(e,n,r,m,a,d.path||"/")}c&&(r[c]||(r[c]=d))}(i,a,o,t)});for(var s=0,c=i.length;s<c;s++)"*"===i[s]&&(i.push(i.splice(s,1)[0]),c--,s--);return{pathList:i,pathMap:a,nameMap:o}}function it(t,e){var n=rt(t),r=n.pathList,i=n.pathMap,a=n.nameMap;function o(t,n,o){var s=G(t,n,!1,e),u=s.name;if(u){var l=a[u];if(!l)return c(null,s);var d=l.regex.keys.filter(function(t){return!t.optional}).map(function(t){return t.name});if("object"!=typeof s.params&&(s.params={}),n&&"object"==typeof n.params)for(var f in n.params)!(f in s.params)&&d.indexOf(f)>-1&&(s.params[f]=n.params[f]);return s.path=U(l.path,s.params),c(l,s,o)}if(s.path){s.params={};for(var h=0;h<r.length;h++){var p=r[h],m=i[p];if(at(m.regex,s.path,s.params))return c(m,s,o)}}return c(null,s)}function s(t,n){var r=t.redirect,i="function"==typeof r?r(w(t,n,null,e)):r;if("string"==typeof i&&(i={path:i}),!i||"object"!=typeof i)return c(null,n);var s=i,u=s.name,l=s.path,d=n.query,f=n.hash,h=n.params;if(d=s.hasOwnProperty("query")?s.query:d,f=s.hasOwnProperty("hash")?s.hash:f,h=s.hasOwnProperty("params")?s.params:h,u){a[u];return o({_normalized:!0,name:u,query:d,hash:f,params:h},void 0,n)}if(l){var p=function(t,e){return M(t,e.parent?e.parent.path:"/",!0)}(l,t);return o({_normalized:!0,path:U(p,h),query:d,hash:f},void 0,n)}return c(null,n)}function c(t,n,r){return t&&t.redirect?s(t,r||n):t&&t.matchAs?function(t,e,n){var r=o({_normalized:!0,path:U(n,e.params)});if(r){var i=r.matched,a=i[i.length-1];return e.params=r.params,c(a,e)}return c(null,e)}(0,n,t.matchAs):w(t,n,r,e)}return{match:o,addRoutes:function(t){rt(t,r,i,a)}}}function at(t,e,n){var r=e.match(t);if(!r)return!1;if(!n)return!0;for(var i=1,a=r.length;i<a;++i){var o=t.keys[i-1],s="string"==typeof r[i]?decodeURIComponent(r[i]):r[i];o&&(n[o.name||"pathMatch"]=s)}return!0}var ot=nt&&window.performance&&window.performance.now?window.performance:Date;function st(){return ot.now().toFixed(3)}var ct=st();function ut(){return ct}function lt(t){return ct=t}var dt=Object.create(null);function ft(){var t=window.location.protocol+"//"+window.location.host,e=window.location.href.replace(t,"");window.history.replaceState({key:ut()},"",e),window.addEventListener("popstate",function(t){pt(),t.state&&t.state.key&&lt(t.state.key)})}function ht(t,e,n,r){if(t.app){var i=t.options.scrollBehavior;i&&t.app.$nextTick(function(){var a=function(){var t=ut();if(t)return dt[t]}(),o=i.call(t,e,n,r?a:null);o&&("function"==typeof o.then?o.then(function(t){bt(t,a)}).catch(function(t){0}):bt(o,a))})}}function pt(){var t=ut();t&&(dt[t]={x:window.pageXOffset,y:window.pageYOffset})}function mt(t){return _t(t.x)||_t(t.y)}function vt(t){return{x:_t(t.x)?t.x:window.pageXOffset,y:_t(t.y)?t.y:window.pageYOffset}}function _t(t){return"number"==typeof t}var gt=/^#\d/;function bt(t,e){var n,r="object"==typeof t;if(r&&"string"==typeof t.selector){var i=gt.test(t.selector)?document.getElementById(t.selector.slice(1)):document.querySelector(t.selector);if(i){var a=t.offset&&"object"==typeof t.offset?t.offset:{};e=function(t,e){var n=document.documentElement.getBoundingClientRect(),r=t.getBoundingClientRect();return{x:r.left-n.left-e.x,y:r.top-n.top-e.y}}(i,a={x:_t((n=a).x)?n.x:0,y:_t(n.y)?n.y:0})}else mt(t)&&(e=vt(t))}else r&&mt(t)&&(e=vt(t));e&&window.scrollTo(e.x,e.y)}var yt,xt=nt&&((-1===(yt=window.navigator.userAgent).indexOf("Android 2.")&&-1===yt.indexOf("Android 4.0")||-1===yt.indexOf("Mobile Safari")||-1!==yt.indexOf("Chrome")||-1!==yt.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history);function wt(t,e){pt();var n=window.history;try{e?n.replaceState({key:ut()},"",t):n.pushState({key:lt(st())},"",t)}catch(n){window.location[e?"replace":"assign"](t)}}function kt(t){wt(t,!0)}function Ct(t,e,n){var r=function(i){i>=t.length?n():t[i]?e(t[i],function(){r(i+1)}):r(i+1)};r(0)}function Et(t){return function(e,n,r){var i=!1,a=0,o=null;St(t,function(t,e,n,s){if("function"==typeof t&&void 0===t.cid){i=!0,a++;var c,u=Tt(function(e){var i;((i=e).__esModule||Mt&&"Module"===i[Symbol.toStringTag])&&(e=e.default),t.resolved="function"==typeof e?e:K.extend(e),n.components[s]=e,--a<=0&&r()}),d=Tt(function(t){var e="Failed to resolve async component "+s+": "+t;o||(o=l(t)?t:new Error(e),r(o))});try{c=t(u,d)}catch(t){d(t)}if(c)if("function"==typeof c.then)c.then(u,d);else{var f=c.component;f&&"function"==typeof f.then&&f.then(u,d)}}}),i||r()}}function St(t,e){return It(t.map(function(t){return Object.keys(t.components).map(function(n){return e(t.components[n],t.instances[n],t,n)})}))}function It(t){return Array.prototype.concat.apply([],t)}var Mt="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function Tt(t){var e=!1;return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];if(!e)return e=!0,t.apply(this,n)}}var Dt=function(t){function e(e){t.call(this),this.name=this._name="NavigationDuplicated",this.message='Navigating to current location ("'+e.fullPath+'") is not allowed',Object.defineProperty(this,"stack",{value:(new t).stack,writable:!0,configurable:!0})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error);Dt._name="NavigationDuplicated";var Rt=function(t,e){this.router=t,this.base=function(t){if(!t)if(nt){var e=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else t="/";"/"!==t.charAt(0)&&(t="/"+t);return t.replace(/\/$/,"")}(e),this.current=C,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[]};function Pt(t,e,n,r){var i=St(t,function(t,r,i,a){var o=function(t,e){"function"!=typeof t&&(t=K.extend(t));return t.options[e]}(t,e);if(o)return Array.isArray(o)?o.map(function(t){return n(t,r,i,a)}):n(o,r,i,a)});return It(r?i.reverse():i)}function Ot(t,e){if(e)return function(){return t.apply(e,arguments)}}Rt.prototype.listen=function(t){this.cb=t},Rt.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},Rt.prototype.onError=function(t){this.errorCbs.push(t)},Rt.prototype.transitionTo=function(t,e,n){var r=this,i=this.router.match(t,this.current);this.confirmTransition(i,function(){r.updateRoute(i),e&&e(i),r.ensureURL(),r.ready||(r.ready=!0,r.readyCbs.forEach(function(t){t(i)}))},function(t){n&&n(t),t&&!r.ready&&(r.ready=!0,r.readyErrorCbs.forEach(function(e){e(t)}))})},Rt.prototype.confirmTransition=function(t,e,n){var r=this,i=this.current,a=function(t){!d(Dt,t)&&l(t)&&(r.errorCbs.length?r.errorCbs.forEach(function(e){e(t)}):(u(),console.error(t))),n&&n(t)};if(S(t,i)&&t.matched.length===i.matched.length)return this.ensureURL(),a(new Dt(t));var o=function(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n<r&&t[n]===e[n];n++);return{updated:e.slice(0,n),activated:e.slice(n),deactivated:t.slice(n)}}(this.current.matched,t.matched),s=o.updated,c=o.deactivated,f=o.activated,h=[].concat(function(t){return Pt(t,"beforeRouteLeave",Ot,!0)}(c),this.router.beforeHooks,function(t){return Pt(t,"beforeRouteUpdate",Ot)}(s),f.map(function(t){return t.beforeEnter}),Et(f));this.pending=t;var p=function(e,n){if(r.pending!==t)return a();try{e(t,i,function(t){!1===t||l(t)?(r.ensureURL(!0),a(t)):"string"==typeof t||"object"==typeof t&&("string"==typeof t.path||"string"==typeof t.name)?(a(),"object"==typeof t&&t.replace?r.replace(t):r.push(t)):n(t)})}catch(t){a(t)}};Ct(h,p,function(){var n=[];Ct(function(t,e,n){return Pt(t,"beforeRouteEnter",function(t,r,i,a){return function(t,e,n,r,i){return function(a,o,s){return t(a,o,function(t){"function"==typeof t&&r.push(function(){!function t(e,n,r,i){n[r]&&!n[r]._isBeingDestroyed?e(n[r]):i()&&setTimeout(function(){t(e,n,r,i)},16)}(t,e.instances,n,i)}),s(t)})}}(t,i,a,e,n)})}(f,n,function(){return r.current===t}).concat(r.router.resolveHooks),p,function(){if(r.pending!==t)return a();r.pending=null,e(t),r.router.app&&r.router.app.$nextTick(function(){n.forEach(function(t){t()})})})})},Rt.prototype.updateRoute=function(t){var e=this.current;this.current=t,this.cb&&this.cb(t),this.router.afterHooks.forEach(function(n){n&&n(t,e)})};var Lt=function(t){function e(e,n){var r=this;t.call(this,e,n);var i=e.options.scrollBehavior,a=xt&&i;a&&ft();var o=At(this.base);window.addEventListener("popstate",function(t){var n=r.current,i=At(r.base);r.current===C&&i===o||r.transitionTo(i,function(t){a&&ht(e,t,n,!0)})})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,n){var r=this,i=this.current;this.transitionTo(t,function(t){wt(T(r.base+t.fullPath)),ht(r.router,t,i,!1),e&&e(t)},n)},e.prototype.replace=function(t,e,n){var r=this,i=this.current;this.transitionTo(t,function(t){kt(T(r.base+t.fullPath)),ht(r.router,t,i,!1),e&&e(t)},n)},e.prototype.ensureURL=function(t){if(At(this.base)!==this.current.fullPath){var e=T(this.base+this.current.fullPath);t?wt(e):kt(e)}},e.prototype.getCurrentLocation=function(){return At(this.base)},e}(Rt);function At(t){var e=decodeURI(window.location.pathname);return t&&0===e.indexOf(t)&&(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var Nt=function(t){function e(e,n,r){t.call(this,e,n),r&&function(t){var e=At(t);if(!/^\/#/.test(e))return window.location.replace(T(t+"/#"+e)),!0}(this.base)||Bt()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this,e=this.router.options.scrollBehavior,n=xt&&e;n&&ft(),window.addEventListener(xt?"popstate":"hashchange",function(){var e=t.current;Bt()&&t.transitionTo(jt(),function(r){n&&ht(t.router,r,e,!0),xt||$t(r.fullPath)})})},e.prototype.push=function(t,e,n){var r=this,i=this.current;this.transitionTo(t,function(t){Yt(t.fullPath),ht(r.router,t,i,!1),e&&e(t)},n)},e.prototype.replace=function(t,e,n){var r=this,i=this.current;this.transitionTo(t,function(t){$t(t.fullPath),ht(r.router,t,i,!1),e&&e(t)},n)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;jt()!==e&&(t?Yt(e):$t(e))},e.prototype.getCurrentLocation=function(){return jt()},e}(Rt);function Bt(){var t=jt();return"/"===t.charAt(0)||($t("/"+t),!1)}function jt(){var t=window.location.href,e=t.indexOf("#");if(e<0)return"";var n=(t=t.slice(e+1)).indexOf("?");if(n<0){var r=t.indexOf("#");t=r>-1?decodeURI(t.slice(0,r))+t.slice(r):decodeURI(t)}else n>-1&&(t=decodeURI(t.slice(0,n))+t.slice(n));return t}function Ft(t){var e=window.location.href,n=e.indexOf("#");return(n>=0?e.slice(0,n):e)+"#"+t}function Yt(t){xt?wt(Ft(t)):window.location.hash=t}function $t(t){xt?kt(Ft(t)):window.location.replace(Ft(t))}var zt=function(t){function e(e,n){t.call(this,e,n),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,n){var r=this;this.transitionTo(t,function(t){r.stack=r.stack.slice(0,r.index+1).concat(t),r.index++,e&&e(t)},n)},e.prototype.replace=function(t,e,n){var r=this;this.transitionTo(t,function(t){r.stack=r.stack.slice(0,r.index).concat(t),e&&e(t)},n)},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,function(){e.index=n,e.updateRoute(r)},function(t){d(Dt,t)&&(e.index=n)})}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(Rt),Vt=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=it(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!xt&&!1!==t.fallback,this.fallback&&(e="hash"),nt||(e="abstract"),this.mode=e,e){case"history":this.history=new Lt(this,t.base);break;case"hash":this.history=new Nt(this,t.base,this.fallback);break;case"abstract":this.history=new zt(this,t.base);break;default:0}},Ht={currentRoute:{configurable:!0}};function qt(t,e){return t.push(e),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}Vt.prototype.match=function(t,e,n){return this.matcher.match(t,e,n)},Ht.currentRoute.get=function(){return this.history&&this.history.current},Vt.prototype.init=function(t){var e=this;if(this.apps.push(t),t.$once("hook:destroyed",function(){var n=e.apps.indexOf(t);n>-1&&e.apps.splice(n,1),e.app===t&&(e.app=e.apps[0]||null)}),!this.app){this.app=t;var n=this.history;if(n instanceof Lt)n.transitionTo(n.getCurrentLocation());else if(n instanceof Nt){var r=function(){n.setupListeners()};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen(function(t){e.apps.forEach(function(e){e._route=t})})}},Vt.prototype.beforeEach=function(t){return qt(this.beforeHooks,t)},Vt.prototype.beforeResolve=function(t){return qt(this.resolveHooks,t)},Vt.prototype.afterEach=function(t){return qt(this.afterHooks,t)},Vt.prototype.onReady=function(t,e){this.history.onReady(t,e)},Vt.prototype.onError=function(t){this.history.onError(t)},Vt.prototype.push=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise(function(e,n){r.history.push(t,e,n)});this.history.push(t,e,n)},Vt.prototype.replace=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise(function(e,n){r.history.replace(t,e,n)});this.history.replace(t,e,n)},Vt.prototype.go=function(t){this.history.go(t)},Vt.prototype.back=function(){this.go(-1)},Vt.prototype.forward=function(){this.go(1)},Vt.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map(function(t){return Object.keys(t.components).map(function(e){return t.components[e]})})):[]},Vt.prototype.resolve=function(t,e,n){var r=G(t,e=e||this.history.current,n,this),i=this.match(r,e),a=i.redirectedFrom||i.fullPath;return{location:r,route:i,href:function(t,e,n){var r="hash"===n?"#"+e:e;return t?T(t+"/"+r):r}(this.history.base,a,this.mode),normalizedTo:r,resolved:i}},Vt.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==C&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(Vt.prototype,Ht),Vt.install=et,Vt.version="3.1.3",nt&&window.Vue&&window.Vue.use(Vt);var Wt=Vt,Ut=n(84),Gt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Kt=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!e||n.length!==e);r=!0);}catch(t){i=!0,a=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();i.a.use(Ut.a);var Xt=n(609),Jt=Xt.keys().map(function(t){return[t.replace(/(^.\/)|(\.js$)/g,""),Xt(t)]}).reduce(function(t,e){var n,r,i,a=Kt(e,2),o=a[0],s=a[1];return void 0===s.namespaced&&(s.namespaced=!0),Gt({},t,(i=s,(r=o)in(n={})?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n))},{}),Zt=new Ut.a.Store({modules:Jt});function Qt(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var te=[].concat(Qt(ee(["guest"],[{path:"",component:n(628),redirect:{name:"home"},children:[{path:"/home",name:"home",component:n(631),meta:{rule:"public"}},{path:"/login",name:"login",component:n(669),meta:{rule:"public"}},{path:"/consulta_registro",name:"consulta_registro",component:n(338),meta:{rule:"public"}}]}])),Qt(ee(["auth"],[{path:"",component:n(675),children:[{path:"",name:"index",redirect:{name:"profile"}},{path:"profile",component:n(687),meta:{rule:"public"},children:[{path:"",name:"profile",component:n(693),meta:{rule:"public"}},{path:"edit",name:"profile-edit",component:n(696),meta:{rule:"public"}}]},{path:"normativas",name:"normativa",component:n(702),meta:{rule:"admin"}},{path:"proyecto_obras",name:"proyecto_obra",component:n(710),meta:{rule:"admin"}},{path:"prod_autorizaciones",name:"prod_autorizacion",component:n(716),meta:{rule:"admin"}},{path:"prod_industrializados",name:"prod_industrializado",component:n(722),meta:{rule:"admin"}},{path:"investigaciones_coca",name:"investigacion_coca",component:n(728),meta:{rule:"admin"}},{path:"enlaces_institucionales",name:"enlace_institucional",component:n(734),meta:{rule:"admin"}},{path:"consultas_portal_info",name:"consulta_portal_info",component:n(740),meta:{rule:"admin"}},{path:"reclamos_portal_info",name:"reclamo_portal_info",component:n(746),meta:{rule:"admin"}},{path:"callcenters",name:"callcenter",component:n(752),meta:{rule:"admin"}},{path:"productores",name:"productor",component:n(758),meta:{rule:"digprococa"}},{path:"productores-al-detalle",name:"productorDetalle",component:n(772),meta:{rule:"digcoin"}},{path:"comercializadores",name:"comercializador",component:n(784),meta:{rule:"digcoin"}},{path:"empresas",name:"empresa",component:n(802),meta:{rule:"digcoin"}},{path:"entidad-de-investigacion",name:"entidad_investigacion",component:n(814),meta:{rule:"digcoin"}},{path:"beneficiarios-de-donaciones",name:"beneficiario_donacion",component:n(820),meta:{rule:"digcoin"}},{path:"beneficiarios-de-desarrollo",name:"beneficiario_desarrollo",component:n(826),meta:{rule:"digcoin"}},{path:"caracteristicas_produccion",name:"caracteristica_produccion",component:n(832),meta:{rule:"digcoin"}},{path:"autorizacion_renov_parcela",name:"autorizacion_renov_parcela",component:n(845),meta:{rule:"digcoin"}},{path:"consulta_ren_ver",name:"consulta_ren_ver",component:n(854),meta:{rule:"digcoin"}},{path:"zonas_racionalizadas",name:"zonas_racionalizadas",component:n(859),meta:{rule:"admin"}},{path:"guias_internacion",name:"guia_internacion",component:n(865),meta:{rule:"digcoin"}},{path:"control_guias_internacion",name:"control_guia_internacion",component:n(953),meta:{rule:"digcoin"}},{path:"areas_puestos_venta",name:"puesto_venta",component:n(965),meta:{rule:"digcoin"}},{path:"retenciones",name:"retencion",component:n(974),meta:{rule:"digcoin"}},{path:"decomisos",name:"decomiso",component:n(986),meta:{rule:"digcoin"}},{path:"donaciones",name:"donacion",component:n(992),meta:{rule:"digcoin"}},{path:"incineraciones",name:"incineracion",component:n(1001),meta:{rule:"digcoin"}},{path:"devoluciones",name:"devolucion",component:n(1007),meta:{rule:"digcoin"}},{path:"depositos",name:"deposito",component:n(1013),meta:{rule:"digcoin"}},{path:"roles",name:"roles",component:n(1040),meta:{rule:"admin"}},{path:"permisos",name:"permission",component:n(1046),meta:{rule:"admin"}},{path:"usuarios",name:"user",component:n(1052),meta:{rule:"admin"}},{path:"poderes",name:"poder",component:n(1058),meta:{rule:"digcoin"}},{path:"hojas_de_ruta",name:"hoja_ruta",component:n(1067),meta:{rule:"digcoin"}},{path:"hojas_ruta_trueque",name:"hoja_ruta_trueque",component:n(1073),meta:{rule:"digcoin"}},{path:"control_hojas_de_ruta",name:"control_hoja_ruta",component:n(1079),meta:{rule:"digcoin"}},{path:"capacitaciones",name:"capacitaciones",component:n(1097),meta:{rule:"admin"}},{path:"convocatorias_oii",name:"convocatorias_oii",component:n(1111),meta:{rule:"oii"}},{path:"proyectos",name:"proyectos",component:n(1117),meta:{rule:"oii"}},{path:"recepcion_solicitud_oii",name:"recepcion_solicitud_oii",component:n(1123),meta:{rule:"oii"}},{path:"priorizacion_oii",name:"priorizacion_oii",component:n(1129),meta:{rule:"oii"}},{path:"evaluacion_viabilidad_oii",name:"evaluacion_viabilidad_oii",component:n(1135),meta:{rule:"oii"}},{path:"supervision_oii",name:"supervision_oii",component:n(1141),meta:{rule:"oii"}},{path:"cierre_obra_oii",name:"cierre_obra_oii",component:n(1147),meta:{rule:"oii"}},{path:"evaluacion_impacto_oii",name:"evaluacion_impacto_oii",component:n(1153),meta:{rule:"oii"}},{path:"resoluciones_administrativas",name:"resolucion_administrativa",component:n(1159),meta:{rule:"digcoin"}},{path:"consulta_res_administrativa",name:"consulta_res_administrativa",component:n(1168),meta:{rule:"digcoin"}},{path:"sanciones_monetarias",name:"sanciones_monetarias",component:n(1174),meta:{rule:"digcoin"}},{path:"consulta_infracciones_san",name:"consulta_infracciones_san",component:n(1183),meta:{rule:"digcoin"}},{path:"reportes_comercializacion",name:"reportes_comercializacion",component:n(1188),meta:{rule:"admin"}},{path:"reportes_industrializacion",name:"reportes_industrializacion",component:n(1193),meta:{rule:"admin"}},{path:"reportes_des_integral",name:"reportes_des_integral",component:n(1198),meta:{rule:"admin"}},{path:"notificaciones",name:"notificaciones",component:n(1203),meta:{rule:"admin"}},{path:"notificaciones/nueva",name:"notificaciones_generate",component:n(1209),meta:{rule:"admin"}},{path:"notificaciones/monitoreo",name:"notificaciones_monitoreo",component:n(1215),meta:{rule:"admin"}},{path:"zona_autorizada",name:"zona_autorizada",component:n(1221),meta:{rule:"admin"}},{path:"departamentos",name:"departamento",component:n(1227),meta:{rule:"admin"}},{path:"provincias",name:"provincia",component:n(1233),meta:{rule:"admin"}},{path:"municipios",name:"municipio",component:n(1239),meta:{rule:"admin"}},{path:"federaciones",name:"federacion",component:n(1245),meta:{rule:"admin"}},{path:"regionales",name:"regional",component:n(1251),meta:{rule:"admin"}},{path:"centrales",name:"central",component:n(1257),meta:{rule:"admin"}},{path:"sindicatos",name:"sindicato",component:n(1263),meta:{rule:"admin"}},{path:"infracciones",name:"infraccion",component:n(1269),meta:{rule:"admin"}},{path:"mercados",name:"mercado",component:n(1275),meta:{rule:"admin"}},{path:"puestos_de_control",name:"puesto_de_control",component:n(1281),meta:{rule:"admin"}},{path:"rutas",name:"ruta",component:n(1287),meta:{rule:"admin"}},{path:"montos",name:"monto",component:n(1293),meta:{rule:"admin"}},{path:"localidades",name:"localidad",component:n(1299),meta:{rule:"admin"}},{path:"marcas_vehiculos",name:"marca",component:n(1305),meta:{rule:"admin"}},{path:"vehiculos",name:"vehiculo",component:n(1311),meta:{rule:"admin"}},{path:"tipo_convocatoria",name:"tipo_convocatoria",component:n(1317),meta:{rule:"oii"}},{path:"firmas",name:"firmas",component:n(1323),meta:{rule:"admin"}},{path:"comunidades",name:"comunidad",component:n(1329),meta:{rule:"admin"}},{path:"lista_eventos",name:"lista_eventos",component:n(1335),meta:{rule:"admin"}},{path:"registro_eventos",name:"registro_eventos",component:n(1338),meta:{rule:"admin"}},{path:"exposición_servicios",name:"servicio",component:n(1344),meta:{rule:"admin"}},{path:"generar_key",name:"generar_key",component:n(1350),meta:{rule:"cliente"}}]}])),[{path:"*",redirect:{name:"index"}}]);function ee(t,e){for(var n in e){var r;e[n].meta=e[n].meta||{},e[n].meta.rules||(e[n].meta.rules=[]),(r=e[n].meta.rules).unshift.apply(r,Qt(t)),e[n].children&&(e[n].children=ee(t,e[n].children))}return e}var ne=n(54),re=n(385),ie=this;i.a.use(Wt);var ae,oe,se=new Wt({mode:"history",routes:te});se.beforeEach((ae=c.a.mark(function t(e,n,r){var i;return c.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!Zt.getters["auth/token"]||Zt.getters["auth/check"]){t.next=8;break}return t.prev=1,t.next=4,Zt.dispatch("auth/fetchUser");case 4:t.next=8;break;case 6:t.prev=6,t.t0=t.catch(1);case 8:(i=ue(e))?r(i):r();case 10:case"end":return t.stop()}},t,ie,[[1,6]])}),oe=function(){var t=ae.apply(this,arguments);return new Promise(function(e,n){return function r(i,a){try{var o=t[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});e(s)}("next")})},function(t,e,n){return oe.apply(this,arguments)}));var ce={guest:{fail:"index",check:function(){return!Zt.getters["auth/check"]}},auth:{fail:"login",check:function(){return Zt.getters["auth/check"]}}};function ue(t){var e=!1,n=!1;return t.meta.rules&&t.meta.rules.forEach(function(t){var r=!1;if(Array.isArray(t)){var i=[];for(var a in t)i[a]=ce[t[a]].check(),r=r||i[a];r||e||(e=ce[t[i.indexOf(!1)]].fail)}else(r=ce[t].check())||e||(e=ce[t].fail);n=n&&r}),!(n||!e)&&{name:e}}var le=se,de=n(1362),fe=n.n(de),he=n(3),pe=n.n(he),me=this;pe.a.interceptors.request.use(function(t){t.headers["X-Requested-With"]="XMLHttpRequest",pe.a.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var e=Zt.getters["auth/token"];return e&&(t.headers.Authorization="Bearer "+e,pe.a.defaults.headers.common["X-CSRF-TOKEN"]=e,pe.a.defaults.headers.common.Authorization="Bearer "+e),t},function(t){return Promise.reject(t)}),pe.a.interceptors.response.use(function(t){return t},function(){var t,e=(t=c.a.mark(function t(e){var n,r;return c.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!Zt.getters["auth/token"]){t.next=10;break}if(401!==e.response.status||"Token expirado"!==e.response.data.message){t.next=8;break}return t.next=4,pe.a.post(ne.a.path("login.refresh"));case 4:return n=t.sent,r=n.data,Zt.dispatch("auth/saveToken",r),t.abrupt("return",pe.a.request(e.config));case 8:401!==e.response.status&&(500!==e.response.status||"Token expirado y no puede actualizar"!==e.response.data.message&&"Token en lista negra"!==e.response.data.message)||(Zt.dispatch("auth/destroy"),le.push({name:"login"})),403===e.response.status&&(e.response.data.message="No tiene autorización para este recurso");case 10:return void 0!==e.response.data.message&&ze.$toast.error(e.response.data.message||"Ocurrió un error."),void 0!==e.response.data.message&&console.log(e.response.data.message),void 0!==e.response.data.error&&ze.$toast.error(e.response.data.error||"Ocurrió un error."),t.abrupt("return",Promise.reject(e));case 14:case"end":return t.stop()}},t,me)}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(t){return e.apply(this,arguments)}}());n(1363);var ve=this;i.a.use(re.AclInstaller);var _e=new re.AclCreate({initial:"public",notfound:"/profile",router:le,acceptLocalRules:!0,globalRules:{admin:new re.AclRule("admin").generate(),digprococa:new re.AclRule("digprococa").or("admin").generate(),digcoin:new re.AclRule("digcoin").or("admin").or("digprococa").generate(),fonadin:new re.AclRule("fonadin").or("admin").generate(),oii:new re.AclRule("oii").or("admin").generate(),public:new re.AclRule("public").or("admin").or("digprococa").or("digcoin").or("fonadin").or("oii").generate(),cliente:new re.AclRule("cliente").generate()},middleware:function(){var t,e=(t=c.a.mark(function t(e){return c.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:null!=Zt.getters["auth/user"]?e.change(Zt.getters["auth/user"].roles[0].name):e.change("public");case 1:case"end":return t.stop()}},t,ve)}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(t){return e.apply(this,arguments)}}()}),ge=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},be=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),ye=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},xe=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},we=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},ke=function(){function t(e){ge(this,t),this._defaultOptions={auth:{headers:{}},authEndpoint:"/broadcasting/auth",broadcaster:"pusher",csrfToken:null,host:null,key:null,namespace:"App.Events"},this.setOptions(e),this.connect()}return be(t,[{key:"setOptions",value:function(t){return this.options=ye(this._defaultOptions,t),this.csrfToken()&&(this.options.auth.headers["X-CSRF-TOKEN"]=this.csrfToken()),t}},{key:"csrfToken",value:function(){var t=void 0;return"undefined"!=typeof window&&window.Laravel&&window.Laravel.csrfToken?window.Laravel.csrfToken:this.options.csrfToken?this.options.csrfToken:"undefined"!=typeof document&&"function"==typeof document.querySelector&&(t=document.querySelector('meta[name="csrf-token"]'))?t.getAttribute("content"):null}}]),t}(),Ce=function(){function t(){ge(this,t)}return be(t,[{key:"listenForWhisper",value:function(t,e){return this.listen(".client-"+t,e)}},{key:"notification",value:function(t){return this.listen(".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated",t)}},{key:"stopListeningForWhisper",value:function(t){return this.stopListening(".client-"+t)}}]),t}(),Ee=function(){function t(e){ge(this,t),this.setNamespace(e)}return be(t,[{key:"format",value:function(t){return"."===t.charAt(0)||"\\"===t.charAt(0)?t.substr(1):(this.namespace&&(t=this.namespace+"."+t),t.replace(/\./g,"\\"))}},{key:"setNamespace",value:function(t){this.namespace=t}}]),t}(),Se=function(t){function e(t,n,r){ge(this,e);var i=we(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return i.name=n,i.pusher=t,i.options=r,i.eventFormatter=new Ee(i.options.namespace),i.subscribe(),i}return xe(e,Ce),be(e,[{key:"subscribe",value:function(){this.subscription=this.pusher.subscribe(this.name)}},{key:"unsubscribe",value:function(){this.pusher.unsubscribe(this.name)}},{key:"listen",value:function(t,e){return this.on(this.eventFormatter.format(t),e),this}},{key:"stopListening",value:function(t){return this.subscription.unbind(this.eventFormatter.format(t)),this}},{key:"on",value:function(t,e){return this.subscription.bind(t,e),this}}]),e}(),Ie=function(t){function e(){return ge(this,e),we(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return xe(e,Se),be(e,[{key:"whisper",value:function(t,e){return this.pusher.channels.channels[this.name].trigger("client-"+t,e),this}}]),e}(),Me=function(t){function e(){return ge(this,e),we(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return xe(e,Se),be(e,[{key:"here",value:function(t){return this.on("pusher:subscription_succeeded",function(e){t(Object.keys(e.members).map(function(t){return e.members[t]}))}),this}},{key:"joining",value:function(t){return this.on("pusher:member_added",function(e){t(e.info)}),this}},{key:"leaving",value:function(t){return this.on("pusher:member_removed",function(e){t(e.info)}),this}},{key:"whisper",value:function(t,e){return this.pusher.channels.channels[this.name].trigger("client-"+t,e),this}}]),e}(),Te=function(t){function e(t,n,r){ge(this,e);var i=we(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return i.events={},i.name=n,i.socket=t,i.options=r,i.eventFormatter=new Ee(i.options.namespace),i.subscribe(),i.configureReconnector(),i}return xe(e,Ce),be(e,[{key:"subscribe",value:function(){this.socket.emit("subscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"unsubscribe",value:function(){this.unbind(),this.socket.emit("unsubscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"listen",value:function(t,e){return this.on(this.eventFormatter.format(t),e),this}},{key:"stopListening",value:function(t){var e=this.eventFormatter.format(t);return this.socket.removeListener(e),delete this.events[e],this}},{key:"on",value:function(t,e){var n=this,r=function(t,r){n.name==t&&e(r)};this.socket.on(t,r),this.bind(t,r)}},{key:"configureReconnector",value:function(){var t=this,e=function(){t.subscribe()};this.socket.on("reconnect",e),this.bind("reconnect",e)}},{key:"bind",value:function(t,e){this.events[t]=this.events[t]||[],this.events[t].push(e)}},{key:"unbind",value:function(){var t=this;Object.keys(this.events).forEach(function(e){t.events[e].forEach(function(n){t.socket.removeListener(e,n)}),delete t.events[e]})}}]),e}(),De=function(t){function e(){return ge(this,e),we(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return xe(e,Te),be(e,[{key:"whisper",value:function(t,e){return this.socket.emit("client event",{channel:this.name,event:"client-"+t,data:e}),this}}]),e}(),Re=function(t){function e(){return ge(this,e),we(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return xe(e,De),be(e,[{key:"here",value:function(t){return this.on("presence:subscribed",function(e){t(e.map(function(t){return t.user_info}))}),this}},{key:"joining",value:function(t){return this.on("presence:joining",function(e){return t(e.user_info)}),this}},{key:"leaving",value:function(t){return this.on("presence:leaving",function(e){return t(e.user_info)}),this}}]),e}(),Pe=function(t){function e(){return ge(this,e),we(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return xe(e,Ce),be(e,[{key:"subscribe",value:function(){}},{key:"unsubscribe",value:function(){}},{key:"listen",value:function(t,e){return this}},{key:"stopListening",value:function(t){return this}},{key:"on",value:function(t,e){return this}}]),e}(),Oe=function(t){function e(){return ge(this,e),we(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return xe(e,Pe),be(e,[{key:"whisper",value:function(t,e){return this}}]),e}(),Le=function(t){function e(){return ge(this,e),we(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return xe(e,Pe),be(e,[{key:"here",value:function(t){return this}},{key:"joining",value:function(t){return this}},{key:"leaving",value:function(t){return this}},{key:"whisper",value:function(t,e){return this}}]),e}(),Ae=function(t){function e(){ge(this,e);var t=we(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments));return t.channels={},t}return xe(e,ke),be(e,[{key:"connect",value:function(){void 0!==this.options.client?this.pusher=this.options.client:this.pusher=new Pusher(this.options.key,this.options)}},{key:"listen",value:function(t,e,n){return this.channel(t).listen(e,n)}},{key:"channel",value:function(t){return this.channels[t]||(this.channels[t]=new Se(this.pusher,t,this.options)),this.channels[t]}},{key:"privateChannel",value:function(t){return this.channels["private-"+t]||(this.channels["private-"+t]=new Ie(this.pusher,"private-"+t,this.options)),this.channels["private-"+t]}},{key:"presenceChannel",value:function(t){return this.channels["presence-"+t]||(this.channels["presence-"+t]=new Me(this.pusher,"presence-"+t,this.options)),this.channels["presence-"+t]}},{key:"leave",value:function(t){var e=this;[t,"private-"+t,"presence-"+t].forEach(function(t,n){e.leaveChannel(t)})}},{key:"leaveChannel",value:function(t){this.channels[t]&&(this.channels[t].unsubscribe(),delete this.channels[t])}},{key:"socketId",value:function(){return this.pusher.connection.socket_id}},{key:"disconnect",value:function(){this.pusher.disconnect()}}]),e}(),Ne=function(t){function e(){ge(this,e);var t=we(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments));return t.channels={},t}return xe(e,ke),be(e,[{key:"connect",value:function(){var t=this.getSocketIO();return this.socket=t(this.options.host,this.options),this.socket}},{key:"getSocketIO",value:function(){if(void 0!==this.options.client)return this.options.client;if("undefined"!=typeof io)return io;throw new Error("Socket.io client not found. Should be globally available or passed via options.client")}},{key:"listen",value:function(t,e,n){return this.channel(t).listen(e,n)}},{key:"channel",value:function(t){return this.channels[t]||(this.channels[t]=new Te(this.socket,t,this.options)),this.channels[t]}},{key:"privateChannel",value:function(t){return this.channels["private-"+t]||(this.channels["private-"+t]=new De(this.socket,"private-"+t,this.options)),this.channels["private-"+t]}},{key:"presenceChannel",value:function(t){return this.channels["presence-"+t]||(this.channels["presence-"+t]=new Re(this.socket,"presence-"+t,this.options)),this.channels["presence-"+t]}},{key:"leave",value:function(t){var e=this;[t,"private-"+t,"presence-"+t].forEach(function(t){e.leaveChannel(t)})}},{key:"leaveChannel",value:function(t){this.channels[t]&&(this.channels[t].unsubscribe(),delete this.channels[t])}},{key:"socketId",value:function(){return this.socket.id}},{key:"disconnect",value:function(){this.socket.disconnect()}}]),e}(),Be=function(t){function e(){ge(this,e);var t=we(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments));return t.channels={},t}return xe(e,ke),be(e,[{key:"connect",value:function(){}},{key:"listen",value:function(t,e,n){return new Pe}},{key:"channel",value:function(t){return new Pe}},{key:"privateChannel",value:function(t){return new Oe}},{key:"presenceChannel",value:function(t){return new Le}},{key:"leave",value:function(t){}},{key:"leaveChannel",value:function(t){}},{key:"socketId",value:function(){return"fake-socket-id"}},{key:"disconnect",value:function(){}}]),e}(),je=function(){function t(e){ge(this,t),this.options=e,this.connect(),this.options.withoutInterceptors||this.registerInterceptors()}return be(t,[{key:"channel",value:function(t){return this.connector.channel(t)}},{key:"connect",value:function(){"pusher"==this.options.broadcaster?this.connector=new Ae(this.options):"socket.io"==this.options.broadcaster?this.connector=new Ne(this.options):"null"==this.options.broadcaster?this.connector=new Be(this.options):"function"==typeof this.options.broadcaster&&(this.connector=new this.options.broadcaster(this.options))}},{key:"disconnect",value:function(){this.connector.disconnect()}},{key:"join",value:function(t){return this.connector.presenceChannel(t)}},{key:"leave",value:function(t){this.connector.leave(t)}},{key:"leaveChannel",value:function(t){this.connector.leaveChannel(t)}},{key:"listen",value:function(t,e,n){return this.connector.listen(t,e,n)}},{key:"private",value:function(t){return this.connector.privateChannel(t)}},{key:"socketId",value:function(){return this.connector.socketId()}},{key:"registerInterceptors",value:function(){"function"==typeof Vue&&Vue.http&&this.registerVueRequestInterceptor(),"function"==typeof axios&&this.registerAxiosRequestInterceptor(),"function"==typeof jQuery&&this.registerjQueryAjaxSetup()}},{key:"registerVueRequestInterceptor",value:function(){var t=this;Vue.http.interceptors.push(function(e,n){t.socketId()&&e.headers.set("X-Socket-ID",t.socketId()),n()})}},{key:"registerAxiosRequestInterceptor",value:function(){var t=this;axios.interceptors.request.use(function(e){return t.socketId()&&(e.headers["X-Socket-Id"]=t.socketId()),e})}},{key:"registerjQueryAjaxSetup",value:function(){var t=this;void 0!==jQuery.ajax&&jQuery.ajaxPrefilter(function(e,n,r){t.socketId()&&r.setRequestHeader("X-Socket-Id",t.socketId())})}}]),t}(),Fe=n(23),Ye=n.n(Fe);n.d(e,"app",function(){return ze}),window.io=n(1369),i.a.config.productionTip=!1;var $e=n(5);n(109),i.a.use(n(1394),{moment:$e}),i.a.use(Ye.a),i.a.use(o.a,{lang:{locales:{es:{dataIterator:{rowsPerPageText:"Filas por pagina:",rowsPerPageAll:"Todo",pageText:"{0}-{1} de {2}",noResultsText:"Sin registros encontrados",nextPage:"Siguiente",prevPage:"Anterior"},dataTable:{rowsPerPageText:"Filas por pagina:"},noDataText:"Sin datos disponibles"}},current:"es"},theme:{primary:"#689F38",secondary:"#8BC34A",tertiary:"#DCEDC8",accent:"#FF5252",info:"#00838f",error:"#e53935",danger:"#b71c1c",warning:"#f4511e",success:"#1b5e20",normal:"#F5F5F5"}}),i.a.use(fe.a);var ze=new i.a({router:le,acl:_e,store:Zt,render:function(t){return t(n(1395))}}).$mount("#app");window.Echo=new je({broadcaster:"socket.io",host:ne.b.socketUrl})},function(t,e,n){"use strict";(function(t){if(n(403),n(600),n(601),t._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");t._babelPolyfill=!0;var e="defineProperty";function r(t,n,r){t[n]||Object[e](t,n,{writable:!0,configurable:!0,value:r})}r(String.prototype,"padLeft","".padStart),r(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(t){[][t]&&r(Array,t,Function.call.bind([][t]))})}).call(e,n(20))},function(t,e,n){n(404),n(407),n(408),n(409),n(410),n(411),n(412),n(413),n(414),n(415),n(416),n(417),n(418),n(419),n(420),n(421),n(422),n(423),n(424),n(425),n(426),n(427),n(428),n(429),n(430),n(431),n(432),n(433),n(434),n(435),n(436),n(437),n(438),n(439),n(440),n(441),n(442),n(443),n(444),n(445),n(446),n(447),n(448),n(449),n(450),n(451),n(452),n(453),n(454),n(455),n(456),n(457),n(458),n(459),n(460),n(461),n(462),n(463),n(464),n(465),n(466),n(467),n(468),n(469),n(470),n(471),n(472),n(473),n(474),n(475),n(476),n(477),n(478),n(479),n(480),n(481),n(482),n(484),n(485),n(487),n(488),n(489),n(490),n(491),n(492),n(493),n(495),n(496),n(497),n(498),n(499),n(500),n(501),n(502),n(503),n(504),n(505),n(506),n(507),n(139),n(508),n(316),n(509),n(317),n(510),n(511),n(512),n(513),n(514),n(320),n(322),n(323),n(515),n(516),n(517),n(518),n(519),n(520),n(521),n(522),n(523),n(524),n(525),n(526),n(527),n(528),n(529),n(530),n(531),n(532),n(533),n(534),n(535),n(536),n(537),n(538),n(539),n(540),n(541),n(542),n(543),n(544),n(545),n(546),n(547),n(548),n(549),n(550),n(551),n(552),n(553),n(554),n(555),n(556),n(557),n(558),n(559),n(560),n(561),n(562),n(563),n(564),n(565),n(566),n(567),n(568),n(569),n(570),n(571),n(572),n(573),n(574),n(575),n(576),n(577),n(578),n(579),n(580),n(581),n(582),n(583),n(584),n(585),n(586),n(587),n(588),n(589),n(590),n(591),n(592),n(593),n(594),n(595),n(596),n(597),n(598),n(599),t.exports=n(37)},function(t,e,n){"use strict";var r=n(12),i=n(30),a=n(17),o=n(4),s=n(28),c=n(52).KEY,u=n(13),l=n(79),d=n(70),f=n(58),h=n(15),p=n(298),m=n(120),v=n(406),_=n(95),g=n(8),b=n(14),y=n(21),x=n(31),w=n(43),k=n(57),C=n(61),E=n(301),S=n(32),I=n(94),M=n(18),T=n(59),D=S.f,R=M.f,P=E.f,O=r.Symbol,L=r.JSON,A=L&&L.stringify,N=h("_hidden"),B=h("toPrimitive"),j={}.propertyIsEnumerable,F=l("symbol-registry"),Y=l("symbols"),$=l("op-symbols"),z=Object.prototype,V="function"==typeof O&&!!I.f,H=r.QObject,q=!H||!H.prototype||!H.prototype.findChild,W=a&&u(function(){return 7!=C(R({},"a",{get:function(){return R(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=D(z,e);r&&delete z[e],R(t,e,n),r&&t!==z&&R(z,e,r)}:R,U=function(t){var e=Y[t]=C(O.prototype);return e._k=t,e},G=V&&"symbol"==typeof O.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof O},K=function(t,e,n){return t===z&&K($,e,n),g(t),e=w(e,!0),g(n),i(Y,e)?(n.enumerable?(i(t,N)&&t[N][e]&&(t[N][e]=!1),n=C(n,{enumerable:k(0,!1)})):(i(t,N)||R(t,N,k(1,{})),t[N][e]=!0),W(t,e,n)):R(t,e,n)},X=function(t,e){g(t);for(var n,r=v(e=x(e)),i=0,a=r.length;a>i;)K(t,n=r[i++],e[n]);return t},J=function(t){var e=j.call(this,t=w(t,!0));return!(this===z&&i(Y,t)&&!i($,t))&&(!(e||!i(this,t)||!i(Y,t)||i(this,N)&&this[N][t])||e)},Z=function(t,e){if(t=x(t),e=w(e,!0),t!==z||!i(Y,e)||i($,e)){var n=D(t,e);return!n||!i(Y,e)||i(t,N)&&t[N][e]||(n.enumerable=!0),n}},Q=function(t){for(var e,n=P(x(t)),r=[],a=0;n.length>a;)i(Y,e=n[a++])||e==N||e==c||r.push(e);return r},tt=function(t){for(var e,n=t===z,r=P(n?$:x(t)),a=[],o=0;r.length>o;)!i(Y,e=r[o++])||n&&!i(z,e)||a.push(Y[e]);return a};V||(s((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var t=f(arguments.length>0?arguments[0]:void 0),e=function(n){this===z&&e.call($,n),i(this,N)&&i(this[N],t)&&(this[N][t]=!1),W(this,t,k(1,n))};return a&&q&&W(z,t,{configurable:!0,set:e}),U(t)}).prototype,"toString",function(){return this._k}),S.f=Z,M.f=K,n(62).f=E.f=Q,n(81).f=J,I.f=tt,a&&!n(51)&&s(z,"propertyIsEnumerable",J,!0),p.f=function(t){return U(h(t))}),o(o.G+o.W+o.F*!V,{Symbol:O});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)h(et[nt++]);for(var rt=T(h.store),it=0;rt.length>it;)m(rt[it++]);o(o.S+o.F*!V,"Symbol",{for:function(t){return i(F,t+="")?F[t]:F[t]=O(t)},keyFor:function(t){if(!G(t))throw TypeError(t+" is not a symbol!");for(var e in F)if(F[e]===t)return e},useSetter:function(){q=!0},useSimple:function(){q=!1}}),o(o.S+o.F*!V,"Object",{create:function(t,e){return void 0===e?C(t):X(C(t),e)},defineProperty:K,defineProperties:X,getOwnPropertyDescriptor:Z,getOwnPropertyNames:Q,getOwnPropertySymbols:tt});var at=u(function(){I.f(1)});o(o.S+o.F*at,"Object",{getOwnPropertySymbols:function(t){return I.f(y(t))}}),L&&o(o.S+o.F*(!V||u(function(){var t=O();return"[null]"!=A([t])||"{}"!=A({a:t})||"{}"!=A(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(b(e)||void 0!==t)&&!G(t))return _(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!G(e))return e}),r[1]=e,A.apply(L,r)}}),O.prototype[B]||n(27)(O.prototype,B,O.prototype.valueOf),d(O,"Symbol"),d(Math,"Math",!0),d(r.JSON,"JSON",!0)},function(t,e,n){t.exports=n(79)("native-function-to-string",Function.toString)},function(t,e,n){var r=n(59),i=n(94),a=n(81);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var o,s=n(t),c=a.f,u=0;s.length>u;)c.call(t,o=s[u++])&&e.push(o);return e}},function(t,e,n){var r=n(4);r(r.S,"Object",{create:n(61)})},function(t,e,n){var r=n(4);r(r.S+r.F*!n(17),"Object",{defineProperty:n(18).f})},function(t,e,n){var r=n(4);r(r.S+r.F*!n(17),"Object",{defineProperties:n(300)})},function(t,e,n){var r=n(31),i=n(32).f;n(45)("getOwnPropertyDescriptor",function(){return function(t,e){return i(r(t),e)}})},function(t,e,n){var r=n(21),i=n(33);n(45)("getPrototypeOf",function(){return function(t){return i(r(t))}})},function(t,e,n){var r=n(21),i=n(59);n(45)("keys",function(){return function(t){return i(r(t))}})},function(t,e,n){n(45)("getOwnPropertyNames",function(){return n(301).f})},function(t,e,n){var r=n(14),i=n(52).onFreeze;n(45)("freeze",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(14),i=n(52).onFreeze;n(45)("seal",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(14),i=n(52).onFreeze;n(45)("preventExtensions",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(14);n(45)("isFrozen",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){var r=n(14);n(45)("isSealed",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){var r=n(14);n(45)("isExtensible",function(t){return function(e){return!!r(e)&&(!t||t(e))}})},function(t,e,n){var r=n(4);r(r.S+r.F,"Object",{assign:n(302)})},function(t,e,n){var r=n(4);r(r.S,"Object",{is:n(303)})},function(t,e,n){var r=n(4);r(r.S,"Object",{setPrototypeOf:n(124).set})},function(t,e,n){"use strict";var r=n(71),i={};i[n(15)("toStringTag")]="z",i+""!="[object z]"&&n(28)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(t,e,n){var r=n(4);r(r.P,"Function",{bind:n(304)})},function(t,e,n){var r=n(18).f,i=Function.prototype,a=/^\s*function ([^ (]*)/;"name"in i||n(17)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(a)[1]}catch(t){return""}}})},function(t,e,n){"use strict";var r=n(14),i=n(33),a=n(15)("hasInstance"),o=Function.prototype;a in o||n(18).f(o,a,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){var r=n(4),i=n(306);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(t,e,n){var r=n(4),i=n(307);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(t,e,n){"use strict";var r=n(12),i=n(30),a=n(39),o=n(126),s=n(43),c=n(13),u=n(62).f,l=n(32).f,d=n(18).f,f=n(72).trim,h=r.Number,p=h,m=h.prototype,v="Number"==a(n(61)(m)),_="trim"in String.prototype,g=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){var n,r,i,a=(e=_?e.trim():f(e,3)).charCodeAt(0);if(43===a||45===a){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===a){switch(e.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+e}for(var o,c=e.slice(2),u=0,l=c.length;u<l;u++)if((o=c.charCodeAt(u))<48||o>i)return NaN;return parseInt(c,r)}}return+e};if(!h(" 0o1")||!h("0b1")||h("+0x1")){h=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof h&&(v?c(function(){m.valueOf.call(n)}):"Number"!=a(n))?o(new p(g(e)),n,h):g(e)};for(var b,y=n(17)?u(p):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;y.length>x;x++)i(p,b=y[x])&&!i(h,b)&&d(h,b,l(p,b));h.prototype=m,m.constructor=h,n(28)(r,"Number",h)}},function(t,e,n){"use strict";var r=n(4),i=n(40),a=n(308),o=n(127),s=1..toFixed,c=Math.floor,u=[0,0,0,0,0,0],l="Number.toFixed: incorrect invocation!",d=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*u[n],u[n]=r%1e7,r=c(r/1e7)},f=function(t){for(var e=6,n=0;--e>=0;)n+=u[e],u[e]=c(n/t),n=n%t*1e7},h=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==u[t]){var n=String(u[t]);e=""===e?n:e+o.call("0",7-n.length)+n}return e},p=function(t,e,n){return 0===e?n:e%2==1?p(t,e-1,n*t):p(t*t,e/2,n)};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(13)(function(){s.call({})})),"Number",{toFixed:function(t){var e,n,r,s,c=a(this,l),u=i(t),m="",v="0";if(u<0||u>20)throw RangeError(l);if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return String(c);if(c<0&&(m="-",c=-c),c>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(c*p(2,69,1))-69)<0?c*p(2,-e,1):c/p(2,e,1),n*=4503599627370496,(e=52-e)>0){for(d(0,n),r=u;r>=7;)d(1e7,0),r-=7;for(d(p(10,r,1),0),r=e-1;r>=23;)f(1<<23),r-=23;f(1<<r),d(1,1),f(2),v=h()}else d(0,n),d(1<<-e,0),v=h()+o.call("0",u);return v=u>0?m+((s=v.length)<=u?"0."+o.call("0",u-s)+v:v.slice(0,s-u)+"."+v.slice(s-u)):m+v}})},function(t,e,n){"use strict";var r=n(4),i=n(13),a=n(308),o=1..toPrecision;r(r.P+r.F*(i(function(){return"1"!==o.call(1,void 0)})||!i(function(){o.call({})})),"Number",{toPrecision:function(t){var e=a(this,"Number#toPrecision: incorrect invocation!");return void 0===t?o.call(e):o.call(e,t)}})},function(t,e,n){var r=n(4);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,n){var r=n(4),i=n(12).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,e,n){var r=n(4);r(r.S,"Number",{isInteger:n(309)})},function(t,e,n){var r=n(4);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,n){var r=n(4),i=n(309),a=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return i(t)&&a(t)<=9007199254740991}})},function(t,e,n){var r=n(4);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){var r=n(4);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var r=n(4),i=n(307);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,e,n){var r=n(4),i=n(306);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,e,n){var r=n(4),i=n(310),a=Math.sqrt,o=Math.acosh;r(r.S+r.F*!(o&&710==Math.floor(o(Number.MAX_VALUE))&&o(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+a(t-1)*a(t+1))}})},function(t,e,n){var r=n(4),i=Math.asinh;r(r.S+r.F*!(i&&1/i(0)>0),"Math",{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):Math.log(e+Math.sqrt(e*e+1)):e}})},function(t,e,n){var r=n(4),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,n){var r=n(4),i=n(128);r(r.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e,n){var r=n(4);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,n){var r=n(4),i=Math.exp;r(r.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,e,n){var r=n(4),i=n(129);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,e,n){var r=n(4);r(r.S,"Math",{fround:n(311)})},function(t,e,n){var r=n(4),i=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,a=0,o=0,s=arguments.length,c=0;o<s;)c<(n=i(arguments[o++]))?(a=a*(r=c/n)*r+1,c=n):a+=n>0?(r=n/c)*r:n;return c===1/0?1/0:c*Math.sqrt(a)}})},function(t,e,n){var r=n(4),i=Math.imul;r(r.S+r.F*n(13)(function(){return-5!=i(4294967295,5)||2!=i.length}),"Math",{imul:function(t,e){var n=+t,r=+e,i=65535&n,a=65535&r;return 0|i*a+((65535&n>>>16)*a+i*(65535&r>>>16)<<16>>>0)}})},function(t,e,n){var r=n(4);r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,e,n){var r=n(4);r(r.S,"Math",{log1p:n(310)})},function(t,e,n){var r=n(4);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){var r=n(4);r(r.S,"Math",{sign:n(128)})},function(t,e,n){var r=n(4),i=n(129),a=Math.exp;r(r.S+r.F*n(13)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(a(t-1)-a(-t-1))*(Math.E/2)}})},function(t,e,n){var r=n(4),i=n(129),a=Math.exp;r(r.S,"Math",{tanh:function(t){var e=i(t=+t),n=i(-t);return e==1/0?1:n==1/0?-1:(e-n)/(a(t)+a(-t))}})},function(t,e,n){var r=n(4);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){var r=n(4),i=n(60),a=String.fromCharCode,o=String.fromCodePoint;r(r.S+r.F*(!!o&&1!=o.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,o=0;r>o;){if(e=+arguments[o++],i(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?a(e):a(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},function(t,e,n){var r=n(4),i=n(31),a=n(16);r(r.S,"String",{raw:function(t){for(var e=i(t.raw),n=a(e.length),r=arguments.length,o=[],s=0;n>s;)o.push(String(e[s++])),s<r&&o.push(String(arguments[s]));return o.join("")}})},function(t,e,n){"use strict";n(72)("trim",function(t){return function(){return t(this,3)}})},function(t,e,n){"use strict";var r=n(96)(!0);n(130)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var r=n(4),i=n(96)(!1);r(r.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r=n(4),i=n(16),a=n(132),o="".endsWith;r(r.P+r.F*n(133)("endsWith"),"String",{endsWith:function(t){var e=a(this,t,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=i(e.length),s=void 0===n?r:Math.min(i(n),r),c=String(t);return o?o.call(e,c,s):e.slice(s-c.length,s)===c}})},function(t,e,n){"use strict";var r=n(4),i=n(132);r(r.P+r.F*n(133)("includes"),"String",{includes:function(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(4);r(r.P,"String",{repeat:n(127)})},function(t,e,n){"use strict";var r=n(4),i=n(16),a=n(132),o="".startsWith;r(r.P+r.F*n(133)("startsWith"),"String",{startsWith:function(t){var e=a(this,t,"startsWith"),n=i(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return o?o.call(e,r,n):e.slice(n,n+r.length)===r}})},function(t,e,n){"use strict";n(29)("anchor",function(t){return function(e){return t(this,"a","name",e)}})},function(t,e,n){"use strict";n(29)("big",function(t){return function(){return t(this,"big","","")}})},function(t,e,n){"use strict";n(29)("blink",function(t){return function(){return t(this,"blink","","")}})},function(t,e,n){"use strict";n(29)("bold",function(t){return function(){return t(this,"b","","")}})},function(t,e,n){"use strict";n(29)("fixed",function(t){return function(){return t(this,"tt","","")}})},function(t,e,n){"use strict";n(29)("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},function(t,e,n){"use strict";n(29)("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},function(t,e,n){"use strict";n(29)("italics",function(t){return function(){return t(this,"i","","")}})},function(t,e,n){"use strict";n(29)("link",function(t){return function(e){return t(this,"a","href",e)}})},function(t,e,n){"use strict";n(29)("small",function(t){return function(){return t(this,"small","","")}})},function(t,e,n){"use strict";n(29)("strike",function(t){return function(){return t(this,"strike","","")}})},function(t,e,n){"use strict";n(29)("sub",function(t){return function(){return t(this,"sub","","")}})},function(t,e,n){"use strict";n(29)("sup",function(t){return function(){return t(this,"sup","","")}})},function(t,e,n){var r=n(4);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var r=n(4),i=n(21),a=n(43);r(r.P+r.F*n(13)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var e=i(this),n=a(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){var r=n(4),i=n(483);r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(t,e,n){"use strict";var r=n(13),i=Date.prototype.getTime,a=Date.prototype.toISOString,o=function(t){return t>9?t:"0"+t};t.exports=r(function(){return"0385-07-25T07:06:39.999Z"!=a.call(new Date(-5e13-1))})||!r(function(){a.call(new Date(NaN))})?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+o(t.getUTCMonth()+1)+"-"+o(t.getUTCDate())+"T"+o(t.getUTCHours())+":"+o(t.getUTCMinutes())+":"+o(t.getUTCSeconds())+"."+(n>99?n:"0"+o(n))+"Z"}:a},function(t,e,n){var r=Date.prototype,i=r.toString,a=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(28)(r,"toString",function(){var t=a.call(this);return t==t?i.call(this):"Invalid Date"})},function(t,e,n){var r=n(15)("toPrimitive"),i=Date.prototype;r in i||n(27)(i,r,n(486))},function(t,e,n){"use strict";var r=n(8),i=n(43);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return i(r(this),"number"!=t)}},function(t,e,n){var r=n(4);r(r.S,"Array",{isArray:n(95)})},function(t,e,n){"use strict";var r=n(38),i=n(4),a=n(21),o=n(312),s=n(134),c=n(16),u=n(135),l=n(136);i(i.S+i.F*!n(98)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,i,d,f=a(t),h="function"==typeof this?this:Array,p=arguments.length,m=p>1?arguments[1]:void 0,v=void 0!==m,_=0,g=l(f);if(v&&(m=r(m,p>2?arguments[2]:void 0,2)),void 0==g||h==Array&&s(g))for(n=new h(e=c(f.length));e>_;_++)u(n,_,v?m(f[_],_):f[_]);else for(d=g.call(f),n=new h;!(i=d.next()).done;_++)u(n,_,v?o(d,m,[i.value,_],!0):i.value);return n.length=_,n}})},function(t,e,n){"use strict";var r=n(4),i=n(135);r(r.S+r.F*n(13)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)i(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var r=n(4),i=n(31),a=[].join;r(r.P+r.F*(n(80)!=Object||!n(41)(a)),"Array",{join:function(t){return a.call(i(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var r=n(4),i=n(123),a=n(39),o=n(60),s=n(16),c=[].slice;r(r.P+r.F*n(13)(function(){i&&c.call(i)}),"Array",{slice:function(t,e){var n=s(this.length),r=a(this);if(e=void 0===e?n:e,"Array"==r)return c.call(this,t,e);for(var i=o(t,n),u=o(e,n),l=s(u-i),d=new Array(l),f=0;f<l;f++)d[f]="String"==r?this.charAt(i+f):this[i+f];return d}})},function(t,e,n){"use strict";var r=n(4),i=n(25),a=n(21),o=n(13),s=[].sort,c=[1,2,3];r(r.P+r.F*(o(function(){c.sort(void 0)})||!o(function(){c.sort(null)})||!n(41)(s)),"Array",{sort:function(t){return void 0===t?s.call(a(this)):s.call(a(this),i(t))}})},function(t,e,n){"use strict";var r=n(4),i=n(46)(0),a=n(41)([].forEach,!0);r(r.P+r.F*!a,"Array",{forEach:function(t){return i(this,t,arguments[1])}})},function(t,e,n){var r=n(14),i=n(95),a=n(15)("species");t.exports=function(t){var e;return i(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!i(e.prototype)||(e=void 0),r(e)&&null===(e=e[a])&&(e=void 0)),void 0===e?Array:e}},function(t,e,n){"use strict";var r=n(4),i=n(46)(1);r(r.P+r.F*!n(41)([].map,!0),"Array",{map:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(4),i=n(46)(2);r(r.P+r.F*!n(41)([].filter,!0),"Array",{filter:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(4),i=n(46)(3);r(r.P+r.F*!n(41)([].some,!0),"Array",{some:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(4),i=n(46)(4);r(r.P+r.F*!n(41)([].every,!0),"Array",{every:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(4),i=n(313);r(r.P+r.F*!n(41)([].reduce,!0),"Array",{reduce:function(t){return i(this,t,arguments.length,arguments[1],!1)}})},function(t,e,n){"use strict";var r=n(4),i=n(313);r(r.P+r.F*!n(41)([].reduceRight,!0),"Array",{reduceRight:function(t){return i(this,t,arguments.length,arguments[1],!0)}})},function(t,e,n){"use strict";var r=n(4),i=n(93)(!1),a=[].indexOf,o=!!a&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(o||!n(41)(a)),"Array",{indexOf:function(t){return o?a.apply(this,arguments)||0:i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(4),i=n(31),a=n(40),o=n(16),s=[].lastIndexOf,c=!!s&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(c||!n(41)(s)),"Array",{lastIndexOf:function(t){if(c)return s.apply(this,arguments)||0;var e=i(this),n=o(e.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,a(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}})},function(t,e,n){var r=n(4);r(r.P,"Array",{copyWithin:n(314)}),n(53)("copyWithin")},function(t,e,n){var r=n(4);r(r.P,"Array",{fill:n(138)}),n(53)("fill")},function(t,e,n){"use strict";var r=n(4),i=n(46)(5),a=!0;"find"in[]&&Array(1).find(function(){a=!1}),r(r.P+r.F*a,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(53)("find")},function(t,e,n){"use strict";var r=n(4),i=n(46)(6),a="findIndex",o=!0;a in[]&&Array(1)[a](function(){o=!1}),r(r.P+r.F*o,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(53)(a)},function(t,e,n){n(63)("Array")},function(t,e,n){var r=n(12),i=n(126),a=n(18).f,o=n(62).f,s=n(97),c=n(82),u=r.RegExp,l=u,d=u.prototype,f=/a/g,h=/a/g,p=new u(f)!==f;if(n(17)&&(!p||n(13)(function(){return h[n(15)("match")]=!1,u(f)!=f||u(h)==h||"/a/i"!=u(f,"i")}))){u=function(t,e){var n=this instanceof u,r=s(t),a=void 0===e;return!n&&r&&t.constructor===u&&a?t:i(p?new l(r&&!a?t.source:t,e):l((r=t instanceof u)?t.source:t,r&&a?c.call(t):e),n?this:d,u)};for(var m=function(t){t in u||a(u,t,{configurable:!0,get:function(){return l[t]},set:function(e){l[t]=e}})},v=o(l),_=0;v.length>_;)m(v[_++]);d.constructor=u,u.prototype=d,n(28)(r,"RegExp",u)}n(63)("RegExp")},function(t,e,n){"use strict";n(317);var r=n(8),i=n(82),a=n(17),o=/./.toString,s=function(t){n(28)(RegExp.prototype,"toString",t,!0)};n(13)(function(){return"/a/b"!=o.call({source:"a",flags:"b"})})?s(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!a&&t instanceof RegExp?i.call(t):void 0)}):"toString"!=o.name&&s(function(){return o.call(this)})},function(t,e,n){"use strict";var r=n(8),i=n(16),a=n(141),o=n(99);n(100)("match",1,function(t,e,n,s){return[function(n){var r=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=s(n,t,this);if(e.done)return e.value;var c=r(t),u=String(this);if(!c.global)return o(c,u);var l=c.unicode;c.lastIndex=0;for(var d,f=[],h=0;null!==(d=o(c,u));){var p=String(d[0]);f[h]=p,""===p&&(c.lastIndex=a(u,i(c.lastIndex),l)),h++}return 0===h?null:f}]})},function(t,e,n){"use strict";var r=n(8),i=n(21),a=n(16),o=n(40),s=n(141),c=n(99),u=Math.max,l=Math.min,d=Math.floor,f=/\$([$&`']|\d\d?|<[^>]*>)/g,h=/\$([$&`']|\d\d?)/g;n(100)("replace",2,function(t,e,n,p){return[function(r,i){var a=t(this),o=void 0==r?void 0:r[e];return void 0!==o?o.call(r,a,i):n.call(String(a),r,i)},function(t,e){var i=p(n,t,this,e);if(i.done)return i.value;var d=r(t),f=String(this),h="function"==typeof e;h||(e=String(e));var v=d.global;if(v){var _=d.unicode;d.lastIndex=0}for(var g=[];;){var b=c(d,f);if(null===b)break;if(g.push(b),!v)break;""===String(b[0])&&(d.lastIndex=s(f,a(d.lastIndex),_))}for(var y,x="",w=0,k=0;k<g.length;k++){b=g[k];for(var C=String(b[0]),E=u(l(o(b.index),f.length),0),S=[],I=1;I<b.length;I++)S.push(void 0===(y=b[I])?y:String(y));var M=b.groups;if(h){var T=[C].concat(S,E,f);void 0!==M&&T.push(M);var D=String(e.apply(void 0,T))}else D=m(C,f,E,S,M,e);E>=w&&(x+=f.slice(w,E)+D,w=E+C.length)}return x+f.slice(w)}];function m(t,e,r,a,o,s){var c=r+t.length,u=a.length,l=h;return void 0!==o&&(o=i(o),l=f),n.call(s,l,function(n,i){var s;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(c);case"<":s=o[i.slice(1,-1)];break;default:var l=+i;if(0===l)return n;if(l>u){var f=d(l/10);return 0===f?n:f<=u?void 0===a[f-1]?i.charAt(1):a[f-1]+i.charAt(1):n}s=a[l-1]}return void 0===s?"":s})}})},function(t,e,n){"use strict";var r=n(8),i=n(303),a=n(99);n(100)("search",1,function(t,e,n,o){return[function(n){var r=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=o(n,t,this);if(e.done)return e.value;var s=r(t),c=String(this),u=s.lastIndex;i(u,0)||(s.lastIndex=0);var l=a(s,c);return i(s.lastIndex,u)||(s.lastIndex=u),null===l?-1:l.index}]})},function(t,e,n){"use strict";var r=n(97),i=n(8),a=n(83),o=n(141),s=n(16),c=n(99),u=n(140),l=n(13),d=Math.min,f=[].push,h=!l(function(){RegExp(4294967295,"y")});n(100)("split",2,function(t,e,n,l){var p;return p="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,e){var i=String(this);if(void 0===t&&0===e)return[];if(!r(t))return n.call(i,t,e);for(var a,o,s,c=[],l=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),d=0,h=void 0===e?4294967295:e>>>0,p=new RegExp(t.source,l+"g");(a=u.call(p,i))&&!((o=p.lastIndex)>d&&(c.push(i.slice(d,a.index)),a.length>1&&a.index<i.length&&f.apply(c,a.slice(1)),s=a[0].length,d=o,c.length>=h));)p.lastIndex===a.index&&p.lastIndex++;return d===i.length?!s&&p.test("")||c.push(""):c.push(i.slice(d)),c.length>h?c.slice(0,h):c}:"0".split(void 0,0).length?function(t,e){return void 0===t&&0===e?[]:n.call(this,t,e)}:n,[function(n,r){var i=t(this),a=void 0==n?void 0:n[e];return void 0!==a?a.call(n,i,r):p.call(String(i),n,r)},function(t,e){var r=l(p,t,this,e,p!==n);if(r.done)return r.value;var u=i(t),f=String(this),m=a(u,RegExp),v=u.unicode,_=(u.ignoreCase?"i":"")+(u.multiline?"m":"")+(u.unicode?"u":"")+(h?"y":"g"),g=new m(h?u:"^(?:"+u.source+")",_),b=void 0===e?4294967295:e>>>0;if(0===b)return[];if(0===f.length)return null===c(g,f)?[f]:[];for(var y=0,x=0,w=[];x<f.length;){g.lastIndex=h?x:0;var k,C=c(g,h?f:f.slice(x));if(null===C||(k=d(s(g.lastIndex+(h?0:x)),f.length))===y)x=o(f,x,v);else{if(w.push(f.slice(y,x)),w.length===b)return w;for(var E=1;E<=C.length-1;E++)if(w.push(C[E]),w.length===b)return w;x=y=k}}return w.push(f.slice(y)),w}]})},function(t,e,n){"use strict";var r,i,a,o,s=n(51),c=n(12),u=n(38),l=n(71),d=n(4),f=n(14),h=n(25),p=n(64),m=n(65),v=n(83),_=n(142).set,g=n(143)(),b=n(144),y=n(318),x=n(101),w=n(319),k=c.TypeError,C=c.process,E=C&&C.versions,S=E&&E.v8||"",I=c.Promise,M="process"==l(C),T=function(){},D=i=b.f,R=!!function(){try{var t=I.resolve(1),e=(t.constructor={})[n(15)("species")]=function(t){t(T,T)};return(M||"function"==typeof PromiseRejectionEvent)&&t.then(T)instanceof e&&0!==S.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(t){}}(),P=function(t){var e;return!(!f(t)||"function"!=typeof(e=t.then))&&e},O=function(t,e){if(!t._n){t._n=!0;var n=t._c;g(function(){for(var r=t._v,i=1==t._s,a=0,o=function(e){var n,a,o,s=i?e.ok:e.fail,c=e.resolve,u=e.reject,l=e.domain;try{s?(i||(2==t._h&&N(t),t._h=1),!0===s?n=r:(l&&l.enter(),n=s(r),l&&(l.exit(),o=!0)),n===e.promise?u(k("Promise-chain cycle")):(a=P(n))?a.call(n,c,u):c(n)):u(r)}catch(t){l&&!o&&l.exit(),u(t)}};n.length>a;)o(n[a++]);t._c=[],t._n=!1,e&&!t._h&&L(t)})}},L=function(t){_.call(c,function(){var e,n,r,i=t._v,a=A(t);if(a&&(e=y(function(){M?C.emit("unhandledRejection",i,t):(n=c.onunhandledrejection)?n({promise:t,reason:i}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=M||A(t)?2:1),t._a=void 0,a&&e.e)throw e.v})},A=function(t){return 1!==t._h&&0===(t._a||t._c).length},N=function(t){_.call(c,function(){var e;M?C.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})})},B=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),O(e,!0))},j=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw k("Promise can't be resolved itself");(e=P(t))?g(function(){var r={_w:n,_d:!1};try{e.call(t,u(j,r,1),u(B,r,1))}catch(t){B.call(r,t)}}):(n._v=t,n._s=1,O(n,!1))}catch(t){B.call({_w:n,_d:!1},t)}}};R||(I=function(t){p(this,I,"Promise","_h"),h(t),r.call(this);try{t(u(j,this,1),u(B,this,1))}catch(t){B.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(66)(I.prototype,{then:function(t,e){var n=D(v(this,I));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=M?C.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&O(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),a=function(){var t=new r;this.promise=t,this.resolve=u(j,t,1),this.reject=u(B,t,1)},b.f=D=function(t){return t===I||t===o?new a(t):i(t)}),d(d.G+d.W+d.F*!R,{Promise:I}),n(70)(I,"Promise"),n(63)("Promise"),o=n(37).Promise,d(d.S+d.F*!R,"Promise",{reject:function(t){var e=D(this);return(0,e.reject)(t),e.promise}}),d(d.S+d.F*(s||!R),"Promise",{resolve:function(t){return w(s&&this===o?I:this,t)}}),d(d.S+d.F*!(R&&n(98)(function(t){I.all(t).catch(T)})),"Promise",{all:function(t){var e=this,n=D(e),r=n.resolve,i=n.reject,a=y(function(){var n=[],a=0,o=1;m(t,!1,function(t){var s=a++,c=!1;n.push(void 0),o++,e.resolve(t).then(function(t){c||(c=!0,n[s]=t,--o||r(n))},i)}),--o||r(n)});return a.e&&i(a.v),n.promise},race:function(t){var e=this,n=D(e),r=n.reject,i=y(function(){m(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}})},function(t,e,n){"use strict";var r=n(324),i=n(67);n(102)("WeakSet",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(i(this,"WeakSet"),t,!0)}},r,!1,!0)},function(t,e,n){"use strict";var r=n(4),i=n(103),a=n(145),o=n(8),s=n(60),c=n(16),u=n(14),l=n(12).ArrayBuffer,d=n(83),f=a.ArrayBuffer,h=a.DataView,p=i.ABV&&l.isView,m=f.prototype.slice,v=i.VIEW;r(r.G+r.W+r.F*(l!==f),{ArrayBuffer:f}),r(r.S+r.F*!i.CONSTR,"ArrayBuffer",{isView:function(t){return p&&p(t)||u(t)&&v in t}}),r(r.P+r.U+r.F*n(13)(function(){return!new f(2).slice(1,void 0).byteLength}),"ArrayBuffer",{slice:function(t,e){if(void 0!==m&&void 0===e)return m.call(o(this),t);for(var n=o(this).byteLength,r=s(t,n),i=s(void 0===e?n:e,n),a=new(d(this,f))(c(i-r)),u=new h(this),l=new h(a),p=0;r<i;)l.setUint8(p++,u.getUint8(r++));return a}}),n(63)("ArrayBuffer")},function(t,e,n){var r=n(4);r(r.G+r.W+r.F*!n(103).ABV,{DataView:n(145).DataView})},function(t,e,n){n(49)("Int8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(49)("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(49)("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}},!0)},function(t,e,n){n(49)("Int16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(49)("Uint16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(49)("Int32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(49)("Uint32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(49)("Float32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(49)("Float64",8,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){var r=n(4),i=n(25),a=n(8),o=(n(12).Reflect||{}).apply,s=Function.apply;r(r.S+r.F*!n(13)(function(){o(function(){})}),"Reflect",{apply:function(t,e,n){var r=i(t),c=a(n);return o?o(r,e,c):s.call(r,e,c)}})},function(t,e,n){var r=n(4),i=n(61),a=n(25),o=n(8),s=n(14),c=n(13),u=n(304),l=(n(12).Reflect||{}).construct,d=c(function(){function t(){}return!(l(function(){},[],t)instanceof t)}),f=!c(function(){l(function(){})});r(r.S+r.F*(d||f),"Reflect",{construct:function(t,e){a(t),o(e);var n=arguments.length<3?t:a(arguments[2]);if(f&&!d)return l(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(u.apply(t,r))}var c=n.prototype,h=i(s(c)?c:Object.prototype),p=Function.apply.call(t,h,e);return s(p)?p:h}})},function(t,e,n){var r=n(18),i=n(4),a=n(8),o=n(43);i(i.S+i.F*n(13)(function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(t,e,n){a(t),e=o(e,!0),a(n);try{return r.f(t,e,n),!0}catch(t){return!1}}})},function(t,e,n){var r=n(4),i=n(32).f,a=n(8);r(r.S,"Reflect",{deleteProperty:function(t,e){var n=i(a(t),e);return!(n&&!n.configurable)&&delete t[e]}})},function(t,e,n){"use strict";var r=n(4),i=n(8),a=function(t){this._t=i(t),this._i=0;var e,n=this._k=[];for(e in t)n.push(e)};n(131)(a,"Object",function(){var t,e=this._k;do{if(this._i>=e.length)return{value:void 0,done:!0}}while(!((t=e[this._i++])in this._t));return{value:t,done:!1}}),r(r.S,"Reflect",{enumerate:function(t){return new a(t)}})},function(t,e,n){var r=n(32),i=n(33),a=n(30),o=n(4),s=n(14),c=n(8);o(o.S,"Reflect",{get:function t(e,n){var o,u,l=arguments.length<3?e:arguments[2];return c(e)===l?e[n]:(o=r.f(e,n))?a(o,"value")?o.value:void 0!==o.get?o.get.call(l):void 0:s(u=i(e))?t(u,n,l):void 0}})},function(t,e,n){var r=n(32),i=n(4),a=n(8);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.f(a(t),e)}})},function(t,e,n){var r=n(4),i=n(33),a=n(8);r(r.S,"Reflect",{getPrototypeOf:function(t){return i(a(t))}})},function(t,e,n){var r=n(4);r(r.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,n){var r=n(4),i=n(8),a=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return i(t),!a||a(t)}})},function(t,e,n){var r=n(4);r(r.S,"Reflect",{ownKeys:n(326)})},function(t,e,n){var r=n(4),i=n(8),a=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){i(t);try{return a&&a(t),!0}catch(t){return!1}}})},function(t,e,n){var r=n(18),i=n(32),a=n(33),o=n(30),s=n(4),c=n(57),u=n(8),l=n(14);s(s.S,"Reflect",{set:function t(e,n,s){var d,f,h=arguments.length<4?e:arguments[3],p=i.f(u(e),n);if(!p){if(l(f=a(e)))return t(f,n,s,h);p=c(0)}if(o(p,"value")){if(!1===p.writable||!l(h))return!1;if(d=i.f(h,n)){if(d.get||d.set||!1===d.writable)return!1;d.value=s,r.f(h,n,d)}else r.f(h,n,c(0,s));return!0}return void 0!==p.set&&(p.set.call(h,s),!0)}})},function(t,e,n){var r=n(4),i=n(124);i&&r(r.S,"Reflect",{setPrototypeOf:function(t,e){i.check(t,e);try{return i.set(t,e),!0}catch(t){return!1}}})},function(t,e,n){"use strict";var r=n(4),i=n(93)(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(53)("includes")},function(t,e,n){"use strict";var r=n(4),i=n(327),a=n(21),o=n(16),s=n(25),c=n(137);r(r.P,"Array",{flatMap:function(t){var e,n,r=a(this);return s(t),e=o(r.length),n=c(r,0),i(n,r,r,e,0,1,t,arguments[1]),n}}),n(53)("flatMap")},function(t,e,n){"use strict";var r=n(4),i=n(327),a=n(21),o=n(16),s=n(40),c=n(137);r(r.P,"Array",{flatten:function(){var t=arguments[0],e=a(this),n=o(e.length),r=c(e,0);return i(r,e,e,n,0,void 0===t?1:s(t)),r}}),n(53)("flatten")},function(t,e,n){"use strict";var r=n(4),i=n(96)(!0);r(r.P,"String",{at:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r=n(4),i=n(328),a=n(101),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(a);r(r.P+r.F*o,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){"use strict";var r=n(4),i=n(328),a=n(101),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(a);r(r.P+r.F*o,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,n){"use strict";n(72)("trimLeft",function(t){return function(){return t(this,1)}},"trimStart")},function(t,e,n){"use strict";n(72)("trimRight",function(t){return function(){return t(this,2)}},"trimEnd")},function(t,e,n){"use strict";var r=n(4),i=n(44),a=n(16),o=n(97),s=n(82),c=RegExp.prototype,u=function(t,e){this._r=t,this._s=e};n(131)(u,"RegExp String",function(){var t=this._r.exec(this._s);return{value:t,done:null===t}}),r(r.P,"String",{matchAll:function(t){if(i(this),!o(t))throw TypeError(t+" is not a regexp!");var e=String(this),n="flags"in c?String(t.flags):s.call(t),r=new RegExp(t.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=a(t.lastIndex),new u(r,e)}})},function(t,e,n){n(120)("asyncIterator")},function(t,e,n){n(120)("observable")},function(t,e,n){var r=n(4),i=n(326),a=n(31),o=n(32),s=n(135);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=a(t),c=o.f,u=i(r),l={},d=0;u.length>d;)void 0!==(n=c(r,e=u[d++]))&&s(l,e,n);return l}})},function(t,e,n){var r=n(4),i=n(329)(!1);r(r.S,"Object",{values:function(t){return i(t)}})},function(t,e,n){var r=n(4),i=n(329)(!0);r(r.S,"Object",{entries:function(t){return i(t)}})},function(t,e,n){"use strict";var r=n(4),i=n(21),a=n(25),o=n(18);n(17)&&r(r.P+n(104),"Object",{__defineGetter__:function(t,e){o.f(i(this),t,{get:a(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var r=n(4),i=n(21),a=n(25),o=n(18);n(17)&&r(r.P+n(104),"Object",{__defineSetter__:function(t,e){o.f(i(this),t,{set:a(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var r=n(4),i=n(21),a=n(43),o=n(33),s=n(32).f;n(17)&&r(r.P+n(104),"Object",{__lookupGetter__:function(t){var e,n=i(this),r=a(t,!0);do{if(e=s(n,r))return e.get}while(n=o(n))}})},function(t,e,n){"use strict";var r=n(4),i=n(21),a=n(43),o=n(33),s=n(32).f;n(17)&&r(r.P+n(104),"Object",{__lookupSetter__:function(t){var e,n=i(this),r=a(t,!0);do{if(e=s(n,r))return e.set}while(n=o(n))}})},function(t,e,n){var r=n(4);r(r.P+r.R,"Map",{toJSON:n(330)("Map")})},function(t,e,n){var r=n(4);r(r.P+r.R,"Set",{toJSON:n(330)("Set")})},function(t,e,n){n(105)("Map")},function(t,e,n){n(105)("Set")},function(t,e,n){n(105)("WeakMap")},function(t,e,n){n(105)("WeakSet")},function(t,e,n){n(106)("Map")},function(t,e,n){n(106)("Set")},function(t,e,n){n(106)("WeakMap")},function(t,e,n){n(106)("WeakSet")},function(t,e,n){var r=n(4);r(r.G,{global:n(12)})},function(t,e,n){var r=n(4);r(r.S,"System",{global:n(12)})},function(t,e,n){var r=n(4),i=n(39);r(r.S,"Error",{isError:function(t){return"Error"===i(t)}})},function(t,e,n){var r=n(4);r(r.S,"Math",{clamp:function(t,e,n){return Math.min(n,Math.max(e,t))}})},function(t,e,n){var r=n(4);r(r.S,"Math",{DEG_PER_RAD:Math.PI/180})},function(t,e,n){var r=n(4),i=180/Math.PI;r(r.S,"Math",{degrees:function(t){return t*i}})},function(t,e,n){var r=n(4),i=n(332),a=n(311);r(r.S,"Math",{fscale:function(t,e,n,r,o){return a(i(t,e,n,r,o))}})},function(t,e,n){var r=n(4);r(r.S,"Math",{iaddh:function(t,e,n,r){var i=t>>>0,a=n>>>0;return(e>>>0)+(r>>>0)+((i&a|(i|a)&~(i+a>>>0))>>>31)|0}})},function(t,e,n){var r=n(4);r(r.S,"Math",{isubh:function(t,e,n,r){var i=t>>>0,a=n>>>0;return(e>>>0)-(r>>>0)-((~i&a|~(i^a)&i-a>>>0)>>>31)|0}})},function(t,e,n){var r=n(4);r(r.S,"Math",{imulh:function(t,e){var n=+t,r=+e,i=65535&n,a=65535&r,o=n>>16,s=r>>16,c=(o*a>>>0)+(i*a>>>16);return o*s+(c>>16)+((i*s>>>0)+(65535&c)>>16)}})},function(t,e,n){var r=n(4);r(r.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(t,e,n){var r=n(4),i=Math.PI/180;r(r.S,"Math",{radians:function(t){return t*i}})},function(t,e,n){var r=n(4);r(r.S,"Math",{scale:n(332)})},function(t,e,n){var r=n(4);r(r.S,"Math",{umulh:function(t,e){var n=+t,r=+e,i=65535&n,a=65535&r,o=n>>>16,s=r>>>16,c=(o*a>>>0)+(i*a>>>16);return o*s+(c>>>16)+((i*s>>>0)+(65535&c)>>>16)}})},function(t,e,n){var r=n(4);r(r.S,"Math",{signbit:function(t){return(t=+t)!=t?t:0==t?1/t==1/0:t>0}})},function(t,e,n){"use strict";var r=n(4),i=n(37),a=n(12),o=n(83),s=n(319);r(r.P+r.R,"Promise",{finally:function(t){var e=o(this,i.Promise||a.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then(function(){return n})}:t,n?function(n){return s(e,t()).then(function(){throw n})}:t)}})},function(t,e,n){"use strict";var r=n(4),i=n(144),a=n(318);r(r.S,"Promise",{try:function(t){var e=i.f(this),n=a(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){var r=n(50),i=n(8),a=r.key,o=r.set;r.exp({defineMetadata:function(t,e,n,r){o(t,e,i(n),a(r))}})},function(t,e,n){var r=n(50),i=n(8),a=r.key,o=r.map,s=r.store;r.exp({deleteMetadata:function(t,e){var n=arguments.length<3?void 0:a(arguments[2]),r=o(i(e),n,!1);if(void 0===r||!r.delete(t))return!1;if(r.size)return!0;var c=s.get(e);return c.delete(n),!!c.size||s.delete(e)}})},function(t,e,n){var r=n(50),i=n(8),a=n(33),o=r.has,s=r.get,c=r.key,u=function(t,e,n){if(o(t,e,n))return s(t,e,n);var r=a(e);return null!==r?u(t,r,n):void 0};r.exp({getMetadata:function(t,e){return u(t,i(e),arguments.length<3?void 0:c(arguments[2]))}})},function(t,e,n){var r=n(322),i=n(331),a=n(50),o=n(8),s=n(33),c=a.keys,u=a.key,l=function(t,e){var n=c(t,e),a=s(t);if(null===a)return n;var o=l(a,e);return o.length?n.length?i(new r(n.concat(o))):o:n};a.exp({getMetadataKeys:function(t){return l(o(t),arguments.length<2?void 0:u(arguments[1]))}})},function(t,e,n){var r=n(50),i=n(8),a=r.get,o=r.key;r.exp({getOwnMetadata:function(t,e){return a(t,i(e),arguments.length<3?void 0:o(arguments[2]))}})},function(t,e,n){var r=n(50),i=n(8),a=r.keys,o=r.key;r.exp({getOwnMetadataKeys:function(t){return a(i(t),arguments.length<2?void 0:o(arguments[1]))}})},function(t,e,n){var r=n(50),i=n(8),a=n(33),o=r.has,s=r.key,c=function(t,e,n){if(o(t,e,n))return!0;var r=a(e);return null!==r&&c(t,r,n)};r.exp({hasMetadata:function(t,e){return c(t,i(e),arguments.length<3?void 0:s(arguments[2]))}})},function(t,e,n){var r=n(50),i=n(8),a=r.has,o=r.key;r.exp({hasOwnMetadata:function(t,e){return a(t,i(e),arguments.length<3?void 0:o(arguments[2]))}})},function(t,e,n){var r=n(50),i=n(8),a=n(25),o=r.key,s=r.set;r.exp({metadata:function(t,e){return function(n,r){s(t,e,(void 0!==r?i:a)(n),o(r))}}})},function(t,e,n){var r=n(4),i=n(143)(),a=n(12).process,o="process"==n(39)(a);r(r.G,{asap:function(t){var e=o&&a.domain;i(e?e.bind(t):t)}})},function(t,e,n){"use strict";var r=n(4),i=n(12),a=n(37),o=n(143)(),s=n(15)("observable"),c=n(25),u=n(8),l=n(64),d=n(66),f=n(27),h=n(65),p=h.RETURN,m=function(t){return null==t?void 0:c(t)},v=function(t){var e=t._c;e&&(t._c=void 0,e())},_=function(t){return void 0===t._o},g=function(t){_(t)||(t._o=void 0,v(t))},b=function(t,e){u(t),this._c=void 0,this._o=t,t=new y(this);try{var n=e(t),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:c(n),this._c=n)}catch(e){return void t.error(e)}_(this)&&v(this)};b.prototype=d({},{unsubscribe:function(){g(this)}});var y=function(t){this._s=t};y.prototype=d({},{next:function(t){var e=this._s;if(!_(e)){var n=e._o;try{var r=m(n.next);if(r)return r.call(n,t)}catch(t){try{g(e)}finally{throw t}}}},error:function(t){var e=this._s;if(_(e))throw t;var n=e._o;e._o=void 0;try{var r=m(n.error);if(!r)throw t;t=r.call(n,t)}catch(t){try{v(e)}finally{throw t}}return v(e),t},complete:function(t){var e=this._s;if(!_(e)){var n=e._o;e._o=void 0;try{var r=m(n.complete);t=r?r.call(n,t):void 0}catch(t){try{v(e)}finally{throw t}}return v(e),t}}});var x=function(t){l(this,x,"Observable","_f")._f=c(t)};d(x.prototype,{subscribe:function(t){return new b(t,this._f)},forEach:function(t){var e=this;return new(a.Promise||i.Promise)(function(n,r){c(t);var i=e.subscribe({next:function(e){try{return t(e)}catch(t){r(t),i.unsubscribe()}},error:r,complete:n})})}}),d(x,{from:function(t){var e="function"==typeof this?this:x,n=m(u(t)[s]);if(n){var r=u(n.call(t));return r.constructor===e?r:new e(function(t){return r.subscribe(t)})}return new e(function(e){var n=!1;return o(function(){if(!n){try{if(h(t,!1,function(t){if(e.next(t),n)return p})===p)return}catch(t){if(n)throw t;return void e.error(t)}e.complete()}}),function(){n=!0}})},of:function(){for(var t=0,e=arguments.length,n=new Array(e);t<e;)n[t]=arguments[t++];return new("function"==typeof this?this:x)(function(t){var e=!1;return o(function(){if(!e){for(var r=0;r<n.length;++r)if(t.next(n[r]),e)return;t.complete()}}),function(){e=!0}})}}),f(x.prototype,s,function(){return this}),r(r.G,{Observable:x}),n(63)("Observable")},function(t,e,n){var r=n(12),i=n(4),a=n(101),o=[].slice,s=/MSIE .\./.test(a),c=function(t){return function(e,n){var r=arguments.length>2,i=!!r&&o.call(arguments,2);return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,i)}:e,n)}};i(i.G+i.B+i.F*s,{setTimeout:c(r.setTimeout),setInterval:c(r.setInterval)})},function(t,e,n){var r=n(4),i=n(142);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,e,n){for(var r=n(139),i=n(59),a=n(28),o=n(12),s=n(27),c=n(73),u=n(15),l=u("iterator"),d=u("toStringTag"),f=c.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=i(h),m=0;m<p.length;m++){var v,_=p[m],g=h[_],b=o[_],y=b&&b.prototype;if(y&&(y[l]||s(y,l,f),y[d]||s(y,d,_),c[_]=f,g))for(v in r)y[v]||a(y,v,r[v],!0)}},function(t,e,n){(function(e){!function(e){"use strict";var n,r=Object.prototype,i=r.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag",u="object"==typeof t,l=e.regeneratorRuntime;if(l)u&&(t.exports=l);else{(l=e.regeneratorRuntime=u?t.exports:{}).wrap=y;var d="suspendedStart",f="suspendedYield",h="executing",p="completed",m={},v={};v[o]=function(){return this};var _=Object.getPrototypeOf,g=_&&_(_(R([])));g&&g!==r&&i.call(g,o)&&(v=g);var b=C.prototype=w.prototype=Object.create(v);k.prototype=b.constructor=C,C.constructor=k,C[c]=k.displayName="GeneratorFunction",l.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===k||"GeneratorFunction"===(e.displayName||e.name))},l.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,C):(t.__proto__=C,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(b),t},l.awrap=function(t){return{__await:t}},E(S.prototype),S.prototype[s]=function(){return this},l.AsyncIterator=S,l.async=function(t,e,n,r){var i=new S(y(t,e,n,r));return l.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},E(b),b[c]="Generator",b[o]=function(){return this},b.toString=function(){return"[object Generator]"},l.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},l.values=R,D.prototype={constructor:D,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,i){return s.type="throw",s.arg=t,e.next=r,i&&(e.method="next",e.arg=n),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:R(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),m}}}function y(t,e,n,r){var i=e&&e.prototype instanceof w?e:w,a=Object.create(i.prototype),o=new D(r||[]);return a._invoke=function(t,e,n){var r=d;return function(i,a){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw a;return P()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=I(o,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var c=x(t,e,n);if("normal"===c.type){if(r=n.done?p:f,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=p,n.method="throw",n.arg=c.arg)}}}(t,n,o),a}function x(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function w(){}function k(){}function C(){}function E(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function S(t){function n(e,r,a,o){var s=x(t[e],t,r);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&i.call(u,"__await")?Promise.resolve(u.__await).then(function(t){n("next",t,a,o)},function(t){n("throw",t,a,o)}):Promise.resolve(u).then(function(t){c.value=t,a(c)},o)}o(s.arg)}var r;"object"==typeof e.process&&e.process.domain&&(n=e.process.domain.bind(n)),this._invoke=function(t,e){function i(){return new Promise(function(r,i){n(t,e,r,i)})}return r=r?r.then(i,i):i()}}function I(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,I(t,e),"throw"===e.method))return m;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var i=x(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,m;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function M(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(M,this),this.reset(!0)}function R(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=n,e.done=!0,e};return a.next=a}}return{next:P}}function P(){return{value:n,done:!0}}}("object"==typeof e?e:"object"==typeof window?window:"object"==typeof self?self:this)}).call(e,n(20))},function(t,e,n){n(602),t.exports=n(37).RegExp.escape},function(t,e,n){var r=n(4),i=n(603)(/[\\^$*+?.()|[\]{}]/g,"\\$&");r(r.S,"RegExp",{escape:function(t){return i(t)}})},function(t,e){t.exports=function(t,e){var n=e===Object(e)?function(t){return e[t]}:e;return function(e){return String(e).replace(t,n)}}},function(t,e,n){"use strict";(function(e,n){var r=Object.freeze({});function i(t){return null==t}function a(t){return null!=t}function o(t){return!0===t}function s(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function c(t){return null!==t&&"object"==typeof t}var u=Object.prototype.toString;function l(t){return"[object Object]"===u.call(t)}function d(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function f(t){return a(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function h(t){return null==t?"":Array.isArray(t)||l(t)&&t.toString===u?JSON.stringify(t,null,2):String(t)}function p(t){var e=parseFloat(t);return isNaN(e)?t:e}function m(t,e){for(var n=Object.create(null),r=t.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return e?function(t){return n[t.toLowerCase()]}:function(t){return n[t]}}var v=m("slot,component",!0),_=m("key,ref,slot,slot-scope,is");function g(t,e){if(t.length){var n=t.indexOf(e);if(n>-1)return t.splice(n,1)}}var b=Object.prototype.hasOwnProperty;function y(t,e){return b.call(t,e)}function x(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var w=/-(\w)/g,k=x(function(t){return t.replace(w,function(t,e){return e?e.toUpperCase():""})}),C=x(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}),E=/\B([A-Z])/g,S=x(function(t){return t.replace(E,"-$1").toLowerCase()}),I=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function M(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function T(t,e){for(var n in e)t[n]=e[n];return t}function D(t){for(var e={},n=0;n<t.length;n++)t[n]&&T(e,t[n]);return e}function R(t,e,n){}var P=function(t,e,n){return!1},O=function(t){return t};function L(t,e){if(t===e)return!0;var n=c(t),r=c(e);if(!n||!r)return!n&&!r&&String(t)===String(e);try{var i=Array.isArray(t),a=Array.isArray(e);if(i&&a)return t.length===e.length&&t.every(function(t,n){return L(t,e[n])});if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(i||a)return!1;var o=Object.keys(t),s=Object.keys(e);return o.length===s.length&&o.every(function(n){return L(t[n],e[n])})}catch(t){return!1}}function A(t,e){for(var n=0;n<t.length;n++)if(L(t[n],e))return n;return-1}function N(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}}var B="data-server-rendered",j=["component","directive","filter"],F=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch"],Y={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:P,isReservedAttr:P,isUnknownElement:P,getTagNamespace:R,parsePlatformTagName:O,mustUseProp:P,async:!0,_lifecycleHooks:F},$=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function z(t,e,n,r){Object.defineProperty(t,e,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var V,H=new RegExp("[^"+$.source+".$_\\d]"),q="__proto__"in{},W="undefined"!=typeof window,U="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,G=U&&WXEnvironment.platform.toLowerCase(),K=W&&window.navigator.userAgent.toLowerCase(),X=K&&/msie|trident/.test(K),J=K&&K.indexOf("msie 9.0")>0,Z=K&&K.indexOf("edge/")>0,Q=(K&&K.indexOf("android"),K&&/iphone|ipad|ipod|ios/.test(K)||"ios"===G),tt=(K&&/chrome\/\d+/.test(K),K&&/phantomjs/.test(K),K&&K.match(/firefox\/(\d+)/)),et={}.watch,nt=!1;if(W)try{var rt={};Object.defineProperty(rt,"passive",{get:function(){nt=!0}}),window.addEventListener("test-passive",null,rt)}catch(r){}var it=function(){return void 0===V&&(V=!W&&!U&&void 0!==e&&e.process&&"server"===e.process.env.VUE_ENV),V},at=W&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ot(t){return"function"==typeof t&&/native code/.test(t.toString())}var st,ct="undefined"!=typeof Symbol&&ot(Symbol)&&"undefined"!=typeof Reflect&&ot(Reflect.ownKeys);st="undefined"!=typeof Set&&ot(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var ut=R,lt=0,dt=function(){this.id=lt++,this.subs=[]};dt.prototype.addSub=function(t){this.subs.push(t)},dt.prototype.removeSub=function(t){g(this.subs,t)},dt.prototype.depend=function(){dt.target&&dt.target.addDep(this)},dt.prototype.notify=function(){for(var t=this.subs.slice(),e=0,n=t.length;e<n;e++)t[e].update()},dt.target=null;var ft=[];function ht(t){ft.push(t),dt.target=t}function pt(){ft.pop(),dt.target=ft[ft.length-1]}var mt=function(t,e,n,r,i,a,o,s){this.tag=t,this.data=e,this.children=n,this.text=r,this.elm=i,this.ns=void 0,this.context=a,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=o,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},vt={child:{configurable:!0}};vt.child.get=function(){return this.componentInstance},Object.defineProperties(mt.prototype,vt);var _t=function(t){void 0===t&&(t="");var e=new mt;return e.text=t,e.isComment=!0,e};function gt(t){return new mt(void 0,void 0,void 0,String(t))}function bt(t){var e=new mt(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}var yt=Array.prototype,xt=Object.create(yt);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(t){var e=yt[t];z(xt,t,function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];var i,a=e.apply(this,n),o=this.__ob__;switch(t){case"push":case"unshift":i=n;break;case"splice":i=n.slice(2)}return i&&o.observeArray(i),o.dep.notify(),a})});var wt=Object.getOwnPropertyNames(xt),kt=!0;function Ct(t){kt=t}var Et=function(t){var e;this.value=t,this.dep=new dt,this.vmCount=0,z(t,"__ob__",this),Array.isArray(t)?(q?(e=xt,t.__proto__=e):function(t,e,n){for(var r=0,i=n.length;r<i;r++){var a=n[r];z(t,a,e[a])}}(t,xt,wt),this.observeArray(t)):this.walk(t)};function St(t,e){var n;if(c(t)&&!(t instanceof mt))return y(t,"__ob__")&&t.__ob__ instanceof Et?n=t.__ob__:kt&&!it()&&(Array.isArray(t)||l(t))&&Object.isExtensible(t)&&!t._isVue&&(n=new Et(t)),e&&n&&n.vmCount++,n}function It(t,e,n,r,i){var a=new dt,o=Object.getOwnPropertyDescriptor(t,e);if(!o||!1!==o.configurable){var s=o&&o.get,c=o&&o.set;s&&!c||2!==arguments.length||(n=t[e]);var u=!i&&St(n);Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){var e=s?s.call(t):n;return dt.target&&(a.depend(),u&&(u.dep.depend(),Array.isArray(e)&&function t(e){for(var n=void 0,r=0,i=e.length;r<i;r++)(n=e[r])&&n.__ob__&&n.__ob__.dep.depend(),Array.isArray(n)&&t(n)}(e))),e},set:function(e){var r=s?s.call(t):n;e===r||e!=e&&r!=r||s&&!c||(c?c.call(t,e):n=e,u=!i&&St(e),a.notify())}})}}function Mt(t,e,n){if(Array.isArray(t)&&d(e))return t.length=Math.max(t.length,e),t.splice(e,1,n),n;if(e in t&&!(e in Object.prototype))return t[e]=n,n;var r=t.__ob__;return t._isVue||r&&r.vmCount?n:r?(It(r.value,e,n),r.dep.notify(),n):(t[e]=n,n)}function Tt(t,e){if(Array.isArray(t)&&d(e))t.splice(e,1);else{var n=t.__ob__;t._isVue||n&&n.vmCount||y(t,e)&&(delete t[e],n&&n.dep.notify())}}Et.prototype.walk=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)It(t,e[n])},Et.prototype.observeArray=function(t){for(var e=0,n=t.length;e<n;e++)St(t[e])};var Dt=Y.optionMergeStrategies;function Rt(t,e){if(!e)return t;for(var n,r,i,a=ct?Reflect.ownKeys(e):Object.keys(e),o=0;o<a.length;o++)"__ob__"!==(n=a[o])&&(r=t[n],i=e[n],y(t,n)?r!==i&&l(r)&&l(i)&&Rt(r,i):Mt(t,n,i));return t}function Pt(t,e,n){return n?function(){var r="function"==typeof e?e.call(n,n):e,i="function"==typeof t?t.call(n,n):t;return r?Rt(r,i):i}:e?t?function(){return Rt("function"==typeof e?e.call(this,this):e,"function"==typeof t?t.call(this,this):t)}:e:t}function Ot(t,e){var n=e?t?t.concat(e):Array.isArray(e)?e:[e]:t;return n?function(t){for(var e=[],n=0;n<t.length;n++)-1===e.indexOf(t[n])&&e.push(t[n]);return e}(n):n}function Lt(t,e,n,r){var i=Object.create(t||null);return e?T(i,e):i}Dt.data=function(t,e,n){return n?Pt(t,e,n):e&&"function"!=typeof e?t:Pt(t,e)},F.forEach(function(t){Dt[t]=Ot}),j.forEach(function(t){Dt[t+"s"]=Lt}),Dt.watch=function(t,e,n,r){if(t===et&&(t=void 0),e===et&&(e=void 0),!e)return Object.create(t||null);if(!t)return e;var i={};for(var a in T(i,t),e){var o=i[a],s=e[a];o&&!Array.isArray(o)&&(o=[o]),i[a]=o?o.concat(s):Array.isArray(s)?s:[s]}return i},Dt.props=Dt.methods=Dt.inject=Dt.computed=function(t,e,n,r){if(!t)return e;var i=Object.create(null);return T(i,t),e&&T(i,e),i},Dt.provide=Pt;var At=function(t,e){return void 0===e?t:e};function Nt(t,e,n){if("function"==typeof e&&(e=e.options),function(t,e){var n=t.props;if(n){var r,i,a={};if(Array.isArray(n))for(r=n.length;r--;)"string"==typeof(i=n[r])&&(a[k(i)]={type:null});else if(l(n))for(var o in n)i=n[o],a[k(o)]=l(i)?i:{type:i};t.props=a}}(e),function(t,e){var n=t.inject;if(n){var r=t.inject={};if(Array.isArray(n))for(var i=0;i<n.length;i++)r[n[i]]={from:n[i]};else if(l(n))for(var a in n){var o=n[a];r[a]=l(o)?T({from:a},o):{from:o}}}}(e),function(t){var e=t.directives;if(e)for(var n in e){var r=e[n];"function"==typeof r&&(e[n]={bind:r,update:r})}}(e),!e._base&&(e.extends&&(t=Nt(t,e.extends,n)),e.mixins))for(var r=0,i=e.mixins.length;r<i;r++)t=Nt(t,e.mixins[r],n);var a,o={};for(a in t)s(a);for(a in e)y(t,a)||s(a);function s(r){var i=Dt[r]||At;o[r]=i(t[r],e[r],n,r)}return o}function Bt(t,e,n,r){if("string"==typeof n){var i=t[e];if(y(i,n))return i[n];var a=k(n);if(y(i,a))return i[a];var o=C(a);return y(i,o)?i[o]:i[n]||i[a]||i[o]}}function jt(t,e,n,r){var i=e[t],a=!y(n,t),o=n[t],s=$t(Boolean,i.type);if(s>-1)if(a&&!y(i,"default"))o=!1;else if(""===o||o===S(t)){var c=$t(String,i.type);(c<0||s<c)&&(o=!0)}if(void 0===o){o=function(t,e,n){if(y(e,"default")){var r=e.default;return t&&t.$options.propsData&&void 0===t.$options.propsData[n]&&void 0!==t._props[n]?t._props[n]:"function"==typeof r&&"Function"!==Ft(e.type)?r.call(t):r}}(r,i,t);var u=kt;Ct(!0),St(o),Ct(u)}return o}function Ft(t){var e=t&&t.toString().match(/^\s*function (\w+)/);return e?e[1]:""}function Yt(t,e){return Ft(t)===Ft(e)}function $t(t,e){if(!Array.isArray(e))return Yt(e,t)?0:-1;for(var n=0,r=e.length;n<r;n++)if(Yt(e[n],t))return n;return-1}function zt(t,e,n){ht();try{if(e)for(var r=e;r=r.$parent;){var i=r.$options.errorCaptured;if(i)for(var a=0;a<i.length;a++)try{if(!1===i[a].call(r,t,e,n))return}catch(t){Ht(t,r,"errorCaptured hook")}}Ht(t,e,n)}finally{pt()}}function Vt(t,e,n,r,i){var a;try{(a=n?t.apply(e,n):t.call(e))&&!a._isVue&&f(a)&&!a._handled&&(a.catch(function(t){return zt(t,r,i+" (Promise/async)")}),a._handled=!0)}catch(t){zt(t,r,i)}return a}function Ht(t,e,n){if(Y.errorHandler)try{return Y.errorHandler.call(null,t,e,n)}catch(e){e!==t&&qt(e,null,"config.errorHandler")}qt(t,e,n)}function qt(t,e,n){if(!W&&!U||"undefined"==typeof console)throw t;console.error(t)}var Wt,Ut=!1,Gt=[],Kt=!1;function Xt(){Kt=!1;var t=Gt.slice(0);Gt.length=0;for(var e=0;e<t.length;e++)t[e]()}if("undefined"!=typeof Promise&&ot(Promise)){var Jt=Promise.resolve();Wt=function(){Jt.then(Xt),Q&&setTimeout(R)},Ut=!0}else if(X||"undefined"==typeof MutationObserver||!ot(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())Wt=void 0!==n&&ot(n)?function(){n(Xt)}:function(){setTimeout(Xt,0)};else{var Zt=1,Qt=new MutationObserver(Xt),te=document.createTextNode(String(Zt));Qt.observe(te,{characterData:!0}),Wt=function(){Zt=(Zt+1)%2,te.data=String(Zt)},Ut=!0}function ee(t,e){var n;if(Gt.push(function(){if(t)try{t.call(e)}catch(t){zt(t,e,"nextTick")}else n&&n(e)}),Kt||(Kt=!0,Wt()),!t&&"undefined"!=typeof Promise)return new Promise(function(t){n=t})}var ne=new st;function re(t){!function t(e,n){var r,i,a=Array.isArray(e);if(!(!a&&!c(e)||Object.isFrozen(e)||e instanceof mt)){if(e.__ob__){var o=e.__ob__.dep.id;if(n.has(o))return;n.add(o)}if(a)for(r=e.length;r--;)t(e[r],n);else for(r=(i=Object.keys(e)).length;r--;)t(e[i[r]],n)}}(t,ne),ne.clear()}var ie=x(function(t){var e="&"===t.charAt(0),n="~"===(t=e?t.slice(1):t).charAt(0),r="!"===(t=n?t.slice(1):t).charAt(0);return{name:t=r?t.slice(1):t,once:n,capture:r,passive:e}});function ae(t,e){function n(){var t=arguments,r=n.fns;if(!Array.isArray(r))return Vt(r,null,arguments,e,"v-on handler");for(var i=r.slice(),a=0;a<i.length;a++)Vt(i[a],null,t,e,"v-on handler")}return n.fns=t,n}function oe(t,e,n,r,a,s){var c,u,l,d;for(c in t)u=t[c],l=e[c],d=ie(c),i(u)||(i(l)?(i(u.fns)&&(u=t[c]=ae(u,s)),o(d.once)&&(u=t[c]=a(d.name,u,d.capture)),n(d.name,u,d.capture,d.passive,d.params)):u!==l&&(l.fns=u,t[c]=l));for(c in e)i(t[c])&&r((d=ie(c)).name,e[c],d.capture)}function se(t,e,n){var r;t instanceof mt&&(t=t.data.hook||(t.data.hook={}));var s=t[e];function c(){n.apply(this,arguments),g(r.fns,c)}i(s)?r=ae([c]):a(s.fns)&&o(s.merged)?(r=s).fns.push(c):r=ae([s,c]),r.merged=!0,t[e]=r}function ce(t,e,n,r,i){if(a(e)){if(y(e,n))return t[n]=e[n],i||delete e[n],!0;if(y(e,r))return t[n]=e[r],i||delete e[r],!0}return!1}function ue(t){return s(t)?[gt(t)]:Array.isArray(t)?function t(e,n){var r,c,u,l,d=[];for(r=0;r<e.length;r++)i(c=e[r])||"boolean"==typeof c||(l=d[u=d.length-1],Array.isArray(c)?c.length>0&&(le((c=t(c,(n||"")+"_"+r))[0])&&le(l)&&(d[u]=gt(l.text+c[0].text),c.shift()),d.push.apply(d,c)):s(c)?le(l)?d[u]=gt(l.text+c):""!==c&&d.push(gt(c)):le(c)&&le(l)?d[u]=gt(l.text+c.text):(o(e._isVList)&&a(c.tag)&&i(c.key)&&a(n)&&(c.key="__vlist"+n+"_"+r+"__"),d.push(c)));return d}(t):void 0}function le(t){return a(t)&&a(t.text)&&!1===t.isComment}function de(t,e){if(t){for(var n=Object.create(null),r=ct?Reflect.ownKeys(t):Object.keys(t),i=0;i<r.length;i++){var a=r[i];if("__ob__"!==a){for(var o=t[a].from,s=e;s;){if(s._provided&&y(s._provided,o)){n[a]=s._provided[o];break}s=s.$parent}if(!s&&"default"in t[a]){var c=t[a].default;n[a]="function"==typeof c?c.call(e):c}}}return n}}function fe(t,e){if(!t||!t.length)return{};for(var n={},r=0,i=t.length;r<i;r++){var a=t[r],o=a.data;if(o&&o.attrs&&o.attrs.slot&&delete o.attrs.slot,a.context!==e&&a.fnContext!==e||!o||null==o.slot)(n.default||(n.default=[])).push(a);else{var s=o.slot,c=n[s]||(n[s]=[]);"template"===a.tag?c.push.apply(c,a.children||[]):c.push(a)}}for(var u in n)n[u].every(he)&&delete n[u];return n}function he(t){return t.isComment&&!t.asyncFactory||" "===t.text}function pe(t,e,n){var i,a=Object.keys(e).length>0,o=t?!!t.$stable:!a,s=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(o&&n&&n!==r&&s===n.$key&&!a&&!n.$hasNormal)return n;for(var c in i={},t)t[c]&&"$"!==c[0]&&(i[c]=me(e,c,t[c]))}else i={};for(var u in e)u in i||(i[u]=ve(e,u));return t&&Object.isExtensible(t)&&(t._normalized=i),z(i,"$stable",o),z(i,"$key",s),z(i,"$hasNormal",a),i}function me(t,e,n){var r=function(){var t=arguments.length?n.apply(null,arguments):n({});return(t=t&&"object"==typeof t&&!Array.isArray(t)?[t]:ue(t))&&(0===t.length||1===t.length&&t[0].isComment)?void 0:t};return n.proxy&&Object.defineProperty(t,e,{get:r,enumerable:!0,configurable:!0}),r}function ve(t,e){return function(){return t[e]}}function _e(t,e){var n,r,i,o,s;if(Array.isArray(t)||"string"==typeof t)for(n=new Array(t.length),r=0,i=t.length;r<i;r++)n[r]=e(t[r],r);else if("number"==typeof t)for(n=new Array(t),r=0;r<t;r++)n[r]=e(r+1,r);else if(c(t))if(ct&&t[Symbol.iterator]){n=[];for(var u=t[Symbol.iterator](),l=u.next();!l.done;)n.push(e(l.value,n.length)),l=u.next()}else for(o=Object.keys(t),n=new Array(o.length),r=0,i=o.length;r<i;r++)s=o[r],n[r]=e(t[s],s,r);return a(n)||(n=[]),n._isVList=!0,n}function ge(t,e,n,r){var i,a=this.$scopedSlots[t];a?(n=n||{},r&&(n=T(T({},r),n)),i=a(n)||e):i=this.$slots[t]||e;var o=n&&n.slot;return o?this.$createElement("template",{slot:o},i):i}function be(t){return Bt(this.$options,"filters",t)||O}function ye(t,e){return Array.isArray(t)?-1===t.indexOf(e):t!==e}function xe(t,e,n,r,i){var a=Y.keyCodes[e]||n;return i&&r&&!Y.keyCodes[e]?ye(i,r):a?ye(a,t):r?S(r)!==e:void 0}function we(t,e,n,r,i){if(n&&c(n)){var a;Array.isArray(n)&&(n=D(n));var o=function(o){if("class"===o||"style"===o||_(o))a=t;else{var s=t.attrs&&t.attrs.type;a=r||Y.mustUseProp(e,s,o)?t.domProps||(t.domProps={}):t.attrs||(t.attrs={})}var c=k(o),u=S(o);c in a||u in a||(a[o]=n[o],i&&((t.on||(t.on={}))["update:"+o]=function(t){n[o]=t}))};for(var s in n)o(s)}return t}function ke(t,e){var n=this._staticTrees||(this._staticTrees=[]),r=n[t];return r&&!e?r:(Ee(r=n[t]=this.$options.staticRenderFns[t].call(this._renderProxy,null,this),"__static__"+t,!1),r)}function Ce(t,e,n){return Ee(t,"__once__"+e+(n?"_"+n:""),!0),t}function Ee(t,e,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]&&"string"!=typeof t[r]&&Se(t[r],e+"_"+r,n);else Se(t,e,n)}function Se(t,e,n){t.isStatic=!0,t.key=e,t.isOnce=n}function Ie(t,e){if(e&&l(e)){var n=t.on=t.on?T({},t.on):{};for(var r in e){var i=n[r],a=e[r];n[r]=i?[].concat(i,a):a}}return t}function Me(t,e,n,r){e=e||{$stable:!n};for(var i=0;i<t.length;i++){var a=t[i];Array.isArray(a)?Me(a,e,n):a&&(a.proxy&&(a.fn.proxy=!0),e[a.key]=a.fn)}return r&&(e.$key=r),e}function Te(t,e){for(var n=0;n<e.length;n+=2){var r=e[n];"string"==typeof r&&r&&(t[e[n]]=e[n+1])}return t}function De(t,e){return"string"==typeof t?e+t:t}function Re(t){t._o=Ce,t._n=p,t._s=h,t._l=_e,t._t=ge,t._q=L,t._i=A,t._m=ke,t._f=be,t._k=xe,t._b=we,t._v=gt,t._e=_t,t._u=Me,t._g=Ie,t._d=Te,t._p=De}function Pe(t,e,n,i,a){var s,c=this,u=a.options;y(i,"_uid")?(s=Object.create(i))._original=i:(s=i,i=i._original);var l=o(u._compiled),d=!l;this.data=t,this.props=e,this.children=n,this.parent=i,this.listeners=t.on||r,this.injections=de(u.inject,i),this.slots=function(){return c.$slots||pe(t.scopedSlots,c.$slots=fe(n,i)),c.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return pe(t.scopedSlots,this.slots())}}),l&&(this.$options=u,this.$slots=this.slots(),this.$scopedSlots=pe(t.scopedSlots,this.$slots)),u._scopeId?this._c=function(t,e,n,r){var a=$e(s,t,e,n,r,d);return a&&!Array.isArray(a)&&(a.fnScopeId=u._scopeId,a.fnContext=i),a}:this._c=function(t,e,n,r){return $e(s,t,e,n,r,d)}}function Oe(t,e,n,r,i){var a=bt(t);return a.fnContext=n,a.fnOptions=r,e.slot&&((a.data||(a.data={})).slot=e.slot),a}function Le(t,e){for(var n in e)t[k(n)]=e[n]}Re(Pe.prototype);var Ae={init:function(t,e){if(t.componentInstance&&!t.componentInstance._isDestroyed&&t.data.keepAlive){var n=t;Ae.prepatch(n,n)}else(t.componentInstance=function(t,e){var n={_isComponent:!0,_parentVnode:t,parent:Je},r=t.data.inlineTemplate;return a(r)&&(n.render=r.render,n.staticRenderFns=r.staticRenderFns),new t.componentOptions.Ctor(n)}(t)).$mount(e?t.elm:void 0,e)},prepatch:function(t,e){var n=e.componentOptions;!function(t,e,n,i,a){var o=i.data.scopedSlots,s=t.$scopedSlots,c=!!(o&&!o.$stable||s!==r&&!s.$stable||o&&t.$scopedSlots.$key!==o.$key),u=!!(a||t.$options._renderChildren||c);if(t.$options._parentVnode=i,t.$vnode=i,t._vnode&&(t._vnode.parent=i),t.$options._renderChildren=a,t.$attrs=i.data.attrs||r,t.$listeners=n||r,e&&t.$options.props){Ct(!1);for(var l=t._props,d=t.$options._propKeys||[],f=0;f<d.length;f++){var h=d[f],p=t.$options.props;l[h]=jt(h,p,e,t)}Ct(!0),t.$options.propsData=e}n=n||r;var m=t.$options._parentListeners;t.$options._parentListeners=n,Xe(t,n,m),u&&(t.$slots=fe(a,i.context),t.$forceUpdate())}(e.componentInstance=t.componentInstance,n.propsData,n.listeners,e,n.children)},insert:function(t){var e,n=t.context,r=t.componentInstance;r._isMounted||(r._isMounted=!0,en(r,"mounted")),t.data.keepAlive&&(n._isMounted?((e=r)._inactive=!1,rn.push(e)):tn(r,!0))},destroy:function(t){var e=t.componentInstance;e._isDestroyed||(t.data.keepAlive?function t(e,n){if(!(n&&(e._directInactive=!0,Qe(e))||e._inactive)){e._inactive=!0;for(var r=0;r<e.$children.length;r++)t(e.$children[r]);en(e,"deactivated")}}(e,!0):e.$destroy())}},Ne=Object.keys(Ae);function Be(t,e,n,s,u){if(!i(t)){var l=n.$options._base;if(c(t)&&(t=l.extend(t)),"function"==typeof t){var d;if(i(t.cid)&&void 0===(t=function(t,e){if(o(t.error)&&a(t.errorComp))return t.errorComp;if(a(t.resolved))return t.resolved;var n=Ve;if(n&&a(t.owners)&&-1===t.owners.indexOf(n)&&t.owners.push(n),o(t.loading)&&a(t.loadingComp))return t.loadingComp;if(n&&!a(t.owners)){var r=t.owners=[n],s=!0,u=null,l=null;n.$on("hook:destroyed",function(){return g(r,n)});var d=function(t){for(var e=0,n=r.length;e<n;e++)r[e].$forceUpdate();t&&(r.length=0,null!==u&&(clearTimeout(u),u=null),null!==l&&(clearTimeout(l),l=null))},h=N(function(n){t.resolved=He(n,e),s?r.length=0:d(!0)}),p=N(function(e){a(t.errorComp)&&(t.error=!0,d(!0))}),m=t(h,p);return c(m)&&(f(m)?i(t.resolved)&&m.then(h,p):f(m.component)&&(m.component.then(h,p),a(m.error)&&(t.errorComp=He(m.error,e)),a(m.loading)&&(t.loadingComp=He(m.loading,e),0===m.delay?t.loading=!0:u=setTimeout(function(){u=null,i(t.resolved)&&i(t.error)&&(t.loading=!0,d(!1))},m.delay||200)),a(m.timeout)&&(l=setTimeout(function(){l=null,i(t.resolved)&&p(null)},m.timeout)))),s=!1,t.loading?t.loadingComp:t.resolved}}(d=t,l)))return function(t,e,n,r,i){var a=_t();return a.asyncFactory=t,a.asyncMeta={data:e,context:n,children:r,tag:i},a}(d,e,n,s,u);e=e||{},kn(t),a(e.model)&&function(t,e){var n=t.model&&t.model.prop||"value",r=t.model&&t.model.event||"input";(e.attrs||(e.attrs={}))[n]=e.model.value;var i=e.on||(e.on={}),o=i[r],s=e.model.callback;a(o)?(Array.isArray(o)?-1===o.indexOf(s):o!==s)&&(i[r]=[s].concat(o)):i[r]=s}(t.options,e);var h=function(t,e,n){var r=e.options.props;if(!i(r)){var o={},s=t.attrs,c=t.props;if(a(s)||a(c))for(var u in r){var l=S(u);ce(o,c,u,l,!0)||ce(o,s,u,l,!1)}return o}}(e,t);if(o(t.options.functional))return function(t,e,n,i,o){var s=t.options,c={},u=s.props;if(a(u))for(var l in u)c[l]=jt(l,u,e||r);else a(n.attrs)&&Le(c,n.attrs),a(n.props)&&Le(c,n.props);var d=new Pe(n,c,o,i,t),f=s.render.call(null,d._c,d);if(f instanceof mt)return Oe(f,n,d.parent,s);if(Array.isArray(f)){for(var h=ue(f)||[],p=new Array(h.length),m=0;m<h.length;m++)p[m]=Oe(h[m],n,d.parent,s);return p}}(t,h,e,n,s);var p=e.on;if(e.on=e.nativeOn,o(t.options.abstract)){var m=e.slot;e={},m&&(e.slot=m)}!function(t){for(var e=t.hook||(t.hook={}),n=0;n<Ne.length;n++){var r=Ne[n],i=e[r],a=Ae[r];i===a||i&&i._merged||(e[r]=i?je(a,i):a)}}(e);var v=t.options.name||u;return new mt("vue-component-"+t.cid+(v?"-"+v:""),e,void 0,void 0,void 0,n,{Ctor:t,propsData:h,listeners:p,tag:u,children:s},d)}}}function je(t,e){var n=function(n,r){t(n,r),e(n,r)};return n._merged=!0,n}var Fe=1,Ye=2;function $e(t,e,n,r,u,l){return(Array.isArray(n)||s(n))&&(u=r,r=n,n=void 0),o(l)&&(u=Ye),function(t,e,n,r,s){if(a(n)&&a(n.__ob__))return _t();if(a(n)&&a(n.is)&&(e=n.is),!e)return _t();var u,l,d;(Array.isArray(r)&&"function"==typeof r[0]&&((n=n||{}).scopedSlots={default:r[0]},r.length=0),s===Ye?r=ue(r):s===Fe&&(r=function(t){for(var e=0;e<t.length;e++)if(Array.isArray(t[e]))return Array.prototype.concat.apply([],t);return t}(r)),"string"==typeof e)?(l=t.$vnode&&t.$vnode.ns||Y.getTagNamespace(e),u=Y.isReservedTag(e)?new mt(Y.parsePlatformTagName(e),n,r,void 0,void 0,t):n&&n.pre||!a(d=Bt(t.$options,"components",e))?new mt(e,n,r,void 0,void 0,t):Be(d,n,t,r,e)):u=Be(e,n,t,r);return Array.isArray(u)?u:a(u)?(a(l)&&function t(e,n,r){if(e.ns=n,"foreignObject"===e.tag&&(n=void 0,r=!0),a(e.children))for(var s=0,c=e.children.length;s<c;s++){var u=e.children[s];a(u.tag)&&(i(u.ns)||o(r)&&"svg"!==u.tag)&&t(u,n,r)}}(u,l),a(n)&&function(t){c(t.style)&&re(t.style),c(t.class)&&re(t.class)}(n),u):_t()}(t,e,n,r,u)}var ze,Ve=null;function He(t,e){return(t.__esModule||ct&&"Module"===t[Symbol.toStringTag])&&(t=t.default),c(t)?e.extend(t):t}function qe(t){return t.isComment&&t.asyncFactory}function We(t){if(Array.isArray(t))for(var e=0;e<t.length;e++){var n=t[e];if(a(n)&&(a(n.componentOptions)||qe(n)))return n}}function Ue(t,e){ze.$on(t,e)}function Ge(t,e){ze.$off(t,e)}function Ke(t,e){var n=ze;return function r(){null!==e.apply(null,arguments)&&n.$off(t,r)}}function Xe(t,e,n){ze=t,oe(e,n||{},Ue,Ge,Ke,t),ze=void 0}var Je=null;function Ze(t){var e=Je;return Je=t,function(){Je=e}}function Qe(t){for(;t&&(t=t.$parent);)if(t._inactive)return!0;return!1}function tn(t,e){if(e){if(t._directInactive=!1,Qe(t))return}else if(t._directInactive)return;if(t._inactive||null===t._inactive){t._inactive=!1;for(var n=0;n<t.$children.length;n++)tn(t.$children[n]);en(t,"activated")}}function en(t,e){ht();var n=t.$options[e],r=e+" hook";if(n)for(var i=0,a=n.length;i<a;i++)Vt(n[i],t,null,t,r);t._hasHookEvent&&t.$emit("hook:"+e),pt()}var nn=[],rn=[],an={},on=!1,sn=!1,cn=0,un=0,ln=Date.now;if(W&&!X){var dn=window.performance;dn&&"function"==typeof dn.now&&ln()>document.createEvent("Event").timeStamp&&(ln=function(){return dn.now()})}function fn(){var t,e;for(un=ln(),sn=!0,nn.sort(function(t,e){return t.id-e.id}),cn=0;cn<nn.length;cn++)(t=nn[cn]).before&&t.before(),e=t.id,an[e]=null,t.run();var n=rn.slice(),r=nn.slice();cn=nn.length=rn.length=0,an={},on=sn=!1,function(t){for(var e=0;e<t.length;e++)t[e]._inactive=!0,tn(t[e],!0)}(n),function(t){for(var e=t.length;e--;){var n=t[e],r=n.vm;r._watcher===n&&r._isMounted&&!r._isDestroyed&&en(r,"updated")}}(r),at&&Y.devtools&&at.emit("flush")}var hn=0,pn=function(t,e,n,r,i){this.vm=t,i&&(t._watcher=this),t._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++hn,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new st,this.newDepIds=new st,this.expression="","function"==typeof e?this.getter=e:(this.getter=function(t){if(!H.test(t)){var e=t.split(".");return function(t){for(var n=0;n<e.length;n++){if(!t)return;t=t[e[n]]}return t}}}(e),this.getter||(this.getter=R)),this.value=this.lazy?void 0:this.get()};pn.prototype.get=function(){var t;ht(this);var e=this.vm;try{t=this.getter.call(e,e)}catch(t){if(!this.user)throw t;zt(t,e,'getter for watcher "'+this.expression+'"')}finally{this.deep&&re(t),pt(),this.cleanupDeps()}return t},pn.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},pn.prototype.cleanupDeps=function(){for(var t=this.deps.length;t--;){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},pn.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():function(t){var e=t.id;if(null==an[e]){if(an[e]=!0,sn){for(var n=nn.length-1;n>cn&&nn[n].id>t.id;)n--;nn.splice(n+1,0,t)}else nn.push(t);on||(on=!0,ee(fn))}}(this)},pn.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||c(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(t){zt(t,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},pn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},pn.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},pn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||g(this.vm._watchers,this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1}};var mn={enumerable:!0,configurable:!0,get:R,set:R};function vn(t,e,n){mn.get=function(){return this[e][n]},mn.set=function(t){this[e][n]=t},Object.defineProperty(t,n,mn)}var _n={lazy:!0};function gn(t,e,n){var r=!it();"function"==typeof n?(mn.get=r?bn(e):yn(n),mn.set=R):(mn.get=n.get?r&&!1!==n.cache?bn(e):yn(n.get):R,mn.set=n.set||R),Object.defineProperty(t,e,mn)}function bn(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),dt.target&&e.depend(),e.value}}function yn(t){return function(){return t.call(this,this)}}function xn(t,e,n,r){return l(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=t[n]),t.$watch(e,n,r)}var wn=0;function kn(t){var e=t.options;if(t.super){var n=kn(t.super);if(n!==t.superOptions){t.superOptions=n;var r=function(t){var e,n=t.options,r=t.sealedOptions;for(var i in n)n[i]!==r[i]&&(e||(e={}),e[i]=n[i]);return e}(t);r&&T(t.extendOptions,r),(e=t.options=Nt(n,t.extendOptions)).name&&(e.components[e.name]=t)}}return e}function Cn(t){this._init(t)}function En(t){return t&&(t.Ctor.options.name||t.tag)}function Sn(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"==typeof t?t.split(",").indexOf(e)>-1:(n=t,"[object RegExp]"===u.call(n)&&t.test(e));var n}function In(t,e){var n=t.cache,r=t.keys,i=t._vnode;for(var a in n){var o=n[a];if(o){var s=En(o.componentOptions);s&&!e(s)&&Mn(n,a,r,i)}}}function Mn(t,e,n,r){var i=t[e];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),t[e]=null,g(n,e)}Cn.prototype._init=function(t){var e=this;e._uid=wn++,e._isVue=!0,t&&t._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(e,t):e.$options=Nt(kn(e.constructor),t||{},e),e._renderProxy=e,e._self=e,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(e),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&Xe(t,e)}(e),function(t){t._vnode=null,t._staticTrees=null;var e=t.$options,n=t.$vnode=e._parentVnode,i=n&&n.context;t.$slots=fe(e._renderChildren,i),t.$scopedSlots=r,t._c=function(e,n,r,i){return $e(t,e,n,r,i,!1)},t.$createElement=function(e,n,r,i){return $e(t,e,n,r,i,!0)};var a=n&&n.data;It(t,"$attrs",a&&a.attrs||r,null,!0),It(t,"$listeners",e._parentListeners||r,null,!0)}(e),en(e,"beforeCreate"),function(t){var e=de(t.$options.inject,t);e&&(Ct(!1),Object.keys(e).forEach(function(n){It(t,n,e[n])}),Ct(!0))}(e),function(t){t._watchers=[];var e=t.$options;e.props&&function(t,e){var n=t.$options.propsData||{},r=t._props={},i=t.$options._propKeys=[];t.$parent&&Ct(!1);var a=function(a){i.push(a);var o=jt(a,e,n,t);It(r,a,o),a in t||vn(t,"_props",a)};for(var o in e)a(o);Ct(!0)}(t,e.props),e.methods&&function(t,e){for(var n in t.$options.props,e)t[n]="function"!=typeof e[n]?R:I(e[n],t)}(t,e.methods),e.data?function(t){var e=t.$options.data;l(e=t._data="function"==typeof e?function(t,e){ht();try{return t.call(e,e)}catch(t){return zt(t,e,"data()"),{}}finally{pt()}}(e,t):e||{})||(e={});for(var n,r=Object.keys(e),i=t.$options.props,a=(t.$options.methods,r.length);a--;){var o=r[a];i&&y(i,o)||36!==(n=(o+"").charCodeAt(0))&&95!==n&&vn(t,"_data",o)}St(e,!0)}(t):St(t._data={},!0),e.computed&&function(t,e){var n=t._computedWatchers=Object.create(null),r=it();for(var i in e){var a=e[i],o="function"==typeof a?a:a.get;r||(n[i]=new pn(t,o||R,R,_n)),i in t||gn(t,i,a)}}(t,e.computed),e.watch&&e.watch!==et&&function(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var i=0;i<r.length;i++)xn(t,n,r[i]);else xn(t,n,r)}}(t,e.watch)}(e),function(t){var e=t.$options.provide;e&&(t._provided="function"==typeof e?e.call(t):e)}(e),en(e,"created"),e.$options.el&&e.$mount(e.$options.el)},function(t){Object.defineProperty(t.prototype,"$data",{get:function(){return this._data}}),Object.defineProperty(t.prototype,"$props",{get:function(){return this._props}}),t.prototype.$set=Mt,t.prototype.$delete=Tt,t.prototype.$watch=function(t,e,n){if(l(e))return xn(this,t,e,n);(n=n||{}).user=!0;var r=new pn(this,t,e,n);if(n.immediate)try{e.call(this,r.value)}catch(t){zt(t,this,'callback for immediate watcher "'+r.expression+'"')}return function(){r.teardown()}}}(Cn),function(t){var e=/^hook:/;t.prototype.$on=function(t,n){var r=this;if(Array.isArray(t))for(var i=0,a=t.length;i<a;i++)r.$on(t[i],n);else(r._events[t]||(r._events[t]=[])).push(n),e.test(t)&&(r._hasHookEvent=!0);return r},t.prototype.$once=function(t,e){var n=this;function r(){n.$off(t,r),e.apply(n,arguments)}return r.fn=e,n.$on(t,r),n},t.prototype.$off=function(t,e){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Array.isArray(t)){for(var r=0,i=t.length;r<i;r++)n.$off(t[r],e);return n}var a,o=n._events[t];if(!o)return n;if(!e)return n._events[t]=null,n;for(var s=o.length;s--;)if((a=o[s])===e||a.fn===e){o.splice(s,1);break}return n},t.prototype.$emit=function(t){var e=this._events[t];if(e){e=e.length>1?M(e):e;for(var n=M(arguments,1),r='event handler for "'+t+'"',i=0,a=e.length;i<a;i++)Vt(e[i],this,n,this,r)}return this}}(Cn),function(t){t.prototype._update=function(t,e){var n=this,r=n.$el,i=n._vnode,a=Ze(n);n._vnode=t,n.$el=i?n.__patch__(i,t):n.__patch__(n.$el,t,e,!1),a(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},t.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},t.prototype.$destroy=function(){var t=this;if(!t._isBeingDestroyed){en(t,"beforeDestroy"),t._isBeingDestroyed=!0;var e=t.$parent;!e||e._isBeingDestroyed||t.$options.abstract||g(e.$children,t),t._watcher&&t._watcher.teardown();for(var n=t._watchers.length;n--;)t._watchers[n].teardown();t._data.__ob__&&t._data.__ob__.vmCount--,t._isDestroyed=!0,t.__patch__(t._vnode,null),en(t,"destroyed"),t.$off(),t.$el&&(t.$el.__vue__=null),t.$vnode&&(t.$vnode.parent=null)}}}(Cn),function(t){Re(t.prototype),t.prototype.$nextTick=function(t){return ee(t,this)},t.prototype._render=function(){var t,e=this,n=e.$options,r=n.render,i=n._parentVnode;i&&(e.$scopedSlots=pe(i.data.scopedSlots,e.$slots,e.$scopedSlots)),e.$vnode=i;try{Ve=e,t=r.call(e._renderProxy,e.$createElement)}catch(n){zt(n,e,"render"),t=e._vnode}finally{Ve=null}return Array.isArray(t)&&1===t.length&&(t=t[0]),t instanceof mt||(t=_t()),t.parent=i,t}}(Cn);var Tn=[String,RegExp,Array],Dn={KeepAlive:{name:"keep-alive",abstract:!0,props:{include:Tn,exclude:Tn,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Mn(this.cache,t,this.keys)},mounted:function(){var t=this;this.$watch("include",function(e){In(t,function(t){return Sn(e,t)})}),this.$watch("exclude",function(e){In(t,function(t){return!Sn(e,t)})})},render:function(){var t=this.$slots.default,e=We(t),n=e&&e.componentOptions;if(n){var r=En(n),i=this.include,a=this.exclude;if(i&&(!r||!Sn(i,r))||a&&r&&Sn(a,r))return e;var o=this.cache,s=this.keys,c=null==e.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):e.key;o[c]?(e.componentInstance=o[c].componentInstance,g(s,c),s.push(c)):(o[c]=e,s.push(c),this.max&&s.length>parseInt(this.max)&&Mn(o,s[0],s,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){var e={get:function(){return Y}};Object.defineProperty(t,"config",e),t.util={warn:ut,extend:T,mergeOptions:Nt,defineReactive:It},t.set=Mt,t.delete=Tt,t.nextTick=ee,t.observable=function(t){return St(t),t},t.options=Object.create(null),j.forEach(function(e){t.options[e+"s"]=Object.create(null)}),t.options._base=t,T(t.options.components,Dn),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=M(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=Nt(this.options,t),this}}(t),function(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,i=t._Ctor||(t._Ctor={});if(i[r])return i[r];var a=t.name||n.options.name,o=function(t){this._init(t)};return(o.prototype=Object.create(n.prototype)).constructor=o,o.cid=e++,o.options=Nt(n.options,t),o.super=n,o.options.props&&function(t){var e=t.options.props;for(var n in e)vn(t.prototype,"_props",n)}(o),o.options.computed&&function(t){var e=t.options.computed;for(var n in e)gn(t.prototype,n,e[n])}(o),o.extend=n.extend,o.mixin=n.mixin,o.use=n.use,j.forEach(function(t){o[t]=n[t]}),a&&(o.options.components[a]=o),o.superOptions=n.options,o.extendOptions=t,o.sealedOptions=T({},o.options),i[r]=o,o}}(t),function(t){j.forEach(function(e){t[e]=function(t,n){return n?("component"===e&&l(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"==typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}})}(t)}(Cn),Object.defineProperty(Cn.prototype,"$isServer",{get:it}),Object.defineProperty(Cn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Cn,"FunctionalRenderContext",{value:Pe}),Cn.version="2.6.10";var Rn=m("style,class"),Pn=m("input,textarea,option,select,progress"),On=function(t,e,n){return"value"===n&&Pn(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},Ln=m("contenteditable,draggable,spellcheck"),An=m("events,caret,typing,plaintext-only"),Nn=function(t,e){return $n(e)||"false"===e?"false":"contenteditable"===t&&An(e)?e:"true"},Bn=m("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),jn="http://www.w3.org/1999/xlink",Fn=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Yn=function(t){return Fn(t)?t.slice(6,t.length):""},$n=function(t){return null==t||!1===t};function zn(t,e){return{staticClass:Vn(t.staticClass,e.staticClass),class:a(t.class)?[t.class,e.class]:e.class}}function Vn(t,e){return t?e?t+" "+e:t:e||""}function Hn(t){return Array.isArray(t)?function(t){for(var e,n="",r=0,i=t.length;r<i;r++)a(e=Hn(t[r]))&&""!==e&&(n&&(n+=" "),n+=e);return n}(t):c(t)?function(t){var e="";for(var n in t)t[n]&&(e&&(e+=" "),e+=n);return e}(t):"string"==typeof t?t:""}var qn={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Wn=m("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),Un=m("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),Gn=function(t){return Wn(t)||Un(t)};function Kn(t){return Un(t)?"svg":"math"===t?"math":void 0}var Xn=Object.create(null),Jn=m("text,number,password,search,email,tel,url");function Zn(t){return"string"==typeof t?document.querySelector(t)||document.createElement("div"):t}var Qn=Object.freeze({createElement:function(t,e){var n=document.createElement(t);return"select"!==t?n:(e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)},createElementNS:function(t,e){return document.createElementNS(qn[t],e)},createTextNode:function(t){return document.createTextNode(t)},createComment:function(t){return document.createComment(t)},insertBefore:function(t,e,n){t.insertBefore(e,n)},removeChild:function(t,e){t.removeChild(e)},appendChild:function(t,e){t.appendChild(e)},parentNode:function(t){return t.parentNode},nextSibling:function(t){return t.nextSibling},tagName:function(t){return t.tagName},setTextContent:function(t,e){t.textContent=e},setStyleScope:function(t,e){t.setAttribute(e,"")}}),tr={create:function(t,e){er(e)},update:function(t,e){t.data.ref!==e.data.ref&&(er(t,!0),er(e))},destroy:function(t){er(t,!0)}};function er(t,e){var n=t.data.ref;if(a(n)){var r=t.context,i=t.componentInstance||t.elm,o=r.$refs;e?Array.isArray(o[n])?g(o[n],i):o[n]===i&&(o[n]=void 0):t.data.refInFor?Array.isArray(o[n])?o[n].indexOf(i)<0&&o[n].push(i):o[n]=[i]:o[n]=i}}var nr=new mt("",{},[]),rr=["create","activate","update","remove","destroy"];function ir(t,e){return t.key===e.key&&(t.tag===e.tag&&t.isComment===e.isComment&&a(t.data)===a(e.data)&&function(t,e){if("input"!==t.tag)return!0;var n,r=a(n=t.data)&&a(n=n.attrs)&&n.type,i=a(n=e.data)&&a(n=n.attrs)&&n.type;return r===i||Jn(r)&&Jn(i)}(t,e)||o(t.isAsyncPlaceholder)&&t.asyncFactory===e.asyncFactory&&i(e.asyncFactory.error))}function ar(t,e,n){var r,i,o={};for(r=e;r<=n;++r)a(i=t[r].key)&&(o[i]=r);return o}var or={create:sr,update:sr,destroy:function(t){sr(t,nr)}};function sr(t,e){(t.data.directives||e.data.directives)&&function(t,e){var n,r,i,a=t===nr,o=e===nr,s=ur(t.data.directives,t.context),c=ur(e.data.directives,e.context),u=[],l=[];for(n in c)r=s[n],i=c[n],r?(i.oldValue=r.value,i.oldArg=r.arg,dr(i,"update",e,t),i.def&&i.def.componentUpdated&&l.push(i)):(dr(i,"bind",e,t),i.def&&i.def.inserted&&u.push(i));if(u.length){var d=function(){for(var n=0;n<u.length;n++)dr(u[n],"inserted",e,t)};a?se(e,"insert",d):d()}if(l.length&&se(e,"postpatch",function(){for(var n=0;n<l.length;n++)dr(l[n],"componentUpdated",e,t)}),!a)for(n in s)c[n]||dr(s[n],"unbind",t,t,o)}(t,e)}var cr=Object.create(null);function ur(t,e){var n,r,i=Object.create(null);if(!t)return i;for(n=0;n<t.length;n++)(r=t[n]).modifiers||(r.modifiers=cr),i[lr(r)]=r,r.def=Bt(e.$options,"directives",r.name);return i}function lr(t){return t.rawName||t.name+"."+Object.keys(t.modifiers||{}).join(".")}function dr(t,e,n,r,i){var a=t.def&&t.def[e];if(a)try{a(n.elm,t,n,r,i)}catch(r){zt(r,n.context,"directive "+t.name+" "+e+" hook")}}var fr=[tr,or];function hr(t,e){var n=e.componentOptions;if(!(a(n)&&!1===n.Ctor.options.inheritAttrs||i(t.data.attrs)&&i(e.data.attrs))){var r,o,s=e.elm,c=t.data.attrs||{},u=e.data.attrs||{};for(r in a(u.__ob__)&&(u=e.data.attrs=T({},u)),u)o=u[r],c[r]!==o&&pr(s,r,o);for(r in(X||Z)&&u.value!==c.value&&pr(s,"value",u.value),c)i(u[r])&&(Fn(r)?s.removeAttributeNS(jn,Yn(r)):Ln(r)||s.removeAttribute(r))}}function pr(t,e,n){t.tagName.indexOf("-")>-1?mr(t,e,n):Bn(e)?$n(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):Ln(e)?t.setAttribute(e,Nn(e,n)):Fn(e)?$n(n)?t.removeAttributeNS(jn,Yn(e)):t.setAttributeNS(jn,e,n):mr(t,e,n)}function mr(t,e,n){if($n(n))t.removeAttribute(e);else{if(X&&!J&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var vr={create:hr,update:hr};function _r(t,e){var n=e.elm,r=e.data,o=t.data;if(!(i(r.staticClass)&&i(r.class)&&(i(o)||i(o.staticClass)&&i(o.class)))){var s=function(t){for(var e=t.data,n=t,r=t;a(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(e=zn(r.data,e));for(;a(n=n.parent);)n&&n.data&&(e=zn(e,n.data));return function(t,e){return a(t)||a(e)?Vn(t,Hn(e)):""}(e.staticClass,e.class)}(e),c=n._transitionClasses;a(c)&&(s=Vn(s,Hn(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var gr,br,yr,xr,wr,kr,Cr={create:_r,update:_r},Er=/[\w).+\-_$\]]/;function Sr(t){var e,n,r,i,a,o=!1,s=!1,c=!1,u=!1,l=0,d=0,f=0,h=0;for(r=0;r<t.length;r++)if(n=e,e=t.charCodeAt(r),o)39===e&&92!==n&&(o=!1);else if(s)34===e&&92!==n&&(s=!1);else if(c)96===e&&92!==n&&(c=!1);else if(u)47===e&&92!==n&&(u=!1);else if(124!==e||124===t.charCodeAt(r+1)||124===t.charCodeAt(r-1)||l||d||f){switch(e){case 34:s=!0;break;case 39:o=!0;break;case 96:c=!0;break;case 40:f++;break;case 41:f--;break;case 91:d++;break;case 93:d--;break;case 123:l++;break;case 125:l--}if(47===e){for(var p=r-1,m=void 0;p>=0&&" "===(m=t.charAt(p));p--);m&&Er.test(m)||(u=!0)}}else void 0===i?(h=r+1,i=t.slice(0,r).trim()):v();function v(){(a||(a=[])).push(t.slice(h,r).trim()),h=r+1}if(void 0===i?i=t.slice(0,r).trim():0!==h&&v(),a)for(r=0;r<a.length;r++)i=Ir(i,a[r]);return i}function Ir(t,e){var n=e.indexOf("(");if(n<0)return'_f("'+e+'")('+t+")";var r=e.slice(0,n),i=e.slice(n+1);return'_f("'+r+'")('+t+(")"!==i?","+i:i)}function Mr(t,e){console.error("[Vue compiler]: "+t)}function Tr(t,e){return t?t.map(function(t){return t[e]}).filter(function(t){return t}):[]}function Dr(t,e,n,r,i){(t.props||(t.props=[])).push(Fr({name:e,value:n,dynamic:i},r)),t.plain=!1}function Rr(t,e,n,r,i){(i?t.dynamicAttrs||(t.dynamicAttrs=[]):t.attrs||(t.attrs=[])).push(Fr({name:e,value:n,dynamic:i},r)),t.plain=!1}function Pr(t,e,n,r){t.attrsMap[e]=n,t.attrsList.push(Fr({name:e,value:n},r))}function Or(t,e,n,r,i,a,o,s){(t.directives||(t.directives=[])).push(Fr({name:e,rawName:n,value:r,arg:i,isDynamicArg:a,modifiers:o},s)),t.plain=!1}function Lr(t,e,n){return n?"_p("+e+',"'+t+'")':t+e}function Ar(t,e,n,i,a,o,s,c){var u;(i=i||r).right?c?e="("+e+")==='click'?'contextmenu':("+e+")":"click"===e&&(e="contextmenu",delete i.right):i.middle&&(c?e="("+e+")==='click'?'mouseup':("+e+")":"click"===e&&(e="mouseup")),i.capture&&(delete i.capture,e=Lr("!",e,c)),i.once&&(delete i.once,e=Lr("~",e,c)),i.passive&&(delete i.passive,e=Lr("&",e,c)),i.native?(delete i.native,u=t.nativeEvents||(t.nativeEvents={})):u=t.events||(t.events={});var l=Fr({value:n.trim(),dynamic:c},s);i!==r&&(l.modifiers=i);var d=u[e];Array.isArray(d)?a?d.unshift(l):d.push(l):u[e]=d?a?[l,d]:[d,l]:l,t.plain=!1}function Nr(t,e,n){var r=Br(t,":"+e)||Br(t,"v-bind:"+e);if(null!=r)return Sr(r);if(!1!==n){var i=Br(t,e);if(null!=i)return JSON.stringify(i)}}function Br(t,e,n){var r;if(null!=(r=t.attrsMap[e]))for(var i=t.attrsList,a=0,o=i.length;a<o;a++)if(i[a].name===e){i.splice(a,1);break}return n&&delete t.attrsMap[e],r}function jr(t,e){for(var n=t.attrsList,r=0,i=n.length;r<i;r++){var a=n[r];if(e.test(a.name))return n.splice(r,1),a}}function Fr(t,e){return e&&(null!=e.start&&(t.start=e.start),null!=e.end&&(t.end=e.end)),t}function Yr(t,e,n){var r=n||{},i=r.number,a="$$v";r.trim&&(a="(typeof $$v === 'string'? $$v.trim(): $$v)"),i&&(a="_n("+a+")");var o=$r(e,a);t.model={value:"("+e+")",expression:JSON.stringify(e),callback:"function ($$v) {"+o+"}"}}function $r(t,e){var n=function(t){if(t=t.trim(),gr=t.length,t.indexOf("[")<0||t.lastIndexOf("]")<gr-1)return(xr=t.lastIndexOf("."))>-1?{exp:t.slice(0,xr),key:'"'+t.slice(xr+1)+'"'}:{exp:t,key:null};for(br=t,xr=wr=kr=0;!Vr();)Hr(yr=zr())?Wr(yr):91===yr&&qr(yr);return{exp:t.slice(0,wr),key:t.slice(wr+1,kr)}}(t);return null===n.key?t+"="+e:"$set("+n.exp+", "+n.key+", "+e+")"}function zr(){return br.charCodeAt(++xr)}function Vr(){return xr>=gr}function Hr(t){return 34===t||39===t}function qr(t){var e=1;for(wr=xr;!Vr();)if(Hr(t=zr()))Wr(t);else if(91===t&&e++,93===t&&e--,0===e){kr=xr;break}}function Wr(t){for(var e=t;!Vr()&&(t=zr())!==e;);}var Ur,Gr="__r",Kr="__c";function Xr(t,e,n){var r=Ur;return function i(){null!==e.apply(null,arguments)&&Qr(t,i,n,r)}}var Jr=Ut&&!(tt&&Number(tt[1])<=53);function Zr(t,e,n,r){if(Jr){var i=un,a=e;e=a._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=i||t.timeStamp<=0||t.target.ownerDocument!==document)return a.apply(this,arguments)}}Ur.addEventListener(t,e,nt?{capture:n,passive:r}:n)}function Qr(t,e,n,r){(r||Ur).removeEventListener(t,e._wrapper||e,n)}function ti(t,e){if(!i(t.data.on)||!i(e.data.on)){var n=e.data.on||{},r=t.data.on||{};Ur=e.elm,function(t){if(a(t[Gr])){var e=X?"change":"input";t[e]=[].concat(t[Gr],t[e]||[]),delete t[Gr]}a(t[Kr])&&(t.change=[].concat(t[Kr],t.change||[]),delete t[Kr])}(n),oe(n,r,Zr,Qr,Xr,e.context),Ur=void 0}}var ei,ni={create:ti,update:ti};function ri(t,e){if(!i(t.data.domProps)||!i(e.data.domProps)){var n,r,o=e.elm,s=t.data.domProps||{},c=e.data.domProps||{};for(n in a(c.__ob__)&&(c=e.data.domProps=T({},c)),s)n in c||(o[n]="");for(n in c){if(r=c[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),r===s[n])continue;1===o.childNodes.length&&o.removeChild(o.childNodes[0])}if("value"===n&&"PROGRESS"!==o.tagName){o._value=r;var u=i(r)?"":String(r);ii(o,u)&&(o.value=u)}else if("innerHTML"===n&&Un(o.tagName)&&i(o.innerHTML)){(ei=ei||document.createElement("div")).innerHTML="<svg>"+r+"</svg>";for(var l=ei.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;l.firstChild;)o.appendChild(l.firstChild)}else if(r!==s[n])try{o[n]=r}catch(t){}}}}function ii(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(t,e)||function(t,e){var n=t.value,r=t._vModifiers;if(a(r)){if(r.number)return p(n)!==p(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var ai={create:ri,update:ri},oi=x(function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach(function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e});function si(t){var e=ci(t.style);return t.staticStyle?T(t.staticStyle,e):e}function ci(t){return Array.isArray(t)?D(t):"string"==typeof t?oi(t):t}var ui,li=/^--/,di=/\s*!important$/,fi=function(t,e,n){if(li.test(e))t.style.setProperty(e,n);else if(di.test(n))t.style.setProperty(S(e),n.replace(di,""),"important");else{var r=pi(e);if(Array.isArray(n))for(var i=0,a=n.length;i<a;i++)t.style[r]=n[i];else t.style[r]=n}},hi=["Webkit","Moz","ms"],pi=x(function(t){if(ui=ui||document.createElement("div").style,"filter"!==(t=k(t))&&t in ui)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<hi.length;n++){var r=hi[n]+e;if(r in ui)return r}});function mi(t,e){var n=e.data,r=t.data;if(!(i(n.staticStyle)&&i(n.style)&&i(r.staticStyle)&&i(r.style))){var o,s,c=e.elm,u=r.staticStyle,l=r.normalizedStyle||r.style||{},d=u||l,f=ci(e.data.style)||{};e.data.normalizedStyle=a(f.__ob__)?T({},f):f;var h=function(t,e){for(var n,r={},i=t;i.componentInstance;)(i=i.componentInstance._vnode)&&i.data&&(n=si(i.data))&&T(r,n);(n=si(t.data))&&T(r,n);for(var a=t;a=a.parent;)a.data&&(n=si(a.data))&&T(r,n);return r}(e);for(s in d)i(h[s])&&fi(c,s,"");for(s in h)(o=h[s])!==d[s]&&fi(c,s,null==o?"":o)}}var vi={create:mi,update:mi},_i=/\s+/;function gi(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(_i).forEach(function(e){return t.classList.add(e)}):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function bi(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(_i).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function yi(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&T(e,xi(t.name||"v")),T(e,t),e}return"string"==typeof t?xi(t):void 0}}var xi=x(function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}}),wi=W&&!J,ki="transition",Ci="animation",Ei="transition",Si="transitionend",Ii="animation",Mi="animationend";wi&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Ei="WebkitTransition",Si="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Ii="WebkitAnimation",Mi="webkitAnimationEnd"));var Ti=W?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Di(t){Ti(function(){Ti(t)})}function Ri(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),gi(t,e))}function Pi(t,e){t._transitionClasses&&g(t._transitionClasses,e),bi(t,e)}function Oi(t,e,n){var r=Ai(t,e),i=r.type,a=r.timeout,o=r.propCount;if(!i)return n();var s=i===ki?Si:Mi,c=0,u=function(){t.removeEventListener(s,l),n()},l=function(e){e.target===t&&++c>=o&&u()};setTimeout(function(){c<o&&u()},a+1),t.addEventListener(s,l)}var Li=/\b(transform|all)(,|$)/;function Ai(t,e){var n,r=window.getComputedStyle(t),i=(r[Ei+"Delay"]||"").split(", "),a=(r[Ei+"Duration"]||"").split(", "),o=Ni(i,a),s=(r[Ii+"Delay"]||"").split(", "),c=(r[Ii+"Duration"]||"").split(", "),u=Ni(s,c),l=0,d=0;return e===ki?o>0&&(n=ki,l=o,d=a.length):e===Ci?u>0&&(n=Ci,l=u,d=c.length):d=(n=(l=Math.max(o,u))>0?o>u?ki:Ci:null)?n===ki?a.length:c.length:0,{type:n,timeout:l,propCount:d,hasTransform:n===ki&&Li.test(r[Ei+"Property"])}}function Ni(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max.apply(null,e.map(function(e,n){return Bi(e)+Bi(t[n])}))}function Bi(t){return 1e3*Number(t.slice(0,-1).replace(",","."))}function ji(t,e){var n=t.elm;a(n._leaveCb)&&(n._leaveCb.cancelled=!0,n._leaveCb());var r=yi(t.data.transition);if(!i(r)&&!a(n._enterCb)&&1===n.nodeType){for(var o=r.css,s=r.type,u=r.enterClass,l=r.enterToClass,d=r.enterActiveClass,f=r.appearClass,h=r.appearToClass,m=r.appearActiveClass,v=r.beforeEnter,_=r.enter,g=r.afterEnter,b=r.enterCancelled,y=r.beforeAppear,x=r.appear,w=r.afterAppear,k=r.appearCancelled,C=r.duration,E=Je,S=Je.$vnode;S&&S.parent;)E=S.context,S=S.parent;var I=!E._isMounted||!t.isRootInsert;if(!I||x||""===x){var M=I&&f?f:u,T=I&&m?m:d,D=I&&h?h:l,R=I&&y||v,P=I&&"function"==typeof x?x:_,O=I&&w||g,L=I&&k||b,A=p(c(C)?C.enter:C),B=!1!==o&&!J,j=$i(P),F=n._enterCb=N(function(){B&&(Pi(n,D),Pi(n,T)),F.cancelled?(B&&Pi(n,M),L&&L(n)):O&&O(n),n._enterCb=null});t.data.show||se(t,"insert",function(){var e=n.parentNode,r=e&&e._pending&&e._pending[t.key];r&&r.tag===t.tag&&r.elm._leaveCb&&r.elm._leaveCb(),P&&P(n,F)}),R&&R(n),B&&(Ri(n,M),Ri(n,T),Di(function(){Pi(n,M),F.cancelled||(Ri(n,D),j||(Yi(A)?setTimeout(F,A):Oi(n,s,F)))})),t.data.show&&(e&&e(),P&&P(n,F)),B||j||F()}}}function Fi(t,e){var n=t.elm;a(n._enterCb)&&(n._enterCb.cancelled=!0,n._enterCb());var r=yi(t.data.transition);if(i(r)||1!==n.nodeType)return e();if(!a(n._leaveCb)){var o=r.css,s=r.type,u=r.leaveClass,l=r.leaveToClass,d=r.leaveActiveClass,f=r.beforeLeave,h=r.leave,m=r.afterLeave,v=r.leaveCancelled,_=r.delayLeave,g=r.duration,b=!1!==o&&!J,y=$i(h),x=p(c(g)?g.leave:g),w=n._leaveCb=N(function(){n.parentNode&&n.parentNode._pending&&(n.parentNode._pending[t.key]=null),b&&(Pi(n,l),Pi(n,d)),w.cancelled?(b&&Pi(n,u),v&&v(n)):(e(),m&&m(n)),n._leaveCb=null});_?_(k):k()}function k(){w.cancelled||(!t.data.show&&n.parentNode&&((n.parentNode._pending||(n.parentNode._pending={}))[t.key]=t),f&&f(n),b&&(Ri(n,u),Ri(n,d),Di(function(){Pi(n,u),w.cancelled||(Ri(n,l),y||(Yi(x)?setTimeout(w,x):Oi(n,s,w)))})),h&&h(n,w),b||y||w())}}function Yi(t){return"number"==typeof t&&!isNaN(t)}function $i(t){if(i(t))return!1;var e=t.fns;return a(e)?$i(Array.isArray(e)?e[0]:e):(t._length||t.length)>1}function zi(t,e){!0!==e.data.show&&ji(e)}var Vi=function(t){var e,n,r={},c=t.modules,u=t.nodeOps;for(e=0;e<rr.length;++e)for(r[rr[e]]=[],n=0;n<c.length;++n)a(c[n][rr[e]])&&r[rr[e]].push(c[n][rr[e]]);function l(t){var e=u.parentNode(t);a(e)&&u.removeChild(e,t)}function d(t,e,n,i,s,c,l){if(a(t.elm)&&a(c)&&(t=c[l]=bt(t)),t.isRootInsert=!s,!function(t,e,n,i){var s=t.data;if(a(s)){var c=a(t.componentInstance)&&s.keepAlive;if(a(s=s.hook)&&a(s=s.init)&&s(t,!1),a(t.componentInstance))return f(t,e),h(n,t.elm,i),o(c)&&function(t,e,n,i){for(var o,s=t;s.componentInstance;)if(a(o=(s=s.componentInstance._vnode).data)&&a(o=o.transition)){for(o=0;o<r.activate.length;++o)r.activate[o](nr,s);e.push(s);break}h(n,t.elm,i)}(t,e,n,i),!0}}(t,e,n,i)){var d=t.data,m=t.children,v=t.tag;a(v)?(t.elm=t.ns?u.createElementNS(t.ns,v):u.createElement(v,t),g(t),p(t,m,e),a(d)&&_(t,e),h(n,t.elm,i)):o(t.isComment)?(t.elm=u.createComment(t.text),h(n,t.elm,i)):(t.elm=u.createTextNode(t.text),h(n,t.elm,i))}}function f(t,e){a(t.data.pendingInsert)&&(e.push.apply(e,t.data.pendingInsert),t.data.pendingInsert=null),t.elm=t.componentInstance.$el,v(t)?(_(t,e),g(t)):(er(t),e.push(t))}function h(t,e,n){a(t)&&(a(n)?u.parentNode(n)===t&&u.insertBefore(t,e,n):u.appendChild(t,e))}function p(t,e,n){if(Array.isArray(e))for(var r=0;r<e.length;++r)d(e[r],n,t.elm,null,!0,e,r);else s(t.text)&&u.appendChild(t.elm,u.createTextNode(String(t.text)))}function v(t){for(;t.componentInstance;)t=t.componentInstance._vnode;return a(t.tag)}function _(t,n){for(var i=0;i<r.create.length;++i)r.create[i](nr,t);a(e=t.data.hook)&&(a(e.create)&&e.create(nr,t),a(e.insert)&&n.push(t))}function g(t){var e;if(a(e=t.fnScopeId))u.setStyleScope(t.elm,e);else for(var n=t;n;)a(e=n.context)&&a(e=e.$options._scopeId)&&u.setStyleScope(t.elm,e),n=n.parent;a(e=Je)&&e!==t.context&&e!==t.fnContext&&a(e=e.$options._scopeId)&&u.setStyleScope(t.elm,e)}function b(t,e,n,r,i,a){for(;r<=i;++r)d(n[r],a,t,e,!1,n,r)}function y(t){var e,n,i=t.data;if(a(i))for(a(e=i.hook)&&a(e=e.destroy)&&e(t),e=0;e<r.destroy.length;++e)r.destroy[e](t);if(a(e=t.children))for(n=0;n<t.children.length;++n)y(t.children[n])}function x(t,e,n,r){for(;n<=r;++n){var i=e[n];a(i)&&(a(i.tag)?(w(i),y(i)):l(i.elm))}}function w(t,e){if(a(e)||a(t.data)){var n,i=r.remove.length+1;for(a(e)?e.listeners+=i:e=function(t,e){function n(){0==--n.listeners&&l(t)}return n.listeners=e,n}(t.elm,i),a(n=t.componentInstance)&&a(n=n._vnode)&&a(n.data)&&w(n,e),n=0;n<r.remove.length;++n)r.remove[n](t,e);a(n=t.data.hook)&&a(n=n.remove)?n(t,e):e()}else l(t.elm)}function k(t,e,n,r){for(var i=n;i<r;i++){var o=e[i];if(a(o)&&ir(t,o))return i}}function C(t,e,n,s,c,l){if(t!==e){a(e.elm)&&a(s)&&(e=s[c]=bt(e));var f=e.elm=t.elm;if(o(t.isAsyncPlaceholder))a(e.asyncFactory.resolved)?I(t.elm,e,n):e.isAsyncPlaceholder=!0;else if(o(e.isStatic)&&o(t.isStatic)&&e.key===t.key&&(o(e.isCloned)||o(e.isOnce)))e.componentInstance=t.componentInstance;else{var h,p=e.data;a(p)&&a(h=p.hook)&&a(h=h.prepatch)&&h(t,e);var m=t.children,_=e.children;if(a(p)&&v(e)){for(h=0;h<r.update.length;++h)r.update[h](t,e);a(h=p.hook)&&a(h=h.update)&&h(t,e)}i(e.text)?a(m)&&a(_)?m!==_&&function(t,e,n,r,o){for(var s,c,l,f=0,h=0,p=e.length-1,m=e[0],v=e[p],_=n.length-1,g=n[0],y=n[_],w=!o;f<=p&&h<=_;)i(m)?m=e[++f]:i(v)?v=e[--p]:ir(m,g)?(C(m,g,r,n,h),m=e[++f],g=n[++h]):ir(v,y)?(C(v,y,r,n,_),v=e[--p],y=n[--_]):ir(m,y)?(C(m,y,r,n,_),w&&u.insertBefore(t,m.elm,u.nextSibling(v.elm)),m=e[++f],y=n[--_]):ir(v,g)?(C(v,g,r,n,h),w&&u.insertBefore(t,v.elm,m.elm),v=e[--p],g=n[++h]):(i(s)&&(s=ar(e,f,p)),i(c=a(g.key)?s[g.key]:k(g,e,f,p))?d(g,r,t,m.elm,!1,n,h):ir(l=e[c],g)?(C(l,g,r,n,h),e[c]=void 0,w&&u.insertBefore(t,l.elm,m.elm)):d(g,r,t,m.elm,!1,n,h),g=n[++h]);f>p?b(t,i(n[_+1])?null:n[_+1].elm,n,h,_,r):h>_&&x(0,e,f,p)}(f,m,_,n,l):a(_)?(a(t.text)&&u.setTextContent(f,""),b(f,null,_,0,_.length-1,n)):a(m)?x(0,m,0,m.length-1):a(t.text)&&u.setTextContent(f,""):t.text!==e.text&&u.setTextContent(f,e.text),a(p)&&a(h=p.hook)&&a(h=h.postpatch)&&h(t,e)}}}function E(t,e,n){if(o(n)&&a(t.parent))t.parent.data.pendingInsert=e;else for(var r=0;r<e.length;++r)e[r].data.hook.insert(e[r])}var S=m("attrs,class,staticClass,staticStyle,key");function I(t,e,n,r){var i,s=e.tag,c=e.data,u=e.children;if(r=r||c&&c.pre,e.elm=t,o(e.isComment)&&a(e.asyncFactory))return e.isAsyncPlaceholder=!0,!0;if(a(c)&&(a(i=c.hook)&&a(i=i.init)&&i(e,!0),a(i=e.componentInstance)))return f(e,n),!0;if(a(s)){if(a(u))if(t.hasChildNodes())if(a(i=c)&&a(i=i.domProps)&&a(i=i.innerHTML)){if(i!==t.innerHTML)return!1}else{for(var l=!0,d=t.firstChild,h=0;h<u.length;h++){if(!d||!I(d,u[h],n,r)){l=!1;break}d=d.nextSibling}if(!l||d)return!1}else p(e,u,n);if(a(c)){var m=!1;for(var v in c)if(!S(v)){m=!0,_(e,n);break}!m&&c.class&&re(c.class)}}else t.data!==e.text&&(t.data=e.text);return!0}return function(t,e,n,s){if(!i(e)){var c,l=!1,f=[];if(i(t))l=!0,d(e,f);else{var h=a(t.nodeType);if(!h&&ir(t,e))C(t,e,f,null,null,s);else{if(h){if(1===t.nodeType&&t.hasAttribute(B)&&(t.removeAttribute(B),n=!0),o(n)&&I(t,e,f))return E(e,f,!0),t;c=t,t=new mt(u.tagName(c).toLowerCase(),{},[],void 0,c)}var p=t.elm,m=u.parentNode(p);if(d(e,f,p._leaveCb?null:m,u.nextSibling(p)),a(e.parent))for(var _=e.parent,g=v(e);_;){for(var b=0;b<r.destroy.length;++b)r.destroy[b](_);if(_.elm=e.elm,g){for(var w=0;w<r.create.length;++w)r.create[w](nr,_);var k=_.data.hook.insert;if(k.merged)for(var S=1;S<k.fns.length;S++)k.fns[S]()}else er(_);_=_.parent}a(m)?x(0,[t],0,0):a(t.tag)&&y(t)}}return E(e,f,l),e.elm}a(t)&&y(t)}}({nodeOps:Qn,modules:[vr,Cr,ni,ai,vi,W?{create:zi,activate:zi,remove:function(t,e){!0!==t.data.show?Fi(t,e):e()}}:{}].concat(fr)});J&&document.addEventListener("selectionchange",function(){var t=document.activeElement;t&&t.vmodel&&Ji(t,"input")});var Hi={inserted:function(t,e,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?se(n,"postpatch",function(){Hi.componentUpdated(t,e,n)}):qi(t,e,n.context),t._vOptions=[].map.call(t.options,Gi)):("textarea"===n.tag||Jn(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",Ki),t.addEventListener("compositionend",Xi),t.addEventListener("change",Xi),J&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){qi(t,e,n.context);var r=t._vOptions,i=t._vOptions=[].map.call(t.options,Gi);i.some(function(t,e){return!L(t,r[e])})&&(t.multiple?e.value.some(function(t){return Ui(t,i)}):e.value!==e.oldValue&&Ui(e.value,i))&&Ji(t,"change")}}};function qi(t,e,n){Wi(t,e,n),(X||Z)&&setTimeout(function(){Wi(t,e,n)},0)}function Wi(t,e,n){var r=e.value,i=t.multiple;if(!i||Array.isArray(r)){for(var a,o,s=0,c=t.options.length;s<c;s++)if(o=t.options[s],i)a=A(r,Gi(o))>-1,o.selected!==a&&(o.selected=a);else if(L(Gi(o),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));i||(t.selectedIndex=-1)}}function Ui(t,e){return e.every(function(e){return!L(e,t)})}function Gi(t){return"_value"in t?t._value:t.value}function Ki(t){t.target.composing=!0}function Xi(t){t.target.composing&&(t.target.composing=!1,Ji(t.target,"input"))}function Ji(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function Zi(t){return!t.componentInstance||t.data&&t.data.transition?t:Zi(t.componentInstance._vnode)}var Qi={model:Hi,show:{bind:function(t,e,n){var r=e.value,i=(n=Zi(n)).data&&n.data.transition,a=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&i?(n.data.show=!0,ji(n,function(){t.style.display=a})):t.style.display=r?a:"none"},update:function(t,e,n){var r=e.value;!r!=!e.oldValue&&((n=Zi(n)).data&&n.data.transition?(n.data.show=!0,r?ji(n,function(){t.style.display=t.__vOriginalDisplay}):Fi(n,function(){t.style.display="none"})):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,i){i||(t.style.display=t.__vOriginalDisplay)}}},ta={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function ea(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?ea(We(e.children)):t}function na(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var i=n._parentListeners;for(var a in i)e[k(a)]=i[a];return e}function ra(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var ia=function(t){return t.tag||qe(t)},aa=function(t){return"show"===t.name},oa={name:"transition",props:ta,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(ia)).length){var r=this.mode,i=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return i;var a=ea(i);if(!a)return i;if(this._leaving)return ra(t,i);var o="__transition-"+this._uid+"-";a.key=null==a.key?a.isComment?o+"comment":o+a.tag:s(a.key)?0===String(a.key).indexOf(o)?a.key:o+a.key:a.key;var c=(a.data||(a.data={})).transition=na(this),u=this._vnode,l=ea(u);if(a.data.directives&&a.data.directives.some(aa)&&(a.data.show=!0),l&&l.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(a,l)&&!qe(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var d=l.data.transition=T({},c);if("out-in"===r)return this._leaving=!0,se(d,"afterLeave",function(){e._leaving=!1,e.$forceUpdate()}),ra(t,i);if("in-out"===r){if(qe(a))return u;var f,h=function(){f()};se(c,"afterEnter",h),se(c,"enterCancelled",h),se(d,"delayLeave",function(t){f=t})}}return i}}},sa=T({tag:String,moveClass:String},ta);function ca(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function ua(t){t.data.newPos=t.elm.getBoundingClientRect()}function la(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,i=e.top-n.top;if(r||i){t.data.moved=!0;var a=t.elm.style;a.transform=a.WebkitTransform="translate("+r+"px,"+i+"px)",a.transitionDuration="0s"}}delete sa.mode;var da={Transition:oa,TransitionGroup:{props:sa,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var i=Ze(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,i(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],a=this.children=[],o=na(this),s=0;s<i.length;s++){var c=i[s];c.tag&&null!=c.key&&0!==String(c.key).indexOf("__vlist")&&(a.push(c),n[c.key]=c,(c.data||(c.data={})).transition=o)}if(r){for(var u=[],l=[],d=0;d<r.length;d++){var f=r[d];f.data.transition=o,f.data.pos=f.elm.getBoundingClientRect(),n[f.key]?u.push(f):l.push(f)}this.kept=t(e,null,u),this.removed=l}return t(e,null,a)},updated:function(){var t=this.prevChildren,e=this.moveClass||(this.name||"v")+"-move";t.length&&this.hasMove(t[0].elm,e)&&(t.forEach(ca),t.forEach(ua),t.forEach(la),this._reflow=document.body.offsetHeight,t.forEach(function(t){if(t.data.moved){var n=t.elm,r=n.style;Ri(n,e),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(Si,n._moveCb=function t(r){r&&r.target!==n||r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(Si,t),n._moveCb=null,Pi(n,e))})}}))},methods:{hasMove:function(t,e){if(!wi)return!1;if(this._hasMove)return this._hasMove;var n=t.cloneNode();t._transitionClasses&&t._transitionClasses.forEach(function(t){bi(n,t)}),gi(n,e),n.style.display="none",this.$el.appendChild(n);var r=Ai(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}}};Cn.config.mustUseProp=On,Cn.config.isReservedTag=Gn,Cn.config.isReservedAttr=Rn,Cn.config.getTagNamespace=Kn,Cn.config.isUnknownElement=function(t){if(!W)return!0;if(Gn(t))return!1;if(t=t.toLowerCase(),null!=Xn[t])return Xn[t];var e=document.createElement(t);return t.indexOf("-")>-1?Xn[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Xn[t]=/HTMLUnknownElement/.test(e.toString())},T(Cn.options.directives,Qi),T(Cn.options.components,da),Cn.prototype.__patch__=W?Vi:R,Cn.prototype.$mount=function(t,e){return function(t,e,n){return t.$el=e,t.$options.render||(t.$options.render=_t),en(t,"beforeMount"),new pn(t,function(){t._update(t._render(),n)},R,{before:function(){t._isMounted&&!t._isDestroyed&&en(t,"beforeUpdate")}},!0),n=!1,null==t.$vnode&&(t._isMounted=!0,en(t,"mounted")),t}(this,t=t&&W?Zn(t):void 0,e)},W&&setTimeout(function(){Y.devtools&&at&&at.emit("init",Cn)},0);var fa,ha=/\{\{((?:.|\r?\n)+?)\}\}/g,pa=/[-.*+?^${}()|[\]\/\\]/g,ma=x(function(t){var e=t[0].replace(pa,"\\$&"),n=t[1].replace(pa,"\\$&");return new RegExp(e+"((?:.|\\n)+?)"+n,"g")}),va={staticKeys:["staticClass"],transformNode:function(t,e){e.warn;var n=Br(t,"class");n&&(t.staticClass=JSON.stringify(n));var r=Nr(t,"class",!1);r&&(t.classBinding=r)},genData:function(t){var e="";return t.staticClass&&(e+="staticClass:"+t.staticClass+","),t.classBinding&&(e+="class:"+t.classBinding+","),e}},_a={staticKeys:["staticStyle"],transformNode:function(t,e){e.warn;var n=Br(t,"style");n&&(t.staticStyle=JSON.stringify(oi(n)));var r=Nr(t,"style",!1);r&&(t.styleBinding=r)},genData:function(t){var e="";return t.staticStyle&&(e+="staticStyle:"+t.staticStyle+","),t.styleBinding&&(e+="style:("+t.styleBinding+"),"),e}},ga=m("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),ba=m("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),ya=m("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),xa=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,wa=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,ka="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+$.source+"]*",Ca="((?:"+ka+"\\:)?"+ka+")",Ea=new RegExp("^<"+Ca),Sa=/^\s*(\/?)>/,Ia=new RegExp("^<\\/"+Ca+"[^>]*>"),Ma=/^<!DOCTYPE [^>]+>/i,Ta=/^<!\--/,Da=/^<!\[/,Ra=m("script,style,textarea",!0),Pa={},Oa={"&lt;":"<","&gt;":">","&quot;":'"',"&amp;":"&","&#10;":"\n","&#9;":"\t","&#39;":"'"},La=/&(?:lt|gt|quot|amp|#39);/g,Aa=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Na=m("pre,textarea",!0),Ba=function(t,e){return t&&Na(t)&&"\n"===e[0]};function ja(t,e){var n=e?Aa:La;return t.replace(n,function(t){return Oa[t]})}var Fa,Ya,$a,za,Va,Ha,qa,Wa,Ua=/^@|^v-on:/,Ga=/^v-|^@|^:/,Ka=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Xa=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Ja=/^\(|\)$/g,Za=/^\[.*\]$/,Qa=/:(.*)$/,to=/^:|^\.|^v-bind:/,eo=/\.[^.\]]+(?=[^\]]*$)/g,no=/^v-slot(:|$)|^#/,ro=/[\r\n]/,io=/\s+/g,ao=x(function(t){return(fa=fa||document.createElement("div")).innerHTML=t,fa.textContent}),oo="_empty_";function so(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:function(t){for(var e={},n=0,r=t.length;n<r;n++)e[t[n].name]=t[n].value;return e}(e),rawAttrsMap:{},parent:n,children:[]}}function co(t,e){var n,r;(r=Nr(n=t,"key"))&&(n.key=r),t.plain=!t.key&&!t.scopedSlots&&!t.attrsList.length,function(t){var e=Nr(t,"ref");e&&(t.ref=e,t.refInFor=function(t){for(var e=t;e;){if(void 0!==e.for)return!0;e=e.parent}return!1}(t))}(t),function(t){var e;"template"===t.tag?(e=Br(t,"scope"),t.slotScope=e||Br(t,"slot-scope")):(e=Br(t,"slot-scope"))&&(t.slotScope=e);var n=Nr(t,"slot");if(n&&(t.slotTarget='""'===n?'"default"':n,t.slotTargetDynamic=!(!t.attrsMap[":slot"]&&!t.attrsMap["v-bind:slot"]),"template"===t.tag||t.slotScope||Rr(t,"slot",n,function(t,e){return t.rawAttrsMap[":"+e]||t.rawAttrsMap["v-bind:"+e]||t.rawAttrsMap[e]}(t,"slot"))),"template"===t.tag){var r=jr(t,no);if(r){var i=fo(r),a=i.name,o=i.dynamic;t.slotTarget=a,t.slotTargetDynamic=o,t.slotScope=r.value||oo}}else{var s=jr(t,no);if(s){var c=t.scopedSlots||(t.scopedSlots={}),u=fo(s),l=u.name,d=u.dynamic,f=c[l]=so("template",[],t);f.slotTarget=l,f.slotTargetDynamic=d,f.children=t.children.filter(function(t){if(!t.slotScope)return t.parent=f,!0}),f.slotScope=s.value||oo,t.children=[],t.plain=!1}}}(t),function(t){"slot"===t.tag&&(t.slotName=Nr(t,"name"))}(t),function(t){var e;(e=Nr(t,"is"))&&(t.component=e),null!=Br(t,"inline-template")&&(t.inlineTemplate=!0)}(t);for(var i=0;i<$a.length;i++)t=$a[i](t,e)||t;return function(t){var e,n,r,i,a,o,s,c,u=t.attrsList;for(e=0,n=u.length;e<n;e++)if(r=i=u[e].name,a=u[e].value,Ga.test(r))if(t.hasBindings=!0,(o=ho(r.replace(Ga,"")))&&(r=r.replace(eo,"")),to.test(r))r=r.replace(to,""),a=Sr(a),(c=Za.test(r))&&(r=r.slice(1,-1)),o&&(o.prop&&!c&&"innerHtml"===(r=k(r))&&(r="innerHTML"),o.camel&&!c&&(r=k(r)),o.sync&&(s=$r(a,"$event"),c?Ar(t,'"update:"+('+r+")",s,null,!1,0,u[e],!0):(Ar(t,"update:"+k(r),s,null,!1,0,u[e]),S(r)!==k(r)&&Ar(t,"update:"+S(r),s,null,!1,0,u[e])))),o&&o.prop||!t.component&&qa(t.tag,t.attrsMap.type,r)?Dr(t,r,a,u[e],c):Rr(t,r,a,u[e],c);else if(Ua.test(r))r=r.replace(Ua,""),(c=Za.test(r))&&(r=r.slice(1,-1)),Ar(t,r,a,o,!1,0,u[e],c);else{var l=(r=r.replace(Ga,"")).match(Qa),d=l&&l[1];c=!1,d&&(r=r.slice(0,-(d.length+1)),Za.test(d)&&(d=d.slice(1,-1),c=!0)),Or(t,r,i,a,d,c,o,u[e])}else Rr(t,r,JSON.stringify(a),u[e]),!t.component&&"muted"===r&&qa(t.tag,t.attrsMap.type,r)&&Dr(t,r,"true",u[e])}(t),t}function uo(t){var e;if(e=Br(t,"v-for")){var n=function(t){var e=t.match(Ka);if(e){var n={};n.for=e[2].trim();var r=e[1].trim().replace(Ja,""),i=r.match(Xa);return i?(n.alias=r.replace(Xa,"").trim(),n.iterator1=i[1].trim(),i[2]&&(n.iterator2=i[2].trim())):n.alias=r,n}}(e);n&&T(t,n)}}function lo(t,e){t.ifConditions||(t.ifConditions=[]),t.ifConditions.push(e)}function fo(t){var e=t.name.replace(no,"");return e||"#"!==t.name[0]&&(e="default"),Za.test(e)?{name:e.slice(1,-1),dynamic:!0}:{name:'"'+e+'"',dynamic:!1}}function ho(t){var e=t.match(eo);if(e){var n={};return e.forEach(function(t){n[t.slice(1)]=!0}),n}}var po=/^xmlns:NS\d+/,mo=/^NS\d+:/;function vo(t){return so(t.tag,t.attrsList.slice(),t.parent)}var _o,go,bo=[va,_a,{preTransformNode:function(t,e){if("input"===t.tag){var n,r=t.attrsMap;if(!r["v-model"])return;if((r[":type"]||r["v-bind:type"])&&(n=Nr(t,"type")),r.type||n||!r["v-bind"]||(n="("+r["v-bind"]+").type"),n){var i=Br(t,"v-if",!0),a=i?"&&("+i+")":"",o=null!=Br(t,"v-else",!0),s=Br(t,"v-else-if",!0),c=vo(t);uo(c),Pr(c,"type","checkbox"),co(c,e),c.processed=!0,c.if="("+n+")==='checkbox'"+a,lo(c,{exp:c.if,block:c});var u=vo(t);Br(u,"v-for",!0),Pr(u,"type","radio"),co(u,e),lo(c,{exp:"("+n+")==='radio'"+a,block:u});var l=vo(t);return Br(l,"v-for",!0),Pr(l,":type",n),co(l,e),lo(c,{exp:i,block:l}),o?c.else=!0:s&&(c.elseif=s),c}}}}],yo={expectHTML:!0,modules:bo,directives:{model:function(t,e,n){var r=e.value,i=e.modifiers,a=t.tag,o=t.attrsMap.type;if(t.component)return Yr(t,r,i),!1;if("select"===a)!function(t,e,n){var r='var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(i&&i.number?"_n(val)":"val")+"});";Ar(t,"change",r=r+" "+$r(e,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),null,!0)}(t,r);else if("input"===a&&"checkbox"===o)!function(t,e,n){var r=n&&n.number,i=Nr(t,"value")||"null",a=Nr(t,"true-value")||"true",o=Nr(t,"false-value")||"false";Dr(t,"checked","Array.isArray("+e+")?_i("+e+","+i+")>-1"+("true"===a?":("+e+")":":_q("+e+","+a+")")),Ar(t,"change","var $$a="+e+",$$el=$event.target,$$c=$$el.checked?("+a+"):("+o+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+$r(e,"$$a.concat([$$v])")+")}else{$$i>-1&&("+$r(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+$r(e,"$$c")+"}",null,!0)}(t,r,i);else if("input"===a&&"radio"===o)!function(t,e,n){var r=n&&n.number,i=Nr(t,"value")||"null";Dr(t,"checked","_q("+e+","+(i=r?"_n("+i+")":i)+")"),Ar(t,"change",$r(e,i),null,!0)}(t,r,i);else if("input"===a||"textarea"===a)!function(t,e,n){var r=t.attrsMap.type,i=n||{},a=i.lazy,o=i.number,s=i.trim,c=!a&&"range"!==r,u=a?"change":"range"===r?Gr:"input",l="$event.target.value";s&&(l="$event.target.value.trim()"),o&&(l="_n("+l+")");var d=$r(e,l);c&&(d="if($event.target.composing)return;"+d),Dr(t,"value","("+e+")"),Ar(t,u,d,null,!0),(s||o)&&Ar(t,"blur","$forceUpdate()")}(t,r,i);else if(!Y.isReservedTag(a))return Yr(t,r,i),!1;return!0},text:function(t,e){e.value&&Dr(t,"textContent","_s("+e.value+")",e)},html:function(t,e){e.value&&Dr(t,"innerHTML","_s("+e.value+")",e)}},isPreTag:function(t){return"pre"===t},isUnaryTag:ga,mustUseProp:On,canBeLeftOpenTag:ba,isReservedTag:Gn,getTagNamespace:Kn,staticKeys:bo.reduce(function(t,e){return t.concat(e.staticKeys||[])},[]).join(",")},xo=x(function(t){return m("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(t?","+t:""))});var wo=/^([\w$_]+|\([^)]*?\))\s*=>|^function\s*(?:[\w$]+)?\s*\(/,ko=/\([^)]*?\);*$/,Co=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Eo={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},So={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Io=function(t){return"if("+t+")return null;"},Mo={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Io("$event.target !== $event.currentTarget"),ctrl:Io("!$event.ctrlKey"),shift:Io("!$event.shiftKey"),alt:Io("!$event.altKey"),meta:Io("!$event.metaKey"),left:Io("'button' in $event && $event.button !== 0"),middle:Io("'button' in $event && $event.button !== 1"),right:Io("'button' in $event && $event.button !== 2")};function To(t,e){var n=e?"nativeOn:":"on:",r="",i="";for(var a in t){var o=Do(t[a]);t[a]&&t[a].dynamic?i+=a+","+o+",":r+='"'+a+'":'+o+","}return r="{"+r.slice(0,-1)+"}",i?n+"_d("+r+",["+i.slice(0,-1)+"])":n+r}function Do(t){if(!t)return"function(){}";if(Array.isArray(t))return"["+t.map(function(t){return Do(t)}).join(",")+"]";var e=Co.test(t.value),n=wo.test(t.value),r=Co.test(t.value.replace(ko,""));if(t.modifiers){var i="",a="",o=[];for(var s in t.modifiers)if(Mo[s])a+=Mo[s],Eo[s]&&o.push(s);else if("exact"===s){var c=t.modifiers;a+=Io(["ctrl","shift","alt","meta"].filter(function(t){return!c[t]}).map(function(t){return"$event."+t+"Key"}).join("||"))}else o.push(s);return o.length&&(i+="if(!$event.type.indexOf('key')&&"+o.map(Ro).join("&&")+")return null;"),a&&(i+=a),"function($event){"+i+(e?"return "+t.value+"($event)":n?"return ("+t.value+")($event)":r?"return "+t.value:t.value)+"}"}return e||n?t.value:"function($event){"+(r?"return "+t.value:t.value)+"}"}function Ro(t){var e=parseInt(t,10);if(e)return"$event.keyCode!=="+e;var n=Eo[t],r=So[t];return"_k($event.keyCode,"+JSON.stringify(t)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var Po={on:function(t,e){t.wrapListeners=function(t){return"_g("+t+","+e.value+")"}},bind:function(t,e){t.wrapData=function(n){return"_b("+n+",'"+t.tag+"',"+e.value+","+(e.modifiers&&e.modifiers.prop?"true":"false")+(e.modifiers&&e.modifiers.sync?",true":"")+")"}},cloak:R},Oo=function(t){this.options=t,this.warn=t.warn||Mr,this.transforms=Tr(t.modules,"transformCode"),this.dataGenFns=Tr(t.modules,"genData"),this.directives=T(T({},Po),t.directives);var e=t.isReservedTag||P;this.maybeComponent=function(t){return!!t.component||!e(t.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function Lo(t,e){var n=new Oo(e);return{render:"with(this){return "+(t?Ao(t,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function Ao(t,e){if(t.parent&&(t.pre=t.pre||t.parent.pre),t.staticRoot&&!t.staticProcessed)return No(t,e);if(t.once&&!t.onceProcessed)return Bo(t,e);if(t.for&&!t.forProcessed)return Fo(t,e);if(t.if&&!t.ifProcessed)return jo(t,e);if("template"!==t.tag||t.slotTarget||e.pre){if("slot"===t.tag)return function(t,e){var n=t.slotName||'"default"',r=Vo(t,e),i="_t("+n+(r?","+r:""),a=t.attrs||t.dynamicAttrs?Wo((t.attrs||[]).concat(t.dynamicAttrs||[]).map(function(t){return{name:k(t.name),value:t.value,dynamic:t.dynamic}})):null,o=t.attrsMap["v-bind"];return!a&&!o||r||(i+=",null"),a&&(i+=","+a),o&&(i+=(a?"":",null")+","+o),i+")"}(t,e);var n;if(t.component)n=function(t,e,n){var r=e.inlineTemplate?null:Vo(e,n,!0);return"_c("+t+","+Yo(e,n)+(r?","+r:"")+")"}(t.component,t,e);else{var r;(!t.plain||t.pre&&e.maybeComponent(t))&&(r=Yo(t,e));var i=t.inlineTemplate?null:Vo(t,e,!0);n="_c('"+t.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var a=0;a<e.transforms.length;a++)n=e.transforms[a](t,n);return n}return Vo(t,e)||"void 0"}function No(t,e){t.staticProcessed=!0;var n=e.pre;return t.pre&&(e.pre=t.pre),e.staticRenderFns.push("with(this){return "+Ao(t,e)+"}"),e.pre=n,"_m("+(e.staticRenderFns.length-1)+(t.staticInFor?",true":"")+")"}function Bo(t,e){if(t.onceProcessed=!0,t.if&&!t.ifProcessed)return jo(t,e);if(t.staticInFor){for(var n="",r=t.parent;r;){if(r.for){n=r.key;break}r=r.parent}return n?"_o("+Ao(t,e)+","+e.onceId+++","+n+")":Ao(t,e)}return No(t,e)}function jo(t,e,n,r){return t.ifProcessed=!0,function t(e,n,r,i){if(!e.length)return i||"_e()";var a=e.shift();return a.exp?"("+a.exp+")?"+o(a.block)+":"+t(e,n,r,i):""+o(a.block);function o(t){return r?r(t,n):t.once?Bo(t,n):Ao(t,n)}}(t.ifConditions.slice(),e,n,r)}function Fo(t,e,n,r){var i=t.for,a=t.alias,o=t.iterator1?","+t.iterator1:"",s=t.iterator2?","+t.iterator2:"";return t.forProcessed=!0,(r||"_l")+"(("+i+"),function("+a+o+s+"){return "+(n||Ao)(t,e)+"})"}function Yo(t,e){var n="{",r=function(t,e){var n=t.directives;if(n){var r,i,a,o,s="directives:[",c=!1;for(r=0,i=n.length;r<i;r++){a=n[r],o=!0;var u=e.directives[a.name];u&&(o=!!u(t,a,e.warn)),o&&(c=!0,s+='{name:"'+a.name+'",rawName:"'+a.rawName+'"'+(a.value?",value:("+a.value+"),expression:"+JSON.stringify(a.value):"")+(a.arg?",arg:"+(a.isDynamicArg?a.arg:'"'+a.arg+'"'):"")+(a.modifiers?",modifiers:"+JSON.stringify(a.modifiers):"")+"},")}return c?s.slice(0,-1)+"]":void 0}}(t,e);r&&(n+=r+","),t.key&&(n+="key:"+t.key+","),t.ref&&(n+="ref:"+t.ref+","),t.refInFor&&(n+="refInFor:true,"),t.pre&&(n+="pre:true,"),t.component&&(n+='tag:"'+t.tag+'",');for(var i=0;i<e.dataGenFns.length;i++)n+=e.dataGenFns[i](t);if(t.attrs&&(n+="attrs:"+Wo(t.attrs)+","),t.props&&(n+="domProps:"+Wo(t.props)+","),t.events&&(n+=To(t.events,!1)+","),t.nativeEvents&&(n+=To(t.nativeEvents,!0)+","),t.slotTarget&&!t.slotScope&&(n+="slot:"+t.slotTarget+","),t.scopedSlots&&(n+=function(t,e,n){var r=t.for||Object.keys(e).some(function(t){var n=e[t];return n.slotTargetDynamic||n.if||n.for||$o(n)}),i=!!t.if;if(!r)for(var a=t.parent;a;){if(a.slotScope&&a.slotScope!==oo||a.for){r=!0;break}a.if&&(i=!0),a=a.parent}var o=Object.keys(e).map(function(t){return zo(e[t],n)}).join(",");return"scopedSlots:_u(["+o+"]"+(r?",null,true":"")+(!r&&i?",null,false,"+function(t){for(var e=5381,n=t.length;n;)e=33*e^t.charCodeAt(--n);return e>>>0}(o):"")+")"}(t,t.scopedSlots,e)+","),t.model&&(n+="model:{value:"+t.model.value+",callback:"+t.model.callback+",expression:"+t.model.expression+"},"),t.inlineTemplate){var a=function(t,e){var n=t.children[0];if(n&&1===n.type){var r=Lo(n,e.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map(function(t){return"function(){"+t+"}"}).join(",")+"]}"}}(t,e);a&&(n+=a+",")}return n=n.replace(/,$/,"")+"}",t.dynamicAttrs&&(n="_b("+n+',"'+t.tag+'",'+Wo(t.dynamicAttrs)+")"),t.wrapData&&(n=t.wrapData(n)),t.wrapListeners&&(n=t.wrapListeners(n)),n}function $o(t){return 1===t.type&&("slot"===t.tag||t.children.some($o))}function zo(t,e){var n=t.attrsMap["slot-scope"];if(t.if&&!t.ifProcessed&&!n)return jo(t,e,zo,"null");if(t.for&&!t.forProcessed)return Fo(t,e,zo);var r=t.slotScope===oo?"":String(t.slotScope),i="function("+r+"){return "+("template"===t.tag?t.if&&n?"("+t.if+")?"+(Vo(t,e)||"undefined")+":undefined":Vo(t,e)||"undefined":Ao(t,e))+"}",a=r?"":",proxy:true";return"{key:"+(t.slotTarget||'"default"')+",fn:"+i+a+"}"}function Vo(t,e,n,r,i){var a=t.children;if(a.length){var o=a[0];if(1===a.length&&o.for&&"template"!==o.tag&&"slot"!==o.tag){var s=n?e.maybeComponent(o)?",1":",0":"";return""+(r||Ao)(o,e)+s}var c=n?function(t,e){for(var n=0,r=0;r<t.length;r++){var i=t[r];if(1===i.type){if(Ho(i)||i.ifConditions&&i.ifConditions.some(function(t){return Ho(t.block)})){n=2;break}(e(i)||i.ifConditions&&i.ifConditions.some(function(t){return e(t.block)}))&&(n=1)}}return n}(a,e.maybeComponent):0,u=i||qo;return"["+a.map(function(t){return u(t,e)}).join(",")+"]"+(c?","+c:"")}}function Ho(t){return void 0!==t.for||"template"===t.tag||"slot"===t.tag}function qo(t,e){return 1===t.type?Ao(t,e):3===t.type&&t.isComment?(r=t,"_e("+JSON.stringify(r.text)+")"):"_v("+(2===(n=t).type?n.expression:Uo(JSON.stringify(n.text)))+")";var n,r}function Wo(t){for(var e="",n="",r=0;r<t.length;r++){var i=t[r],a=Uo(i.value);i.dynamic?n+=i.name+","+a+",":e+='"'+i.name+'":'+a+","}return e="{"+e.slice(0,-1)+"}",n?"_d("+e+",["+n.slice(0,-1)+"])":e}function Uo(t){return t.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function Go(t,e){try{return new Function(t)}catch(n){return e.push({err:n,code:t}),R}}new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b");var Ko,Xo,Jo=(Ko=function(t,e){var n=function(t,e){Fa=e.warn||Mr,Ha=e.isPreTag||P,qa=e.mustUseProp||P,Wa=e.getTagNamespace||P,e.isReservedTag,$a=Tr(e.modules,"transformNode"),za=Tr(e.modules,"preTransformNode"),Va=Tr(e.modules,"postTransformNode"),Ya=e.delimiters;var n,r,i=[],a=!1!==e.preserveWhitespace,o=e.whitespace,s=!1,c=!1;function u(t){if(l(t),s||t.processed||(t=co(t,e)),i.length||t===n||n.if&&(t.elseif||t.else)&&lo(n,{exp:t.elseif,block:t}),r&&!t.forbidden)if(t.elseif||t.else)o=t,(u=function(t){for(var e=t.length;e--;){if(1===t[e].type)return t[e];t.pop()}}(r.children))&&u.if&&lo(u,{exp:o.elseif,block:o});else{if(t.slotScope){var a=t.slotTarget||'"default"';(r.scopedSlots||(r.scopedSlots={}))[a]=t}r.children.push(t),t.parent=r}var o,u;t.children=t.children.filter(function(t){return!t.slotScope}),l(t),t.pre&&(s=!1),Ha(t.tag)&&(c=!1);for(var d=0;d<Va.length;d++)Va[d](t,e)}function l(t){if(!c)for(var e;(e=t.children[t.children.length-1])&&3===e.type&&" "===e.text;)t.children.pop()}return function(t,e){for(var n,r,i=[],a=e.expectHTML,o=e.isUnaryTag||P,s=e.canBeLeftOpenTag||P,c=0;t;){if(n=t,r&&Ra(r)){var u=0,l=r.toLowerCase(),d=Pa[l]||(Pa[l]=new RegExp("([\\s\\S]*?)(</"+l+"[^>]*>)","i")),f=t.replace(d,function(t,n,r){return u=r.length,Ra(l)||"noscript"===l||(n=n.replace(/<!\--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),Ba(l,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""});c+=t.length-f.length,t=f,S(l,c-u,c)}else{var h=t.indexOf("<");if(0===h){if(Ta.test(t)){var p=t.indexOf("--\x3e");if(p>=0){e.shouldKeepComment&&e.comment(t.substring(4,p),c,c+p+3),k(p+3);continue}}if(Da.test(t)){var m=t.indexOf("]>");if(m>=0){k(m+2);continue}}var v=t.match(Ma);if(v){k(v[0].length);continue}var _=t.match(Ia);if(_){var g=c;k(_[0].length),S(_[1],g,c);continue}var b=C();if(b){E(b),Ba(b.tagName,t)&&k(1);continue}}var y=void 0,x=void 0,w=void 0;if(h>=0){for(x=t.slice(h);!(Ia.test(x)||Ea.test(x)||Ta.test(x)||Da.test(x)||(w=x.indexOf("<",1))<0);)h+=w,x=t.slice(h);y=t.substring(0,h)}h<0&&(y=t),y&&k(y.length),e.chars&&y&&e.chars(y,c-y.length,c)}if(t===n){e.chars&&e.chars(t);break}}function k(e){c+=e,t=t.substring(e)}function C(){var e=t.match(Ea);if(e){var n,r,i={tagName:e[1],attrs:[],start:c};for(k(e[0].length);!(n=t.match(Sa))&&(r=t.match(wa)||t.match(xa));)r.start=c,k(r[0].length),r.end=c,i.attrs.push(r);if(n)return i.unarySlash=n[1],k(n[0].length),i.end=c,i}}function E(t){var n=t.tagName,c=t.unarySlash;a&&("p"===r&&ya(n)&&S(r),s(n)&&r===n&&S(n));for(var u=o(n)||!!c,l=t.attrs.length,d=new Array(l),f=0;f<l;f++){var h=t.attrs[f],p=h[3]||h[4]||h[5]||"",m="a"===n&&"href"===h[1]?e.shouldDecodeNewlinesForHref:e.shouldDecodeNewlines;d[f]={name:h[1],value:ja(p,m)}}u||(i.push({tag:n,lowerCasedTag:n.toLowerCase(),attrs:d,start:t.start,end:t.end}),r=n),e.start&&e.start(n,d,u,t.start,t.end)}function S(t,n,a){var o,s;if(null==n&&(n=c),null==a&&(a=c),t)for(s=t.toLowerCase(),o=i.length-1;o>=0&&i[o].lowerCasedTag!==s;o--);else o=0;if(o>=0){for(var u=i.length-1;u>=o;u--)e.end&&e.end(i[u].tag,n,a);i.length=o,r=o&&i[o-1].tag}else"br"===s?e.start&&e.start(t,[],!0,n,a):"p"===s&&(e.start&&e.start(t,[],!1,n,a),e.end&&e.end(t,n,a))}S()}(t,{warn:Fa,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldDecodeNewlinesForHref:e.shouldDecodeNewlinesForHref,shouldKeepComment:e.comments,outputSourceRange:e.outputSourceRange,start:function(t,a,o,l,d){var f=r&&r.ns||Wa(t);X&&"svg"===f&&(a=function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];po.test(r.name)||(r.name=r.name.replace(mo,""),e.push(r))}return e}(a));var h,p=so(t,a,r);f&&(p.ns=f),"style"!==(h=p).tag&&("script"!==h.tag||h.attrsMap.type&&"text/javascript"!==h.attrsMap.type)||it()||(p.forbidden=!0);for(var m=0;m<za.length;m++)p=za[m](p,e)||p;s||(function(t){null!=Br(t,"v-pre")&&(t.pre=!0)}(p),p.pre&&(s=!0)),Ha(p.tag)&&(c=!0),s?function(t){var e=t.attrsList,n=e.length;if(n)for(var r=t.attrs=new Array(n),i=0;i<n;i++)r[i]={name:e[i].name,value:JSON.stringify(e[i].value)},null!=e[i].start&&(r[i].start=e[i].start,r[i].end=e[i].end);else t.pre||(t.plain=!0)}(p):p.processed||(uo(p),function(t){var e=Br(t,"v-if");if(e)t.if=e,lo(t,{exp:e,block:t});else{null!=Br(t,"v-else")&&(t.else=!0);var n=Br(t,"v-else-if");n&&(t.elseif=n)}}(p),function(t){null!=Br(t,"v-once")&&(t.once=!0)}(p)),n||(n=p),o?u(p):(r=p,i.push(p))},end:function(t,e,n){var a=i[i.length-1];i.length-=1,r=i[i.length-1],u(a)},chars:function(t,e,n){if(r&&(!X||"textarea"!==r.tag||r.attrsMap.placeholder!==t)){var i,u,l,d=r.children;(t=c||t.trim()?"script"===(i=r).tag||"style"===i.tag?t:ao(t):d.length?o?"condense"===o&&ro.test(t)?"":" ":a?" ":"":"")&&(c||"condense"!==o||(t=t.replace(io," ")),!s&&" "!==t&&(u=function(t,e){var n=Ya?ma(Ya):ha;if(n.test(t)){for(var r,i,a,o=[],s=[],c=n.lastIndex=0;r=n.exec(t);){(i=r.index)>c&&(s.push(a=t.slice(c,i)),o.push(JSON.stringify(a)));var u=Sr(r[1].trim());o.push("_s("+u+")"),s.push({"@binding":u}),c=i+r[0].length}return c<t.length&&(s.push(a=t.slice(c)),o.push(JSON.stringify(a))),{expression:o.join("+"),tokens:s}}}(t))?l={type:2,expression:u.expression,tokens:u.tokens,text:t}:" "===t&&d.length&&" "===d[d.length-1].text||(l={type:3,text:t}),l&&d.push(l))}},comment:function(t,e,n){if(r){var i={type:3,text:t,isComment:!0};r.children.push(i)}}}),n}(t.trim(),e);!1!==e.optimize&&function(t,e){t&&(_o=xo(e.staticKeys||""),go=e.isReservedTag||P,function t(e){if(e.static=function(t){return 2!==t.type&&(3===t.type||!(!t.pre&&(t.hasBindings||t.if||t.for||v(t.tag)||!go(t.tag)||function(t){for(;t.parent;){if("template"!==(t=t.parent).tag)return!1;if(t.for)return!0}return!1}(t)||!Object.keys(t).every(_o))))}(e),1===e.type){if(!go(e.tag)&&"slot"!==e.tag&&null==e.attrsMap["inline-template"])return;for(var n=0,r=e.children.length;n<r;n++){var i=e.children[n];t(i),i.static||(e.static=!1)}if(e.ifConditions)for(var a=1,o=e.ifConditions.length;a<o;a++){var s=e.ifConditions[a].block;t(s),s.static||(e.static=!1)}}}(t),function t(e,n){if(1===e.type){if((e.static||e.once)&&(e.staticInFor=n),e.static&&e.children.length&&(1!==e.children.length||3!==e.children[0].type))return void(e.staticRoot=!0);if(e.staticRoot=!1,e.children)for(var r=0,i=e.children.length;r<i;r++)t(e.children[r],n||!!e.for);if(e.ifConditions)for(var a=1,o=e.ifConditions.length;a<o;a++)t(e.ifConditions[a].block,n)}}(t,!1))}(n,e);var r=Lo(n,e);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}},function(t){function e(e,n){var r=Object.create(t),i=[],a=[];if(n)for(var o in n.modules&&(r.modules=(t.modules||[]).concat(n.modules)),n.directives&&(r.directives=T(Object.create(t.directives||null),n.directives)),n)"modules"!==o&&"directives"!==o&&(r[o]=n[o]);r.warn=function(t,e,n){(n?a:i).push(t)};var s=Ko(e.trim(),r);return s.errors=i,s.tips=a,s}return{compile:e,compileToFunctions:function(t){var e=Object.create(null);return function(n,r,i){(r=T({},r)).warn,delete r.warn;var a=r.delimiters?String(r.delimiters)+n:n;if(e[a])return e[a];var o=t(n,r),s={},c=[];return s.render=Go(o.render,c),s.staticRenderFns=o.staticRenderFns.map(function(t){return Go(t,c)}),e[a]=s}}(e)}})(yo),Zo=(Jo.compile,Jo.compileToFunctions);function Qo(t){return(Xo=Xo||document.createElement("div")).innerHTML=t?'<a href="\n"/>':'<div a="\n"/>',Xo.innerHTML.indexOf("&#10;")>0}var ts=!!W&&Qo(!1),es=!!W&&Qo(!0),ns=x(function(t){var e=Zn(t);return e&&e.innerHTML}),rs=Cn.prototype.$mount;Cn.prototype.$mount=function(t,e){if((t=t&&Zn(t))===document.body||t===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=ns(r));else{if(!r.nodeType)return this;r=r.innerHTML}else t&&(r=function(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}(t));if(r){var i=Zo(r,{outputSourceRange:!1,shouldDecodeNewlines:ts,shouldDecodeNewlinesForHref:es,delimiters:n.delimiters,comments:n.comments},this),a=i.render,o=i.staticRenderFns;n.render=a,n.staticRenderFns=o}}return rs.call(this,t,e)},Cn.compile=Zo,t.exports=Cn}).call(e,n(20),n(107).setImmediate)},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,a,o,s,c=1,u={},l=!1,d=t.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(t);f=f&&f.setTimeout?f:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick(function(){p(t)})}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((a=new MessageChannel).port1.onmessage=function(t){p(t.data)},r=function(t){a.port2.postMessage(t)}):d&&"onreadystatechange"in d.createElement("script")?(i=d.documentElement,r=function(t){var e=d.createElement("script");e.onreadystatechange=function(){p(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(p,0,t)}:(o="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(o)&&p(+e.data.slice(o.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),r=function(e){t.postMessage(o+e,"*")}),f.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var i={callback:t,args:e};return u[c]=i,r(c),c++},f.clearImmediate=h}function h(t){delete u[t]}function p(t){if(l)setTimeout(p,0,t);else{var e=u[t];if(e){l=!0;try{!function(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(n,r)}}(e)}finally{h(t),l=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(e,n(20),n(26))},function(t,e,n){var r;"undefined"!=typeof self&&self,r=function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s="./src/index.ts")}({"./src/components/VAlert/VAlert.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_alerts.styl");var r=n("./src/components/VIcon/index.ts"),i=n("./src/mixins/colorable.ts"),a=n("./src/mixins/toggleable.ts"),o=n("./src/mixins/transitionable.ts"),s=n("./src/util/mixins.ts");e.default=Object(s.default)(i.default,a.default,o.default).extend({name:"v-alert",props:{dismissible:Boolean,icon:String,outline:Boolean,type:{type:String,validator:function(t){return["info","error","success","warning"].includes(t)}}},computed:{computedColor:function(){return this.type&&!this.color?this.type:this.color||"error"},computedIcon:function(){if(this.icon||!this.type)return this.icon;switch(this.type){case"info":return"$vuetify.icons.info";case"error":return"$vuetify.icons.error";case"success":return"$vuetify.icons.success";case"warning":return"$vuetify.icons.warning"}}},methods:{genIcon:function(){return this.computedIcon?this.$createElement(r.default,{class:"v-alert__icon"},this.computedIcon):null},genDismissible:function(){var t=this;return this.dismissible?this.$createElement("a",{class:"v-alert__dismissible",on:{click:function(){t.isActive=!1}}},[this.$createElement(r.default,{props:{right:!0}},"$vuetify.icons.cancel")]):null}},render:function(t){var e=[this.genIcon(),t("div",this.$slots.default),this.genDismissible()],n=t("div",(this.outline?this.setTextColor:this.setBackgroundColor)(this.computedColor,{staticClass:"v-alert",class:{"v-alert--outline":this.outline},directives:[{name:"show",value:this.isActive}],on:this.$listeners}),e);return this.transition?t("transition",{props:{name:this.transition,origin:this.origin,mode:this.mode}},[n]):n}})},"./src/components/VAlert/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VAlert/VAlert.ts");n.d(e,"VAlert",function(){return r.default}),e.default=r.default},"./src/components/VApp/VApp.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_app.styl");var r=n("./src/components/VApp/mixins/app-theme.js"),i=n("./src/mixins/themeable.ts"),a=n("./src/directives/resize.ts"),o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default={name:"v-app",directives:{Resize:a.default},mixins:[r.default,i.default],props:{id:{type:String,default:"app"},dark:Boolean},computed:{classes:function(){return o({"application--is-rtl":this.$vuetify.rtl},this.themeClasses)}},watch:{dark:function(){this.$vuetify.dark=this.dark}},mounted:function(){this.$vuetify.dark=this.dark},render:function(t){return t("div",{staticClass:"application",class:this.classes,attrs:{"data-app":!0},domProps:{id:this.id}},[t("div",{staticClass:"application--wrap"},this.$slots.default)])}}},"./src/components/VApp/index.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VApp/VApp.js");n.d(e,"VApp",function(){return r.default}),e.default=r.default},"./src/components/VApp/mixins/app-theme.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/util/theme.ts");e.default={data:function(){return{style:null}},computed:{parsedTheme:function(){return r.parse(this.$vuetify.theme)},generatedStyles:function(){var t,e=this.parsedTheme;return null!=this.$vuetify.options.themeCache&&null!=(t=this.$vuetify.options.themeCache.get(e))?t:(t=r.genStyles(e,this.$vuetify.options.customProperties),null!=this.$vuetify.options.minifyTheme&&(t=this.$vuetify.options.minifyTheme(t)),null!=this.$vuetify.options.themeCache&&this.$vuetify.options.themeCache.set(e,t),t)},vueMeta:function(){if(!1===this.$vuetify.theme)return{};var t={cssText:this.generatedStyles,id:"vuetify-theme-stylesheet",type:"text/css"};return this.$vuetify.options.cspNonce&&(t.nonce=this.$vuetify.options.cspNonce),{style:[t]}}},metaInfo:function(){return this.vueMeta},head:function(){return this.vueMeta},watch:{generatedStyles:function(){!this.meta&&this.applyTheme()}},created:function(){if(!1!==this.$vuetify.theme)if(this.$meta);else if("undefined"==typeof document&&this.$ssrContext){var t=this.$vuetify.options.cspNonce?' nonce="'+this.$vuetify.options.cspNonce+'"':"";this.$ssrContext.head=this.$ssrContext.head||"",this.$ssrContext.head+='<style type="text/css" id="vuetify-theme-stylesheet"'+t+">"+this.generatedStyles+"</style>"}else"undefined"!=typeof document&&(this.genStyle(),this.applyTheme())},methods:{applyTheme:function(){this.style&&(this.style.innerHTML=this.generatedStyles)},genStyle:function(){var t=document.getElementById("vuetify-theme-stylesheet");t||((t=document.createElement("style")).type="text/css",t.id="vuetify-theme-stylesheet",this.$vuetify.options.cspNonce&&t.setAttribute("nonce",this.$vuetify.options.cspNonce),document.head.appendChild(t)),this.style=t}}}},"./src/components/VAutocomplete/VAutocomplete.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_autocompletes.styl");var r=n("./src/components/VSelect/VSelect.js"),i=n("./src/components/VTextField/VTextField.js"),a=n("./src/util/helpers.ts"),o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},s=o({},r.defaultMenuProps,{offsetY:!0,offsetOverflow:!0,transition:!1});e.default=r.default.extend({name:"v-autocomplete",props:{allowOverflow:{type:Boolean,default:!0},browserAutocomplete:{type:String,default:"off"},filter:{type:Function,default:function(t,e,n){return n.toLocaleLowerCase().indexOf(e.toLocaleLowerCase())>-1}},hideNoData:Boolean,noFilter:Boolean,searchInput:{default:void 0},menuProps:{type:r.default.options.props.menuProps.type,default:function(){return s}},autoSelectFirst:{type:Boolean,default:!1}},data:function(t){return{attrsInput:null,lazySearch:t.searchInput}},computed:{classes:function(){return Object.assign({},r.default.options.computed.classes.call(this),{"v-autocomplete":!0,"v-autocomplete--is-selecting-index":this.selectedIndex>-1})},computedItems:function(){return this.filteredItems},selectedValues:function(){var t=this;return this.selectedItems.map(function(e){return t.getValue(e)})},hasDisplayedItems:function(){var t=this;return this.hideSelected?this.filteredItems.some(function(e){return!t.hasItem(e)}):this.filteredItems.length>0},currentRange:function(){return null==this.selectedItem?0:this.getText(this.selectedItem).toString().length},filteredItems:function(){var t=this;return!this.isSearching||this.noFilter||null==this.internalSearch?this.allItems:this.allItems.filter(function(e){return t.filter(e,t.internalSearch.toString(),t.getText(e).toString())})},internalSearch:{get:function(){return this.lazySearch},set:function(t){this.lazySearch=t,this.$emit("update:searchInput",t)}},isAnyValueAllowed:function(){return!1},isDirty:function(){return this.searchIsDirty||this.selectedItems.length>0},isSearching:function(){return this.multiple?this.searchIsDirty:this.searchIsDirty&&this.internalSearch!==this.getText(this.selectedItem)},menuCanShow:function(){return!!this.isFocused&&(this.hasDisplayedItems||!this.hideNoData)},$_menuProps:function(){var t=r.default.options.computed.$_menuProps.call(this);return t.contentClass=("v-autocomplete__content "+(t.contentClass||"")).trim(),o({},s,t)},searchIsDirty:function(){return null!=this.internalSearch&&""!==this.internalSearch},selectedItem:function(){var t=this;return this.multiple?null:this.selectedItems.find(function(e){return t.valueComparator(t.getValue(e),t.getValue(t.internalValue))})},listData:function(){var t=r.default.options.computed.listData.call(this);return Object.assign(t.props,{items:this.virtualizedItems,noFilter:this.noFilter||!this.isSearching||!this.filteredItems.length,searchInput:this.internalSearch}),t}},watch:{filteredItems:function(t){this.onFilteredItemsChanged(t)},internalValue:function(){this.setSearch()},isFocused:function(t){t?this.$refs.input&&this.$refs.input.select():this.updateSelf()},isMenuActive:function(t){!t&&this.hasSlot&&(this.lazySearch=null)},items:function(t,e){e&&e.length||!this.hideNoData||!this.isFocused||this.isMenuActive||!t.length||this.activateMenu()},searchInput:function(t){this.lazySearch=t},internalSearch:function(t){this.onInternalSearchChanged(t)},itemText:function(){this.updateSelf()}},created:function(){this.setSearch()},methods:{onFilteredItemsChanged:function(t){var e=this;this.setMenuIndex(-1),this.$nextTick(function(){e.setMenuIndex(t.length>0&&(1===t.length||e.autoSelectFirst)?0:-1)})},onInternalSearchChanged:function(t){this.updateMenuDimensions()},updateMenuDimensions:function(){this.isMenuActive&&this.$refs.menu&&this.$refs.menu.updateDimensions()},changeSelectedIndex:function(t){if(!this.searchIsDirty&&[a.keyCodes.backspace,a.keyCodes.left,a.keyCodes.right,a.keyCodes.delete].includes(t)){var e=this.selectedItems.length-1;if(t===a.keyCodes.left)this.selectedIndex=-1===this.selectedIndex?e:this.selectedIndex-1;else if(t===a.keyCodes.right)this.selectedIndex=this.selectedIndex>=e?-1:this.selectedIndex+1;else if(-1===this.selectedIndex)return void(this.selectedIndex=e);var n=this.selectedItems[this.selectedIndex];if([a.keyCodes.backspace,a.keyCodes.delete].includes(t)&&!this.getDisabled(n)){var r=this.selectedIndex===e?this.selectedIndex-1:this.selectedItems[this.selectedIndex+1]?this.selectedIndex:-1;-1===r?this.setValue(this.multiple?[]:void 0):this.selectItem(n),this.selectedIndex=r}}},clearableCallback:function(){this.internalSearch=void 0,r.default.options.methods.clearableCallback.call(this)},genInput:function(){var t=i.default.options.methods.genInput.call(this);return t.data.attrs.role="combobox",t.data.domProps.value=this.internalSearch,t},genSelections:function(){return this.hasSlot||this.multiple?r.default.options.methods.genSelections.call(this):[]},onClick:function(){this.isDisabled||(this.selectedIndex>-1?this.selectedIndex=-1:this.onFocus(),this.activateMenu())},onEnterDown:function(){},onInput:function(t){this.selectedIndex>-1||(t.target.value&&(this.activateMenu(),this.isAnyValueAllowed||this.setMenuIndex(0)),this.mask&&this.resetSelections(t.target),this.internalSearch=t.target.value,this.badInput=t.target.validity&&t.target.validity.badInput)},onKeyDown:function(t){var e=t.keyCode;r.default.options.methods.onKeyDown.call(this,t),this.changeSelectedIndex(e)},onTabDown:function(t){r.default.options.methods.onTabDown.call(this,t),this.updateSelf()},setSelectedItems:function(){r.default.options.methods.setSelectedItems.call(this),this.isFocused||this.setSearch()},setSearch:function(){var t=this;this.$nextTick(function(){t.internalSearch=t.multiple&&t.internalSearch&&t.isMenuActive?t.internalSearch:!t.selectedItems.length||t.multiple||t.hasSlot?null:t.getText(t.selectedItem)})},updateSelf:function(){this.updateAutocomplete()},updateAutocomplete:function(){(this.searchIsDirty||this.internalValue)&&(this.valueComparator(this.internalSearch,this.getValue(this.internalValue))||this.setSearch())},hasItem:function(t){return this.selectedValues.indexOf(this.getValue(t))>-1}}})},"./src/components/VAutocomplete/index.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VAutocomplete/VAutocomplete.js");n.d(e,"VAutocomplete",function(){return r.default}),e.default=r.default},"./src/components/VAvatar/VAvatar.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_avatars.styl");var r=n("./src/mixins/colorable.ts"),i=n("./src/util/helpers.ts"),a=n("./src/util/mixins.ts"),o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=Object(a.default)(r.default).extend({name:"v-avatar",functional:!0,props:{color:String,size:{type:[Number,String],default:48},tile:Boolean},render:function(t,e){var n=e.data,a=e.props,s=e.children;n.staticClass=("v-avatar "+(n.staticClass||"")).trim(),a.tile&&(n.staticClass+=" v-avatar--tile");var c=Object(i.convertToUnit)(a.size);return n.style=o({height:c,width:c},n.style),t("div",r.default.options.methods.setBackgroundColor(a.color,n),s)}})},"./src/components/VAvatar/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VAvatar/VAvatar.ts");n.d(e,"VAvatar",function(){return r.default}),e.default=r.default},"./src/components/VBadge/VBadge.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_badges.styl");var r=n("./src/mixins/colorable.ts"),i=n("./src/mixins/toggleable.ts"),a=n("./src/mixins/positionable.ts"),o=n("./src/mixins/transitionable.ts"),s=n("./src/util/mixins.ts");e.default=Object(s.default)(r.default,i.default,Object(a.factory)(["left","bottom"]),o.default).extend({name:"v-badge",props:{color:{type:String,default:"primary"},overlap:Boolean,transition:{type:String,default:"fab-transition"},value:{default:!0}},computed:{classes:function(){return{"v-badge--bottom":this.bottom,"v-badge--left":this.left,"v-badge--overlap":this.overlap}}},render:function(t){var e=this.$slots.badge&&[t("span",this.setBackgroundColor(this.color,{staticClass:"v-badge__badge",attrs:this.$attrs,directives:[{name:"show",value:this.isActive}]}),this.$slots.badge)];return t("span",{staticClass:"v-badge",class:this.classes},[this.$slots.default,t("transition",{props:{name:this.transition,origin:this.origin,mode:this.mode}},e)])}})},"./src/components/VBadge/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VBadge/VBadge.ts");n.d(e,"VBadge",function(){return r.default}),e.default=r.default},"./src/components/VBottomNav/VBottomNav.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_bottom-navs.styl");var r=n("./src/mixins/applicationable.ts"),i=n("./src/mixins/button-group.ts"),a=n("./src/mixins/colorable.ts"),o=n("./src/mixins/themeable.ts"),s=n("./src/util/mixins.ts");e.default=Object(s.default)(Object(r.default)("bottom",["height","value"]),a.default,o.default).extend({name:"v-bottom-nav",props:{active:[Number,String],mandatory:Boolean,height:{default:56,type:[Number,String],validator:function(t){return!isNaN(parseInt(t))}},shift:Boolean,value:null},computed:{classes:function(){return{"v-bottom-nav--absolute":this.absolute,"v-bottom-nav--fixed":!this.absolute&&(this.app||this.fixed),"v-bottom-nav--shift":this.shift,"v-bottom-nav--active":this.value}},computedHeight:function(){return parseInt(this.height)}},methods:{updateApplication:function(){return this.value?this.computedHeight:0},updateValue:function(t){this.$emit("update:active",t)}},render:function(t){return t(i.default,this.setBackgroundColor(this.color,{staticClass:"v-bottom-nav",class:this.classes,style:{height:parseInt(this.computedHeight)+"px"},props:{mandatory:Boolean(this.mandatory||void 0!==this.active),value:this.active},on:{change:this.updateValue}}),this.$slots.default)}})},"./src/components/VBottomNav/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VBottomNav/VBottomNav.ts");n.d(e,"VBottomNav",function(){return r.default}),e.default=r.default},"./src/components/VBottomSheet/VBottomSheet.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_bottom-sheets.styl");var r=n("./src/components/VDialog/VDialog.js"),i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default={name:"v-bottom-sheet",props:{disabled:Boolean,fullWidth:Boolean,hideOverlay:Boolean,inset:Boolean,lazy:Boolean,maxWidth:{type:[String,Number],default:"auto"},persistent:Boolean,value:null},render:function(t){var e=t("template",{slot:"activator"},this.$slots.activator),n=["v-bottom-sheet",this.inset?"v-bottom-sheet--inset":""].join(" ");return t(r.default,{attrs:i({},this.$props),on:i({},this.$listeners),props:{contentClass:n,noClickAnimation:!0,transition:"bottom-sheet-transition",value:this.value}},[e,this.$slots.default])}}},"./src/components/VBottomSheet/index.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VBottomSheet/VBottomSheet.js");n.d(e,"VBottomSheet",function(){return r.default}),e.default=r.default},"./src/components/VBreadcrumbs/VBreadcrumbs.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_breadcrumbs.styl");var r=n("./src/components/VBreadcrumbs/index.ts"),i=n("./src/mixins/themeable.ts"),a=n("./src/util/console.ts"),o=n("./src/util/mixins.ts"),s=function(){return(s=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=Object(o.default)(i.default).extend({name:"v-breadcrumbs",props:{divider:{type:String,default:"/"},items:{type:Array,default:function(){return[]}},large:Boolean,justifyCenter:Boolean,justifyEnd:Boolean},computed:{classes:function(){return s({"v-breadcrumbs--large":this.large,"justify-center":this.justifyCenter,"justify-end":this.justifyEnd},this.themeClasses)}},mounted:function(){this.justifyCenter&&Object(a.deprecate)("justify-center",'class="justify-center"',this),this.justifyEnd&&Object(a.deprecate)("justify-end",'class="justify-end"',this),this.$slots.default&&Object(a.deprecate)("default slot",':items and scoped slot "item"',this)},methods:{genChildren:function(){if(this.$slots.default){for(var t=[],e=!1,n=0;n<this.$slots.default.length;n++){var r=this.$slots.default[n];r.componentOptions&&"v-breadcrumbs-item"===r.componentOptions.Ctor.options.name?(e&&t.push(this.genDivider()),t.push(r),e=!0):t.push(r)}return t}},genDivider:function(){return this.$createElement(r.VBreadcrumbsDivider,this.$slots.divider?this.$slots.divider:this.divider)},genItems:function(){for(var t=[],e=!!this.$scopedSlots.item,n=[],i=0;i<this.items.length;i++){var a=this.items[i];n.push(a.text),e?t.push(this.$scopedSlots.item({item:a})):t.push(this.$createElement(r.VBreadcrumbsItem,{key:n.join("."),props:a},[a.text])),i<this.items.length-1&&t.push(this.genDivider())}return t}},render:function(t){var e=this.$slots.default?this.genChildren():this.genItems();return t("ul",{staticClass:"v-breadcrumbs",class:this.classes},e)}})},"./src/components/VBreadcrumbs/VBreadcrumbsItem.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/mixins/routable.ts"),i=n("./src/util/mixins.ts");e.default=Object(i.default)(r.default).extend({name:"v-breadcrumbs-item",props:{activeClass:{type:String,default:"v-breadcrumbs__item--disabled"}},computed:{classes:function(){var t;return(t={"v-breadcrumbs__item":!0})[this.activeClass]=this.disabled,t}},render:function(t){var e=this.generateRouteLink(this.classes);return t("li",[t(e.tag,e.data,this.$slots.default)])}})},"./src/components/VBreadcrumbs/index.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"VBreadcrumbsDivider",function(){return o});var r=n("./src/components/VBreadcrumbs/VBreadcrumbs.ts");n.d(e,"VBreadcrumbs",function(){return r.default});var i=n("./src/components/VBreadcrumbs/VBreadcrumbsItem.ts");n.d(e,"VBreadcrumbsItem",function(){return i.default});var a=n("./src/util/helpers.ts"),o=Object(a.createSimpleFunctional)("v-breadcrumbs__divider","li");e.default={$_vuetify_subcomponents:{VBreadcrumbs:r.default,VBreadcrumbsItem:i.default,VBreadcrumbsDivider:o}}},"./src/components/VBtn/VBtn.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_buttons.styl");var r=n("./src/util/mixins.ts"),i=n("./src/components/VProgressCircular/index.ts"),a=n("./src/mixins/colorable.ts"),o=n("./src/mixins/groupable.ts"),s=n("./src/mixins/positionable.ts"),c=n("./src/mixins/routable.ts"),u=n("./src/mixins/themeable.ts"),l=n("./src/mixins/toggleable.ts"),d=n("./src/util/helpers.ts"),f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h=function(){return(h=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},p=Object(r.default)(a.default,c.default,s.default,u.default,Object(o.factory)("btnToggle"),Object(l.factory)("inputValue"));e.default=p.extend().extend({name:"v-btn",props:{activeClass:{type:String,default:"v-btn--active"},block:Boolean,depressed:Boolean,fab:Boolean,flat:Boolean,icon:Boolean,large:Boolean,loading:Boolean,outline:Boolean,ripple:{type:[Boolean,Object],default:null},round:Boolean,small:Boolean,tag:{type:String,default:"button"},type:{type:String,default:"button"},value:null},computed:{classes:function(){var t;return h(((t={"v-btn":!0})[this.activeClass]=this.isActive,t["v-btn--absolute"]=this.absolute,t["v-btn--block"]=this.block,t["v-btn--bottom"]=this.bottom,t["v-btn--disabled"]=this.disabled,t["v-btn--flat"]=this.flat,t["v-btn--floating"]=this.fab,t["v-btn--fixed"]=this.fixed,t["v-btn--icon"]=this.icon,t["v-btn--large"]=this.large,t["v-btn--left"]=this.left,t["v-btn--loader"]=this.loading,t["v-btn--outline"]=this.outline,t["v-btn--depressed"]=this.depressed&&!this.flat||this.outline,t["v-btn--right"]=this.right,t["v-btn--round"]=this.round,t["v-btn--router"]=this.to,t["v-btn--small"]=this.small,t["v-btn--top"]=this.top,t),this.themeClasses)},computedRipple:function(){var t=!this.icon&&!this.fab||{circle:!0};return!this.disabled&&(null!==this.ripple?this.ripple:t)}},watch:{$route:"onRouteChange"},methods:{click:function(t){!this.fab&&t.detail&&this.$el.blur(),this.$emit("click",t),this.btnToggle&&this.toggle()},genContent:function(){return this.$createElement("div",{class:"v-btn__content"},this.$slots.default)},genLoader:function(){return this.$createElement("span",{class:"v-btn__loading"},this.$slots.loader||[this.$createElement(i.default,{props:{indeterminate:!0,size:23,width:2}})])},onRouteChange:function(){var t=this;if(this.to&&this.$refs.link){var e="_vnode.data.class."+this.activeClass;this.$nextTick(function(){Object(d.getObjectValueByPath)(t.$refs.link,e)&&t.toggle()})}}},render:function(t){var e=this.outline||this.flat||this.disabled?this.setTextColor:this.setBackgroundColor,n=this.generateRouteLink(this.classes),r=n.tag,i=n.data,a=[this.genContent(),this.loading&&this.genLoader()];return"button"===r&&(i.attrs.type=this.type),i.attrs.value=["string","number"].includes(f(this.value))?this.value:JSON.stringify(this.value),this.btnToggle&&(i.ref="link"),t(r,e(this.color,i),a)}})},"./src/components/VBtn/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VBtn/VBtn.ts");n.d(e,"VBtn",function(){return r.default}),e.default=r.default},"./src/components/VBtnToggle/VBtnToggle.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_button-toggle.styl");var r=n("./src/mixins/button-group.ts"),i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=r.default.extend({name:"v-btn-toggle",props:{activeClass:{type:String,default:"v-btn--active"}},computed:{classes:function(){return i({},r.default.options.computed.classes.call(this),{"v-btn-toggle":!0,"v-btn-toggle--only-child":1===this.selectedItems.length,"v-btn-toggle--selected":this.selectedItems.length>0})}}})},"./src/components/VBtnToggle/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VBtnToggle/VBtnToggle.ts");n.d(e,"VBtnToggle",function(){return r.default}),e.default=r.default},"./src/components/VCalendar/VCalendar.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VCalendar/mixins/calendar-base.ts"),i=n("./src/components/VCalendar/util/props.ts"),a=n("./src/components/VCalendar/util/timestamp.ts"),o=n("./src/components/VCalendar/VCalendarMonthly.ts"),s=n("./src/components/VCalendar/VCalendarDaily.ts"),c=n("./src/components/VCalendar/VCalendarWeekly.ts"),u=function(){return(u=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=r.default.extend({name:"v-calendar",props:u({},i.default.calendar,i.default.weeks,i.default.intervals),data:function(){return{lastStart:null,lastEnd:null}},computed:{parsedValue:function(){return Object(a.parseTimestamp)(this.value)||this.parsedStart||this.times.today},renderProps:function(){var t=this.parsedValue,e="div",n=this.maxDays,r=t,i=t;switch(this.type){case"month":e=o.default,r=Object(a.getStartOfMonth)(t),i=Object(a.getEndOfMonth)(t);break;case"week":e=s.default,r=this.getStartOfWeek(t),i=this.getEndOfWeek(t),n=7;break;case"day":e=s.default,n=1;break;case"4day":e=s.default,i=Object(a.relativeDays)(Object(a.copyTimestamp)(i),a.nextDay,4),Object(a.updateFormatted)(i),n=4;break;case"custom-weekly":e=c.default,r=this.parsedStart||t,i=this.parsedEnd;break;case"custom-daily":e=s.default,r=this.parsedStart||t,i=this.parsedEnd}return{component:e,start:r,end:i,maxDays:n}}},watch:{renderProps:"checkChange"},methods:{checkChange:function(){var t=this.renderProps,e=t.start,n=t.end;e===this.lastStart&&n===this.lastEnd||(this.lastStart=e,this.lastEnd=n,this.$emit("change",{start:e,end:n}))},move:function(t){void 0===t&&(t=1);for(var e=Object(a.copyTimestamp)(this.parsedValue),n=t>0,r=n?a.nextDay:a.prevDay,i=n?a.DAYS_IN_MONTH_MAX:a.DAY_MIN,o=n?t:-t;--o>=0;)switch(this.type){case"month":e.day=i,r(e);break;case"week":Object(a.relativeDays)(e,r,a.DAYS_IN_WEEK);break;case"day":r(e);break;case"4day":Object(a.relativeDays)(e,r,4)}Object(a.updateWeekday)(e),Object(a.updateFormatted)(e),Object(a.updateRelative)(e,this.times.now),this.$emit("input",e.date),this.$emit("moved",e)},next:function(t){void 0===t&&(t=1),this.move(t)},prev:function(t){void 0===t&&(t=1),this.move(-t)},timeToY:function(t,e){void 0===e&&(e=!0);var n=this.$children[0];return!(!n||!n.timeToY)&&n.timeToY(t,e)},minutesToPixels:function(t){var e=this.$children[0];return e&&e.minutesToPixels?e.minutesToPixels(t):-1},scrollToTime:function(t){var e=this.$children[0];return!(!e||!e.scrollToTime)&&e.scrollToTime(t)}},render:function(t){var e=this,n=this.renderProps,r=n.start,i=n.end,a=n.maxDays;return t(n.component,{staticClass:"v-calendar",props:u({},this.$props,{start:r.date,end:i.date,maxDays:a}),on:u({},this.$listeners,{"click:date":function(t){e.$listeners.input&&e.$emit("input",t.date),e.$listeners["click:date"]&&e.$emit("click:date",t)}}),scopedSlots:this.$scopedSlots})}})},"./src/components/VCalendar/VCalendarDaily.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_calendar-daily.styl");var r=n("./src/directives/resize.ts"),i=n("./src/components/VCalendar/mixins/calendar-with-intervals.ts"),a=n("./src/util/helpers.ts"),o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},s=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},c=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t};e.default=i.default.extend({name:"v-calendar-daily",directives:{Resize:r.default},data:function(){return{scrollPush:0}},computed:{classes:function(){return o({"v-calendar-daily":!0},this.themeClasses)}},mounted:function(){this.init()},methods:{init:function(){this.$nextTick(this.onResize)},onResize:function(){this.scrollPush=this.getScrollPush()},getScrollPush:function(){var t=this.$refs.scrollArea,e=this.$refs.pane;return t&&e?t.offsetWidth-e.offsetWidth:0},genHead:function(){return this.$createElement("div",{staticClass:"v-calendar-daily__head",style:{marginRight:this.scrollPush+"px"}},c([this.genHeadIntervals()],this.genHeadDays()))},genHeadIntervals:function(){return this.$createElement("div",{staticClass:"v-calendar-daily__intervals-head"})},genHeadDays:function(){return this.days.map(this.genHeadDay)},genHeadDay:function(t){var e=this,n=this.$scopedSlots.dayHeader;return this.$createElement("div",{key:t.date,staticClass:"v-calendar-daily_head-day",class:this.getRelativeClasses(t),on:this.getDefaultMouseEventHandlers(":day",function(n){return e.getSlotScope(t)})},[this.genHeadWeekday(t),this.genHeadDayLabel(t),n?n(t):""])},genHeadWeekday:function(t){var e=t.present?this.color:void 0;return this.$createElement("div",this.setTextColor(e,{staticClass:"v-calendar-daily_head-weekday"}),this.weekdayFormatter(t,this.shortWeekdays))},genHeadDayLabel:function(t){var e=t.present?this.color:void 0;return this.$createElement("div",this.setTextColor(e,{staticClass:"v-calendar-daily_head-day-label",on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return t})}),this.dayFormatter(t,!1))},genBody:function(){return this.$createElement("div",{staticClass:"v-calendar-daily__body"},[this.genScrollArea()])},genScrollArea:function(){return this.$createElement("div",{ref:"scrollArea",staticClass:"v-calendar-daily__scroll-area"},[this.genPane()])},genPane:function(){return this.$createElement("div",{ref:"pane",staticClass:"v-calendar-daily__pane",style:{height:Object(a.convertToUnit)(this.bodyHeight)}},[this.genDayContainer()])},genDayContainer:function(){return this.$createElement("div",{staticClass:"v-calendar-daily__day-container"},c([this.genBodyIntervals()],this.genDays()))},genDays:function(){return this.days.map(this.genDay)},genDay:function(t,e){var n=this,r=this.$scopedSlots.dayBody,i=this.getSlotScope(t);return this.$createElement("div",{key:t.date,staticClass:"v-calendar-daily__day",class:this.getRelativeClasses(t),on:this.getDefaultMouseEventHandlers(":time",function(e){return n.getSlotScope(n.getTimestampAtEvent(e,t))})},c(this.genDayIntervals(e),[r?r(i):""]))},genDayIntervals:function(t){return this.intervals[t].map(this.genDayInterval)},genDayInterval:function(t){var e=Object(a.convertToUnit)(this.intervalHeight),n=this.intervalStyle||this.intervalStyleDefault,r=this.$scopedSlots.interval,i=this.getSlotScope(t),s={key:t.time,staticClass:"v-calendar-daily__day-interval",style:o({height:e},n(t))},c=r?r(i):void 0;return this.$createElement("div",s,c)},genBodyIntervals:function(){var t=this,e={staticClass:"v-calendar-daily__intervals-body",on:this.getDefaultMouseEventHandlers(":interval",function(e){return t.getTimestampAtEvent(e,t.parsedStart)})};return this.$createElement("div",e,this.genIntervalLabels())},genIntervalLabels:function(){return this.intervals[0].map(this.genIntervalLabel)},genIntervalLabel:function(t){var e=Object(a.convertToUnit)(this.intervalHeight),n=this.shortIntervals,r=(this.showIntervalLabel||this.showIntervalLabelDefault)(t)?this.intervalFormatter(t,n):void 0;return this.$createElement("div",{key:t.time,staticClass:"v-calendar-daily__interval",style:{height:e}},[this.$createElement("div",{staticClass:"v-calendar-daily__interval-text"},r)])}},render:function(t){return t("div",{class:this.classes,nativeOn:{dragstart:function(t){t.preventDefault()}},directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}]},[this.hideHeader?"":this.genHead(),this.genBody()])}})},"./src/components/VCalendar/VCalendarMonthly.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_calendar-weekly.styl");var r=n("./src/components/VCalendar/VCalendarWeekly.ts"),i=n("./src/components/VCalendar/util/timestamp.ts");e.default=r.default.extend({name:"v-calendar-monthly",computed:{staticClass:function(){return"v-calendar-monthly v-calendar-weekly"},parsedStart:function(){return Object(i.getStartOfMonth)(Object(i.parseTimestamp)(this.start))},parsedEnd:function(){return Object(i.getEndOfMonth)(Object(i.parseTimestamp)(this.end))}}})},"./src/components/VCalendar/VCalendarWeekly.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_calendar-weekly.styl");var r=n("./src/components/VCalendar/mixins/calendar-base.ts"),i=n("./src/components/VCalendar/util/props.ts"),a=n("./src/components/VCalendar/util/timestamp.ts"),o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},s=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},c=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t};e.default=r.default.extend({name:"v-calendar-weekly",props:i.default.weeks,computed:{staticClass:function(){return"v-calendar-weekly"},classes:function(){return this.themeClasses},parsedMinWeeks:function(){return parseInt(this.minWeeks)},days:function(){var t=this.parsedMinWeeks*this.weekdays.length,e=this.getStartOfWeek(this.parsedStart),n=this.getEndOfWeek(this.parsedEnd);return Object(a.createDayList)(e,n,this.times.today,this.weekdaySkips,Number.MAX_SAFE_INTEGER,t)},todayWeek:function(){var t=this.times.today,e=this.getStartOfWeek(t),n=this.getEndOfWeek(t);return Object(a.createDayList)(e,n,t,this.weekdaySkips,this.weekdays.length,this.weekdays.length)},monthFormatter:function(){if(this.monthFormat)return this.monthFormat;var t={timeZone:"UTC",month:"long"},e={timeZone:"UTC",month:"short"};return Object(a.createNativeLocaleFormatter)(this.locale,function(n,r){return r?e:t})}},methods:{isOutside:function(t){var e=Object(a.getDayIdentifier)(t);return e<Object(a.getDayIdentifier)(this.parsedStart)||e>Object(a.getDayIdentifier)(this.parsedEnd)},genHead:function(){return this.$createElement("div",{staticClass:"v-calendar-weekly__head"},this.genHeadDays())},genHeadDays:function(){return this.todayWeek.map(this.genHeadDay)},genHeadDay:function(t,e){var n=this.isOutside(this.days[e]),r=t.present?this.color:void 0;return this.$createElement("div",this.setTextColor(r,{key:t.date,staticClass:"v-calendar-weekly__head-weekday",class:this.getRelativeClasses(t,n)}),this.weekdayFormatter(t,this.shortWeekdays))},genWeeks:function(){for(var t=this.days,e=this.weekdays.length,n=[],r=0;r<t.length;r+=e)n.push(this.genWeek(t.slice(r,r+e)));return n},genWeek:function(t){return this.$createElement("div",{key:t[0].date,staticClass:"v-calendar-weekly__week"},t.map(this.genDay))},genDay:function(t){var e=this.isOutside(t),n=this.$scopedSlots.day,r=o({outside:e},t),i=1===t.day&&this.showMonthOnFirst;return this.$createElement("div",{key:t.date,staticClass:"v-calendar-weekly__day",class:this.getRelativeClasses(t,e),on:this.getDefaultMouseEventHandlers(":day",function(e){return t})},[this.genDayLabel(t),i?this.genDayMonth(t):"",n?n(r):""])},genDayLabel:function(t){var e=t.present?this.color:void 0,n=this.$scopedSlots.dayLabel;return this.$createElement("div",this.setTextColor(e,{staticClass:"v-calendar-weekly__day-label",on:this.getMouseEventHandlers({"click:date":{event:"click",stop:!0},"contextmenu:date":{event:"contextmenu",stop:!0,prevent:!0,result:!1}},function(e){return t})}),n?n(t):this.dayFormatter(t,!1))},genDayMonth:function(t){var e=t.present?this.color:void 0,n=this.$scopedSlots.dayMonth;return this.$createElement("div",this.setTextColor(e,{staticClass:"v-calendar-weekly__day-month"}),n?n(t):this.monthFormatter(t,this.shortMonths))}},render:function(t){return t("div",{staticClass:this.staticClass,class:this.classes,nativeOn:{dragstart:function(t){t.preventDefault()}}},c([this.hideHeader?"":this.genHead()],this.genWeeks()))}})},"./src/components/VCalendar/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VCalendar/VCalendar.ts");n.d(e,"VCalendar",function(){return r.default});var i=n("./src/components/VCalendar/VCalendarDaily.ts");n.d(e,"VCalendarDaily",function(){return i.default});var a=n("./src/components/VCalendar/VCalendarWeekly.ts");n.d(e,"VCalendarWeekly",function(){return a.default});var o=n("./src/components/VCalendar/VCalendarMonthly.ts");n.d(e,"VCalendarMonthly",function(){return o.default}),e.default={$_vuetify_subcomponents:{VCalendar:r.default,VCalendarDaily:i.default,VCalendarWeekly:a.default,VCalendarMonthly:o.default}}},"./src/components/VCalendar/mixins/calendar-base.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/util/mixins.ts"),i=n("./src/mixins/themeable.ts"),a=n("./src/mixins/colorable.ts"),o=n("./src/components/VCalendar/mixins/times.ts"),s=n("./src/components/VCalendar/mixins/mouse.ts"),c=n("./src/components/VCalendar/util/props.ts"),u=n("./src/components/VCalendar/util/timestamp.ts");e.default=Object(r.default)(a.default,i.default,o.default,s.default).extend({name:"calendar-base",props:c.default.base,computed:{weekdaySkips:function(){return Object(u.getWeekdaySkips)(this.weekdays)},parsedStart:function(){return Object(u.parseTimestamp)(this.start)},parsedEnd:function(){return Object(u.parseTimestamp)(this.end)},days:function(){return Object(u.createDayList)(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips)},dayFormatter:function(){if(this.dayFormat)return this.dayFormat;var t={timeZone:"UTC",day:"numeric"};return Object(u.createNativeLocaleFormatter)(this.locale,function(e,n){return t})},weekdayFormatter:function(){if(this.weekdayFormat)return this.weekdayFormat;var t={timeZone:"UTC",weekday:"long"},e={timeZone:"UTC",weekday:"short"};return Object(u.createNativeLocaleFormatter)(this.locale,function(n,r){return r?e:t})}},methods:{getRelativeClasses:function(t,e){return void 0===e&&(e=!1),{"v-present":t.present,"v-past":t.past,"v-future":t.future,"v-outside":e}},getStartOfWeek:function(t){return Object(u.getStartOfWeek)(t,this.weekdays,this.times.today)},getEndOfWeek:function(t){return Object(u.getEndOfWeek)(t,this.weekdays,this.times.today)}}})},"./src/components/VCalendar/mixins/calendar-with-intervals.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VCalendar/mixins/calendar-base.ts"),i=n("./src/components/VCalendar/util/props.ts"),a=n("./src/components/VCalendar/util/timestamp.ts");e.default=r.default.extend({name:"calendar-with-intervals",props:i.default.intervals,computed:{parsedFirstInterval:function(){return parseInt(this.firstInterval)},parsedIntervalMinutes:function(){return parseInt(this.intervalMinutes)},parsedIntervalCount:function(){return parseInt(this.intervalCount)},parsedIntervalHeight:function(){return parseFloat(this.intervalHeight)},firstMinute:function(){return this.parsedFirstInterval*this.parsedIntervalMinutes},bodyHeight:function(){return this.parsedIntervalCount*this.parsedIntervalHeight},days:function(){return Object(a.createDayList)(this.parsedStart,this.parsedEnd,this.times.today,this.weekdaySkips,this.maxDays)},intervals:function(){var t=this.days,e=this.parsedFirstInterval,n=this.parsedIntervalMinutes,r=this.parsedIntervalCount,i=this.times.now;return t.map(function(t){return Object(a.createIntervalList)(t,e,n,r,i)})},intervalFormatter:function(){if(this.intervalFormat)return this.intervalFormat;var t={timeZone:"UTC",hour12:!0,hour:"2-digit",minute:"2-digit"},e={timeZone:"UTC",hour12:!0,hour:"numeric",minute:"2-digit"},n={timeZone:"UTC",hour12:!0,hour:"numeric"};return Object(a.createNativeLocaleFormatter)(this.locale,function(r,i){return i?0===r.minute?n:e:t})}},methods:{showIntervalLabelDefault:function(t){var e=this.intervals[0][0];return!(e.hour===t.hour&&e.minute===t.minute)&&0===t.minute},intervalStyleDefault:function(t){},getTimestampAtEvent:function(t,e){var n=Object(a.copyTimestamp)(e),r=t.currentTarget.getBoundingClientRect(),i=this.firstMinute,o=t,s=t,c=o.changedTouches||o.touches,u=((c&&c[0]?c[0].clientY:s.clientY)-r.top)/this.parsedIntervalHeight,l=i+Math.floor(u*this.parsedIntervalMinutes);return Object(a.updateMinutes)(n,l,this.times.now)},getSlotScope:function(t){var e=Object(a.copyTimestamp)(t);return e.timeToY=this.timeToY,e.minutesToPixels=this.minutesToPixels,e},scrollToTime:function(t){var e=this.timeToY(t),n=this.$refs.scrollArea;return!(!1===e||!n)&&(n.scrollTop=e,!0)},minutesToPixels:function(t){return t/this.parsedIntervalMinutes*this.parsedIntervalHeight},timeToY:function(t,e){void 0===e&&(e=!0);var n=Object(a.parseTime)(t);if(!1===n)return!1;var r=(n-this.firstMinute)/(this.parsedIntervalCount*this.parsedIntervalMinutes)*this.bodyHeight;return e&&(r<0&&(r=0),r>this.bodyHeight&&(r=this.bodyHeight)),r}}})},"./src/components/VCalendar/mixins/mouse.ts":function(t,e,n){"use strict";n.r(e);var r=n("vue"),i=n.n(r);e.default=i.a.extend({name:"mouse",methods:{getDefaultMouseEventHandlers:function(t,e){var n;return this.getMouseEventHandlers(((n={})["click"+t]={event:"click"},n["contextmenu"+t]={event:"contextmenu",prevent:!0,result:!1},n["mousedown"+t]={event:"mousedown"},n["mousemove"+t]={event:"mousemove"},n["mouseup"+t]={event:"mouseup"},n["mouseenter"+t]={event:"mouseenter"},n["mouseleave"+t]={event:"mouseleave"},n["touchstart"+t]={event:"touchstart"},n["touchmove"+t]={event:"touchmove"},n["touchend"+t]={event:"touchend"},n),e)},getMouseEventHandlers:function(t,e){var n=this,r={},i=function(i){var o=t[i];if(!a.$listeners[i])return"continue";var s=(o.passive?"&":(o.once?"~":"")+(o.capture?"!":""))+o.event,c=function(t){var r=t;return(void 0===o.button||r.buttons>0&&r.button===o.button)&&(o.prevent&&t.preventDefault(),o.stop&&t.stopPropagation(),n.$emit(i,e(t))),o.result};s in r?Array.isArray(r[s])?r[s].push(c):r[s]=[r[s],c]:r[s]=c},a=this;for(var o in t)i(o);return r}}})},"./src/components/VCalendar/mixins/times.ts":function(t,e,n){"use strict";n.r(e);var r=n("vue"),i=n.n(r),a=n("./src/components/VCalendar/util/timestamp.ts");e.default=i.a.extend({name:"times",props:{now:{type:String,validator:a.validateTimestamp}},data:function(){return{times:{now:Object(a.parseTimestamp)("0000-00-00 00:00"),today:Object(a.parseTimestamp)("0000-00-00")}}},computed:{parsedNow:function(){return this.now?Object(a.parseTimestamp)(this.now):null}},watch:{parsedNow:"updateTimes"},created:function(){this.updateTimes(),this.setPresent()},methods:{setPresent:function(){this.times.now.present=this.times.today.present=!0,this.times.now.past=this.times.today.past=!1,this.times.now.future=this.times.today.future=!1},updateTimes:function(){var t=this.parsedNow||this.getNow();this.updateDay(t,this.times.now),this.updateTime(t,this.times.now),this.updateDay(t,this.times.today)},getNow:function(){return Object(a.parseDate)(new Date)},updateDay:function(t,e){t.date!==e.date&&(e.year=t.year,e.month=t.month,e.day=t.day,e.weekday=t.weekday,e.date=t.date)},updateTime:function(t,e){t.time!==e.time&&(e.hour=t.hour,e.minute=t.minute,e.time=t.time)}}})},"./src/components/VCalendar/util/props.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VCalendar/util/timestamp.ts");function i(t){return isFinite(parseInt(t))}e.default={base:{start:{type:String,validate:r.validateTimestamp,default:function(){return Object(r.parseDate)(new Date).date}},end:{type:String,validate:r.validateTimestamp,default:"0000-00-00"},weekdays:{type:Array,default:function(){return[0,1,2,3,4,5,6]}},hideHeader:{type:Boolean,default:!1},shortWeekdays:{type:Boolean,default:!0},weekdayFormat:{type:Function,default:null},dayFormat:{type:Function,default:null},locale:{type:String,default:"en-us"}},intervals:{maxDays:{type:Number,default:7},shortIntervals:{type:Boolean,default:!0},intervalHeight:{type:[Number,String],default:40,validate:i},intervalMinutes:{type:[Number,String],default:60,validate:i},firstInterval:{type:[Number,String],default:0,validate:i},intervalCount:{type:[Number,String],default:24,validate:i},intervalFormat:{type:Function,default:null},intervalStyle:{type:Function,default:null},showIntervalLabel:{type:Function,default:null}},weeks:{minWeeks:{validate:i,default:1},shortMonths:{type:Boolean,default:!0},showMonthOnFirst:{type:Boolean,default:!0},monthFormat:{type:Function,default:null}},calendar:{type:{type:String,default:"month"},value:{type:String,validate:r.validateTimestamp}}}},"./src/components/VCalendar/util/timestamp.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"PARSE_REGEX",function(){return i}),n.d(e,"PARSE_TIME",function(){return a}),n.d(e,"DAYS_IN_MONTH",function(){return o}),n.d(e,"DAYS_IN_MONTH_LEAP",function(){return s}),n.d(e,"DAYS_IN_MONTH_MIN",function(){return c}),n.d(e,"DAYS_IN_MONTH_MAX",function(){return u}),n.d(e,"MONTH_MAX",function(){return l}),n.d(e,"MONTH_MIN",function(){return d}),n.d(e,"DAY_MIN",function(){return f}),n.d(e,"DAYS_IN_WEEK",function(){return h}),n.d(e,"MINUTES_IN_HOUR",function(){return p}),n.d(e,"HOURS_IN_DAY",function(){return m}),n.d(e,"FIRST_HOUR",function(){return v}),n.d(e,"getStartOfWeek",function(){return _}),n.d(e,"getEndOfWeek",function(){return g}),n.d(e,"getStartOfMonth",function(){return b}),n.d(e,"getEndOfMonth",function(){return y}),n.d(e,"parseTime",function(){return x}),n.d(e,"validateTimestamp",function(){return w}),n.d(e,"parseTimestamp",function(){return k}),n.d(e,"parseDate",function(){return C}),n.d(e,"getDayIdentifier",function(){return E}),n.d(e,"getTimeIdentifier",function(){return S}),n.d(e,"updateRelative",function(){return I}),n.d(e,"updateMinutes",function(){return M}),n.d(e,"updateWeekday",function(){return T}),n.d(e,"updateFormatted",function(){return D}),n.d(e,"getWeekday",function(){return R}),n.d(e,"isLeapYear",function(){return P}),n.d(e,"daysInMonth",function(){return O}),n.d(e,"copyTimestamp",function(){return L}),n.d(e,"padNumber",function(){return A}),n.d(e,"getDate",function(){return N}),n.d(e,"getTime",function(){return B}),n.d(e,"nextMinutes",function(){return j}),n.d(e,"nextDay",function(){return F}),n.d(e,"prevDay",function(){return Y}),n.d(e,"relativeDays",function(){return $}),n.d(e,"findWeekday",function(){return z}),n.d(e,"getWeekdaySkips",function(){return V}),n.d(e,"createDayList",function(){return H}),n.d(e,"createIntervalList",function(){return q}),n.d(e,"createNativeLocaleFormatter",function(){return W});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=/^(\d{4})-(\d{1,2})(-(\d{1,2}))?([^\d]+(\d{1,2}))?(:(\d{1,2}))?(:(\d{1,2}))?$/,a=/(\d\d?)(:(\d\d?)|)(:(\d\d?)|)/,o=[0,31,28,31,30,31,30,31,31,30,31,30,31],s=[0,31,29,31,30,31,30,31,31,30,31,30,31],c=28,u=31,l=12,d=1,f=1,h=7,p=60,m=24,v=0;function _(t,e,n){var r=L(t);return z(r,e[0],Y),D(r),n&&I(r,n,r.hasTime),r}function g(t,e,n){var r=L(t);return z(r,e[e.length-1]),D(r),n&&I(r,n,r.hasTime),r}function b(t){var e=L(t);return e.day=f,T(e),D(e),e}function y(t){var e=L(t);return e.day=O(e.year,e.month),T(e),D(e),e}function x(t){if("number"==typeof t)return t;if("string"==typeof t){var e=a.exec(t);return!!e&&60*parseInt(e[1])+parseInt(e[3]||0)}return"object"===(void 0===t?"undefined":r(t))&&("number"==typeof t.hour&&"number"==typeof t.minute&&60*t.hour+t.minute)}function w(t){return!!i.exec(t)}function k(t,e){var n=i.exec(t);if(!n)return null;var r={date:t,time:"",year:parseInt(n[1]),month:parseInt(n[2]),day:parseInt(n[4])||1,hour:parseInt(n[6])||0,minute:parseInt(n[8])||0,weekday:0,hasDay:!!n[4],hasTime:!(!n[6]||!n[8]),past:!1,present:!1,future:!1};return T(r),D(r),e&&I(r,e,r.hasTime),r}function C(t){return D({date:"",time:"",year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),weekday:t.getDay(),hour:t.getHours(),minute:t.getMinutes(),hasDay:!0,hasTime:!0,past:!1,present:!0,future:!1})}function E(t){return 1e4*t.year+100*t.month+t.day}function S(t){return 100*t.hour+t.minute}function I(t,e,n){void 0===n&&(n=!1);var r=E(e),i=E(t),a=r===i;return t.hasTime&&n&&a&&(a=(r=S(e))===(i=S(t))),t.past=i<r,t.present=a,t.future=i>r,t}function M(t,e,n){return t.hasTime=!0,t.hour=Math.floor(e/p),t.minute=e%p,t.time=B(t),n&&I(t,n,!0),t}function T(t){return t.weekday=R(t),t}function D(t){return t.time=B(t),t.date=N(t),t}function R(t){if(t.hasDay){var e=Math.floor,n=t.day,r=(t.month+9)%l+1,i=e(t.year/100),a=t.year%100-(t.month<=2?1:0);return((n+e(2.6*r-.2)-2*i+a+e(a/4)+e(i/4))%7+7)%7}return t.weekday}function P(t){return t%4==0&&t%100!=0||t%400==0}function O(t,e){return P(t)?s[e]:o[e]}function L(t){return{date:t.date,time:t.time,year:t.year,month:t.month,day:t.day,weekday:t.weekday,hour:t.hour,minute:t.minute,hasDay:t.hasDay,hasTime:t.hasTime,past:t.past,present:t.present,future:t.future}}function A(t,e){for(var n=String(t);n.length<e;)n="0"+n;return n}function N(t){var e=A(t.year,4)+"-"+A(t.month,2);return t.hasDay&&(e+="-"+A(t.day,2)),e}function B(t){return t.hasTime?A(t.hour,2)+":"+A(t.minute,2):""}function j(t,e){for(t.minute+=e;t.minute>p;)t.minute-=p,t.hour++,t.hour>=m&&(F(t),t.hour=v);return t}function F(t){return t.day++,t.weekday=(t.weekday+1)%h,t.day>c&&t.day>O(t.year,t.month)&&(t.day=f,t.month++,t.month>l&&(t.month=d,t.year++)),t}function Y(t){return t.day--,t.weekday=(t.weekday+6)%h,t.day<f&&(t.month--,t.month<d&&(t.year--,t.month=l),t.day=O(t.year,t.month)),t}function $(t,e,n){for(void 0===e&&(e=F),void 0===n&&(n=1);--n>=0;)e(t);return t}function z(t,e,n,r){for(void 0===n&&(n=F),void 0===r&&(r=6);t.weekday!==e&&--r>=0;)n(t);return t}function V(t){for(var e=[1,1,1,1,1,1,1],n=[0,0,0,0,0,0,0],r=0;r<t.length;r++)n[t[r]]=1;for(var i=0;i<h;i++){for(var a=1,o=1;o<h;o++){if(n[(i+o)%h])break;a++}e[i]=n[i]*a}return e}function H(t,e,n,r,i,a){void 0===i&&(i=42),void 0===a&&(a=0);var o=E(e),s=[],c=L(t),u=0,l=u===o;if(o<E(t))return s;for(;(!l||s.length<a)&&s.length<i;)if(u=E(c),l=l||u===o,0!==r[c.weekday]){var d=L(c);D(d),I(d,n),s.push(d),c=$(c,F,r[c.weekday])}else c=F(c);return s}function q(t,e,n,r,i){for(var a=[],o=0;o<r;o++){var s=(e+o)*n,c=L(t);a.push(M(c,s,i))}return a}function W(t,e){return"undefined"==typeof Intl||void 0===Intl.DateTimeFormat?function(t,e){return""}:function(n,r){try{var i=new Intl.DateTimeFormat(t||void 0,e(n,r)),a=A(n.hour,2)+":"+A(n.minute,2),o=n.date;return i.format(new Date(o+"T"+a+":00+00:00"))}catch(t){return""}}}},"./src/components/VCard/VCard.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_cards.styl");var r=n("./src/components/VSheet/index.ts"),i=n("./src/mixins/routable.ts"),a=n("./src/util/mixins.ts"),o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=Object(a.default)(i.default,r.default).extend({name:"v-card",props:{flat:Boolean,hover:Boolean,img:String,raised:Boolean},computed:{classes:function(){return o({"v-card":!0,"v-card--flat":this.flat,"v-card--hover":this.hover},r.default.options.computed.classes.call(this))},styles:function(){var t=o({},r.default.options.computed.styles.call(this));return this.img&&(t.background='url("'+this.img+'") center center / cover no-repeat'),t}},render:function(t){var e=this.generateRouteLink(this.classes),n=e.tag,r=e.data;return r.style=this.styles,t(n,this.setBackgroundColor(this.color,r),this.$slots.default)}})},"./src/components/VCard/VCardMedia.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VImg/VImg.ts"),i=n("./src/util/console.ts");e.default=r.default.extend({name:"v-card-media",mounted:function(){Object(i.deprecate)("v-card-media",this.src?"v-img":"v-responsive",this)}})},"./src/components/VCard/VCardTitle.ts":function(t,e,n){"use strict";n.r(e);var r=n("vue"),i=n.n(r);e.default=i.a.extend({name:"v-card-title",functional:!0,props:{primaryTitle:Boolean},render:function(t,e){var n=e.data,r=e.props,i=e.children;return n.staticClass=("v-card__title "+(n.staticClass||"")).trim(),r.primaryTitle&&(n.staticClass+=" v-card__title--primary"),t("div",n,i)}})},"./src/components/VCard/index.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"VCardActions",function(){return s}),n.d(e,"VCardText",function(){return c});var r=n("./src/util/helpers.ts"),i=n("./src/components/VCard/VCard.ts");n.d(e,"VCard",function(){return i.default});var a=n("./src/components/VCard/VCardMedia.ts");n.d(e,"VCardMedia",function(){return a.default});var o=n("./src/components/VCard/VCardTitle.ts");n.d(e,"VCardTitle",function(){return o.default});var s=Object(r.createSimpleFunctional)("v-card__actions"),c=Object(r.createSimpleFunctional)("v-card__text");e.default={$_vuetify_subcomponents:{VCard:i.default,VCardMedia:a.default,VCardTitle:o.default,VCardActions:s,VCardText:c}}},"./src/components/VCarousel/VCarousel.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_carousel.styl");var r=n("./src/components/VWindow/VWindow.ts"),i=n("./src/components/VBtn/index.ts"),a=n("./src/components/VIcon/index.ts"),o=n("./src/mixins/button-group.ts"),s=n("./src/util/helpers.ts"),c=n("./src/util/console.ts");e.default=r.default.extend({name:"v-carousel",props:{cycle:{type:Boolean,default:!0},delimiterIcon:{type:String,default:"$vuetify.icons.delimiter"},height:{type:[Number,String],default:500},hideControls:Boolean,hideDelimiters:Boolean,interval:{type:[Number,String],default:6e3,validator:function(t){return t>0}},mandatory:{type:Boolean,default:!0},nextIcon:{type:[Boolean,String],default:"$vuetify.icons.next"},prevIcon:{type:[Boolean,String],default:"$vuetify.icons.prev"}},data:function(){return{changedByDelimiters:!1,internalHeight:this.height,slideTimeout:void 0}},computed:{isDark:function(){return this.dark||!this.light}},watch:{internalValue:function(t){this.restartTimeout(),this.$listeners.input&&this.$emit("input",t)},interval:"restartTimeout",height:function(t,e){t!==e&&t&&(this.internalHeight=t)},cycle:function(t){t?this.restartTimeout():(clearTimeout(this.slideTimeout),this.slideTimeout=void 0)}},mounted:function(){this.$listeners.input&&Object(c.deprecate)("@input","@change",this),this.startTimeout()},methods:{genDelimiters:function(){return this.$createElement("div",{staticClass:"v-carousel__controls"},[this.genItems()])},genIcon:function(t,e,n){var r=this;return this.$createElement("div",{staticClass:"v-carousel__"+t},[this.$createElement(i.default,{props:{icon:!0},attrs:{"aria-label":this.$vuetify.t("$vuetify.carousel."+t)},on:{click:function(){r.changedByDelimiters=!0,n()}}},[this.$createElement(a.default,{props:{size:"46px"}},e)])])},genIcons:function(){var t=[],e=this.$vuetify.rtl?this.nextIcon:this.prevIcon;e&&"string"==typeof e&&t.push(this.genIcon("prev",e,this.prev));var n=this.$vuetify.rtl?this.prevIcon:this.nextIcon;return n&&"string"==typeof n&&t.push(this.genIcon("next",n,this.next)),t},genItems:function(){for(var t=this,e=this.items.length,n=[],r=0;r<e;r++){var s=this.$createElement(i.default,{class:{"v-carousel__controls__item":!0},props:{icon:!0,small:!0,value:this.getValue(this.items[r],r)}},[this.$createElement(a.default,{props:{size:18}},this.delimiterIcon)]);n.push(s)}return this.$createElement(o.default,{props:{value:this.internalValue},on:{change:function(e){t.internalValue=e}}},n)},restartTimeout:function(){this.slideTimeout&&clearTimeout(this.slideTimeout),this.slideTimeout=void 0,(requestAnimationFrame||setTimeout)(this.startTimeout)},startTimeout:function(){this.cycle&&(this.slideTimeout=window.setTimeout(this.next,+this.interval>0?+this.interval:6e3))},updateReverse:function(t,e){this.changedByDelimiters?this.changedByDelimiters=!1:r.default.options.methods.updateReverse.call(this,t,e)}},render:function(t){var e=[],n={staticClass:"v-window v-carousel",style:{height:Object(s.convertToUnit)(this.height)},directives:[]};return this.touchless||n.directives.push({name:"touch",value:{left:this.next,right:this.prev}}),this.hideControls||e.push(this.genIcons()),this.hideDelimiters||e.push(this.genDelimiters()),t("div",n,[this.genContainer(),e])}})},"./src/components/VCarousel/VCarouselItem.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VWindow/VWindowItem.ts"),i=n("./src/components/VImg/index.ts"),a=function(){return(a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=r.default.extend({name:"v-carousel-item",inheritAttrs:!1,methods:{genDefaultSlot:function(){return[this.$createElement(i.VImg,{staticClass:"v-carousel__item",props:a({},this.$attrs,{height:this.windowGroup.internalHeight}),on:this.$listeners},this.$slots.default)]},onBeforeEnter:function(){},onEnter:function(){},onAfterEnter:function(){},onBeforeLeave:function(){},onEnterCancelled:function(){}}})},"./src/components/VCarousel/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VCarousel/VCarousel.ts");n.d(e,"VCarousel",function(){return r.default});var i=n("./src/components/VCarousel/VCarouselItem.ts");n.d(e,"VCarouselItem",function(){return i.default}),e.default={$_vuetify_subcomponents:{VCarousel:r.default,VCarouselItem:i.default}}},"./src/components/VCheckbox/VCheckbox.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_selection-controls.styl");var r=n("./src/components/VIcon/index.ts"),i=n("./src/mixins/selectable.js"),a=function(){return(a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default={name:"v-checkbox",mixins:[i.default],props:{indeterminate:Boolean,indeterminateIcon:{type:String,default:"$vuetify.icons.checkboxIndeterminate"},onIcon:{type:String,default:"$vuetify.icons.checkboxOn"},offIcon:{type:String,default:"$vuetify.icons.checkboxOff"}},data:function(t){return{inputIndeterminate:t.indeterminate}},computed:{classes:function(){return{"v-input--selection-controls":!0,"v-input--checkbox":!0}},computedIcon:function(){return this.inputIndeterminate?this.indeterminateIcon:this.isActive?this.onIcon:this.offIcon}},watch:{indeterminate:function(t){this.inputIndeterminate=t}},methods:{genCheckbox:function(){return this.$createElement("div",{staticClass:"v-input--selection-controls__input"},[this.genInput("checkbox",a({},this.$attrs,{"aria-checked":this.inputIndeterminate?"mixed":this.isActive.toString()})),this.genRipple(this.setTextColor(this.computedColor)),this.$createElement(r.default,this.setTextColor(this.computedColor,{props:{dark:this.dark,light:this.light}}),this.computedIcon)])},genDefaultSlot:function(){return[this.genCheckbox(),this.genLabel()]}}}},"./src/components/VCheckbox/index.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VCheckbox/VCheckbox.js");n.d(e,"VCheckbox",function(){return r.default}),e.default=r.default},"./src/components/VChip/VChip.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_chips.styl");var r=n("./src/util/mixins.ts"),i=n("./src/components/VIcon/index.ts"),a=n("./src/mixins/colorable.ts"),o=n("./src/mixins/themeable.ts"),s=n("./src/mixins/toggleable.ts"),c=function(){return(c=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=Object(r.default)(a.default,o.default,s.default).extend({name:"v-chip",props:{close:Boolean,disabled:Boolean,label:Boolean,outline:Boolean,selected:Boolean,small:Boolean,textColor:String,value:{type:Boolean,default:!0}},computed:{classes:function(){return c({"v-chip--disabled":this.disabled,"v-chip--selected":this.selected&&!this.disabled,"v-chip--label":this.label,"v-chip--outline":this.outline,"v-chip--small":this.small,"v-chip--removable":this.close},this.themeClasses)}},methods:{genClose:function(t){var e=this;return t("div",{staticClass:"v-chip__close",on:{click:function(t){t.stopPropagation(),e.$emit("input",!1)}}},[t(i.default,"$vuetify.icons.delete")])},genContent:function(t){return t("span",{staticClass:"v-chip__content"},[this.$slots.default,this.close&&this.genClose(t)])}},render:function(t){var e=this.setBackgroundColor(this.color,{staticClass:"v-chip",class:this.classes,attrs:{tabindex:this.disabled?-1:0},directives:[{name:"show",value:this.isActive}],on:this.$listeners}),n=this.textColor||this.outline&&this.color;return t("span",this.setTextColor(n,e),[this.genContent(t)])}})},"./src/components/VChip/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VChip/VChip.ts");n.d(e,"VChip",function(){return r.default}),e.default=r.default},"./src/components/VCombobox/VCombobox.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_autocompletes.styl");var r=n("./src/components/VSelect/VSelect.js"),i=n("./src/components/VAutocomplete/VAutocomplete.js"),a=n("./src/util/helpers.ts");e.default={name:"v-combobox",extends:i.default,props:{delimiters:{type:Array,default:function(){return[]}},returnObject:{type:Boolean,default:!0}},data:function(){return{editingIndex:-1}},computed:{counterValue:function(){return this.multiple?this.selectedItems.length:(this.internalSearch||"").toString().length},hasSlot:function(){return r.default.options.computed.hasSlot.call(this)||this.multiple},isAnyValueAllowed:function(){return!0},menuCanShow:function(){return!!this.isFocused&&(this.hasDisplayedItems||!!this.$slots["no-data"]&&!this.hideNoData)}},methods:{onFilteredItemsChanged:function(){},onInternalSearchChanged:function(t){if(t&&this.multiple&&this.delimiters.length){var e=this.delimiters.find(function(e){return t.endsWith(e)});null!=e&&(this.internalSearch=t.slice(0,t.length-e.length),this.updateTags())}this.updateMenuDimensions()},genChipSelection:function(t,e){var n=this,i=r.default.options.methods.genChipSelection.call(this,t,e);return this.multiple&&(i.componentOptions.listeners.dblclick=function(){n.editingIndex=e,n.internalSearch=n.getText(t),n.selectedIndex=-1}),i},onChipInput:function(t){r.default.options.methods.onChipInput.call(this,t),this.editingIndex=-1},onEnterDown:function(t){t.preventDefault(),r.default.options.methods.onEnterDown.call(this),this.getMenuIndex()>-1||this.updateSelf()},onKeyDown:function(t){var e=t.keyCode;r.default.options.methods.onKeyDown.call(this,t),this.multiple&&e===a.keyCodes.left&&0===this.$refs.input.selectionStart&&this.updateSelf(),this.changeSelectedIndex(e)},onTabDown:function(t){if(this.multiple&&this.internalSearch&&-1===this.getMenuIndex())return t.preventDefault(),t.stopPropagation(),this.updateTags();i.default.options.methods.onTabDown.call(this,t)},selectItem:function(t){this.editingIndex>-1?this.updateEditing():r.default.options.methods.selectItem.call(this,t)},setSelectedItems:function(){null==this.internalValue||""===this.internalValue?this.selectedItems=[]:this.selectedItems=this.multiple?this.internalValue:[this.internalValue]},setValue:function(t){void 0===t&&(t=this.internalSearch),r.default.options.methods.setValue.call(this,t)},updateEditing:function(){var t=this.internalValue.slice();t[this.editingIndex]=this.internalSearch,this.setValue(t),this.editingIndex=-1},updateCombobox:function(){var t=Boolean(this.$scopedSlots.selection)||this.hasChips;t&&!this.searchIsDirty||(this.internalSearch!==this.getText(this.internalValue)&&this.setValue(),t&&(this.internalSearch=void 0))},updateSelf:function(){this.multiple?this.updateTags():this.updateCombobox()},updateTags:function(){var t=this.getMenuIndex();if(!(t<0)||this.searchIsDirty){if(this.editingIndex>-1)return this.updateEditing();var e=this.selectedItems.indexOf(this.internalSearch);if(e>-1){var n=this.internalValue.slice();n.splice(e,1),this.setValue(n)}if(t>-1)return this.internalSearch=null;this.selectItem(this.internalSearch),this.internalSearch=null}}}}},"./src/components/VCombobox/index.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VCombobox/VCombobox.js");n.d(e,"VCombobox",function(){return r.default}),e.default=r.default},"./src/components/VCounter/VCounter.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_counters.styl");var r=n("./src/mixins/themeable.ts"),i=n("./src/util/mixins.ts"),a=function(){return(a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=Object(i.default)(r.default).extend({name:"v-counter",functional:!0,props:{value:{type:[Number,String],default:""},max:[Number,String]},render:function(t,e){var n=e.props,i=parseInt(n.max,10),o=parseInt(n.value,10),s=i?o+" / "+i:String(n.value);return t("div",{staticClass:"v-counter",class:a({"error--text":i&&o>i},Object(r.functionalThemeClasses)(e))},s)}})},"./src/components/VCounter/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VCounter/VCounter.ts");n.d(e,"VCounter",function(){return r.default}),e.default=r.default},"./src/components/VDataIterator/VDataIterator.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_data-iterator.styl");var r=n("./src/mixins/data-iterable.js"),i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default={name:"v-data-iterator",mixins:[r.default],inheritAttrs:!1,props:{contentTag:{type:String,default:"div"},contentProps:{type:Object,required:!1},contentClass:{type:String,required:!1}},computed:{classes:function(){return i({"v-data-iterator":!0,"v-data-iterator--select-all":!1!==this.selectAll},this.themeClasses)}},created:function(){this.initPagination()},methods:{genContent:function(){var t=this.genItems(),e={class:this.contentClass,attrs:this.$attrs,on:this.$listeners,props:this.contentProps};return this.$createElement(this.contentTag,e,t)},genEmptyItems:function(t){return[this.$createElement("div",{class:"text-xs-center",style:"width: 100%"},t)]},genFilteredItems:function(){if(!this.$scopedSlots.item)return null;for(var t=[],e=0,n=this.filteredItems.length;e<n;++e){var r=this.filteredItems[e],i=this.createProps(r,e);t.push(this.$scopedSlots.item(i))}return t},genFooter:function(){var t=[];return this.$slots.footer&&t.push(this.$slots.footer),this.hideActions||t.push(this.genActions()),t.length?this.$createElement("div",t):null},genHeader:function(){var t=[];return this.$slots.header&&t.push(this.$slots.header),t.length?this.$createElement("div",t):null}},render:function(t){return t("div",{class:this.classes},[this.genHeader(),this.genContent(),this.genFooter()])}}},"./src/components/VDataIterator/index.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VDataIterator/VDataIterator.js");n.d(e,"VDataIterator",function(){return r.default}),e.default=r.default},"./src/components/VDataTable/VDataTable.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_tables.styl"),n("./src/stylus/components/_data-table.styl");var r=n("./src/mixins/data-iterable.js"),i=n("./src/components/VDataTable/mixins/head.js"),a=n("./src/components/VDataTable/mixins/body.js"),o=n("./src/components/VDataTable/mixins/foot.js"),s=n("./src/components/VDataTable/mixins/progress.js"),c=n("./src/util/helpers.ts"),u=function(){return(u=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},l=Object(c.createSimpleFunctional)("v-table__overflow");e.default={name:"v-data-table",mixins:[r.default,i.default,a.default,o.default,s.default],props:{headers:{type:Array,default:function(){return[]}},headersLength:{type:Number},headerText:{type:String,default:"text"},headerKey:{type:String,default:null},hideHeaders:Boolean,rowsPerPageText:{type:String,default:"$vuetify.dataTable.rowsPerPageText"},customFilter:{type:Function,default:function(t,e,n,r){if(""===(e=e.toString().toLowerCase()).trim())return t;var i=r.map(function(t){return t.value});return t.filter(function(t){return i.some(function(r){return n(Object(c.getObjectValueByPath)(t,r,t[r]),e)})})}}},data:function(){return{actionsClasses:"v-datatable__actions",actionsRangeControlsClasses:"v-datatable__actions__range-controls",actionsSelectClasses:"v-datatable__actions__select",actionsPaginationClasses:"v-datatable__actions__pagination"}},computed:{classes:function(){return u({"v-datatable v-table":!0,"v-datatable--select-all":!1!==this.selectAll},this.themeClasses)},filteredItems:function(){return this.filteredItemsImpl(this.headers)},headerColumns:function(){return this.headersLength||this.headers.length+(!1!==this.selectAll)}},created:function(){var t=this.headers.find(function(t){return!("sortable"in t)||t.sortable});this.defaultPagination.sortBy=!this.disableInitialSort&&t?t.value:null,this.initPagination()},methods:{hasTag:function(t,e){return Array.isArray(t)&&t.find(function(t){return t.tag===e})},genTR:function(t,e){return void 0===e&&(e={}),this.$createElement("tr",e,t)}},render:function(t){return t("div",[t(l,{},[t("table",{class:this.classes},[this.genTHead(),this.genTBody(),this.genTFoot()])]),this.genActionsFooter()])}}},"./src/components/VDataTable/VEditDialog.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_small-dialog.styl");var r=n("./src/mixins/returnable.ts"),i=n("./src/mixins/themeable.ts"),a=n("./src/util/helpers.ts"),o=n("./src/components/VBtn/index.ts"),s=n("./src/components/VMenu/index.js");e.default={name:"v-edit-dialog",mixins:[r.default,i.default],props:{cancelText:{default:"Cancel"},large:Boolean,lazy:Boolean,persistent:Boolean,saveText:{default:"Save"},transition:{type:String,default:"slide-x-reverse-transition"}},data:function(){return{isActive:!1}},watch:{isActive:function(t){t?(this.$emit("open"),setTimeout(this.focus,50)):this.$emit("close")}},methods:{cancel:function(){this.isActive=!1,this.$emit("cancel")},focus:function(){var t=this.$refs.content.querySelector("input");t&&t.focus()},genButton:function(t,e){return this.$createElement(o.default,{props:{flat:!0,color:"primary",light:!0},on:{click:t}},e)},genActions:function(){var t=this;return this.$createElement("div",{class:"v-small-dialog__actions"},[this.genButton(this.cancel,this.cancelText),this.genButton(function(){t.save(t.returnValue),t.$emit("save")},this.saveText)])},genContent:function(){var t=this;return this.$createElement("div",{on:{keydown:function(e){var n=t.$refs.content.querySelector("input");e.keyCode===a.keyCodes.esc&&t.cancel(),e.keyCode===a.keyCodes.enter&&n&&(t.save(n.value),t.$emit("save"))}},ref:"content"},[this.$slots.input])}},render:function(t){var e=this;return t(s.default,{staticClass:"v-small-dialog",class:this.themeClasses,props:{contentClass:"v-small-dialog__content",transition:this.transition,origin:"top right",right:!0,value:this.isActive,closeOnClick:!this.persistent,closeOnContentClick:!1,lazy:this.lazy,light:this.light,dark:this.dark},on:{input:function(t){return e.isActive=t}}},[t("a",{slot:"activator"},this.$slots.default),this.genContent(),this.large?this.genActions():null])}}},"./src/components/VDataTable/index.js":function(t,e,n){"use strict";n.r(e),n.d(e,"VTableOverflow",function(){return o});var r=n("./src/util/helpers.ts"),i=n("./src/components/VDataTable/VDataTable.js");n.d(e,"VDataTable",function(){return i.default});var a=n("./src/components/VDataTable/VEditDialog.js");n.d(e,"VEditDialog",function(){return a.default});var o=Object(r.createSimpleFunctional)("v-table__overflow");e.default={$_vuetify_subcomponents:{VDataTable:i.default,VEditDialog:a.default,VTableOverflow:o}}},"./src/components/VDataTable/mixins/body.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/transitions/expand-transition.js"),i=n("./src/util/helpers.ts");e.default={methods:{genTBody:function(){var t=this.genItems();return this.$createElement("tbody",t)},genExpandedRow:function(t){var e=[];if(this.isExpanded(t.item)){var n=this.$createElement("div",{class:"v-datatable__expand-content",key:Object(i.getObjectValueByPath)(t.item,this.itemKey)},[this.$scopedSlots.expand(t)]);e.push(n)}var a=this.$createElement("transition-group",{class:"v-datatable__expand-col",attrs:{colspan:this.headerColumns},props:{tag:"td"},on:Object(r.default)("v-datatable__expand-col--expanded")},e);return this.genTR([a],{class:"v-datatable__expand-row"})},genFilteredItems:function(){if(!this.$scopedSlots.items)return null;for(var t=[],e=0,n=this.filteredItems.length;e<n;++e){var r=this.filteredItems[e],a=this.createProps(r,e),o=this.$scopedSlots.items(a);if(t.push(this.hasTag(o,"td")?this.genTR(o,{key:this.itemKey?Object(i.getObjectValueByPath)(a.item,this.itemKey):e,attrs:{active:this.isSelected(r)}}):o),this.$scopedSlots.expand){var s=this.genExpandedRow(a);t.push(s)}}return t},genEmptyItems:function(t){return this.hasTag(t,"tr")?t:this.hasTag(t,"td")?this.genTR(t):this.genTR([this.$createElement("td",{class:{"text-xs-center":"string"==typeof t},attrs:{colspan:this.headerColumns}},t)])}}}},"./src/components/VDataTable/mixins/foot.js":function(t,e,n){"use strict";n.r(e),e.default={methods:{genTFoot:function(){if(!this.$slots.footer)return null;var t=this.$slots.footer,e=this.hasTag(t,"td")?this.genTR(t):t;return this.$createElement("tfoot",[e])},genActionsFooter:function(){return this.hideActions?null:this.$createElement("div",{class:this.classes},this.genActions())}}}},"./src/components/VDataTable/mixins/head.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/util/console.ts"),i=n("./src/components/VCheckbox/index.js"),a=n("./src/components/VIcon/index.ts"),o=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},s=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(o(arguments[e]));return t};e.default={props:{sortIcon:{type:String,default:"$vuetify.icons.sort"}},methods:{genTHead:function(){var t=this;if(!this.hideHeaders){var e=[];if(this.$scopedSlots.headers){var n=this.$scopedSlots.headers({headers:this.headers,indeterminate:this.indeterminate,all:this.everyItem});e=[this.hasTag(n,"th")?this.genTR(n):n,this.genTProgress()]}else{n=this.headers.map(function(e,n){return t.genHeader(e,t.headerKey?e[t.headerKey]:n)});var r=this.$createElement(i.default,{props:{dark:this.dark,light:this.light,color:!0===this.selectAll?"":this.selectAll,hideDetails:!0,inputValue:this.everyItem,indeterminate:this.indeterminate},on:{change:this.toggle}});this.hasSelectAll&&n.unshift(this.$createElement("th",[r])),e=[this.genTR(n),this.genTProgress()]}return this.$createElement("thead",[e])}},genHeader:function(t,e){var n=[this.$scopedSlots.headerCell?this.$scopedSlots.headerCell({header:t}):t[this.headerText]];return this.$createElement.apply(this,s(["th"],this.genHeaderData(t,n,e)))},genHeaderData:function(t,e,n){var r=["column"],i={key:n,attrs:{role:"columnheader",scope:"col",width:t.width||null,"aria-label":t[this.headerText]||"","aria-sort":"none"}};return null==t.sortable||t.sortable?this.genHeaderSortingData(t,e,i,r):i.attrs["aria-label"]+=": Not sorted.",r.push("text-xs-"+(t.align||"left")),Array.isArray(t.class)?r.push.apply(r,s(t.class)):t.class&&r.push(t.class),i.class=r,[i,e]},genHeaderSortingData:function(t,e,n,i){var o=this;"value"in t||Object(r.consoleWarn)("Headers must have a value property that corresponds to a value in the v-model array",this),n.attrs.tabIndex=0,n.on={click:function(){o.expanded={},o.sort(t.value)},keydown:function(e){32===e.keyCode&&(e.preventDefault(),o.sort(t.value))}},i.push("sortable");var s=this.$createElement(a.default,{props:{small:!0}},this.sortIcon);t.align&&"left"!==t.align?e.unshift(s):e.push(s);var c=this.computedPagination;c.sortBy===t.value?(i.push("active"),c.descending?(i.push("desc"),n.attrs["aria-sort"]="descending",n.attrs["aria-label"]+=": Sorted descending. Activate to remove sorting."):(i.push("asc"),n.attrs["aria-sort"]="ascending",n.attrs["aria-label"]+=": Sorted ascending. Activate to sort descending.")):n.attrs["aria-label"]+=": Not sorted. Activate to sort ascending."}}}},"./src/components/VDataTable/mixins/progress.js":function(t,e,n){"use strict";n.r(e),e.default={methods:{genTProgress:function(){var t=this.$createElement("th",{staticClass:"column",attrs:{colspan:this.headerColumns}},[this.genProgress()]);return this.genTR([t],{staticClass:"v-datatable__progress"})}}}},"./src/components/VDatePicker/VDatePicker.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VDatePicker/VDatePickerTitle.ts"),i=n("./src/components/VDatePicker/VDatePickerHeader.ts"),a=n("./src/components/VDatePicker/VDatePickerDateTable.ts"),o=n("./src/components/VDatePicker/VDatePickerMonthTable.ts"),s=n("./src/components/VDatePicker/VDatePickerYears.ts"),c=n("./src/mixins/picker.ts"),u=n("./src/components/VDatePicker/util/index.ts"),l=n("./src/components/VDatePicker/util/isDateAllowed.ts"),d=n("./src/util/console.ts"),f=n("./src/components/VCalendar/util/timestamp.ts"),h=n("./src/util/mixins.ts"),p=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o};function m(t,e){var n=p(t.split("-"),3),r=n[0],i=n[1],a=void 0===i?1:i,o=n[2],s=void 0===o?1:o;return(r+"-"+Object(u.pad)(a)+"-"+Object(u.pad)(s)).substr(0,{date:10,month:7,year:4}[e])}e.default=Object(h.default)(c.default).extend({name:"v-date-picker",props:{allowedDates:Function,dayFormat:Function,disabled:Boolean,events:{type:[Array,Function,Object],default:function(){return null}},eventColor:{type:[Array,Function,Object,String],default:function(){return"warning"}},firstDayOfWeek:{type:[String,Number],default:0},headerDateFormat:Function,locale:{type:String,default:"en-us"},max:String,min:String,monthFormat:Function,multiple:Boolean,nextIcon:{type:String,default:"$vuetify.icons.next"},pickerDate:String,prevIcon:{type:String,default:"$vuetify.icons.prev"},reactive:Boolean,readonly:Boolean,scrollable:Boolean,showCurrent:{type:[Boolean,String],default:!0},showWeek:Boolean,titleDateFormat:Function,type:{type:String,default:"date",validator:function(t){return["date","month"].includes(t)}},value:[Array,String],weekdayFormat:Function,yearFormat:Function,yearIcon:String},data:function(){var t=this,e=new Date;return{activePicker:this.type.toUpperCase(),inputDay:null,inputMonth:null,inputYear:null,isReversing:!1,now:e,tableDate:t.pickerDate?t.pickerDate:m((t.multiple?t.value[t.value.length-1]:t.value)||e.getFullYear()+"-"+(e.getMonth()+1),"date"===t.type?"month":"year")}},computed:{lastValue:function(){return this.multiple?this.value[this.value.length-1]:this.value},selectedMonths:function(){return this.value&&this.value.length&&"month"!==this.type?this.multiple?this.value.map(function(t){return t.substr(0,7)}):this.value.substr(0,7):this.value},current:function(){return!0===this.showCurrent?m(this.now.getFullYear()+"-"+(this.now.getMonth()+1)+"-"+this.now.getDate(),this.type):this.showCurrent||null},inputDate:function(){return"date"===this.type?this.inputYear+"-"+Object(u.pad)(this.inputMonth+1)+"-"+Object(u.pad)(this.inputDay):this.inputYear+"-"+Object(u.pad)(this.inputMonth+1)},tableMonth:function(){return Number((this.pickerDate||this.tableDate).split("-")[1])-1},tableYear:function(){return Number((this.pickerDate||this.tableDate).split("-")[0])},minMonth:function(){return this.min?m(this.min,"month"):null},maxMonth:function(){return this.max?m(this.max,"month"):null},minYear:function(){return this.min?m(this.min,"year"):null},maxYear:function(){return this.max?m(this.max,"year"):null},formatters:function(){return{year:this.yearFormat||Object(u.createNativeLocaleFormatter)(this.locale,{year:"numeric",timeZone:"UTC"},{length:4}),titleDate:this.titleDateFormat||(this.multiple?this.defaultTitleMultipleDateFormatter:this.defaultTitleDateFormatter)}},defaultTitleMultipleDateFormatter:function(){var t=this;return this.value.length<2?function(e){return e.length?t.defaultTitleDateFormatter(e[0]):"0 selected"}:function(t){return t.length+" selected"}},defaultTitleDateFormatter:function(){var t=Object(u.createNativeLocaleFormatter)(this.locale,{year:{year:"numeric",timeZone:"UTC"},month:{month:"long",timeZone:"UTC"},date:{weekday:"short",month:"short",day:"numeric",timeZone:"UTC"}}[this.type],{start:0,length:{date:10,month:7,year:4}[this.type]});return this.landscape?function(e){return t(e).replace(/([^\d\s])([\d])/g,function(t,e,n){return e+" "+n}).replace(", ",",<br>")}:t}},watch:{tableDate:function(t,e){var n="month"===this.type?"year":"month";this.isReversing=m(t,n)<m(e,n),this.$emit("update:pickerDate",t)},pickerDate:function(t){t?this.tableDate=t:this.lastValue&&"date"===this.type?this.tableDate=m(this.lastValue,"month"):this.lastValue&&"month"===this.type&&(this.tableDate=m(this.lastValue,"year"))},value:function(t,e){this.checkMultipleProp(),this.setInputDate(),this.multiple||!this.value||this.pickerDate?this.multiple&&this.value.length&&!e.length&&!this.pickerDate&&(this.tableDate=m(this.inputDate,"month"===this.type?"year":"month")):this.tableDate=m(this.inputDate,"month"===this.type?"year":"month")},type:function(t){if(this.activePicker=t.toUpperCase(),this.value&&this.value.length){var e=(this.multiple?this.value:[this.value]).map(function(e){return m(e,t)}).filter(this.isDateAllowed);this.$emit("input",this.multiple?e:e[0])}}},created:function(){this.checkMultipleProp(),this.pickerDate!==this.tableDate&&this.$emit("update:pickerDate",this.tableDate),this.setInputDate()},methods:{emitInput:function(t){var e=this.multiple?-1===this.value.indexOf(t)?this.value.concat([t]):this.value.filter(function(e){return e!==t}):t;this.$emit("input",e),this.multiple||this.$emit("change",t)},checkMultipleProp:function(){if(null!=this.value){var t=this.value.constructor.name,e=this.multiple?"Array":"String";t!==e&&Object(d.consoleWarn)("Value must be "+(this.multiple?"an":"a")+" "+e+", got "+t,this)}},isDateAllowed:function(t){return Object(l.default)(t,this.min,this.max,this.allowedDates)},yearClick:function(t){this.inputYear=t,"month"===this.type?this.tableDate=""+t:this.tableDate=t+"-"+Object(u.pad)((this.tableMonth||0)+1),this.activePicker="MONTH",this.reactive&&!this.readonly&&!this.multiple&&this.isDateAllowed(this.inputDate)&&this.$emit("input",this.inputDate)},monthClick:function(t){this.inputYear=parseInt(t.split("-")[0],10),this.inputMonth=parseInt(t.split("-")[1],10)-1,"date"===this.type?(this.inputDay&&(this.inputDay=Math.min(this.inputDay,Object(f.daysInMonth)(this.inputYear,this.inputMonth+1))),this.tableDate=t,this.activePicker="DATE",this.reactive&&!this.readonly&&!this.multiple&&this.isDateAllowed(this.inputDate)&&this.$emit("input",this.inputDate)):this.emitInput(this.inputDate)},dateClick:function(t){this.inputYear=parseInt(t.split("-")[0],10),this.inputMonth=parseInt(t.split("-")[1],10)-1,this.inputDay=parseInt(t.split("-")[2],10),this.emitInput(this.inputDate)},genPickerTitle:function(){var t=this;return this.$createElement(r.default,{props:{date:this.value?this.formatters.titleDate(this.value):"",disabled:this.disabled,readonly:this.readonly,selectingYear:"YEAR"===this.activePicker,year:this.formatters.year(this.value?""+this.inputYear:this.tableDate),yearIcon:this.yearIcon,value:this.multiple?this.value[0]:this.value},slot:"title",on:{"update:selectingYear":function(e){return t.activePicker=e?"YEAR":t.type.toUpperCase()}}})},genTableHeader:function(){var t=this;return this.$createElement(i.default,{props:{nextIcon:this.nextIcon,color:this.color,dark:this.dark,disabled:this.disabled,format:this.headerDateFormat,light:this.light,locale:this.locale,min:"DATE"===this.activePicker?this.minMonth:this.minYear,max:"DATE"===this.activePicker?this.maxMonth:this.maxYear,prevIcon:this.prevIcon,readonly:this.readonly,value:"DATE"===this.activePicker?Object(u.pad)(this.tableYear,4)+"-"+Object(u.pad)(this.tableMonth+1):""+Object(u.pad)(this.tableYear,4)},on:{toggle:function(){return t.activePicker="DATE"===t.activePicker?"MONTH":"YEAR"},input:function(e){return t.tableDate=e}}})},genDateTable:function(){var t=this;return this.$createElement(a.default,{props:{allowedDates:this.allowedDates,color:this.color,current:this.current,dark:this.dark,disabled:this.disabled,events:this.events,eventColor:this.eventColor,firstDayOfWeek:this.firstDayOfWeek,format:this.dayFormat,light:this.light,locale:this.locale,min:this.min,max:this.max,readonly:this.readonly,scrollable:this.scrollable,showWeek:this.showWeek,tableDate:Object(u.pad)(this.tableYear,4)+"-"+Object(u.pad)(this.tableMonth+1),value:this.value,weekdayFormat:this.weekdayFormat},ref:"table",on:{input:this.dateClick,tableDate:function(e){return t.tableDate=e},"click:date":function(e){return t.$emit("click:date",e)},"dblclick:date":function(e){return t.$emit("dblclick:date",e)}}})},genMonthTable:function(){var t=this;return this.$createElement(o.default,{props:{allowedDates:"month"===this.type?this.allowedDates:null,color:this.color,current:this.current?m(this.current,"month"):null,dark:this.dark,disabled:this.disabled,events:"month"===this.type?this.events:null,eventColor:"month"===this.type?this.eventColor:null,format:this.monthFormat,light:this.light,locale:this.locale,min:this.minMonth,max:this.maxMonth,readonly:this.readonly&&"month"===this.type,scrollable:this.scrollable,value:this.selectedMonths,tableDate:""+Object(u.pad)(this.tableYear,4)},ref:"table",on:{input:this.monthClick,tableDate:function(e){return t.tableDate=e},"click:month":function(e){return t.$emit("click:month",e)},"dblclick:month":function(e){return t.$emit("dblclick:month",e)}}})},genYears:function(){return this.$createElement(s.default,{props:{color:this.color,format:this.yearFormat,locale:this.locale,min:this.minYear,max:this.maxYear,value:this.tableYear},on:{input:this.yearClick}})},genPickerBody:function(){var t="YEAR"===this.activePicker?[this.genYears()]:[this.genTableHeader(),"DATE"===this.activePicker?this.genDateTable():this.genMonthTable()];return this.$createElement("div",{key:this.activePicker},t)},setInputDate:function(){if(this.lastValue){var t=this.lastValue.split("-");this.inputYear=parseInt(t[0],10),this.inputMonth=parseInt(t[1],10)-1,"date"===this.type&&(this.inputDay=parseInt(t[2],10))}else this.inputYear=this.inputYear||this.now.getFullYear(),this.inputMonth=null==this.inputMonth?this.inputMonth:this.now.getMonth(),this.inputDay=this.inputDay||this.now.getDate()}},render:function(){return this.genPicker("v-picker--date")}})},"./src/components/VDatePicker/VDatePickerDateTable.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VDatePicker/mixins/date-picker-table.ts"),i=n("./src/components/VDatePicker/util/index.ts"),a=n("./src/util/helpers.ts"),o=n("./src/util/mixins.ts");e.default=Object(o.default)(r.default).extend({name:"v-date-picker-date-table",props:{firstDayOfWeek:{type:[String,Number],default:0},showWeek:Boolean,weekdayFormat:Function},computed:{formatter:function(){return this.format||Object(i.createNativeLocaleFormatter)(this.locale,{day:"numeric",timeZone:"UTC"},{start:8,length:2})},weekdayFormatter:function(){return this.weekdayFormat||Object(i.createNativeLocaleFormatter)(this.locale,{weekday:"narrow",timeZone:"UTC"})},weekDays:function(){var t=this,e=parseInt(this.firstDayOfWeek,10);return this.weekdayFormatter?Object(a.createRange)(7).map(function(n){return t.weekdayFormatter("2017-01-"+(e+n+15))}):Object(a.createRange)(7).map(function(t){return["S","M","T","W","T","F","S"][(t+e)%7]})}},methods:{calculateTableDate:function(t){return Object(i.monthChange)(this.tableDate,Math.sign(t||1))},genTHead:function(){var t=this,e=this.weekDays.map(function(e){return t.$createElement("th",e)});return this.showWeek&&e.unshift(this.$createElement("th")),this.$createElement("thead",this.genTR(e))},weekDaysBeforeFirstDayOfTheMonth:function(){return(new Date(this.displayedYear+"-"+Object(i.pad)(this.displayedMonth+1)+"-01T00:00:00+00:00").getUTCDay()-parseInt(this.firstDayOfWeek)+7)%7},getWeekNumber:function(){var t=[0,31,59,90,120,151,181,212,243,273,304,334][this.displayedMonth];this.displayedMonth>1&&(this.displayedYear%4==0&&this.displayedYear%100!=0||this.displayedYear%400==0)&&t++;var e=(this.displayedYear+(this.displayedYear-1>>2)-Math.floor((this.displayedYear-1)/100)+Math.floor((this.displayedYear-1)/400)-Number(this.firstDayOfWeek))%7;return Math.floor((t+e)/7)+1},genWeekNumber:function(t){return this.$createElement("td",[this.$createElement("small",{staticClass:"v-date-picker-table--date__week"},String(t).padStart(2,"0"))])},genTBody:function(){var t=[],e=new Date(this.displayedYear,this.displayedMonth+1,0).getDate(),n=[],r=this.weekDaysBeforeFirstDayOfTheMonth(),a=this.getWeekNumber();for(this.showWeek&&n.push(this.genWeekNumber(a++));r--;)n.push(this.$createElement("td"));for(r=1;r<=e;r++){var o=this.displayedYear+"-"+Object(i.pad)(this.displayedMonth+1)+"-"+Object(i.pad)(r);n.push(this.$createElement("td",[this.genButton(o,!0,"date",this.formatter)])),n.length%(this.showWeek?8:7)==0&&(t.push(this.genTR(n)),n=[],r<e&&this.showWeek&&n.push(this.genWeekNumber(a++)))}return n.length&&t.push(this.genTR(n)),this.$createElement("tbody",t)},genTR:function(t){return[this.$createElement("tr",t)]}},render:function(){return this.genTable("v-date-picker-table v-date-picker-table--date",[this.genTHead(),this.genTBody()],this.calculateTableDate)}})},"./src/components/VDatePicker/VDatePickerHeader.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_date-picker-header.styl");var r=n("./src/components/VBtn/index.ts"),i=n("./src/components/VIcon/index.ts"),a=n("./src/mixins/colorable.ts"),o=n("./src/mixins/themeable.ts"),s=n("./src/components/VDatePicker/util/index.ts"),c=n("./src/util/mixins.ts"),u=function(){return(u=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},l=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o};e.default=Object(c.default)(a.default,o.default).extend({name:"v-date-picker-header",props:{disabled:Boolean,format:Function,locale:{type:String,default:"en-us"},min:String,max:String,nextIcon:{type:String,default:"$vuetify.icons.next"},prevIcon:{type:String,default:"$vuetify.icons.prev"},readonly:Boolean,value:{type:[Number,String],required:!0}},data:function(){return{isReversing:!1}},computed:{formatter:function(){return this.format?this.format:String(this.value).split("-")[1]?Object(s.createNativeLocaleFormatter)(this.locale,{month:"long",year:"numeric",timeZone:"UTC"},{length:7}):Object(s.createNativeLocaleFormatter)(this.locale,{year:"numeric",timeZone:"UTC"},{length:4})}},watch:{value:function(t,e){this.isReversing=t<e}},methods:{genBtn:function(t){var e=this,n=this.disabled||t<0&&this.min&&this.calculateChange(t)<this.min||t>0&&this.max&&this.calculateChange(t)>this.max;return this.$createElement(r.default,{props:{dark:this.dark,disabled:n,icon:!0,light:this.light},nativeOn:{click:function(n){n.stopPropagation(),e.$emit("input",e.calculateChange(t))}}},[this.$createElement(i.default,t<0==!this.$vuetify.rtl?this.prevIcon:this.nextIcon)])},calculateChange:function(t){var e=l(String(this.value).split("-").map(Number),2),n=e[0];return null==e[1]?""+(n+t):Object(s.monthChange)(String(this.value),t)},genHeader:function(){var t=this,e=!this.disabled&&(this.color||"accent"),n=this.$createElement("div",this.setTextColor(e,{key:String(this.value)}),[this.$createElement("button",{attrs:{type:"button"},on:{click:function(){return t.$emit("toggle")}}},[this.$slots.default||this.formatter(String(this.value))])]),r=this.$createElement("transition",{props:{name:this.isReversing===!this.$vuetify.rtl?"tab-reverse-transition":"tab-transition"}},[n]);return this.$createElement("div",{staticClass:"v-date-picker-header__value",class:{"v-date-picker-header__value--disabled":this.disabled}},[r])}},render:function(){return this.$createElement("div",{staticClass:"v-date-picker-header",class:u({"v-date-picker-header--disabled":this.disabled},this.themeClasses)},[this.genBtn(-1),this.genHeader(),this.genBtn(1)])}})},"./src/components/VDatePicker/VDatePickerMonthTable.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VDatePicker/mixins/date-picker-table.ts"),i=n("./src/components/VDatePicker/util/index.ts"),a=n("./src/util/mixins.ts");e.default=Object(a.default)(r.default).extend({name:"v-date-picker-month-table",computed:{formatter:function(){return this.format||Object(i.createNativeLocaleFormatter)(this.locale,{month:"short",timeZone:"UTC"},{start:5,length:2})}},methods:{calculateTableDate:function(t){return""+(parseInt(this.tableDate,10)+Math.sign(t||1))},genTBody:function(){for(var t=this,e=[],n=Array(3).fill(null),r=12/n.length,a=function(r){var a=n.map(function(e,a){var o=r*n.length+a,s=t.displayedYear+"-"+Object(i.pad)(o+1);return t.$createElement("td",{key:o},[t.genButton(s,!1,"month",t.formatter)])});e.push(o.$createElement("tr",{key:r},a))},o=this,s=0;s<r;s++)a(s);return this.$createElement("tbody",e)}},render:function(){return this.genTable("v-date-picker-table v-date-picker-table--month",[this.genTBody()],this.calculateTableDate)}})},"./src/components/VDatePicker/VDatePickerTitle.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_date-picker-title.styl");var r=n("./src/components/VIcon/index.ts"),i=n("./src/mixins/picker-button.ts"),a=n("./src/util/mixins.ts");e.default=Object(a.default)(i.default).extend({name:"v-date-picker-title",props:{date:{type:String,default:""},disabled:Boolean,readonly:Boolean,selectingYear:Boolean,value:{type:String},year:{type:[Number,String],default:""},yearIcon:{type:String}},data:function(){return{isReversing:!1}},computed:{computedTransition:function(){return this.isReversing?"picker-reverse-transition":"picker-transition"}},watch:{value:function(t,e){this.isReversing=t<e}},methods:{genYearIcon:function(){return this.$createElement(r.default,{props:{dark:!0}},this.yearIcon)},getYearBtn:function(){return this.genPickerButton("selectingYear",!0,[String(this.year),this.yearIcon?this.genYearIcon():null],!1,"v-date-picker-title__year")},genTitleText:function(){return this.$createElement("transition",{props:{name:this.computedTransition}},[this.$createElement("div",{domProps:{innerHTML:this.date||"&nbsp;"},key:this.value})])},genTitleDate:function(){return this.genPickerButton("selectingYear",!1,[this.genTitleText()],!1,"v-date-picker-title__date")}},render:function(t){return t("div",{staticClass:"v-date-picker-title",class:{"v-date-picker-title--disabled":this.disabled}},[this.getYearBtn(),this.genTitleDate()])}})},"./src/components/VDatePicker/VDatePickerYears.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_date-picker-years.styl");var r=n("./src/mixins/colorable.ts"),i=n("./src/components/VDatePicker/util/index.ts"),a=n("./src/util/mixins.ts");e.default=Object(a.default)(r.default).extend({name:"v-date-picker-years",props:{format:Function,locale:{type:String,default:"en-us"},min:[Number,String],max:[Number,String],readonly:Boolean,value:[Number,String]},data:function(){return{defaultColor:"primary"}},computed:{formatter:function(){return this.format||Object(i.createNativeLocaleFormatter)(this.locale,{year:"numeric",timeZone:"UTC"},{length:4})}},mounted:function(){var t=this;setTimeout(function(){var e=t.$el.getElementsByClassName("active")[0];t.$el.scrollTop=e?e.offsetTop-t.$el.offsetHeight/2+e.offsetHeight/2:t.$el.scrollHeight/2-t.$el.offsetHeight/2})},methods:{genYearItem:function(t){var e=this,n=this.formatter(""+t),r=parseInt(this.value,10)===t,i=r&&(this.color||"primary");return this.$createElement("li",this.setTextColor(i,{key:t,class:{active:r},on:{click:function(){return e.$emit("input",t)}}}),n)},genYearItems:function(){for(var t=[],e=this.value?parseInt(this.value,10):(new Date).getFullYear(),n=this.max?parseInt(this.max,10):e+100,r=Math.min(n,this.min?parseInt(this.min,10):e-100),i=n;i>=r;i--)t.push(this.genYearItem(i));return t}},render:function(){return this.$createElement("ul",{staticClass:"v-date-picker-years",ref:"years"},this.genYearItems())}})},"./src/components/VDatePicker/index.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VDatePicker/VDatePicker.ts");n.d(e,"VDatePicker",function(){return r.default});var i=n("./src/components/VDatePicker/VDatePickerTitle.ts");n.d(e,"VDatePickerTitle",function(){return i.default});var a=n("./src/components/VDatePicker/VDatePickerHeader.ts");n.d(e,"VDatePickerHeader",function(){return a.default});var o=n("./src/components/VDatePicker/VDatePickerDateTable.ts");n.d(e,"VDatePickerDateTable",function(){return o.default});var s=n("./src/components/VDatePicker/VDatePickerMonthTable.ts");n.d(e,"VDatePickerMonthTable",function(){return s.default});var c=n("./src/components/VDatePicker/VDatePickerYears.ts");n.d(e,"VDatePickerYears",function(){return c.default}),e.default={$_vuetify_subcomponents:{VDatePicker:r.default,VDatePickerTitle:i.default,VDatePickerHeader:a.default,VDatePickerDateTable:o.default,VDatePickerMonthTable:s.default,VDatePickerYears:c.default}}},"./src/components/VDatePicker/mixins/date-picker-table.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_date-picker-table.styl");var r=n("./src/directives/touch.ts"),i=n("./src/mixins/colorable.ts"),a=n("./src/mixins/themeable.ts"),o=n("./src/components/VDatePicker/util/isDateAllowed.ts"),s=n("./src/util/mixins.ts"),c=function(){return(c=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=Object(s.default)(i.default,a.default).extend({directives:{Touch:r.default},props:{allowedDates:Function,current:String,disabled:Boolean,format:Function,events:{type:[Array,Function,Object],default:function(){return null}},eventColor:{type:[Array,Function,Object,String],default:function(){return"warning"}},locale:{type:String,default:"en-us"},min:String,max:String,readonly:Boolean,scrollable:Boolean,tableDate:{type:String,required:!0},value:[String,Array]},data:function(){return{isReversing:!1}},computed:{computedTransition:function(){return this.isReversing===!this.$vuetify.rtl?"tab-reverse-transition":"tab-transition"},displayedMonth:function(){return Number(this.tableDate.split("-")[1])-1},displayedYear:function(){return Number(this.tableDate.split("-")[0])}},watch:{tableDate:function(t,e){this.isReversing=t<e}},methods:{genButtonClasses:function(t,e,n,r){return c({"v-btn--active":n,"v-btn--flat":!n,"v-btn--icon":n&&t&&e,"v-btn--floating":e,"v-btn--depressed":!e&&n,"v-btn--disabled":!t||this.disabled&&n,"v-btn--outline":r&&!n},this.themeClasses)},genButtonEvents:function(t,e,n){var r=this;if(!this.disabled)return{click:function(){e&&!r.readonly&&r.$emit("input",t),r.$emit("click:"+n,t)},dblclick:function(){return r.$emit("dblclick:"+n,t)}}},genButton:function(t,e,n,r){var i=Object(o.default)(t,this.min,this.max,this.allowedDates),a=t===this.value||Array.isArray(this.value)&&-1!==this.value.indexOf(t),s=t===this.current,c=a?this.setBackgroundColor:this.setTextColor,u=(a||s)&&(this.color||"accent");return this.$createElement("button",c(u,{staticClass:"v-btn",class:this.genButtonClasses(i,e,a,s),attrs:{type:"button"},domProps:{disabled:this.disabled||!i},on:this.genButtonEvents(t,i,n)}),[this.$createElement("div",{staticClass:"v-btn__content"},[r(t)]),this.genEvents(t)])},getEventColors:function(t){var e,n=function(t){return Array.isArray(t)?t:[t]};return(e=Array.isArray(this.events)?this.events.includes(t):this.events instanceof Function?this.events(t)||!1:this.events&&this.events[t]||!1)?(!0!==e?n(e):"string"==typeof this.eventColor?[this.eventColor]:"function"==typeof this.eventColor?n(this.eventColor(t)):Array.isArray(this.eventColor)?this.eventColor:n(this.eventColor[t])).filter(function(t){return t}):[]},genEvents:function(t){var e=this,n=this.getEventColors(t);return n.length?this.$createElement("div",{staticClass:"v-date-picker-table__events"},n.map(function(t){return e.$createElement("div",e.setBackgroundColor(t))})):null},wheel:function(t,e){t.preventDefault(),this.$emit("tableDate",e(t.deltaY))},touch:function(t,e){this.$emit("tableDate",e(t))},genTable:function(t,e,n){var r=this,i=this.$createElement("transition",{props:{name:this.computedTransition}},[this.$createElement("table",{key:this.tableDate},e)]),a={name:"touch",value:{left:function(t){return t.offsetX<-15&&r.touch(1,n)},right:function(t){return t.offsetX>15&&r.touch(-1,n)}}};return this.$createElement("div",{staticClass:t,class:c({"v-date-picker-table--disabled":this.disabled},this.themeClasses),on:!this.disabled&&this.scrollable?{wheel:function(t){return r.wheel(t,n)}}:void 0,directives:[a]},[i])}}})},"./src/components/VDatePicker/util/createNativeLocaleFormatter.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VDatePicker/util/pad.ts"),i=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o};e.default=function(t,e,n){void 0===n&&(n={start:0,length:0});var a=function(t){var e=i(t.trim().split(" ")[0].split("-"),3),n=e[0],a=e[1],o=e[2];return[Object(r.default)(n,4),Object(r.default)(a||1),Object(r.default)(o||1)].join("-")};try{var o=new Intl.DateTimeFormat(t||void 0,e);return function(t){return o.format(new Date(a(t)+"T00:00:00+00:00"))}}catch(t){return n.start||n.length?function(t){return a(t).substr(n.start||0,n.length)}:void 0}}},"./src/components/VDatePicker/util/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VDatePicker/util/createNativeLocaleFormatter.ts");n.d(e,"createNativeLocaleFormatter",function(){return r.default});var i=n("./src/components/VDatePicker/util/monthChange.ts");n.d(e,"monthChange",function(){return i.default});var a=n("./src/components/VDatePicker/util/pad.ts");n.d(e,"pad",function(){return a.default})},"./src/components/VDatePicker/util/isDateAllowed.ts":function(t,e,n){"use strict";function r(t,e,n,r){return(!r||r(t))&&(!e||t>=e)&&(!n||t<=n)}n.r(e),n.d(e,"default",function(){return r})},"./src/components/VDatePicker/util/monthChange.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VDatePicker/util/pad.ts"),i=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o};e.default=function(t,e){var n=i(t.split("-").map(Number),2),a=n[0],o=n[1];return o+e===0?a-1+"-12":o+e===13?a+1+"-01":a+"-"+Object(r.default)(o+e)}},"./src/components/VDatePicker/util/pad.ts":function(t,e,n){"use strict";n.r(e);e.default=function(t,e){return void 0===e&&(e=2),n=t,r=e,i="0",r>>=0,n=String(n),i=String(i),n.length>r?String(n):((r-=n.length)>i.length&&(i+=i.repeat(r/i.length)),i.slice(0,r)+String(n));var n,r,i}},"./src/components/VDialog/VDialog.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_dialogs.styl");var r=n("./src/mixins/dependent.ts"),i=n("./src/mixins/detachable.js"),a=n("./src/mixins/overlayable.ts"),o=n("./src/mixins/returnable.ts"),s=n("./src/mixins/stackable.ts"),c=n("./src/mixins/toggleable.ts"),u=n("./src/directives/click-outside.ts"),l=n("./src/util/helpers.ts"),d=n("./src/util/ThemeProvider.ts"),f=n("./src/util/console.ts"),h=function(){return(h=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default={name:"v-dialog",directives:{ClickOutside:u.default},mixins:[r.default,i.default,a.default,o.default,s.default,c.default],props:{disabled:Boolean,persistent:Boolean,fullscreen:Boolean,fullWidth:Boolean,noClickAnimation:Boolean,light:Boolean,dark:Boolean,maxWidth:{type:[String,Number],default:"none"},origin:{type:String,default:"center center"},width:{type:[String,Number],default:"auto"},scrollable:Boolean,transition:{type:[String,Boolean],default:"dialog-transition"}},data:function(){return{animate:!1,animateTimeout:null,stackClass:"v-dialog__content--active",stackMinZIndex:200}},computed:{classes:function(){var t;return(t={})[("v-dialog "+this.contentClass).trim()]=!0,t["v-dialog--active"]=this.isActive,t["v-dialog--persistent"]=this.persistent,t["v-dialog--fullscreen"]=this.fullscreen,t["v-dialog--scrollable"]=this.scrollable,t["v-dialog--animated"]=this.animate,t},contentClasses:function(){return{"v-dialog__content":!0,"v-dialog__content--active":this.isActive}},hasActivator:function(){return Boolean(!!this.$slots.activator||!!this.$scopedSlots.activator)}},watch:{isActive:function(t){t?(this.show(),this.hideScroll()):this.removeOverlay()},fullscreen:function(t){this.isActive&&(t?(this.hideScroll(),this.removeOverlay(!1)):(this.showScroll(),this.genOverlay()))}},beforeMount:function(){var t=this;this.$nextTick(function(){t.isBooted=t.isActive,t.isActive&&t.show()})},mounted:function(){"v-slot"===Object(l.getSlotType)(this,"activator",!0)&&Object(f.consoleError)("v-dialog's activator slot must be bound, try '<template #activator=\"data\"><v-btn v-on=\"data.on>'",this)},methods:{animateClick:function(){var t=this;this.animate=!1,this.$nextTick(function(){t.animate=!0,clearTimeout(t.animateTimeout),t.animateTimeout=setTimeout(function(){return t.animate=!1},150)})},closeConditional:function(t){return!(this._isDestroyed||!this.isActive||this.$refs.content.contains(t.target))&&(this.persistent?(this.noClickAnimation||this.overlay!==t.target||this.animateClick(),!1):this.activeZIndex>=this.getMaxZIndex())},hideScroll:function(){this.fullscreen?document.documentElement.classList.add("overflow-y-hidden"):a.default.options.methods.hideScroll.call(this)},show:function(){!this.fullscreen&&!this.hideOverlay&&this.genOverlay(),this.$refs.content.focus()},onKeydown:function(t){if(t.keyCode===l.keyCodes.esc&&!this.getOpenDependents().length)if(this.persistent)this.noClickAnimation||this.animateClick();else{this.isActive=!1;var e=this.getActivator();this.$nextTick(function(){return e&&e.focus()})}this.$emit("keydown",t)},getActivator:function(t){if(this.$refs.activator)return this.$refs.activator.children.length>0?this.$refs.activator.children[0]:this.$refs.activator;if(t&&(this.activatedBy=t.currentTarget||t.target),this.activatedBy)return this.activatedBy;if(this.activatorNode){var e=Array.isArray(this.activatorNode)?this.activatorNode[0]:this.activatorNode,n=e&&e.elm;if(n)return n}return null},genActivator:function(){var t=this;if(!this.hasActivator)return null;var e=this.disabled?{}:{click:function(e){e.stopPropagation(),t.getActivator(e),t.disabled||(t.isActive=!t.isActive)}};if("scoped"===Object(l.getSlotType)(this,"activator")){var n=this.$scopedSlots.activator({on:e});return this.activatorNode=n,n}return this.$createElement("div",{staticClass:"v-dialog__activator",class:{"v-dialog__activator--disabled":this.disabled},ref:"activator",on:e},this.$slots.activator)}},render:function(t){var e=this,n=[],r={class:this.classes,ref:"dialog",directives:[{name:"click-outside",value:function(){e.isActive=!1},args:{closeConditional:this.closeConditional,include:this.getOpenDependentElements}},{name:"show",value:this.isActive}],on:{click:function(t){t.stopPropagation()}}};this.fullscreen||(r.style={maxWidth:"none"===this.maxWidth?void 0:Object(l.convertToUnit)(this.maxWidth),width:"auto"===this.width?void 0:Object(l.convertToUnit)(this.width)}),n.push(this.genActivator());var i=t("div",r,this.showLazyContent(this.$slots.default));return this.transition&&(i=t("transition",{props:{name:this.transition,origin:this.origin}},[i])),n.push(t("div",{class:this.contentClasses,attrs:h({tabIndex:"-1"},this.getScopeIdAttrs()),on:{keydown:this.onKeydown},style:{zIndex:this.activeZIndex},ref:"content"},[this.$createElement(d.default,{props:{root:!0,light:this.light,dark:this.dark}},[i])])),t("div",{staticClass:"v-dialog__container",style:{display:!this.hasActivator||this.fullWidth?"block":"inline-block"}},n)}}},"./src/components/VDialog/index.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VDialog/VDialog.js");n.d(e,"VDialog",function(){return r.default}),e.default=r.default},"./src/components/VDivider/VDivider.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_dividers.styl");var r=n("./src/mixins/themeable.ts"),i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=r.default.extend({name:"v-divider",props:{inset:Boolean,vertical:Boolean},render:function(t){return t("hr",{class:i({"v-divider":!0,"v-divider--inset":this.inset,"v-divider--vertical":this.vertical},this.themeClasses),attrs:this.$attrs,on:this.$listeners})}})},"./src/components/VDivider/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VDivider/VDivider.ts");n.d(e,"VDivider",function(){return r.default}),e.default=r.default},"./src/components/VExpansionPanel/VExpansionPanel.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_expansion-panel.styl");var r=n("./src/mixins/themeable.ts"),i=n("./src/mixins/registrable.ts"),a=n("./src/util/mixins.ts"),o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=Object(a.default)(r.default,Object(i.provide)("expansionPanel")).extend({name:"v-expansion-panel",provide:function(){return{expansionPanel:this}},props:{disabled:Boolean,readonly:Boolean,expand:Boolean,focusable:Boolean,inset:Boolean,popout:Boolean,value:{type:[Number,Array],default:function(){return null}}},data:function(){return{items:[],open:[]}},computed:{classes:function(){return o({"v-expansion-panel--focusable":this.focusable,"v-expansion-panel--popout":this.popout,"v-expansion-panel--inset":this.inset},this.themeClasses)}},watch:{expand:function(t){var e=-1;if(!t){var n=this.open.reduce(function(t,e){return e?t+1:t},0),r=Array(this.items.length).fill(!1);1===n&&(e=this.open.indexOf(!0)),e>-1&&(r[e]=!0),this.open=r}this.$emit("input",t?this.open:e>-1?e:null)},value:function(t){this.updateFromValue(t)}},mounted:function(){null!==this.value&&this.updateFromValue(this.value)},methods:{updateFromValue:function(t){if(!Array.isArray(t)||this.expand){var e=Array(this.items.length).fill(!1);"number"==typeof t?e[t]=!0:null!==t&&(e=t),this.updatePanels(e)}},updatePanels:function(t){this.open=t;for(var e=0;e<this.items.length;e++)this.items[e].toggle(t&&t[e])},panelClick:function(t){for(var e=this.expand?this.open.slice():Array(this.items.length).fill(!1),n=0;n<this.items.length;n++)this.items[n]._uid===t&&(e[n]=!this.open[n],!this.expand&&this.$emit("input",e[n]?n:null));this.updatePanels(e),this.expand&&this.$emit("input",e)},register:function(t){var e=this.items.push(t)-1;null!==this.value&&this.updateFromValue(this.value),t.toggle(!!this.open[e])},unregister:function(t){var e=this.items.findIndex(function(e){return e._uid===t._uid});this.items.splice(e,1),this.open.splice(e,1)}},render:function(t){return t("ul",{staticClass:"v-expansion-panel",class:this.classes},this.$slots.default)}})},"./src/components/VExpansionPanel/VExpansionPanelContent.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/transitions/index.js"),i=n("./src/mixins/bootable.ts"),a=n("./src/mixins/toggleable.ts"),o=n("./src/mixins/rippleable.ts"),s=n("./src/mixins/registrable.ts"),c=n("./src/components/VIcon/index.ts"),u=n("./src/util/mixins.ts"),l=n("./src/util/console.ts"),d=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},f=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(d(arguments[e]));return t};e.default=Object(u.default)(i.default,a.default,o.default,Object(s.inject)("expansionPanel","v-expansion-panel-content","v-expansion-panel")).extend({name:"v-expansion-panel-content",props:{disabled:Boolean,readonly:Boolean,expandIcon:{type:String,default:"$vuetify.icons.expand"},hideActions:Boolean,ripple:{type:[Boolean,Object],default:!1}},data:function(){return{height:"auto"}},computed:{containerClasses:function(){return{"v-expansion-panel__container--active":this.isActive,"v-expansion-panel__container--disabled":this.isDisabled}},isDisabled:function(){return this.expansionPanel.disabled||this.disabled},isReadonly:function(){return this.expansionPanel.readonly||this.readonly}},beforeMount:function(){this.expansionPanel.register(this),void 0!==this.value&&Object(l.consoleWarn)("v-model has been deprecated",this)},beforeDestroy:function(){this.expansionPanel.unregister(this)},methods:{onKeydown:function(t){13===t.keyCode&&this.$el===document.activeElement&&this.expansionPanel.panelClick(this._uid)},onHeaderClick:function(){this.isReadonly||this.expansionPanel.panelClick(this._uid)},genBody:function(){return this.$createElement("div",{ref:"body",class:"v-expansion-panel__body",directives:[{name:"show",value:this.isActive}]},this.showLazyContent(this.$slots.default))},genHeader:function(){var t=f(this.$slots.header||[]);return this.hideActions||t.push(this.genIcon()),this.$createElement("div",{staticClass:"v-expansion-panel__header",directives:[{name:"ripple",value:this.ripple}],on:{click:this.onHeaderClick}},t)},genIcon:function(){var t=this.$slots.actions||[this.$createElement(c.default,this.expandIcon)];return this.$createElement("transition",{attrs:{name:"fade-transition"}},[this.$createElement("div",{staticClass:"v-expansion-panel__header__icon",directives:[{name:"show",value:!this.isDisabled}]},t)])},toggle:function(t){var e=this;t&&(this.isBooted=!0),this.$nextTick(function(){return e.isActive=t})}},render:function(t){return t("li",{staticClass:"v-expansion-panel__container",class:this.containerClasses,attrs:{tabindex:this.isReadonly||this.isDisabled?null:0,"aria-expanded":Boolean(this.isActive)},on:{keydown:this.onKeydown}},[this.$slots.header&&this.genHeader(),t(r.VExpandTransition,[this.genBody()])])}})},"./src/components/VExpansionPanel/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VExpansionPanel/VExpansionPanel.ts");n.d(e,"VExpansionPanel",function(){return r.default});var i=n("./src/components/VExpansionPanel/VExpansionPanelContent.ts");n.d(e,"VExpansionPanelContent",function(){return i.default}),e.default={$_vuetify_subcomponents:{VExpansionPanel:r.default,VExpansionPanelContent:i.default}}},"./src/components/VFooter/VFooter.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_footer.styl");var r=n("./src/mixins/applicationable.ts"),i=n("./src/mixins/colorable.ts"),a=n("./src/mixins/themeable.ts"),o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default={name:"v-footer",mixins:[Object(r.default)(null,["height","inset"]),i.default,a.default],props:{height:{default:32,type:[Number,String]},inset:Boolean},computed:{applicationProperty:function(){return this.inset?"insetFooter":"footer"},computedMarginBottom:function(){if(this.app)return this.$vuetify.application.bottom},computedPaddingLeft:function(){return this.app&&this.inset?this.$vuetify.application.left:0},computedPaddingRight:function(){return this.app&&this.inset?this.$vuetify.application.right:0},styles:function(){var t={height:isNaN(this.height)?this.height:this.height+"px"};return this.computedPaddingLeft&&(t.paddingLeft=this.computedPaddingLeft+"px"),this.computedPaddingRight&&(t.paddingRight=this.computedPaddingRight+"px"),this.computedMarginBottom&&(t.marginBottom=this.computedMarginBottom+"px"),t}},methods:{updateApplication:function(){var t=parseInt(this.height);return isNaN(t)?this.$el?this.$el.clientHeight:0:t}},render:function(t){return t("footer",this.setBackgroundColor(this.color,{staticClass:"v-footer",class:o({"v-footer--absolute":this.absolute,"v-footer--fixed":!this.absolute&&(this.app||this.fixed),"v-footer--inset":this.inset},this.themeClasses),style:this.styles,ref:"content"}),this.$slots.default)}}},"./src/components/VFooter/index.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VFooter/VFooter.js");n.d(e,"VFooter",function(){return r.default}),e.default=r.default},"./src/components/VForm/VForm.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_forms.styl");var r=n("./src/mixins/registrable.ts");e.default={name:"v-form",mixins:[Object(r.provide)("form")],inheritAttrs:!1,props:{value:Boolean,lazyValidation:Boolean},data:function(){return{inputs:[],watchers:[],errorBag:{}}},watch:{errorBag:{handler:function(){var t=Object.values(this.errorBag).includes(!0);this.$emit("input",!t)},deep:!0,immediate:!0}},methods:{watchInput:function(t){var e=this,n=function(t){return t.$watch("hasError",function(n){e.$set(e.errorBag,t._uid,n)},{immediate:!0})},r={_uid:t._uid,valid:void 0,shouldValidate:void 0};return this.lazyValidation?r.shouldValidate=t.$watch("shouldValidate",function(i){i&&(e.errorBag.hasOwnProperty(t._uid)||(r.valid=n(t)))}):r.valid=n(t),r},validate:function(){return!this.inputs.filter(function(t){return!t.validate(!0)}).length},reset:function(){for(var t=this,e=this.inputs.length;e--;)this.inputs[e].reset();this.lazyValidation&&setTimeout(function(){t.errorBag={}},0)},resetValidation:function(){for(var t=this,e=this.inputs.length;e--;)this.inputs[e].resetValidation();this.lazyValidation&&setTimeout(function(){t.errorBag={}},0)},register:function(t){var e=this.watchInput(t);this.inputs.push(t),this.watchers.push(e)},unregister:function(t){var e=this.inputs.find(function(e){return e._uid===t._uid});if(e){var n=this.watchers.find(function(t){return t._uid===e._uid});n.valid&&n.valid(),n.shouldValidate&&n.shouldValidate(),this.watchers=this.watchers.filter(function(t){return t._uid!==e._uid}),this.inputs=this.inputs.filter(function(t){return t._uid!==e._uid}),this.$delete(this.errorBag,e._uid)}}},render:function(t){var e=this;return t("form",{staticClass:"v-form",attrs:Object.assign({novalidate:!0},this.$attrs),on:{submit:function(t){return e.$emit("submit",t)}}},this.$slots.default)}}},"./src/components/VForm/index.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VForm/VForm.js");n.d(e,"VForm",function(){return r.default}),e.default=r.default},"./src/components/VGrid/VContainer.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_grid.styl");var r=n("./src/components/VGrid/grid.js");e.default=Object(r.default)("container")},"./src/components/VGrid/VContent.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_content.styl");var r=n("./src/mixins/ssr-bootable.ts");e.default={name:"v-content",mixins:[r.default],props:{tag:{type:String,default:"main"}},computed:{styles:function(){var t=this.$vuetify.application,e=t.bar;return{paddingTop:t.top+e+"px",paddingRight:t.right+"px",paddingBottom:t.footer+t.insetFooter+t.bottom+"px",paddingLeft:t.left+"px"}}},render:function(t){var e={staticClass:"v-content",style:this.styles,ref:"content"};return t(this.tag,e,[t("div",{staticClass:"v-content__wrap"},this.$slots.default)])}}},"./src/components/VGrid/VFlex.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_grid.styl");var r=n("./src/components/VGrid/grid.js");e.default=Object(r.default)("flex")},"./src/components/VGrid/VLayout.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_grid.styl");var r=n("./src/components/VGrid/grid.js");e.default=Object(r.default)("layout")},"./src/components/VGrid/grid.js":function(t,e,n){"use strict";function r(t){return{name:"v-"+t,functional:!0,props:{id:String,tag:{type:String,default:"div"}},render:function(e,n){var r=n.props,i=n.data,a=n.children;i.staticClass=(t+" "+(i.staticClass||"")).trim();var o=i.attrs;if(o){i.attrs={};var s=Object.keys(o).filter(function(t){if("slot"===t)return!1;var e=o[t];return t.startsWith("data-")?(i.attrs[t]=e,!1):e||"string"==typeof e});s.length&&(i.staticClass+=" "+s.join(" "))}return r.id&&(i.domProps=i.domProps||{},i.domProps.id=r.id),e(r.tag,i,a)}}}n.r(e),n.d(e,"default",function(){return r})},"./src/components/VGrid/index.js":function(t,e,n){"use strict";n.r(e),n.d(e,"VSpacer",function(){return c});var r=n("./src/util/helpers.ts"),i=n("./src/components/VGrid/VContainer.js");n.d(e,"VContainer",function(){return i.default});var a=n("./src/components/VGrid/VContent.js");n.d(e,"VContent",function(){return a.default});var o=n("./src/components/VGrid/VFlex.js");n.d(e,"VFlex",function(){return o.default});var s=n("./src/components/VGrid/VLayout.js");n.d(e,"VLayout",function(){return s.default});var c=Object(r.createSimpleFunctional)("spacer","div","v-spacer");e.default={$_vuetify_subcomponents:{VContainer:i.default,VContent:a.default,VFlex:o.default,VLayout:s.default,VSpacer:c}}},"./src/components/VHover/VHover.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/mixins/delayable.ts"),i=n("./src/mixins/toggleable.ts"),a=n("./src/util/mixins.ts"),o=n("./src/util/console.ts");e.default=Object(a.default)(r.default,i.default).extend({name:"v-hover",props:{disabled:{type:Boolean,default:!1},value:{type:Boolean,default:void 0}},methods:{onMouseEnter:function(){this.runDelay("open")},onMouseLeave:function(){this.runDelay("close")}},render:function(){return this.$scopedSlots.default||void 0!==this.value?(this.$scopedSlots.default?t=this.$scopedSlots.default({hover:this.isActive}):this.$slots.default&&1===this.$slots.default.length&&(t=this.$slots.default[0]),Array.isArray(t)&&1===t.length&&(t=t[0]),t&&!Array.isArray(t)&&t.tag?(this.disabled||(t.data=t.data||{},this._g(t.data,{mouseenter:this.onMouseEnter,mouseleave:this.onMouseLeave})),t):(Object(o.consoleWarn)("v-hover should only contain a single element",this),t)):(Object(o.consoleWarn)("v-hover is missing a default scopedSlot or bound value",this),null);var t}})},"./src/components/VHover/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VHover/VHover.ts");n.d(e,"VHover",function(){return r.default}),e.default=r.default},"./src/components/VIcon/VIcon.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_icons.styl");var r,i=n("./src/mixins/colorable.ts"),a=n("./src/mixins/sizeable.ts"),o=n("./src/mixins/themeable.ts"),s=n("./src/util/helpers.ts"),c=n("vue"),u=n.n(c),l=n("./src/util/mixins.ts"),d=function(){return(d=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};!function(t){t.small="16px",t.default="24px",t.medium="28px",t.large="36px",t.xLarge="40px"}(r||(r={}));var f=Object(l.default)(i.default,a.default,o.default).extend({name:"v-icon",props:{disabled:Boolean,left:Boolean,right:Boolean},methods:{getIcon:function(){var t="";return this.$slots.default&&(t=this.$slots.default[0].text.trim()),Object(s.remapInternalIcon)(this,t)},getSize:function(){var t={small:this.small,medium:this.medium,large:this.large,xLarge:this.xLarge},e=Object(s.keys)(t).find(function(e){return t[e]});return e&&r[e]||Object(s.convertToUnit)(this.size)},getDefaultData:function(){return{staticClass:"v-icon",class:{"v-icon--disabled":this.disabled,"v-icon--left":this.left,"v-icon--link":this.$listeners.click||this.$listeners["!click"],"v-icon--right":this.right},attrs:d({"aria-hidden":!0},this.$attrs),on:this.$listeners}},applyColors:function(t){t.class=d({},t.class,this.themeClasses),this.setTextColor(this.color,t)},renderFontIcon:function(t,e){var n=[],r=this.getDefaultData(),i="material-icons",a=t.indexOf("-"),o=a<=-1;o?n.push(t):function(t){return["fas","far","fal","fab"].some(function(e){return t.includes(e)})}(i=t.slice(0,a))&&(i=""),r.class[i]=!0,r.class[t]=!o;var s=this.getSize();return s&&(r.style={fontSize:s}),this.applyColors(r),e("i",r,n)},renderSvgIcon:function(t,e){var n=this.getDefaultData();n.class["v-icon--is-component"]=!0;var r=this.getSize();r&&(n.style={fontSize:r,height:r}),this.applyColors(n);var i=t.component;return n.props=t.props,n.nativeOn=n.on,e(i,n)}},render:function(t){var e=this.getIcon();return"string"==typeof e?this.renderFontIcon(e,t):this.renderSvgIcon(e,t)}});e.default=u.a.extend({name:"v-icon",$_wrapperFor:f,functional:!0,render:function(t,e){var n=e.data,r=e.children,i="";return n.domProps&&(i=n.domProps.textContent||n.domProps.innerHTML||i,delete n.domProps.textContent,delete n.domProps.innerHTML),t(f,n,i?[i]:r)}})},"./src/components/VIcon/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VIcon/VIcon.ts");n.d(e,"VIcon",function(){return r.default}),e.default=r.default},"./src/components/VImg/VImg.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_images.styl");var r=n("./src/components/VResponsive/index.ts"),i=n("./src/util/console.ts");e.default=r.default.extend({name:"v-img",props:{alt:String,contain:Boolean,src:{type:[String,Object],default:""},gradient:String,lazySrc:String,srcset:String,sizes:String,position:{type:String,default:"center center"},transition:{type:[Boolean,String],default:"fade-transition"}},data:function(){return{currentSrc:"",image:null,isLoading:!0,calculatedAspectRatio:void 0}},computed:{computedAspectRatio:function(){return this.normalisedSrc.aspect},normalisedSrc:function(){return"string"==typeof this.src?{src:this.src,srcset:this.srcset,lazySrc:this.lazySrc,aspect:Number(this.aspectRatio||this.calculatedAspectRatio)}:{src:this.src.src,srcset:this.srcset||this.src.srcset,lazySrc:this.lazySrc||this.src.lazySrc,aspect:Number(this.aspectRatio||this.src.aspect||this.calculatedAspectRatio)}},__cachedImage:function(){if(!this.normalisedSrc.src&&!this.normalisedSrc.lazySrc)return[];var t=[],e=this.isLoading?this.normalisedSrc.lazySrc:this.currentSrc;this.gradient&&t.push("linear-gradient("+this.gradient+")"),e&&t.push('url("'+e+'")');var n=this.$createElement("div",{staticClass:"v-image__image",class:{"v-image__image--preload":this.isLoading,"v-image__image--contain":this.contain,"v-image__image--cover":!this.contain},style:{backgroundImage:t.join(", "),backgroundPosition:this.position},key:+this.isLoading});return this.transition?this.$createElement("transition",{attrs:{name:this.transition,mode:"in-out"}},[n]):n}},watch:{src:function(){this.isLoading?this.loadImage():this.init()},"$vuetify.breakpoint.width":"getSrc"},mounted:function(){this.init()},methods:{init:function(){if(this.normalisedSrc.lazySrc){var t=new Image;t.src=this.normalisedSrc.lazySrc,this.pollForSize(t,null)}this.normalisedSrc.src&&this.loadImage()},onLoad:function(){this.getSrc(),this.isLoading=!1,this.$emit("load",this.src)},onError:function(){Object(i.consoleError)("Image load failed\n\nsrc: "+this.normalisedSrc.src,this),this.$emit("error",this.src)},getSrc:function(){this.image&&(this.currentSrc=this.image.currentSrc||this.image.src)},loadImage:function(){var t=this,e=new Image;this.image=e,e.onload=function(){e.decode?e.decode().catch(function(e){Object(i.consoleWarn)("Failed to decode image, trying to render anyway\n\nsrc: "+t.normalisedSrc.src+(e.message?"\nOriginal error: "+e.message:""),t)}).then(t.onLoad):t.onLoad()},e.onerror=this.onError,e.src=this.normalisedSrc.src,this.sizes&&(e.sizes=this.sizes),this.normalisedSrc.srcset&&(e.srcset=this.normalisedSrc.srcset),this.aspectRatio||this.pollForSize(e),this.getSrc()},pollForSize:function(t,e){var n=this;void 0===e&&(e=100);!function r(){var i=t.naturalHeight,a=t.naturalWidth;i||a?n.calculatedAspectRatio=a/i:null!=e&&setTimeout(r,e)}()},__genPlaceholder:function(){if(this.$slots.placeholder){var t=this.isLoading?[this.$createElement("div",{staticClass:"v-image__placeholder"},this.$slots.placeholder)]:[];return this.transition?this.$createElement("transition",{attrs:{name:this.transition}},t):t[0]}}},render:function(t){var e=r.default.options.render.call(this,t);return e.data.staticClass+=" v-image",e.data.attrs={role:this.alt?"img":void 0,"aria-label":this.alt},e.children=[this.__cachedSizer,this.__cachedImage,this.__genPlaceholder(),this.genContent()],t(e.tag,e.data,e.children)}})},"./src/components/VImg/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VImg/VImg.ts");n.d(e,"VImg",function(){return r.default}),e.default=r.default},"./src/components/VInput/VInput.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_inputs.styl");var r=n("./src/components/VIcon/index.ts"),i=n("./src/components/VLabel/index.ts"),a=n("./src/components/VMessages/index.ts"),o=n("./src/mixins/colorable.ts"),s=n("./src/mixins/themeable.ts"),c=n("./src/mixins/validatable.ts"),u=n("./src/util/helpers.ts"),l=n("./src/util/console.ts"),d=n("./src/util/mixins.ts"),f=function(){return(f=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=Object(d.default)(o.default,s.default,c.default).extend({name:"v-input",props:{appendIcon:String,appendIconCb:Function,backgroundColor:{type:String,default:""},height:[Number,String],hideDetails:Boolean,hint:String,label:String,loading:Boolean,persistentHint:Boolean,prependIcon:String,prependIconCb:Function,value:{required:!1}},data:function(){return{attrsInput:{},lazyValue:this.value,hasMouseDown:!1}},computed:{classes:function(){return{}},classesInput:function(){return f({},this.classes,{"v-input--has-state":this.hasState,"v-input--hide-details":this.hideDetails,"v-input--is-label-active":this.isLabelActive,"v-input--is-dirty":this.isDirty,"v-input--is-disabled":this.disabled,"v-input--is-focused":this.isFocused,"v-input--is-loading":!1!==this.loading&&void 0!==this.loading,"v-input--is-readonly":this.readonly},this.themeClasses)},directivesInput:function(){return[]},hasHint:function(){return!this.hasMessages&&this.hint&&(this.persistentHint||this.isFocused)},hasLabel:function(){return Boolean(this.$slots.label||this.label)},internalValue:{get:function(){return this.lazyValue},set:function(t){this.lazyValue=t,this.$emit(this.$_modelEvent,t)}},isDirty:function(){return!!this.lazyValue},isDisabled:function(){return Boolean(this.disabled||this.readonly)},isLabelActive:function(){return this.isDirty}},watch:{value:function(t){this.lazyValue=t}},beforeCreate:function(){this.$_modelEvent=this.$options.model&&this.$options.model.event||"input"},methods:{genContent:function(){return[this.genPrependSlot(),this.genControl(),this.genAppendSlot()]},genControl:function(){return this.$createElement("div",{staticClass:"v-input__control"},[this.genInputSlot(),this.genMessages()])},genDefaultSlot:function(){return[this.genLabel(),this.$slots.default]},genIcon:function(t,e,n){var i=this;void 0===n&&(n=!0);var a=this[t+"Icon"],o="click:"+Object(u.kebabCase)(t);e=e||this[t+"IconCb"],n&&t&&e&&Object(l.deprecate)(":"+t+"-icon-cb","@"+o,this);var s={props:{color:this.validationState,dark:this.dark,disabled:this.disabled,light:this.light},on:this.$listeners[o]||e?{click:function(t){t.preventDefault(),t.stopPropagation(),i.$emit(o,t),e&&e(t)},mouseup:function(t){t.preventDefault(),t.stopPropagation()}}:void 0};return this.$createElement("div",{staticClass:"v-input__icon v-input__icon--"+Object(u.kebabCase)(t),key:""+t+a},[this.$createElement(r.default,s,a)])},genInputSlot:function(){return this.$createElement("div",this.setBackgroundColor(this.backgroundColor,{staticClass:"v-input__slot",style:{height:Object(u.convertToUnit)(this.height)},directives:this.directivesInput,on:{click:this.onClick,mousedown:this.onMouseDown,mouseup:this.onMouseUp},ref:"input-slot"}),[this.genDefaultSlot()])},genLabel:function(){return this.hasLabel?this.$createElement(i.default,{props:{color:this.validationState,dark:this.dark,focused:this.hasState,for:this.$attrs.id,light:this.light}},this.$slots.label||this.label):null},genMessages:function(){if(this.hideDetails)return null;var t=this.hasHint?[this.hint]:this.validations;return this.$createElement(a.default,{props:{color:this.hasHint?"":this.validationState,dark:this.dark,light:this.light,value:this.hasMessages||this.hasHint?t:[]}})},genSlot:function(t,e,n){if(!n.length)return null;var r=t+"-"+e;return this.$createElement("div",{staticClass:"v-input__"+r,ref:r},n)},genPrependSlot:function(){var t=[];return this.$slots.prepend?t.push(this.$slots.prepend):this.prependIcon&&t.push(this.genIcon("prepend")),this.genSlot("prepend","outer",t)},genAppendSlot:function(){var t=[];return this.$slots.append?t.push(this.$slots.append):this.appendIcon&&t.push(this.genIcon("append")),this.genSlot("append","outer",t)},onClick:function(t){this.$emit("click",t)},onMouseDown:function(t){this.hasMouseDown=!0,this.$emit("mousedown",t)},onMouseUp:function(t){this.hasMouseDown=!1,this.$emit("mouseup",t)}},render:function(t){return t("div",this.setTextColor(this.validationState,{staticClass:"v-input",attrs:this.attrsInput,class:this.classesInput}),this.genContent())}})},"./src/components/VInput/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VInput/VInput.ts");n.d(e,"VInput",function(){return r.default}),e.default=r.default},"./src/components/VItemGroup/VItem.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/mixins/groupable.ts"),i=n("./src/util/mixins.ts"),a=n("./src/util/console.ts");e.default=Object(i.default)(Object(r.factory)("itemGroup","v-item","v-item-group")).extend({name:"v-item",props:{value:{required:!1}},render:function(){var t,e;return this.$scopedSlots.default?(this.$scopedSlots.default&&(e=this.$scopedSlots.default({active:this.isActive,toggle:this.toggle})),Array.isArray(e)&&1===e.length&&(e=e[0]),e&&!Array.isArray(e)&&e.tag?(e.data=this._b(e.data||{},e.tag,{class:(t={},t[this.activeClass]=this.isActive,t)}),e):(Object(a.consoleWarn)("v-item should only contain a single element",this),e)):(Object(a.consoleWarn)("v-item is missing a default scopedSlot",this),null)}})},"./src/components/VItemGroup/VItemGroup.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"BaseItemGroup",function(){return c});n("./src/stylus/components/_item-group.styl");var r=n("./src/mixins/proxyable.ts"),i=n("./src/mixins/themeable.ts"),a=n("./src/util/mixins.ts"),o=n("./src/util/console.ts"),s=function(){return(s=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},c=Object(a.default)(r.default,i.default).extend({name:"base-item-group",props:{activeClass:{type:String,default:"v-item--active"},mandatory:Boolean,max:{type:[Number,String],default:null},multiple:Boolean},data:function(){return{internalLazyValue:void 0!==this.value?this.value:this.multiple?[]:void 0,items:[]}},computed:{classes:function(){return s({},this.themeClasses)},selectedItems:function(){var t=this;return this.items.filter(function(e,n){return t.toggleMethod(t.getValue(e,n))})},selectedValues:function(){return Array.isArray(this.internalValue)?this.internalValue:[this.internalValue]},toggleMethod:function(){var t=this;if(!this.multiple)return function(e){return t.internalValue===e};var e=this.internalValue;return Array.isArray(e)?function(t){return e.includes(t)}:function(){return!1}}},watch:{internalValue:function(){this.$nextTick(this.updateItemsState)}},created:function(){this.multiple&&!Array.isArray(this.internalValue)&&Object(o.consoleWarn)("Model must be bound to an array if the multiple property is true.",this)},methods:{getValue:function(t,e){return null==t.value||""===t.value?e:t.value},onClick:function(t,e){this.updateInternalValue(this.getValue(t,e))},register:function(t){var e=this,n=this.items.push(t)-1;t.$on("change",function(){return e.onClick(t,n)}),this.mandatory&&null==this.internalLazyValue&&this.updateMandatory(),this.updateItem(t,n)},unregister:function(t){if(!this._isDestroyed){var e=this.items.indexOf(t),n=this.getValue(t,e);if(this.items.splice(e,1),!(this.selectedValues.indexOf(n)<0)){if(!this.mandatory)return this.updateInternalValue(n);this.multiple&&Array.isArray(this.internalValue)?this.internalValue=this.internalValue.filter(function(t){return t!==n}):this.internalValue=void 0,this.selectedItems.length||this.updateMandatory(!0)}}},updateItem:function(t,e){var n=this.getValue(t,e);t.isActive=this.toggleMethod(n)},updateItemsState:function(){if(this.mandatory&&!this.selectedItems.length)return this.updateMandatory();this.items.forEach(this.updateItem)},updateInternalValue:function(t){this.multiple?this.updateMultiple(t):this.updateSingle(t)},updateMandatory:function(t){if(this.items.length){var e=t?this.items.length-1:0;this.updateInternalValue(this.getValue(this.items[e],e))}},updateMultiple:function(t){var e=(Array.isArray(this.internalValue)?this.internalValue:[]).slice(),n=e.findIndex(function(e){return e===t});this.mandatory&&n>-1&&e.length-1<1||null!=this.max&&n<0&&e.length+1>this.max||(n>-1?e.splice(n,1):e.push(t),this.internalValue=e)},updateSingle:function(t){var e=t===this.internalValue;this.mandatory&&e||(this.internalValue=e?void 0:t)}},render:function(t){return t("div",{staticClass:"v-item-group",class:this.classes},this.$slots.default)}});e.default=c.extend({name:"v-item-group",provide:function(){return{itemGroup:this}}})},"./src/components/VItemGroup/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VItemGroup/VItem.ts");n.d(e,"VItem",function(){return r.default});var i=n("./src/components/VItemGroup/VItemGroup.ts");n.d(e,"VItemGroup",function(){return i.default}),e.default={$_vuetify_subcomponents:{VItem:r.default,VItemGroup:i.default}}},"./src/components/VJumbotron/VJumbotron.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_jumbotrons.styl");var r=n("./src/mixins/colorable.ts"),i=n("./src/mixins/routable.ts"),a=n("./src/mixins/themeable.ts"),o=n("./src/util/console.ts");e.default={name:"v-jumbotron",mixins:[r.default,i.default,a.default],props:{gradient:String,height:{type:[Number,String],default:"400px"},src:String,tag:{type:String,default:"div"}},computed:{backgroundStyles:function(){var t={};return this.gradient&&(t.background="linear-gradient("+this.gradient+")"),t},classes:function(){return this.themeClasses},styles:function(){return{height:this.height}}},mounted:function(){Object(o.deprecate)("v-jumbotron",this.src?"v-img":"v-responsive",this)},methods:{genBackground:function(){return this.$createElement("div",this.setBackgroundColor(this.color,{staticClass:"v-jumbotron__background",style:this.backgroundStyles}))},genContent:function(){return this.$createElement("div",{staticClass:"v-jumbotron__content"},this.$slots.default)},genImage:function(){return this.src?this.$slots.img?this.$slots.img({src:this.src}):this.$createElement("img",{staticClass:"v-jumbotron__image",attrs:{src:this.src}}):null},genWrapper:function(){return this.$createElement("div",{staticClass:"v-jumbotron__wrapper"},[this.genImage(),this.genBackground(),this.genContent()])}},render:function(t){var e=this.generateRouteLink(this.classes),n=e.tag,r=e.data;return r.staticClass="v-jumbotron",r.style=this.styles,t(n,r,[this.genWrapper()])}}},"./src/components/VJumbotron/index.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VJumbotron/VJumbotron.js");n.d(e,"VJumbotron",function(){return r.default}),e.default=r.default},"./src/components/VLabel/VLabel.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_labels.styl");var r=n("./src/mixins/colorable.ts"),i=n("./src/mixins/themeable.ts"),a=n("./src/util/mixins.ts"),o=n("./src/util/helpers.ts"),s=function(){return(s=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=Object(a.default)(i.default).extend({name:"v-label",functional:!0,props:{absolute:Boolean,color:{type:String,default:"primary"},disabled:Boolean,focused:Boolean,for:String,left:{type:[Number,String],default:0},right:{type:[Number,String],default:"auto"},value:Boolean},render:function(t,e){var n=e.children,a=e.listeners,c=e.props,u={staticClass:"v-label",class:s({"v-label--active":c.value,"v-label--is-disabled":c.disabled},Object(i.functionalThemeClasses)(e)),attrs:{for:c.for,"aria-hidden":!c.for},on:a,style:{left:Object(o.convertToUnit)(c.left),right:Object(o.convertToUnit)(c.right),position:c.absolute?"absolute":"relative"}};return t("label",r.default.options.methods.setTextColor(c.focused&&c.color,u),n)}})},"./src/components/VLabel/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VLabel/VLabel.ts");n.d(e,"VLabel",function(){return r.default}),e.default=r.default},"./src/components/VList/VList.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_lists.styl");var r=n("./src/mixins/themeable.ts"),i=n("./src/mixins/registrable.ts"),a=n("./src/util/mixins.ts"),o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},s=function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}};e.default=Object(a.default)(Object(i.provide)("list"),r.default).extend({name:"v-list",provide:function(){return{listClick:this.listClick}},props:{dense:Boolean,expand:Boolean,subheader:Boolean,threeLine:Boolean,twoLine:Boolean},data:function(){return{groups:[]}},computed:{classes:function(){return o({"v-list--dense":this.dense,"v-list--subheader":this.subheader,"v-list--two-line":this.twoLine,"v-list--three-line":this.threeLine},this.themeClasses)}},methods:{register:function(t){this.groups.push(t)},unregister:function(t){var e=this.groups.findIndex(function(e){return e._uid===t._uid});e>-1&&this.groups.splice(e,1)},listClick:function(t){var e,n;if(!this.expand)try{for(var r=s(this.groups),i=r.next();!i.done;i=r.next()){i.value.toggle(t)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}}},render:function(t){return t("div",{staticClass:"v-list",class:this.classes,attrs:{role:"list"}},[this.$slots.default])}})},"./src/components/VList/VListGroup.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VIcon/index.ts"),i=n("./src/mixins/bootable.ts"),a=n("./src/mixins/toggleable.ts"),o=n("./src/mixins/registrable.ts"),s=n("./src/components/transitions/index.js"),c=n("./src/util/mixins.ts"),u=function(){return(u=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=Object(c.default)(i.default,Object(o.inject)("list","v-list-group","v-list"),a.default).extend({name:"v-list-group",inject:["listClick"],props:{activeClass:{type:String,default:"primary--text"},appendIcon:{type:String,default:"$vuetify.icons.expand"},disabled:Boolean,group:String,noAction:Boolean,prependIcon:String,subGroup:Boolean},data:function(){return{groups:[]}},computed:{groupClasses:function(){return{"v-list__group--active":this.isActive,"v-list__group--disabled":this.disabled}},headerClasses:function(){return{"v-list__group__header--active":this.isActive,"v-list__group__header--sub-group":this.subGroup}},itemsClasses:function(){return{"v-list__group__items--no-action":this.noAction}}},watch:{isActive:function(t){!this.subGroup&&t&&this.listClick(this._uid)},$route:function(t){var e=this.matchRoute(t.path);this.group&&(e&&this.isActive!==e&&this.listClick(this._uid),this.isActive=e)}},mounted:function(){this.list.register(this),this.group&&this.$route&&null==this.value&&(this.isActive=this.matchRoute(this.$route.path))},beforeDestroy:function(){this.list.unregister(this._uid)},methods:{click:function(t){this.disabled||(this.$emit("click",t),this.isActive=!this.isActive)},genIcon:function(t){return this.$createElement(r.default,t)},genAppendIcon:function(){var t=!this.subGroup&&this.appendIcon;return t||this.$slots.appendIcon?this.$createElement("div",{staticClass:"v-list__group__header__append-icon"},[this.$slots.appendIcon||this.genIcon(t)]):null},genGroup:function(){return this.$createElement("div",{staticClass:"v-list__group__header",class:this.headerClasses,on:u({},this.$listeners,{click:this.click}),ref:"item"},[this.genPrependIcon(),this.$slots.activator,this.genAppendIcon()])},genItems:function(){return this.$createElement("div",{staticClass:"v-list__group__items",class:this.itemsClasses,directives:[{name:"show",value:this.isActive}],ref:"group"},this.showLazyContent(this.$slots.default))},genPrependIcon:function(){var t,e=this.prependIcon?this.prependIcon:!!this.subGroup&&"$vuetify.icons.subgroup";return e||this.$slots.prependIcon?this.$createElement("div",{staticClass:"v-list__group__header__prepend-icon",class:(t={},t[this.activeClass]=this.isActive,t)},[this.$slots.prependIcon||this.genIcon(e)]):null},toggle:function(t){this.isActive=this._uid===t},matchRoute:function(t){return!!this.group&&null!==t.match(this.group)}},render:function(t){return t("div",{staticClass:"v-list__group",class:this.groupClasses},[this.genGroup(),t(s.VExpandTransition,[this.genItems()])])}})},"./src/components/VList/VListTile.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/mixins/colorable.ts"),i=n("./src/mixins/routable.ts"),a=n("./src/mixins/toggleable.ts"),o=n("./src/mixins/themeable.ts"),s=n("./src/directives/ripple.ts"),c=n("./src/util/mixins.ts"),u=function(){return(u=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=Object(c.default)(r.default,i.default,a.default,o.default).extend({name:"v-list-tile",directives:{Ripple:s.default},inheritAttrs:!1,props:{activeClass:{type:String,default:"primary--text"},avatar:Boolean,inactive:Boolean,tag:String},data:function(){return{proxyClass:"v-list__tile--active"}},computed:{listClasses:function(){return this.disabled?{"v-list--disabled":!0}:void 0},classes:function(){var t;return u({"v-list__tile":!0,"v-list__tile--link":this.isLink&&!this.inactive,"v-list__tile--avatar":this.avatar,"v-list__tile--disabled":this.disabled,"v-list__tile--active":!this.to&&this.isActive},this.themeClasses,((t={})[this.activeClass]=this.isActive,t))},isLink:function(){var t=this.$listeners&&(this.$listeners.click||this.$listeners["!click"]);return Boolean(this.href||this.to||t)}},render:function(t){var e=!this.inactive&&this.isLink?this.generateRouteLink(this.classes):{tag:this.tag||"div",data:{class:this.classes}},n=e.tag,r=e.data;return r.attrs=Object.assign({},r.attrs,this.$attrs),t("div",this.setTextColor(!this.disabled&&this.isActive&&this.color,{class:this.listClasses,attrs:{disabled:this.disabled,role:"listitem"}}),[t(n,r,this.$slots.default)])}})},"./src/components/VList/VListTileAction.ts":function(t,e,n){"use strict";n.r(e);var r=n("vue"),i=n.n(r);e.default=i.a.extend({name:"v-list-tile-action",functional:!0,render:function(t,e){var n=e.data,r=e.children,i=void 0===r?[]:r;return n.staticClass=n.staticClass?"v-list__tile__action "+n.staticClass:"v-list__tile__action",i.filter(function(t){return!1===t.isComment&&" "!==t.text}).length>1&&(n.staticClass+=" v-list__tile__action--stack"),t("div",n,i)}})},"./src/components/VList/VListTileAvatar.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VAvatar/index.ts"),i=n("vue"),a=n.n(i);e.default=a.a.extend({name:"v-list-tile-avatar",functional:!0,props:{color:String,size:{type:[Number,String],default:40},tile:Boolean},render:function(t,e){var n=e.data,i=e.children,a=e.props;return n.staticClass=("v-list__tile__avatar "+(n.staticClass||"")).trim(),t("div",n,[t(r.default,{props:{color:a.color,size:a.size,tile:a.tile}},[i])])}})},"./src/components/VList/index.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"VListTileActionText",function(){return u}),n.d(e,"VListTileContent",function(){return l}),n.d(e,"VListTileTitle",function(){return d}),n.d(e,"VListTileSubTitle",function(){return f});var r=n("./src/util/helpers.ts"),i=n("./src/components/VList/VList.ts");n.d(e,"VList",function(){return i.default});var a=n("./src/components/VList/VListGroup.ts");n.d(e,"VListGroup",function(){return a.default});var o=n("./src/components/VList/VListTile.ts");n.d(e,"VListTile",function(){return o.default});var s=n("./src/components/VList/VListTileAction.ts");n.d(e,"VListTileAction",function(){return s.default});var c=n("./src/components/VList/VListTileAvatar.ts");n.d(e,"VListTileAvatar",function(){return c.default});var u=Object(r.createSimpleFunctional)("v-list__tile__action-text","span"),l=Object(r.createSimpleFunctional)("v-list__tile__content","div"),d=Object(r.createSimpleFunctional)("v-list__tile__title","div"),f=Object(r.createSimpleFunctional)("v-list__tile__sub-title","div");e.default={$_vuetify_subcomponents:{VList:i.default,VListGroup:a.default,VListTile:o.default,VListTileAction:s.default,VListTileActionText:u,VListTileAvatar:c.default,VListTileContent:l,VListTileSubTitle:f,VListTileTitle:d}}},"./src/components/VMenu/VMenu.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_menus.styl");var r=n("vue"),i=n.n(r),a=n("./src/mixins/delayable.ts"),o=n("./src/mixins/dependent.ts"),s=n("./src/mixins/detachable.js"),c=n("./src/mixins/menuable.js"),u=n("./src/mixins/returnable.ts"),l=n("./src/mixins/toggleable.ts"),d=n("./src/mixins/themeable.ts"),f=n("./src/components/VMenu/mixins/menu-activator.js"),h=n("./src/components/VMenu/mixins/menu-generators.js"),p=n("./src/components/VMenu/mixins/menu-keyable.js"),m=n("./src/components/VMenu/mixins/menu-position.js"),v=n("./src/directives/click-outside.ts"),_=n("./src/directives/resize.ts"),g=n("./src/util/helpers.ts"),b=n("./src/util/ThemeProvider.ts"),y=n("./src/util/console.ts");e.default=i.a.extend({name:"v-menu",provide:function(){return{theme:this.theme}},directives:{ClickOutside:v.default,Resize:_.default},mixins:[f.default,o.default,a.default,s.default,h.default,p.default,c.default,m.default,u.default,l.default,d.default],props:{auto:Boolean,closeOnClick:{type:Boolean,default:!0},closeOnContentClick:{type:Boolean,default:!0},disabled:Boolean,fullWidth:Boolean,maxHeight:{default:"auto"},openOnClick:{type:Boolean,default:!0},offsetX:Boolean,offsetY:Boolean,openOnHover:Boolean,origin:{type:String,default:"top left"},transition:{type:[Boolean,String],default:"v-menu-transition"}},data:function(){return{defaultOffset:8,hasJustFocused:!1,resizeTimeout:null}},computed:{calculatedLeft:function(){var t=Math.max(this.dimensions.content.width,parseFloat(this.calculatedMinWidth));return this.auto?this.calcXOverflow(this.calcLeftAuto(),t)+"px":this.calcLeft(t)},calculatedMaxHeight:function(){return this.auto?"200px":Object(g.convertToUnit)(this.maxHeight)},calculatedMaxWidth:function(){return isNaN(this.maxWidth)?this.maxWidth:this.maxWidth+"px"},calculatedMinWidth:function(){if(this.minWidth)return isNaN(this.minWidth)?this.minWidth:this.minWidth+"px";var t=Math.min(this.dimensions.activator.width+this.nudgeWidth+(this.auto?16:0),Math.max(this.pageWidth-24,0)),e=isNaN(parseInt(this.calculatedMaxWidth))?t:parseInt(this.calculatedMaxWidth);return Math.min(e,t)+"px"},calculatedTop:function(){return!this.auto||this.isAttached?this.calcTop():this.calcYOverflow(this.calculatedTopAuto)+"px"},styles:function(){return{maxHeight:this.calculatedMaxHeight,minWidth:this.calculatedMinWidth,maxWidth:this.calculatedMaxWidth,top:this.calculatedTop,left:this.calculatedLeft,transformOrigin:this.origin,zIndex:this.zIndex||this.activeZIndex}}},watch:{activator:function(t,e){this.removeActivatorEvents(e),this.addActivatorEvents(t)},disabled:function(t){this.activator&&(t?this.removeActivatorEvents(this.activator):this.addActivatorEvents(this.activator))},isContentActive:function(t){this.hasJustFocused=t}},mounted:function(){this.isActive&&this.activate(),"v-slot"===Object(g.getSlotType)(this,"activator",!0)&&Object(y.consoleError)("v-tooltip's activator slot must be bound, try '<template #activator=\"data\"><v-btn v-on=\"data.on>'",this)},methods:{activate:function(){var t=this;this.getTiles(),this.updateDimensions(),requestAnimationFrame(function(){t.startTransition().then(function(){t.$refs.content&&(t.calculatedTopAuto=t.calcTopAuto(),t.auto&&(t.$refs.content.scrollTop=t.calcScrollPosition()))})})},closeConditional:function(t){return this.isActive&&!this._isDestroyed&&this.closeOnClick&&!this.$refs.content.contains(t.target)},onResize:function(){this.isActive&&(this.$refs.content.offsetWidth,this.updateDimensions(),clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(this.updateDimensions,100))}},render:function(t){return t("div",{staticClass:"v-menu",class:{"v-menu--inline":!this.fullWidth&&this.$slots.activator},directives:[{arg:500,name:"resize",value:this.onResize}],on:this.disableKeys?void 0:{keydown:this.onKeyDown}},[this.genActivator(),this.$createElement(b.default,{props:{root:!0,light:this.light,dark:this.dark}},[this.genTransition()])])}})},"./src/components/VMenu/index.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VMenu/VMenu.js");n.d(e,"VMenu",function(){return r.default}),e.default=r.default},"./src/components/VMenu/mixins/menu-activator.js":function(t,e,n){"use strict";n.r(e),e.default={methods:{activatorClickHandler:function(t){this.openOnClick&&!this.isActive?(this.getActivator(t).focus(),this.isActive=!0,this.absoluteX=t.clientX,this.absoluteY=t.clientY):this.closeOnClick&&this.isActive&&(this.getActivator(t).blur(),this.isActive=!1)},mouseEnterHandler:function(){var t=this;this.runDelay("open",function(){t.hasJustFocused||(t.hasJustFocused=!0,t.isActive=!0)})},mouseLeaveHandler:function(t){var e=this;this.runDelay("close",function(){e.$refs.content.contains(t.relatedTarget)||requestAnimationFrame(function(){e.isActive=!1,e.callDeactivate()})})},addActivatorEvents:function(t){void 0===t&&(t=null),t&&!this.disabled&&t.addEventListener("click",this.activatorClickHandler)},removeActivatorEvents:function(t){void 0===t&&(t=null),t&&t.removeEventListener("click",this.activatorClickHandler)}}}},"./src/components/VMenu/mixins/menu-generators.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/util/helpers.ts"),i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},a=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},o=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(a(arguments[e]));return t};e.default={methods:{genActivator:function(){if(!this.$slots.activator&&!this.$scopedSlots.activator)return null;var t={};if(this.disabled||(this.openOnHover?(t.mouseenter=this.mouseEnterHandler,t.mouseleave=this.mouseLeaveHandler):this.openOnClick&&(t.click=this.activatorClickHandler)),"scoped"===Object(r.getSlotType)(this,"activator")){t.keydown=this.onKeyDown;var e=this.$scopedSlots.activator({on:t});return this.activatorNode=e,e}return this.$createElement("div",{staticClass:"v-menu__activator",class:{"v-menu__activator--active":this.hasJustFocused||this.isActive,"v-menu__activator--disabled":this.disabled},ref:"activator",on:t},this.$slots.activator)},genTransition:function(){return this.transition?this.$createElement("transition",{props:{name:this.transition}},[this.genContent()]):this.genContent()},genDirectives:function(){var t=this,e=!this.openOnHover&&this.closeOnClick?[{name:"click-outside",value:function(){t.isActive=!1},args:{closeConditional:this.closeConditional,include:function(){return o([t.$el],t.getOpenDependentElements())}}}]:[];return e.push({name:"show",value:this.isContentActive}),e},genContent:function(){var t,e=this,n={attrs:this.getScopeIdAttrs(),staticClass:"v-menu__content",class:i({},this.rootThemeClasses,(t={"v-menu__content--auto":this.auto,"v-menu__content--fixed":this.activatorFixed,menuable__content__active:this.isActive},t[this.contentClass.trim()]=!0,t)),style:this.styles,directives:this.genDirectives(),ref:"content",on:{click:function(t){t.stopPropagation(),t.target.getAttribute("disabled")||e.closeOnContentClick&&(e.isActive=!1)},keydown:this.onKeyDown}};return!this.disabled&&this.openOnHover&&(n.on.mouseenter=this.mouseEnterHandler),this.openOnHover&&(n.on.mouseleave=this.mouseLeaveHandler),this.$createElement("div",n,this.showLazyContent(this.$slots.default))}}}},"./src/components/VMenu/mixins/menu-keyable.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/util/helpers.ts");e.default={props:{disableKeys:Boolean},data:function(){return{listIndex:-1,tiles:[]}},watch:{isActive:function(t){t||(this.listIndex=-1)},listIndex:function(t,e){if(t in this.tiles){var n=this.tiles[t];n.classList.add("v-list__tile--highlighted"),this.$refs.content.scrollTop=n.offsetTop-n.clientHeight}e in this.tiles&&this.tiles[e].classList.remove("v-list__tile--highlighted")}},methods:{onKeyDown:function(t){var e=this;if(t.keyCode===r.keyCodes.esc){setTimeout(function(){e.isActive=!1});var n=this.getActivator();this.$nextTick(function(){return n&&n.focus()})}else t.keyCode===r.keyCodes.tab?setTimeout(function(){e.$refs.content.contains(document.activeElement)||(e.isActive=!1)}):this.changeListIndex(t)},changeListIndex:function(t){if(this.getTiles(),t.keyCode===r.keyCodes.down&&this.listIndex<this.tiles.length-1)this.listIndex++;else if(t.keyCode===r.keyCodes.up&&this.listIndex>-1)this.listIndex--;else{if(t.keyCode!==r.keyCodes.enter||-1===this.listIndex)return;this.tiles[this.listIndex].click()}t.preventDefault()},getTiles:function(){this.tiles=this.$refs.content.querySelectorAll(".v-list__tile")}}}},"./src/components/VMenu/mixins/menu-position.js":function(t,e,n){"use strict";n.r(e),e.default={data:function(){return{calculatedTopAuto:0}},methods:{calcScrollPosition:function(){var t=this.$refs.content,e=t.querySelector(".v-list__tile--active"),n=t.scrollHeight-t.offsetHeight;return e?Math.min(n,Math.max(0,e.offsetTop-t.offsetHeight/2+e.offsetHeight/2)):t.scrollTop},calcLeftAuto:function(){return this.isAttached?0:parseInt(this.dimensions.activator.left-2*this.defaultOffset)},calcTopAuto:function(){var t=this.$refs.content,e=t.querySelector(".v-list__tile--active");if(e||(this.selectedIndex=null),this.offsetY||!e)return this.computedTop;this.selectedIndex=Array.from(this.tiles).indexOf(e);var n=e.offsetTop-this.calcScrollPosition(),r=t.querySelector(".v-list__tile").offsetTop;return this.computedTop-n-r}}}},"./src/components/VMessages/VMessages.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_messages.styl");var r=n("./src/mixins/colorable.ts"),i=n("./src/mixins/themeable.ts"),a=n("./src/util/mixins.ts");e.default=Object(a.default)(r.default,i.default).extend({name:"v-messages",props:{value:{type:Array,default:function(){return[]}}},methods:{genChildren:function(){return this.$createElement("transition-group",{staticClass:"v-messages__wrapper",attrs:{name:"message-transition",tag:"div"}},this.value.map(this.genMessage))},genMessage:function(t,e){return this.$createElement("div",{staticClass:"v-messages__message",key:e,domProps:{innerHTML:t}})}},render:function(t){return t("div",this.setTextColor(this.color,{staticClass:"v-messages",class:this.themeClasses}),[this.genChildren()])}})},"./src/components/VMessages/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VMessages/VMessages.ts");n.d(e,"VMessages",function(){return r.default}),e.default=r.default},"./src/components/VNavigationDrawer/VNavigationDrawer.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_navigation-drawer.styl");var r=n("./src/mixins/applicationable.ts"),i=n("./src/mixins/dependent.ts"),a=n("./src/mixins/overlayable.ts"),o=n("./src/mixins/ssr-bootable.ts"),s=n("./src/mixins/themeable.ts"),c=n("./src/directives/click-outside.ts"),u=n("./src/directives/resize.ts"),l=n("./src/directives/touch.ts"),d=n("./src/util/helpers.ts"),f=n("./src/util/mixins.ts"),h=function(){return(h=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=Object(f.default)(Object(r.default)("left",["miniVariant","right","width"]),i.default,a.default,o.default,s.default).extend({name:"v-navigation-drawer",directives:{ClickOutside:c.default,Resize:u.default,Touch:l.default},props:{clipped:Boolean,disableRouteWatcher:Boolean,disableResizeWatcher:Boolean,height:{type:[Number,String],default:"100%"},floating:Boolean,miniVariant:Boolean,miniVariantWidth:{type:[Number,String],default:80},mobileBreakPoint:{type:[Number,String],default:1264},permanent:Boolean,right:Boolean,stateless:Boolean,temporary:Boolean,touchless:Boolean,width:{type:[Number,String],default:300},value:{required:!1}},data:function(){return{isActive:!1,touchArea:{left:0,right:0}}},computed:{applicationProperty:function(){return this.right?"right":"left"},calculatedTransform:function(){return this.isActive?0:this.right?this.calculatedWidth:-this.calculatedWidth},calculatedWidth:function(){return parseInt(this.miniVariant?this.miniVariantWidth:this.width)},classes:function(){return h({"v-navigation-drawer":!0,"v-navigation-drawer--absolute":this.absolute,"v-navigation-drawer--clipped":this.clipped,"v-navigation-drawer--close":!this.isActive,"v-navigation-drawer--fixed":!this.absolute&&(this.app||this.fixed),"v-navigation-drawer--floating":this.floating,"v-navigation-drawer--is-mobile":this.isMobile,"v-navigation-drawer--mini-variant":this.miniVariant,"v-navigation-drawer--open":this.isActive,"v-navigation-drawer--right":this.right,"v-navigation-drawer--temporary":this.temporary},this.themeClasses)},hasApp:function(){return this.app&&!this.isMobile&&!this.temporary},isMobile:function(){return!this.stateless&&!this.permanent&&!this.temporary&&this.$vuetify.breakpoint.width<parseInt(this.mobileBreakPoint,10)},marginTop:function(){if(!this.hasApp)return 0;var t=this.$vuetify.application.bar;return t+=this.clipped?this.$vuetify.application.top:0,t},maxHeight:function(){if(!this.hasApp)return null;var t=this.$vuetify.application.bottom+this.$vuetify.application.footer+this.$vuetify.application.bar;return this.clipped?t+this.$vuetify.application.top:t},reactsToClick:function(){return!this.stateless&&!this.permanent&&(this.isMobile||this.temporary)},reactsToMobile:function(){return!(this.disableResizeWatcher||this.stateless||this.permanent||this.temporary)},reactsToRoute:function(){return!this.disableRouteWatcher&&!this.stateless&&(this.temporary||this.isMobile)},resizeIsDisabled:function(){return this.disableResizeWatcher||this.stateless},showOverlay:function(){return this.isActive&&(this.isMobile||this.temporary)},styles:function(){var t={height:Object(d.convertToUnit)(this.height),marginTop:this.marginTop+"px",maxHeight:null!=this.maxHeight?"calc(100% - "+ +this.maxHeight+"px)":void 0,transform:"translateX("+this.calculatedTransform+"px)",width:this.calculatedWidth+"px"};return t}},watch:{$route:function(){this.reactsToRoute&&this.closeConditional()&&(this.isActive=!1)},isActive:function(t){this.$emit("input",t),this.callUpdate()},isMobile:function(t,e){!t&&this.isActive&&!this.temporary&&this.removeOverlay(),null!=e&&!this.resizeIsDisabled&&this.reactsToMobile&&(this.isActive=!t,this.callUpdate())},permanent:function(t){t&&(this.isActive=!0),this.callUpdate()},showOverlay:function(t){t?this.genOverlay():this.removeOverlay()},temporary:function(){this.callUpdate()},value:function(t){if(!this.permanent){if(null==t)return this.init();t!==this.isActive&&(this.isActive=t)}}},beforeMount:function(){this.init()},methods:{calculateTouchArea:function(){if(this.$el.parentNode){var t=this.$el.parentNode.getBoundingClientRect();this.touchArea={left:t.left+50,right:t.right-50}}},closeConditional:function(){return this.isActive&&!this._isDestroyed&&this.reactsToClick},genDirectives:function(){var t=this,e=[{name:"click-outside",value:function(){return t.isActive=!1},args:{closeConditional:this.closeConditional,include:this.getOpenDependentElements}}];return!this.touchless&&e.push({name:"touch",value:{parent:!0,left:this.swipeLeft,right:this.swipeRight}}),e},init:function(){this.permanent?this.isActive=!0:this.stateless||null!=this.value?this.isActive=this.value:this.temporary||(this.isActive=!this.isMobile)},swipeRight:function(t){this.isActive&&!this.right||(this.calculateTouchArea(),Math.abs(t.touchendX-t.touchstartX)<100||(!this.right&&t.touchstartX<=this.touchArea.left?this.isActive=!0:this.right&&this.isActive&&(this.isActive=!1)))},swipeLeft:function(t){this.isActive&&this.right||(this.calculateTouchArea(),Math.abs(t.touchendX-t.touchstartX)<100||(this.right&&t.touchstartX>=this.touchArea.right?this.isActive=!0:!this.right&&this.isActive&&(this.isActive=!1)))},updateApplication:function(){return!this.isActive||this.temporary||this.isMobile?0:this.calculatedWidth}},render:function(t){var e=this;return t("aside",{class:this.classes,style:this.styles,directives:this.genDirectives(),on:{click:function(){e.miniVariant&&e.$emit("update:miniVariant",!1)},transitionend:function(t){if(t.target===t.currentTarget){e.$emit("transitionend",t);var n=document.createEvent("UIEvents");n.initUIEvent("resize",!0,!1,window,0),window.dispatchEvent(n)}}}},[this.$slots.default,t("div",{class:"v-navigation-drawer__border"})])}})},"./src/components/VNavigationDrawer/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VNavigationDrawer/VNavigationDrawer.ts");n.d(e,"VNavigationDrawer",function(){return r.default}),e.default=r.default},"./src/components/VOverflowBtn/VOverflowBtn.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_overflow-buttons.styl");var r=n("./src/components/VSelect/VSelect.js"),i=n("./src/components/VAutocomplete/index.js"),a=n("./src/components/VTextField/VTextField.js"),o=n("./src/components/VBtn/index.ts"),s=n("./src/util/console.ts");e.default=i.default.extend({name:"v-overflow-btn",props:{segmented:Boolean,editable:Boolean,transition:r.default.options.props.transition},computed:{classes:function(){return Object.assign(i.default.options.computed.classes.call(this),{"v-overflow-btn":!0,"v-overflow-btn--segmented":this.segmented,"v-overflow-btn--editable":this.editable})},isAnyValueAllowed:function(){return this.editable||i.default.options.computed.isAnyValueAllowed.call(this)},isSingle:function(){return!0},computedItems:function(){return this.segmented?this.allItems:this.filteredItems},$_menuProps:function(){var t=i.default.options.computed.$_menuProps.call(this);return t.transition=t.transition||"v-menu-transition",t}},methods:{genSelections:function(){return this.editable?i.default.options.methods.genSelections.call(this):r.default.options.methods.genSelections.call(this)},genCommaSelection:function(t,e,n){return this.segmented?this.genSegmentedBtn(t):r.default.options.methods.genCommaSelection.call(this,t,e,n)},genInput:function(){var t=a.default.options.methods.genInput.call(this);return t.data.domProps.value=this.editable?this.internalSearch:"",t.data.attrs.readonly=!this.isAnyValueAllowed,t},genLabel:function(){if(this.editable&&this.isFocused)return null;var t=a.default.options.methods.genLabel.call(this);return t?(t.data.style={},t):t},genSegmentedBtn:function(t){var e=this,n=this.getValue(t),r=this.computedItems.find(function(t){return e.getValue(t)===n})||t;return r.text&&r.callback?this.$createElement(o.default,{props:{flat:!0},on:{click:function(t){t.stopPropagation(),r.callback(t)}}},[r.text]):(Object(s.consoleWarn)("When using 'segmented' prop without a selection slot, items must contain both a text and callback property",this),null)}}})},"./src/components/VOverflowBtn/index.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VOverflowBtn/VOverflowBtn.js");n.d(e,"VOverflowBtn",function(){return r.default}),e.default=r.default},"./src/components/VPagination/VPagination.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_pagination.styl");var r=n("./src/components/VIcon/index.ts"),i=n("./src/directives/resize.ts"),a=n("./src/util/mixins.ts"),o=n("./src/mixins/colorable.ts"),s=n("./src/mixins/themeable.ts"),c=function(){return(c=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},u=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},l=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(u(arguments[e]));return t};e.default=Object(a.default)(o.default,s.default).extend({name:"v-pagination",directives:{Resize:i.default},props:{circle:Boolean,disabled:Boolean,length:{type:Number,default:0,validator:function(t){return t%1==0}},totalVisible:[Number,String],nextIcon:{type:String,default:"$vuetify.icons.next"},prevIcon:{type:String,default:"$vuetify.icons.prev"},value:{type:Number,default:0}},data:function(){return{maxButtons:0,selected:null}},computed:{classes:function(){return c({"v-pagination":!0,"v-pagination--circle":this.circle,"v-pagination--disabled":this.disabled},this.themeClasses)},items:function(){var t=parseInt(this.totalVisible,10)||this.maxButtons;if(this.length<=t)return this.range(1,this.length);var e=t%2==0?1:0,n=Math.floor(t/2),r=this.length-n+1+e;if(this.value>n&&this.value<r){var i=this.value-n+2,a=this.value+n-2-e;return l([1,"..."],this.range(i,a),["...",this.length])}if(this.value===n){a=this.value+n-1-e;return l(this.range(1,a),["...",this.length])}if(this.value===r){i=this.value-n+1;return l([1,"..."],this.range(i,this.length))}return l(this.range(1,n),["..."],this.range(r,this.length))}},watch:{value:function(){this.init()}},mounted:function(){this.init()},methods:{init:function(){var t=this;this.selected=null,this.$nextTick(this.onResize),setTimeout(function(){return t.selected=t.value},100)},onResize:function(){var t=this.$el&&this.$el.parentElement?this.$el.parentElement.clientWidth:window.innerWidth;this.maxButtons=Math.floor((t-96)/42)},next:function(t){t.preventDefault(),this.$emit("input",this.value+1),this.$emit("next")},previous:function(t){t.preventDefault(),this.$emit("input",this.value-1),this.$emit("previous")},range:function(t,e){for(var n=[],r=t=t>0?t:1;r<=e;r++)n.push(r);return n},genIcon:function(t,e,n,i){return t("li",[t("button",{staticClass:"v-pagination__navigation",class:{"v-pagination__navigation--disabled":n},attrs:{type:"button"},on:n?{}:{click:i}},[t(r.default,[e])])])},genItem:function(t,e){var n=this,r=e===this.value&&(this.color||"primary");return t("button",this.setBackgroundColor(r,{staticClass:"v-pagination__item",class:{"v-pagination__item--active":e===this.value},attrs:{type:"button"},on:{click:function(){return n.$emit("input",e)}}}),[e.toString()])},genItems:function(t){var e=this;return this.items.map(function(n,r){return t("li",{key:r},[isNaN(Number(n))?t("span",{class:"v-pagination__more"},[n.toString()]):e.genItem(t,n)])})}},render:function(t){var e=[this.genIcon(t,this.$vuetify.rtl?this.nextIcon:this.prevIcon,this.value<=1,this.previous),this.genItems(t),this.genIcon(t,this.$vuetify.rtl?this.prevIcon:this.nextIcon,this.value>=this.length,this.next)];return t("ul",{directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}],class:this.classes},e)}})},"./src/components/VPagination/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VPagination/VPagination.ts");n.d(e,"VPagination",function(){return r.default}),e.default=r.default},"./src/components/VParallax/VParallax.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_parallax.styl");var r=n("./src/mixins/translatable.ts"),i=n("./src/util/mixins.ts");e.default=Object(i.default)(r.default).extend({name:"v-parallax",props:{alt:{type:String,default:""},height:{type:[String,Number],default:500},src:String},data:function(){return{isBooted:!1}},computed:{styles:function(){return{display:"block",opacity:this.isBooted?1:0,transform:"translate(-50%, "+this.parallax+"px)"}}},watch:{parallax:function(){this.isBooted=!0}},mounted:function(){this.init()},methods:{init:function(){var t=this,e=this.$refs.img;e&&(e.complete?(this.translate(),this.listeners()):e.addEventListener("load",function(){t.translate(),t.listeners()},!1))},objHeight:function(){return this.$refs.img.naturalHeight}},render:function(t){var e=t("div",{staticClass:"v-parallax__image-container"},[t("img",{staticClass:"v-parallax__image",style:this.styles,attrs:{src:this.src,alt:this.alt},ref:"img"})]),n=t("div",{staticClass:"v-parallax__content"},this.$slots.default);return t("div",{staticClass:"v-parallax",style:{height:this.height+"px"},on:this.$listeners},[e,n])}})},"./src/components/VParallax/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VParallax/VParallax.ts");n.d(e,"VParallax",function(){return r.default}),e.default=r.default},"./src/components/VPicker/VPicker.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_pickers.styl"),n("./src/stylus/components/_cards.styl");var r=n("./src/mixins/colorable.ts"),i=n("./src/mixins/themeable.ts"),a=n("./src/util/helpers.ts"),o=n("./src/util/mixins.ts"),s=function(){return(s=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=Object(o.default)(r.default,i.default).extend({name:"v-picker",props:{fullWidth:Boolean,landscape:Boolean,transition:{type:String,default:"fade-transition"},width:{type:[Number,String],default:290}},computed:{computedTitleColor:function(){var t=!this.isDark&&(this.color||"primary");return this.color||t}},methods:{genTitle:function(){return this.$createElement("div",this.setBackgroundColor(this.computedTitleColor,{staticClass:"v-picker__title",class:{"v-picker__title--landscape":this.landscape}}),this.$slots.title)},genBodyTransition:function(){return this.$createElement("transition",{props:{name:this.transition}},this.$slots.default)},genBody:function(){return this.$createElement("div",{staticClass:"v-picker__body",class:this.themeClasses,style:this.fullWidth?void 0:{width:Object(a.convertToUnit)(this.width)}},[this.genBodyTransition()])},genActions:function(){return this.$createElement("div",{staticClass:"v-picker__actions v-card__actions"},this.$slots.actions)}},render:function(t){return t("div",{staticClass:"v-picker v-card",class:s({"v-picker--landscape":this.landscape,"v-picker--full-width":this.fullWidth},this.themeClasses)},[this.$slots.title?this.genTitle():null,this.genBody(),this.$slots.actions?this.genActions():null])}})},"./src/components/VPicker/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VPicker/VPicker.ts");n.d(e,"VPicker",function(){return r.default}),e.default=r.default},"./src/components/VProgressCircular/VProgressCircular.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_progress-circular.styl");var r=n("./src/mixins/colorable.ts"),i=n("./src/util/mixins.ts");e.default=Object(i.default)(r.default).extend({name:"v-progress-circular",props:{button:Boolean,indeterminate:Boolean,rotate:{type:[Number,String],default:0},size:{type:[Number,String],default:32},width:{type:[Number,String],default:4},value:{type:[Number,String],default:0}},computed:{calculatedSize:function(){return Number(this.size)+(this.button?8:0)},circumference:function(){return 2*Math.PI*this.radius},classes:function(){return{"v-progress-circular--indeterminate":this.indeterminate,"v-progress-circular--button":this.button}},normalizedValue:function(){return this.value<0?0:this.value>100?100:parseFloat(this.value)},radius:function(){return 20},strokeDashArray:function(){return Math.round(1e3*this.circumference)/1e3},strokeDashOffset:function(){return(100-this.normalizedValue)/100*this.circumference+"px"},strokeWidth:function(){return Number(this.width)/+this.size*this.viewBoxSize*2},styles:function(){return{height:this.calculatedSize+"px",width:this.calculatedSize+"px"}},svgStyles:function(){return{transform:"rotate("+Number(this.rotate)+"deg)"}},viewBoxSize:function(){return this.radius/(1-Number(this.width)/+this.size)}},methods:{genCircle:function(t,e,n){return t("circle",{class:"v-progress-circular__"+e,attrs:{fill:"transparent",cx:2*this.viewBoxSize,cy:2*this.viewBoxSize,r:this.radius,"stroke-width":this.strokeWidth,"stroke-dasharray":this.strokeDashArray,"stroke-dashoffset":n}})},genSvg:function(t){var e=[this.indeterminate||this.genCircle(t,"underlay",0),this.genCircle(t,"overlay",this.strokeDashOffset)];return t("svg",{style:this.svgStyles,attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:this.viewBoxSize+" "+this.viewBoxSize+" "+2*this.viewBoxSize+" "+2*this.viewBoxSize}},e)}},render:function(t){var e=t("div",{staticClass:"v-progress-circular__info"},this.$slots.default),n=this.genSvg(t);return t("div",this.setTextColor(this.color,{staticClass:"v-progress-circular",attrs:{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":this.indeterminate?void 0:this.normalizedValue},class:this.classes,style:this.styles,on:this.$listeners}),[n,e])}})},"./src/components/VProgressCircular/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VProgressCircular/VProgressCircular.ts");n.d(e,"VProgressCircular",function(){return r.default}),e.default=r.default},"./src/components/VProgressLinear/VProgressLinear.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_progress-linear.styl");var r=n("./src/mixins/colorable.ts"),i=n("./src/util/helpers.ts"),a=n("./src/util/mixins.ts"),o=n("./src/components/transitions/index.js");e.default=Object(a.default)(r.default).extend({name:"v-progress-linear",props:{active:{type:Boolean,default:!0},backgroundColor:{type:String,default:null},backgroundOpacity:{type:[Number,String],default:null},bufferValue:{type:[Number,String],default:100},color:{type:String,default:"primary"},height:{type:[Number,String],default:7},indeterminate:Boolean,query:Boolean,value:{type:[Number,String],default:0}},computed:{backgroundStyle:function(){var t=null==this.backgroundOpacity?this.backgroundColor?1:.3:parseFloat(this.backgroundOpacity);return{height:this.active?Object(i.convertToUnit)(this.height):0,opacity:t,width:this.normalizedBufer+"%"}},effectiveWidth:function(){return this.normalizedBufer?100*+this.normalizedValue/+this.normalizedBufer:0},normalizedBufer:function(){return this.bufferValue<0?0:this.bufferValue>100?100:parseFloat(this.bufferValue)},normalizedValue:function(){return this.value<0?0:this.value>100?100:parseFloat(this.value)},styles:function(){var t={};return this.active||(t.height=0),this.indeterminate||100===parseFloat(this.normalizedBufer)||(t.width=this.normalizedBufer+"%"),t}},methods:{genDeterminate:function(t){return t("div",this.setBackgroundColor(this.color,{ref:"front",staticClass:"v-progress-linear__bar__determinate",style:{width:this.effectiveWidth+"%"}}))},genBar:function(t,e){var n;return t("div",this.setBackgroundColor(this.color,{staticClass:"v-progress-linear__bar__indeterminate",class:(n={},n[e]=!0,n)}))},genIndeterminate:function(t){return t("div",{ref:"front",staticClass:"v-progress-linear__bar__indeterminate",class:{"v-progress-linear__bar__indeterminate--active":this.active}},[this.genBar(t,"long"),this.genBar(t,"short")])}},render:function(t){var e=t(o.VFadeTransition,this.indeterminate?[this.genIndeterminate(t)]:[]),n=t(o.VSlideXTransition,this.indeterminate?[]:[this.genDeterminate(t)]),r=t("div",{staticClass:"v-progress-linear__bar",style:this.styles},[e,n]),a=t("div",this.setBackgroundColor(this.backgroundColor||this.color,{staticClass:"v-progress-linear__background",style:this.backgroundStyle})),s=this.$slots.default&&t("div",{staticClass:"v-progress-linear__content"},this.$slots.default);return t("div",{staticClass:"v-progress-linear",attrs:{role:"progressbar","aria-valuemin":0,"aria-valuemax":this.normalizedBufer,"aria-valuenow":this.indeterminate?void 0:this.normalizedValue},class:{"v-progress-linear--query":this.query},style:{height:Object(i.convertToUnit)(this.height)},on:this.$listeners},[a,r,s])}})},"./src/components/VProgressLinear/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VProgressLinear/VProgressLinear.ts");n.d(e,"VProgressLinear",function(){return r.default}),e.default=r.default},"./src/components/VRadioGroup/VRadio.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_radios.styl");var r=n("./src/components/VIcon/index.ts"),i=n("./src/components/VLabel/index.ts"),a=n("./src/mixins/colorable.ts"),o=n("./src/mixins/rippleable.ts"),s=n("./src/mixins/themeable.ts"),c=n("./src/mixins/selectable.js"),u=n("./src/mixins/registrable.ts"),l=function(){return(l=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},d=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},f=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(d(arguments[e]));return t};e.default={name:"v-radio",mixins:[a.default,o.default,Object(u.inject)("radio","v-radio","v-radio-group"),s.default],inheritAttrs:!1,props:{color:{type:String,default:"accent"},disabled:Boolean,label:String,onIcon:{type:String,default:"$vuetify.icons.radioOn"},offIcon:{type:String,default:"$vuetify.icons.radioOff"},readonly:Boolean,value:null},data:function(){return{isActive:!1,isFocused:!1,parentError:!1}},computed:{computedData:function(){return this.setTextColor(!this.parentError&&this.isActive&&this.color,{staticClass:"v-radio",class:l({"v-radio--is-disabled":this.isDisabled,"v-radio--is-focused":this.isFocused},this.themeClasses)})},computedColor:function(){return this.isActive?this.color:this.radio.validationState||!1},computedIcon:function(){return this.isActive?this.onIcon:this.offIcon},hasState:function(){return this.isActive||!!this.radio.validationState},isDisabled:function(){return this.disabled||!!this.radio.disabled},isReadonly:function(){return this.readonly||!!this.radio.readonly}},mounted:function(){this.radio.register(this)},beforeDestroy:function(){this.radio.unregister(this)},methods:{genInput:function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=c.default.options.methods.genInput).call.apply(t,f([this],e))},genLabel:function(){return this.$createElement(i.default,{on:{click:this.onChange},attrs:{for:this.id},props:{color:this.radio.validationState||"",dark:this.dark,focused:this.hasState,light:this.light}},this.$slots.label||this.label)},genRadio:function(){return this.$createElement("div",{staticClass:"v-input--selection-controls__input"},[this.genInput("radio",l({name:this.radio.name||!!this.radio._uid&&"v-radio-"+this.radio._uid,value:this.value},this.$attrs)),this.genRipple(this.setTextColor(this.computedColor)),this.$createElement(r.default,this.setTextColor(this.computedColor,{props:{dark:this.dark,light:this.light}}),this.computedIcon)])},onFocus:function(t){this.isFocused=!0,this.$emit("focus",t)},onBlur:function(t){this.isFocused=!1,this.$emit("blur",t)},onChange:function(){this.isDisabled||this.isReadonly||this.isDisabled||this.isActive&&this.radio.mandatory||this.$emit("change",this.value)},onKeydown:function(){}},render:function(t){return t("div",this.computedData,[this.genRadio(),this.genLabel()])}}},"./src/components/VRadioGroup/VRadioGroup.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_selection-controls.styl"),n("./src/stylus/components/_radio-group.styl");var r=n("./src/components/VInput/index.ts"),i=n("./src/mixins/comparable.ts"),a=n("./src/mixins/registrable.ts");e.default=r.default.extend({name:"v-radio-group",mixins:[i.default,Object(a.provide)("radio")],model:{prop:"value",event:"change"},provide:function(){return{radio:this}},props:{column:{type:Boolean,default:!0},height:{type:[Number,String],default:"auto"},mandatory:{type:Boolean,default:!0},name:String,row:Boolean,value:{default:null}},data:function(){return{internalTabIndex:-1,radios:[]}},computed:{classes:function(){return{"v-input--selection-controls v-input--radio-group":!0,"v-input--radio-group--column":this.column&&!this.row,"v-input--radio-group--row":this.row}}},watch:{hasError:"setErrorState",internalValue:"setActiveRadio"},mounted:function(){this.setErrorState(this.hasError),this.setActiveRadio()},methods:{genDefaultSlot:function(){return this.$createElement("div",{staticClass:"v-input--radio-group__input",attrs:{role:"radiogroup"}},r.default.options.methods.genDefaultSlot.call(this))},onRadioChange:function(t){this.disabled||(this.hasInput=!0,this.internalValue=t,this.setActiveRadio(),this.$nextTick(this.validate))},onRadioBlur:function(t){t.relatedTarget&&t.relatedTarget.classList.contains("v-radio")||(this.hasInput=!0,this.$emit("blur",t))},register:function(t){t.isActive=this.valueComparator(this.internalValue,t.value),t.$on("change",this.onRadioChange),t.$on("blur",this.onRadioBlur),this.radios.push(t)},setErrorState:function(t){for(var e=this.radios.length;--e>=0;)this.radios[e].parentError=t},setActiveRadio:function(){for(var t=this.radios.length;--t>=0;){var e=this.radios[t];e.isActive=this.valueComparator(this.internalValue,e.value)}},unregister:function(t){t.$off("change",this.onRadioChange),t.$off("blur",this.onRadioBlur);var e=this.radios.findIndex(function(e){return e===t});e>-1&&this.radios.splice(e,1)}}})},"./src/components/VRadioGroup/index.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VRadioGroup/VRadioGroup.js");n.d(e,"VRadioGroup",function(){return r.default});var i=n("./src/components/VRadioGroup/VRadio.js");n.d(e,"VRadio",function(){return i.default}),e.default={$_vuetify_subcomponents:{VRadioGroup:r.default,VRadio:i.default}}},"./src/components/VRangeSlider/VRangeSlider.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_range-sliders.styl");var r=n("./src/components/VSlider/index.js"),i=n("./src/util/helpers.ts");e.default={name:"v-range-slider",extends:r.default,props:{value:{type:Array,default:function(){return[]}}},data:function(t){return{activeThumb:null,lazyValue:t.value.length?t.value:[0,0]}},computed:{classes:function(){return Object.assign({},{"v-input--range-slider":!0},r.default.options.computed.classes.call(this))},internalValue:{get:function(){return this.lazyValue},set:function(t){var e=this,n=this.min,r=this.max,a=t.map(function(t){return e.roundValue(Math.min(Math.max(t,n),r))});(a[0]>a[1]||a[1]<a[0])&&(null!==this.activeThumb&&(this.activeThumb=1===this.activeThumb?0:1),a=[a[1],a[0]]),this.lazyValue=a,Object(i.deepEqual)(a,this.value)||this.$emit("input",a),this.validate()}},inputWidth:function(){var t=this;return this.internalValue.map(function(e){return(t.roundValue(e)-t.min)/(t.max-t.min)*100})},isDirty:function(){var t=this;return this.internalValue.some(function(e){return e!==t.min})||this.alwaysDirty},trackFillStyles:function(){var t=r.default.options.computed.trackFillStyles.call(this),e=Math.abs(this.inputWidth[0]-this.inputWidth[1]);return t.width="calc("+e+"% - "+this.trackPadding+"px)",t[this.$vuetify.rtl?"right":"left"]=this.inputWidth[0]+"%",t},trackPadding:function(){return this.isDirty||this.internalValue[0]?0:r.default.options.computed.trackPadding.call(this)}},methods:{getIndexOfClosestValue:function(t,e){return Math.abs(t[0]-e)<Math.abs(t[1]-e)?0:1},genInput:function(){var t=this;return Object(i.createRange)(2).map(function(e){var n=r.default.options.methods.genInput.call(t);return n.data.attrs.value=t.internalValue[e],n.data.on.focus=function(n){t.activeThumb=e,r.default.options.methods.onFocus.call(t,n)},n})},genChildren:function(){var t=this;return[this.genInput(),this.genTrackContainer(),this.genSteps(),Object(i.createRange)(2).map(function(e){var n=t.internalValue[e],r=t.inputWidth[e],i=(t.isFocused||t.isActive)&&t.activeThumb===e;return t.genThumbContainer(n,r,i,function(n){t.isActive=!0,t.activeThumb=e,t.onThumbMouseDown(n)})})]},onSliderClick:function(t){this.isActive||(this.isFocused=!0,this.onMouseMove(t,!0),this.$emit("change",this.internalValue))},onMouseMove:function(t,e){void 0===e&&(e=!1);var n=this.parseMouseMove(t),r=n.value;n.isInsideTrack&&(e&&(this.activeThumb=this.getIndexOfClosestValue(this.internalValue,r)),this.setInternalValue(r))},onKeyDown:function(t){var e=this.parseKeyDown(t,this.internalValue[this.activeThumb]);null!=e&&this.setInternalValue(e)},setInternalValue:function(t){var e=this;this.internalValue=this.internalValue.map(function(n,r){return r===e.activeThumb?t:Number(n)})}}}},"./src/components/VRangeSlider/index.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VRangeSlider/VRangeSlider.js");n.d(e,"VRangeSlider",function(){return r.default}),e.default=r.default},"./src/components/VRating/VRating.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_rating.styl");var r=n("./src/components/VIcon/index.ts"),i=n("./src/mixins/colorable.ts"),a=n("./src/mixins/delayable.ts"),o=n("./src/mixins/sizeable.ts"),s=n("./src/mixins/rippleable.ts"),c=n("./src/mixins/themeable.ts"),u=n("./src/util/helpers.ts"),l=n("./src/util/mixins.ts");e.default=Object(l.default)(i.default,a.default,s.default,o.default,c.default).extend({name:"v-rating",props:{backgroundColor:{type:String,default:"accent"},color:{type:String,default:"primary"},dense:Boolean,emptyIcon:{type:String,default:"$vuetify.icons.ratingEmpty"},fullIcon:{type:String,default:"$vuetify.icons.ratingFull"},halfIcon:{type:String,default:"$vuetify.icons.ratingHalf"},halfIncrements:Boolean,length:{type:[Number,String],default:5},clearable:Boolean,readonly:Boolean,hover:Boolean,value:{type:Number,default:0}},data:function(){return{hoverIndex:-1,internalValue:this.value}},computed:{directives:function(){return this.readonly||!this.ripple?[]:[{name:"ripple",value:{circle:!0}}]},iconProps:function(){var t=this.$props,e=t.dark,n=t.medium,r=t.large,i=t.light,a=t.small;return{dark:e,medium:n,large:r,light:i,size:t.size,small:a,xLarge:t.xLarge}},isHovering:function(){return this.hover&&this.hoverIndex>=0}},watch:{internalValue:function(t){t!==this.value&&this.$emit("input",t)},value:function(t){this.internalValue=t}},methods:{createClickFn:function(t){var e=this;return function(n){if(!e.readonly){var r=e.genHoverIndex(n,t);e.clearable&&e.internalValue===r?e.internalValue=0:e.internalValue=r}}},createProps:function(t){var e={index:t,value:this.internalValue,click:this.createClickFn(t),isFilled:Math.floor(this.internalValue)>t,isHovered:Math.floor(this.hoverIndex)>t};return this.halfIncrements&&(e.isHalfHovered=!e.isHovered&&(this.hoverIndex-t)%1>0,e.isHalfFilled=!e.isFilled&&(this.internalValue-t)%1>0),e},genHoverIndex:function(t,e){return e+(this.isHalfEvent(t)?.5:1)},getIconName:function(t){var e=this.isHovering?t.isHovered:t.isFilled,n=this.isHovering?t.isHalfHovered:t.isHalfFilled;return e?this.fullIcon:n?this.halfIcon:this.emptyIcon},getColor:function(t){if(this.isHovering){if(t.isHovered||t.isHalfHovered)return this.color}else if(t.isFilled||t.isHalfFilled)return this.color;return this.backgroundColor},isHalfEvent:function(t){if(this.halfIncrements){var e=t.target&&t.target.getBoundingClientRect();if(e&&t.pageX-e.left<e.width/2)return!0}return!1},onMouseEnter:function(t,e){var n=this;this.runDelay("open",function(){n.hoverIndex=n.genHoverIndex(t,e)})},onMouseLeave:function(){var t=this;this.runDelay("close",function(){return t.hoverIndex=-1})},genItem:function(t){var e=this,n=this.createProps(t);if(this.$scopedSlots.item)return this.$scopedSlots.item(n);var i={click:n.click};return this.hover&&(i.mouseenter=function(n){return e.onMouseEnter(n,t)},i.mouseleave=this.onMouseLeave,this.halfIncrements&&(i.mousemove=function(n){return e.onMouseEnter(n,t)})),this.$createElement(r.default,this.setTextColor(this.getColor(n),{directives:this.directives,props:this.iconProps,on:i}),[this.getIconName(n)])}},render:function(t){var e=this,n=Object(u.createRange)(Number(this.length)).map(function(t){return e.genItem(t)});return t("div",{staticClass:"v-rating",class:{"v-rating--readonly":this.readonly,"v-rating--dense":this.dense}},n)}})},"./src/components/VRating/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VRating/VRating.ts");n.d(e,"VRating",function(){return r.default}),e.default=r.default},"./src/components/VResponsive/VResponsive.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_responsive.styl");var r=n("./src/mixins/measurable.ts"),i=n("./src/util/mixins.ts");e.default=Object(i.default)(r.default).extend({name:"v-responsive",props:{aspectRatio:[String,Number]},computed:{computedAspectRatio:function(){return Number(this.aspectRatio)},aspectStyle:function(){return this.computedAspectRatio?{paddingBottom:1/this.computedAspectRatio*100+"%"}:void 0},__cachedSizer:function(){return this.aspectStyle?this.$createElement("div",{style:this.aspectStyle,staticClass:"v-responsive__sizer"}):[]}},methods:{genContent:function(){return this.$createElement("div",{staticClass:"v-responsive__content"},this.$slots.default)}},render:function(t){return t("div",{staticClass:"v-responsive",style:this.measurableStyles,on:this.$listeners},[this.__cachedSizer,this.genContent()])}})},"./src/components/VResponsive/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VResponsive/VResponsive.ts");n.d(e,"VResponsive",function(){return r.default}),e.default=r.default},"./src/components/VSelect/VSelect.js":function(t,e,n){"use strict";n.r(e),n.d(e,"defaultMenuProps",function(){return p});n("./src/stylus/components/_text-fields.styl"),n("./src/stylus/components/_select.styl");var r=n("./src/components/VChip/index.ts"),i=n("./src/components/VMenu/index.js"),a=n("./src/components/VSelect/VSelectList.js"),o=n("./src/components/VTextField/VTextField.js"),s=n("./src/mixins/comparable.ts"),c=n("./src/mixins/filterable.ts"),u=n("./src/directives/click-outside.ts"),l=n("./src/util/helpers.ts"),d=n("./src/util/console.ts"),f=function(){return(f=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},h=function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}},p={closeOnClick:!1,closeOnContentClick:!1,openOnClick:!1,maxHeight:300};e.default=o.default.extend({name:"v-select",directives:{ClickOutside:u.default},mixins:[s.default,c.default],props:{appendIcon:{type:String,default:"$vuetify.icons.dropdown"},appendIconCb:Function,attach:{type:null,default:!1},browserAutocomplete:{type:String,default:"on"},cacheItems:Boolean,chips:Boolean,clearable:Boolean,deletableChips:Boolean,dense:Boolean,hideSelected:Boolean,items:{type:Array,default:function(){return[]}},itemAvatar:{type:[String,Array,Function],default:"avatar"},itemDisabled:{type:[String,Array,Function],default:"disabled"},itemText:{type:[String,Array,Function],default:"text"},itemValue:{type:[String,Array,Function],default:"value"},menuProps:{type:[String,Array,Object],default:function(){return p}},multiple:Boolean,openOnClear:Boolean,returnObject:Boolean,searchInput:{default:null},smallChips:Boolean},data:function(t){return{attrsInput:{role:"combobox"},cachedItems:t.cacheItems?t.items:[],content:null,isBooted:!1,isMenuActive:!1,lastItem:20,lazyValue:void 0!==t.value?t.value:t.multiple?[]:void 0,selectedIndex:-1,selectedItems:[],keyboardLookupPrefix:"",keyboardLookupLastTime:0}},computed:{allItems:function(){return this.filterDuplicates(this.cachedItems.concat(this.items))},classes:function(){return Object.assign({},o.default.options.computed.classes.call(this),{"v-select":!0,"v-select--chips":this.hasChips,"v-select--chips--small":this.smallChips,"v-select--is-menu-active":this.isMenuActive})},computedItems:function(){return this.allItems},counterValue:function(){return this.multiple?this.selectedItems.length:(this.getText(this.selectedItems[0])||"").toString().length},directives:function(){return this.isFocused?[{name:"click-outside",value:this.blur,args:{closeConditional:this.closeConditional}}]:void 0},dynamicHeight:function(){return"auto"},hasChips:function(){return this.chips||this.smallChips},hasSlot:function(){return Boolean(this.hasChips||this.$scopedSlots.selection)},isDirty:function(){return this.selectedItems.length>0},listData:function(){var t,e=this.$vnode&&this.$vnode.context.$options._scopeId;return{attrs:e?(t={},t[e]=!0,t):null,props:{action:this.multiple&&!this.isHidingSelected,color:this.color,dense:this.dense,hideSelected:this.hideSelected,items:this.virtualizedItems,noDataText:this.$vuetify.t(this.noDataText),selectedItems:this.selectedItems,itemAvatar:this.itemAvatar,itemDisabled:this.itemDisabled,itemValue:this.itemValue,itemText:this.itemText},on:{select:this.selectItem},scopedSlots:{item:this.$scopedSlots.item}}},staticList:function(){return(this.$slots["no-data"]||this.$slots["prepend-item"]||this.$slots["append-item"])&&Object(d.consoleError)("assert: staticList should not be called if slots are used"),this.$createElement(a.default,this.listData)},virtualizedItems:function(){return this.$_menuProps.auto?this.computedItems:this.computedItems.slice(0,this.lastItem)},menuCanShow:function(){return!0},$_menuProps:function(){var t;return t="string"==typeof this.menuProps?this.menuProps.split(","):this.menuProps,Array.isArray(t)&&(t=t.reduce(function(t,e){return t[e.trim()]=!0,t},{})),f({},p,{value:this.menuCanShow&&this.isMenuActive,nudgeBottom:this.nudgeBottom?this.nudgeBottom:t.offsetY?1:0},t)}},watch:{internalValue:function(t){this.initialValue=t,this.setSelectedItems()},isBooted:function(){var t=this;this.$nextTick(function(){t.content&&t.content.addEventListener&&t.content.addEventListener("scroll",t.onScroll,!1)})},isMenuActive:function(t){t&&(this.isBooted=!0)},items:{immediate:!0,handler:function(t){this.cacheItems&&(this.cachedItems=this.filterDuplicates(this.cachedItems.concat(t))),this.setSelectedItems()}}},mounted:function(){this.content=this.$refs.menu&&this.$refs.menu.$refs.content},methods:{blur:function(t){this.isMenuActive=!1,this.isFocused=!1,this.$refs.input&&this.$refs.input.blur(),this.selectedIndex=-1,this.onBlur(t)},activateMenu:function(){this.isMenuActive=!0},clearableCallback:function(){var t=this;this.setValue(this.multiple?[]:void 0),this.$nextTick(function(){return t.$refs.input.focus()}),this.openOnClear&&(this.isMenuActive=!0)},closeConditional:function(t){return!(this._isDestroyed||!this.content||this.content.contains(t.target)||!this.$el||this.$el.contains(t.target)||t.target===this.$el)},filterDuplicates:function(t){for(var e=new Map,n=0;n<t.length;++n){var r=t[n],i=this.getValue(r);!e.has(i)&&e.set(i,r)}return Array.from(e.values())},findExistingIndex:function(t){var e=this,n=this.getValue(t);return(this.internalValue||[]).findIndex(function(t){return e.valueComparator(e.getValue(t),n)})},genChipSelection:function(t,e){var n=this,i=this.disabled||this.readonly||this.getDisabled(t);return this.$createElement(r.default,{staticClass:"v-chip--select-multi",attrs:{tabindex:-1},props:{close:this.deletableChips&&!i,disabled:i,selected:e===this.selectedIndex,small:this.smallChips},on:{click:function(t){i||(t.stopPropagation(),n.selectedIndex=e)},input:function(){return n.onChipInput(t)}},key:this.getValue(t)},this.getText(t))},genCommaSelection:function(t,e,n){var r=JSON.stringify(this.getValue(t)),i=e===this.selectedIndex&&this.color,a=this.disabled||this.getDisabled(t);return this.$createElement("div",this.setTextColor(i,{staticClass:"v-select__selection v-select__selection--comma",class:{"v-select__selection--disabled":a},key:r}),this.getText(t)+(n?"":", "))},genDefaultSlot:function(){var t=this.genSelections(),e=this.genInput();return Array.isArray(t)?t.push(e):(t.children=t.children||[],t.children.push(e)),[this.$createElement("div",{staticClass:"v-select__slot",directives:this.directives},[this.genLabel(),this.prefix?this.genAffix("prefix"):null,t,this.suffix?this.genAffix("suffix"):null,this.genClearIcon(),this.genIconSlot()]),this.genMenu(),this.genProgress()]},genInput:function(){var t=o.default.options.methods.genInput.call(this);return t.data.domProps.value=null,t.data.attrs.readonly=!0,t.data.attrs["aria-readonly"]=String(this.readonly),t.data.on.keypress=this.onKeyPress,t},genList:function(){return this.$slots["no-data"]||this.$slots["prepend-item"]||this.$slots["append-item"]?this.genListWithSlot():this.staticList},genListWithSlot:function(){var t=this,e=["prepend-item","no-data","append-item"].filter(function(e){return t.$slots[e]}).map(function(e){return t.$createElement("template",{slot:e},t.$slots[e])});return this.$createElement(a.default,f({},this.listData),e)},genMenu:function(){var t,e,n=this,r=this.$_menuProps;r.activator=this.$refs["input-slot"];var a=Object.keys(i.default.options.props),o=Object.keys(this.$attrs).reduce(function(t,e){return a.includes(Object(l.camelize)(e))&&t.push(e),t},[]);try{for(var s=h(o),c=s.next();!c.done;c=s.next()){var u=c.value;r[Object(l.camelize)(u)]=this.$attrs[u]}}catch(e){t={error:e}}finally{try{c&&!c.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}if(o.length){var f=o.length>1,p=o.reduce(function(t,e){return t[Object(l.camelize)(e)]=n.$attrs[e],t},{}),m=o.map(function(t){return"'"+t+"'"}).join(", "),v=f?"\n":"'",_=Object.keys(p).every(function(t){var e=i.default.options.props[t],n=p[t];return!0===n||(e.type||e)===Boolean&&""===n});p=_?Object.keys(p).join(", "):JSON.stringify(p,null,f?2:0).replace(/"([^(")"]+)":/g,"$1:").replace(/"/g,"'"),Object(d.consoleWarn)(m+" "+(f?"are":"is")+" deprecated, use "+v+(_?"":":")+'menu-props="'+p+'"'+v+" instead",this)}return""===this.attach||!0===this.attach||"attach"===this.attach?r.attach=this.$el:r.attach=this.attach,this.$createElement(i.default,{props:r,on:{input:function(t){n.isMenuActive=t,n.isFocused=t}},ref:"menu"},[this.genList()])},genSelections:function(){var t,e=this.selectedItems.length,n=new Array(e);for(t=this.$scopedSlots.selection?this.genSlotSelection:this.hasChips?this.genChipSelection:this.genCommaSelection;e--;)n[e]=t(this.selectedItems[e],e,e===n.length-1);return this.$createElement("div",{staticClass:"v-select__selections"},n)},genSlotSelection:function(t,e){return this.$scopedSlots.selection({parent:this,item:t,index:e,selected:e===this.selectedIndex,disabled:this.disabled||this.readonly})},getMenuIndex:function(){return this.$refs.menu?this.$refs.menu.listIndex:-1},getDisabled:function(t){return Object(l.getPropertyFromItem)(t,this.itemDisabled,!1)},getText:function(t){return Object(l.getPropertyFromItem)(t,this.itemText,t)},getValue:function(t){return Object(l.getPropertyFromItem)(t,this.itemValue,this.getText(t))},onBlur:function(t){this.$emit("blur",t)},onChipInput:function(t){this.multiple?this.selectItem(t):this.setValue(null),0===this.selectedItems.length?this.isMenuActive=!0:this.isMenuActive=!1,this.selectedIndex=-1},onClick:function(){this.isDisabled||(this.isMenuActive=!0,this.isFocused||(this.isFocused=!0,this.$emit("focus")))},onEnterDown:function(){this.onBlur()},onEscDown:function(t){t.preventDefault(),this.isMenuActive&&(t.stopPropagation(),this.isMenuActive=!1)},onKeyPress:function(t){var e=this;if(!this.multiple){var n=performance.now();n-this.keyboardLookupLastTime>1e3&&(this.keyboardLookupPrefix=""),this.keyboardLookupPrefix+=t.key.toLowerCase(),this.keyboardLookupLastTime=n;var r=this.allItems.findIndex(function(t){return e.getText(t).toLowerCase().startsWith(e.keyboardLookupPrefix)}),i=this.allItems[r];-1!==r&&(this.setValue(this.returnObject?i:this.getValue(i)),setTimeout(function(){return e.setMenuIndex(r)}))}},onKeyDown:function(t){var e=t.keyCode;return this.readonly||this.isMenuActive||![l.keyCodes.enter,l.keyCodes.space,l.keyCodes.up,l.keyCodes.down].includes(e)||this.activateMenu(),this.isMenuActive&&this.$refs.menu&&this.$refs.menu.changeListIndex(t),e===l.keyCodes.enter?this.onEnterDown(t):e===l.keyCodes.esc?this.onEscDown(t):e===l.keyCodes.tab?this.onTabDown(t):void 0},onMouseUp:function(t){var e=this;if(this.hasMouseDown){var n=this.$refs["append-inner"];this.isMenuActive&&n&&(n===t.target||n.contains(t.target))?this.$nextTick(function(){return e.isMenuActive=!e.isMenuActive}):this.isEnclosed&&!this.isDisabled&&(this.isMenuActive=!0)}o.default.options.methods.onMouseUp.call(this,t)},onScroll:function(){var t=this;if(this.isMenuActive){if(this.lastItem>=this.computedItems.length)return;this.content.scrollHeight-(this.content.scrollTop+this.content.clientHeight)<200&&(this.lastItem+=20)}else requestAnimationFrame(function(){return t.content.scrollTop=0})},onTabDown:function(t){var e=this.getMenuIndex(),n=this.$refs.menu.tiles[e];n&&n.className.indexOf("v-list__tile--highlighted")>-1&&this.isMenuActive&&e>-1?(t.preventDefault(),t.stopPropagation(),n.click()):this.blur(t)},selectItem:function(t){var e=this;if(this.multiple){var n=(this.internalValue||[]).slice(),r=this.findExistingIndex(t);-1!==r?n.splice(r,1):n.push(t),this.setValue(n.map(function(t){return e.returnObject?t:e.getValue(t)})),this.$nextTick(function(){e.$refs.menu&&e.$refs.menu.updateDimensions()})}else this.setValue(this.returnObject?t:this.getValue(t)),this.isMenuActive=!1},setMenuIndex:function(t){this.$refs.menu&&(this.$refs.menu.listIndex=t)},setSelectedItems:function(){var t,e,n=this,r=[],i=this.multiple&&Array.isArray(this.internalValue)?this.internalValue:[this.internalValue],a=function(t){var e=o.allItems.findIndex(function(e){return n.valueComparator(n.getValue(e),n.getValue(t))});e>-1&&r.push(o.allItems[e])},o=this;try{for(var s=h(i),c=s.next();!c.done;c=s.next()){a(c.value)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}this.selectedItems=r},setValue:function(t){var e=this.internalValue;this.internalValue=t,t!==e&&this.$emit("change",t)}}})},"./src/components/VSelect/VSelectList.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_cards.styl");var r=n("./src/components/VCheckbox/index.js"),i=n("./src/components/VDivider/index.ts"),a=n("./src/components/VSubheader/index.ts"),o=n("./src/components/VList/index.ts"),s=n("./src/mixins/colorable.ts"),c=n("./src/mixins/themeable.ts"),u=n("./src/util/helpers.ts"),l=function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}};e.default={name:"v-select-list",mixins:[s.default,c.default],props:{action:Boolean,dense:Boolean,hideSelected:Boolean,items:{type:Array,default:function(){return[]}},itemAvatar:{type:[String,Array,Function],default:"avatar"},itemDisabled:{type:[String,Array,Function],default:"disabled"},itemText:{type:[String,Array,Function],default:"text"},itemValue:{type:[String,Array,Function],default:"value"},noDataText:String,noFilter:Boolean,searchInput:{default:null},selectedItems:{type:Array,default:function(){return[]}}},computed:{parsedItems:function(){var t=this;return this.selectedItems.map(function(e){return t.getValue(e)})},tileActiveClass:function(){return Object.keys(this.setTextColor(this.color).class||{}).join(" ")},staticNoDataTile:function(){return this.$createElement(o.VListTile,{on:{mousedown:function(t){return t.preventDefault()}}},[this.genTileContent(this.noDataText)])}},methods:{genAction:function(t,e){var n=this,i={on:{click:function(e){e.stopPropagation(),n.$emit("select",t)}}};return this.$createElement(o.VListTileAction,i,[this.$createElement(r.default,{props:{color:this.color,inputValue:e}})])},genDivider:function(t){return this.$createElement(i.default,{props:t})},genFilteredText:function(t){if(t=(t||"").toString(),!this.searchInput||this.noFilter)return Object(u.escapeHTML)(t);var e=this.getMaskedCharacters(t),n=e.start,r=e.middle,i=e.end;return""+Object(u.escapeHTML)(n)+this.genHighlight(r)+Object(u.escapeHTML)(i)},genHeader:function(t){return this.$createElement(a.default,{props:t},t.header)},genHighlight:function(t){return'<span class="v-list__tile__mask">'+Object(u.escapeHTML)(t)+"</span>"},getMaskedCharacters:function(t){var e=(this.searchInput||"").toString().toLocaleLowerCase(),n=t.toLocaleLowerCase().indexOf(e);return n<0?{start:"",middle:t,end:""}:{start:t.slice(0,n),middle:t.slice(n,n+e.length),end:t.slice(n+e.length)}},genTile:function(t,e,n,r){var i=this;void 0===e&&(e=null),void 0===n&&(n=!1),void 0===r&&(r=this.hasItem(t)),t===Object(t)&&(n=this.getAvatar(t),e=null!==e?e:this.getDisabled(t));var a={on:{mousedown:function(t){t.preventDefault()},click:function(){return e||i.$emit("select",t)}},props:{activeClass:this.tileActiveClass,avatar:n,disabled:e,ripple:!0,value:r,color:this.color}};if(!this.$scopedSlots.item)return this.$createElement(o.VListTile,a,[this.action&&!this.hideSelected&&this.items.length>0?this.genAction(t,r):null,this.genTileContent(t)]);var s=this.$scopedSlots.item({parent:this,item:t,tile:a});return this.needsTile(s)?this.$createElement(o.VListTile,a,s):s},genTileContent:function(t){var e=this.genFilteredText(this.getText(t));return this.$createElement(o.VListTileContent,[this.$createElement(o.VListTileTitle,{domProps:{innerHTML:e}})])},hasItem:function(t){return this.parsedItems.indexOf(this.getValue(t))>-1},needsTile:function(t){return 1!==t.length||null==t[0].componentOptions||"v-list-tile"!==t[0].componentOptions.Ctor.options.name},getAvatar:function(t){return Boolean(Object(u.getPropertyFromItem)(t,this.itemAvatar,!1))},getDisabled:function(t){return Boolean(Object(u.getPropertyFromItem)(t,this.itemDisabled,!1))},getText:function(t){return String(Object(u.getPropertyFromItem)(t,this.itemText,t))},getValue:function(t){return Object(u.getPropertyFromItem)(t,this.itemValue,this.getText(t))}},render:function(){var t,e,n=[];try{for(var r=l(this.items),i=r.next();!i.done;i=r.next()){var a=i.value;this.hideSelected&&this.hasItem(a)||(null==a?n.push(this.genTile(a)):a.header?n.push(this.genHeader(a)):a.divider?n.push(this.genDivider(a)):n.push(this.genTile(a)))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n.length||n.push(this.$slots["no-data"]||this.staticNoDataTile),this.$slots["prepend-item"]&&n.unshift(this.$slots["prepend-item"]),this.$slots["append-item"]&&n.push(this.$slots["append-item"]),this.$createElement("div",{staticClass:"v-select-list v-card",class:this.themeClasses},[this.$createElement(o.VList,{props:{dense:this.dense}},n)])}}},"./src/components/VSelect/index.js":function(t,e,n){"use strict";n.r(e),n.d(e,"VSelect",function(){return l});var r=n("./src/components/VSelect/VSelect.js"),i=n("./src/components/VOverflowBtn/index.js"),a=n("./src/components/VAutocomplete/index.js"),o=n("./src/components/VCombobox/index.js"),s=n("./src/util/rebuildFunctionalSlots.ts"),c=n("./src/util/dedupeModelListeners.ts"),u=n("./src/util/console.ts"),l={functional:!0,$_wrapperFor:r.default,props:{autocomplete:Boolean,combobox:Boolean,multiple:Boolean,tags:Boolean,editable:Boolean,overflow:Boolean,segmented:Boolean},render:function(t,e){var n=e.props,d=e.data,f=e.slots,h=e.parent;Object(c.default)(d);var p=Object(s.default)(f(),t);return n.autocomplete&&Object(u.deprecate)("<v-select autocomplete>","<v-autocomplete>",l,h),n.combobox&&Object(u.deprecate)("<v-select combobox>","<v-combobox>",l,h),n.tags&&Object(u.deprecate)("<v-select tags>","<v-combobox multiple>",l,h),n.overflow&&Object(u.deprecate)("<v-select overflow>","<v-overflow-btn>",l,h),n.segmented&&Object(u.deprecate)("<v-select segmented>","<v-overflow-btn segmented>",l,h),n.editable&&Object(u.deprecate)("<v-select editable>","<v-overflow-btn editable>",l,h),d.attrs=d.attrs||{},n.combobox||n.tags?(d.attrs.multiple=n.tags,t(o.default,d,p)):n.autocomplete?(d.attrs.multiple=n.multiple,t(a.default,d,p)):n.overflow||n.segmented||n.editable?(d.attrs.segmented=n.segmented,d.attrs.editable=n.editable,t(i.default,d,p)):(d.attrs.multiple=n.multiple,t(r.default,d,p))}};e.default=l},"./src/components/VSheet/VSheet.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_sheet.styl");var r=n("./src/mixins/colorable.ts"),i=n("./src/mixins/elevatable.ts"),a=n("./src/mixins/measurable.ts"),o=n("./src/mixins/themeable.ts"),s=n("./src/util/mixins.ts"),c=function(){return(c=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=Object(s.default)(r.default,i.default,a.default,o.default).extend({name:"v-sheet",props:{tag:{type:String,default:"div"},tile:Boolean},computed:{classes:function(){return c({"v-sheet":!0,"v-sheet--tile":this.tile},this.themeClasses,this.elevationClasses)},styles:function(){return this.measurableStyles}},render:function(t){var e={class:this.classes,style:this.styles,on:this.$listeners};return t(this.tag,this.setBackgroundColor(this.color,e),this.$slots.default)}})},"./src/components/VSheet/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VSheet/VSheet.ts");n.d(e,"VSheet",function(){return r.default}),e.default=r.default},"./src/components/VSlider/VSlider.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_sliders.styl");var r=n("./src/components/transitions/index.js"),i=n("./src/components/VInput/index.ts"),a=n("./src/directives/click-outside.ts"),o=n("./src/util/helpers.ts"),s=n("./src/util/console.ts"),c=n("./src/mixins/loadable.ts"),u=function(){return(u=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=i.default.extend({name:"v-slider",directives:{ClickOutside:a.default},mixins:[c.default],props:{alwaysDirty:Boolean,inverseLabel:Boolean,label:String,min:{type:[Number,String],default:0},max:{type:[Number,String],default:100},step:{type:[Number,String],default:1},ticks:{type:[Boolean,String],default:!1,validator:function(t){return"boolean"==typeof t||"always"===t}},tickLabels:{type:Array,default:function(){return[]}},tickSize:{type:[Number,String],default:1},thumbColor:{type:String,default:null},thumbLabel:{type:[Boolean,String],default:null,validator:function(t){return"boolean"==typeof t||"always"===t}},thumbSize:{type:[Number,String],default:32},trackColor:{type:String,default:null},value:[Number,String]},data:function(t){return{app:{},isActive:!1,keyPressed:0,lazyValue:void 0!==t.value?t.value:Number(t.min),oldValue:null}},computed:{classes:function(){return{"v-input--slider":!0,"v-input--slider--ticks":this.showTicks,"v-input--slider--inverse-label":this.inverseLabel,"v-input--slider--ticks-labels":this.tickLabels.length>0,"v-input--slider--thumb-label":this.thumbLabel||this.$scopedSlots.thumbLabel}},showTicks:function(){return this.tickLabels.length>0||!this.disabled&&this.stepNumeric&&!!this.ticks},showThumbLabel:function(){return!this.disabled&&(!!this.thumbLabel||""===this.thumbLabel||this.$scopedSlots["thumb-label"])},computedColor:function(){return this.disabled?null:this.validationState||this.color||"primary"},computedTrackColor:function(){return this.disabled?null:this.trackColor||null},computedThumbColor:function(){return this.disabled||!this.isDirty?null:this.validationState||this.thumbColor||this.color||"primary"},internalValue:{get:function(){return this.lazyValue},set:function(t){var e=this.min,n=this.max,r=this.roundValue(Math.min(Math.max(t,e),n));r!==this.lazyValue&&(this.lazyValue=r,this.$emit("input",r),this.validate())}},stepNumeric:function(){return this.step>0?parseFloat(this.step):0},trackFillStyles:function(){var t=this.$vuetify.rtl?"auto":0,e=this.$vuetify.rtl?0:"auto",n=this.inputWidth+"%";return this.disabled&&(n="calc("+this.inputWidth+"% - 8px)"),{transition:this.trackTransition,left:t,right:e,width:n}},trackPadding:function(){return this.isActive||this.inputWidth>0||this.disabled?0:7},trackStyles:function(){var t=this.disabled?"calc("+this.inputWidth+"% + 8px)":this.trackPadding+"px",e=this.$vuetify.rtl?"auto":t,n=this.$vuetify.rtl?t:"auto",r=this.disabled?"calc("+(100-this.inputWidth)+"% - 8px)":"100%";return{transition:this.trackTransition,left:e,right:n,width:r}},tickStyles:function(){var t=Number(this.tickSize);return{"border-width":t+"px","border-radius":t>1?"50%":null,transform:t>1?"translateX(-"+t+"px) translateY(-"+(t-1)+"px)":null}},trackTransition:function(){return this.keyPressed>=2?"none":""},numTicks:function(){return Math.ceil((this.max-this.min)/this.stepNumeric)},inputWidth:function(){return(this.roundValue(this.internalValue)-this.min)/(this.max-this.min)*100},isDirty:function(){return this.internalValue>this.min||this.alwaysDirty}},watch:{min:function(t){t>this.internalValue&&this.$emit("input",parseFloat(t))},max:function(t){t<this.internalValue&&this.$emit("input",parseFloat(t))},value:function(t){this.internalValue=t}},mounted:function(){this.app=document.querySelector("[data-app]")||Object(s.consoleWarn)("Missing v-app or a non-body wrapping element with the [data-app] attribute",this)},methods:{genDefaultSlot:function(){var t=[this.genLabel()],e=this.genSlider();return this.inverseLabel?t.unshift(e):t.push(e),t.push(this.genProgress()),t},genListeners:function(){return{blur:this.onBlur,click:this.onSliderClick,focus:this.onFocus,keydown:this.onKeyDown,keyup:this.onKeyUp}},genInput:function(){return this.$createElement("input",{attrs:u({"aria-label":this.label,name:this.name,role:"slider",tabindex:this.disabled?-1:this.$attrs.tabindex,value:this.internalValue,readonly:!0,"aria-readonly":String(this.readonly),"aria-valuemin":this.min,"aria-valuemax":this.max,"aria-valuenow":this.internalValue},this.$attrs),on:this.genListeners(),ref:"input"})},genSlider:function(){return this.$createElement("div",{staticClass:"v-slider",class:{"v-slider--is-active":this.isActive},directives:[{name:"click-outside",value:this.onBlur}]},this.genChildren())},genChildren:function(){return[this.genInput(),this.genTrackContainer(),this.genSteps(),this.genThumbContainer(this.internalValue,this.inputWidth,this.isFocused||this.isActive,this.onThumbMouseDown)]},genSteps:function(){var t=this;if(!this.step||!this.showTicks)return null;var e=Object(o.createRange)(this.numTicks+1).map(function(e){var n=[];return t.tickLabels[e]&&n.push(t.$createElement("span",t.tickLabels[e])),t.$createElement("span",{key:e,staticClass:"v-slider__ticks",class:{"v-slider__ticks--always-show":"always"===t.ticks||t.tickLabels.length>0},style:u({},t.tickStyles,{left:e*(100/t.numTicks)+"%"})},n)});return this.$createElement("div",{staticClass:"v-slider__ticks-container"},e)},genThumb:function(){return this.$createElement("div",this.setBackgroundColor(this.computedThumbColor,{staticClass:"v-slider__thumb"}))},genThumbContainer:function(t,e,n,r){var i=[this.genThumb()],a=this.getLabel(t);return this.showThumbLabel&&i.push(this.genThumbLabel(a)),this.$createElement("div",this.setTextColor(this.computedThumbColor,{staticClass:"v-slider__thumb-container",class:{"v-slider__thumb-container--is-active":n,"v-slider__thumb-container--show-label":this.showThumbLabel},style:{transition:this.trackTransition,left:(this.$vuetify.rtl?100-e:e)+"%"},on:{touchstart:r,mousedown:r}}),i)},genThumbLabel:function(t){var e=Object(o.convertToUnit)(this.thumbSize);return this.$createElement(r.VScaleTransition,{props:{origin:"bottom center"}},[this.$createElement("div",{staticClass:"v-slider__thumb-label__container",directives:[{name:"show",value:this.isFocused||this.isActive||"always"===this.thumbLabel}]},[this.$createElement("div",this.setBackgroundColor(this.computedThumbColor,{staticClass:"v-slider__thumb-label",style:{height:e,width:e}}),[t])])])},genTrackContainer:function(){var t=[this.$createElement("div",this.setBackgroundColor(this.computedTrackColor,{staticClass:"v-slider__track",style:this.trackStyles})),this.$createElement("div",this.setBackgroundColor(this.computedColor,{staticClass:"v-slider__track-fill",style:this.trackFillStyles}))];return this.$createElement("div",{staticClass:"v-slider__track__container",ref:"track"},t)},getLabel:function(t){return this.$scopedSlots["thumb-label"]?this.$scopedSlots["thumb-label"]({value:t}):this.$createElement("span",t)},onBlur:function(t){2!==this.keyPressed&&(this.isActive=!1,this.isFocused=!1,this.$emit("blur",t))},onFocus:function(t){this.isFocused=!0,this.$emit("focus",t)},onThumbMouseDown:function(t){this.oldValue=this.internalValue,this.keyPressed=2;var e={passive:!0};this.isActive=!0,this.isFocused=!1,"touches"in t?(this.app.addEventListener("touchmove",this.onMouseMove,e),Object(o.addOnceEventListener)(this.app,"touchend",this.onSliderMouseUp)):(this.app.addEventListener("mousemove",this.onMouseMove,e),Object(o.addOnceEventListener)(this.app,"mouseup",this.onSliderMouseUp)),this.$emit("start",this.internalValue)},onSliderMouseUp:function(){this.keyPressed=0;var t={passive:!0};this.isActive=!1,this.isFocused=!1,this.app.removeEventListener("touchmove",this.onMouseMove,t),this.app.removeEventListener("mousemove",this.onMouseMove,t),this.$emit("end",this.internalValue),Object(o.deepEqual)(this.oldValue,this.internalValue)||this.$emit("change",this.internalValue)},onMouseMove:function(t){var e=this.parseMouseMove(t),n=e.value;e.isInsideTrack&&this.setInternalValue(n)},onKeyDown:function(t){if(!this.disabled&&!this.readonly){var e=this.parseKeyDown(t);null!=e&&(this.setInternalValue(e),this.$emit("change",e))}},onKeyUp:function(){this.keyPressed=0},onSliderClick:function(t){this.isFocused=!0,this.onMouseMove(t),this.$emit("change",this.internalValue)},parseMouseMove:function(t){var e=this.$refs.track.getBoundingClientRect(),n=e.left,r=e.width,i="touches"in t?t.touches[0].clientX:t.clientX,a=Math.min(Math.max((i-n)/r,0),1)||0;this.$vuetify.rtl&&(a=1-a);var o=i>=n-8&&i<=n+r+8;return{value:parseFloat(this.min)+a*(this.max-this.min),isInsideTrack:o}},parseKeyDown:function(t,e){if(void 0===e&&(e=this.internalValue),!this.disabled){var n=o.keyCodes.pageup,r=o.keyCodes.pagedown,i=o.keyCodes.end,a=o.keyCodes.home,s=o.keyCodes.left,c=o.keyCodes.right,u=o.keyCodes.down,l=o.keyCodes.up;if([n,r,i,a,s,c,u,l].includes(t.keyCode)){t.preventDefault();var d=this.stepNumeric||1,f=(this.max-this.min)/d;if([s,c,u,l].includes(t.keyCode))this.keyPressed+=1,e+=((this.$vuetify.rtl?[s,l]:[c,l]).includes(t.keyCode)?1:-1)*d*(t.shiftKey?3:t.ctrlKey?2:1);else if(t.keyCode===a)e=parseFloat(this.min);else if(t.keyCode===i)e=parseFloat(this.max);else{e-=(t.keyCode===r?1:-1)*d*(f>100?f/10:10)}return e}}},roundValue:function(t){if(!this.stepNumeric)return t;var e=this.step.toString().trim(),n=e.indexOf(".")>-1?e.length-e.indexOf(".")-1:0,r=this.min%this.stepNumeric,i=Math.round((t-r)/this.stepNumeric)*this.stepNumeric+r;return parseFloat(Math.max(Math.min(i,this.max),this.min).toFixed(n))},setInternalValue:function(t){this.internalValue=t}}})},"./src/components/VSlider/index.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VSlider/VSlider.js");n.d(e,"VSlider",function(){return r.default}),e.default=r.default},"./src/components/VSnackbar/VSnackbar.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_snackbars.styl");var r=n("./src/mixins/colorable.ts"),i=n("./src/mixins/toggleable.ts"),a=n("./src/mixins/positionable.ts"),o=n("./src/util/mixins.ts");e.default=Object(o.default)(r.default,i.default,Object(a.factory)(["absolute","top","bottom","left","right"])).extend({name:"v-snackbar",props:{autoHeight:Boolean,multiLine:Boolean,timeout:{type:Number,default:6e3},vertical:Boolean},data:function(){return{activeTimeout:-1}},computed:{classes:function(){return{"v-snack--active":this.isActive,"v-snack--absolute":this.absolute,"v-snack--auto-height":this.autoHeight,"v-snack--bottom":this.bottom||!this.top,"v-snack--left":this.left,"v-snack--multi-line":this.multiLine&&!this.vertical,"v-snack--right":this.right,"v-snack--top":this.top,"v-snack--vertical":this.vertical}}},watch:{isActive:function(){this.setTimeout()}},mounted:function(){this.setTimeout()},methods:{setTimeout:function(){var t=this;window.clearTimeout(this.activeTimeout),this.isActive&&this.timeout&&(this.activeTimeout=window.setTimeout(function(){t.isActive=!1},this.timeout))}},render:function(t){return t("transition",{attrs:{name:"v-snack-transition"}},this.isActive&&[t("div",{staticClass:"v-snack",class:this.classes,on:this.$listeners},[t("div",this.setBackgroundColor(this.color,{staticClass:"v-snack__wrapper"}),[t("div",{staticClass:"v-snack__content"},this.$slots.default)])])])}})},"./src/components/VSnackbar/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VSnackbar/VSnackbar.ts");n.d(e,"VSnackbar",function(){return r.default}),e.default=r.default},"./src/components/VSparkline/VSparkline.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/mixins/colorable.ts"),i=n("./src/util/mixins.ts"),a=n("./src/components/VSparkline/helpers/core.ts"),o=n("./src/components/VSparkline/helpers/path.ts"),s=function(){return(s=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=Object(i.default)(r.default).extend({name:"VSparkline",props:{autoDraw:Boolean,autoDrawDuration:{type:Number,default:2e3},autoDrawEasing:{type:String,default:"ease"},autoLineWidth:{type:Boolean,default:!1},color:{type:String,default:"primary"},fill:{type:Boolean,default:!1},gradient:{type:Array,default:function(){return[]}},gradientDirection:{type:String,validator:function(t){return["top","bottom","left","right"].includes(t)},default:"top"},height:{type:[String,Number],default:75},labels:{type:Array,default:function(){return[]}},lineWidth:{type:[String,Number],default:4},padding:{type:[String,Number],default:8},smooth:{type:[Boolean,Number,String],default:!1},showLabels:Boolean,type:{type:String,default:"trend",validator:function(t){return["trend","bar"].includes(t)}},value:{type:Array,default:function(){return[]}},width:{type:[Number,String],default:300},labelSize:{type:[Number,String],default:7}},data:function(){return{lastLength:0}},computed:{parsedPadding:function(){return Number(this.padding)},parsedWidth:function(){return Number(this.width)},totalBars:function(){return this.value.length},_lineWidth:function(){if(this.autoLineWidth&&"trend"!==this.type){var t=this.parsedPadding*(this.totalBars+1);return(this.parsedWidth-t)/this.totalBars}return Number(this.lineWidth)||4},boundary:function(){var t=Number(this.height);return{minX:this.parsedPadding,minY:this.parsedPadding,maxX:this.parsedWidth-this.parsedPadding,maxY:t-this.parsedPadding}},hasLabels:function(){return Boolean(this.showLabels||this.labels.length>0||this.$scopedSlots.label)},parsedLabels:function(){for(var t=[],e=this.points,n=e.length,r=0;t.length<n;r++){var i=e[r],a=this.labels[r];a||(a=i===Object(i)?i.value:i),t.push(s({},i,{value:String(a)}))}return t},points:function(){return Object(a.genPoints)(this.value.slice(),this.boundary,this.type)},textY:function(){return this.boundary.maxY+6}},watch:{value:{immediate:!0,handler:function(){var t=this;this.$nextTick(function(){if(t.autoDraw&&"bar"!==t.type){var e=t.$refs.path,n=e.getTotalLength();t.fill?(e.style.transformOrigin="bottom center",e.style.transition="none",e.style.transform="scaleY(0)",e.getBoundingClientRect(),e.style.transition="transform "+t.autoDrawDuration+"ms "+t.autoDrawEasing,e.style.transform="scaleY(1)"):(e.style.transition="none",e.style.strokeDasharray=n+" "+n,e.style.strokeDashoffset=Math.abs(n-(t.lastLength||0)).toString(),e.getBoundingClientRect(),e.style.transition="stroke-dashoffset "+t.autoDrawDuration+"ms "+t.autoDrawEasing,e.style.strokeDashoffset="0"),t.lastLength=n}})}}},methods:{genGradient:function(){var t=this,e=this.gradientDirection,n=this.gradient.slice();n.length||n.push("");var r=Math.max(n.length-1,1),i=n.reverse().map(function(e,n){return t.$createElement("stop",{attrs:{offset:n/r,"stop-color":e||t.color||"currentColor"}})});return this.$createElement("defs",[this.$createElement("linearGradient",{attrs:{id:this._uid,x1:+("left"===e),y1:+("top"===e),x2:+("right"===e),y2:+("bottom"===e)}},i)])},genG:function(t){return this.$createElement("g",{style:{fontSize:"8",textAnchor:"middle",dominantBaseline:"mathematical",fill:this.color||"currentColor"}},t)},genLabels:function(){if(this.hasLabels)return this.genG(this.parsedLabels.map(this.genText))},genPath:function(){var t=!0===this.smooth?8:Number(this.smooth);return this.$createElement("path",{attrs:{id:this._uid,d:Object(o.genPath)(this.points.slice(),t,this.fill,Number(this.height)),fill:this.fill?"url(#"+this._uid+")":"none",stroke:this.fill?"none":"url(#"+this._uid+")"},ref:"path"})},genText:function(t,e){var n=this.$scopedSlots.label?this.$scopedSlots.label({index:e,value:t.value}):t.value;return this.$createElement("text",{attrs:{x:t.x,y:this.textY}},[n])},genBar:function(){if(this.value&&!(this.totalBars<2)){var t=this.width,e=this.height,n=this.parsedPadding,r=this._lineWidth,i=t||this.totalBars*n*2,o=e||75,c={minX:n,minY:n,maxX:Number(i)-n,maxY:Number(o)-n},u=s({},this.$props);u.points=Object(a.genPoints)(this.value,c,this.type);var l=c.maxX/(u.points.length-1);return u.boundary=c,u.lineWidth=r||l-Number(n||5),u.offsetX=0,this.autoLineWidth||(u.offsetX=c.maxX/this.totalBars/2-c.minX),this.$createElement("svg",{attrs:{width:"100%",height:"25%",viewBox:"0 0 "+i+" "+o}},[this.genGradient(),this.genClipPath(u.offsetX,u.lineWidth,"sparkline-bar-"+this._uid),this.hasLabels?this.genBarLabels(u):void 0,this.$createElement("g",{attrs:{transform:"scale(1,-1) translate(0,-"+c.maxY+")","clip-path":"url(#sparkline-bar-"+this._uid+"-clip)",fill:"url(#"+this._uid+")"}},[this.$createElement("rect",{attrs:{x:0,y:0,width:i,height:o}})])])}},genClipPath:function(t,e,n){var r=this,i=this.boundary.maxY,a="number"==typeof this.smooth?this.smooth:this.smooth?2:0;return this.$createElement("clipPath",{attrs:{id:n+"-clip"}},this.points.map(function(n){return r.$createElement("rect",{attrs:{x:n.x+t,y:0,width:e,height:Math.max(i-n.y,0),rx:a,ry:a}},[r.autoDraw?r.$createElement("animate",{attrs:{attributeName:"height",from:0,to:i-n.y,dur:r.autoDrawDuration+"ms",fill:"freeze"}}):void 0])}))},genBarLabels:function(t){var e=this,n=t.offsetX||0,r=t.points.map(function(r){return e.$createElement("text",{attrs:{x:r.x+n+e._lineWidth/2,y:t.boundary.maxY+(Number(e.labelSize)||7),"font-size":Number(e.labelSize)||7}},r.value.toString())});return this.genG(r)},genTrend:function(){return this.$createElement("svg",this.setTextColor(this.color,{attrs:{"stroke-width":this._lineWidth||1,width:"100%",height:"25%",viewBox:"0 0 "+this.width+" "+this.height}}),[this.genGradient(),this.genLabels(),this.genPath()])}},render:function(t){if(!(this.totalBars<2))return"trend"===this.type?this.genTrend():this.genBar()}})},"./src/components/VSparkline/helpers/core.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"genPoints",function(){return a});var r=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},i=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(r(arguments[e]));return t};function a(t,e,n){var r=e.minX,a=e.minY,o=e.maxX,s=e.maxY,c=t.map(function(t){return"number"==typeof t?t:t.value}),u=c.length,l=Math.max.apply(Math,i(c))+1,d=Math.min.apply(Math,i(c));d&&(d-=1);var f=(o-r)/(u-1);"bar"===n&&(f=o/u);var h=(s-a)/(l-d);return c.map(function(t,e){return{x:r+e*f,y:s-(t-d)*h+1e-5*+(e===u-1)-1e-5*+(0===e),value:t}})}},"./src/components/VSparkline/helpers/math.ts":function(t,e,n){"use strict";function r(t){return parseInt(t,10)}function i(t,e,n){return r(t.x+n.x)===r(2*e.x)&&r(t.y+n.y)===r(2*e.y)}function a(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function o(t,e,n){var r=t.x-e.x,i=t.y-e.y,a=Math.sqrt(r*r+i*i),o=r/a,s=i/a;return{x:e.x+o*n,y:e.y+s*n}}n.r(e),n.d(e,"checkCollinear",function(){return i}),n.d(e,"getDistance",function(){return a}),n.d(e,"moveTo",function(){return o})},"./src/components/VSparkline/helpers/path.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"genPath",function(){return i});var r=n("./src/components/VSparkline/helpers/math.ts");function i(t,e,n,i){void 0===n&&(n=!1),void 0===i&&(i=75);var a=t.shift(),o=t[t.length-1];return(n?"M"+a.x+" "+i+" L"+a.x+" "+a.y:"M"+a.x+" "+a.y)+t.map(function(n,i){var o=t[i+1],s=t[i-1]||a,c=o&&Object(r.checkCollinear)(o,n,s);if(!o||c)return"L"+n.x+" "+n.y;var u=Math.min(Object(r.getDistance)(s,n),Object(r.getDistance)(o,n)),l=u/2<e?u/2:e,d=Object(r.moveTo)(s,n,l),f=Object(r.moveTo)(o,n,l);return"L"+d.x+" "+d.y+"S"+n.x+" "+n.y+" "+f.x+" "+f.y}).join("")+(n?"L"+o.x+" "+i+" Z":"")}},"./src/components/VSparkline/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VSparkline/VSparkline.ts");n.d(e,"VSparkline",function(){return r.default}),e.default=r.default},"./src/components/VSpeedDial/VSpeedDial.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_speed-dial.styl");var r=n("./src/mixins/toggleable.ts"),i=n("./src/mixins/positionable.ts"),a=n("./src/mixins/transitionable.ts"),o=n("./src/directives/click-outside.ts");e.default={name:"v-speed-dial",directives:{ClickOutside:o.default},mixins:[i.default,r.default,a.default],props:{direction:{type:String,default:"top",validator:function(t){return["top","right","bottom","left"].includes(t)}},openOnHover:Boolean,transition:{type:String,default:"scale-transition"}},computed:{classes:function(){var t;return(t={"v-speed-dial":!0,"v-speed-dial--top":this.top,"v-speed-dial--right":this.right,"v-speed-dial--bottom":this.bottom,"v-speed-dial--left":this.left,"v-speed-dial--absolute":this.absolute,"v-speed-dial--fixed":this.fixed})["v-speed-dial--direction-"+this.direction]=!0,t}},render:function(t){var e=this,n=[],r={class:this.classes,directives:[{name:"click-outside",value:function(){return e.isActive=!1}}],on:{click:function(){return e.isActive=!e.isActive}}};if(this.openOnHover&&(r.on.mouseenter=function(){return e.isActive=!0},r.on.mouseleave=function(){return e.isActive=!1}),this.isActive){var i=0;n=(this.$slots.default||[]).map(function(e,n){return e.tag&&void 0!==e.componentOptions&&"v-btn"===e.componentOptions.Ctor.options.name?t("div",{style:{transitionDelay:.05*++i+"s"},key:n},[e]):(e.key=n,e)})}var a=t("transition-group",{class:"v-speed-dial__list",props:{name:this.transition,mode:this.mode,origin:this.origin,tag:"div"}},n);return t("div",r,[this.$slots.activator,a])}}},"./src/components/VSpeedDial/index.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VSpeedDial/VSpeedDial.js");n.d(e,"VSpeedDial",function(){return r.default}),e.default=r.default},"./src/components/VStepper/VStepper.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_steppers.styl");var r=n("./src/mixins/registrable.ts"),i=n("./src/mixins/themeable.ts"),a=n("./src/util/mixins.ts"),o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=Object(a.default)(Object(r.provide)("stepper"),i.default).extend({name:"v-stepper",provide:function(){return{stepClick:this.stepClick,isVertical:this.vertical}},props:{nonLinear:Boolean,altLabels:Boolean,vertical:Boolean,value:[Number,String]},data:function(){return{inputValue:null,isBooted:!1,steps:[],content:[],isReverse:!1}},computed:{classes:function(){return o({"v-stepper":!0,"v-stepper--is-booted":this.isBooted,"v-stepper--vertical":this.vertical,"v-stepper--alt-labels":this.altLabels,"v-stepper--non-linear":this.nonLinear},this.themeClasses)}},watch:{inputValue:function(t,e){this.isReverse=Number(t)<Number(e);for(var n=this.steps.length;--n>=0;)this.steps[n].toggle(this.inputValue);for(n=this.content.length;--n>=0;)this.content[n].toggle(this.inputValue,this.isReverse);this.$emit("input",this.inputValue),e&&(this.isBooted=!0)},value:function(){var t=this;this.$nextTick(function(){return t.inputValue=t.value})}},mounted:function(){this.inputValue=this.value||this.steps[0].step||1},methods:{register:function(t){"v-stepper-step"===t.$options.name?this.steps.push(t):"v-stepper-content"===t.$options.name&&(t.isVertical=this.vertical,this.content.push(t))},unregister:function(t){"v-stepper-step"===t.$options.name?this.steps=this.steps.filter(function(e){return e!==t}):"v-stepper-content"===t.$options.name&&(t.isVertical=this.vertical,this.content=this.content.filter(function(e){return e!==t}))},stepClick:function(t){var e=this;this.$nextTick(function(){return e.inputValue=t})}},render:function(t){return t("div",{class:this.classes},this.$slots.default)}})},"./src/components/VStepper/VStepperContent.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/transitions/index.js"),i=n("./src/mixins/registrable.ts"),a=n("./src/util/helpers.ts"),o=n("./src/util/mixins.ts");e.default=Object(o.default)(Object(i.inject)("stepper","v-stepper-content","v-stepper")).extend({name:"v-stepper-content",inject:{isVerticalProvided:{from:"isVertical"}},props:{step:{type:[Number,String],required:!0}},data:function(){return{height:0,isActive:null,isReverse:!1,isVertical:this.isVerticalProvided}},computed:{classes:function(){return{"v-stepper__content":!0}},computedTransition:function(){return this.isReverse?r.VTabReverseTransition:r.VTabTransition},styles:function(){return this.isVertical?{height:Object(a.convertToUnit)(this.height)}:{}},wrapperClasses:function(){return{"v-stepper__wrapper":!0}}},watch:{isActive:function(t,e){t&&null==e?this.height="auto":this.isVertical&&(this.isActive?this.enter():this.leave())}},mounted:function(){this.$refs.wrapper.addEventListener("transitionend",this.onTransition,!1),this.stepper&&this.stepper.register(this)},beforeDestroy:function(){this.$refs.wrapper.removeEventListener("transitionend",this.onTransition,!1),this.stepper&&this.stepper.unregister(this)},methods:{onTransition:function(t){this.isActive&&"height"===t.propertyName&&(this.height="auto")},enter:function(){var t=this,e=0;requestAnimationFrame(function(){e=t.$refs.wrapper.scrollHeight}),this.height=0,setTimeout(function(){return t.isActive&&(t.height=e||"auto")},450)},leave:function(){var t=this;this.height=this.$refs.wrapper.clientHeight,setTimeout(function(){return t.height=0},10)},toggle:function(t,e){this.isActive=t.toString()===this.step.toString(),this.isReverse=e}},render:function(t){var e={class:this.classes},n={class:this.wrapperClasses,style:this.styles,ref:"wrapper"};this.isVertical||(e.directives=[{name:"show",value:this.isActive}]);var r=t("div",e,[t("div",n,[this.$slots.default])]);return t(this.computedTransition,{on:this.$listeners},[r])}})},"./src/components/VStepper/VStepperStep.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VIcon/index.ts"),i=n("./src/mixins/colorable.ts"),a=n("./src/mixins/registrable.ts"),o=n("./src/directives/ripple.ts"),s=n("./src/util/mixins.ts");e.default=Object(s.default)(i.default,Object(a.inject)("stepper","v-stepper-step","v-stepper")).extend({name:"v-stepper-step",directives:{Ripple:o.default},inject:["stepClick"],props:{color:{type:String,default:"primary"},complete:Boolean,completeIcon:{type:String,default:"$vuetify.icons.complete"},editIcon:{type:String,default:"$vuetify.icons.edit"},errorIcon:{type:String,default:"$vuetify.icons.error"},editable:Boolean,rules:{type:Array,default:function(){return[]}},step:[Number,String]},data:function(){return{isActive:!1,isInactive:!0}},computed:{classes:function(){return{"v-stepper__step":!0,"v-stepper__step--active":this.isActive,"v-stepper__step--editable":this.editable,"v-stepper__step--inactive":this.isInactive,"v-stepper__step--error":this.hasError,"v-stepper__step--complete":this.complete,"error--text":this.hasError}},hasError:function(){return this.rules.some(function(t){return!0!==t()})}},mounted:function(){this.stepper&&this.stepper.register(this)},beforeDestroy:function(){this.stepper&&this.stepper.unregister(this)},methods:{click:function(t){t.stopPropagation(),this.$emit("click",t),this.editable&&this.stepClick(this.step)},toggle:function(t){this.isActive=t.toString()===this.step.toString(),this.isInactive=Number(t)<Number(this.step)}},render:function(t){var e,n={class:this.classes,directives:[{name:"ripple",value:this.editable}],on:{click:this.click}};e=this.hasError?[t(r.default,{},this.errorIcon)]:this.complete?this.editable?[t(r.default,{},this.editIcon)]:[t(r.default,{},this.completeIcon)]:String(this.step);var i=!(this.hasError||!this.complete&&!this.isActive)&&this.color;return t("div",n,[t("span",this.setBackgroundColor(i,{staticClass:"v-stepper__step__step"}),e),t("div",{staticClass:"v-stepper__label"},this.$slots.default)])}})},"./src/components/VStepper/index.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"VStepperHeader",function(){return s}),n.d(e,"VStepperItems",function(){return c});var r=n("./src/util/helpers.ts"),i=n("./src/components/VStepper/VStepper.ts");n.d(e,"VStepper",function(){return i.default});var a=n("./src/components/VStepper/VStepperStep.ts");n.d(e,"VStepperStep",function(){return a.default});var o=n("./src/components/VStepper/VStepperContent.ts");n.d(e,"VStepperContent",function(){return o.default});var s=Object(r.createSimpleFunctional)("v-stepper__header"),c=Object(r.createSimpleFunctional)("v-stepper__items");e.default={$_vuetify_subcomponents:{VStepper:i.default,VStepperContent:o.default,VStepperStep:a.default,VStepperHeader:s,VStepperItems:c}}},"./src/components/VSubheader/VSubheader.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_subheaders.styl");var r=n("./src/mixins/themeable.ts"),i=n("./src/util/mixins.ts"),a=function(){return(a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=Object(i.default)(r.default).extend({name:"v-subheader",props:{inset:Boolean},render:function(t){return t("div",{staticClass:"v-subheader",class:a({"v-subheader--inset":this.inset},this.themeClasses),attrs:this.$attrs,on:this.$listeners},this.$slots.default)}})},"./src/components/VSubheader/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VSubheader/VSubheader.ts");n.d(e,"VSubheader",function(){return r.default}),e.default=r.default},"./src/components/VSwitch/VSwitch.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_selection-controls.styl"),n("./src/stylus/components/_switch.styl");var r=n("./src/mixins/selectable.js"),i=n("./src/directives/touch.ts"),a=n("./src/components/transitions/index.js"),o=n("./src/components/VProgressCircular/VProgressCircular.ts"),s=n("./src/util/helpers.ts"),c=function(){return(c=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default={name:"v-switch",directives:{Touch:i.default},mixins:[r.default],props:{loading:{type:[Boolean,String],default:!1}},computed:{classes:function(){return{"v-input--selection-controls v-input--switch":!0}},switchData:function(){return this.setTextColor(this.loading?void 0:this.computedColor,{class:this.themeClasses})}},methods:{genDefaultSlot:function(){return[this.genSwitch(),this.genLabel()]},genSwitch:function(){return this.$createElement("div",{staticClass:"v-input--selection-controls__input"},[this.genInput("checkbox",this.$attrs),this.genRipple(this.setTextColor(this.computedColor,{directives:[{name:"touch",value:{left:this.onSwipeLeft,right:this.onSwipeRight}}]})),this.$createElement("div",c({staticClass:"v-input--switch__track"},this.switchData)),this.$createElement("div",c({staticClass:"v-input--switch__thumb"},this.switchData),[this.genProgress()])])},genProgress:function(){return this.$createElement(a.VFabTransition,{},[!1===this.loading?null:this.$slots.progress||this.$createElement(o.default,{props:{color:!0===this.loading||""===this.loading?this.color||"primary":this.loading,size:16,width:2,indeterminate:!0}})])},onSwipeLeft:function(){this.isActive&&this.onChange()},onSwipeRight:function(){this.isActive||this.onChange()},onKeydown:function(t){(t.keyCode===s.keyCodes.left&&this.isActive||t.keyCode===s.keyCodes.right&&!this.isActive)&&this.onChange()}}}},"./src/components/VSwitch/index.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VSwitch/VSwitch.js");n.d(e,"VSwitch",function(){return r.default}),e.default=r.default},"./src/components/VSystemBar/VSystemBar.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_system-bars.styl");var r=n("./src/mixins/applicationable.ts"),i=n("./src/mixins/colorable.ts"),a=n("./src/mixins/themeable.ts"),o=n("./src/util/mixins.ts"),s=function(){return(s=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=Object(o.default)(Object(r.default)("bar",["height","window"]),i.default,a.default).extend({name:"v-system-bar",props:{height:{type:[Number,String],validator:function(t){return!isNaN(parseInt(t))}},lightsOut:Boolean,status:Boolean,window:Boolean},computed:{classes:function(){return s({"v-system-bar--lights-out":this.lightsOut,"v-system-bar--absolute":this.absolute,"v-system-bar--fixed":!this.absolute&&(this.app||this.fixed),"v-system-bar--status":this.status,"v-system-bar--window":this.window},this.themeClasses)},computedHeight:function(){return this.height?parseInt(this.height):this.window?32:24}},methods:{updateApplication:function(){return this.computedHeight}},render:function(t){var e={staticClass:"v-system-bar",class:this.classes,style:{height:this.computedHeight+"px"}};return t("div",this.setBackgroundColor(this.color,e),this.$slots.default)}})},"./src/components/VSystemBar/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VSystemBar/VSystemBar.ts");n.d(e,"VSystemBar",function(){return r.default}),e.default=r.default},"./src/components/VTabs/VTab.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/mixins/groupable.ts"),i=n("./src/mixins/routable.ts"),a=n("./src/mixins/themeable.ts"),o=n("./src/util/helpers.ts"),s=function(){return(s=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default={name:"v-tab",mixins:[i.default,Object(r.factory)("tabGroup"),a.default],props:{ripple:{type:[Boolean,Object],default:!0}},computed:{classes:function(){return s({"v-tabs__item":!0,"v-tabs__item--disabled":this.disabled},this.groupClasses)},value:function(){var t=this.to||this.href||"";this.$router&&this.to===Object(this.to)&&(t=this.$router.resolve(this.to,this.$route,this.append).href);return t.replace("#","")}},watch:{$route:"onRouteChange"},mounted:function(){this.onRouteChange()},methods:{click:function(t){this.href&&this.href.indexOf("#")>-1&&t.preventDefault(),this.$emit("click",t),this.to||this.toggle()},onRouteChange:function(){var t=this;if(this.to&&this.$refs.link){var e="_vnode.data.class."+this.activeClass;this.$nextTick(function(){Object(o.getObjectValueByPath)(t.$refs.link,e)&&t.toggle()})}}},render:function(t){var e=this.generateRouteLink(this.classes),n=e.data,r=this.disabled?"div":e.tag;return n.ref="link",t("div",{staticClass:"v-tabs__div"},[t(r,n,this.$slots.default)])}}},"./src/components/VTabs/VTabItem.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VWindow/VWindowItem.ts"),i=n("./src/util/console.ts");e.default=r.default.extend({name:"v-tab-item",props:{id:String},render:function(t){var e=r.default.options.render.call(this,t);return this.id&&(Object(i.deprecate)("id","value",this),e.data.domProps=e.data.domProps||{},e.data.domProps.id=this.id),e}})},"./src/components/VTabs/VTabs.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_tabs.styl");var r=n("./src/components/VItemGroup/VItemGroup.ts"),i=n("./src/components/VTabs/mixins/tabs-computed.js"),a=n("./src/components/VTabs/mixins/tabs-generators.js"),o=n("./src/components/VTabs/mixins/tabs-props.js"),s=n("./src/components/VTabs/mixins/tabs-touch.js"),c=n("./src/components/VTabs/mixins/tabs-watchers.js"),u=n("./src/mixins/colorable.ts"),l=n("./src/mixins/ssr-bootable.ts"),d=n("./src/mixins/themeable.ts"),f=n("./src/directives/resize.ts"),h=n("./src/directives/touch.ts"),p=n("./src/util/console.ts"),m=n("./src/util/ThemeProvider.ts");e.default=r.BaseItemGroup.extend({name:"v-tabs",directives:{Resize:f.default,Touch:h.default},mixins:[u.default,l.default,i.default,o.default,a.default,s.default,c.default,d.default],provide:function(){return{tabGroup:this,tabProxy:this.tabProxy,registerItems:this.registerItems,unregisterItems:this.unregisterItems}},data:function(){return{bar:[],content:[],isOverflowing:!1,nextIconVisible:!1,prevIconVisible:!1,resizeTimeout:null,scrollOffset:0,sliderWidth:null,sliderLeft:null,startX:0,tabItems:null,transitionTime:300,widths:{bar:0,container:0,wrapper:0}}},watch:{items:"onResize",tabs:"onResize"},mounted:function(){this.init()},methods:{checkIcons:function(){this.prevIconVisible=this.checkPrevIcon(),this.nextIconVisible=this.checkNextIcon()},checkPrevIcon:function(){return this.scrollOffset>0},checkNextIcon:function(){return this.widths.container>this.scrollOffset+this.widths.wrapper},callSlider:function(){var t=this;if(this.hideSlider||!this.activeTab)return!1;var e=this.activeTab;this.$nextTick(function(){e&&e.$el&&(t.sliderWidth=e.$el.scrollWidth,t.sliderLeft=e.$el.offsetLeft)})},init:function(){this.$listeners.input&&Object(p.deprecate)("@input","@change",this)},onResize:function(){if(!this._isDestroyed){this.setWidths();var t=this.isBooted?this.transitionTime:0;clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(this.updateTabsView,t)}},overflowCheck:function(t,e){this.isOverflowing&&e(t)},scrollTo:function(t){this.scrollOffset=this.newOffset(t)},setOverflow:function(){this.isOverflowing=this.widths.bar<this.widths.container},setWidths:function(){var t=this.$refs.bar?this.$refs.bar.clientWidth:0,e=this.$refs.container?this.$refs.container.clientWidth:0,n=this.$refs.wrapper?this.$refs.wrapper.clientWidth:0;this.widths={bar:t,container:e,wrapper:n},this.setOverflow()},parseNodes:function(){for(var t=[],e=[],n=[],r=[],i=(this.$slots.default||[]).length,a=0;a<i;a++){var o=this.$slots.default[a];if(o.componentOptions)switch(o.componentOptions.Ctor.options.name){case"v-tabs-slider":n.push(o);break;case"v-tabs-items":e.push(o);break;case"v-tab-item":t.push(o);break;default:r.push(o)}else r.push(o)}return{tab:r,slider:n,items:e,item:t}},registerItems:function(t){this.tabItems=t,t(this.internalValue)},unregisterItems:function(){this.tabItems=null},updateTabsView:function(){this.callSlider(),this.scrollIntoView(),this.checkIcons()},scrollIntoView:function(){if(this.activeTab){if(!this.isOverflowing)return this.scrollOffset=0;var t=this.widths.wrapper+this.scrollOffset,e=this.activeTab.$el,n=e.clientWidth,r=e.offsetLeft,i=n+r,a=.3*n;this.activeTab===this.items[this.items.length-1]&&(a=0),r<this.scrollOffset?this.scrollOffset=Math.max(r-a,0):t<i&&(this.scrollOffset-=t-i-a)}},tabProxy:function(t){this.internalValue=t}},render:function(t){var e=this.parseNodes(),n=e.tab,r=e.slider,i=e.items,a=e.item;return t("div",{staticClass:"v-tabs",directives:[{name:"resize",modifiers:{quiet:!0},value:this.onResize}]},[this.genBar([this.hideSlider?null:this.genSlider(r),n]),t(m.default,{props:{dark:this.theme.isDark,light:!this.theme.isDark}},[this.genItems(i,a)])])}})},"./src/components/VTabs/VTabsItems.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VWindow/VWindow.ts");e.default=r.default.extend({name:"v-tabs-items",inject:{registerItems:{default:null},tabProxy:{default:null},unregisterItems:{default:null}},props:{cycle:Boolean},watch:{internalValue:function(t){this.tabProxy&&this.tabProxy(t)}},created:function(){this.registerItems&&this.registerItems(this.changeModel)},beforeDestroy:function(){this.unregisterItems&&this.unregisterItems()},methods:{changeModel:function(t){this.internalValue=t},getValue:function(t,e){return t.id?t.id:r.default.options.methods.getValue.call(this,t,e)},next:function(){(this.cycle||this.internalIndex!==this.items.length-1)&&r.default.options.methods.next.call(this)},prev:function(){(this.cycle||0!==this.internalIndex)&&r.default.options.methods.prev.call(this)}}})},"./src/components/VTabs/VTabsSlider.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/mixins/colorable.ts");e.default={name:"v-tabs-slider",mixins:[r.default],render:function(t){return t("div",this.setBackgroundColor(this.color||"accent",{staticClass:"v-tabs__slider"}))}}},"./src/components/VTabs/index.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VTabs/VTabs.js");n.d(e,"VTabs",function(){return r.default});var i=n("./src/components/VTabs/VTab.js");n.d(e,"VTab",function(){return i.default});var a=n("./src/components/VTabs/VTabsItems.js");n.d(e,"VTabsItems",function(){return a.default});var o=n("./src/components/VTabs/VTabItem.js");n.d(e,"VTabItem",function(){return o.default});var s=n("./src/components/VTabs/VTabsSlider.js");n.d(e,"VTabsSlider",function(){return s.default}),e.default={$_vuetify_subcomponents:{VTabs:r.default,VTab:i.default,VTabsItems:a.default,VTabItem:o.default,VTabsSlider:s.default}}},"./src/components/VTabs/mixins/tabs-computed.js":function(t,e,n){"use strict";n.r(e),e.default={computed:{activeTab:function(){if(this.selectedItems.length)return this.selectedItems[0]},containerStyles:function(){return this.height?{height:parseInt(this.height,10)+"px"}:null},hasArrows:function(){return(this.showArrows||!this.isMobile)&&this.isOverflowing},isMobile:function(){return this.$vuetify.breakpoint.width<this.mobileBreakPoint},sliderStyles:function(){return{left:this.sliderLeft+"px",transition:null!=this.sliderLeft?null:"none",width:this.sliderWidth+"px"}}}}},"./src/components/VTabs/mixins/tabs-generators.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VTabs/VTabsItems.js"),i=n("./src/components/VTabs/VTabsSlider.js"),a=n("./src/components/VIcon/index.ts");e.default={methods:{genBar:function(t){return this.$createElement("div",this.setBackgroundColor(this.color,{staticClass:"v-tabs__bar",class:this.themeClasses,ref:"bar"}),[this.genTransition("prev"),this.genWrapper(this.genContainer(t)),this.genTransition("next")])},genContainer:function(t){return this.$createElement("div",{staticClass:"v-tabs__container",class:{"v-tabs__container--align-with-title":this.alignWithTitle,"v-tabs__container--centered":this.centered,"v-tabs__container--fixed-tabs":this.fixedTabs,"v-tabs__container--grow":this.grow,"v-tabs__container--icons-and-text":this.iconsAndText,"v-tabs__container--overflow":this.isOverflowing,"v-tabs__container--right":this.right},style:this.containerStyles,ref:"container"},t)},genIcon:function(t){var e=this;return this.hasArrows&&this[t+"IconVisible"]?this.$createElement(a.default,{staticClass:"v-tabs__icon v-tabs__icon--"+t,props:{disabled:!this[t+"IconVisible"]},on:{click:function(){return e.scrollTo(t)}}},this[t+"Icon"]):null},genItems:function(t,e){return t.length>0?t:e.length?this.$createElement(r.default,e):null},genTransition:function(t){return this.$createElement("transition",{props:{name:"fade-transition"}},[this.genIcon(t)])},genWrapper:function(t){var e=this;return this.$createElement("div",{staticClass:"v-tabs__wrapper",class:{"v-tabs__wrapper--show-arrows":this.hasArrows},ref:"wrapper",directives:[{name:"touch",value:{start:function(t){return e.overflowCheck(t,e.onTouchStart)},move:function(t){return e.overflowCheck(t,e.onTouchMove)},end:function(t){return e.overflowCheck(t,e.onTouchEnd)}}}]},[t])},genSlider:function(t){return t.length||(t=[this.$createElement(i.default,{props:{color:this.sliderColor}})]),this.$createElement("div",{staticClass:"v-tabs__slider-wrapper",style:this.sliderStyles},t)}}}},"./src/components/VTabs/mixins/tabs-props.js":function(t,e,n){"use strict";n.r(e),e.default={props:{activeClass:{type:String,default:"v-tabs__item--active"},alignWithTitle:Boolean,centered:Boolean,fixedTabs:Boolean,grow:Boolean,height:{type:[Number,String],default:void 0,validator:function(t){return!isNaN(parseInt(t))}},hideSlider:Boolean,iconsAndText:Boolean,mandatory:{type:Boolean,default:!0},mobileBreakPoint:{type:[Number,String],default:1264,validator:function(t){return!isNaN(parseInt(t))}},nextIcon:{type:String,default:"$vuetify.icons.next"},prevIcon:{type:String,default:"$vuetify.icons.prev"},right:Boolean,showArrows:Boolean,sliderColor:{type:String,default:"accent"},value:[Number,String]}}},"./src/components/VTabs/mixins/tabs-touch.js":function(t,e,n){"use strict";n.r(e),e.default={methods:{newOffset:function(t){var e=this.$refs.wrapper.clientWidth;return"prev"===t?Math.max(this.scrollOffset-e,0):Math.min(this.scrollOffset+e,this.$refs.container.clientWidth-e)},onTouchStart:function(t){this.startX=this.scrollOffset+t.touchstartX,this.$refs.container.style.transition="none",this.$refs.container.style.willChange="transform"},onTouchMove:function(t){this.scrollOffset=this.startX-t.touchmoveX},onTouchEnd:function(){var t=this.$refs.container,e=this.$refs.wrapper,n=t.clientWidth-e.clientWidth;t.style.transition=null,t.style.willChange=null,this.scrollOffset<0||!this.isOverflowing?this.scrollOffset=0:this.scrollOffset>=n&&(this.scrollOffset=n)}}}},"./src/components/VTabs/mixins/tabs-watchers.js":function(t,e,n){"use strict";n.r(e),e.default={watch:{activeTab:function(t,e){this.setOverflow(),t&&(this.tabItems&&this.tabItems(this.getValue(t,this.items.indexOf(t))),null!=e&&this.updateTabsView())},alignWithTitle:"callSlider",centered:"callSlider",fixedTabs:"callSlider",hasArrows:function(t){t||(this.scrollOffset=0)},internalValue:function(t){this.$listeners.input&&this.$emit("input",t)},lazyValue:"updateTabs",right:"callSlider","$vuetify.application.left":"onResize","$vuetify.application.right":"onResize",scrollOffset:function(t){this.$refs.container.style.transform="translateX("+-t+"px)",this.hasArrows&&(this.prevIconVisible=this.checkPrevIcon(),this.nextIconVisible=this.checkNextIcon())}}}},"./src/components/VTextField/VTextField.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_text-fields.styl");var r=n("./src/components/VInput/index.ts"),i=n("./src/components/VCounter/index.ts"),a=n("./src/components/VLabel/index.ts"),o=n("./src/mixins/maskable.js"),s=n("./src/mixins/loadable.ts"),c=n("./src/directives/ripple.ts"),u=n("./src/util/helpers.ts"),l=n("./src/util/console.ts"),d=function(){return(d=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},f=["color","file","time","date","datetime-local","week","month"];e.default=r.default.extend({name:"v-text-field",directives:{Ripple:c.default},mixins:[o.default,s.default],inheritAttrs:!1,props:{appendOuterIcon:String,appendOuterIconCb:Function,autofocus:Boolean,box:Boolean,browserAutocomplete:String,clearable:Boolean,clearIcon:{type:String,default:"$vuetify.icons.clear"},clearIconCb:Function,color:{type:String,default:"primary"},counter:[Boolean,Number,String],flat:Boolean,fullWidth:Boolean,label:String,outline:Boolean,placeholder:String,prefix:String,prependInnerIcon:String,prependInnerIconCb:Function,reverse:Boolean,singleLine:Boolean,solo:Boolean,soloInverted:Boolean,suffix:String,type:{type:String,default:"text"}},data:function(){return{badInput:!1,initialValue:null,internalChange:!1,isClearing:!1}},computed:{classes:function(){return{"v-text-field":!0,"v-text-field--full-width":this.fullWidth,"v-text-field--prefix":this.prefix,"v-text-field--single-line":this.isSingle,"v-text-field--solo":this.isSolo,"v-text-field--solo-inverted":this.soloInverted,"v-text-field--solo-flat":this.flat,"v-text-field--box":this.box,"v-text-field--enclosed":this.isEnclosed,"v-text-field--reverse":this.reverse,"v-text-field--outline":this.hasOutline,"v-text-field--placeholder":this.placeholder}},counterValue:function(){return(this.internalValue||"").toString().length},directivesInput:function(){return[]},hasOutline:function(){return this.outline||this.textarea},internalValue:{get:function(){return this.lazyValue},set:function(t){this.mask&&t!==this.lazyValue?(this.lazyValue=this.unmaskText(this.maskText(this.unmaskText(t))),this.setSelectionRange()):(this.lazyValue=t,this.$emit("input",this.lazyValue))}},isDirty:function(){return null!=this.lazyValue&&this.lazyValue.toString().length>0||this.badInput},isEnclosed:function(){return this.box||this.isSolo||this.hasOutline||this.fullWidth},isLabelActive:function(){return this.isDirty||f.includes(this.type)},isSingle:function(){return this.isSolo||this.singleLine},isSolo:function(){return this.solo||this.soloInverted},labelPosition:function(){var t=this.prefix&&!this.labelValue?this.prefixWidth:0;return!this.$vuetify.rtl!=!this.reverse?{left:"auto",right:t}:{left:t,right:"auto"}},showLabel:function(){return this.hasLabel&&(!this.isSingle||!this.isLabelActive&&!this.placeholder&&!this.prefixLabel)},labelValue:function(){return!this.isSingle&&Boolean(this.isFocused||this.isLabelActive||this.placeholder||this.prefixLabel)},prefixWidth:function(){if(this.prefix||this.$refs.prefix)return this.$refs.prefix.offsetWidth},prefixLabel:function(){return this.prefix&&!this.value}},watch:{isFocused:function(t){this.hasColor=t,t?this.initialValue=this.lazyValue:this.initialValue!==this.lazyValue&&this.$emit("change",this.lazyValue)},value:function(t){var e=this;if(this.mask&&!this.internalChange){var n=this.maskText(this.unmaskText(t));this.lazyValue=this.unmaskText(n),String(t)!==this.lazyValue&&this.$nextTick(function(){e.$refs.input.value=n,e.$emit("input",e.lazyValue)})}else this.lazyValue=t}},mounted:function(){this.autofocus&&this.onFocus()},methods:{focus:function(){this.onFocus()},blur:function(){this.$refs.input?this.$refs.input.blur():this.onBlur()},clearableCallback:function(){var t=this;this.internalValue=null,this.$nextTick(function(){return t.$refs.input.focus()})},genAppendSlot:function(){var t=[];return this.$slots["append-outer"]?t.push(this.$slots["append-outer"]):this.appendOuterIcon&&t.push(this.genIcon("appendOuter")),this.genSlot("append","outer",t)},genPrependInnerSlot:function(){var t=[];return this.$slots["prepend-inner"]?t.push(this.$slots["prepend-inner"]):this.prependInnerIcon&&t.push(this.genIcon("prependInner")),this.genSlot("prepend","inner",t)},genIconSlot:function(){var t=[];return this.$slots.append?t.push(this.$slots.append):this.appendIcon&&t.push(this.genIcon("append")),this.genSlot("append","inner",t)},genInputSlot:function(){var t=r.default.options.methods.genInputSlot.call(this),e=this.genPrependInnerSlot();return e&&t.children.unshift(e),t},genClearIcon:function(){if(!this.clearable)return null;var t=!!this.isDirty&&"clear";return this.clearIconCb&&Object(l.deprecate)(":clear-icon-cb","@click:clear",this),this.genSlot("append","inner",[this.genIcon(t,!this.$listeners["click:clear"]&&this.clearIconCb||this.clearableCallback,!1)])},genCounter:function(){if(!1===this.counter||null==this.counter)return null;var t=!0===this.counter?this.$attrs.maxlength:this.counter;return this.$createElement(i.default,{props:{dark:this.dark,light:this.light,max:t,value:this.counterValue}})},genDefaultSlot:function(){return[this.genTextFieldSlot(),this.genClearIcon(),this.genIconSlot(),this.genProgress()]},genLabel:function(){if(!this.showLabel)return null;var t={props:{absolute:!0,color:this.validationState,dark:this.dark,disabled:this.disabled,focused:!this.isSingle&&(this.isFocused||!!this.validationState),left:this.labelPosition.left,light:this.light,right:this.labelPosition.right,value:this.labelValue}};return this.$attrs.id&&(t.props.for=this.$attrs.id),this.$createElement(a.default,t,this.$slots.label||this.label)},genInput:function(){var t=Object.assign({},this.$listeners);delete t.change;var e={style:{},domProps:{value:this.maskText(this.lazyValue)},attrs:d({"aria-label":(!this.$attrs||!this.$attrs.id)&&this.label},this.$attrs,{autofocus:this.autofocus,disabled:this.disabled,readonly:this.readonly,type:this.type}),on:Object.assign(t,{blur:this.onBlur,input:this.onInput,focus:this.onFocus,keydown:this.onKeyDown}),ref:"input"};return this.placeholder&&(e.attrs.placeholder=this.placeholder),this.mask&&(e.attrs.maxlength=this.masked.length),this.browserAutocomplete&&(e.attrs.autocomplete=this.browserAutocomplete),this.$createElement("input",e)},genMessages:function(){return this.hideDetails?null:this.$createElement("div",{staticClass:"v-text-field__details"},[r.default.options.methods.genMessages.call(this),this.genCounter()])},genTextFieldSlot:function(){return this.$createElement("div",{staticClass:"v-text-field__slot"},[this.genLabel(),this.prefix?this.genAffix("prefix"):null,this.genInput(),this.suffix?this.genAffix("suffix"):null])},genAffix:function(t){return this.$createElement("div",{class:"v-text-field__"+t,ref:t},this[t])},onBlur:function(t){this.isFocused=!1,this.internalChange=!1,this.$emit("blur",t)},onClick:function(){this.isFocused||this.disabled||this.$refs.input.focus()},onFocus:function(t){if(this.$refs.input)return document.activeElement!==this.$refs.input?this.$refs.input.focus():void(this.isFocused||(this.isFocused=!0,this.$emit("focus",t)))},onInput:function(t){this.internalChange=!0,this.mask&&this.resetSelections(t.target),this.internalValue=t.target.value,this.badInput=t.target.validity&&t.target.validity.badInput},onKeyDown:function(t){this.internalChange=!0,t.keyCode===u.keyCodes.enter&&this.$emit("change",this.internalValue),this.$emit("keydown",t)},onMouseDown:function(t){t.target!==this.$refs.input&&(t.preventDefault(),t.stopPropagation()),r.default.options.methods.onMouseDown.call(this,t)},onMouseUp:function(t){this.hasMouseDown&&this.focus(),r.default.options.methods.onMouseUp.call(this,t)}}})},"./src/components/VTextField/index.js":function(t,e,n){"use strict";n.r(e),n.d(e,"VTextField",function(){return c});var r=n("./src/components/VTextField/VTextField.js"),i=n("./src/components/VTextarea/VTextarea.js"),a=n("./src/util/rebuildFunctionalSlots.ts"),o=n("./src/util/dedupeModelListeners.ts"),s=n("./src/util/console.ts"),c={functional:!0,$_wrapperFor:r.default,props:{textarea:Boolean,multiLine:Boolean},render:function(t,e){var n=e.props,u=e.data,l=e.slots,d=e.parent;Object(o.default)(u);var f=Object(a.default)(l(),t);return n.textarea&&Object(s.deprecate)("<v-text-field textarea>","<v-textarea outline>",c,d),n.multiLine&&Object(s.deprecate)("<v-text-field multi-line>","<v-textarea>",c,d),n.textarea||n.multiLine?(u.attrs.outline=n.textarea,t(i.default,u,f)):t(r.default,u,f)}};e.default=c},"./src/components/VTextarea/VTextarea.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_textarea.styl");var r=n("./src/components/VTextField/VTextField.js"),i=n("./src/util/console.ts"),a=function(){return(a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default={name:"v-textarea",extends:r.default,props:{autoGrow:Boolean,noResize:Boolean,outline:Boolean,rowHeight:{type:[Number,String],default:24,validator:function(t){return!isNaN(parseFloat(t))}},rows:{type:[Number,String],default:5,validator:function(t){return!isNaN(parseInt(t,10))}}},computed:{classes:function(){return a({"v-textarea":!0,"v-textarea--auto-grow":this.autoGrow,"v-textarea--no-resize":this.noResizeHandle},r.default.options.computed.classes.call(this,null))},dynamicHeight:function(){return this.autoGrow?this.inputHeight:"auto"},isEnclosed:function(){return this.textarea||r.default.options.computed.isEnclosed.call(this)},noResizeHandle:function(){return this.noResize||this.autoGrow}},watch:{lazyValue:function(){!this.internalChange&&this.autoGrow&&this.$nextTick(this.calculateInputHeight)}},mounted:function(){var t=this;setTimeout(function(){t.autoGrow&&t.calculateInputHeight()},0),this.autoGrow&&this.noResize&&Object(i.consoleInfo)('"no-resize" is now implied when using "auto-grow", and can be removed',this)},methods:{calculateInputHeight:function(){var t=this.$refs.input;if(t){t.style.height=0;var e=t.scrollHeight,n=parseInt(this.rows,10)*parseFloat(this.rowHeight);t.style.height=Math.max(n,e)+"px"}},genInput:function(){var t=r.default.options.methods.genInput.call(this);return t.tag="textarea",delete t.data.attrs.type,t.data.attrs.rows=this.rows,t},onInput:function(t){r.default.options.methods.onInput.call(this,t),this.autoGrow&&this.calculateInputHeight()},onKeyDown:function(t){this.isFocused&&13===t.keyCode&&t.stopPropagation(),this.internalChange=!0,this.$emit("keydown",t)}}}},"./src/components/VTextarea/index.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VTextarea/VTextarea.js");n.d(e,"VTextarea",function(){return r.default}),e.default=r.default},"./src/components/VTimePicker/VTimePicker.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"selectingTimes",function(){return p});var r=n("./src/components/VTimePicker/VTimePickerTitle.ts"),i=n("./src/components/VTimePicker/VTimePickerClock.ts"),a=n("./src/mixins/picker.ts"),o=n("./src/util/helpers.ts"),s=n("./src/components/VDatePicker/util/pad.ts"),c=n("./src/util/mixins.ts"),u=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},l=Object(o.createRange)(24),d=Object(o.createRange)(12),f=d.map(function(t){return t+12}),h=Object(o.createRange)(60),p={hour:1,minute:2,second:3},m={1:"hour",2:"minute",3:"second"};e.default=Object(c.default)(a.default).extend({name:"v-time-picker",props:{allowedHours:Function,allowedMinutes:Function,allowedSeconds:Function,disabled:Boolean,format:{type:String,default:"ampm",validator:function(t){return["ampm","24hr"].includes(t)}},min:String,max:String,readonly:Boolean,scrollable:Boolean,useSeconds:Boolean,value:null},data:function(){return{inputHour:null,inputMinute:null,inputSecond:null,lazyInputHour:null,lazyInputMinute:null,lazyInputSecond:null,period:"am",selecting:p.hour}},computed:{selectingHour:{get:function(){return this.selecting===p.hour},set:function(t){this.selecting=p.hour}},selectingMinute:{get:function(){return this.selecting===p.minute},set:function(t){this.selecting=p.minute}},selectingSecond:{get:function(){return this.selecting===p.second},set:function(t){this.selecting=p.second}},isAllowedHourCb:function(){var t=this;if(!this.min&&!this.max)return this.allowedHours;var e=this.min?Number(this.min.split(":")[0]):0,n=this.max?Number(this.max.split(":")[0]):23;return function(r){return r>=1*e&&r<=1*n&&(!t.allowedHours||t.allowedHours(r))}},isAllowedMinuteCb:function(){var t=this,e=!this.allowedHours||this.allowedHours(this.inputHour);if(!this.min&&!this.max)return e?this.allowedMinutes:function(){return!1};var n=u(this.min?this.min.split(":").map(Number):[0,0],2),r=n[0],i=n[1],a=u(this.max?this.max.split(":").map(Number):[23,59],2),o=60*r+1*i,s=60*a[0]+1*a[1];return function(n){var r=60*t.inputHour+n;return r>=o&&r<=s&&e&&(!t.allowedMinutes||t.allowedMinutes(n))}},isAllowedSecondCb:function(){var t=this,e=!this.allowedHours||this.allowedHours(this.inputHour),n=!this.allowedMinutes||this.allowedMinutes(this.inputMinute);if(!this.min&&!this.max)return e&&n?this.allowedSeconds:function(){return!1};var r=u(this.min?this.min.split(":").map(Number):[0,0,0],3),i=r[0],a=r[1],o=r[2],s=u(this.max?this.max.split(":").map(Number):[23,59,59],3),c=s[0],l=s[1],d=s[2],f=3600*i+60*a+1*(o||0),h=3600*c+60*l+1*(d||0);return function(r){var i=3600*t.inputHour+60*t.inputMinute+r;return i>=f&&i<=h&&e&&n&&(!t.allowedSeconds||t.allowedSeconds(r))}},isAmPm:function(){return"ampm"===this.format}},watch:{value:"setInputData"},mounted:function(){this.setInputData(this.value)},methods:{genValue:function(){return null==this.inputHour||null==this.inputMinute||this.useSeconds&&null==this.inputSecond?null:Object(s.default)(this.inputHour)+":"+Object(s.default)(this.inputMinute)+(this.useSeconds?":"+Object(s.default)(this.inputSecond):"")},emitValue:function(){var t=this.genValue();null!==t&&this.$emit("input",t)},setPeriod:function(t){if(this.period=t,null!=this.inputHour){var e=this.inputHour+("am"===t?-12:12);this.inputHour=this.firstAllowed("hour",e),this.emitValue()}},setInputData:function(t){if(null==t||""===t)this.inputHour=null,this.inputMinute=null,this.inputSecond=null;else if(t instanceof Date)this.inputHour=t.getHours(),this.inputMinute=t.getMinutes(),this.inputSecond=t.getSeconds();else{var e=u(t.trim().toLowerCase().match(/^(\d+):(\d+)(:(\d+))?([ap]m)?$/)||new Array(6),6),n=e[1],r=e[2],i=e[4],a=e[5];this.inputHour=a?this.convert12to24(parseInt(n,10),a):parseInt(n,10),this.inputMinute=parseInt(r,10),this.inputSecond=parseInt(i||0,10)}this.period=null==this.inputHour||this.inputHour<12?"am":"pm"},convert24to12:function(t){return t?(t-1)%12+1:12},convert12to24:function(t,e){return t%12+("pm"===e?12:0)},onInput:function(t){this.selecting===p.hour?this.inputHour=this.isAmPm?this.convert12to24(t,this.period):t:this.selecting===p.minute?this.inputMinute=t:this.inputSecond=t,this.emitValue()},onChange:function(t){this.$emit("click:"+m[this.selecting],t);var e=this.selecting===(this.useSeconds?p.second:p.minute);if(this.selecting===p.hour?this.selecting=p.minute:this.useSeconds&&this.selecting===p.minute&&(this.selecting=p.second),this.inputHour!==this.lazyInputHour||this.inputMinute!==this.lazyInputMinute||this.useSeconds&&this.inputSecond!==this.lazyInputSecond){var n=this.genValue();null!==n&&(this.lazyInputHour=this.inputHour,this.lazyInputMinute=this.inputMinute,this.useSeconds&&(this.lazyInputSecond=this.inputSecond),e&&this.$emit("change",n))}},firstAllowed:function(t,e){var n="hour"===t?this.isAllowedHourCb:"minute"===t?this.isAllowedMinuteCb:this.isAllowedSecondCb;if(!n)return e;var r="minute"===t?h:"second"===t?h:this.isAmPm?e<12?d:f:l;return((r.find(function(t){return n((t+e)%r.length+r[0])})||0)+e)%r.length+r[0]},genClock:function(){return this.$createElement(i.default,{props:{allowedValues:this.selecting===p.hour?this.isAllowedHourCb:this.selecting===p.minute?this.isAllowedMinuteCb:this.isAllowedSecondCb,color:this.color,dark:this.dark,disabled:this.disabled,double:this.selecting===p.hour&&!this.isAmPm,format:this.selecting===p.hour?this.isAmPm?this.convert24to12:function(t){return t}:function(t){return Object(s.default)(t,2)},light:this.light,max:this.selecting===p.hour?this.isAmPm&&"am"===this.period?11:23:59,min:this.selecting===p.hour&&this.isAmPm&&"pm"===this.period?12:0,readonly:this.readonly,scrollable:this.scrollable,size:Number(this.width)-(!this.fullWidth&&this.landscape?80:20),step:this.selecting===p.hour?1:5,value:this.selecting===p.hour?this.inputHour:this.selecting===p.minute?this.inputMinute:this.inputSecond},on:{input:this.onInput,change:this.onChange},ref:"clock"})},genPickerBody:function(){return this.$createElement("div",{staticClass:"v-time-picker-clock__container",key:this.selecting},[this.genClock()])},genPickerTitle:function(){var t=this;return this.$createElement(r.default,{props:{ampm:this.isAmPm,disabled:this.disabled,hour:this.inputHour,minute:this.inputMinute,second:this.inputSecond,period:this.period,readonly:this.readonly,useSeconds:this.useSeconds,selecting:this.selecting},on:{"update:selecting":function(e){return t.selecting=e},"update:period":this.setPeriod},ref:"title",slot:"title"})}},render:function(){return this.genPicker("v-picker--time")}})},"./src/components/VTimePicker/VTimePickerClock.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_time-picker-clock.styl");var r=n("./src/mixins/colorable.ts"),i=n("./src/mixins/themeable.ts"),a=n("./src/util/mixins.ts"),o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=Object(a.default)(r.default,i.default).extend({name:"v-time-picker-clock",props:{allowedValues:Function,disabled:Boolean,double:Boolean,format:{type:Function,default:function(t){return t}},max:{type:Number,required:!0},min:{type:Number,required:!0},scrollable:Boolean,readonly:Boolean,rotate:{type:Number,default:0},step:{type:Number,default:1},value:Number},data:function(){return{inputValue:this.value,isDragging:!1,valueOnMouseDown:null,valueOnMouseUp:null}},computed:{count:function(){return this.max-this.min+1},degreesPerUnit:function(){return 360/this.roundCount},degrees:function(){return this.degreesPerUnit*Math.PI/180},displayedValue:function(){return null==this.value?this.min:this.value},innerRadiusScale:function(){return.62},roundCount:function(){return this.double?this.count/2:this.count}},watch:{value:function(t){this.inputValue=t}},methods:{wheel:function(t){t.preventDefault();var e=Math.sign(-t.deltaY||1),n=this.displayedValue;do{n=((n+=e)-this.min+this.count)%this.count+this.min}while(!this.isAllowed(n)&&n!==this.displayedValue);n!==this.displayedValue&&this.update(n)},isInner:function(t){return this.double&&t-this.min>=this.roundCount},handScale:function(t){return this.isInner(t)?this.innerRadiusScale:1},isAllowed:function(t){return!this.allowedValues||this.allowedValues(t)},genValues:function(){for(var t=[],e=this.min;e<=this.max;e+=this.step){var n=e===this.value&&(this.color||"accent");t.push(this.$createElement("span",this.setBackgroundColor(n,{staticClass:"v-time-picker-clock__item",class:{"v-time-picker-clock__item--active":e===this.displayedValue,"v-time-picker-clock__item--disabled":this.disabled||!this.isAllowed(e)},style:this.getTransform(e),domProps:{innerHTML:"<span>"+this.format(e)+"</span>"}})))}return t},genHand:function(){var t="scaleY("+this.handScale(this.displayedValue)+")",e=this.rotate+this.degreesPerUnit*(this.displayedValue-this.min),n=null!=this.value&&(this.color||"accent");return this.$createElement("div",this.setBackgroundColor(n,{staticClass:"v-time-picker-clock__hand",class:{"v-time-picker-clock__hand--inner":this.isInner(this.value)},style:{transform:"rotate("+e+"deg) "+t}}))},getTransform:function(t){var e=this.getPosition(t);return{left:50+50*e.x+"%",top:50+50*e.y+"%"}},getPosition:function(t){var e=this.rotate*Math.PI/180;return{x:Math.sin((t-this.min)*this.degrees+e)*this.handScale(t),y:-Math.cos((t-this.min)*this.degrees+e)*this.handScale(t)}},onMouseDown:function(t){t.preventDefault(),this.valueOnMouseDown=null,this.valueOnMouseUp=null,this.isDragging=!0,this.onDragMove(t)},onMouseUp:function(){this.isDragging=!1,null!==this.valueOnMouseUp&&this.isAllowed(this.valueOnMouseUp)&&this.$emit("change",this.valueOnMouseUp)},onDragMove:function(t){if(t.preventDefault(),this.isDragging||"click"===t.type){var e,n=this.$refs.clock.getBoundingClientRect(),r=n.width,i=n.top,a=n.left,o=this.$refs.innerClock.getBoundingClientRect().width,s="touches"in t?t.touches[0]:t,c={x:r/2,y:-r/2},u={x:s.clientX-a,y:i-s.clientY},l=Math.round(this.angle(c,u)-this.rotate+360)%360,d=this.double&&this.euclidean(c,u)<(o+o*this.innerRadiusScale)/4,f=(Math.round(l/this.degreesPerUnit)+(d?this.roundCount:0))%this.count+this.min;e=l>=360-this.degreesPerUnit/2?d?this.max-this.roundCount+1:this.min:f,this.isAllowed(f)&&(null===this.valueOnMouseDown&&(this.valueOnMouseDown=e),this.valueOnMouseUp=e,this.update(e))}},update:function(t){this.inputValue!==t&&(this.inputValue=t,this.$emit("input",t))},euclidean:function(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)},angle:function(t,e){var n=2*Math.atan2(e.y-t.y-this.euclidean(t,e),e.x-t.x);return Math.abs(180*n/Math.PI)}},render:function(t){var e=this;return t("div",{staticClass:"v-time-picker-clock",class:o({"v-time-picker-clock--indeterminate":null==this.value},this.themeClasses),on:this.readonly||this.disabled?void 0:Object.assign({mousedown:this.onMouseDown,mouseup:this.onMouseUp,mouseleave:function(){return e.isDragging&&e.onMouseUp()},touchstart:this.onMouseDown,touchend:this.onMouseUp,mousemove:this.onDragMove,touchmove:this.onDragMove},this.scrollable?{wheel:this.wheel}:{}),ref:"clock"},[t("div",{staticClass:"v-time-picker-clock__inner",ref:"innerClock"},[this.genHand(),this.genValues()])])}})},"./src/components/VTimePicker/VTimePickerTitle.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_time-picker-title.styl");var r=n("./src/mixins/picker-button.ts"),i=n("./src/components/VDatePicker/util/index.ts"),a=n("./src/util/mixins.ts"),o=n("./src/components/VTimePicker/VTimePicker.ts");e.default=Object(a.default)(r.default).extend({name:"v-time-picker-title",props:{ampm:Boolean,disabled:Boolean,hour:Number,minute:Number,second:Number,period:{type:String,validator:function(t){return"am"===t||"pm"===t}},readonly:Boolean,useSeconds:Boolean,selecting:Number},methods:{genTime:function(){var t=this.hour;this.ampm&&(t=t?(t-1)%12+1:12);var e=null==this.hour?"--":this.ampm?String(t):Object(i.pad)(t),n=null==this.minute?"--":Object(i.pad)(this.minute),r=[this.genPickerButton("selecting",o.selectingTimes.hour,e,this.disabled),this.$createElement("span",":"),this.genPickerButton("selecting",o.selectingTimes.minute,n,this.disabled)];if(this.useSeconds){var a=null==this.second?"--":Object(i.pad)(this.second);r.push(this.$createElement("span",":")),r.push(this.genPickerButton("selecting",o.selectingTimes.second,a,this.disabled))}return this.$createElement("div",{class:"v-time-picker-title__time"},r)},genAmPm:function(){return this.$createElement("div",{staticClass:"v-time-picker-title__ampm"},[this.genPickerButton("period","am","am",this.disabled||this.readonly),this.genPickerButton("period","pm","pm",this.disabled||this.readonly)])}},render:function(t){var e=[this.genTime()];return this.ampm&&e.push(this.genAmPm()),t("div",{staticClass:"v-time-picker-title"},e)}})},"./src/components/VTimePicker/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VTimePicker/VTimePicker.ts");n.d(e,"VTimePicker",function(){return r.default});var i=n("./src/components/VTimePicker/VTimePickerClock.ts");n.d(e,"VTimePickerClock",function(){return i.default});var a=n("./src/components/VTimePicker/VTimePickerTitle.ts");n.d(e,"VTimePickerTitle",function(){return a.default}),e.default={$_vuetify_subcomponents:{VTimePicker:r.default,VTimePickerClock:i.default,VTimePickerTitle:a.default}}},"./src/components/VTimeline/VTimeline.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_timeline.styl");var r=n("./src/util/mixins.ts"),i=n("./src/mixins/themeable.ts"),a=function(){return(a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=Object(r.default)(i.default).extend({name:"v-timeline",props:{alignTop:Boolean,dense:Boolean},computed:{classes:function(){return a({"v-timeline--align-top":this.alignTop,"v-timeline--dense":this.dense},this.themeClasses)}},render:function(t){return t("div",{staticClass:"v-timeline",class:this.classes},this.$slots.default)}})},"./src/components/VTimeline/VTimelineItem.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/util/mixins.ts"),i=n("./src/components/VIcon/index.ts"),a=n("./src/mixins/themeable.ts"),o=n("./src/mixins/colorable.ts"),s=function(){return(s=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=Object(r.default)(o.default,a.default).extend({name:"v-timeline-item",props:{color:{type:String,default:"primary"},fillDot:Boolean,hideDot:Boolean,icon:String,iconColor:String,large:Boolean,left:Boolean,right:Boolean,small:Boolean},computed:{hasIcon:function(){return!!this.icon||!!this.$slots.icon}},methods:{genBody:function(){return this.$createElement("div",{staticClass:"v-timeline-item__body"},this.$slots.default)},genIcon:function(){return this.$slots.icon?this.$slots.icon:this.$createElement(i.default,{props:{color:this.iconColor,dark:!this.theme.isDark,small:this.small}},this.icon)},genInnerDot:function(){var t=this.setBackgroundColor(this.color);return this.$createElement("div",s({staticClass:"v-timeline-item__inner-dot"},t),[this.hasIcon&&this.genIcon()])},genDot:function(){return this.$createElement("div",{staticClass:"v-timeline-item__dot",class:{"v-timeline-item__dot--small":this.small,"v-timeline-item__dot--large":this.large}},[this.genInnerDot()])},genOpposite:function(){return this.$createElement("div",{staticClass:"v-timeline-item__opposite"},this.$slots.opposite)}},render:function(t){var e=[this.genBody()];return this.hideDot||e.unshift(this.genDot()),this.$slots.opposite&&e.push(this.genOpposite()),t("div",{staticClass:"v-timeline-item",class:s({"v-timeline-item--fill-dot":this.fillDot,"v-timeline-item--left":this.left,"v-timeline-item--right":this.right},this.themeClasses)},e)}})},"./src/components/VTimeline/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VTimeline/VTimeline.ts");n.d(e,"VTimeline",function(){return r.default});var i=n("./src/components/VTimeline/VTimelineItem.ts");n.d(e,"VTimelineItem",function(){return i.default}),e.default={$_vuetify_subcomponents:{VTimeline:r.default,VTimelineItem:i.default}}},"./src/components/VToolbar/VToolbar.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_toolbar.styl");var r=n("./src/mixins/applicationable.ts"),i=n("./src/mixins/colorable.ts"),a=n("./src/mixins/themeable.ts"),o=n("./src/mixins/ssr-bootable.ts"),s=n("./src/directives/scroll.ts"),c=n("./src/util/console.ts"),u=n("./src/util/mixins.ts"),l=function(){return(l=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=Object(u.default)(Object(r.default)("top",["clippedLeft","clippedRight","computedHeight","invertedScroll","manualScroll"]),i.default,o.default,a.default).extend({name:"v-toolbar",directives:{Scroll:s.default},props:{card:Boolean,clippedLeft:Boolean,clippedRight:Boolean,dense:Boolean,extended:Boolean,extensionHeight:{type:[Number,String],validator:function(t){return!isNaN(parseInt(t))}},flat:Boolean,floating:Boolean,height:{type:[Number,String],validator:function(t){return!isNaN(parseInt(t))}},invertedScroll:Boolean,manualScroll:Boolean,prominent:Boolean,scrollOffScreen:Boolean,scrollToolbarOffScreen:Boolean,scrollTarget:String,scrollThreshold:{type:Number,default:300},tabs:Boolean},data:function(){return{activeTimeout:null,currentScroll:0,heights:{mobileLandscape:48,mobile:56,desktop:64,dense:48},isActive:!0,isExtended:!1,isScrollingUp:!1,previousScroll:0,savedScroll:0,target:null}},computed:{canScroll:function(){return this.scrollToolbarOffScreen?(Object(c.deprecate)("scrollToolbarOffScreen","scrollOffScreen",this),!0):this.scrollOffScreen||this.invertedScroll},computedContentHeight:function(){return this.height?parseInt(this.height):this.dense?this.heights.dense:this.prominent||this.$vuetify.breakpoint.mdAndUp?this.heights.desktop:this.$vuetify.breakpoint.smAndDown&&this.$vuetify.breakpoint.width>this.$vuetify.breakpoint.height?this.heights.mobileLandscape:this.heights.mobile},computedExtensionHeight:function(){return this.tabs?48:this.extensionHeight?parseInt(this.extensionHeight):this.computedContentHeight},computedHeight:function(){return this.isExtended?this.computedContentHeight+this.computedExtensionHeight:this.computedContentHeight},computedMarginTop:function(){return this.app?this.$vuetify.application.bar:0},classes:function(){return l({"v-toolbar":!0,"elevation-0":this.flat||!this.isActive&&!this.tabs&&this.canScroll,"v-toolbar--absolute":this.absolute,"v-toolbar--card":this.card,"v-toolbar--clipped":this.clippedLeft||this.clippedRight,"v-toolbar--dense":this.dense,"v-toolbar--extended":this.isExtended,"v-toolbar--fixed":!this.absolute&&(this.app||this.fixed),"v-toolbar--floating":this.floating,"v-toolbar--prominent":this.prominent},this.themeClasses)},computedPaddingLeft:function(){return!this.app||this.clippedLeft?0:this.$vuetify.application.left},computedPaddingRight:function(){return!this.app||this.clippedRight?0:this.$vuetify.application.right},computedTransform:function(){return this.isActive?0:this.canScroll?-this.computedContentHeight:-this.computedHeight},currentThreshold:function(){return Math.abs(this.currentScroll-this.savedScroll)},styles:function(){return{marginTop:this.computedMarginTop+"px",paddingRight:this.computedPaddingRight+"px",paddingLeft:this.computedPaddingLeft+"px",transform:"translateY("+this.computedTransform+"px)"}}},watch:{currentThreshold:function(t){this.invertedScroll?this.isActive=this.currentScroll>this.scrollThreshold:t<this.scrollThreshold||!this.isBooted||(this.isActive=this.isScrollingUp,this.savedScroll=this.currentScroll)},isActive:function(){this.savedScroll=0},invertedScroll:function(t){this.isActive=!t},manualScroll:function(t){this.isActive=!t},isScrollingUp:function(){this.savedScroll=this.savedScroll||this.currentScroll}},created:function(){(this.invertedScroll||this.manualScroll)&&(this.isActive=!1)},mounted:function(){this.scrollTarget&&(this.target=document.querySelector(this.scrollTarget))},methods:{onScroll:function(){this.canScroll&&!this.manualScroll&&"undefined"!=typeof window&&(this.currentScroll=this.target?this.target.scrollTop:window.pageYOffset,this.isScrollingUp=this.currentScroll<this.previousScroll,this.previousScroll=this.currentScroll)},updateApplication:function(){return this.invertedScroll||this.manualScroll?0:this.computedHeight}},render:function(t){this.isExtended=this.extended||!!this.$slots.extension;var e=[],n=this.setBackgroundColor(this.color,{class:this.classes,style:this.styles,on:this.$listeners});return n.directives=[{arg:this.scrollTarget,name:"scroll",value:this.onScroll}],e.push(t("div",{staticClass:"v-toolbar__content",style:{height:this.computedContentHeight+"px"},ref:"content"},this.$slots.default)),this.isExtended&&e.push(t("div",{staticClass:"v-toolbar__extension",style:{height:this.computedExtensionHeight+"px"}},this.$slots.extension)),t("nav",n,e)}})},"./src/components/VToolbar/VToolbarSideIcon.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VBtn/index.ts"),i=n("./src/components/VIcon/index.ts"),a=n("vue"),o=n.n(a);e.default=o.a.extend({name:"v-toolbar-side-icon",functional:!0,render:function(t,e){var n=e.slots,a=e.listeners,o=e.props,s=e.data,c=s.staticClass?s.staticClass+" v-toolbar__side-icon":"v-toolbar__side-icon",u=Object.assign(s,{staticClass:c,props:Object.assign(o,{icon:!0}),on:a}),l=n().default;return t(r.default,u,l||[t(i.default,"$vuetify.icons.menu")])}})},"./src/components/VToolbar/index.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"VToolbarTitle",function(){return o}),n.d(e,"VToolbarItems",function(){return s});var r=n("./src/util/helpers.ts"),i=n("./src/components/VToolbar/VToolbar.ts");n.d(e,"VToolbar",function(){return i.default});var a=n("./src/components/VToolbar/VToolbarSideIcon.ts");n.d(e,"VToolbarSideIcon",function(){return a.default});var o=Object(r.createSimpleFunctional)("v-toolbar__title"),s=Object(r.createSimpleFunctional)("v-toolbar__items");e.default={$_vuetify_subcomponents:{VToolbar:i.default,VToolbarItems:s,VToolbarTitle:o,VToolbarSideIcon:a.default}}},"./src/components/VTooltip/VTooltip.js":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_tooltips.styl");var r=n("./src/mixins/colorable.ts"),i=n("./src/mixins/delayable.ts"),a=n("./src/mixins/dependent.ts"),o=n("./src/mixins/detachable.js"),s=n("./src/mixins/menuable.js"),c=n("./src/mixins/toggleable.ts"),u=n("./src/util/helpers.ts"),l=n("./src/util/console.ts");e.default={name:"v-tooltip",mixins:[r.default,i.default,a.default,o.default,s.default,c.default],props:{closeDelay:{type:[Number,String],default:200},debounce:{type:[Number,String],default:0},disabled:Boolean,fixed:{type:Boolean,default:!0},openDelay:{type:[Number,String],default:200},tag:{type:String,default:"span"},transition:String,zIndex:{default:null}},data:function(){return{calculatedMinWidth:0,closeDependents:!1}},computed:{calculatedLeft:function(){var t=this.dimensions,e=t.activator,n=t.content,r=!(this.bottom||this.left||this.top||this.right),i=this.isAttached?e.offsetLeft:e.left,a=0;return this.top||this.bottom||r?a=i+e.width/2-n.width/2:(this.left||this.right)&&(a=i+(this.right?e.width:-n.width)+(this.right?10:-10)),this.nudgeLeft&&(a-=parseInt(this.nudgeLeft)),this.nudgeRight&&(a+=parseInt(this.nudgeRight)),this.calcXOverflow(a,this.dimensions.content.width)+"px"},calculatedTop:function(){var t=this.dimensions,e=t.activator,n=t.content,r=this.isAttached?e.offsetTop:e.top,i=0;return this.top||this.bottom?i=r+(this.bottom?e.height:-n.height)+(this.bottom?10:-10):(this.left||this.right)&&(i=r+e.height/2-n.height/2),this.nudgeTop&&(i-=parseInt(this.nudgeTop)),this.nudgeBottom&&(i+=parseInt(this.nudgeBottom)),this.calcYOverflow(i+this.pageYOffset)+"px"},classes:function(){return{"v-tooltip--top":this.top,"v-tooltip--right":this.right,"v-tooltip--bottom":this.bottom,"v-tooltip--left":this.left}},computedTransition:function(){return this.transition?this.transition:this.top?"slide-y-reverse-transition":this.right?"slide-x-transition":this.bottom?"slide-y-transition":this.left?"slide-x-reverse-transition":""},offsetY:function(){return this.top||this.bottom},offsetX:function(){return this.left||this.right},styles:function(){return{left:this.calculatedLeft,maxWidth:Object(u.convertToUnit)(this.maxWidth),minWidth:Object(u.convertToUnit)(this.minWidth),opacity:this.isActive?.9:0,top:this.calculatedTop,zIndex:this.zIndex||this.activeZIndex}}},beforeMount:function(){var t=this;this.$nextTick(function(){t.value&&t.callActivate()})},mounted:function(){"v-slot"===Object(u.getSlotType)(this,"activator",!0)&&Object(l.consoleError)("v-tooltip's activator slot must be bound, try '<template #activator=\"data\"><v-btn v-on=\"data.on>'",this)},methods:{activate:function(){this.updateDimensions(),requestAnimationFrame(this.startTransition)},genActivator:function(){var t=this,e=this.disabled?{}:{mouseenter:function(e){t.getActivator(e),t.runDelay("open")},mouseleave:function(e){t.getActivator(e),t.runDelay("close")}};if("scoped"===Object(u.getSlotType)(this,"activator")){var n=this.$scopedSlots.activator({on:e});return this.activatorNode=n,n}return this.$createElement("span",{on:e,ref:"activator"},this.$slots.activator)}},render:function(t){var e,n=t("div",this.setBackgroundColor(this.color,{staticClass:"v-tooltip__content",class:(e={},e[this.contentClass]=!0,e.menuable__content__active=this.isActive,e["v-tooltip__content--fixed"]=this.activatorFixed,e),style:this.styles,attrs:this.getScopeIdAttrs(),directives:[{name:"show",value:this.isContentActive}],ref:"content"}),this.showLazyContent(this.$slots.default));return t(this.tag,{staticClass:"v-tooltip",class:this.classes},[t("transition",{props:{name:this.computedTransition}},[n]),this.genActivator()])}}},"./src/components/VTooltip/index.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VTooltip/VTooltip.js");n.d(e,"VTooltip",function(){return r.default}),e.default=r.default},"./src/components/VTreeview/VTreeview.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_treeview.styl");var r=n("./src/components/VTreeview/VTreeviewNode.ts"),i=n("./src/mixins/themeable.ts"),a=n("./src/mixins/registrable.ts"),o=n("./src/util/helpers.ts"),s=n("./src/util/mixins.ts"),c=n("./src/util/console.ts"),u=n("./src/components/VTreeview/util/filterTreeItems.ts"),l=function(){return(l=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},d=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},f=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(d(arguments[e]));return t},h=function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}};e.default=Object(s.default)(Object(a.provide)("treeview"),i.default).extend({name:"v-treeview",provide:function(){return{treeview:this}},props:l({active:{type:Array,default:function(){return[]}},items:{type:Array,default:function(){return[]}},hoverable:Boolean,multipleActive:Boolean,open:{type:Array,default:function(){return[]}},openAll:Boolean,returnObject:{type:Boolean,default:!1},value:{type:Array,default:function(){return[]}},search:String,filter:Function},r.VTreeviewNodeProps),data:function(){return{nodes:{},selectedCache:new Set,activeCache:new Set,openCache:new Set}},computed:{excludedItems:function(){var t=new Set;if(!this.search)return t;for(var e=0;e<this.items.length;e++)Object(u.filterTreeItems)(this.filter||u.filterTreeItem,this.items[e],this.search,this.itemKey,this.itemText,this.itemChildren,t);return t}},watch:{items:{handler:function(){var t=this,e=Object.keys(this.nodes).map(function(e){return Object(o.getObjectValueByPath)(t.nodes[e].item,t.itemKey)}),n=this.getKeys(this.items),r=Object(o.arrayDiff)(n,e);if(r.length||!(n.length<e.length)){r.forEach(function(e){return delete t.nodes[e]});var i=f(this.selectedCache);this.selectedCache=new Set,this.activeCache=new Set,this.openCache=new Set,this.buildTree(this.items),Object(o.deepEqual)(i,f(this.selectedCache))||this.emitSelected()}},deep:!0},active:function(t){this.handleNodeCacheWatcher(t,this.activeCache,this.updateActive,this.emitActive)},value:function(t){this.handleNodeCacheWatcher(t,this.selectedCache,this.updateSelected,this.emitSelected)},open:function(t){this.handleNodeCacheWatcher(t,this.openCache,this.updateOpen,this.emitOpen)}},created:function(){var t=this;this.buildTree(this.items),this.value.forEach(function(e){return t.updateSelected(e,!0)}),this.emitSelected(),this.active.forEach(function(e){return t.updateActive(e,!0)}),this.emitActive()},mounted:function(){var t=this;(this.$slots.prepend||this.$slots.append)&&Object(c.consoleWarn)("The prepend and append slots require a slot-scope attribute",this),this.openAll?this.updateAll(!0):(this.open.forEach(function(e){return t.updateOpen(e,!0)}),this.emitOpen())},methods:{updateAll:function(t){var e=this;Object.keys(this.nodes).forEach(function(n){return e.updateOpen(Object(o.getObjectValueByPath)(e.nodes[n].item,e.itemKey),t)}),this.emitOpen()},getKeys:function(t,e){void 0===e&&(e=[]);for(var n=0;n<t.length;n++){var r=Object(o.getObjectValueByPath)(t[n],this.itemKey);e.push(r);var i=Object(o.getObjectValueByPath)(t[n],this.itemChildren);i&&e.push.apply(e,f(this.getKeys(i)))}return e},buildTree:function(t,e){var n=this;void 0===e&&(e=null);for(var r=0;r<t.length;r++){var i=t[r],a=Object(o.getObjectValueByPath)(i,this.itemKey),s=Object(o.getObjectValueByPath)(i,this.itemChildren,[]),c=this.nodes.hasOwnProperty(a)?this.nodes[a]:{isSelected:!1,isIndeterminate:!1,isActive:!1,isOpen:!1,vnode:null},u={vnode:c.vnode,parent:e,children:s.map(function(t){return Object(o.getObjectValueByPath)(t,n.itemKey)}),item:i};this.buildTree(s,a),!this.nodes.hasOwnProperty(a)&&null!==e&&this.nodes.hasOwnProperty(e)?(u.isSelected=this.nodes[e].isSelected,u.isIndeterminate=this.nodes[e].isIndeterminate):(u.isSelected=c.isSelected,u.isIndeterminate=c.isIndeterminate),u.isActive=c.isActive,u.isOpen=c.isOpen,this.nodes[a]=s.length?this.calculateState(u,this.nodes):u,this.nodes[a].isSelected&&this.selectedCache.add(a),this.nodes[a].isActive&&this.activeCache.add(a),this.nodes[a].isOpen&&this.openCache.add(a),this.updateVnodeState(a)}},calculateState:function(t,e){var n=t.children.reduce(function(t,n){return t[0]+=+Boolean(e[n].isSelected),t[1]+=+Boolean(e[n].isIndeterminate),t},[0,0]);return t.isSelected=!!t.children.length&&n[0]===t.children.length,t.isIndeterminate=!t.isSelected&&(n[0]>0||n[1]>0),t},emitOpen:function(){this.emitNodeCache("update:open",this.openCache)},emitSelected:function(){this.emitNodeCache("input",this.selectedCache)},emitActive:function(){this.emitNodeCache("update:active",this.activeCache)},emitNodeCache:function(t,e){var n=this;this.$emit(t,this.returnObject?f(e).map(function(t){return n.nodes[t].item}):f(e))},handleNodeCacheWatcher:function(t,e,n,r){var i=this;t=this.returnObject?t.map(function(t){return Object(o.getObjectValueByPath)(t,i.itemKey)}):t;var a=f(e);Object(o.deepEqual)(a,t)||(a.forEach(function(t){return n(t,!1)}),t.forEach(function(t){return n(t,!0)}),r())},getDescendants:function(t,e){void 0===e&&(e=[]);var n=this.nodes[t].children;e.push.apply(e,f(n));for(var r=0;r<n.length;r++)e=this.getDescendants(n[r],e);return e},getParents:function(t){for(var e=this.nodes[t].parent,n=[];null!==e;)n.push(e),e=this.nodes[e].parent;return n},register:function(t){var e=Object(o.getObjectValueByPath)(t.item,this.itemKey);this.nodes[e].vnode=t,this.updateVnodeState(e)},unregister:function(t){var e=Object(o.getObjectValueByPath)(t.item,this.itemKey);this.nodes[e]&&(this.nodes[e].vnode=null)},updateActive:function(t,e){var n=this;if(this.nodes.hasOwnProperty(t)){this.multipleActive||this.activeCache.forEach(function(t){n.nodes[t].isActive=!1,n.updateVnodeState(t),n.activeCache.delete(t)});var r=this.nodes[t];r&&(e?this.activeCache.add(t):this.activeCache.delete(t),r.isActive=e,this.updateVnodeState(t))}},updateSelected:function(t,e){var n,r,i=this;if(this.nodes.hasOwnProperty(t)){var a=new Map,o=f([t],this.getDescendants(t));o.forEach(function(t){i.nodes[t].isSelected=e,i.nodes[t].isIndeterminate=!1,a.set(t,e)});var s=this.getParents(t);s.forEach(function(t){i.nodes[t]=i.calculateState(i.nodes[t],i.nodes),a.set(t,i.nodes[t].isSelected)}),f([t],o,s).forEach(this.updateVnodeState);try{for(var c=h(a.entries()),u=c.next();!u.done;u=c.next()){var l=d(u.value,2),p=l[0];!0===l[1]?this.selectedCache.add(p):this.selectedCache.delete(p)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}},updateOpen:function(t,e){var n=this;if(this.nodes.hasOwnProperty(t)){var r=this.nodes[t],i=Object(o.getObjectValueByPath)(r.item,this.itemChildren);i&&!i.length&&r.vnode&&!r.vnode.hasLoaded?r.vnode.checkChildren().then(function(){return n.updateOpen(t,e)}):i&&i.length&&(r.isOpen=e,r.isOpen?this.openCache.add(t):this.openCache.delete(t),this.updateVnodeState(t))}},updateVnodeState:function(t){var e=this.nodes[t];e&&e.vnode&&(e.vnode.isSelected=e.isSelected,e.vnode.isIndeterminate=e.isIndeterminate,e.vnode.isActive=e.isActive,e.vnode.isOpen=e.isOpen)},isExcluded:function(t){return!!this.search&&this.excludedItems.has(t)}},render:function(t){var e=this.items.length?this.items.map(r.default.options.methods.genChild.bind(this)):this.$slots.default;return t("div",{staticClass:"v-treeview",class:l({"v-treeview--hoverable":this.hoverable},this.themeClasses)},e)}})},"./src/components/VTreeview/VTreeviewNode.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"VTreeviewNodeProps",function(){return l});var r=n("./src/components/transitions/index.js"),i=n("./src/components/VIcon/index.ts"),a=n("./src/components/VTreeview/VTreeviewNode.ts"),o=n("./src/mixins/registrable.ts"),s=n("./src/util/mixins.ts"),c=n("./src/util/helpers.ts"),u=function(){return(u=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},l={activatable:Boolean,activeClass:{type:String,default:"v-treeview-node--active"},selectable:Boolean,selectedColor:{type:String,default:"accent"},indeterminateIcon:{type:String,default:"$vuetify.icons.checkboxIndeterminate"},onIcon:{type:String,default:"$vuetify.icons.checkboxOn"},offIcon:{type:String,default:"$vuetify.icons.checkboxOff"},expandIcon:{type:String,default:"$vuetify.icons.subgroup"},loadingIcon:{type:String,default:"$vuetify.icons.loading"},itemKey:{type:String,default:"id"},itemText:{type:String,default:"name"},itemChildren:{type:String,default:"children"},loadChildren:Function,openOnClick:Boolean,transition:Boolean};e.default=Object(s.default)(Object(o.inject)("treeview")).extend({name:"v-treeview-node",inject:{treeview:{default:null}},props:u({item:{type:Object,default:function(){return null}}},l),data:function(){return{isOpen:!1,isSelected:!1,isIndeterminate:!1,isActive:!1,isLoading:!1,hasLoaded:!1}},computed:{key:function(){return Object(c.getObjectValueByPath)(this.item,this.itemKey)},children:function(){return Object(c.getObjectValueByPath)(this.item,this.itemChildren)},text:function(){return Object(c.getObjectValueByPath)(this.item,this.itemText)},scopedProps:function(){return{item:this.item,leaf:!this.children,selected:this.isSelected,indeterminate:this.isIndeterminate,active:this.isActive,open:this.isOpen}},computedIcon:function(){return this.isIndeterminate?this.indeterminateIcon:this.isSelected?this.onIcon:this.offIcon},hasChildren:function(){return!(!this.children||!this.children.length&&!this.loadChildren)}},created:function(){this.treeview.register(this)},beforeDestroy:function(){this.treeview.unregister(this)},methods:{checkChildren:function(){var t=this;return new Promise(function(e){if(!t.children||t.children.length||!t.loadChildren||t.hasLoaded)return e();t.isLoading=!0,e(t.loadChildren(t.item))}).then(function(){t.isLoading=!1,t.hasLoaded=!0})},open:function(){this.isOpen=!this.isOpen,this.treeview.updateOpen(this.key,this.isOpen),this.treeview.emitOpen()},genLabel:function(){var t=[];return this.$scopedSlots.label?t.push(this.$scopedSlots.label(this.scopedProps)):t.push(this.text),this.$createElement("div",{slot:"label",staticClass:"v-treeview-node__label"},t)},genContent:function(){var t=[this.$scopedSlots.prepend&&this.$scopedSlots.prepend(this.scopedProps),this.genLabel(),this.$scopedSlots.append&&this.$scopedSlots.append(this.scopedProps)];return this.$createElement("div",{staticClass:"v-treeview-node__content"},t)},genToggle:function(){var t=this;return this.$createElement(i.VIcon,{staticClass:"v-treeview-node__toggle",class:{"v-treeview-node__toggle--open":this.isOpen,"v-treeview-node__toggle--loading":this.isLoading},slot:"prepend",on:{click:function(e){e.stopPropagation(),t.isLoading||t.checkChildren().then(function(){return t.open()})}}},[this.isLoading?this.loadingIcon:this.expandIcon])},genCheckbox:function(){var t=this;return this.$createElement(i.VIcon,{staticClass:"v-treeview-node__checkbox",props:{color:this.isSelected?this.selectedColor:void 0},on:{click:function(e){e.stopPropagation(),t.isLoading||t.checkChildren().then(function(){t.$nextTick(function(){t.isSelected=!t.isSelected,t.isIndeterminate=!1,t.treeview.updateSelected(t.key,t.isSelected),t.treeview.emitSelected()})})}}},[this.computedIcon])},genNode:function(){var t,e=this,n=[this.genContent()];return this.selectable&&n.unshift(this.genCheckbox()),this.hasChildren&&n.unshift(this.genToggle()),this.$createElement("div",{staticClass:"v-treeview-node__root",class:(t={},t[this.activeClass]=this.isActive,t),on:{click:function(){e.openOnClick&&e.children?e.open():e.activatable&&(e.isActive=!e.isActive,e.treeview.updateActive(e.key,e.isActive),e.treeview.emitActive())}}},n)},genChild:function(t){return this.$createElement(a.default,{key:Object(c.getObjectValueByPath)(t,this.itemKey),props:{activatable:this.activatable,activeClass:this.activeClass,item:t,selectable:this.selectable,selectedColor:this.selectedColor,expandIcon:this.expandIcon,indeterminateIcon:this.indeterminateIcon,offIcon:this.offIcon,onIcon:this.onIcon,loadingIcon:this.loadingIcon,itemKey:this.itemKey,itemText:this.itemText,itemChildren:this.itemChildren,loadChildren:this.loadChildren,transition:this.transition,openOnClick:this.openOnClick},scopedSlots:this.$scopedSlots})},genChildrenWrapper:function(){if(!this.isOpen||!this.children)return null;var t=[this.children.map(this.genChild)];return this.$createElement("div",{staticClass:"v-treeview-node__children"},t)},genTransition:function(){return this.$createElement(r.VExpandTransition,[this.genChildrenWrapper()])}},render:function(t){var e=[this.genNode()];return this.transition?e.push(this.genTransition()):e.push(this.genChildrenWrapper()),t("div",{staticClass:"v-treeview-node",class:{"v-treeview-node--leaf":!this.hasChildren,"v-treeview-node--click":this.openOnClick,"v-treeview-node--selected":this.isSelected,"v-treeview-node--excluded":this.treeview.isExcluded(this.key)}},e)}})},"./src/components/VTreeview/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VTreeview/VTreeview.ts");n.d(e,"VTreeview",function(){return r.default});var i=n("./src/components/VTreeview/VTreeviewNode.ts");n.d(e,"VTreeviewNode",function(){return i.default}),e.default={$_vuetify_subcomponents:{VTreeview:r.default,VTreeviewNode:i.default}}},"./src/components/VTreeview/util/filterTreeItems.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"filterTreeItem",function(){return i}),n.d(e,"filterTreeItems",function(){return a});var r=n("./src/util/helpers.ts");function i(t,e,n){return Object(r.getObjectValueByPath)(t,n).toLocaleLowerCase().indexOf(e.toLocaleLowerCase())>-1}function a(t,e,n,i,o,s,c){if(t(e,n,o))return!0;var u=Object(r.getObjectValueByPath)(e,s);if(u){for(var l=!1,d=0;d<u.length;d++)a(t,u[d],n,i,o,s,c)&&(l=!0);if(l)return!0}return c.add(Object(r.getObjectValueByPath)(e,i)),!1}},"./src/components/VWindow/VWindow.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_windows.styl");var r=n("./src/components/VItemGroup/VItemGroup.ts"),i=n("./src/directives/touch.ts");e.default=r.BaseItemGroup.extend({name:"v-window",provide:function(){return{windowGroup:this}},directives:{Touch:i.default},props:{mandatory:{type:Boolean,default:!0},reverse:{type:Boolean,default:void 0},touch:Object,touchless:Boolean,value:{required:!1},vertical:Boolean},data:function(){return{internalHeight:void 0,isActive:!1,isBooted:!1,isReverse:!1}},computed:{computedTransition:function(){return this.isBooted?"v-window-"+(this.vertical?"y":"x")+(this.internalReverse===!this.$vuetify.rtl?"-reverse":"")+"-transition":""},internalIndex:function(){var t=this;return this.items.findIndex(function(e,n){return t.internalValue===t.getValue(e,n)})},internalReverse:function(){return void 0!==this.reverse?this.reverse:this.isReverse}},watch:{internalIndex:"updateReverse"},mounted:function(){var t=this;this.$nextTick(function(){return t.isBooted=!0})},methods:{genContainer:function(){return this.$createElement("div",{staticClass:"v-window__container",class:{"v-window__container--is-active":this.isActive},style:{height:this.internalHeight}},this.$slots.default)},next:function(){this.isReverse=!1;var t=(this.internalIndex+1)%this.items.length,e=this.items[t];this.internalValue=this.getValue(e,t)},prev:function(){this.isReverse=!0;var t=(this.internalIndex+this.items.length-1)%this.items.length,e=this.items[t];this.internalValue=this.getValue(e,t)},updateReverse:function(t,e){this.isReverse=t<e}},render:function(t){var e={staticClass:"v-window",directives:[]};if(!this.touchless){var n=this.touch||{left:this.next,right:this.prev};e.directives.push({name:"touch",value:n})}return t("div",e,[this.genContainer()])}})},"./src/components/VWindow/VWindowItem.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/mixins/bootable.ts"),i=n("./src/mixins/groupable.ts"),a=n("./src/directives/touch.ts"),o=n("./src/util/helpers.ts"),s=n("./src/util/mixins.ts");e.default=Object(s.default)(r.default,Object(i.factory)("windowGroup","v-window-item","v-window")).extend({name:"v-window-item",directives:{Touch:a.default},props:{reverseTransition:{type:[Boolean,String],default:void 0},transition:{type:[Boolean,String],default:void 0},value:{required:!1}},data:function(){return{done:null,isActive:!1,wasCancelled:!1}},computed:{computedTransition:function(){return this.windowGroup.internalReverse?void 0!==this.reverseTransition?this.reverseTransition||"":this.windowGroup.computedTransition:void 0!==this.transition?this.transition||"":this.windowGroup.computedTransition}},mounted:function(){this.$el.addEventListener("transitionend",this.onTransitionEnd,!1)},beforeDestroy:function(){this.$el.removeEventListener("transitionend",this.onTransitionEnd,!1)},methods:{genDefaultSlot:function(){return this.$slots.default},onAfterEnter:function(){var t=this;this.wasCancelled?this.wasCancelled=!1:requestAnimationFrame(function(){t.windowGroup.internalHeight=void 0,t.windowGroup.isActive=!1})},onBeforeEnter:function(){this.windowGroup.isActive=!0},onLeave:function(t){this.windowGroup.internalHeight=Object(o.convertToUnit)(t.clientHeight)},onEnterCancelled:function(){this.wasCancelled=!0},onEnter:function(t,e){var n=this,r=this.windowGroup.isBooted;r&&(this.done=e),requestAnimationFrame(function(){if(!n.computedTransition)return e();n.windowGroup.internalHeight=Object(o.convertToUnit)(t.clientHeight),!r&&setTimeout(e,100)})},onTransitionEnd:function(t){"transform"===t.propertyName&&t.target===this.$el&&this.done&&(this.done(),this.done=null)}},render:function(t){var e=t("div",{staticClass:"v-window-item",directives:[{name:"show",value:this.isActive}],on:this.$listeners},this.showLazyContent(this.genDefaultSlot()));return t("transition",{props:{name:this.computedTransition},on:{afterEnter:this.onAfterEnter,beforeEnter:this.onBeforeEnter,leave:this.onLeave,enter:this.onEnter,enterCancelled:this.onEnterCancelled}},[e])}})},"./src/components/VWindow/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VWindow/VWindow.ts");n.d(e,"VWindow",function(){return r.default});var i=n("./src/components/VWindow/VWindowItem.ts");n.d(e,"VWindowItem",function(){return i.default}),e.default={$_vuetify_subcomponents:{VWindow:r.default,VWindowItem:i.default}}},"./src/components/Vuetify/goTo/easing-patterns.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"linear",function(){return r}),n.d(e,"easeInQuad",function(){return i}),n.d(e,"easeOutQuad",function(){return a}),n.d(e,"easeInOutQuad",function(){return o}),n.d(e,"easeInCubic",function(){return s}),n.d(e,"easeOutCubic",function(){return c}),n.d(e,"easeInOutCubic",function(){return u}),n.d(e,"easeInQuart",function(){return l}),n.d(e,"easeOutQuart",function(){return d}),n.d(e,"easeInOutQuart",function(){return f}),n.d(e,"easeInQuint",function(){return h}),n.d(e,"easeOutQuint",function(){return p}),n.d(e,"easeInOutQuint",function(){return m});var r=function(t){return t},i=function(t){return t*t},a=function(t){return t*(2-t)},o=function(t){return t<.5?2*t*t:(4-2*t)*t-1},s=function(t){return t*t*t},c=function(t){return--t*t*t+1},u=function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},l=function(t){return t*t*t*t},d=function(t){return 1- --t*t*t*t},f=function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},h=function(t){return t*t*t*t*t},p=function(t){return 1+--t*t*t*t*t},m=function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t}},"./src/components/Vuetify/goTo/index.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"default",function(){return c});var r=n("./src/components/Vuetify/goTo/easing-patterns.ts"),i=n("./src/components/Vuetify/goTo/util.ts"),a=n("vue"),o=n.n(a),s=function(){return(s=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function c(t,e){void 0===e&&(e={});var n=s({container:document.scrollingElement||document.body||document.documentElement,duration:500,offset:0,easing:"easeInOutCubic",appOffset:!0},e),a=Object(i.getContainer)(n.container);if(n.appOffset){var c=a.classList.contains("v-navigation-drawer"),u=a.classList.contains("v-navigation-drawer--clipped");n.offset+=o.a.prototype.$vuetify.application.bar,c&&!u||(n.offset+=o.a.prototype.$vuetify.application.top)}var l=performance.now(),d=Object(i.getOffset)(t)-n.offset,f=a.scrollTop;if(d===f)return Promise.resolve(d);var h="function"==typeof n.easing?n.easing:r[n.easing];if(!h)throw new TypeError('Easing function "'+n.easing+'" not found.');return new Promise(function(t){return requestAnimationFrame(function e(r){var i=r-l,o=Math.abs(n.duration?Math.min(i/n.duration,1):1);a.scrollTop=Math.floor(f+(d-f)*h(o));var s=a===document.body?document.documentElement.clientHeight:a.clientHeight;if(1===o||s+a.scrollTop===a.scrollHeight)return t(d);requestAnimationFrame(e)})})}},"./src/components/Vuetify/goTo/util.ts":function(t,e,n){"use strict";function r(t){if("number"==typeof t)return t;var e=o(t);if(!e)throw"string"==typeof t?new Error('Target element "'+t+'" not found.'):new TypeError("Target must be a Number/Selector/HTMLElement/VueComponent, received "+a(t)+" instead.");for(var n=0;e;)n+=e.offsetTop,e=e.offsetParent;return n}function i(t){var e=o(t);if(e)return e;throw"string"==typeof t?new Error('Container element "'+t+'" not found.'):new TypeError("Container must be a Selector/HTMLElement/VueComponent, received "+a(t)+" instead.")}function a(t){return null==t?t:t.constructor.name}function o(t){return"string"==typeof t?document.querySelector(t):t&&t._isVue?t.$el:t instanceof HTMLElement?t:null}n.r(e),n.d(e,"getOffset",function(){return r}),n.d(e,"getContainer",function(){return i})},"./src/components/Vuetify/index.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"checkVueVersion",function(){return p});var r=n("vue"),i=n.n(r),a=n("./src/components/Vuetify/mixins/application.ts"),o=n("./src/components/Vuetify/mixins/breakpoint.ts"),s=n("./src/components/Vuetify/mixins/theme.ts"),c=n("./src/components/Vuetify/mixins/icons.ts"),u=n("./src/components/Vuetify/mixins/options.ts"),l=n("./src/components/Vuetify/mixins/lang.ts"),d=n("./src/components/Vuetify/goTo/index.ts"),f=n("./src/util/console.ts"),h={install:function(t,e){if(void 0===e&&(e={}),!this.installed){this.installed=!0,i.a!==t&&Object(f.consoleError)("Multiple instances of Vue detected\nSee https://github.com/vuetifyjs/vuetify/issues/4068\n\nIf you're seeing \"$attrs is readonly\", it's caused by this"),p(t);var n=Object(l.default)(e.lang);if(t.prototype.$vuetify=new t({mixins:[Object(o.default)(e.breakpoint)],data:{application:a.default,dark:!1,icons:Object(c.default)(e.iconfont,e.icons),lang:n,options:Object(u.default)(e.options),rtl:e.rtl,theme:Object(s.default)(e.theme)},methods:{goTo:d.default,t:n.t.bind(n)}}),e.directives)for(var r in e.directives)t.directive(r,e.directives[r]);!function e(n){if(n){for(var r in n){var i=n[r];i&&!e(i.$_vuetify_subcomponents)&&t.component(r,i)}return!0}return!1}(e.components)}},version:"1.5.18"};function p(t,e){var n=e||"^2.5.18",r=n.split(".",3).map(function(t){return t.replace(/\D/g,"")}).map(Number),i=t.version.split(".",3).map(function(t){return parseInt(t,10)});i[0]===r[0]&&(i[1]>r[1]||i[1]===r[1]&&i[2]>=r[2])||Object(f.consoleWarn)("Vuetify requires Vue version "+n)}e.default=h},"./src/components/Vuetify/mixins/application.ts":function(t,e,n){"use strict";n.r(e),e.default={bar:0,bottom:0,footer:0,insetFooter:0,left:0,right:0,top:0,components:{bar:{},bottom:{},footer:{},insetFooter:{},left:{},right:{},top:{}},bind:function(t,e,n){var r;this.components[e]&&(this.components[e]=((r={})[t]=n,r),this.update(e))},unbind:function(t,e){null!=this.components[e][t]&&(delete this.components[e][t],this.update(e))},update:function(t){this[t]=Object.values(this.components[t]).reduce(function(t,e){return t+e},0)}}},"./src/components/Vuetify/mixins/breakpoint.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"default",function(){return s});var r=n("vue"),i=n.n(r),a=function(){return(a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},o={thresholds:{xs:600,sm:960,md:1280,lg:1920},scrollbarWidth:16};function s(t){return void 0===t&&(t={}),t||(t={}),i.a.extend({data:function(){return a({clientHeight:u(),clientWidth:c(),resizeTimeout:void 0},o,t)},computed:{breakpoint:function(){var t,e=this.clientWidth<this.thresholds.xs,n=this.clientWidth<this.thresholds.sm&&!e,r=this.clientWidth<this.thresholds.md-this.scrollbarWidth&&!(n||e),i=this.clientWidth<this.thresholds.lg-this.scrollbarWidth&&!(r||n||e),a=this.clientWidth>=this.thresholds.lg-this.scrollbarWidth,o=e,s=n,c=(e||n)&&!(r||i||a),u=!e&&(n||r||i||a),l=r,d=(e||n||r)&&!(i||a),f=!(e||n)&&(r||i||a),h=i,p=(e||n||r||i)&&!a,m=!(e||n||r)&&(i||a),v=a;switch(!0){case e:t="xs";break;case n:t="sm";break;case r:t="md";break;case i:t="lg";break;default:t="xl"}return{xs:e,sm:n,md:r,lg:i,xl:a,name:t,xsOnly:o,smOnly:s,smAndDown:c,smAndUp:u,mdOnly:l,mdAndDown:d,mdAndUp:f,lgOnly:h,lgAndDown:p,lgAndUp:m,xlOnly:v,width:this.clientWidth,height:this.clientHeight,thresholds:this.thresholds,scrollbarWidth:this.scrollbarWidth}}},created:function(){"undefined"!=typeof window&&window.addEventListener("resize",this.onResize,{passive:!0})},beforeDestroy:function(){"undefined"!=typeof window&&window.removeEventListener("resize",this.onResize)},methods:{onResize:function(){clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(this.setDimensions,200)},setDimensions:function(){this.clientHeight=u(),this.clientWidth=c()}}})}function c(){return"undefined"==typeof document?0:Math.max(document.documentElement.clientWidth,window.innerWidth||0)}function u(){return"undefined"==typeof document?0:Math.max(document.documentElement.clientHeight,window.innerHeight||0)}},"./src/components/Vuetify/mixins/icons.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"convertToComponentDeclarations",function(){return i}),n.d(e,"default",function(){return o});var r={complete:"fas fa-check",cancel:"fas fa-times-circle",close:"fas fa-times",delete:"fas fa-times-circle",clear:"fas fa-times-circle",success:"fas fa-check-circle",info:"fas fa-info-circle",warning:"fas fa-exclamation",error:"fas fa-exclamation-triangle",prev:"fas fa-chevron-left",next:"fas fa-chevron-right",checkboxOn:"fas fa-check-square",checkboxOff:"far fa-square",checkboxIndeterminate:"fas fa-minus-square",delimiter:"fas fa-circle",sort:"fas fa-sort-up",expand:"fas fa-chevron-down",menu:"fas fa-bars",subgroup:"fas fa-caret-down",dropdown:"fas fa-caret-down",radioOn:"far fa-dot-circle",radioOff:"far fa-circle",edit:"fas fa-edit",ratingEmpty:"far fa-star",ratingFull:"fas fa-star",ratingHalf:"fas fa-star-half"};function i(t,e){var n={};for(var r in e)n[r]={component:t,props:{icon:e[r].split(" fa-")}};return n}var a={md:{complete:"check",cancel:"cancel",close:"close",delete:"cancel",clear:"clear",success:"check_circle",info:"info",warning:"priority_high",error:"warning",prev:"chevron_left",next:"chevron_right",checkboxOn:"check_box",checkboxOff:"check_box_outline_blank",checkboxIndeterminate:"indeterminate_check_box",delimiter:"fiber_manual_record",sort:"arrow_upward",expand:"keyboard_arrow_down",menu:"menu",subgroup:"arrow_drop_down",dropdown:"arrow_drop_down",radioOn:"radio_button_checked",radioOff:"radio_button_unchecked",edit:"edit",ratingEmpty:"star_border",ratingFull:"star",ratingHalf:"star_half",loading:"cached"},mdi:{complete:"mdi-check",cancel:"mdi-close-circle",close:"mdi-close",delete:"mdi-close-circle",clear:"mdi-close",success:"mdi-check-circle",info:"mdi-information",warning:"mdi-exclamation",error:"mdi-alert",prev:"mdi-chevron-left",next:"mdi-chevron-right",checkboxOn:"mdi-checkbox-marked",checkboxOff:"mdi-checkbox-blank-outline",checkboxIndeterminate:"mdi-minus-box",delimiter:"mdi-circle",sort:"mdi-arrow-up",expand:"mdi-chevron-down",menu:"mdi-menu",subgroup:"mdi-menu-down",dropdown:"mdi-menu-down",radioOn:"mdi-radiobox-marked",radioOff:"mdi-radiobox-blank",edit:"mdi-pencil",ratingEmpty:"mdi-star-outline",ratingFull:"mdi-star",ratingHalf:"mdi-star-half"},fa:r,fa4:{complete:"fa fa-check",cancel:"fa fa-times-circle",close:"fa fa-times",delete:"fa fa-times-circle",clear:"fa fa-times-circle",success:"fa fa-check-circle",info:"fa fa-info-circle",warning:"fa fa-exclamation",error:"fa fa-exclamation-triangle",prev:"fa fa-chevron-left",next:"fa fa-chevron-right",checkboxOn:"fa fa-check-square",checkboxOff:"fa fa-square-o",checkboxIndeterminate:"fa fa-minus-square",delimiter:"fa fa-circle",sort:"fa fa-sort-up",expand:"fa fa-chevron-down",menu:"fa fa-bars",subgroup:"fa fa-caret-down",dropdown:"fa fa-caret-down",radioOn:"fa fa-dot-circle",radioOff:"fa fa-circle-o",edit:"fa fa-pencil",ratingEmpty:"fa fa-star-o",ratingFull:"fa fa-star",ratingHalf:"fa fa-star-half-o"},faSvg:i("font-awesome-icon",r)};function o(t,e){return void 0===t&&(t="md"),void 0===e&&(e={}),Object.assign({},a[t]||a.md,e)}},"./src/components/Vuetify/mixins/lang.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"default",function(){return l});var r=n("./src/locale/en.ts"),i=n("./src/util/helpers.ts"),a=n("./src/util/console.ts"),o=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},s=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(o(arguments[e]));return t},c="$vuetify.",u=Symbol("Lang fallback");function l(t){return void 0===t&&(t={}),{locales:Object.assign({en:r.default},t.locales),current:t.current||"en",t:function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return e.startsWith(c)?t.t?t.t.apply(t,s([e],n)):function t(e,n,o){void 0===o&&(o=!1);var s=n.replace(c,""),l=Object(i.getObjectValueByPath)(e,s,u);return l===u&&(o?(Object(a.consoleError)('Translation key "'+s+'" not found in fallback'),l=n):(Object(a.consoleWarn)('Translation key "'+s+'" not found, falling back to default'),l=t(r.default,n,!0))),l}(this.locales[this.current],e).replace(/\{(\d+)\}/g,function(t,e){return String(n[+e])}):e}}}},"./src/components/Vuetify/mixins/options.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"default",function(){return a});var r=function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},i={minifyTheme:null,themeCache:null,customProperties:!1,cspNonce:null};function a(t){return void 0===t&&(t={}),r({},i,t)}},"./src/components/Vuetify/mixins/theme.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"default",function(){return a});var r=function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},i={primary:"#1976D2",secondary:"#424242",accent:"#82B1FF",error:"#FF5252",info:"#2196F3",success:"#4CAF50",warning:"#FB8C00"};function a(t){return void 0===t&&(t={}),!1!==t&&r({},i,t)}},"./src/components/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VApp/index.js");n.d(e,"VApp",function(){return r.VApp});var i=n("./src/components/VAlert/index.ts");n.d(e,"VAlert",function(){return i.VAlert});var a=n("./src/components/VAutocomplete/index.js");n.d(e,"VAutocomplete",function(){return a.VAutocomplete});var o=n("./src/components/VAvatar/index.ts");n.d(e,"VAvatar",function(){return o.VAvatar});var s=n("./src/components/VBadge/index.ts");n.d(e,"VBadge",function(){return s.VBadge});var c=n("./src/components/VBottomNav/index.ts");n.d(e,"VBottomNav",function(){return c.VBottomNav});var u=n("./src/components/VBottomSheet/index.js");n.d(e,"VBottomSheet",function(){return u.VBottomSheet});var l=n("./src/components/VBreadcrumbs/index.ts");n.d(e,"VBreadcrumbs",function(){return l.VBreadcrumbs}),n.d(e,"VBreadcrumbsItem",function(){return l.VBreadcrumbsItem}),n.d(e,"VBreadcrumbsDivider",function(){return l.VBreadcrumbsDivider});var d=n("./src/components/VBtn/index.ts");n.d(e,"VBtn",function(){return d.VBtn});var f=n("./src/components/VBtnToggle/index.ts");n.d(e,"VBtnToggle",function(){return f.VBtnToggle});var h=n("./src/components/VCalendar/index.ts");n.d(e,"VCalendar",function(){return h.VCalendar}),n.d(e,"VCalendarDaily",function(){return h.VCalendarDaily}),n.d(e,"VCalendarWeekly",function(){return h.VCalendarWeekly}),n.d(e,"VCalendarMonthly",function(){return h.VCalendarMonthly});var p=n("./src/components/VCard/index.ts");n.d(e,"VCard",function(){return p.VCard}),n.d(e,"VCardMedia",function(){return p.VCardMedia}),n.d(e,"VCardTitle",function(){return p.VCardTitle}),n.d(e,"VCardActions",function(){return p.VCardActions}),n.d(e,"VCardText",function(){return p.VCardText});var m=n("./src/components/VCarousel/index.ts");n.d(e,"VCarousel",function(){return m.VCarousel}),n.d(e,"VCarouselItem",function(){return m.VCarouselItem});var v=n("./src/components/VCheckbox/index.js");n.d(e,"VCheckbox",function(){return v.VCheckbox});var _=n("./src/components/VChip/index.ts");n.d(e,"VChip",function(){return _.VChip});var g=n("./src/components/VCombobox/index.js");n.d(e,"VCombobox",function(){return g.VCombobox});var b=n("./src/components/VCounter/index.ts");n.d(e,"VCounter",function(){return b.VCounter});var y=n("./src/components/VDataIterator/index.js");n.d(e,"VDataIterator",function(){return y.VDataIterator});var x=n("./src/components/VDataTable/index.js");n.d(e,"VDataTable",function(){return x.VDataTable}),n.d(e,"VEditDialog",function(){return x.VEditDialog}),n.d(e,"VTableOverflow",function(){return x.VTableOverflow});var w=n("./src/components/VDatePicker/index.js");n.d(e,"VDatePicker",function(){return w.VDatePicker}),n.d(e,"VDatePickerTitle",function(){return w.VDatePickerTitle}),n.d(e,"VDatePickerHeader",function(){return w.VDatePickerHeader}),n.d(e,"VDatePickerDateTable",function(){return w.VDatePickerDateTable}),n.d(e,"VDatePickerMonthTable",function(){return w.VDatePickerMonthTable}),n.d(e,"VDatePickerYears",function(){return w.VDatePickerYears});var k=n("./src/components/VDialog/index.js");n.d(e,"VDialog",function(){return k.VDialog});var C=n("./src/components/VDivider/index.ts");n.d(e,"VDivider",function(){return C.VDivider});var E=n("./src/components/VExpansionPanel/index.ts");n.d(e,"VExpansionPanel",function(){return E.VExpansionPanel}),n.d(e,"VExpansionPanelContent",function(){return E.VExpansionPanelContent});var S=n("./src/components/VFooter/index.js");n.d(e,"VFooter",function(){return S.VFooter});var I=n("./src/components/VForm/index.js");n.d(e,"VForm",function(){return I.VForm});var M=n("./src/components/VGrid/index.js");n.d(e,"VContainer",function(){return M.VContainer}),n.d(e,"VContent",function(){return M.VContent}),n.d(e,"VFlex",function(){return M.VFlex}),n.d(e,"VLayout",function(){return M.VLayout}),n.d(e,"VSpacer",function(){return M.VSpacer});var T=n("./src/components/VHover/index.ts");n.d(e,"VHover",function(){return T.VHover});var D=n("./src/components/VIcon/index.ts");n.d(e,"VIcon",function(){return D.VIcon});var R=n("./src/components/VImg/index.ts");n.d(e,"VImg",function(){return R.VImg});var P=n("./src/components/VInput/index.ts");n.d(e,"VInput",function(){return P.VInput});var O=n("./src/components/VItemGroup/index.ts");n.d(e,"VItem",function(){return O.VItem}),n.d(e,"VItemGroup",function(){return O.VItemGroup});var L=n("./src/components/VJumbotron/index.js");n.d(e,"VJumbotron",function(){return L.VJumbotron});var A=n("./src/components/VLabel/index.ts");n.d(e,"VLabel",function(){return A.VLabel});var N=n("./src/components/VList/index.ts");n.d(e,"VList",function(){return N.VList}),n.d(e,"VListGroup",function(){return N.VListGroup}),n.d(e,"VListTile",function(){return N.VListTile}),n.d(e,"VListTileAction",function(){return N.VListTileAction}),n.d(e,"VListTileAvatar",function(){return N.VListTileAvatar}),n.d(e,"VListTileActionText",function(){return N.VListTileActionText}),n.d(e,"VListTileContent",function(){return N.VListTileContent}),n.d(e,"VListTileTitle",function(){return N.VListTileTitle}),n.d(e,"VListTileSubTitle",function(){return N.VListTileSubTitle});var B=n("./src/components/VMenu/index.js");n.d(e,"VMenu",function(){return B.VMenu});var j=n("./src/components/VMessages/index.ts");n.d(e,"VMessages",function(){return j.VMessages});var F=n("./src/components/VNavigationDrawer/index.ts");n.d(e,"VNavigationDrawer",function(){return F.VNavigationDrawer});var Y=n("./src/components/VOverflowBtn/index.js");n.d(e,"VOverflowBtn",function(){return Y.VOverflowBtn});var $=n("./src/components/VPagination/index.ts");n.d(e,"VPagination",function(){return $.VPagination});var z=n("./src/components/VSheet/index.ts");n.d(e,"VSheet",function(){return z.VSheet});var V=n("./src/components/VParallax/index.ts");n.d(e,"VParallax",function(){return V.VParallax});var H=n("./src/components/VPicker/index.ts");n.d(e,"VPicker",function(){return H.VPicker});var q=n("./src/components/VProgressCircular/index.ts");n.d(e,"VProgressCircular",function(){return q.VProgressCircular});var W=n("./src/components/VProgressLinear/index.ts");n.d(e,"VProgressLinear",function(){return W.VProgressLinear});var U=n("./src/components/VRadioGroup/index.js");n.d(e,"VRadioGroup",function(){return U.VRadioGroup}),n.d(e,"VRadio",function(){return U.VRadio});var G=n("./src/components/VRangeSlider/index.js");n.d(e,"VRangeSlider",function(){return G.VRangeSlider});var K=n("./src/components/VRating/index.ts");n.d(e,"VRating",function(){return K.VRating});var X=n("./src/components/VResponsive/index.ts");n.d(e,"VResponsive",function(){return X.VResponsive});var J=n("./src/components/VSelect/index.js");n.d(e,"VSelect",function(){return J.VSelect});var Z=n("./src/components/VSlider/index.js");n.d(e,"VSlider",function(){return Z.VSlider});var Q=n("./src/components/VSnackbar/index.ts");n.d(e,"VSnackbar",function(){return Q.VSnackbar});var tt=n("./src/components/VSparkline/index.ts");n.d(e,"VSparkline",function(){return tt.VSparkline});var et=n("./src/components/VSpeedDial/index.js");n.d(e,"VSpeedDial",function(){return et.VSpeedDial});var nt=n("./src/components/VStepper/index.ts");n.d(e,"VStepper",function(){return nt.VStepper}),n.d(e,"VStepperContent",function(){return nt.VStepperContent}),n.d(e,"VStepperStep",function(){return nt.VStepperStep}),n.d(e,"VStepperHeader",function(){return nt.VStepperHeader}),n.d(e,"VStepperItems",function(){return nt.VStepperItems});var rt=n("./src/components/VSubheader/index.ts");n.d(e,"VSubheader",function(){return rt.VSubheader});var it=n("./src/components/VSwitch/index.js");n.d(e,"VSwitch",function(){return it.VSwitch});var at=n("./src/components/VSystemBar/index.ts");n.d(e,"VSystemBar",function(){return at.VSystemBar});var ot=n("./src/components/VTabs/index.js");n.d(e,"VTabs",function(){return ot.VTabs}),n.d(e,"VTab",function(){return ot.VTab}),n.d(e,"VTabItem",function(){return ot.VTabItem}),n.d(e,"VTabsItems",function(){return ot.VTabsItems}),n.d(e,"VTabsSlider",function(){return ot.VTabsSlider});var st=n("./src/components/VTextarea/index.js");n.d(e,"VTextarea",function(){return st.VTextarea});var ct=n("./src/components/VTextField/index.js");n.d(e,"VTextField",function(){return ct.VTextField});var ut=n("./src/components/VTimeline/index.ts");n.d(e,"VTimeline",function(){return ut.VTimeline}),n.d(e,"VTimelineItem",function(){return ut.VTimelineItem});var lt=n("./src/components/VTimePicker/index.ts");n.d(e,"VTimePicker",function(){return lt.VTimePicker}),n.d(e,"VTimePickerClock",function(){return lt.VTimePickerClock}),n.d(e,"VTimePickerTitle",function(){return lt.VTimePickerTitle});var dt=n("./src/components/VToolbar/index.ts");n.d(e,"VToolbar",function(){return dt.VToolbar}),n.d(e,"VToolbarSideIcon",function(){return dt.VToolbarSideIcon}),n.d(e,"VToolbarTitle",function(){return dt.VToolbarTitle}),n.d(e,"VToolbarItems",function(){return dt.VToolbarItems});var ft=n("./src/components/VTooltip/index.js");n.d(e,"VTooltip",function(){return ft.VTooltip});var ht=n("./src/components/VTreeview/index.ts");n.d(e,"VTreeview",function(){return ht.VTreeview}),n.d(e,"VTreeviewNode",function(){return ht.VTreeviewNode});var pt=n("./src/components/VWindow/index.ts");n.d(e,"VWindow",function(){return pt.VWindow}),n.d(e,"VWindowItem",function(){return pt.VWindowItem});var mt=n("./src/components/transitions/index.js");n.d(e,"VBottomSheetTransition",function(){return mt.VBottomSheetTransition}),n.d(e,"VCarouselTransition",function(){return mt.VCarouselTransition}),n.d(e,"VCarouselReverseTransition",function(){return mt.VCarouselReverseTransition}),n.d(e,"VTabTransition",function(){return mt.VTabTransition}),n.d(e,"VTabReverseTransition",function(){return mt.VTabReverseTransition}),n.d(e,"VMenuTransition",function(){return mt.VMenuTransition}),n.d(e,"VFabTransition",function(){return mt.VFabTransition}),n.d(e,"VDialogTransition",function(){return mt.VDialogTransition}),n.d(e,"VDialogBottomTransition",function(){return mt.VDialogBottomTransition}),n.d(e,"VFadeTransition",function(){return mt.VFadeTransition}),n.d(e,"VScaleTransition",function(){return mt.VScaleTransition}),n.d(e,"VScrollXTransition",function(){return mt.VScrollXTransition}),n.d(e,"VScrollXReverseTransition",function(){return mt.VScrollXReverseTransition}),n.d(e,"VScrollYTransition",function(){return mt.VScrollYTransition}),n.d(e,"VScrollYReverseTransition",function(){return mt.VScrollYReverseTransition}),n.d(e,"VSlideXTransition",function(){return mt.VSlideXTransition}),n.d(e,"VSlideXReverseTransition",function(){return mt.VSlideXReverseTransition}),n.d(e,"VSlideYTransition",function(){return mt.VSlideYTransition}),n.d(e,"VSlideYReverseTransition",function(){return mt.VSlideYReverseTransition}),n.d(e,"VExpandTransition",function(){return mt.VExpandTransition}),n.d(e,"VExpandXTransition",function(){return mt.VExpandXTransition}),n.d(e,"VRowExpandTransition",function(){return mt.VRowExpandTransition})},"./src/components/transitions/expand-transition.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/util/helpers.ts");e.default=function(t,e){void 0===t&&(t=""),void 0===e&&(e=!1);var n=e?"width":"height";return{beforeEnter:function(t){var e;t._parent=t.parentNode,t._initialStyle=((e={transition:t.style.transition,visibility:t.style.visibility,overflow:t.style.overflow})[n]=t.style[n],e)},enter:function(e){var i=e._initialStyle;e.style.setProperty("transition","none","important"),e.style.visibility="hidden";var a=e["offset"+Object(r.upperFirst)(n)]+"px";e.style.visibility=i.visibility,e.style.overflow="hidden",e.style[n]=0,e.offsetHeight,e.style.transition=i.transition,t&&e._parent&&e._parent.classList.add(t),requestAnimationFrame(function(){e.style[n]=a})},afterEnter:a,enterCancelled:a,leave:function(t){var e;t._initialStyle=((e={overflow:t.style.overflow})[n]=t.style[n],e),t.style.overflow="hidden",t.style[n]=t["offset"+Object(r.upperFirst)(n)]+"px",t.offsetHeight,requestAnimationFrame(function(){return t.style[n]=0})},afterLeave:i,leaveCancelled:i};function i(e){t&&e._parent&&e._parent.classList.remove(t),a(e)}function a(t){t.style.overflow=t._initialStyle.overflow,t.style[n]=t._initialStyle[n],delete t._initialStyle}}},"./src/components/transitions/index.js":function(t,e,n){"use strict";n.r(e),n.d(e,"VBottomSheetTransition",function(){return a}),n.d(e,"VCarouselTransition",function(){return o}),n.d(e,"VCarouselReverseTransition",function(){return s}),n.d(e,"VTabTransition",function(){return c}),n.d(e,"VTabReverseTransition",function(){return u}),n.d(e,"VMenuTransition",function(){return l}),n.d(e,"VFabTransition",function(){return d}),n.d(e,"VDialogTransition",function(){return f}),n.d(e,"VDialogBottomTransition",function(){return h}),n.d(e,"VFadeTransition",function(){return p}),n.d(e,"VScaleTransition",function(){return m}),n.d(e,"VScrollXTransition",function(){return v}),n.d(e,"VScrollXReverseTransition",function(){return _}),n.d(e,"VScrollYTransition",function(){return g}),n.d(e,"VScrollYReverseTransition",function(){return b}),n.d(e,"VSlideXTransition",function(){return y}),n.d(e,"VSlideXReverseTransition",function(){return x}),n.d(e,"VSlideYTransition",function(){return w}),n.d(e,"VSlideYReverseTransition",function(){return k}),n.d(e,"VExpandTransition",function(){return C}),n.d(e,"VExpandXTransition",function(){return E}),n.d(e,"VRowExpandTransition",function(){return S});var r=n("./src/util/helpers.ts"),i=n("./src/components/transitions/expand-transition.js"),a=Object(r.createSimpleTransition)("bottom-sheet-transition"),o=Object(r.createSimpleTransition)("carousel-transition"),s=Object(r.createSimpleTransition)("carousel-reverse-transition"),c=Object(r.createSimpleTransition)("tab-transition"),u=Object(r.createSimpleTransition)("tab-reverse-transition"),l=Object(r.createSimpleTransition)("menu-transition"),d=Object(r.createSimpleTransition)("fab-transition","center center","out-in"),f=Object(r.createSimpleTransition)("dialog-transition"),h=Object(r.createSimpleTransition)("dialog-bottom-transition"),p=Object(r.createSimpleTransition)("fade-transition"),m=Object(r.createSimpleTransition)("scale-transition"),v=Object(r.createSimpleTransition)("scroll-x-transition"),_=Object(r.createSimpleTransition)("scroll-x-reverse-transition"),g=Object(r.createSimpleTransition)("scroll-y-transition"),b=Object(r.createSimpleTransition)("scroll-y-reverse-transition"),y=Object(r.createSimpleTransition)("slide-x-transition"),x=Object(r.createSimpleTransition)("slide-x-reverse-transition"),w=Object(r.createSimpleTransition)("slide-y-transition"),k=Object(r.createSimpleTransition)("slide-y-reverse-transition"),C=Object(r.createJavaScriptTransition)("expand-transition",Object(i.default)()),E=Object(r.createJavaScriptTransition)("expand-x-transition",Object(i.default)("",!0)),S=Object(r.createJavaScriptTransition)("row-expand-transition",Object(i.default)("datatable__expand-col--expanded"));e.default={$_vuetify_subcomponents:{VBottomSheetTransition:a,VCarouselTransition:o,VCarouselReverseTransition:s,VDialogTransition:f,VDialogBottomTransition:h,VFabTransition:d,VFadeTransition:p,VMenuTransition:l,VScaleTransition:m,VScrollXTransition:v,VScrollXReverseTransition:_,VScrollYTransition:g,VScrollYReverseTransition:b,VSlideXTransition:y,VSlideXReverseTransition:x,VSlideYTransition:w,VSlideYReverseTransition:k,VTabReverseTransition:u,VTabTransition:c,VExpandTransition:C,VExpandXTransition:E,VRowExpandTransition:S}}},"./src/directives/click-outside.ts":function(t,e,n){"use strict";function r(){return!1}n.r(e),e.default={inserted:function(t,e){var n=function(n){return function(t,e,n){n.args=n.args||{};var i=n.args.closeConditional||r;if(t&&!1!==i(t)&&!("isTrusted"in t&&!t.isTrusted||"pointerType"in t&&!t.pointerType)){var a=(n.args.include||function(){return[]})();a.push(e),!a.some(function(e){return e.contains(t.target)})&&setTimeout(function(){i(t)&&n.value&&n.value(t)},0)}}(n,t,e)};(document.querySelector("[data-app]")||document.body).addEventListener("click",n,!0),t._clickOutside=n},unbind:function(t){if(t._clickOutside){var e=document.querySelector("[data-app]")||document.body;e&&e.removeEventListener("click",t._clickOutside,!0),delete t._clickOutside}}}},"./src/directives/index.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/directives/click-outside.ts");n.d(e,"ClickOutside",function(){return r.default});var i=n("./src/directives/resize.ts");n.d(e,"Resize",function(){return i.default});var a=n("./src/directives/ripple.ts");n.d(e,"Ripple",function(){return a.default});var o=n("./src/directives/scroll.ts");n.d(e,"Scroll",function(){return o.default});var s=n("./src/directives/touch.ts");n.d(e,"Touch",function(){return s.default}),e.default={ClickOutside:r.default,Ripple:a.default,Resize:i.default,Scroll:o.default,Touch:s.default}},"./src/directives/resize.ts":function(t,e,n){"use strict";n.r(e),e.default={inserted:function(t,e){var n=e.value,r=e.options||{passive:!0};window.addEventListener("resize",n,r),t._onResize={callback:n,options:r},e.modifiers&&e.modifiers.quiet||n()},unbind:function(t){if(t._onResize){var e=t._onResize,n=e.callback,r=e.options;window.removeEventListener("resize",n,r),delete t._onResize}}}},"./src/directives/ripple.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/util/console.ts"),i=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},a=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(i(arguments[e]));return t};function o(t,e){t.style.transform=e,t.style.webkitTransform=e}function s(t,e){t.style.opacity=e.toString()}function c(t){return"TouchEvent"===t.constructor.name}var u={show:function(t,e,n){if(void 0===n&&(n={}),e._ripple&&e._ripple.enabled){var r=document.createElement("span"),i=document.createElement("span");r.appendChild(i),r.className="v-ripple__container",n.class&&(r.className+=" "+n.class);var a=function(t,e,n){void 0===n&&(n={});var r=e.getBoundingClientRect(),i=c(t)?t.touches[t.touches.length-1]:t,a=i.clientX-r.left,o=i.clientY-r.top,s=0,u=.3;e._ripple&&e._ripple.circle?(u=.15,s=e.clientWidth/2,s=n.center?s:s+Math.sqrt(Math.pow(a-s,2)+Math.pow(o-s,2))/4):s=Math.sqrt(Math.pow(e.clientWidth,2)+Math.pow(e.clientHeight,2))/2;var l=(e.clientWidth-2*s)/2+"px",d=(e.clientHeight-2*s)/2+"px";return{radius:s,scale:u,x:n.center?l:a-s+"px",y:n.center?d:o-s+"px",centerX:l,centerY:d}}(t,e,n),u=a.radius,l=a.scale,d=a.x,f=a.y,h=a.centerX,p=a.centerY,m=2*u+"px";i.className="v-ripple__animation",i.style.width=m,i.style.height=m,e.appendChild(r);var v=window.getComputedStyle(e);v&&"static"===v.position&&(e.style.position="relative",e.dataset.previousPosition="static"),i.classList.add("v-ripple__animation--enter"),i.classList.add("v-ripple__animation--visible"),o(i,"translate("+d+", "+f+") scale3d("+l+","+l+","+l+")"),s(i,0),i.dataset.activated=String(performance.now()),setTimeout(function(){i.classList.remove("v-ripple__animation--enter"),i.classList.add("v-ripple__animation--in"),o(i,"translate("+h+", "+p+") scale3d(1,1,1)"),s(i,.25)},0)}},hide:function(t){if(t&&t._ripple&&t._ripple.enabled){var e=t.getElementsByClassName("v-ripple__animation");if(0!==e.length){var n=e[e.length-1];if(!n.dataset.isHiding){n.dataset.isHiding="true";var r=performance.now()-Number(n.dataset.activated),i=Math.max(250-r,0);setTimeout(function(){n.classList.remove("v-ripple__animation--in"),n.classList.add("v-ripple__animation--out"),s(n,0),setTimeout(function(){1===t.getElementsByClassName("v-ripple__animation").length&&t.dataset.previousPosition&&(t.style.position=t.dataset.previousPosition,delete t.dataset.previousPosition),n.parentNode&&t.removeChild(n.parentNode)},300)},i)}}}}};function l(t){return void 0===t||!!t}function d(t){var e={},n=t.currentTarget;n&&n._ripple&&!n._ripple.touched&&(c(t)&&(n._ripple.touched=!0),e.center=n._ripple.centered,n._ripple.class&&(e.class=n._ripple.class),u.show(t,n,e))}function f(t){var e=t.currentTarget;e&&(window.setTimeout(function(){e._ripple&&(e._ripple.touched=!1)}),u.hide(e))}function h(t,e,n){var r=l(e.value);r||u.hide(t),t._ripple=t._ripple||{},t._ripple.enabled=r;var i=e.value||{};i.center&&(t._ripple.centered=!0),i.class&&(t._ripple.class=e.value.class),i.circle&&(t._ripple.circle=i.circle),r&&!n?(t.addEventListener("touchstart",d,{passive:!0}),t.addEventListener("touchend",f,{passive:!0}),t.addEventListener("touchcancel",f),t.addEventListener("mousedown",d),t.addEventListener("mouseup",f),t.addEventListener("mouseleave",f),t.addEventListener("dragstart",f,{passive:!0})):!r&&n&&p(t)}function p(t){t.removeEventListener("mousedown",d),t.removeEventListener("touchstart",f),t.removeEventListener("touchend",f),t.removeEventListener("touchcancel",f),t.removeEventListener("mouseup",f),t.removeEventListener("mouseleave",f),t.removeEventListener("dragstart",f)}e.default={bind:function(t,e,n){h(t,e,!1),n.context&&n.context.$nextTick(function(){var e=window.getComputedStyle(t);if(e&&"inline"===e.display){var i=n.fnOptions?[n.fnOptions,n.context]:[n.componentInstance];r.consoleWarn.apply(void 0,a(["v-ripple can only be used on block-level elements"],i))}})},unbind:function(t){delete t._ripple,p(t)},update:function(t,e){e.value!==e.oldValue&&h(t,e,l(e.oldValue))}}},"./src/directives/scroll.ts":function(t,e,n){"use strict";n.r(e),e.default={inserted:function(t,e){var n=e.value,r=e.options||{passive:!0},i=e.arg?document.querySelector(e.arg):window;i&&(i.addEventListener("scroll",n,r),t._onScroll={callback:n,options:r,target:i})},unbind:function(t){if(t._onScroll){var e=t._onScroll,n=e.callback,r=e.options;e.target.removeEventListener("scroll",n,r),delete t._onScroll}}}},"./src/directives/touch.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/util/helpers.ts"),i=function(t){var e=t.touchstartX,n=t.touchendX,r=t.touchstartY,i=t.touchendY;t.offsetX=n-e,t.offsetY=i-r,Math.abs(t.offsetY)<.5*Math.abs(t.offsetX)&&(t.left&&n<e-16&&t.left(t),t.right&&n>e+16&&t.right(t)),Math.abs(t.offsetX)<.5*Math.abs(t.offsetY)&&(t.up&&i<r-16&&t.up(t),t.down&&i>r+16&&t.down(t))};function a(t){var e={touchstartX:0,touchstartY:0,touchendX:0,touchendY:0,touchmoveX:0,touchmoveY:0,offsetX:0,offsetY:0,left:t.left,right:t.right,up:t.up,down:t.down,start:t.start,move:t.move,end:t.end};return{touchstart:function(t){return function(t,e){var n=t.changedTouches[0];e.touchstartX=n.clientX,e.touchstartY=n.clientY,e.start&&e.start(Object.assign(t,e))}(t,e)},touchend:function(t){return function(t,e){var n=t.changedTouches[0];e.touchendX=n.clientX,e.touchendY=n.clientY,e.end&&e.end(Object.assign(t,e)),i(e)}(t,e)},touchmove:function(t){return function(t,e){var n=t.changedTouches[0];e.touchmoveX=n.clientX,e.touchmoveY=n.clientY,e.move&&e.move(Object.assign(t,e))}(t,e)}}}e.default={inserted:function(t,e,n){var i=e.value,o=i.parent?t.parentElement:t,s=i.options||{passive:!0};if(o){var c=a(e.value);o._touchHandlers=Object(o._touchHandlers),o._touchHandlers[n.context._uid]=c,Object(r.keys)(c).forEach(function(t){o.addEventListener(t,c[t],s)})}},unbind:function(t,e,n){var i=e.value.parent?t.parentElement:t;if(i&&i._touchHandlers){var a=i._touchHandlers[n.context._uid];Object(r.keys)(a).forEach(function(t){i.removeEventListener(t,a[t])}),delete i._touchHandlers[n.context._uid]}}}},"./src/index.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/app.styl");var r=n("./src/components/Vuetify/index.ts"),i=n("./src/components/index.ts"),a=n("./src/directives/index.ts"),o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},s={install:function(t,e){t.use(r.default,o({components:i,directives:a.default},e))},version:"1.5.18"};"undefined"!=typeof window&&window.Vue&&window.Vue.use(s),e.default=s},"./src/locale/en.ts":function(t,e,n){"use strict";n.r(e),e.default={dataIterator:{rowsPerPageText:"Items per page:",rowsPerPageAll:"All",pageText:"{0}-{1} of {2}",noResultsText:"No matching records found",nextPage:"Next page",prevPage:"Previous page"},dataTable:{rowsPerPageText:"Rows per page:"},noDataText:"No data available",carousel:{prev:"Previous visual",next:"Next visual"}}},"./src/mixins/applicationable.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"default",function(){return a});var r=n("./src/mixins/positionable.ts"),i=n("./src/util/mixins.ts");function a(t,e){return void 0===e&&(e=[]),Object(i.default)(Object(r.factory)(["absolute","fixed"])).extend({name:"applicationable",props:{app:Boolean},computed:{applicationProperty:function(){return t}},watch:{app:function(t,e){e?this.removeApplication(!0):this.callUpdate()},applicationProperty:function(t,e){this.$vuetify.application.unbind(this._uid,e)}},activated:function(){this.callUpdate()},created:function(){for(var t=0,n=e.length;t<n;t++)this.$watch(e[t],this.callUpdate);this.callUpdate()},mounted:function(){this.callUpdate()},deactivated:function(){this.removeApplication()},destroyed:function(){this.removeApplication()},methods:{callUpdate:function(){this.app&&this.$vuetify.application.bind(this._uid,this.applicationProperty,this.updateApplication())},removeApplication:function(t){void 0===t&&(t=!1),(t||this.app)&&this.$vuetify.application.unbind(this._uid,this.applicationProperty)},updateApplication:function(){return 0}}})}},"./src/mixins/bootable.ts":function(t,e,n){"use strict";n.r(e);var r=n("vue"),i=n.n(r);e.default=i.a.extend().extend({name:"bootable",props:{lazy:Boolean},data:function(){return{isBooted:!1}},computed:{hasContent:function(){return this.isBooted||!this.lazy||this.isActive}},watch:{isActive:function(){this.isBooted=!0}},methods:{showLazyContent:function(t){return this.hasContent?t:void 0}}})},"./src/mixins/button-group.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VItemGroup/VItemGroup.ts");e.default=r.BaseItemGroup.extend({name:"button-group",provide:function(){return{btnToggle:this}},props:{activeClass:{type:String,default:"v-btn--active"}},computed:{classes:function(){return r.BaseItemGroup.options.computed.classes.call(this)}}})},"./src/mixins/colorable.ts":function(t,e,n){"use strict";n.r(e);var r=n("vue"),i=n.n(r),a=function(){return(a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},o=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o};function s(t){return!!t&&!!t.match(/^(#|(rgb|hsl)a?\()/)}e.default=i.a.extend({name:"colorable",props:{color:String},methods:{setBackgroundColor:function(t,e){var n;return void 0===e&&(e={}),s(t)?e.style=a({},e.style,{"background-color":""+t,"border-color":""+t}):t&&(e.class=a({},e.class,((n={})[t]=!0,n))),e},setTextColor:function(t,e){var n;if(void 0===e&&(e={}),s(t))e.style=a({},e.style,{color:""+t,"caret-color":""+t});else if(t){var r=o(t.toString().trim().split(" ",2),2),i=r[0],c=r[1];e.class=a({},e.class,((n={})[i+"--text"]=!0,n)),c&&(e.class["text--"+c]=!0)}return e}}})},"./src/mixins/comparable.ts":function(t,e,n){"use strict";n.r(e);var r=n("vue"),i=n.n(r),a=n("./src/util/helpers.ts");e.default=i.a.extend({name:"comparable",props:{valueComparator:{type:Function,default:a.deepEqual}}})},"./src/mixins/data-iterable.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VBtn/index.ts"),i=n("./src/components/VIcon/index.ts"),a=n("./src/components/VSelect/index.js"),o=n("./src/mixins/filterable.ts"),s=n("./src/mixins/themeable.ts"),c=n("./src/mixins/loadable.ts"),u=n("./src/util/helpers.ts"),l=n("./src/util/console.ts"),d=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},f=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(d(arguments[e]));return t};e.default={name:"data-iterable",mixins:[o.default,c.default,s.default],props:{expand:Boolean,hideActions:Boolean,disableInitialSort:Boolean,mustSort:Boolean,noResultsText:{type:String,default:"$vuetify.dataIterator.noResultsText"},nextIcon:{type:String,default:"$vuetify.icons.next"},prevIcon:{type:String,default:"$vuetify.icons.prev"},rowsPerPageItems:{type:Array,default:function(){return[5,10,25,{text:"$vuetify.dataIterator.rowsPerPageAll",value:-1}]}},rowsPerPageText:{type:String,default:"$vuetify.dataIterator.rowsPerPageText"},selectAll:[Boolean,String],search:{required:!1},filter:{type:Function,default:function(t,e){return null!=t&&"boolean"!=typeof t&&-1!==t.toString().toLowerCase().indexOf(e)}},customFilter:{type:Function,default:function(t,e,n){return""===(e=e.toString().toLowerCase()).trim()?t:t.filter(function(t){return Object.keys(t).some(function(r){return n(t[r],e)})})}},customSort:{type:Function,default:function(t,e,n){return null===e?t:t.sort(function(t,r){var i,a,o=Object(u.getObjectValueByPath)(t,e),s=Object(u.getObjectValueByPath)(r,e);return n&&(o=(i=d([s,o],2))[0],s=i[1]),isNaN(o)||isNaN(s)?null===o&&null===s?0:(o=(a=d([o,s].map(function(t){return(t||"").toString().toLocaleLowerCase()}),2))[0])>(s=a[1])?1:o<s?-1:0:o-s})}},value:{type:Array,default:function(){return[]}},items:{type:Array,required:!0,default:function(){return[]}},totalItems:{type:Number,default:null},itemKey:{type:String,default:"id"},pagination:{type:Object,default:function(){}}},data:function(){return{searchLength:0,defaultPagination:{descending:!1,page:1,rowsPerPage:5,sortBy:null,totalItems:0},expanded:{},actionsClasses:"v-data-iterator__actions",actionsRangeControlsClasses:"v-data-iterator__actions__range-controls",actionsSelectClasses:"v-data-iterator__actions__select",actionsPaginationClasses:"v-data-iterator__actions__pagination"}},computed:{computedPagination:function(){return this.hasPagination?this.pagination:this.defaultPagination},computedRowsPerPageItems:function(){var t=this;return this.rowsPerPageItems.map(function(e){return Object(u.isObject)(e)?Object.assign({},e,{text:t.$vuetify.t(e.text)}):{value:e,text:Number(e).toLocaleString(t.$vuetify.lang.current)}})},hasPagination:function(){var t=this.pagination||{};return Object.keys(t).length>0},hasSelectAll:function(){return void 0!==this.selectAll&&!1!==this.selectAll},itemsLength:function(){return this.hasSearch?this.searchLength:this.totalItems||this.items.length},indeterminate:function(){return this.hasSelectAll&&this.someItems&&!this.everyItem},everyItem:function(){var t=this;return this.filteredItems.length&&this.filteredItems.every(function(e){return t.isSelected(e)})},someItems:function(){var t=this;return this.filteredItems.some(function(e){return t.isSelected(e)})},getPage:function(){var t=this.computedPagination.rowsPerPage;return t===Object(t)?t.value:t},pageStart:function(){return-1===this.getPage?0:(this.computedPagination.page-1)*this.getPage},pageStop:function(){return-1===this.getPage?this.itemsLength:this.computedPagination.page*this.getPage},filteredItems:function(){return this.filteredItemsImpl()},selected:function(){for(var t={},e=0;e<this.value.length;e++){t[Object(u.getObjectValueByPath)(this.value[e],this.itemKey)]=!0}return t},hasSearch:function(){return null!=this.search}},watch:{items:function(){var t=this;if(this.pageStart>=this.itemsLength&&this.resetPagination(),null===this.totalItems){var e=new Set(this.items.map(function(e){return Object(u.getObjectValueByPath)(e,t.itemKey)})),n=this.value.filter(function(n){return e.has(Object(u.getObjectValueByPath)(n,t.itemKey))});n.length!==this.value.length&&this.$emit("input",n)}},search:function(){var t=this;this.$nextTick(function(){t.updatePagination({page:1,totalItems:t.itemsLength})})},"computedPagination.sortBy":"resetPagination","computedPagination.descending":"resetPagination"},methods:{initPagination:function(){this.rowsPerPageItems.length?this.defaultPagination.rowsPerPage=this.rowsPerPageItems[0]:Object(l.consoleWarn)("The prop 'rows-per-page-items' can not be empty",this),this.defaultPagination.totalItems=this.items.length,this.updatePagination(Object.assign({},this.defaultPagination,this.pagination))},updatePagination:function(t){var e=this.hasPagination?this.pagination:this.defaultPagination,n=Object.assign({},e,t);this.$emit("update:pagination",n),this.hasPagination||(this.defaultPagination=n)},isSelected:function(t){return this.selected[Object(u.getObjectValueByPath)(t,this.itemKey)]},isExpanded:function(t){return this.expanded[Object(u.getObjectValueByPath)(t,this.itemKey)]},filteredItemsImpl:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(this.totalItems)return this.items;var n=this.items.slice();return this.hasSearch&&(n=this.customFilter.apply(this,f([n,this.search,this.filter],t)),this.searchLength=n.length),n=this.customSort(n,this.computedPagination.sortBy,this.computedPagination.descending),this.hideActions&&!this.hasPagination?n:n.slice(this.pageStart,this.pageStop)},resetPagination:function(){1!==this.computedPagination.page&&this.updatePagination({page:1})},sort:function(t){var e=this.computedPagination,n=e.sortBy,r=e.descending;null===n?this.updatePagination({sortBy:t,descending:!1}):n!==t||r?n!==t?this.updatePagination({sortBy:t,descending:!1}):this.mustSort?this.updatePagination({sortBy:t,descending:!1}):this.updatePagination({sortBy:null,descending:null}):this.updatePagination({descending:!0})},toggle:function(t){for(var e=this,n=Object.assign({},this.selected),r=0;r<this.filteredItems.length;r++){var i=Object(u.getObjectValueByPath)(this.filteredItems[r],this.itemKey);n[i]=t}this.$emit("input",this.items.filter(function(t){var r=Object(u.getObjectValueByPath)(t,e.itemKey);return n[r]}))},createProps:function(t,e){var n=this,r={item:t,index:e},i=this.itemKey,a=Object(u.getObjectValueByPath)(t,i);return Object.defineProperty(r,"selected",{get:function(){return n.selected[a]},set:function(e){null==a&&Object(l.consoleWarn)('"'+i+'" attribute must be defined for item',n);var r=n.value.slice();e?r.push(t):r=r.filter(function(t){return Object(u.getObjectValueByPath)(t,i)!==a}),n.$emit("input",r)}}),Object.defineProperty(r,"expanded",{get:function(){return n.expanded[a]},set:function(t){if(null==a&&Object(l.consoleWarn)('"'+i+'" attribute must be defined for item',n),!n.expand)for(var e in n.expanded)n.expanded.hasOwnProperty(e)&&n.$set(n.expanded,e,!1);n.$set(n.expanded,a,t)}}),r},genItems:function(){if(!this.itemsLength&&!this.items.length){var t=this.$slots["no-data"]||this.$vuetify.t(this.noDataText);return[this.genEmptyItems(t)]}if(!this.filteredItems.length){var e=this.$slots["no-results"]||this.$vuetify.t(this.noResultsText);return[this.genEmptyItems(e)]}return this.genFilteredItems()},genPrevIcon:function(){var t=this;return this.$createElement(r.default,{props:{disabled:1===this.computedPagination.page,icon:!0,flat:!0},on:{click:function(){var e=t.computedPagination.page;t.updatePagination({page:e-1})}},attrs:{"aria-label":this.$vuetify.t("$vuetify.dataIterator.prevPage")}},[this.$createElement(i.default,this.$vuetify.rtl?this.nextIcon:this.prevIcon)])},genNextIcon:function(){var t=this,e=this.computedPagination,n=e.rowsPerPage<0||e.page*e.rowsPerPage>=this.itemsLength||this.pageStop<0;return this.$createElement(r.default,{props:{disabled:n,icon:!0,flat:!0},on:{click:function(){var e=t.computedPagination.page;t.updatePagination({page:e+1})}},attrs:{"aria-label":this.$vuetify.t("$vuetify.dataIterator.nextPage")}},[this.$createElement(i.default,this.$vuetify.rtl?this.prevIcon:this.nextIcon)])},genSelect:function(){var t=this;return this.$createElement("div",{class:this.actionsSelectClasses},[this.$vuetify.t(this.rowsPerPageText),this.$createElement(a.default,{attrs:{"aria-label":this.$vuetify.t(this.rowsPerPageText)},props:{items:this.computedRowsPerPageItems,value:this.computedPagination.rowsPerPage,hideDetails:!0,menuProps:{auto:!0,dark:this.dark,light:this.light,minWidth:"75px"}},on:{input:function(e){t.updatePagination({page:1,rowsPerPage:e})}}})])},genPagination:function(){var t,e=this,n="–";if(this.itemsLength){var r=this.itemsLength<this.pageStop||this.pageStop<0?this.itemsLength:this.pageStop;n=this.$scopedSlots.pageText?this.$scopedSlots.pageText({pageStart:this.pageStart+1,pageStop:r,itemsLength:this.itemsLength}):(t=this.$vuetify).t.apply(t,f(["$vuetify.dataIterator.pageText"],[this.pageStart+1,r,this.itemsLength].map(function(t){return Number(t).toLocaleString(e.$vuetify.lang.current)})))}return this.$createElement("div",{class:this.actionsPaginationClasses},[n])},genActions:function(){var t=this.$createElement("div",{class:this.actionsRangeControlsClasses},[this.genPagination(),this.genPrevIcon(),this.genNextIcon()]);return[this.$createElement("div",{class:this.actionsClasses},[this.$slots["actions-prepend"]?this.$createElement("div",{},this.$slots["actions-prepend"]):null,this.rowsPerPageItems.length>1?this.genSelect():null,t,this.$slots["actions-append"]?this.$createElement("div",{},this.$slots["actions-append"]):null])]}}}},"./src/mixins/delayable.ts":function(t,e,n){"use strict";n.r(e);var r=n("vue"),i=n.n(r);e.default=i.a.extend().extend({name:"delayable",props:{openDelay:{type:[Number,String],default:0},closeDelay:{type:[Number,String],default:0}},data:function(){return{openTimeout:void 0,closeTimeout:void 0}},methods:{clearDelay:function(){clearTimeout(this.openTimeout),clearTimeout(this.closeTimeout)},runDelay:function(t,e){var n=this;this.clearDelay();var r=parseInt(this[t+"Delay"],10);this[t+"Timeout"]=setTimeout(e||function(){n.isActive={open:!0,close:!1}[t]},r)}}})},"./src/mixins/dependent.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/util/mixins.ts"),i=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},a=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(i(arguments[e]));return t};e.default=Object(r.default)().extend({name:"dependent",data:function(){return{closeDependents:!0,isActive:!1,isDependent:!0}},watch:{isActive:function(t){if(!t)for(var e=this.getOpenDependents(),n=0;n<e.length;n++)e[n].isActive=!1}},methods:{getOpenDependents:function(){return this.closeDependents?function t(e){for(var n=[],r=0;r<e.length;r++){var i=e[r];i.isActive&&i.isDependent?n.push(i):n.push.apply(n,a(t(i.$children)))}return n}(this.$children):[]},getOpenDependentElements:function(){for(var t=[],e=this.getOpenDependents(),n=0;n<e.length;n++)t.push.apply(t,a(e[n].getClickableDependentElements()));return t},getClickableDependentElements:function(){var t=[this.$el];return this.$refs.content&&t.push(this.$refs.content),this.overlay&&t.push(this.overlay),t.push.apply(t,a(this.getOpenDependentElements())),t}}})},"./src/mixins/detachable.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/mixins/bootable.ts"),i=n("./src/util/console.ts"),a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.default={name:"detachable",mixins:[r.default],props:{attach:{type:null,default:!1,validator:function(t){var e=void 0===t?"undefined":a(t);return"boolean"===e||"string"===e||t.nodeType===Node.ELEMENT_NODE}},contentClass:{default:""}},data:function(){return{hasDetached:!1}},watch:{attach:function(){this.hasDetached=!1,this.initDetach()},hasContent:"initDetach"},beforeMount:function(){var t=this;this.$nextTick(function(){t.activatorNode&&(Array.isArray(t.activatorNode)?t.activatorNode:[t.activatorNode]).forEach(function(e){e.elm&&t.$el.parentNode.insertBefore(e.elm,t.$el)})})},mounted:function(){!this.lazy&&this.initDetach()},deactivated:function(){this.isActive=!1},beforeDestroy:function(){try{if(this.$refs.content&&this.$refs.content.parentNode.removeChild(this.$refs.content),this.activatorNode)(Array.isArray(this.activatorNode)?this.activatorNode:[this.activatorNode]).forEach(function(t){t.elm&&t.elm.parentNode.removeChild(t.elm)})}catch(t){console.log(t)}},methods:{getScopeIdAttrs:function(){var t,e=this.$vnode&&this.$vnode.context.$options._scopeId;return e&&((t={})[e]="",t)},initDetach:function(){var t;this._isDestroyed||!this.$refs.content||this.hasDetached||""===this.attach||!0===this.attach||"attach"===this.attach||((t=!1===this.attach?document.querySelector("[data-app]"):"string"==typeof this.attach?document.querySelector(this.attach):this.attach)?(t.insertBefore(this.$refs.content,t.firstChild),this.hasDetached=!0):Object(i.consoleWarn)("Unable to locate target "+(this.attach||"[data-app]"),this))}}}},"./src/mixins/elevatable.ts":function(t,e,n){"use strict";n.r(e);var r=n("vue"),i=n.n(r);e.default=i.a.extend({name:"elevatable",props:{elevation:[Number,String]},computed:{computedElevation:function(){return this.elevation},elevationClasses:function(){var t;return this.computedElevation?((t={})["elevation-"+this.computedElevation]=!0,t):{}}}})},"./src/mixins/filterable.ts":function(t,e,n){"use strict";n.r(e);var r=n("vue"),i=n.n(r);e.default=i.a.extend({name:"filterable",props:{noDataText:{type:String,default:"$vuetify.noDataText"}}})},"./src/mixins/groupable.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"factory",function(){return i});var r=n("./src/mixins/registrable.ts");function i(t,e,n){return Object(r.inject)(t,e,n).extend({name:"groupable",props:{activeClass:{type:String,default:function(){if(this[t])return this[t].activeClass}},disabled:Boolean},data:function(){return{isActive:!1}},computed:{groupClasses:function(){var t;return this.activeClass?((t={})[this.activeClass]=this.isActive,t):{}}},created:function(){this[t]&&this[t].register(this)},beforeDestroy:function(){this[t]&&this[t].unregister(this)},methods:{toggle:function(){this.$emit("change")}}})}var a=i("itemGroup");e.default=a},"./src/mixins/loadable.ts":function(t,e,n){"use strict";n.r(e);var r=n("vue"),i=n.n(r),a=n("./src/components/VProgressLinear/index.ts");e.default=i.a.extend().extend({name:"loadable",props:{loading:{type:[Boolean,String],default:!1}},methods:{genProgress:function(){return!1===this.loading?null:this.$slots.progress||this.$createElement(a.default,{props:{color:!0===this.loading||""===this.loading?this.color||"primary":this.loading,height:2,indeterminate:!0}})}}})},"./src/mixins/maskable.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/util/mask.ts");e.default={name:"maskable",props:{dontFillMaskBlanks:Boolean,mask:{type:[Object,String],default:null},returnMaskedValue:Boolean,value:{required:!1}},data:function(t){return{selection:0,lazySelection:0,lazyValue:t.value,preDefined:{"credit-card":"#### - #### - #### - ####",date:"##/##/####","date-with-time":"##/##/#### ##:##",phone:"(###) ### - ####",social:"###-##-####",time:"##:##","time-with-seconds":"##:##:##"}}},computed:{masked:function(){return(this.preDefined[this.mask]||this.mask||"").split("")}},watch:{mask:function(){var t=this;if(this.$refs.input){for(var e=this.$refs.input.value,n=this.maskText(Object(r.unmaskText)(this.lazyValue)),i=0,a=this.selection,o=0;o<a;o++)Object(r.isMaskDelimiter)(e[o])||i++;if(a=0,n)for(o=0;o<n.length&&(Object(r.isMaskDelimiter)(n[o])||i--,a++,!(i<=0));o++);this.$nextTick(function(){t.$refs.input.value=n,t.setCaretPosition(a)})}}},beforeMount:function(){if(this.mask&&null!=this.value&&this.returnMaskedValue){var t=this.maskText(this.value);t!==this.value&&this.$emit("input",t)}},methods:{setCaretPosition:function(t){var e=this;this.selection=t,window.setTimeout(function(){e.$refs.input&&e.$refs.input.setSelectionRange(e.selection,e.selection)},0)},updateRange:function(){if(this.$refs.input){var t=this.maskText(this.lazyValue),e=0;if(this.$refs.input.value=t,t)for(var n=0;n<t.length&&!(this.lazySelection<=0);n++)Object(r.isMaskDelimiter)(t[n])||this.lazySelection--,e++;this.setCaretPosition(e),this.$emit("input",this.returnMaskedValue?this.$refs.input.value:this.lazyValue)}},maskText:function(t){return this.mask?Object(r.maskText)(t,this.masked,this.dontFillMaskBlanks):t},unmaskText:function(t){return this.mask&&!this.returnMaskedValue?Object(r.unmaskText)(t):t},setSelectionRange:function(){this.$nextTick(this.updateRange)},resetSelections:function(t){if(t.selectionEnd){this.selection=t.selectionEnd,this.lazySelection=0;for(var e=0;e<this.selection;e++)Object(r.isMaskDelimiter)(t.value[e])||this.lazySelection++}}}}},"./src/mixins/measurable.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/util/helpers.ts"),i=n("vue"),a=n.n(i);e.default=a.a.extend({name:"measurable",props:{height:[Number,String],maxHeight:[Number,String],maxWidth:[Number,String],minHeight:[Number,String],minWidth:[Number,String],width:[Number,String]},computed:{measurableStyles:function(){var t={},e=Object(r.convertToUnit)(this.height),n=Object(r.convertToUnit)(this.minHeight),i=Object(r.convertToUnit)(this.minWidth),a=Object(r.convertToUnit)(this.maxHeight),o=Object(r.convertToUnit)(this.maxWidth),s=Object(r.convertToUnit)(this.width);return e&&(t.height=e),n&&(t.minHeight=n),i&&(t.minWidth=i),a&&(t.maxHeight=a),o&&(t.maxWidth=o),s&&(t.width=s),t}}})},"./src/mixins/menuable.js":function(t,e,n){"use strict";n.r(e);var r=n("vue"),i=n.n(r),a=n("./src/mixins/positionable.ts"),o=n("./src/mixins/stackable.ts"),s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c={activator:{top:0,left:0,bottom:0,right:0,width:0,height:0,offsetTop:0,scrollHeight:0},content:{top:0,left:0,bottom:0,right:0,width:0,height:0,offsetTop:0,scrollHeight:0},hasWindow:!1};e.default=i.a.extend({name:"menuable",mixins:[a.default,o.default],props:{activator:{default:null,validator:function(t){return["string","object"].includes(void 0===t?"undefined":s(t))}},allowOverflow:Boolean,inputActivator:Boolean,light:Boolean,dark:Boolean,maxWidth:{type:[Number,String],default:"auto"},minWidth:[Number,String],nudgeBottom:{type:[Number,String],default:0},nudgeLeft:{type:[Number,String],default:0},nudgeRight:{type:[Number,String],default:0},nudgeTop:{type:[Number,String],default:0},nudgeWidth:{type:[Number,String],default:0},offsetOverflow:Boolean,positionX:{type:Number,default:null},positionY:{type:Number,default:null},zIndex:{type:[Number,String],default:null}},data:function(){return{absoluteX:0,absoluteY:0,activatorFixed:!1,dimensions:Object.assign({},c),isContentActive:!1,pageWidth:0,pageYOffset:0,stackClass:"v-menu__content--active",stackMinZIndex:6}},computed:{computedLeft:function(){var t=this.dimensions.activator,e=this.dimensions.content,n=(this.isAttached?t.offsetLeft:t.left)||0,r=Math.max(t.width,e.width),i=0;if(i+=this.left?n-(r-t.width):n,this.offsetX){var a=isNaN(this.maxWidth)?t.width:Math.min(t.width,this.maxWidth);i+=this.left?-a:t.width}return this.nudgeLeft&&(i-=parseInt(this.nudgeLeft)),this.nudgeRight&&(i+=parseInt(this.nudgeRight)),i},computedTop:function(){var t=this.dimensions.activator,e=this.dimensions.content,n=0;return this.top&&(n+=t.height-e.height),this.isAttached?n+=t.offsetTop:n+=t.top+this.pageYOffset,this.offsetY&&(n+=this.top?-t.height:t.height),this.nudgeTop&&(n-=parseInt(this.nudgeTop)),this.nudgeBottom&&(n+=parseInt(this.nudgeBottom)),n},hasActivator:function(){return!!this.$slots.activator||!!this.$scopedSlots.activator||this.activator||this.inputActivator},isAttached:function(){return!1!==this.attach}},watch:{disabled:function(t){t&&this.callDeactivate()},isActive:function(t){this.disabled||(t?this.callActivate():this.callDeactivate())},positionX:"updateDimensions",positionY:"updateDimensions"},beforeMount:function(){this.checkForWindow()},methods:{absolutePosition:function(){return{offsetTop:0,offsetLeft:0,scrollHeight:0,top:this.positionY||this.absoluteY,bottom:this.positionY||this.absoluteY,left:this.positionX||this.absoluteX,right:this.positionX||this.absoluteX,height:0,width:0}},activate:function(){},calcLeft:function(t){return(this.isAttached?this.computedLeft:this.calcXOverflow(this.computedLeft,t))+"px"},calcTop:function(){return(this.isAttached?this.computedTop:this.calcYOverflow(this.computedTop))+"px"},calcXOverflow:function(t,e){var n=t+e-this.pageWidth+12;return(t=(!this.left||this.right)&&n>0?Math.max(t-n,0):Math.max(t,12))+this.getOffsetLeft()},calcYOverflow:function(t){var e=this.getInnerHeight(),n=this.pageYOffset+e,r=this.dimensions.activator,i=this.dimensions.content.height,a=n<t+i;return a&&this.offsetOverflow&&r.top>i?t=this.pageYOffset+(r.top-i):a&&!this.allowOverflow?t=n-i-12:t<this.pageYOffset&&!this.allowOverflow&&(t=this.pageYOffset+12),t<12?12:t},callActivate:function(){this.hasWindow&&this.activate()},callDeactivate:function(){this.isContentActive=!1,this.deactivate()},checkForWindow:function(){this.hasWindow||(this.hasWindow="undefined"!=typeof window)},checkForPageYOffset:function(){this.hasWindow&&(this.pageYOffset=this.activatorFixed?0:this.getOffsetTop())},checkActivatorFixed:function(){if(!1===this.attach){for(var t=this.getActivator();t;){if("fixed"===window.getComputedStyle(t).position)return void(this.activatorFixed=!0);t=t.offsetParent}this.activatorFixed=!1}},deactivate:function(){},getActivator:function(t){if(this.inputActivator)return this.$el.querySelector(".v-input__slot");if(this.activator)return"string"==typeof this.activator?document.querySelector(this.activator):this.activator;if(this.$refs.activator)return this.$refs.activator.children.length>0?this.$refs.activator.children[0]:this.$refs.activator;if(t)return this.activatedBy=t.currentTarget||t.target,this.activatedBy;if(this.activatedBy)return this.activatedBy;if(this.activatorNode){var e=Array.isArray(this.activatorNode)?this.activatorNode[0]:this.activatorNode,n=e&&e.elm;if(n)return n}},getInnerHeight:function(){return this.hasWindow?window.innerHeight||document.documentElement.clientHeight:0},getOffsetLeft:function(){return this.hasWindow?window.pageXOffset||document.documentElement.scrollLeft:0},getOffsetTop:function(){return this.hasWindow?window.pageYOffset||document.documentElement.scrollTop:0},getRoundedBoundedClientRect:function(t){var e=t.getBoundingClientRect();return{top:Math.round(e.top),left:Math.round(e.left),bottom:Math.round(e.bottom),right:Math.round(e.right),width:Math.round(e.width),height:Math.round(e.height)}},measure:function(t){if(!t||!this.hasWindow)return null;var e=this.getRoundedBoundedClientRect(t);if(this.isAttached){var n=window.getComputedStyle(t);e.left=parseInt(n.marginLeft),e.top=parseInt(n.marginTop)}return e},sneakPeek:function(t){var e=this;requestAnimationFrame(function(){var n=e.$refs.content;if(!n||e.isShown(n))return t();n.style.display="inline-block",t(),n.style.display="none"})},startTransition:function(){var t=this;return new Promise(function(e){return requestAnimationFrame(function(){t.isContentActive=t.hasJustFocused=t.isActive,e()})})},isShown:function(t){return"none"!==t.style.display},updateDimensions:function(){var t=this;this.checkForWindow(),this.checkActivatorFixed(),this.checkForPageYOffset(),this.pageWidth=document.documentElement.clientWidth;var e={};if(!this.hasActivator||this.absolute)e.activator=this.absolutePosition();else{var n=this.getActivator();e.activator=this.measure(n),e.activator.offsetLeft=n.offsetLeft,this.isAttached?e.activator.offsetTop=n.offsetTop:e.activator.offsetTop=0}this.sneakPeek(function(){e.content=t.measure(t.$refs.content),t.dimensions=e})}}})},"./src/mixins/overlayable.ts":function(t,e,n){"use strict";n.r(e);n("./src/stylus/components/_overlay.styl");var r=n("./src/util/helpers.ts"),i=n("vue"),a=n.n(i);e.default=a.a.extend().extend({name:"overlayable",props:{hideOverlay:Boolean},data:function(){return{overlay:null,overlayOffset:0,overlayTimeout:void 0,overlayTransitionDuration:650}},watch:{hideOverlay:function(t){t?this.removeOverlay():this.genOverlay()}},beforeDestroy:function(){this.removeOverlay()},methods:{genOverlay:function(){var t=this;if(!this.isActive||this.hideOverlay||this.isActive&&this.overlayTimeout||this.overlay)return clearTimeout(this.overlayTimeout),this.overlay&&this.overlay.classList.add("v-overlay--active");this.overlay=document.createElement("div"),this.overlay.className="v-overlay",this.absolute&&(this.overlay.className+=" v-overlay--absolute"),this.hideScroll();var e=this.absolute?this.$el.parentNode:document.querySelector("[data-app]");return e&&e.insertBefore(this.overlay,e.firstChild),this.overlay.clientHeight,requestAnimationFrame(function(){t.overlay&&(t.overlay.className+=" v-overlay--active",void 0!==t.activeZIndex&&(t.overlay.style.zIndex=String(t.activeZIndex-1)))}),!0},removeOverlay:function(t){var e=this;if(void 0===t&&(t=!0),!this.overlay)return t&&this.showScroll();this.overlay.classList.remove("v-overlay--active"),this.overlayTimeout=window.setTimeout(function(){try{e.overlay&&e.overlay.parentNode&&e.overlay.parentNode.removeChild(e.overlay),e.overlay=null,t&&e.showScroll()}catch(t){console.log(t)}clearTimeout(e.overlayTimeout),e.overlayTimeout=void 0},this.overlayTransitionDuration)},scrollListener:function(t){if("keydown"===t.type){if(["INPUT","TEXTAREA","SELECT"].includes(t.target.tagName)||t.target.isContentEditable)return;var e=[r.keyCodes.up,r.keyCodes.pageup],n=[r.keyCodes.down,r.keyCodes.pagedown];if(e.includes(t.keyCode))t.deltaY=-1;else{if(!n.includes(t.keyCode))return;t.deltaY=1}}(t.target===this.overlay||"keydown"!==t.type&&t.target===document.body||this.checkPath(t))&&t.preventDefault()},hasScrollbar:function(t){if(!t||t.nodeType!==Node.ELEMENT_NODE)return!1;var e=window.getComputedStyle(t);return["auto","scroll"].includes(e.overflowY)&&t.scrollHeight>t.clientHeight},shouldScroll:function(t,e){return 0===t.scrollTop&&e<0||t.scrollTop+t.clientHeight===t.scrollHeight&&e>0},isInside:function(t,e){return t===e||null!==t&&t!==document.body&&this.isInside(t.parentNode,e)},checkPath:function(t){var e=t.path||this.composedPath(t),n=t.deltaY;if("keydown"===t.type&&e[0]===document.body){var r=this.$refs.dialog,i=window.getSelection().anchorNode;return!(r&&this.hasScrollbar(r)&&this.isInside(i,r))||this.shouldScroll(r,n)}for(var a=0;a<e.length;a++){var o=e[a];if(o===document)return!0;if(o===document.documentElement)return!0;if(o===this.$refs.content)return!0;if(this.hasScrollbar(o))return this.shouldScroll(o,n)}return!0},composedPath:function(t){if(t.composedPath)return t.composedPath();for(var e=[],n=t.target;n;){if(e.push(n),"HTML"===n.tagName)return e.push(document),e.push(window),e;n=n.parentElement}return e},hideScroll:function(){this.$vuetify.breakpoint.smAndDown?document.documentElement.classList.add("overflow-y-hidden"):(Object(r.addPassiveEventListener)(window,"wheel",this.scrollListener,{passive:!1}),window.addEventListener("keydown",this.scrollListener))},showScroll:function(){document.documentElement.classList.remove("overflow-y-hidden"),window.removeEventListener("wheel",this.scrollListener),window.removeEventListener("keydown",this.scrollListener)}}})},"./src/mixins/picker-button.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/mixins/colorable.ts"),i=n("./src/util/mixins.ts");e.default=Object(i.default)(r.default).extend({methods:{genPickerButton:function(t,e,n,r,i){var a=this;void 0===r&&(r=!1),void 0===i&&(i="");var o=this[t]===e;return this.$createElement("div",{staticClass:("v-picker__title__btn "+i).trim(),class:{"v-picker__title__btn--active":o,"v-picker__title__btn--readonly":r},on:o||r?void 0:{click:function(n){n.stopPropagation(),a.$emit("update:"+t,e)}}},Array.isArray(n)?n:[n])}}})},"./src/mixins/picker.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VPicker/index.ts"),i=n("./src/mixins/colorable.ts"),a=n("./src/mixins/themeable.ts"),o=n("./src/util/mixins.ts");e.default=Object(o.default)(i.default,a.default).extend({name:"picker",props:{fullWidth:Boolean,headerColor:String,landscape:Boolean,noTitle:Boolean,width:{type:[Number,String],default:290}},methods:{genPickerTitle:function(){return null},genPickerBody:function(){return null},genPickerActionsSlot:function(){return this.$scopedSlots.default?this.$scopedSlots.default({save:this.save,cancel:this.cancel}):this.$slots.default},genPicker:function(t){var e=[];if(!this.noTitle){var n=this.genPickerTitle();n&&e.push(n)}var i=this.genPickerBody();return i&&e.push(i),e.push(this.$createElement("template",{slot:"actions"},[this.genPickerActionsSlot()])),this.$createElement(r.default,{staticClass:t,props:{color:this.headerColor||this.color,dark:this.dark,fullWidth:this.fullWidth,landscape:this.landscape,light:this.light,width:this.width}},e)}}})},"./src/mixins/positionable.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"factory",function(){return s});var r=n("vue"),i=n.n(r),a=n("./src/util/helpers.ts"),o={absolute:Boolean,bottom:Boolean,fixed:Boolean,left:Boolean,right:Boolean,top:Boolean};function s(t){return void 0===t&&(t=[]),i.a.extend({name:"positionable",props:t.length?Object(a.filterObjectOnKeys)(o,t):o})}e.default=s()},"./src/mixins/proxyable.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"factory",function(){return a});var r=n("vue"),i=n.n(r);function a(t,e){var n,r;return void 0===t&&(t="value"),void 0===e&&(e="change"),i.a.extend({name:"proxyable",model:{prop:t,event:e},props:(n={},n[t]={required:!1},n),data:function(){return{internalLazyValue:this[t]}},computed:{internalValue:{get:function(){return this.internalLazyValue},set:function(t){t!==this.internalLazyValue&&(this.internalLazyValue=t,this.$emit(e,t))}}},watch:(r={},r[t]=function(t){this.internalLazyValue=t},r)})}var o=a();e.default=o},"./src/mixins/registrable.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"inject",function(){return s}),n.d(e,"provide",function(){return c});var r=n("vue"),i=n.n(r),a=n("./src/util/console.ts");function o(t,e){return function(){return Object(a.consoleWarn)("The "+t+" component must be used inside a "+e)}}function s(t,e,n){var r,a=e&&n?{register:o(e,n),unregister:o(e,n)}:null;return i.a.extend({name:"registrable-inject",inject:(r={},r[t]={default:a},r)})}function c(t){return i.a.extend({name:"registrable-provide",methods:{register:null,unregister:null},provide:function(){var e;return(e={})[t]={register:this.register,unregister:this.unregister},e}})}},"./src/mixins/returnable.ts":function(t,e,n){"use strict";n.r(e);var r=n("vue"),i=n.n(r);e.default=i.a.extend({name:"returnable",props:{returnValue:null},data:function(){return{isActive:!1,originalValue:null}},watch:{isActive:function(t){t?this.originalValue=this.returnValue:this.$emit("update:returnValue",this.originalValue)}},methods:{save:function(t){var e=this;this.originalValue=t,setTimeout(function(){e.isActive=!1})}}})},"./src/mixins/rippleable.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/directives/ripple.ts"),i=n("vue"),a=n.n(i);e.default=a.a.extend({name:"rippleable",directives:{Ripple:r.default},props:{ripple:{type:[Boolean,Object],default:!0}},methods:{genRipple:function(t){return void 0===t&&(t={}),this.ripple?(t.staticClass="v-input--selection-controls__ripple",t.directives=t.directives||[],t.directives.push({name:"ripple",value:{center:!0}}),t.on=Object.assign({click:this.onChange},this.$listeners),this.$createElement("div",t)):null},onChange:function(){}}})},"./src/mixins/routable.ts":function(t,e,n){"use strict";n.r(e);var r=n("vue"),i=n.n(r),a=n("./src/directives/ripple.ts"),o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.default=i.a.extend({name:"routable",directives:{Ripple:a.default},props:{activeClass:String,append:Boolean,disabled:Boolean,exact:{type:Boolean,default:void 0},exactActiveClass:String,href:[String,Object],to:[String,Object],nuxt:Boolean,replace:Boolean,ripple:[Boolean,Object],tag:String,target:String},computed:{computedRipple:function(){return!(!this.ripple||this.disabled)&&this.ripple}},methods:{click:function(t){this.$emit("click",t)},generateRouteLink:function(t){var e,n,r=this.exact,i=((e={attrs:{disabled:this.disabled},class:t,props:{},directives:[{name:"ripple",value:this.computedRipple}]})[this.to?"nativeOn":"on"]=o({},this.$listeners,{click:this.click}),e);if(void 0===this.exact&&(r="/"===this.to||this.to===Object(this.to)&&"/"===this.to.path),this.to){var a=this.activeClass,s=this.exactActiveClass||a;this.proxyClass&&(a+=" "+this.proxyClass,s+=" "+this.proxyClass),n=this.nuxt?"nuxt-link":"router-link",Object.assign(i.props,{to:this.to,exact:r,activeClass:a,exactActiveClass:s,append:this.append,replace:this.replace})}else"a"===(n=(this.href?"a":this.tag)||"a")&&this.href&&(i.attrs.href=this.href);return this.target&&(i.attrs.target=this.target),{tag:n,data:i}}}})},"./src/mixins/selectable.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/components/VInput/index.ts"),i=n("./src/mixins/rippleable.ts"),a=n("./src/mixins/comparable.ts");e.default=r.default.extend({name:"selectable",mixins:[i.default,a.default],model:{prop:"inputValue",event:"change"},props:{color:{type:String,default:"accent"},id:String,inputValue:null,falseValue:null,trueValue:null,multiple:{type:Boolean,default:null},label:String},data:function(t){return{lazyValue:t.inputValue}},computed:{computedColor:function(){return this.isActive?this.color:this.validationState},isMultiple:function(){return!0===this.multiple||null===this.multiple&&Array.isArray(this.internalValue)},isActive:function(){var t=this,e=this.value,n=this.internalValue;return this.isMultiple?!!Array.isArray(n)&&n.some(function(n){return t.valueComparator(n,e)}):void 0===this.trueValue||void 0===this.falseValue?e?this.valueComparator(e,n):Boolean(n):this.valueComparator(n,this.trueValue)},isDirty:function(){return this.isActive}},watch:{inputValue:function(t){this.lazyValue=t}},methods:{genLabel:function(){if(!this.hasLabel)return null;var t=r.default.options.methods.genLabel.call(this);return t.data.on={click:this.onChange},t},genInput:function(t,e){return this.$createElement("input",{attrs:Object.assign({"aria-label":this.label,"aria-checked":this.isActive.toString(),disabled:this.isDisabled,id:this.id,role:t,type:t},e),domProps:{value:this.value,checked:this.isActive},on:{blur:this.onBlur,change:this.onChange,focus:this.onFocus,keydown:this.onKeydown},ref:"input"})},onBlur:function(){this.isFocused=!1},onChange:function(){var t=this;if(!this.isDisabled){var e=this.value,n=this.internalValue;if(this.isMultiple){Array.isArray(n)||(n=[]);var r=n.length;(n=n.filter(function(n){return!t.valueComparator(n,e)})).length===r&&n.push(e)}else n=void 0!==this.trueValue&&void 0!==this.falseValue?this.valueComparator(n,this.trueValue)?this.falseValue:this.trueValue:e?this.valueComparator(n,e)?null:e:!n;this.validate(!0,n),this.internalValue=n}},onFocus:function(){this.isFocused=!0},onKeydown:function(t){}}})},"./src/mixins/sizeable.ts":function(t,e,n){"use strict";n.r(e);var r=n("vue"),i=n.n(r);e.default=i.a.extend({name:"sizeable",props:{large:Boolean,medium:Boolean,size:{type:[Number,String]},small:Boolean,xLarge:Boolean}})},"./src/mixins/ssr-bootable.ts":function(t,e,n){"use strict";n.r(e);var r=n("vue"),i=n.n(r);e.default=i.a.extend({name:"ssr-bootable",data:function(){return{isBooted:!1}},mounted:function(){var t=this;window.requestAnimationFrame(function(){t.$el.setAttribute("data-booted","true"),t.isBooted=!0})}})},"./src/mixins/stackable.ts":function(t,e,n){"use strict";n.r(e);var r=n("vue"),i=n.n(r),a=n("./src/util/helpers.ts"),o=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},s=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(o(arguments[e]));return t};e.default=i.a.extend().extend({name:"stackable",data:function(){return{stackClass:"unpecified",stackElement:null,stackExclude:null,stackMinZIndex:0,isActive:!1}},computed:{activeZIndex:function(){if("undefined"==typeof window)return 0;var t=this.stackElement||this.$refs.content,e=this.isActive?this.getMaxZIndex(this.stackExclude||[t])+2:Object(a.getZIndex)(t);return null==e?e:parseInt(e)}},methods:{getMaxZIndex:function(t){void 0===t&&(t=[]);for(var e=this.$el,n=[this.stackMinZIndex,Object(a.getZIndex)(e)],r=s(document.getElementsByClassName(this.stackClass)),i=0;i<r.length;i++)t.includes(r[i])||n.push(Object(a.getZIndex)(r[i]));return Math.max.apply(Math,s(n))}}})},"./src/mixins/themeable.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"functionalThemeClasses",function(){return a});var r=n("vue"),i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function a(t){var e=i({},t.props,t.injections),n=o.options.computed.isDark.call(e);return o.options.computed.themeClasses.call({isDark:n})}var o=n.n(r).a.extend().extend({name:"themeable",provide:function(){return{theme:this.themeableProvide}},inject:{theme:{default:{isDark:!1}}},props:{dark:{type:Boolean,default:null},light:{type:Boolean,default:null}},data:function(){return{themeableProvide:{isDark:!1}}},computed:{isDark:function(){return!0===this.dark||!0!==this.light&&this.theme.isDark},themeClasses:function(){return{"theme--dark":this.isDark,"theme--light":!this.isDark}},rootIsDark:function(){return!0===this.dark||!0!==this.light&&this.$vuetify.dark},rootThemeClasses:function(){return{"theme--dark":this.rootIsDark,"theme--light":!this.rootIsDark}}},watch:{isDark:{handler:function(t,e){t!==e&&(this.themeableProvide.isDark=this.isDark)},immediate:!0}}});e.default=o},"./src/mixins/toggleable.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"factory",function(){return a});var r=n("vue"),i=n.n(r);function a(t,e){var n,r;return void 0===t&&(t="value"),void 0===e&&(e="input"),i.a.extend({name:"toggleable",model:{prop:t,event:e},props:(n={},n[t]={required:!1},n),data:function(){return{isActive:!!this[t]}},watch:(r={},r[t]=function(t){this.isActive=!!t},r.isActive=function(n){!!n!==this[t]&&this.$emit(e,n)},r)})}var o=a();e.default=o},"./src/mixins/transitionable.ts":function(t,e,n){"use strict";n.r(e);var r=n("vue"),i=n.n(r);e.default=i.a.extend({name:"transitionable",props:{mode:String,origin:String,transition:String}})},"./src/mixins/translatable.ts":function(t,e,n){"use strict";n.r(e);var r=n("vue"),i=n.n(r);e.default=i.a.extend({name:"translatable",props:{height:Number},data:function(){return{elOffsetTop:0,parallax:0,parallaxDist:0,percentScrolled:0,scrollTop:0,windowHeight:0,windowBottom:0}},computed:{imgHeight:function(){return this.objHeight()}},beforeDestroy:function(){window.removeEventListener("scroll",this.translate,!1),window.removeEventListener("resize",this.translate,!1)},methods:{calcDimensions:function(){var t=this.$el.getBoundingClientRect();this.scrollTop=window.pageYOffset,this.parallaxDist=this.imgHeight-this.height,this.elOffsetTop=t.top+this.scrollTop,this.windowHeight=window.innerHeight,this.windowBottom=this.scrollTop+this.windowHeight},listeners:function(){window.addEventListener("scroll",this.translate,!1),window.addEventListener("resize",this.translate,!1)},objHeight:function(){throw new Error("Not implemented !")},translate:function(){this.calcDimensions(),this.percentScrolled=(this.windowBottom-this.elOffsetTop)/(parseInt(this.height)+this.windowHeight),this.parallax=Math.round(this.parallaxDist*this.percentScrolled)}}})},"./src/mixins/validatable.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/mixins/colorable.ts"),i=n("./src/mixins/registrable.ts"),a=n("./src/util/helpers.ts"),o=n("./src/util/console.ts"),s=n("./src/util/mixins.ts"),c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.default=Object(s.default)(r.default,Object(i.inject)("form")).extend({name:"validatable",props:{disabled:Boolean,error:Boolean,errorCount:{type:[Number,String],default:1},errorMessages:{type:[String,Array],default:function(){return[]}},messages:{type:[String,Array],default:function(){return[]}},readonly:Boolean,rules:{type:Array,default:function(){return[]}},success:Boolean,successMessages:{type:[String,Array],default:function(){return[]}},validateOnBlur:Boolean,value:{required:!1}},data:function(){return{errorBucket:[],hasColor:!1,hasFocused:!1,hasInput:!1,isFocused:!1,isResetting:!1,lazyValue:this.value,valid:!1}},computed:{hasError:function(){return this.internalErrorMessages.length>0||this.errorBucket.length>0||this.error},hasSuccess:function(){return this.internalSuccessMessages.length>0||this.success},externalError:function(){return this.internalErrorMessages.length>0||this.error},hasMessages:function(){return this.validationTarget.length>0},hasState:function(){return this.hasSuccess||this.shouldValidate&&this.hasError},internalErrorMessages:function(){return this.genInternalMessages(this.errorMessages)},internalMessages:function(){return this.genInternalMessages(this.messages)},internalSuccessMessages:function(){return this.genInternalMessages(this.successMessages)},internalValue:{get:function(){return this.lazyValue},set:function(t){this.lazyValue=t,this.$emit("input",t)}},shouldValidate:function(){return!!this.externalError||!this.isResetting&&(this.validateOnBlur?this.hasFocused&&!this.isFocused:this.hasInput||this.hasFocused)},validations:function(){return this.validationTarget.slice(0,Number(this.errorCount))},validationState:function(){return this.hasError&&this.shouldValidate?"error":this.hasSuccess?"success":this.hasColor?this.color:void 0},validationTarget:function(){return this.internalErrorMessages.length>0?this.internalErrorMessages:this.successMessages.length>0?this.internalSuccessMessages:this.messages.length>0?this.internalMessages:this.shouldValidate?this.errorBucket:[]}},watch:{rules:{handler:function(t,e){Object(a.deepEqual)(t,e)||this.validate()},deep:!0},internalValue:function(){this.hasInput=!0,this.validateOnBlur||this.$nextTick(this.validate)},isFocused:function(t){t||this.disabled||this.readonly||(this.hasFocused=!0,this.validateOnBlur&&this.validate())},isResetting:function(){var t=this;setTimeout(function(){t.hasInput=!1,t.hasFocused=!1,t.isResetting=!1,t.validate()},0)},hasError:function(t){this.shouldValidate&&this.$emit("update:error",t)},value:function(t){this.lazyValue=t}},beforeMount:function(){this.validate()},created:function(){this.form&&this.form.register(this)},beforeDestroy:function(){this.form&&this.form.unregister(this)},methods:{genInternalMessages:function(t){return t?Array.isArray(t)?t:[t]:[]},reset:function(){this.isResetting=!0,this.internalValue=Array.isArray(this.internalValue)?[]:void 0},resetValidation:function(){this.isResetting=!0},validate:function(t,e){void 0===t&&(t=!1);var n=[];e=e||this.internalValue,t&&(this.hasInput=this.hasFocused=!0);for(var r=0;r<this.rules.length;r++){var i=this.rules[r],a="function"==typeof i?i(e):i;"string"==typeof a?n.push(a):"boolean"!=typeof a&&Object(o.consoleError)("Rules should return a string or boolean, received '"+(void 0===a?"undefined":c(a))+"' instead",this)}return this.errorBucket=n,this.valid=0===n.length,this.valid}}})},"./src/stylus/app.styl":function(t,e,n){},"./src/stylus/components/_alerts.styl":function(t,e,n){},"./src/stylus/components/_app.styl":function(t,e,n){},"./src/stylus/components/_autocompletes.styl":function(t,e,n){},"./src/stylus/components/_avatars.styl":function(t,e,n){},"./src/stylus/components/_badges.styl":function(t,e,n){},"./src/stylus/components/_bottom-navs.styl":function(t,e,n){},"./src/stylus/components/_bottom-sheets.styl":function(t,e,n){},"./src/stylus/components/_breadcrumbs.styl":function(t,e,n){},"./src/stylus/components/_button-toggle.styl":function(t,e,n){},"./src/stylus/components/_buttons.styl":function(t,e,n){},"./src/stylus/components/_calendar-daily.styl":function(t,e,n){},"./src/stylus/components/_calendar-weekly.styl":function(t,e,n){},"./src/stylus/components/_cards.styl":function(t,e,n){},"./src/stylus/components/_carousel.styl":function(t,e,n){},"./src/stylus/components/_chips.styl":function(t,e,n){},"./src/stylus/components/_content.styl":function(t,e,n){},"./src/stylus/components/_counters.styl":function(t,e,n){},"./src/stylus/components/_data-iterator.styl":function(t,e,n){},"./src/stylus/components/_data-table.styl":function(t,e,n){},"./src/stylus/components/_date-picker-header.styl":function(t,e,n){},"./src/stylus/components/_date-picker-table.styl":function(t,e,n){},"./src/stylus/components/_date-picker-title.styl":function(t,e,n){},"./src/stylus/components/_date-picker-years.styl":function(t,e,n){},"./src/stylus/components/_dialogs.styl":function(t,e,n){},"./src/stylus/components/_dividers.styl":function(t,e,n){},"./src/stylus/components/_expansion-panel.styl":function(t,e,n){},"./src/stylus/components/_footer.styl":function(t,e,n){},"./src/stylus/components/_forms.styl":function(t,e,n){},"./src/stylus/components/_grid.styl":function(t,e,n){},"./src/stylus/components/_icons.styl":function(t,e,n){},"./src/stylus/components/_images.styl":function(t,e,n){},"./src/stylus/components/_inputs.styl":function(t,e,n){},"./src/stylus/components/_item-group.styl":function(t,e,n){},"./src/stylus/components/_jumbotrons.styl":function(t,e,n){},"./src/stylus/components/_labels.styl":function(t,e,n){},"./src/stylus/components/_lists.styl":function(t,e,n){},"./src/stylus/components/_menus.styl":function(t,e,n){},"./src/stylus/components/_messages.styl":function(t,e,n){},"./src/stylus/components/_navigation-drawer.styl":function(t,e,n){},"./src/stylus/components/_overflow-buttons.styl":function(t,e,n){},"./src/stylus/components/_overlay.styl":function(t,e,n){},"./src/stylus/components/_pagination.styl":function(t,e,n){},"./src/stylus/components/_parallax.styl":function(t,e,n){},"./src/stylus/components/_pickers.styl":function(t,e,n){},"./src/stylus/components/_progress-circular.styl":function(t,e,n){},"./src/stylus/components/_progress-linear.styl":function(t,e,n){},"./src/stylus/components/_radio-group.styl":function(t,e,n){},"./src/stylus/components/_radios.styl":function(t,e,n){},"./src/stylus/components/_range-sliders.styl":function(t,e,n){},"./src/stylus/components/_rating.styl":function(t,e,n){},"./src/stylus/components/_responsive.styl":function(t,e,n){},"./src/stylus/components/_select.styl":function(t,e,n){},"./src/stylus/components/_selection-controls.styl":function(t,e,n){},"./src/stylus/components/_sheet.styl":function(t,e,n){},"./src/stylus/components/_sliders.styl":function(t,e,n){},"./src/stylus/components/_small-dialog.styl":function(t,e,n){},"./src/stylus/components/_snackbars.styl":function(t,e,n){},"./src/stylus/components/_speed-dial.styl":function(t,e,n){},"./src/stylus/components/_steppers.styl":function(t,e,n){},"./src/stylus/components/_subheaders.styl":function(t,e,n){},"./src/stylus/components/_switch.styl":function(t,e,n){},"./src/stylus/components/_system-bars.styl":function(t,e,n){},"./src/stylus/components/_tables.styl":function(t,e,n){},"./src/stylus/components/_tabs.styl":function(t,e,n){},"./src/stylus/components/_text-fields.styl":function(t,e,n){},"./src/stylus/components/_textarea.styl":function(t,e,n){},"./src/stylus/components/_time-picker-clock.styl":function(t,e,n){},"./src/stylus/components/_time-picker-title.styl":function(t,e,n){},"./src/stylus/components/_timeline.styl":function(t,e,n){},"./src/stylus/components/_toolbar.styl":function(t,e,n){},"./src/stylus/components/_tooltips.styl":function(t,e,n){},"./src/stylus/components/_treeview.styl":function(t,e,n){},"./src/stylus/components/_windows.styl":function(t,e,n){},"./src/util/ThemeProvider.ts":function(t,e,n){"use strict";n.r(e);var r=n("./src/mixins/themeable.ts"),i=n("./src/util/mixins.ts");e.default=Object(i.default)(r.default).extend({name:"theme-provider",props:{root:Boolean},computed:{isDark:function(){return this.root?this.rootIsDark:r.default.options.computed.isDark.call(this)}},render:function(){return this.$slots.default&&this.$slots.default.find(function(t){return!t.isComment&&" "!==t.text})}})},"./src/util/color/transformCIELAB.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"fromXYZ",function(){return o}),n.d(e,"toXYZ",function(){return s});var r=.20689655172413793,i=function(t){return t>Math.pow(r,3)?Math.cbrt(t):t/(3*Math.pow(r,2))+4/29},a=function(t){return t>r?Math.pow(t,3):3*Math.pow(r,2)*(t-4/29)};function o(t){var e=i,n=e(t[1]);return[116*n-16,500*(e(t[0]/.95047)-n),200*(n-e(t[2]/1.08883))]}function s(t){var e=a,n=(t[0]+16)/116;return[.95047*e(n+t[1]/500),e(n),1.08883*e(n-t[2]/200)]}},"./src/util/color/transformSRGB.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"fromXYZ",function(){return s}),n.d(e,"toXYZ",function(){return c});var r=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]],i=function(t){return t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055},a=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],o=function(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)};function s(t){for(var e,n=Array(3),a=i,o=r,s=0;s<3;++s)n[s]=Math.round(255*(e=a(o[s][0]*t[0]+o[s][1]*t[1]+o[s][2]*t[2]),Math.max(0,Math.min(1,e))));return(n[0]<<16)+(n[1]<<8)+(n[2]<<0)}function c(t){for(var e=[0,0,0],n=o,r=a,i=n((t>>16&255)/255),s=n((t>>8&255)/255),c=n((t>>0&255)/255),u=0;u<3;++u)e[u]=r[u][0]*i+r[u][1]*s+r[u][2]*c;return e}},"./src/util/colorUtils.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"colorToInt",function(){return i}),n.d(e,"intToHex",function(){return a}),n.d(e,"colorToHex",function(){return o});var r=n("./src/util/console.ts");function i(t){var e;if("number"==typeof t)e=t;else{if("string"!=typeof t)throw new TypeError("Colors can only be numbers or strings, recieved "+(null==t?t:t.constructor.name)+" instead");var n="#"===t[0]?t.substring(1):t;3===n.length&&(n=n.split("").map(function(t){return t+t}).join("")),6!==n.length&&Object(r.consoleWarn)("'"+t+"' is not a valid rgb color"),e=parseInt(n,16)}return e<0?(Object(r.consoleWarn)("Colors cannot be negative: '"+t+"'"),e=0):(e>16777215||isNaN(e))&&(Object(r.consoleWarn)("'"+t+"' is not a valid rgb color"),e=16777215),e}function a(t){var e=t.toString(16);return e.length<6&&(e="0".repeat(6-e.length)+e),"#"+e}function o(t){return a(i(t))}},"./src/util/console.ts":function(t,e,n){"use strict";function r(t,e,n){if(n&&(e={_isVue:!0,$parent:n,$options:e}),e){if(e.$_alreadyWarned=e.$_alreadyWarned||[],e.$_alreadyWarned.includes(t))return;e.$_alreadyWarned.push(t)}return"[Vuetify] "+t+(e?function(t){if(t._isVue&&t.$parent){for(var e=[],n=0;t;){if(e.length>0){var r=e[e.length-1];if(r.constructor===t.constructor){n++,t=t.$parent;continue}n>0&&(e[e.length-1]=[r,n],n=0)}e.push(t),t=t.$parent}return"\n\nfound in\n\n"+e.map(function(t,e){return""+(0===e?"---\x3e ":" ".repeat(5+2*e))+(Array.isArray(t)?l(t[0])+"... ("+t[1]+" recursive calls)":l(t))}).join("\n")}return"\n\n(found in "+l(t)+")"}(e):"")}function i(t,e,n){var i=r(t,e,n);null!=i&&console.info(i)}function a(t,e,n){var i=r(t,e,n);null!=i&&console.warn(i)}function o(t,e,n){var i=r(t,e,n);null!=i&&console.error(i)}function s(t,e,n,r){a("'"+t+"' is deprecated, use '"+e+"' instead",n,r)}n.r(e),n.d(e,"consoleInfo",function(){return i}),n.d(e,"consoleWarn",function(){return a}),n.d(e,"consoleError",function(){return o}),n.d(e,"deprecate",function(){return s});var c=/(?:^|[-_])(\w)/g,u=function(t){return t.replace(c,function(t){return t.toUpperCase()}).replace(/[-_]/g,"")};function l(t,e){if(t.$root===t)return"<Root>";var n="function"==typeof t&&null!=t.cid?t.options:t._isVue?t.$options||t.constructor.options:t||{},r=n.name||n._componentTag,i=n.__file;if(!r&&i){var a=i.match(/([^/\\]+)\.vue$/);r=a&&a[1]}return(r?"<"+u(r)+">":"<Anonymous>")+(i&&!1!==e?" at "+i:"")}},"./src/util/dedupeModelListeners.ts":function(t,e,n){"use strict";function r(t){if(t.model&&t.on&&t.on.input)if(Array.isArray(t.on.input)){var e=t.on.input.indexOf(t.model.callback);e>-1&&t.on.input.splice(e,1)}else delete t.on.input}n.r(e),n.d(e,"default",function(){return r})},"./src/util/helpers.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"createSimpleFunctional",function(){return s}),n.d(e,"createSimpleTransition",function(){return u}),n.d(e,"createJavaScriptTransition",function(){return l}),n.d(e,"directiveConfig",function(){return d}),n.d(e,"addOnceEventListener",function(){return f}),n.d(e,"passiveSupported",function(){return h}),n.d(e,"addPassiveEventListener",function(){return m}),n.d(e,"getNestedValue",function(){return v}),n.d(e,"deepEqual",function(){return _}),n.d(e,"getObjectValueByPath",function(){return g}),n.d(e,"getPropertyFromItem",function(){return b}),n.d(e,"createRange",function(){return y}),n.d(e,"getZIndex",function(){return x}),n.d(e,"escapeHTML",function(){return k}),n.d(e,"filterObjectOnKeys",function(){return C}),n.d(e,"filterChildren",function(){return E}),n.d(e,"convertToUnit",function(){return S}),n.d(e,"kebabCase",function(){return I}),n.d(e,"isObject",function(){return M}),n.d(e,"keyCodes",function(){return T}),n.d(e,"remapInternalIcon",function(){return R}),n.d(e,"keys",function(){return P}),n.d(e,"camelize",function(){return L}),n.d(e,"arrayDiff",function(){return A}),n.d(e,"upperFirst",function(){return N}),n.d(e,"getSlotType",function(){return B});var r=n("vue"),i=n.n(r),a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function s(t,e,n){return void 0===e&&(e="div"),i.a.extend({name:n||t.replace(/__/g,"-"),functional:!0,render:function(n,r){var i=r.data,a=r.children;return i.staticClass=(t+" "+(i.staticClass||"")).trim(),n(e,i,a)}})}function c(t,e){return Array.isArray(t)?t.concat(e):(t&&e.push(t),e)}function u(t,e,n){return void 0===e&&(e="top center 0"),{name:t,functional:!0,props:{group:{type:Boolean,default:!1},hideOnLeave:{type:Boolean,default:!1},leaveAbsolute:{type:Boolean,default:!1},mode:{type:String,default:n},origin:{type:String,default:e}},render:function(e,n){var r="transition"+(n.props.group?"-group":"");n.data=n.data||{},n.data.props={name:t,mode:n.props.mode},n.data.on=n.data.on||{},Object.isExtensible(n.data.on)||(n.data.on=o({},n.data.on));var i=[],a=[];i.push(function(t){t.style.transformOrigin=n.props.origin,t.style.webkitTransformOrigin=n.props.origin}),n.props.leaveAbsolute&&a.push(function(t){return t.style.position="absolute"}),n.props.hideOnLeave&&a.push(function(t){return t.style.display="none"});var s=n.data.on,u=s.beforeEnter,l=s.leave;return n.data.on.beforeEnter=function(){return c(u,i)},n.data.on.leave=c(l,a),e(r,n.data,n.children)}}}function l(t,e,n){return void 0===n&&(n="in-out"),{name:t,functional:!0,props:{mode:{type:String,default:n}},render:function(n,r){return n("transition",{props:o({},r.props,{name:t}),on:e},r.children)}}}function d(t,e){return void 0===e&&(e={}),o({},e,t.modifiers,{value:t.arg},t.value||{})}function f(t,e,n){t.addEventListener(e,function r(){n(),t.removeEventListener(e,r,!1)},!1)}var h=!1;try{if("undefined"!=typeof window){var p=Object.defineProperty({},"passive",{get:function(){h=!0}});window.addEventListener("testListener",p,p),window.removeEventListener("testListener",p,p)}}catch(t){console.warn(t)}function m(t,e,n,r){t.addEventListener(e,n,!!h&&r)}function v(t,e,n){var r=e.length-1;if(r<0)return void 0===t?n:t;for(var i=0;i<r;i++){if(null==t)return n;t=t[e[i]]}return null==t?n:void 0===t[e[r]]?n:t[e[r]]}function _(t,e){if(t===e)return!0;if(t instanceof Date&&e instanceof Date&&t.getTime()!==e.getTime())return!1;if(t!==Object(t)||e!==Object(e))return!1;var n=Object.keys(t);return n.length===Object.keys(e).length&&n.every(function(n){return _(t[n],e[n])})}function g(t,e,n){return e&&e.constructor===String?v(t,(e=(e=e.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split("."),n):n}function b(t,e,n){if(null==e)return void 0===t?n:t;if(t!==Object(t))return void 0===n?t:n;if("string"==typeof e)return g(t,e,n);if(Array.isArray(e))return v(t,e,n);if("function"!=typeof e)return n;var r=e(t,n);return void 0===r?n:r}function y(t){return Array.from({length:t},function(t,e){return e})}function x(t){if(!t||t.nodeType!==Node.ELEMENT_NODE)return 0;var e=+window.getComputedStyle(t).getPropertyValue("z-index");return e||x(t.parentNode)}var w={"&":"&amp;","<":"&lt;",">":"&gt;"};function k(t){return t.replace(/[&<>]/g,function(t){return w[t]||t})}function C(t,e){for(var n={},r=0;r<e.length;r++){var i=e[r];void 0!==t[i]&&(n[i]=t[i])}return n}function E(t,e){return void 0===t&&(t=[]),t.filter(function(t){return t.componentOptions&&t.componentOptions.Ctor.options.name===e})}function S(t,e){return void 0===e&&(e="px"),null==t||""===t?void 0:isNaN(+t)?String(t):""+Number(t)+e}function I(t){return(t||"").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function M(t){return null!==t&&"object"===(void 0===t?"undefined":a(t))}var T=Object.freeze({enter:13,tab:9,delete:46,esc:27,space:32,up:38,down:40,left:37,right:39,end:35,home:36,del:46,backspace:8,insert:45,pageup:33,pagedown:34}),D="$vuetify.icons.";function R(t,e){return e.startsWith(D)?g(t,e,e):e}function P(t){return Object.keys(t)}var O=/-(\w)/g,L=function(t){return t.replace(O,function(t,e){return e?e.toUpperCase():""})};function A(t,e){for(var n=[],r=0;r<e.length;r++)t.indexOf(e[r])<0&&n.push(e[r]);return n}function N(t){return t.charAt(0).toUpperCase()+t.slice(1)}function B(t,e,n){return t.$slots[e]&&t.$scopedSlots[e]&&t.$scopedSlots[e].name?n?"v-slot":"scoped":t.$slots[e]?"normal":t.$scopedSlots[e]?"scoped":void 0}},"./src/util/mask.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"defaultDelimiters",function(){return r}),n.d(e,"isMaskDelimiter",function(){return i}),n.d(e,"maskText",function(){return u}),n.d(e,"unmaskText",function(){return l});var r=/[-!$%^&*()_+|~=`{}[\]:";'<>?,./\\ ]/,i=function(t){return!!t&&r.test(t)},a={"#":{test:function(t){return/[0-9]/.test(t)}},A:{test:function(t){return/[A-Z]/i.test(t)},convert:function(t){return t.toUpperCase()}},a:{test:function(t){return/[a-z]/i.test(t)},convert:function(t){return t.toLowerCase()}},N:{test:function(t){return/[0-9A-Z]/i.test(t)},convert:function(t){return t.toUpperCase()}},n:{test:function(t){return/[0-9a-z]/i.test(t)},convert:function(t){return t.toLowerCase()}},X:{test:i}},o=function(t){return a.hasOwnProperty(t)},s=function(t,e){return a[t].convert?a[t].convert(e):e},c=function(t,e){return!(null==e||!o(t))&&a[t].test(e)},u=function(t,e,n){if(null==t)return"";if(t=String(t),!e.length||!t.length)return t;Array.isArray(e)||(e=e.split(""));for(var r=0,i=0,a="";i<e.length;){var u=e[i],l=t[r];if(o(u)||l!==u)if(o(u)||n){if(!c(u,l))return a;a+=s(u,l),r++}else a+=u;else a+=u,r++;i++}return a},l=function(t){return t?String(t).replace(new RegExp(r,"g"),""):t}},"./src/util/mixins.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"default",function(){return a});var r=n("vue"),i=n.n(r);function a(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i.a.extend({mixins:t})}},"./src/util/rebuildFunctionalSlots.ts":function(t,e,n){"use strict";function r(t,e){var n=[];for(var r in t)t.hasOwnProperty(r)&&n.push(e("template",{slot:r},t[r]));return n}n.r(e),n.d(e,"default",function(){return r})},"./src/util/theme.ts":function(t,e,n){"use strict";n.r(e),n.d(e,"parse",function(){return c}),n.d(e,"genStyles",function(){return h}),n.d(e,"genVariations",function(){return p});var r=n("./src/util/colorUtils.ts"),i=n("./src/util/color/transformSRGB.ts"),a=n("./src/util/color/transformCIELAB.ts"),o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o};function c(t,e){void 0===e&&(e=!1);for(var n=Object.keys(t),i={},a=0;a<n.length;++a){var s=n[a],u=t[s];e?("base"===s||s.startsWith("lighten")||s.startsWith("darken"))&&(i[s]=Object(r.colorToHex)(u)):"object"===(void 0===u?"undefined":o(u))?i[s]=c(u,!0):i[s]=p(s,Object(r.colorToInt)(u))}return i}var u=function(t,e){return"\n."+t+" {\n background-color: "+e+" !important;\n border-color: "+e+" !important;\n}\n."+t+"--text {\n color: "+e+" !important;\n caret-color: "+e+" !important;\n}"},l=function(t,e,n){var r=s(e.split(/(\d)/,2),2),i=r[0],a=r[1];return"\n."+t+"."+i+"-"+a+" {\n background-color: "+n+" !important;\n border-color: "+n+" !important;\n}\n."+t+"--text.text--"+i+"-"+a+" {\n color: "+n+" !important;\n caret-color: "+n+" !important;\n}"},d=function(t,e){return void 0===e&&(e="base"),"--v-"+t+"-"+e},f=function(t,e){return void 0===e&&(e="base"),"var("+d(t,e)+")"};function h(t,e){void 0===e&&(e=!1);var n=Object.keys(t);if(!n.length)return"";var r="",i="";i+="a { color: "+(e?f("primary"):t.primary.base)+"; }";for(var a=0;a<n.length;++a){var s=n[a],c=t[s];if("object"===(void 0===c?"undefined":o(c))){i+=u(s,e?f(s):c.base),e&&(r+=" "+d(s)+": "+c.base+";\n");for(var h=Object.keys(c),p=0;p<h.length;++p){var m=h[p],v=c[m];"base"!==m&&(i+=l(s,m,e?f(s,m):v),e&&(r+=" "+d(s,m)+": "+v+";\n"))}}}return e&&(r=":root {\n"+r+"}\n\n"),r+i}function p(t,e){for(var n={base:Object(r.intToHex)(e)},i=5;i>0;--i)n["lighten"+i]=Object(r.intToHex)(m(e,i));for(i=1;i<=4;++i)n["darken"+i]=Object(r.intToHex)(v(e,i));return n}function m(t,e){var n=a.fromXYZ(i.toXYZ(t));return n[0]=n[0]+10*e,i.fromXYZ(a.toXYZ(n))}function v(t,e){var n=a.fromXYZ(i.toXYZ(t));return n[0]=n[0]-10*e,i.fromXYZ(a.toXYZ(n))}},vue:function(e,n){e.exports=t}}).default},t.exports=r(n(2))},function(t,e,n){var r=function(){return this}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,a=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n(608),i)r.regeneratorRuntime=a;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},function(t,e){!function(e){"use strict";var n,r=Object.prototype,i=r.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag",u="object"==typeof t,l=e.regeneratorRuntime;if(l)u&&(t.exports=l);else{(l=e.regeneratorRuntime=u?t.exports:{}).wrap=y;var d="suspendedStart",f="suspendedYield",h="executing",p="completed",m={},v={};v[o]=function(){return this};var _=Object.getPrototypeOf,g=_&&_(_(R([])));g&&g!==r&&i.call(g,o)&&(v=g);var b=C.prototype=w.prototype=Object.create(v);k.prototype=b.constructor=C,C.constructor=k,C[c]=k.displayName="GeneratorFunction",l.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===k||"GeneratorFunction"===(e.displayName||e.name))},l.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,C):(t.__proto__=C,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(b),t},l.awrap=function(t){return{__await:t}},E(S.prototype),S.prototype[s]=function(){return this},l.AsyncIterator=S,l.async=function(t,e,n,r){var i=new S(y(t,e,n,r));return l.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},E(b),b[c]="Generator",b[o]=function(){return this},b.toString=function(){return"[object Generator]"},l.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},l.values=R,D.prototype={constructor:D,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,i){return s.type="throw",s.arg=t,e.next=r,i&&(e.method="next",e.arg=n),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:R(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),m}}}function y(t,e,n,r){var i=e&&e.prototype instanceof w?e:w,a=Object.create(i.prototype),o=new D(r||[]);return a._invoke=function(t,e,n){var r=d;return function(i,a){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw a;return P()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=I(o,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var c=x(t,e,n);if("normal"===c.type){if(r=n.done?p:f,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=p,n.method="throw",n.arg=c.arg)}}}(t,n,o),a}function x(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function w(){}function k(){}function C(){}function E(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function S(t){var e;this._invoke=function(n,r){function a(){return new Promise(function(e,a){!function e(n,r,a,o){var s=x(t[n],t,r);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&i.call(u,"__await")?Promise.resolve(u.__await).then(function(t){e("next",t,a,o)},function(t){e("throw",t,a,o)}):Promise.resolve(u).then(function(t){c.value=t,a(c)},o)}o(s.arg)}(n,r,e,a)})}return e=e?e.then(a,a):a()}}function I(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,I(t,e),"throw"===e.method))return m;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var i=x(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,m;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function M(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(M,this),this.reset(!0)}function R(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=n,e.done=!0,e};return a.next=a}}return{next:P}}function P(){return{value:n,done:!0}}}(function(){return this}()||Function("return this")())},function(t,e,n){var r={"./auth.js":610};function i(t){return n(a(t))}function a(t){var e=r[t];if(!(e+1))throw new Error("Cannot find module '"+t+"'.");return e}i.keys=function(){return Object.keys(r)},i.resolve=a,t.exports=i,i.id=609},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(1),a=n.n(i),o=n(3),s=n.n(o),c=n(54);function u(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"state",function(){return d}),n.d(e,"mutations",function(){return f}),n.d(e,"actions",function(){return h}),n.d(e,"getters",function(){return p});var d={user:null,token:window.localStorage.getItem("token")},f=(l(r={},"SET_USER",function(t,e){var n=e.user;t.user=n}),l(r,"LOGOUT",function(t){t.user=null,t.token=null,window.localStorage.removeItem("token")}),l(r,"FETCH_USER_FAILURE",function(t){t.user=null,window.localStorage.removeItem("token")}),l(r,"SET_TOKEN",function(t,e){var n=e.token;t.token=n,window.localStorage.setItem("token",n)}),r),h={saveToken:function(t,e){(0,t.commit)("SET_TOKEN",e)},fetchUser:function(){var t=u(a.a.mark(function t(e){var n,r,i=e.commit;return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s.a.get(c.a.path("me"));case 3:n=t.sent,r=n.data,i("SET_USER",r),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),i("FETCH_USER_FAILURE");case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}(),setUser:function(t,e){(0,t.commit)("SET_USER",e)},logout:function(){var t=u(a.a.mark(function t(e){var n=e.commit;return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.post(c.a.path("logout"));case 2:n("LOGOUT");case 3:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),destroy:function(t){(0,t.commit)("LOGOUT")}},p={user:function(t){return t.user},check:function(t){return null!==t.user},token:function(t){return t.token}}},function(t,e,n){"use strict";var r=n(34),i=n(333),a=n(613),o=n(146);function s(t){var e=new a(t),n=i(a.prototype.request,e);return r.extend(n,a.prototype,e),r.extend(n,e),n}var c=s(o);c.Axios=a,c.create=function(t){return s(r.merge(o,t))},c.Cancel=n(337),c.CancelToken=n(626),c.isCancel=n(336),c.all=function(t){return Promise.all(t)},c.spread=n(627),t.exports=c,t.exports.default=c},function(t,e){t.exports=function(t){return null!=t&&null!=t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}},function(t,e,n){"use strict";var r=n(146),i=n(34),a=n(621),o=n(622);function s(t){this.defaults=t,this.interceptors={request:new a,response:new a}}s.prototype.request=function(t){"string"==typeof t&&(t=i.merge({url:arguments[0]},arguments[1])),(t=i.merge(r,{method:"get"},this.defaults,t)).method=t.method.toLowerCase();var e=[o,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)n=n.then(e.shift(),e.shift());return n},i.forEach(["delete","get","head","options"],function(t){s.prototype[t]=function(e,n){return this.request(i.merge(n||{},{method:t,url:e}))}}),i.forEach(["post","put","patch"],function(t){s.prototype[t]=function(e,n,r){return this.request(i.merge(r||{},{method:t,url:e,data:n}))}}),t.exports=s},function(t,e,n){"use strict";var r=n(34);t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},function(t,e,n){"use strict";var r=n(335);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t}},function(t,e,n){"use strict";var r=n(34);function i(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var a;if(n)a=n(e);else if(r.isURLSearchParams(e))a=e.toString();else{var o=[];r.forEach(e,function(t,e){null!==t&&void 0!==t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),o.push(i(e)+"="+i(t))}))}),a=o.join("&")}return a&&(t+=(-1===t.indexOf("?")?"?":"&")+a),t}},function(t,e,n){"use strict";var r=n(34),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,a,o={};return t?(r.forEach(t.split("\n"),function(t){if(a=t.indexOf(":"),e=r.trim(t.substr(0,a)).toLowerCase(),n=r.trim(t.substr(a+1)),e){if(o[e]&&i.indexOf(e)>=0)return;o[e]="set-cookie"===e?(o[e]?o[e]:[]).concat([n]):o[e]?o[e]+", "+n:n}}),o):o}},function(t,e,n){"use strict";var r=n(34);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},function(t,e,n){"use strict";var r=n(34);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,a,o){var s=[];s.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(a)&&s.push("domain="+a),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,n){"use strict";var r=n(34);function i(){this.handlers=[]}i.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=i},function(t,e,n){"use strict";var r=n(34),i=n(623),a=n(336),o=n(146),s=n(624),c=n(625);function u(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return u(t),t.baseURL&&!s(t.url)&&(t.url=c(t.baseURL,t.url)),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||o.adapter)(t).then(function(e){return u(t),e.data=i(e.data,e.headers,t.transformResponse),e},function(e){return a(e)||(u(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(t,e,n){"use strict";var r=n(34);t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";var r=n(337);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new r(t),e(n.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t;return{token:new i(function(e){t=e}),cancel:t}},t.exports=i},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,n){var r=n(0)(n(629),n(630),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={}},function(t,e){t.exports={render:function(){var t=this.$createElement,e=this._self._c||t;return e("v-content",{staticStyle:{"background-image":"url('img/coca2.jpg')","background-size":"100% 100%"}},[e("v-toolbar",{attrs:{dark:"",fixed:"",app:"",color:"primary"}},[e("v-toolbar-title",{staticClass:"white--text justify-center layout"},[e("h1",[this._v("SISCOCA")])])],1),this._v(" "),e("v-container",{attrs:{fluid:"","fill-height":"","justify-center":"","align-center":""}},[e("transition",{attrs:{name:"fade",mode:"out-in"}},[e("router-view")],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(635),n(668),!1,function(t){n(632)},null,null);t.exports=r.exports},function(t,e,n){var r=n(633);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n(85)("a91ed63a",r,!0,{})},function(t,e,n){(t.exports=n(55)(!1)).push([t.i,".rounded-card{border-radius:10px}",""])},function(t,e){t.exports=function(t,e){for(var n=[],r={},i=0;i<e.length;i++){var a=e[i],o=a[0],s={id:t+":"+i,css:a[1],media:a[2],sourceMap:a[3]};r[o]?r[o].parts.push(s):n.push(r[o]={id:o,parts:[s]})}return n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(338),l=n.n(u),d=n(638),f=n.n(d),h=n(641),p=n.n(h),m=n(644),v=n.n(m),_=n(650),g=n.n(_),b=n(653),y=n.n(b),x=n(656),w=n.n(x),k=n(659),C=n.n(k),E=n(662),S=n.n(E),I=n(665),M=n.n(I);function T(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{QuestionInfo:l.a,QuestionHoja:f.a,QuestionGuia:p.a,QuestionNormativa:v.a,QuestionProyecto:g.a,QuestionAutorizacion:y.a,QuestionProducto:w.a,QuestionInvestigacion:C.a,QuestionConsulta:S.a,QuestionReclamo:M.a},data:function(){return{bus:new o.a,opciones:[{title:"1",content:"Consulta de registro",event:"QuestionInfo"},{title:"2",content:"Consulta de guías de internación",event:"QuestionGuia"},{title:"3",content:"Consulta de hojas de ruta",event:"QuestionHoja"},{title:"normativa",content:"Normativa vigente",event:"QuestionNormativa"},{title:"proyecto",content:"Proyectos y obras",event:"QuestionProyecto"},{title:"autorizacion",content:"Información de interés para productores",event:"QuestionAutorizacion"},{title:"producto",content:"Productos industrializados",event:"QuestionProducto"},{title:"investigacion",content:"Investigaciones sobre la coca",event:"QuestionInvestigacion"},{title:"consulta",content:"Sección de consultas",event:"QuestionConsulta"},{title:"reclamo",content:"Sección de reclamos",event:"QuestionReclamo"}],enlaces:[{title:"1",content:"Ministerio de Desarrollo Rural y Tierras",url:"https://www.ruralytierras.gob.bo"}],carrousells:[{src:"/img/img1.png"},{src:"/img/img2.png"}],contactos:[]}},mounted:function(){this.getEnlaces(),this.getContactos()},methods:{callModal:function(t){this.bus.$emit("openDialog"+t.event)},getEnlaces:function(){var t=T(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/portal_enlace_institucional");case 3:e=t.sent,this.enlaces=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),getContactos:function(){var t=T(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/portal_callcenter");case 3:e=t.sent,this.contactos=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}()}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={props:["bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},error:"",menu:null,begin_date:null,begin_date_formatted:null,sw:!1,persona:null}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogQuestionInfo",function(){t.dialog=!0})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},watch:{begin_date:function(t){this.selectedItem.fecha_nacimiento=t,this.begin_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},methods:{close:function(){this.dialog=!1,this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={},this.sw=!1,this.begin_date_formatted=null},searchActor:function(){var t,e=(t=i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=6;break}return t.next=4,s.a.post("api/persona/quest",this.selectedItem);case 4:(e=t.sent).data.length>0?(this.persona=e.data[0],this.sw=!0,this.error=""):this.error="No se encontro información con los datos introducidos";case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}(),research:function(){this.sw=!1,this.persona={},this.error="",this.selectedItem={},this.begin_date_formatted=null,this.menu=null,this.begin_date=null},endDate:function(t){if(1==t.tipo_persona_id||2==t.tipo_persona_id){var e=new Date,n=new Date(t.carnet_productor[0].fecha_conclusion).getTime()-e.getTime();return Math.round(n/864e5)}if(3==t.tipo_persona_id){e=new Date,n=new Date(t.carnet_comercializador[0].fecha_conclusion).getTime()-e.getTime();return Math.round(n/864e5)}}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Consulta de registro de Productor y Comercializador")])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[0==t.sw?n("v-flex",{attrs:{xs12:"",sm12:"",md12:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Introduzca su carnet de identidad",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.carnet_identidad,callback:function(e){t.$set(t.selectedItem,"carnet_identidad",e)},expression:"selectedItem.carnet_identidad"}}),t._v(" "),n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de nacimiento","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.begin_date_formatted,callback:function(e){t.begin_date_formatted=e},expression:"begin_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"es-bo"},on:{input:function(e){t.menu=!1}},model:{value:t.begin_date,callback:function(e){t.begin_date=e},expression:"begin_date"}})],1),t._v(" "),""!=t.error?n("v-alert",{attrs:{value:!0,type:"error"}},[t._v(t._s(t.error))]):t._e(),t._v(" "),n("v-btn",{staticClass:"btn-block",attrs:{color:"primary",small:""},nativeOn:{click:function(e){return t.searchActor()}}},[n("v-icon",[t._v("search")]),t._v("Consultar\n ")],1)],1)],1):t._e(),t._v(" "),1==t.sw?n("v-flex",{attrs:{xs12:"",sm12:"",md12:""}},[n("span",{staticClass:"justify-center layout"},[n("strong",[n("h2",[t._v("Datos del "+t._s(t.persona.tipo_persona.nombre))])])]),t._v(" "),n("table",{staticStyle:{width:"100%","font-size":"18px"},attrs:{border:"1"}},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Registro:")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.persona.tipo_persona.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Carnet de identidad:")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.persona.carnet_identidad)+" "+t._s(t.persona.departamento_extension.sigla))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Nombre completo:")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.persona.nombre)+" "+t._s(t.persona.primer_apellido)+" "+t._s(t.persona.segundo_apellido))])]),t._v(" "),0==t.persona.carnet_comercializador.length&&0==t.persona.carnet_productor.length?n("tr",[n("th",{staticClass:"text-xs-center",attrs:{colspan:"2"}},[t._v("No hay información sobre los carnets")])]):t._e(),t._v(" "),t.persona.carnet_productor.length>0||t.persona.carnet_comercializador.length>0?n("tr",[n("th",{staticClass:"text-xs-center",attrs:{colspan:"2"}},[t._v("Su carnet vigente vencerá en: "+t._s(t.endDate(t.persona))+" días")])]):t._e(),t._v(" "),t.persona.carnet_productor.length>0?n("tr",[n("td",{attrs:{colspan:"2"}},[n("table",{staticStyle:{width:"100%","font-size":"18px"},attrs:{border:"1"}},[n("thead",[n("tr",[n("th",[t._v("Carnet")]),t._v(" "),n("th",[t._v("Duplicado")]),t._v(" "),n("th",[t._v("Fecha de emisión")]),t._v(" "),n("th",[t._v("Fecha de conclusión")])])]),t._v(" "),n("tbody",t._l(t.persona.carnet_productor,function(e){return n("tr",{key:e.id},[n("td",[t._v(t._s(e.carnet))]),t._v(" "),n("td",[t._v(t._s(e.duplicado))]),t._v(" "),n("td",[t._v(t._s(e.fecha_emision))]),t._v(" "),n("td",[t._v(t._s(e.fecha_conclusion))])])}),0)])])]):t._e(),t._v(" "),t.persona.carnet_comercializador.length>0?n("tr",[n("td",{attrs:{colspan:"2"}},[n("table",{staticStyle:{width:"100%","font-size":"18px"},attrs:{border:"1"}},[n("thead",[n("tr",[n("th",[t._v("Carnet")]),t._v(" "),n("th",[t._v("Duplicado")]),t._v(" "),n("th",[t._v("Fecha de emisión")]),t._v(" "),n("th",[t._v("Fecha de conclusión")])])]),t._v(" "),n("tbody",t._l(t.persona.carnet_comercializador,function(e){return n("tr",{key:e.id},[n("td",[t._v(t._s(e.carnet))]),t._v(" "),n("td",[t._v(t._s(e.duplicado))]),t._v(" "),n("td",[t._v(t._s(e.fecha_emision))]),t._v(" "),n("td",[t._v(t._s(e.fecha_conclusion))])])}),0)])])]):t._e()]),t._v(" "),n("v-btn",{attrs:{color:"warning",small:"",block:""},nativeOn:{click:function(e){return t.research()}}},[n("v-icon",[t._v("search")]),t._v("Volver a consultar\n ")],1)],1):t._e()],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v("Cerrar\n ")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(639),n(640),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={props:["bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},error:"",menu:null,begin_date:null,begin_date_formatted:null,sw:!1,persona:null,search:"",headers:[{text:"ID",value:"correlativo",align:"center"},{text:"Nombre",value:"comercializador.primer_apellido",align:"center"},{text:"Carnet de identidad",value:"comercializador.carnet_identidad",align:"center"},{text:"Codigo Comercializador",value:"codigo_comercializador",align:"center"},{text:"Estado",value:"estado",align:"center"}]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogQuestionHoja",function(){t.dialog=!0})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},watch:{begin_date:function(t){this.selectedItem.fecha_nacimiento=t,this.begin_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={},this.sw=!1,this.begin_date_formatted=null},searchActor:function(){var t,e=(t=i.a.mark(function t(){var e,n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=17;break}return this.selectedItem.tipo_persona_id=3,t.next=5,s.a.post("api/persona/quest",this.selectedItem);case 5:if(!((e=t.sent).data.length>0)){t.next=12;break}this.persona=e.data[0],this.sw=!0,this.error="",t.next=17;break;case 12:return this.selectedItem.tipo_persona_id=2,t.next=15,s.a.post("api/persona/quest",this.selectedItem);case 15:(n=t.sent).data.length>0?(this.persona=n.data[0],this.sw=!0,this.error=""):this.error="No se encontro información con los datos introducidos";case 17:t.next=22;break;case 19:t.prev=19,t.t0=t.catch(0),console.log(t.t0);case 22:case"end":return t.stop()}},t,this,[[0,19]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}(),research:function(){this.sw=!1,this.persona={},this.error="",this.selectedItem={},this.begin_date_formatted=null,this.menu=null,this.begin_date=null},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Consulta de hojas de ruta")])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[0==t.sw?n("v-flex",{attrs:{xs12:"",sm12:"",md12:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Introduzca su carnet de identidad",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.carnet_identidad,callback:function(e){t.$set(t.selectedItem,"carnet_identidad",e)},expression:"selectedItem.carnet_identidad"}}),t._v(" "),n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de nacimiento","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.begin_date_formatted,callback:function(e){t.begin_date_formatted=e},expression:"begin_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"es-bo"},on:{input:function(e){t.menu=!1}},model:{value:t.begin_date,callback:function(e){t.begin_date=e},expression:"begin_date"}})],1),t._v(" "),""!=t.error?n("v-alert",{attrs:{value:!0,type:"error"}},[t._v("\n "+t._s(t.error)+"\n ")]):t._e(),t._v(" "),n("v-btn",{staticClass:"btn-block",attrs:{color:"primary",small:""},nativeOn:{click:function(e){return t.searchActor()}}},[n("v-icon",[t._v("search")]),t._v(" Consultar")],1)],1)],1):t._e(),t._v(" "),1==t.sw?n("v-flex",{attrs:{xs12:"",sm12:"",md12:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Hojas de ruta")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.persona.hoja_rutas,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.correlativo)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(t.fullName(e.item.persona))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.persona.carnet_identidad+" "+e.item.persona.departamento_extension.sigla)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.codigo_comercializador)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[0==e.item.estado?n("v-chip",{attrs:{color:"success","text-color":"white"}},[t._v("En curso")]):t._e(),t._v(" "),1==e.item.estado?n("v-chip",{attrs:{color:"default","text-color":"white"}},[t._v("Concluido")]):t._e()],1)])]}}],null,!1,978222317)},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2),t._v(" "),n("v-btn",{attrs:{color:"warning",small:"",block:""},nativeOn:{click:function(e){return t.research()}}},[n("v-icon",[t._v("search")]),t._v("Volver a consultar")],1)],1):t._e()],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cerrar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(642),n(643),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={props:["bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},error:"",menu:null,begin_date:null,begin_date_formatted:null,sw:!1,persona:null,search:"",headers:[{text:"Nro. Guía de internación",value:"correlativo",align:"center"},{text:"Nombre",value:"persona.primer_apellido",align:"center"},{text:"Carnet de identidad",value:"persona.carnet_identidad",align:"center"},{text:"Estado",value:"retencion",align:"center"}]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogQuestionGuia",function(){t.dialog=!0})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},watch:{begin_date:function(t){this.selectedItem.fecha_nacimiento=t,this.begin_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={},this.sw=!1,this.begin_date_formatted=null},searchActor:function(){var t,e=(t=i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=7;break}return this.selectedItem.tipo_persona_id=1,t.next=5,s.a.post("api/persona/quest",this.selectedItem);case 5:(e=t.sent).data.length>0?(this.persona=e.data[0],this.sw=!0,this.error=""):this.error="No se encontro información con los datos introducidos";case 7:t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),console.log(t.t0);case 12:case"end":return t.stop()}},t,this,[[0,9]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}(),research:function(){this.sw=!1,this.persona={},this.error="",this.selectedItem={},this.begin_date_formatted=null,this.menu=null,this.begin_date=null},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Consulta de guías de internación")])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[0==t.sw?n("v-flex",{attrs:{xs12:"",sm12:"",md12:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Introduzca su carnet de identidad",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.carnet_identidad,callback:function(e){t.$set(t.selectedItem,"carnet_identidad",e)},expression:"selectedItem.carnet_identidad"}}),t._v(" "),n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de nacimiento","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.begin_date_formatted,callback:function(e){t.begin_date_formatted=e},expression:"begin_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"es-bo"},on:{input:function(e){t.menu=!1}},model:{value:t.begin_date,callback:function(e){t.begin_date=e},expression:"begin_date"}})],1),t._v(" "),""!=t.error?n("v-alert",{attrs:{value:!0,type:"error"}},[t._v("\n "+t._s(t.error)+"\n ")]):t._e(),t._v(" "),n("v-btn",{staticClass:"btn-block",attrs:{color:"primary",small:""},nativeOn:{click:function(e){return t.searchActor()}}},[n("v-icon",[t._v("search")]),t._v(" Consultar")],1)],1)],1):t._e(),t._v(" "),1==t.sw?n("v-flex",{attrs:{xs12:"",sm12:"",md12:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Guías de internación")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1)],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.persona.guia_internacions,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.correlativo)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(t.fullName(e.item.persona))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.persona.carnet_identidad+" "+e.item.persona.departamento_extension.sigla)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[e.item.retencion.length>0?n("v-chip",{attrs:{small:"",color:"red","text-color":"white"}},[t._v("Retenido")]):t._e(),t._v(" "),e.item.control_guia_internacion.length>0?n("v-chip",{attrs:{small:"",color:"green darken-2","text-color":"white"}},[t._v("Controlado")]):t._e(),t._v(" "),0==e.item.control_guia_internacion.length?n("v-chip",{attrs:{small:"",color:"warning","text-color":"white"}},[t._v("En curso")]):t._e()],1)])]}}],null,!1,3737627680)},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2),t._v(" "),n("v-btn",{attrs:{color:"warning",small:"",block:""},nativeOn:{click:function(e){return t.research()}}},[n("v-icon",[t._v("search")]),t._v("Volver a consultar")],1)],1):t._e()],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cerrar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(645),n(649),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o),c=n(646),u=n.n(c);e.default={components:{Dialog:u.a},props:["bus"],data:function(){return{headers:[{text:"Nombre",value:"nombre",align:"center"},{text:"Descripción",value:"descripcion",align:"center"},{text:"Tipo de documento",value:"tipo_normativa.nombre",align:"center"},{text:"Adjunto",value:"adjunto",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:"",page:1,perPage:9,pages:[],posts:[""],dialog:!1,show_search:!1,show_data:!1}},computed:{displayedPosts:function(){var t=this,e=this.paginate(this.table.filter(function(e){return e.nombre.toLowerCase().includes(t.search.toLowerCase())||e.descripcion.toLowerCase().includes(t.search.toLowerCase())}));return e.length<1&&this.table.length>0?this.show_search=!0:this.show_search=!1,this.setPages(e.length+1),e}},mounted:function(){var t=this;this.getTable(),this.bus.$on("openDialogQuestionNormativa",function(){t.dialog=!0})},methods:{getTable:function(){var t,e=(t=i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s.a.get("api/portal_normativa");case 3:e=t.sent,this.table=e.data,this.table.length<1?this.show_data=!0:this.show_data=!1,t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}(),setPages:function(t){this.pages=[];for(var e=Math.ceil(t/this.perPage),n=1;n<=e;n++)this.pages.push(n)},paginate:function(t){var e=this.page,n=this.perPage,r=e*n-n,i=e*n;return t.slice(r,i)},close:function(){this.dialog=!1,this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={},this.show_search=!1,this.show_data=!1,this.search=""}}}},function(t,e,n){var r=n(0)(n(647),n(648),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3);n.n(s);e.default={components:{},props:{file:{type:String}},data:function(){return{bus:new o.a,dialog:!1}},computed:{},mounted:function(){this.getTable()},methods:{getTable:function(){var t,e=(t=i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}},t,this)}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{"grid-list-md":"","text-xs-center":""}},[n("v-layout",[n("v-flex",{attrs:{xs12:""}},[n("v-dialog",{model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-btn",{attrs:{slot:"activator",color:"primary",dark:""},slot:"activator"},[t._v("Vista previa")]),t._v(" "),n("v-card",[n("embed",{staticClass:"myiframe",staticStyle:{width:"100%",height:"450px"},attrs:{src:this.file}})])],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",[t._v("Consulta de normativa vigente")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-btn",{attrs:{icon:""}},[n("v-icon",[t._v("search")])],1),t._v(" "),n("div",{staticClass:"search-wrapper"},[n("v-text-field",{attrs:{placeholder:"Buscar..."},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-btn",{attrs:{icon:""}},[n("v-icon",[t._v("check_circle")])],1)],1),t._v(" "),n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},t._l(t.displayedPosts,function(e){return n("v-flex",{key:"6"+e.id,staticClass:"px-0",attrs:{auto:"",xs12:"",sm6:""}},[n("v-card",{attrs:{xs12:"",sm6:"",color:"",height:"100%"}},[n("v-card-title",{attrs:{"primary-title":""}},[n("div",[n("div",{staticClass:"headline"},[t._v(t._s(e.nombre))]),t._v(" "),n("span",{staticClass:"grey--text"},[t._v(t._s(e.descripcion))])])]),t._v(" "),n("v-card-actions",[n("Dialog",{attrs:{bus:t.bus,file:e.adjunto}}),t._v(" "),n("v-btn",{attrs:{flat:"",color:"purple",href:e.adjunto,target:"_blank"}},[t._v("Descargar")])],1)],1)],1)}),1),t._v(" "),t.show_search?n("v-alert",{attrs:{color:"error",icon:"fa fa-times",value:t.show_search}},[t._v('Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.')]):t._e(),t._v(" "),[t.show_data?n("v-alert",{attrs:{color:"info",icon:"fa fa-times",value:t.show_data}},[t._v("Sin resultados.")]):t._e()],t._v(" "),[n("div",{staticClass:"text-xs-center"},[t.dialog&&t.displayedPosts.length>0?n("v-pagination",{attrs:{length:t.pages.length},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}}):t._e()],1)]],2),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v("Cerrar\n ")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(651),n(652),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={props:["bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},error:"",menu:null,begin_date:null,begin_date_formatted:null,sw:!1,persona:null,search:"",headers:[{text:"Nombre completo",value:"persona.nombre",align:"center"},{text:"Carnet de identidad",value:"persona.carnet_identidad",align:"center"},{text:"Proyecto/Obra",value:"proyecto_obra[0].nombre",align:"center"},{text:"Descripción",value:"proyecto_obra[0].descripcion",align:"center"},{text:"Tipo",value:"proyecto_obra[0].tipo_proy_obras_productor.nombre",align:"center"}]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogQuestionProyecto",function(){t.dialog=!0})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},watch:{begin_date:function(t){this.selectedItem.fecha_nacimiento=t,this.begin_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={},this.sw=!1,this.begin_date_formatted=null},searchActor:function(){var t,e=(t=i.a.mark(function t(){var e,n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=17;break}return this.selectedItem.tipo_persona_id=1,t.next=5,s.a.post("api/persona/quest",this.selectedItem);case 5:if(!((e=t.sent).data.length>0)){t.next=12;break}this.persona=e.data,this.sw=!0,this.error="",t.next=17;break;case 12:return this.selectedItem.tipo_persona_id=2,t.next=15,s.a.post("api/persona/quest",this.selectedItem);case 15:(n=t.sent).data.length>0?(this.persona=n.data,this.sw=!0,this.error=""):this.error="No se encontro información con los datos introducidos";case 17:t.next=22;break;case 19:t.prev=19,t.t0=t.catch(0),console.log(t.t0);case 22:case"end":return t.stop()}},t,this,[[0,19]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}(),research:function(){this.sw=!1,this.persona={},this.error="",this.selectedItem={},this.begin_date_formatted=null,this.menu=null,this.begin_date=null},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Consulta de proyectos y obras del productor")])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[0==t.sw?n("v-flex",{attrs:{xs12:"",sm12:"",md12:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Introduzca su carnet de identidad",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.carnet_identidad,callback:function(e){t.$set(t.selectedItem,"carnet_identidad",e)},expression:"selectedItem.carnet_identidad"}}),t._v(" "),n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de nacimiento","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.begin_date_formatted,callback:function(e){t.begin_date_formatted=e},expression:"begin_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"es-bo"},on:{input:function(e){t.menu=!1}},model:{value:t.begin_date,callback:function(e){t.begin_date=e},expression:"begin_date"}})],1),t._v(" "),""!=t.error?n("v-alert",{attrs:{value:!0,type:"error"}},[t._v("\n "+t._s(t.error)+"\n ")]):t._e(),t._v(" "),n("v-btn",{staticClass:"btn-block",attrs:{color:"primary",small:""},nativeOn:{click:function(e){return t.searchActor()}}},[n("v-icon",[t._v("search")]),t._v(" Consultar")],1)],1)],1):t._e(),t._v(" "),1==t.sw?n("v-flex",{attrs:{xs12:"",sm12:"",md12:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Proyectos y Obras")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.persona,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(t.fullName(e.item))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.carnet_identidad+" "+e.item.departamento_extension.sigla)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.proyecto_obra[0].nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.proyecto_obra[0].descripcion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.proyecto_obra[0].tipo_proy_obras_productor.nombre)+" ")])])]}}],null,!1,3109913639)},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2),t._v(" "),n("v-btn",{attrs:{color:"warning",small:"",block:""},nativeOn:{click:function(e){return t.research()}}},[n("v-icon",[t._v("search")]),t._v("Volver a consultar")],1)],1):t._e()],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cerrar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(654),n(655),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={components:{},props:["bus"],data:function(){return{headers:[{text:"Nombre",value:"nombre",align:"center"},{text:"Descripción",value:"descripcion",align:"center"},{text:"Tipo de documento",value:"tipo_normativa.nombre",align:"center"},{text:"Adjunto",value:"adjunto",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:"",page:1,perPage:9,pages:[],posts:[""],dialog:!1,show_search:!1,show_data:!1}},computed:{displayedPosts:function(){var t=this,e=this.paginate(this.table.filter(function(e){return e.nombre.toLowerCase().includes(t.search.toLowerCase())||e.descripcion.toLowerCase().includes(t.search.toLowerCase())}));return e.length<1&&this.table.length>0?this.show_search=!0:this.show_search=!1,this.setPages(e.length+1),e}},mounted:function(){var t=this;this.getTable(),this.bus.$on("openDialogQuestionAutorizacion",function(){t.dialog=!0})},methods:{getTable:function(){var t,e=(t=i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s.a.get("api/portal_prod_autorizado");case 3:e=t.sent,this.table=e.data,this.table.length<1?this.show_data=!0:this.show_data=!1,t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}(),setPages:function(t){this.pages=[];for(var e=Math.ceil(t/this.perPage),n=1;n<=e;n++)this.pages.push(n)},paginate:function(t){var e=this.page,n=this.perPage,r=e*n-n,i=e*n;return t.slice(r,i)},close:function(){this.dialog=!1,this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={},this.show_search=!1,this.show_data=!1,this.search=""},formattedDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",[t._v("Consulta de información de interés para los productores")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-btn",{attrs:{icon:""}},[n("v-icon",[t._v("search")])],1),t._v(" "),n("div",{staticClass:"search-wrapper"},[n("v-text-field",{attrs:{placeholder:"Buscar..."},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-btn",{attrs:{icon:""}},[n("v-icon",[t._v("check_circle")])],1)],1),t._v(" "),n("v-card-text",[n("v-list",{attrs:{"two-line":""}},[t._l(t.displayedPosts,function(e,r){return[n("v-list-tile",{key:r,attrs:{avatar:"",ripple:""}},[n("v-list-tile-content",[n("v-list-tile-title",[t._v(t._s(e.nombre))]),t._v(" "),n("v-list-tile-sub-title",[t._v(t._s(e.descripcion))])],1),t._v(" "),n("v-list-tile-action",[n("v-list-tile-action-text",[t._v("PRODUCTO "+t._s(e.autorizado?"SI AUTORIZADO":"NO AUTORIZADO"))])],1)],1),t._v(" "),r+1<t.table.length?n("v-divider",{key:"divider-"+r}):t._e()]}),t._v(" "),t.show_search?n("v-alert",{attrs:{color:"error",icon:"fa fa-times",value:t.show_search}},[t._v('Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.')]):t._e(),t._v(" "),[t.show_data?n("v-alert",{attrs:{color:"info",icon:"fa fa-times",value:t.show_data}},[t._v("Sin resultados.")]):t._e()],t._v(" "),[n("div",{staticClass:"text-xs-center"},[t.dialog&&t.displayedPosts.length>0?n("v-pagination",{attrs:{length:t.pages.length},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}}):t._e()],1)]],2)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v("Cerrar\n ")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(657),n(658),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={components:{},props:["bus"],data:function(){return{headers:[{text:"Nombre",value:"nombre",align:"center"},{text:"Descripción",value:"descripcion",align:"center"},{text:"Tipo de documento",value:"tipo_normativa.nombre",align:"center"},{text:"Adjunto",value:"adjunto",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:"",page:1,perPage:9,pages:[],posts:[""],dialog:!1,show_search:!1,show_data:!1}},computed:{displayedPosts:function(){var t=this,e=this.paginate(this.table.filter(function(e){return e.nombre.toLowerCase().includes(t.search.toLowerCase())||e.descripcion.toLowerCase().includes(t.search.toLowerCase())}));return e.length<1&&this.table.length>0?this.show_search=!0:this.show_search=!1,this.setPages(e.length+1),e}},mounted:function(){var t=this;this.getTable(),this.bus.$on("openDialogQuestionProducto",function(){t.dialog=!0})},methods:{getTable:function(){var t,e=(t=i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s.a.get("api/portal_prod_industrializado");case 3:e=t.sent,this.table=e.data,this.table.length<1?this.show_data=!0:this.show_data=!1,t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}(),setPages:function(t){this.pages=[];for(var e=Math.ceil(t/this.perPage),n=1;n<=e;n++)this.pages.push(n)},paginate:function(t){var e=this.page,n=this.perPage,r=e*n-n,i=e*n;return t.slice(r,i)},close:function(){this.dialog=!1,this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={},this.show_search=!1,this.show_data=!1,this.search=""},formattedDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",[t._v("Consulta de productos industrializados")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-btn",{attrs:{icon:""}},[n("v-icon",[t._v("search")])],1),t._v(" "),n("div",{staticClass:"search-wrapper"},[n("v-text-field",{attrs:{placeholder:"Buscar..."},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-btn",{attrs:{icon:""}},[n("v-icon",[t._v("check_circle")])],1)],1),t._v(" "),n("v-card-text",[n("v-list",{attrs:{"two-line":""}},[t._l(t.displayedPosts,function(e,r){return[n("v-list-tile",{key:r,attrs:{avatar:"",ripple:""}},[n("v-list-tile-content",[n("v-list-tile-title",[t._v(t._s(e.nombre))]),t._v(" "),n("v-list-tile-sub-title",[t._v(t._s(e.descripcion))])],1)],1),t._v(" "),r+1<t.table.length?n("v-divider",{key:"divider-"+r}):t._e()]}),t._v(" "),t.show_search?n("v-alert",{attrs:{color:"error",icon:"fa fa-times",value:t.show_search}},[t._v('Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.')]):t._e(),t._v(" "),[t.show_data?n("v-alert",{attrs:{color:"info",icon:"fa fa-times",value:t.show_data}},[t._v("Sin resultados.")]):t._e()],t._v(" "),[n("div",{staticClass:"text-xs-center"},[t.dialog&&t.displayedPosts.length>0?n("v-pagination",{attrs:{length:t.pages.length},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}}):t._e()],1)]],2)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v("Cerrar\n ")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(660),n(661),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={components:{},props:["bus"],data:function(){return{headers:[{text:"Nombre",value:"nombre",align:"center"},{text:"Descripción",value:"descripcion",align:"center"},{text:"Tipo de documento",value:"tipo_normativa.nombre",align:"center"},{text:"Adjunto",value:"adjunto",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:"",page:1,perPage:9,pages:[],posts:[""],dialog:!1,show_search:!1,show_data:!1}},computed:{displayedPosts:function(){var t=this,e=this.paginate(this.table.filter(function(e){return e.nombre.toLowerCase().includes(t.search.toLowerCase())||e.descripcion.toLowerCase().includes(t.search.toLowerCase())}));return e.length<1&&this.table.length>0?this.show_search=!0:this.show_search=!1,this.setPages(e.length+1),e}},mounted:function(){var t=this;this.getTable(),this.bus.$on("openDialogQuestionInvestigacion",function(){t.dialog=!0})},methods:{getTable:function(){var t,e=(t=i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s.a.get("api/portal_investigacion_coca");case 3:e=t.sent,this.table=e.data,this.table.length<1?this.show_data=!0:this.show_data=!1,t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}(),setPages:function(t){this.pages=[];for(var e=Math.ceil(t/this.perPage),n=1;n<=e;n++)this.pages.push(n)},paginate:function(t){var e=this.page,n=this.perPage,r=e*n-n,i=e*n;return t.slice(r,i)},close:function(){this.dialog=!1,this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={},this.show_search=!1,this.show_data=!1,this.search=""},formattedDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",[t._v("Consulta de investigaciones sobre la coca")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-btn",{attrs:{icon:""}},[n("v-icon",[t._v("search")])],1),t._v(" "),n("div",{staticClass:"search-wrapper"},[n("v-text-field",{attrs:{placeholder:"Buscar..."},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-btn",{attrs:{icon:""}},[n("v-icon",[t._v("check_circle")])],1)],1),t._v(" "),n("v-card-text",[n("v-list",{attrs:{"two-line":""}},[t._l(t.displayedPosts,function(e,r){return[n("v-list-tile",{key:r,attrs:{avatar:"",ripple:""}},[n("v-list-tile-content",[n("v-list-tile-title",[t._v(t._s(e.nombre))]),t._v(" "),n("v-list-tile-sub-title",[t._v(t._s(e.descripcion))])],1)],1),t._v(" "),r+1<t.table.length?n("v-divider",{key:"divider-"+r}):t._e()]}),t._v(" "),t.show_search?n("v-alert",{attrs:{color:"error",icon:"fa fa-times",value:t.show_search}},[t._v('Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.')]):t._e(),t._v(" "),[t.show_data?n("v-alert",{attrs:{color:"info",icon:"fa fa-times",value:t.show_data}},[t._v("Sin resultados.")]):t._e()],t._v(" "),[n("div",{staticClass:"text-xs-center"},[t.dialog&&t.displayedPosts.length>0?n("v-pagination",{attrs:{length:t.pages.length},model:{value:t.page,callback:function(e){t.page=e},expression:"page"}}):t._e()],1)]],2)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v("Cerrar\n ")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(663),n(664),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}e.default={components:{},props:["bus"],data:function(){var t;return u(t={valid:!0,table:[],search:"",page:1,perPage:9,pages:[],posts:[""],dialog:!1,tab:null},"valid",!0),u(t,"selectedIndex",-1),u(t,"selectedItem",{}),u(t,"show",!1),u(t,"birth_date",null),u(t,"birth_date_formatted",null),u(t,"menu",null),t},computed:{formTitle:function(){return-1===this.selectedIndex?"Formulario de consultas ":"Editar "}},watch:{birth_date:function(t){this.selectedItem.fecha_nacimiento=t,this.birth_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},mounted:function(){var t=this;this.getTable(),this.bus.$on("openDialogQuestionConsulta",function(){t.dialog=!0})},methods:{getTable:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s.a.get("api/portal_consulta");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),setPages:function(t){this.pages=[];for(var e=Math.ceil(t/this.perPage),n=1;n<=e;n++)this.pages.push(n)},paginate:function(t){var e=this.page,n=this.perPage,r=e*n-n,i=e*n;return t.slice(r,i)},close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},formattedDate:function(t){return this.$moment(t).format("DD/MM/YYYY")},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=15;break}if(-1==this.selectedIndex){t.next=9;break}return t.next=5,s.a.put("api/portal_consulta/"+this.selectedItem.id,this.selectedItem);case 5:this.close(),this.getTable(),t.next=13;break;case 9:return t.next=11,s.a.post("api/portal_consulta",this.selectedItem);case 11:this.close(),this.getTable();case 13:this.$toast.success("Correcto."),this.$refs.form.reset();case 15:t.next=20;break;case 17:t.prev=17,t.t0=t.catch(0),console.log(t.t0);case 20:case"end":return t.stop()}},t,this,[[0,17]])}));return function(){return t.apply(this,arguments)}}(),showPagination:function(){this.show=!this.show}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-tabs",{attrs:{"background-color":"transparent",color:"basil",grow:""},model:{value:t.tab,callback:function(e){t.tab=e},expression:"tab"}},[n("v-tab",{on:{click:t.showPagination}},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-tabs-items",{model:{value:t.tab,callback:function(e){t.tab=e},expression:"tab"}},[n("v-tab-item",[n("v-card",{attrs:{flat:"",color:"basil"}},[n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Carnet de identidad",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.carnet_identidad,callback:function(e){t.$set(t.selectedItem,"carnet_identidad",e)},expression:"selectedItem.carnet_identidad"}}),t._v(" "),n("v-text-field",{staticClass:"mr-2",attrs:{label:"Email",rules:[function(t){return!!t||"Requerido"},function(t){return/.+@.+/.test(t)||"E-mail no es valido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.email,callback:function(e){t.$set(t.selectedItem,"email",e)},expression:"selectedItem.email"}}),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs12:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de nacimiento","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.birth_date_formatted,callback:function(e){t.birth_date_formatted=e},expression:"birth_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"ES"},on:{input:function(e){t.menu=!1}},model:{value:t.birth_date,callback:function(e){t.birth_date=e},expression:"birth_date"}})],1)],1)],1)],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Asunto",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.asunto,callback:function(e){t.$set(t.selectedItem,"asunto",e)},expression:"selectedItem.asunto"}}),t._v(" "),n("v-textarea",{attrs:{label:"Descripción de la consulta",rows:"1",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.contenido,callback:function(e){t.$set(t.selectedItem,"contenido",e)},expression:"selectedItem.contenido"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v("Enviar consulta\n ")],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v("Cerrar\n ")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(666),n(667),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}e.default={components:{},props:["bus"],data:function(){var t;return u(t={valid:!0,table:[],search:"",page:1,perPage:9,pages:[],posts:[""],dialog:!1,tab:null},"valid",!0),u(t,"selectedIndex",-1),u(t,"selectedItem",{}),u(t,"show",!1),u(t,"birth_date",null),u(t,"birth_date_formatted",null),u(t,"menu",null),t},computed:{formTitle:function(){return-1===this.selectedIndex?"Formulario de reclamos ":"Editar "}},mounted:function(){var t=this;this.getTable(),this.bus.$on("openDialogQuestionReclamo",function(){t.dialog=!0})},watch:{birth_date:function(t){this.selectedItem.fecha_nacimiento=t,this.birth_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},methods:{getTable:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s.a.get("api/portal_reclamo");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),setPages:function(t){this.pages=[];for(var e=Math.ceil(t/this.perPage),n=1;n<=e;n++)this.pages.push(n)},paginate:function(t){var e=this.page,n=this.perPage,r=e*n-n,i=e*n;return t.slice(r,i)},close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=15;break}if(-1==this.selectedIndex){t.next=9;break}return t.next=5,s.a.put("api/portal_reclamo/"+this.selectedItem.id,this.selectedItem);case 5:this.close(),this.getTable(),t.next=13;break;case 9:return t.next=11,s.a.post("api/portal_reclamo",this.selectedItem);case 11:this.close(),this.getTable();case 13:this.$toast.success("Correcto."),this.$refs.form.reset();case 15:t.next=20;break;case 17:t.prev=17,t.t0=t.catch(0),console.log(t.t0);case 20:case"end":return t.stop()}},t,this,[[0,17]])}));return function(){return t.apply(this,arguments)}}(),formattedDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-tabs",{attrs:{"background-color":"transparent",color:"basil",grow:""},model:{value:t.tab,callback:function(e){t.tab=e},expression:"tab"}},[n("v-tab",[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-tabs-items",{model:{value:t.tab,callback:function(e){t.tab=e},expression:"tab"}},[n("v-tab-item",[n("v-card",{attrs:{flat:"",color:"basil"}},[n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Carnet de identidad",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.carnet_identidad,callback:function(e){t.$set(t.selectedItem,"carnet_identidad",e)},expression:"selectedItem.carnet_identidad"}}),t._v(" "),n("v-text-field",{staticClass:"mr-2",attrs:{label:"Email",rules:[function(t){return!!t||"Requerido"},function(t){return/.+@.+/.test(t)||"E-mail no es valido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.email,callback:function(e){t.$set(t.selectedItem,"email",e)},expression:"selectedItem.email"}}),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs12:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de nacimiento","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.birth_date_formatted,callback:function(e){t.birth_date_formatted=e},expression:"birth_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"ES"},on:{input:function(e){t.menu=!1}},model:{value:t.birth_date,callback:function(e){t.birth_date=e},expression:"birth_date"}})],1)],1)],1)],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Problema",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.problema,callback:function(e){t.$set(t.selectedItem,"problema",e)},expression:"selectedItem.problema"}}),t._v(" "),n("v-textarea",{attrs:{label:"Descripción del problema",rows:"1",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion_problema,callback:function(e){t.$set(t.selectedItem,"descripcion_problema",e)},expression:"selectedItem.descripcion_problema"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v("Enviar reclamo\n ")],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v("Cerrar\n ")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs12:"",sm12:"",md3:""}},[n("QuestionInfo",{attrs:{bus:t.bus}}),t._v(" "),n("QuestionGuia",{attrs:{bus:t.bus}}),t._v(" "),n("QuestionHoja",{attrs:{bus:t.bus}}),t._v(" "),n("QuestionNormativa",{attrs:{bus:t.bus}}),t._v(" "),n("QuestionProyecto",{attrs:{bus:t.bus}}),t._v(" "),n("QuestionAutorizacion",{attrs:{bus:t.bus}}),t._v(" "),n("QuestionProducto",{attrs:{bus:t.bus}}),t._v(" "),n("QuestionInvestigacion",{attrs:{bus:t.bus}}),t._v(" "),n("QuestionConsulta",{attrs:{bus:t.bus}}),t._v(" "),n("QuestionReclamo",{attrs:{bus:t.bus}}),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{color:"primary",dark:""}},[n("v-toolbar-title",[t._v("Menú")]),t._v(" "),n("v-spacer")],1),t._v(" "),n("v-list",t._l(t.opciones,function(e){return n("v-list-tile",{key:e.title,attrs:{avatar:""}},[n("v-list-tile-action",[n("v-icon",{attrs:{color:"primary"}},[t._v("trending_flat")])],1),t._v(" "),n("v-list-tile-content",[n("a",{attrs:{href:"#"},on:{click:function(n){return n.preventDefault(),t.callModal(e)}}},[n("v-list-tile-title",{domProps:{textContent:t._s(e.content)}})],1)])],1)}),1)],1)],1),t._v(" "),n("v-flex",{attrs:{xs12:"",sm12:"",md6:"","px-1":""}},[n("v-card",[n("v-carousel",{attrs:{"hide-controls":""}},t._l(t.carrousells,function(t,e){return n("v-carousel-item",{key:e,attrs:{src:t.src}})}),1)],1)],1),t._v(" "),n("v-flex",{attrs:{xs12:"",sm12:"",md3:""}},[n("v-card",[n("v-toolbar",{attrs:{color:"primary",dark:""}},[n("v-toolbar-title",[t._v("Enlaces Institucionales")]),t._v(" "),n("v-spacer")],1),t._v(" "),n("v-list",t._l(t.enlaces,function(e){return n("v-list-tile",{key:e.id,attrs:{avatar:""}},[n("v-list-tile-content",[n("a",{attrs:{href:e.enlace,target:"_black"}},[n("v-list-tile-title",{domProps:{textContent:t._s(e.nombre)}})],1)])],1)}),1)],1)],1),t._v(" "),n("v-footer",{attrs:{height:"auto"}},[n("v-card",{staticClass:"success lighten-1 white--text text-xs-center rounded-card",attrs:{flat:"",tile:""}},[n("v-card-text",{staticClass:"white--text pt-2"},[t._v('\n Sistema Integrado de la Hoja de Coca - Desarrollado para el Ministerio de Desarrollo Rural y Tierras estipulada en la Ley General de la Coca, Ley N° 906, Reglamento de la Ley N° 906, Decreto Supremo N° 3318, Artículo 49 que dice "SISCOCA es el registro informático digitalizado de todas las actividades vinculadas a la coca."\n ')]),t._v(" "),t._l(t.contactos,function(e){return n("label",{key:e.id,staticClass:"white--text"},[t._v("\n Tel: (591) "+t._s(e.telefono)+"\n Cel: (591) "+t._s(e.celular)+"\n "),n("br")])}),t._v(" "),n("v-divider"),t._v(" "),n("v-card-text",{staticClass:"white--text"},[t._v("\n ©2019 — "),n("strong",[t._v("Ministerio de Desarrollo Rural y Tierras")])])],2)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(670),n(674),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={components:{"login-form":n(671)},methods:{success:function(t){this.$store.dispatch("auth/saveToken",t),this.$store.dispatch("auth/setUser",t),this.$router.push({name:"index"})}}}},function(t,e,n){var r=n(0)(n(672),n(673),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=n.n(r),a=n(54),o=n(339);e.default={mixins:[o.a],data:function(){return{passwordHidden:!0,form:{email:null,password:null}}},created:function(){this.form.email=this.$route.query.email||null},methods:{submit:function(){var t=this;this.$refs.form.validate()&&(this.loading=!0,i.a.post(a.a.path("login"),this.form).then(function(e){t.$toast.success("Bienvenido"),t.$emit("success",e.data)}).catch(function(e){t.handleErrors(e.response.data.errors)}).then(function(){t.loading=!1}))}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-form",{ref:"form",attrs:{"lazy-validation":""},on:{submit:function(e){return e.preventDefault(),t.submit(e)}},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-text-field",{attrs:{label:t.labels.email,type:"email","error-messages":t.errors.email,rules:[t.rules.required("email")],disabled:t.loading,"prepend-icon":"person"},model:{value:t.form.email,callback:function(e){t.$set(t.form,"email",e)},expression:"form.email"}}),t._v(" "),n("v-text-field",{attrs:{label:t.labels.password,"append-icon":t.passwordHidden?"visibility_off":"visibility",type:t.passwordHidden?"password":"text","error-messages":t.errors.password,disabled:t.loading,rules:[t.rules.required("password")],"prepend-icon":"lock"},on:{"click:append":function(){return t.passwordHidden=!t.passwordHidden}},model:{value:t.form.password,callback:function(e){t.$set(t.form,"password",e)},expression:"form.password"}}),t._v(" "),n("v-layout",{staticClass:"mt-2",attrs:{row:""}},[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{type:"submit",loading:t.loading,disabled:t.loading||!t.valid,color:"success"}},[t._v("\n Ingresar\n ")])],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this.$createElement,e=this._self._c||t;return e("v-flex",{attrs:{sm8:"",md6:"",lg4:""}},[e("v-card",{attrs:{raised:""}},[e("v-toolbar",{attrs:{dark:"",color:"success",flat:""}},[e("span",{staticClass:"justify-center layout"},[this._v("\n LOGIN\n ")])]),this._v(" "),e("v-card-text",[e("login-form",{on:{success:this.success}})],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(676),n(686),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});n(54);e.default={data:function(){return{mini:!1}},components:{"app-nav":n(677),"top-menu":n(680),"app-footer":n(683)},methods:{navToggle:function(){this.mini=!this.mini}}}},function(t,e,n){var r=n(0)(n(678),n(679),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(84);e.default={data:function(){return{items:[],name:null}},props:["mini"],computed:Object(a.b)({auth:"auth/user"}),watch:{authName:function(t){t&&(this.name=t)}},mounted:function(){this.name=this.auth.name,this.navigation()},methods:{navToggle:function(){this.$emit("navToggle")},logout:function(){var t,e=(t=i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.$store.dispatch("auth/logout");case 2:this.$toast.info("sessión terminada."),this.$router.push({name:"login"});case 4:case"end":return t.stop()}},t,this)}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}(),findRole:function(t){var e=new Array,n=!0,r=!1,i=void 0;try{for(var a,o=t[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;e.push(s.name)}}catch(t){r=!0,i=t}finally{try{!n&&o.return&&o.return()}finally{if(r)throw i}}return e},navigation:function(){var t=this.findRole(this.auth.roles);t.includes("admin")&&(this.items=[[{title:"Perfil",icon:"person",to:{name:"profile"},exact:!1}],[{title:"Modulo de portal informativo",icon:"list",items:[{title:"Normativas",icon:"forward",to:{name:"normativa"},exact:!1},{title:"Proyecto y Obras",icon:"forward",to:{name:"proyecto_obra"},exact:!1},{title:"Autorización de productos",icon:"forward",to:{name:"prod_autorizacion"},exact:!1},{title:"Productos industrializados",icon:"forward",to:{name:"prod_industrializado"},exact:!1},{title:"Investigaciones sobre la coca",icon:"forward",to:{name:"investigacion_coca"},exact:!1},{title:"Enlaces a sitios institucionales",icon:"forward",to:{name:"enlace_institucional"},exact:!1},{title:"Consultas del portal informativo",icon:"forward",to:{name:"consulta_portal_info"},exact:!1},{title:"Reclamos del portal informativo",icon:"forward",to:{name:"reclamo_portal_info"},exact:!1},{title:"Centro de llamadas",icon:"forward",to:{name:"callcenter"},exact:!1}]}],[{title:"Modulo de registro",icon:"list",items:[{title:"Productores",icon:"forward",to:{name:"productor"},exact:!1},{title:"Productores al detalle",icon:"forward",to:{name:"productorDetalle"},exact:!1},{title:"Comerciantes al detalle",icon:"forward",to:{name:"comercializador"},exact:!1},{title:"Empresas de industrialización",icon:"forward",to:{name:"empresa"},exact:!1},{title:"Entidades de investigación",icon:"forward",to:{name:"entidad_investigacion"},exact:!1},{title:"Beneficiarios de donaciones",icon:"forward",to:{name:"beneficiario_donacion"},exact:!1},{title:"Beneficiarios para proyectos de desarrollo integral",icon:"forward",to:{name:"beneficiario_desarrollo"},exact:!1}]}],[{title:"Módulo de Gestión de Actividades de Producción",icon:"list",items:[{title:"Registro de las Características de la Producción de Coca",icon:"forward",to:{name:"caracteristica_produccion"},exact:!1},{title:"Registro de Autorización de Renovaciones de Parcelas de Coca",icon:"forward",to:{name:"autorizacion_renov_parcela"},exact:!1},{title:"Consulta de Renovaciones y Verificaación de Destrucción de Parcela Anterior",icon:"forward",to:{name:"consulta_ren_ver"},exact:!1},{title:"Registro de zonas racionalizadas",icon:"forward",to:{name:"zonas_racionalizadas"},exact:!1}]}],[{title:"Módulo de Actividades de Comercialización e Industrialización",icon:"list",items:[{title:"Guías de internación",icon:"forward",to:{name:"guia_internacion"},exact:!1},{title:"Control de guías de internación",icon:"forward",to:{name:"control_guia_internacion"},exact:!1},{title:"Emisión de hojas de ruta",icon:"forward",to:{name:"hoja_ruta"},exact:!1},{title:"Emisión de hojas de ruta trueque",icon:"forward",to:{name:"hoja_ruta_trueque"},exact:!1},{title:"Control de hojas de ruta",icon:"forward",to:{name:"control_hoja_ruta"},exact:!1},{title:"Transporte y Comercialización con Poder",icon:"forward",to:{name:"poder"},exact:!1},{title:"Áreas y puestos de venta",icon:"forward",to:{name:"puesto_venta"},exact:!1},{title:"Retenciones",icon:"forward",to:{name:"retencion"},exact:!1},{title:"Depositos",icon:"forward",to:{name:"deposito"},exact:!1},{title:"Decomisos",icon:"forward",to:{name:"decomiso"},exact:!1},{title:"Devoluciones",icon:"forward",to:{name:"devolucion"},exact:!1},{title:"Incineraciones",icon:"forward",to:{name:"incineracion"},exact:!1},{title:"Donaciones",icon:"forward",to:{name:"donacion"},exact:!1}]}],[{title:"Módulo de Desarrollo Integral",icon:"list",items:[{title:"Capacitaciones",icon:"forward",to:{name:"capacitaciones"},exact:!1}]}],[{title:"Módulo de Obras de Impacto Inmediato",icon:"list",items:[{title:"Convocatorias para Obras de Impacto Inmediato",icon:"forward",to:{name:"convocatorias_oii"},exact:!1},{title:"Solicitudes para Obras de Impacto Inmediato",icon:"forward",to:{name:"recepcion_solicitud_oii"},exact:!1},{title:"Registro de proyecto para Obras de Impacto Inmediato",icon:"forward",to:{name:"proyectos"},exact:!1},{title:"Evaluación de viabilidad para Obras de Impacto Inmediato",icon:"forward",to:{name:"evaluacion_viabilidad_oii"},exact:!1},{title:"Priorizacion de solicitudes para Obras de Impacto Inmediato",icon:"forward",to:{name:"priorizacion_oii"},exact:!1},{title:"Registro de supervisión a las Obras de Impacto Inmediato",icon:"forward",to:{name:"supervision_oii"},exact:!1},{title:"Cierre de la Obra de Impacto Inmediato",icon:"forward",to:{name:"cierre_obra_oii"},exact:!1},{title:"Evaluación de Impacto de la Obra de Impacto Inmediato",icon:"forward",to:{name:"evaluacion_impacto_oii"},exact:!1}]}],[{title:"Módulo de Parametrización",icon:"list",items:[{title:"Zonas Autorizadas",icon:"forward",to:{name:"zona_autorizada"},exact:!1},{title:"Departamentos",icon:"forward",to:{name:"departamento"},exact:!1},{title:"Provincias",icon:"forward",to:{name:"provincia"},exact:!1},{title:"Municipios",icon:"forward",to:{name:"municipio"},exact:!1},{title:"Regionales",icon:"forward",to:{name:"regional"},exact:!1},{title:"Federaciones",icon:"forward",to:{name:"federacion"},exact:!1},{title:"Centrales",icon:"forward",to:{name:"central"},exact:!1},{title:"Sindicatos",icon:"forward",to:{name:"sindicato"},exact:!1},{title:"Localidades",icon:"forward",to:{name:"localidad"},exact:!1},{title:"Comunidades",icon:"forward",to:{name:"comunidad"},exact:!1},{title:"Mercados",icon:"forward",to:{name:"mercado"},exact:!1},{title:"Puestos de control",icon:"forward",to:{name:"puesto_de_control"},exact:!1},{title:"Rutas",icon:"forward",to:{name:"ruta"},exact:!1},{title:"Montos",icon:"forward",to:{name:"monto"},exact:!1},{title:"Marcas de vehículos",icon:"forward",to:{name:"marca"},exact:!1},{title:"Vehículos",icon:"forward",to:{name:"vehiculo"},exact:!1},{title:"Infracciones",icon:"forward",to:{name:"infraccion"},exact:!1},{title:"Tipos de convocatoria",icon:"forward",to:{name:"tipo_convocatoria"},exact:!1},{title:"Firmas",icon:"forward",to:{name:"firmas"},exact:!1}]}],[{title:"Módulo de Resoluciones Administrativas",icon:"list",items:[{title:"Resoluciones administrativas",icon:"forward",to:{name:"resolucion_administrativa"},exact:!1},{title:"Consulta de resoluciones administrativas",icon:"forward",to:{name:"consulta_res_administrativa"},exact:!1},{title:"Registro de cumplimiento de sanciones monetarias",icon:"forward",to:{name:"sanciones_monetarias"},exact:!1},{title:"Consulta de infracciones y sanciones",icon:"forward",to:{name:"consulta_infracciones_san"},exact:!1}]}],[{title:"Módulo de Usuarios, Roles y Permisos",icon:"list",items:[{title:"Usuarios",icon:"forward",to:{name:"user"},exact:!1},{title:"Roles",icon:"forward",to:{name:"roles"},exact:!1},{title:"Permisos",icon:"forward",to:{name:"permission"},exact:!1}]}],[{title:"Alertas y Notificaciones",icon:"list",items:[{title:"parametrizacion de eventos expecionales",to:{name:"notificaciones"},exact:!1},{title:"Registrar nuevo evento",to:{name:"notificaciones_generate"},exact:!1},{title:"Monitoreo de Eventos",to:{name:"notificaciones_monitoreo"},exact:!1}]}],[{title:"Módulo de Auditoría",icon:"list",items:[{title:"Lista de eventos del Sistema",icon:"forward",to:{name:"lista_eventos"},exact:!1},{title:"Registro de eventos del Sistema",icon:"forward",to:{name:"registro_eventos"},exact:!1}]}],[{title:"Módulo de Reportes",icon:"list",items:[{title:"Reportes de comercialización",icon:"forward",to:{name:"reportes_comercializacion"},exact:!1},{title:"Reportes de industrialización",icon:"forward",to:{name:"reportes_industrializacion"},exact:!1},{title:"Reportes de desarrollo integral",icon:"forward",to:{name:"reportes_des_integral"},exact:!1}]}],[{title:"Módulo de Exposicion de Servicios",icon:"list",items:[{title:"Servicios",icon:"forward",to:{name:"servicio"},exact:!1}]}],[{title:"Salir",icon:"power_settings_new",action:this.logout}]]),t.includes("digcoin")&&(this.items=[[{title:"Perfil",icon:"person",to:{name:"profile"},exact:!1}],[{title:"Modulo de registro",icon:"list",items:[{title:"Productores al detalle",icon:"forward",to:{name:"productorDetalle"},exact:!1},{title:"Comercializadores al detalle",icon:"forward",to:{name:"comercializador"},exact:!1},{title:"Empresas de industrialización",icon:"forward",to:{name:"empresa"},exact:!1},{title:"Entidades de investigación",icon:"forward",to:{name:"entidad_investigacion"},exact:!1},{title:"Beneficiarios de donaciones",icon:"forward",to:{name:"beneficiario_donacion"},exact:!1},{title:"Beneficiarios para proyectos de desarrollo integral",icon:"forward",to:{name:"beneficiario_desarrollo"},exact:!1}]}],[{title:"Módulo de Actividades de Comercialización e Industrialización",icon:"list",items:[{title:"Guías de internación",icon:"forward",to:{name:"guia_internacion"},exact:!1},{title:"Control de guías de internación",icon:"forward",to:{name:"control_guia_internacion"},exact:!1},{title:"Emisión de hojas de ruta",icon:"forward",to:{name:"hoja_ruta"},exact:!1},{title:"Emisión de hojas de ruta trueque",icon:"forward",to:{name:"hoja_ruta_trueque"},exact:!1},{title:"Control de hojas de ruta",icon:"forward",to:{name:"control_hoja_ruta"},exact:!1},{title:"Transporte y Comercialización con Poder",icon:"forward",to:{name:"poder"},exact:!1},{title:"Áreas y puestos de venta",icon:"forward",to:{name:"puesto_venta"},exact:!1},{title:"Retenciones",icon:"forward",to:{name:"retencion"},exact:!1},{title:"Depositos",icon:"forward",to:{name:"deposito"},exact:!1},{title:"Decomisos",icon:"forward",to:{name:"decomiso"},exact:!1},{title:"Devoluciones",icon:"forward",to:{name:"devolucion"},exact:!1},{title:"Incineraciones",icon:"forward",to:{name:"incineracion"},exact:!1},{title:"Donaciones",icon:"forward",to:{name:"donacion"},exact:!1}]}],[{title:"Módulo de Resoluciones Administrativas",icon:"list",items:[{title:"Resoluciones administrativas",icon:"forward",to:{name:"resolucion_administrativa"},exact:!1},{title:"Consulta de Resoluciones Administrativas",icon:"forward",to:{name:"consulta_resolucion_administrativa"},exact:!1},{title:"Registro de cumplimiento de sanciones monetarias",icon:"forward",to:{name:"sanciones_monetarias"},exact:!1}]}],[{title:"Salir",icon:"power_settings_new",action:this.logout}]]),t.includes("digprococa")&&(this.items=[[{title:"Perfil",icon:"person",to:{name:"profile"},exact:!1}],[{title:"Modulo de registro",icon:"list",items:[{title:"Productores",icon:"forward",to:{name:"productor"},exact:!1}]}],[{title:"Módulo de Resoluciones Administrativas",icon:"list",items:[{title:"Resoluciones administrativas",icon:"forward",to:{name:"resolucion_administrativa"},exact:!1},{title:"Consulta de Resoluciones Administrativas",icon:"forward",to:{name:"consulta_resolucion_administrativa"},exact:!1},{title:"Registro de cumplimiento de sanciones monetarias",icon:"forward",to:{name:"sanciones_monetarias"},exact:!1}]}],[{title:"Salir",icon:"power_settings_new",action:this.logout}]]),t.includes("oii")&&(this.items=[[{title:"Perfil",icon:"person",to:{name:"profile"},exact:!1}],[{title:"Módulo de Obras de Impacto Inmediato",icon:"list",items:[{title:"Nuevo proyecto",icon:"forward",to:{name:"proyectos"},exact:!1},{title:"Convocatorias para Obras de Impacto Inmediato",icon:"forward",to:{name:"convocatorias_oii"},exact:!1},{title:"Solicitudes para Obras de Impacto Inmediato",icon:"forward",to:{name:"recepcion_solicitud_oii"},exact:!1},{title:"Evaluación de viabilidad para Obras de Impacto Inmediato",icon:"forward",to:{name:"evaluacion_viabilidad_oii"},exact:!1},{title:"Priorizacion de solicitudes para Obras de Impacto Inmediato",icon:"forward",to:{name:"priorizacion_oii"},exact:!1},{title:"Registro de supervisión a las Obras de Impacto Inmediato",icon:"forward",to:{name:"supervision_oii"},exact:!1},{title:"Cierre de la Obra de Impacto Inmediato",icon:"forward",to:{name:"cierre_obra_oii"},exact:!1},{title:"Evaluación de Impacto de la Obra de Impacto Inmediato",icon:"forward",to:{name:"evaluacion_impacto_oii"},exact:!1}]}],[{title:"Módulo de Parametrización",icon:"list",items:[{title:"Tipos de convocatoria",icon:"forward",to:{name:"tipo_convocatoria"},exact:!1}]}],[{title:"Salir",icon:"power_settings_new",action:this.logout}]]),t.includes("cliente")&&(this.items=[[{title:"Perfil",icon:"person",to:{name:"profile"},exact:!1}],[{title:"Módulo de Exposicion de Servicios",icon:"list",items:[{title:"Generar Clave",icon:"forward",to:{name:"generar_key"},exact:!1}]}],[{title:"Salir",icon:"power_settings_new",action:this.logout}]])}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-navigation-drawer",{attrs:{fixed:"",app:"",permanent:t.$vuetify.breakpoint.mdAndUp,light:"","mini-variant":t.$vuetify.breakpoint.mdAndUp&&t.mini,clipped:t.$vuetify.breakpoint.mdAndUp,value:t.mini},on:{"update:miniVariant":function(e){return t.$set(t.$vuetify.breakpoint,"mdAndUp && mini",e)},"update:mini-variant":function(e){return t.$set(t.$vuetify.breakpoint,"mdAndUp && mini",e)}}},[n("v-toolbar",{staticClass:"transparent",attrs:{flat:""}},[n("v-list",{staticClass:"pa-0"},[n("v-list-tile",{attrs:{avatar:""}},[n("v-list-tile-avatar",{directives:[{name:"show",rawName:"v-show",value:t.$vuetify.breakpoint.mdAndUp&&t.mini,expression:"$vuetify.breakpoint.mdAndUp && mini"}]},[n("v-btn",{staticClass:"mx-0",attrs:{icon:""},nativeOn:{click:function(e){return e.stopPropagation(),t.navToggle(e)}}},[n("v-icon",[t._v("chevron_right")])],1)],1),t._v(" "),n("v-list-tile-content",[n("v-list-tile-title",[t._v(t._s(t.name))])],1),t._v(" "),n("v-list-tile-action",[n("v-btn",{attrs:{icon:""},nativeOn:{click:function(e){return e.stopPropagation(),t.navToggle(e)}}},[n("v-icon",[t._v("chevron_left")])],1)],1)],1)],1)],1),t._v(" "),t._l(t.items,function(e,r){return n("v-list",{key:r,staticClass:"py-0",attrs:{dense:""}},[e.length?n("v-divider",{staticClass:"mb-2",class:{"mt-0":!r,"mt-2":!!r}}):t._e(),t._v(" "),t._l(e,function(e){return n("div",{key:e.title},[e.items?n("v-list-group",{attrs:{"prepend-icon":e.icon,"no-action":""}},[n("v-list-tile",{attrs:{slot:"activator"},slot:"activator"},[n("v-list-tile-content",[n("v-tooltip",{attrs:{top:""}},[n("v-list-tile-title",{attrs:{slot:"activator"},slot:"activator"},[t._v(t._s(e.title))]),t._v(" "),n("span",[t._v(t._s(e.title))])],1)],1)],1),t._v(" "),t._l(e.items,function(e){return n("v-list-tile",{key:e.title,attrs:{to:e.to,ripple:"",exact:void 0===e.exact||e.exact},on:{click:function(t){e.action&&e.action()}}},[n("v-list-tile-content",{staticClass:"pl-0"},[n("v-tooltip",{attrs:{top:""}},[n("v-list-tile-title",{attrs:{slot:"activator"},slot:"activator"},[t._v(t._s(e.title))]),t._v(" "),n("span",[t._v(t._s(e.title))])],1)],1),t._v(" "),n("v-list-tile-action",[n("v-icon",[t._v(t._s(e.icon))])],1)],1)})],2):n("v-list-tile",{attrs:{href:"javascript:void(0)",to:e.to,ripple:"",exact:void 0===e.exact||e.exact},nativeOn:{click:function(t){e.action&&e.action()}}},[n("v-list-tile-action",[n("v-icon",[t._v(t._s(e.icon))])],1),t._v(" "),n("v-list-tile-content",[n("v-list-tile-title",[t._v(t._s(e.title))])],1)],1)],1)})],2)})],2)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(681),n(682),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(54);e.default={data:function(){return{siteName:r.b.siteName}},methods:{navToggle:function(){this.$emit("navToggle")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-toolbar",{attrs:{dark:"","clipped-left":t.$vuetify.breakpoint.mdAndUp,fixed:"",app:"",color:"primary"}},[n("v-toolbar-side-icon",{on:{click:function(e){return e.stopPropagation(),t.navToggle(e)}}}),t._v(" "),t._m(0)],1)},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("router-link",{staticClass:"navbar-brand",attrs:{to:{name:"index"}}},[e("v-toolbar-title",{staticClass:"white--text"},[this._v(this._s(this.siteName))])],1)}]}},function(t,e,n){var r=n(0)(n(684),n(685),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={}},function(t,e){t.exports={render:function(){var t=this.$createElement;return(this._self._c||t)("div")},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"fill-height"},[e("app-nav",{attrs:{mini:this.mini},on:{navToggle:this.navToggle}}),this._v(" "),e("top-menu",{on:{navToggle:this.navToggle}}),this._v(" "),e("v-content",[e("v-container",{staticStyle:{padding:"0"},attrs:{fluid:""}},[e("transition",{attrs:{name:"fade",mode:"out-in"}},[e("router-view")],1)],1)],1),this._v(" "),e("app-footer")],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(688),n(692),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={components:{sidemenu:n(689)},data:function(){return{items:[]}},mounted:function(){this.navigation()},methods:{navigation:function(){this.items=[{title:"Ver perfil",icon:"visibility",to:{name:"profile"}},{title:"Editar contraseña",icon:"edit",to:{name:"profile-edit"}}]}}}},function(t,e,n){var r=n(0)(n(690),n(691),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:{threshold:{type:[Number,String],required:!0},offset:{type:[Number,String],required:!0},items:{required:!0}},data:function(){return{currentOffset:0,position:"relative",top:0}},computed:{styles:function(){return{position:this.position,top:parseInt(this.top)+"px"}}},methods:{onScroll:function(){this.currentOffset=window.pageYOffset||document.documentElement.offsetTop;var t=this.currentOffset>=this.threshold;this.position=t?"fixed":"relative",this.top=t?this.offset:0}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"scroll",rawName:"v-scroll",value:t.onScroll,expression:"onScroll"}],staticClass:"sidemenu",style:t.styles},[n("v-list",{staticClass:"pt-0 pb-0 elevation-1",attrs:{dense:""}},[t._l(t.items,function(e,r){return[n("v-divider",{directives:[{name:"show",rawName:"v-show",value:!!r,expression:"!!index"}],key:r}),t._v(" "),n("v-list-tile",{key:e.title,attrs:{to:e.to,ripple:"",exact:""},on:{click:function(t){e.action&&e.action(e)}}},[n("v-list-tile-content",[n("v-list-tile-title",[t._v(t._s(e.title))])],1),t._v(" "),n("v-list-tile-action",[n("v-icon",{directives:[{name:"show",rawName:"v-show",value:!e.progress,expression:"!item.progress"}],attrs:{color:e.color}},[t._v(t._s(e.icon))]),t._v(" "),e.action?n("v-progress-circular",{directives:[{name:"show",rawName:"v-show",value:e.progress,expression:"item.progress"}],attrs:{indeterminate:"",color:"primary"}}):t._e()],1)],1)]})],2)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this.$createElement,e=this._self._c||t;return e("v-container",{attrs:{fluid:"","grid-list-xl":""}},[e("v-layout",{attrs:{row:"","justify-center":"",wrap:""}},[e("v-flex",{attrs:{lg7:"",sm8:"",xs12:""}},[e("transition",{attrs:{name:"fade",mode:"out-in"}},[e("router-view")],1)],1),this._v(" "),e("v-flex",{attrs:{lg3:"",sm4:"",xs12:"","mt-5":""}},[e("sidemenu",{attrs:{threshold:67,offset:90,items:this.items}})],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(694),n(695),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(84);e.default={data:function(){return{user:{name:null,email:null}}},computed:Object(r.b)({auth:"auth/user"}),mounted:function(){this.user=Object.assign(this.user,this.auth)}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("h2",{staticClass:"mb-3 primary--text headline"},[t._v("Tu perfil")]),t._v(" "),n("v-card",[n("v-card-text",[n("v-text-field",{attrs:{label:"Nombre de usuario",box:"",readonly:""},model:{value:t.user.user_name,callback:function(e){t.$set(t.user,"user_name",e)},expression:"user.user_name"}}),t._v(" "),n("v-text-field",{attrs:{label:"Email",box:"",readonly:""},model:{value:t.user.email,callback:function(e){t.$set(t.user,"email",e)},expression:"user.email"}}),t._v(" "),n("v-text-field",{attrs:{label:"Nombre",box:"",readonly:""},model:{value:t.user.name,callback:function(e){t.$set(t.user,"name",e)},expression:"user.name"}}),t._v(" "),n("v-text-field",{attrs:{label:"Primer apellido",box:"",readonly:""},model:{value:t.user.primer_apellido,callback:function(e){t.$set(t.user,"primer_apellido",e)},expression:"user.primer_apellido"}}),t._v(" "),n("v-text-field",{attrs:{label:"Segundo apellido",box:"",readonly:""},model:{value:t.user.segundo_apellido,callback:function(e){t.$set(t.user,"segundo_apellido",e)},expression:"user.segundo_apellido"}})],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(697),n(701),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={components:{"profile-edit-form":n(698)},methods:{success:function(t){this.$store.dispatch("auth/setUser",t),this.$router.push({name:"profile"})}}}},function(t,e,n){var r=n(0)(n(699),n(700),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(3),o=n.n(a),s=n(84),c=n(54),u=n(339);e.default={mixins:[u.a],data:function(){return{passwordHidden:!0,label:{password:"New Password",password_confirmation:"Confirm New Password"},form:{name:null,email:null,password:null,password_confirmation:null}}},computed:Object(s.b)({auth:"auth/user"}),mounted:function(){this.form=Object.assign(this.form,this.auth)},methods:{submit:function(){var t=this;this.$refs.form.validate()&&(this.loading=!0,o.a.put(c.a.path("profile"),this.form).then(function(e){t.$toast.success("Your profile successfully updated."),t.logout()}).catch(function(e){t.handleErrors(e.response.data.errors)}).then(function(){t.loading=!1}))},logout:function(){var t,e=(t=i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.$store.dispatch("auth/logout");case 2:this.$toast.info("sessión terminada."),this.$router.push({name:"login"});case 4:case"end":return t.stop()}},t,this)}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-form",{ref:"form",attrs:{"lazy-validation":""},on:{submit:function(e){return e.preventDefault(),t.submit(e)}},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("h3",{staticClass:"headline mb-3 mt-5"},[t._v("Contraseña")]),t._v(" "),n("v-card",[n("v-card-text",[n("v-text-field",{attrs:{label:"Contraseña","append-icon":t.passwordHidden?"visibility_off":"visibility",type:t.passwordHidden?"password":"text","error-messages":t.errors.password,disabled:t.loading,hint:"minimo 6 caracteres"},on:{"click:append":function(){return t.passwordHidden=!t.passwordHidden}},model:{value:t.form.password,callback:function(e){t.$set(t.form,"password",e)},expression:"form.password"}}),t._v(" "),n("v-text-field",{attrs:{label:"Confirme contraseña",type:t.passwordHidden?"password":"text","error-messages":t.errors.password_confirmation,disabled:t.loading},model:{value:t.form.password_confirmation,callback:function(e){t.$set(t.form,"password_confirmation",e)},expression:"form.password_confirmation"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"","mt-5":""}},[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{flat:"",disabled:t.loading,to:{name:"profile"},color:"grey darken-2"}},[t._v("\n Cancelar\n ")]),t._v(" "),n("v-btn",{attrs:{type:"submit",loading:t.loading,disabled:t.loading,color:"primary"}},[t._v("\n Guardar\n ")])],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("h2",{staticClass:"mb-3 primary--text headline"},[this._v("Editar Contraseña")]),this._v(" "),e("profile-edit-form",{on:{success:this.success}})],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(703),n(709),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(706),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre",value:"nombre",align:"center"},{text:"Descripción",value:"descripcion",align:"center"},{text:"Tipo de documento",value:"tipo_normativa.nombre",align:"center"},{text:"Adjunto",value:"adjunto",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/normativa");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/normativa/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(3),o=n.n(a);e.default={name:"RemoveItem",props:["url","bus"],data:function(){return{path:"",dialog:!1}},methods:{resetVariables:function(){this.path=""},close:function(){this.resetVariables(),this.dialog=!1,this.bus.$emit("closeDialog")},remove:function(){var t,e=(t=i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,o.a.delete(this.path);case 3:t.sent,this.$toast.success("Eliminado."),this.close(),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}()},mounted:function(){var t=this;this.bus.$on("openDialogRemove",function(e){t.path=e,t.dialog=!0})}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"28%"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-card-text",[n("div",{staticClass:"headline font-weight-regular"},[t._v("¿Está seguro que desea eliminar el registro?")])]),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"success",small:""},on:{click:t.close}},[n("v-icon",{attrs:{small:""}},[t._v("check")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"warning",small:""},on:{click:t.remove}},[n("v-icon",{attrs:{small:""}},[t._v("close")]),t._v(" Eliminar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(707),n(708),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(23),l=n.n(u);function d(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}o.a.use(l.a),e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},error:"",options:{url:"api/upload/file",headers:c.a.defaults.headers.common,paramName:"file",uploadMultiple:!1,acceptedFiles:{extensions:["application/pdf"],message:"Formato no permitido."},maxFilesize:{limit:5,message:"El archivo excede los 5Mb."},maxFiles:5},fileAdjunto:null,valArchivo:null,tempArchivo:null,files:[],normativas:[],componentKey:0,uploaded:!1}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.$refs.form.reset(),t.selectedItem=e,t.dialog=!0,t.selectedIndex=e,t.valArchivo="Ya existe un archivo en la base de datos.",t.tempArchivo=t.selectedItem.adjunto,t.fileAdjunto=null}),this.getTiposDocumento()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "},formAdjunto:function(){return-1===this.selectedIndex?"Subir archivo PDF ":"Sustituir archivo PDF "}},methods:{getTiposDocumento:function(){var t=d(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/tipo_normativa");case 2:e=t.sent,this.normativas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),renewKey:function(){this.componentKey+=1},fileAdded:function(t){this.files.push(t),this.uploaded=!0},close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={},this.fileAdjunto=null,this.valArchivo=null,this.tempArchivo=null,this.uploaded=!1,this.renewKey()},complete:function(t,e,n){this.fileAdjunto=n.response,this.valArchivo="Cargado correctamente."},save:function(){var t=d(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=13;break}if(-1==this.selectedIndex){t.next=8;break}return!0===this.uploaded&&(c.a.post("api/upload/delete",{nombre:this.tempArchivo}),this.selectedItem.adjunto=this.fileAdjunto),t.next=6,c.a.put("api/normativa/"+this.selectedItem.id,this.selectedItem);case 6:t.next=11;break;case 8:return this.selectedItem.adjunto=this.fileAdjunto,t.next=11,c.a.post("api/normativa",this.selectedItem);case 11:this.$toast.success("Correcto."),this.close();case 13:t.next=18;break;case 15:t.prev=15,t.t0=t.catch(0),console.log(t.t0);case 18:case"end":return t.stop()}},t,this,[[0,15]])}));return function(){return t.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}}),t._v(" "),n("v-textarea",{attrs:{label:"Descripción",rows:"1",hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}}),t._v(" "),n("v-select",{attrs:{items:t.normativas,"item-text":"nombre","item-value":"id",label:"Tipo de normativa",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.tipo_normativa_id,callback:function(e){t.$set(t.selectedItem,"tipo_normativa_id",e)},expression:"selectedItem.tipo_normativa_id"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[[t.selectedItem.adjunto?n("v-chip",[n("v-btn",{attrs:{icon:"",href:t.selectedItem.adjunto,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1),t._v("Archivo actual\n ")],1):t._e(),t._v(" "),n("vue-clip",{key:t.componentKey,attrs:{options:t.options,"on-complete":t.complete,"on-added-file":t.fileAdded},scopedSlots:t._u([{key:"clip-uploader-body",fn:function(e){return t._l(e.files,function(e,r){return n("div",{key:r},["success"==e.status?n("v-icon",{attrs:{color:"success"}},[t._v("check_circle")]):t._e(),t._v(" "),"success"==e.status?n("span",{staticClass:"green--text"},[t._v("correcto.")]):t._e(),t._v(" "),"error"==e.status?n("v-icon",{attrs:{color:"error"}},[t._v("error")]):t._e(),t._v(" "),"error"==e.status?n("span",{staticClass:"red--text"},[t._v(t._s(e.errorMessage))]):t._e()],1)})}}])},[n("template",{slot:"clip-uploader-action"},[n("div",{staticClass:"dz-message v-btn v-btn--small theme--light success"},[t._v(t._s(t.formAdjunto))])])],2)],t._v(" "),n("v-text-field",{attrs:{readonly:"",box:"",label:"Archivo PDF",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.valArchivo,callback:function(e){t.valArchivo=e},expression:"valArchivo"}})],2)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v("Cancelar\n ")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v("Guardar\n ")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Documentos de la sección normativas")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.nombre))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.descripcion))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.tipo_normativa.nombre))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[n("v-btn",{attrs:{icon:"",href:e.item.adjunto,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("Sin resultados.")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(711),n(715),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(712),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Productor/Comercializador",value:"persona.primer_apellido",align:"center"},{text:"Carnet de identidad del productor",value:"persona.carnet_identidad",align:"center"},{text:"Nombre del proyecto",value:"nombre",align:"center"},{text:"Descripción del proyecto",value:"descripcion",align:"center"},{text:"Tipo",value:"tipo_proy_obras_productor.nombre",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/proy_obra");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/proy_obra/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")}}}},function(t,e,n){var r=n(0)(n(713),n(714),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function u(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},error:"",productores:[],tipos:[]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.$refs.form.reset(),t.selectedItem=e,t.dialog=!0,t.selectedIndex=e}),this.getProductores(),this.getTipoProyObra()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{getProductores:function(){var t=u(i.a.mark(function t(){var e,n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/persona/fill/"+JSON.stringify({tipo_persona_id:1}));case 2:return e=t.sent,t.next=5,s.a.get("api/persona/fill/"+JSON.stringify({tipo_persona_id:2}));case 5:n=t.sent,r=[].concat(c(e.data),c(n.data)),this.productores=r;case 8:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getTipoProyObra:function(){var t=u(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/tipo_proy_obra");case 2:e=t.sent,this.tipos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},complete:function(t,e,n){this.fileAdjunto=n.response,this.valArchivo="Cargado correctamente."},save:function(){var t=u(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/proy_obra/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/proy_obra",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}));return function(){return t.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Nombre del proyecto u obra",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}}),t._v(" "),n("v-textarea",{attrs:{label:"Descripción del proyecto u obra",rows:"1",hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-select",{attrs:{items:t.productores,"item-text":"carnet_identidad","item-value":"id",label:"Carnet de identidad del productor y/o comercializador",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.persona_id,callback:function(e){t.$set(t.selectedItem,"persona_id",e)},expression:"selectedItem.persona_id"}}),t._v(" "),n("v-select",{attrs:{items:t.tipos,"item-text":"nombre","item-value":"id",label:"Tipo",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.tipo_proy_obras_productor_id,callback:function(e){t.$set(t.selectedItem,"tipo_proy_obras_productor_id",e)},expression:"selectedItem.tipo_proy_obras_productor_id"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v("Cancelar\n ")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v("Guardar\n ")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Proyectos y obras de la zona de producción del productor")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(t._s(t.fullName(e.item.persona)))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.persona.carnet_identidad))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.nombre))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.descripcion))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.tipo_proy_obras_productor.nombre))]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("Sin resultados.")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(717),n(721),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(718),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre del producto",value:"nombre",align:"center"},{text:"Descripción del producto",value:"descripcion",align:"center"},{text:"Autorizado",value:"autorizado",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/prod_autorizado");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/prod_autorizado/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(719),n(720),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},error:"",productores:[],tipos:[],autorizado:[{name:"SI",value:!0},{name:"NO",value:!1}]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.$refs.form.reset(),t.selectedItem=e,t.dialog=!0,t.selectedIndex=e})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},complete:function(t,e,n){this.fileAdjunto=n.response,this.valArchivo="Cargado correctamente."},save:function(){var t,e=(t=i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/prod_autorizado/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/prod_autorizado",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Nombre del producto",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}}),t._v(" "),n("v-textarea",{attrs:{label:"Descripción del producto",rows:"1",hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-select",{attrs:{items:t.autorizado,"item-text":"name","item-value":"value",label:"Autorizar",hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.autorizado,callback:function(e){t.$set(t.selectedItem,"autorizado",e)},expression:"selectedItem.autorizado"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v("Cancelar\n ")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v("Guardar\n ")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Consulta de información de interés para productores")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.nombre))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.descripcion))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.autorizado?"SI":"NO"))]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("Sin resultados.")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(723),n(727),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(724),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre del producto",value:"nombre",align:"center"},{text:"Descripción del producto",value:"descripcion",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/prod_industrializado");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/prod_industrializado/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(725),n(726),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},error:"",productores:[],tipos:[],autorizado:[{name:"SI",value:!0},{name:"NO",value:!1}]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.$refs.form.reset(),t.selectedItem=e,t.dialog=!0,t.selectedIndex=e})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},complete:function(t,e,n){this.fileAdjunto=n.response,this.valArchivo="Cargado correctamente."},save:function(){var t,e=(t=i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/prod_industrializado/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/prod_industrializado",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Nombre del producto",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}}),t._v(" "),n("v-textarea",{attrs:{label:"Descripción del producto",rows:"1",hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text")],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v("Cancelar\n ")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v("Guardar\n ")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Productos industrializados")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.nombre))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.descripcion))]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("Sin resultados.")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(729),n(733),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(730),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre del producto",value:"nombre",align:"center"},{text:"Descripción del producto",value:"descripcion",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/investigacion_coca");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/investigacion_coca/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(731),n(732),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},error:"",productores:[],tipos:[],autorizado:[{name:"SI",value:!0},{name:"NO",value:!1}]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.$refs.form.reset(),t.selectedItem=e,t.dialog=!0,t.selectedIndex=e})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},complete:function(t,e,n){this.fileAdjunto=n.response,this.valArchivo="Cargado correctamente."},save:function(){var t,e=(t=i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/investigacion_coca/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/investigacion_coca",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Nombre de la investigación",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}}),t._v(" "),n("v-textarea",{attrs:{label:"Descripción de la investigación",rows:"1",hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text")],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v("Cancelar\n ")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v("Guardar\n ")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Información de investigaciones sobre la coca")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.nombre))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.descripcion))]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("Sin resultados.")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(735),n(739),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(736),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre de la institución",value:"nombre",align:"center"},{text:"Enlace",value:"enlace",align:"center"},{text:"Descripción",value:"descripcion",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/enlace_institucional");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/enlace_institucional/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(737),n(738),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},error:"",productores:[],tipos:[],autorizado:[{name:"SI",value:!0},{name:"NO",value:!1}]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.$refs.form.reset(),t.selectedItem=e,t.dialog=!0,t.selectedIndex=e})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},complete:function(t,e,n){this.fileAdjunto=n.response,this.valArchivo="Cargado correctamente."},save:function(){var t,e=(t=i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/enlace_institucional/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/enlace_institucional",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Nombre de la institución",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}}),t._v(" "),n("v-textarea",{attrs:{label:"Descripción",rows:"1",hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Enlace al sitio web de la institución",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.enlace,callback:function(e){t.$set(t.selectedItem,"enlace",e)},expression:"selectedItem.enlace"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v("Cancelar\n ")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v("Guardar\n ")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Enlaces a sitios web institucionales")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.nombre))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[n("a",{attrs:{href:""+e.item.enlace,target:"_blank"}},[t._v(t._s(e.item.enlace))])]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.descripcion))]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("Sin resultados.")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(741),n(745),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(742),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Carnet de identidad del productor/comercializador",value:"carnet_identidad",align:"center"},{text:"Email",value:"email",align:"center"},{text:"Fecha de nacimiento",value:"fecha_nacimiento",align:"center"},{text:"Asunto de la consulta",value:"asunto",align:"center"},{text:"Descripción de la consulta",value:"contenido",align:"center"},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/consulta");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/consulta/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e,n){var r=n(0)(n(743),n(744),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function u(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},error:"",productores:[],tipos:[],birth_date:null,birth_date_formatted:null,menu:null}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.$refs.form.reset(),t.selectedItem=e,t.birth_date_formatted=t.$moment(e.fecha_nacimiento).format("DD/MM/YYYY"),t.dialog=!0,t.selectedIndex=e}),this.getProductores()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},watch:{birth_date:function(t){this.selectedItem.fecha_nacimiento=t,this.birth_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},getProductores:function(){var t=u(i.a.mark(function t(){var e,n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/persona/fill/"+JSON.stringify({tipo_persona_id:1}));case 2:return e=t.sent,t.next=5,s.a.get("api/persona/fill/"+JSON.stringify({tipo_persona_id:2}));case 5:n=t.sent,r=[].concat(c(e.data),c(n.data)),this.productores=r;case 8:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),save:function(){var t=u(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/consulta/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/consulta",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}));return function(){return t.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Carnet de identidad",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.carnet_identidad,callback:function(e){t.$set(t.selectedItem,"carnet_identidad",e)},expression:"selectedItem.carnet_identidad"}}),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs12:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de nacimiento","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.birth_date_formatted,callback:function(e){t.birth_date_formatted=e},expression:"birth_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"ES"},on:{input:function(e){t.menu=!1}},model:{value:t.birth_date,callback:function(e){t.birth_date=e},expression:"birth_date"}})],1)],1)],1),t._v(" "),n("v-text-field",{staticClass:"mr-2",attrs:{label:"Email",rules:[function(t){return!!t||"Requerido"},function(t){return/.+@.+/.test(t)||"E-mail no es valido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.email,callback:function(e){t.$set(t.selectedItem,"email",e)},expression:"selectedItem.email"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Asunto",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.asunto,callback:function(e){t.$set(t.selectedItem,"asunto",e)},expression:"selectedItem.asunto"}}),t._v(" "),n("v-textarea",{attrs:{label:"Descripción de la consulta",rows:"1",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.contenido,callback:function(e){t.$set(t.selectedItem,"contenido",e)},expression:"selectedItem.contenido"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v("Cancelar\n ")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v("Guardar\n ")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Consultas")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.carnet_identidad))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.email))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(t.formatDate(e.item.fecha_nacimiento)))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.asunto))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.contenido))]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("Sin resultados.")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(747),n(751),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(748),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Carnet de identidad del productor/comercializador",value:"carnet_identidad",align:"center"},{text:"Email",value:"email",align:"center"},{text:"Fecha de nacimiento",value:"fecha_nacimiento",align:"center"},{text:"Problema",value:"problema",align:"center"},{text:"Descripción del problema",value:"descripcion_problema",align:"center"},{text:"Código de reclamo",value:"codigo_reclamo",align:"center"}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/reclamo");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/reclamo/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e,n){var r=n(0)(n(749),n(750),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function u(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},error:"",productores:[],tipos:[],birth_date:null,birth_date_formatted:null,menu:null}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.$refs.form.reset(),t.selectedItem=e,t.birth_date_formatted=t.$moment(e.fecha_nacimiento).format("DD/MM/YYYY"),t.dialog=!0,t.selectedIndex=e}),this.getProductores()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},watch:{birth_date:function(t){this.selectedItem.fecha_nacimiento=t,this.birth_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},getProductores:function(){var t=u(i.a.mark(function t(){var e,n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/persona/fill/"+JSON.stringify({tipo_persona_id:1}));case 2:return e=t.sent,t.next=5,s.a.get("api/persona/fill/"+JSON.stringify({tipo_persona_id:2}));case 5:n=t.sent,r=[].concat(c(e.data),c(n.data)),this.productores=r;case 8:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),save:function(){var t=u(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/reclamo/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/reclamo",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}));return function(){return t.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Carnet de identidad",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.carnet_identidad,callback:function(e){t.$set(t.selectedItem,"carnet_identidad",e)},expression:"selectedItem.carnet_identidad"}}),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs12:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de nacimiento","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.birth_date_formatted,callback:function(e){t.birth_date_formatted=e},expression:"birth_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"ES"},on:{input:function(e){t.menu=!1}},model:{value:t.birth_date,callback:function(e){t.birth_date=e},expression:"birth_date"}})],1)],1)],1),t._v(" "),n("v-text-field",{staticClass:"mr-2",attrs:{label:"Email",rules:[function(t){return!!t||"Requerido"},function(t){return/.+@.+/.test(t)||"E-mail no es valido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.email,callback:function(e){t.$set(t.selectedItem,"email",e)},expression:"selectedItem.email"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Problema",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.problema,callback:function(e){t.$set(t.selectedItem,"problema",e)},expression:"selectedItem.problema"}}),t._v(" "),n("v-textarea",{attrs:{label:"Descripción del problema",rows:"1",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion_problema,callback:function(e){t.$set(t.selectedItem,"descripcion_problema",e)},expression:"selectedItem.descripcion_problema"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v("Cancelar\n ")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v("Guardar\n ")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Reclamos")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.carnet_identidad))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.email))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(t.formatDate(e.item.fecha_nacimiento)))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.problema))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.descripcion_problema))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.codigo_reclamo))]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("Sin resultados.")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(753),n(757),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(754),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Persona a cargo",value:"nombre",align:"center"},{text:"Celular",value:"celular",align:"center"},{text:"Teléfono",value:"telefono",align:"center"}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/callcenter");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/callcenter/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(755),n(756),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},error:"",personas:[],tipos:[],autorizado:[{name:"SI",value:!0},{name:"NO",value:!1}]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.$refs.form.reset(),t.selectedItem=e,t.dialog=!0,t.selectedIndex=e})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t,e=(t=i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/callcenter/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/callcenter",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Celular",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.celular,callback:function(e){t.$set(t.selectedItem,"celular",e)},expression:"selectedItem.celular"}}),t._v(" "),n("v-text-field",{attrs:{label:"Teléfono",rules:[function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],"persistent-hint":""},model:{value:t.selectedItem.telefono,callback:function(e){t.$set(t.selectedItem,"telefono",e)},expression:"selectedItem.telefono"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Nombres y Apellidos",rules:[function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],"persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v("Cancelar\n ")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v("Guardar\n ")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Centro de llamadas")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.nombre))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.telefono))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.celular))]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("Sin resultados.")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(759),n(771),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(760),f=n.n(d),h=n(763),p=n.n(h),m=n(108),v=n.n(m);function _(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,ConfirmItem:v.a,Form:f.a,Card:p.a},data:function(){return{bus:new o.a,headers:[{text:"Código",value:"codigo",align:"center"},{text:"Nombre",value:"primer_apellido",align:"center"},{text:"Carnet de identidad",value:"carnet_identidad",align:"center"},{text:"Estado",align:"center",sortable:!1},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=_(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/persona/fill/"+JSON.stringify({tipo_persona_id:1}));case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),cardItem:function(t){this.bus.$emit("openDialogCard",t)},editItem:function(t,e){this.bus.$emit("openDialog",Object.assign(t,e))},activeItem:function(t){t.activo?this.bus.$emit("openDialogConfirm",{action:"Activar",url:"api/persona/"+t.id,item:{activo:!0}}):this.bus.$emit("openDialogConfirm",{action:"Inactivar",url:"api/persona/"+t.id,item:{activo:!1}})},removeItem:function(){var t=_(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/guia_internacion/fill/"+JSON.stringify({persona_id:e.id}));case 2:t.sent.data.length>0?this.$toast.info("Este productor tiene guía de internación."):this.bus.$emit("openDialogRemove","api/persona/"+e.id);case 4:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},image:function(t){return t.fotografia},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e,n){var r=n(0)(n(761),n(762),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(23),l=n.n(u),d=n(42);n.n(d);function f(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}o.a.use(l.a),e.default={components:{WebCam:d.WebCam},props:["item","bus"],data:function(){return{step:1,valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},selectedSustituir:{},pais_nacimiento:null,menu:null,errorCarnet:null,errorEmail:null,birth_date:null,birth_date_formatted:null,estadoCivil:["Soltero","Casado","Divorciado","Viudo"],generos:[{nombre:"MASCULINO",valor:"M"},{nombre:"FEMENINO",valor:"F"}],paises:[],departamentos:[],provincias:[],tiposPersona:[],departamentosProduccion:[],provinciasProduccion:[],municipiosProduccion:[],regionales:[],img:null,camera:null,deviceId:null,devices:[],frontCam:!0,report:null,googleKey:"",valFotografia:null,getCamera:!1,sustituir:!1,valArchivo:null,sustituirA:null,idOld:null,sustituciones:[],options:{url:"api/upload/file",headers:c.a.defaults.headers.common,paramName:"file",uploadMultiple:!1,acceptedFiles:{extensions:["application/pdf"],message:"Formato no permitido."},maxFilesize:{limit:5,message:"El archivo excede los 5Mb."},maxFiles:1},fileSustituir:null}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.sustituir=e.sustituir,t.dialog=!0,t.selectedIndex=e,t.sustituir?(t.sustituirA=t.fullName(e),t.idOld=e.id,t.selectedItem.tipo_persona_id=e.tipo_persona_id,t.getSustituciones()):(console.log(e),t.selectedItem=e,t.pais_nacimiento=e.pais_nacimiento.nombre,t.birth_date_formatted=t.$moment(e.fecha_nacimiento).format("DD/MM/YYYY"),t.img=e.fotografia,t.valFotografia="Fotografia capturada.",t.getProvincias())}),this.getPaises(),this.getDepartamentos(),this.getProvincias(),this.getTiposPersona()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":this.sustituir?"Sustituir a:":"Editar"},device:function(){var t=this;return find(this.devices,function(e){return e.deviceId==t.deviceId})}},watch:{birth_date:function(t){this.selectedItem.fecha_nacimiento=t,this.birth_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")},camera:function(t){this.deviceId=t}},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.selectedSustituir={},this.pais_nacimiento=null,this.img=null,this.step=1,this.errorCarnet=null,this.errorEmail=null,this.sustituirA=null,this.idOld=null,this.fileSustituir=null,this.valArchivo=null,this.valFotografia=null,1==this.getCamera&&this.onStop(),this.$refs.form1.reset(),this.$refs.form2.reset(),this.sustituir&&this.$refs.form3.reset(),this.sustituir=!1,this.bus.$emit("closeDialog")},save:function(){var t=f(i.a.mark(function t(){var e,n,r,a,o;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,this.selectedItem.user_id=this.$store.getters["auth/user"].id,!this.$refs.form2.validate()||0!=this.sustituir){t.next=24;break}return t.next=5,c.a.get("api/pais/fill/"+JSON.stringify({nombre:this.pais_nacimiento}));case 5:if(!((e=t.sent).data.length>0)){t.next=10;break}this.selectedItem.pais_nacimiento_id=e.data[0].id,t.next=14;break;case 10:return t.next=12,c.a.post("api/pais",{nombre:this.pais_nacimiento});case 12:n=t.sent,this.selectedItem.pais_nacimiento_id=n.data.id;case 14:if(-1==this.selectedIndex){t.next=19;break}return t.next=17,c.a.put("api/persona/"+this.selectedItem.id,this.selectedItem);case 17:t.next=22;break;case 19:return this.selectedItem.tipo_persona_id=1,t.next=22,c.a.post("api/persona",this.selectedItem);case 22:this.$toast.success("Correcto."),this.close();case 24:if(!this.$refs.form3.validate()||!this.sustituir){t.next=48;break}return t.next=27,c.a.get("api/pais/fill/"+JSON.stringify({nombre:this.pais_nacimiento}));case 27:if(!((r=t.sent).data.length>0)){t.next=32;break}this.selectedItem.pais_nacimiento_id=r.data[0].id,t.next=36;break;case 32:return t.next=34,c.a.post("api/pais",{nombre:this.pais_nacimiento});case 34:a=t.sent,this.selectedItem.pais_nacimiento_id=a.data.id;case 36:return this.selectedItem.tipo_persona_id=1,t.next=39,c.a.post("api/persona",this.selectedItem);case 39:return o=t.sent,this.selectedSustituir.persona_id=o.data.id,this.selectedSustituir.sustituido=!0,this.selectedSustituir.adjunto_sustitucion=this.fileSustituir,this.selectedSustituir.activo=!1,t.next=46,c.a.put("api/persona/"+this.idOld,this.selectedSustituir);case 46:this.$toast.success("Correcto."),this.close();case 48:t.next=53;break;case 50:t.prev=50,t.t0=t.catch(0),console.log(t.t0);case 53:case"end":return t.stop()}},t,this,[[0,50]])}));return function(){return t.apply(this,arguments)}}(),getPaises:function(){var t=f(i.a.mark(function t(){var e,n,r,a,o,s,u;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/pais");case 2:for(e=t.sent,n=!0,r=!1,a=void 0,t.prev=6,o=e.data[Symbol.iterator]();!(n=(s=o.next()).done);n=!0)u=s.value,this.paises.push(u.nombre);t.next=14;break;case 10:t.prev=10,t.t0=t.catch(6),r=!0,a=t.t0;case 14:t.prev=14,t.prev=15,!n&&o.return&&o.return();case 17:if(t.prev=17,!r){t.next=20;break}throw a;case 20:return t.finish(17);case 21:return t.finish(14);case 22:case"end":return t.stop()}},t,this,[[6,10,14,22],[15,,17,21]])}));return function(){return t.apply(this,arguments)}}(),getDepartamentos:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/departamento");case 2:e=t.sent,this.departamentos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getProvincias:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.selectedItem.departamento_nacimiento_id||(this.selectedItem.departamento_nacimiento_id=null),t.next=3,c.a.get("api/provincia/fill/"+JSON.stringify({departamento_id:this.selectedItem.departamento_nacimiento_id}));case 3:e=t.sent,this.provincias=e.data;case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),validProvincia:function(){this.selectedItem.provincia_nacimiento_id||(this.selectedItem.provincia_nacimiento_id=null)},getTiposPersona:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/tipo_persona");case 2:e=t.sent,this.tiposPersona=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),verificarCarnet:function(){var t=f(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/persona/fill/"+JSON.stringify({carnet_identidad:this.selectedItem.carnet_identidad}));case 2:t.sent.data.length>0?this.errorCarnet="Ya existe este carnet.":this.errorCarnet=null;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),verificarEmail:function(){var t=f(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/persona/fill/"+JSON.stringify({email:this.selectedItem.email}));case 2:t.sent.data.length>0?this.errorEmail="Ya existe este email.":this.errorEmail=null;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getSustituciones:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/sustitucion/fill/"+JSON.stringify({tipo_persona_id:this.selectedItem.tipo_persona_id}));case 2:e=t.sent,this.sustituciones=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),nextStep:function(){switch(this.step){case 1:this.$refs.form1.validate()&&null==this.errorCarnet&&(this.step=2,0==this.getCamera?this.getCamera=!0:this.onStart());break;case 2:this.sustituir&&(this.step=3,1==this.getCamera&&this.onStop())}},previousStep:function(){switch(this.step){case 3:this.step=2;break;case 2:this.step=1,1==this.getCamera&&this.onStop()}},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},onCapture:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.$refs.webcam.capture();case 2:return this.img=t.sent,t.next=5,c.a.post("api/upload/base64_image",{base64:this.img});case 5:e=t.sent,this.selectedItem.fotografia=e.data,this.selectedItem.biometrico=e.data,this.selectedItem.carnet_escaneado=e.data,this.valFotografia="Fotografia capturada";case 10:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),onStop:function(){this.$refs.webcam.stop()},onStart:function(){this.$refs.webcam.start()},onCameras:function(t){this.devices=t},onCameraChange:function(t){this.deviceId=t,this.camera=t},complete:function(t,e,n){this.fileSustituir=n.response,this.valArchivo="Cargado correctamente."}},filters:{percent:function(t){return t?(Math.floor(1e4*t)/100).toFixed(0)+"%":""}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))]),t._v(" "),n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.sustituirA))])],1),t._v(" "),n("v-card-text",[n("v-stepper",{attrs:{vertical:""},model:{value:t.step,callback:function(e){t.step=e},expression:"step"}},[n("v-stepper-header",[n("v-stepper-step",{attrs:{step:"1",complete:t.step>1}},[t._v("Información general")]),t._v(" "),n("v-divider"),t._v(" "),n("v-stepper-step",{attrs:{step:"2",complete:t.step>2}},[t._v("Fotografía")]),t._v(" "),t.sustituir?n("v-divider"):t._e(),t._v(" "),t.sustituir?n("v-stepper-step",{attrs:{step:"3",complete:t.step>3}},[t._v("Sustitución")]):t._e()],1),t._v(" "),n("v-stepper-items",[n("v-stepper-content",{attrs:{step:"1"}},[n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Primer apellido",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.primer_apellido,callback:function(e){t.$set(t.selectedItem,"primer_apellido",e)},expression:"selectedItem.primer_apellido"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{attrs:{label:"Segundo apellido"},model:{value:t.selectedItem.segundo_apellido,callback:function(e){t.$set(t.selectedItem,"segundo_apellido",e)},expression:"selectedItem.segundo_apellido"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-2",attrs:{label:"Carnet de identidad",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=20||"No mayor a 20 caracteres"}],"error-messages":t.errorCarnet,hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.verificarCarnet()}},model:{value:t.selectedItem.carnet_identidad,callback:function(e){t.$set(t.selectedItem,"carnet_identidad",e)},expression:"selectedItem.carnet_identidad"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.departamentos,"item-text":"sigla","item-value":"id",label:"Extension",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.departamento_extension_id,callback:function(e){t.$set(t.selectedItem,"departamento_extension_id",e)},expression:"selectedItem.departamento_extension_id"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.estadoCivil,label:"Estado civil",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.estado_civil,callback:function(e){t.$set(t.selectedItem,"estado_civil",e)},expression:"selectedItem.estado_civil"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.generos,"item-text":"nombre","item-value":"valor",label:"Genero",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.genero,callback:function(e){t.$set(t.selectedItem,"genero",e)},expression:"selectedItem.genero"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-2",attrs:{label:"Telefono/Celular"},model:{value:t.selectedItem.telefono,callback:function(e){t.$set(t.selectedItem,"telefono",e)},expression:"selectedItem.telefono"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-2",attrs:{label:"Email","error-messages":t.errorEmail},on:{change:function(e){return t.verificarEmail()}},model:{value:t.selectedItem.email,callback:function(e){t.$set(t.selectedItem,"email",e)},expression:"selectedItem.email"}})],1)],1),t._v(" "),n("v-text-field",{attrs:{label:"Domicilio",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=500||"No mayor a 500 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.domicilio,callback:function(e){t.$set(t.selectedItem,"domicilio",e)},expression:"selectedItem.domicilio"}}),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de nacimiento","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.birth_date_formatted,callback:function(e){t.birth_date_formatted=e},expression:"birth_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"ES"},on:{input:function(e){t.menu=!1}},model:{value:t.birth_date,callback:function(e){t.birth_date=e},expression:"birth_date"}})],1)],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-combobox",{staticClass:"mr-2",attrs:{items:t.paises,label:"País de nacimiento",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido, Puede crear un nuevo registro de país.</span>","persistent-hint":""},model:{value:t.pais_nacimiento,callback:function(e){t.pais_nacimiento=e},expression:"pais_nacimiento"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.departamentos,"item-text":"nombre","item-value":"id",label:"Departamento de nacimiento",clearable:""},on:{change:function(e){return t.getProvincias()}},model:{value:t.selectedItem.departamento_nacimiento_id,callback:function(e){t.$set(t.selectedItem,"departamento_nacimiento_id",e)},expression:"selectedItem.departamento_nacimiento_id"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{attrs:{items:t.provincias,"item-text":"nombre","item-value":"id",label:"Provincia de nacimiento",clearable:""},on:{change:function(e){return t.validProvincia()}},model:{value:t.selectedItem.provincia_nacimiento_id,callback:function(e){t.$set(t.selectedItem,"provincia_nacimiento_id",e)},expression:"selectedItem.provincia_nacimiento_id"}})],1)],1)],1)],1),t._v(" "),n("v-stepper-content",{attrs:{step:"2"}},[n("v-form",{ref:"form2",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs12:"",md6:""}},[t.getCamera?n("v-card",{attrs:{dark:"",color:"primary",height:"380"}},[n("v-card-title",[n("v-icon",{attrs:{large:"",left:""}},[t._v("\n camera\n ")]),t._v(" "),t.device?n("span",{staticClass:"title font-weight-light"},[t._v("\n "+t._s(t.device.label)+"\n ")]):t._e()],1),t._v(" "),n("v-card-text",{staticClass:"px-0"},[n("web-cam",{ref:"webcam",staticStyle:{margin:"-130px 0 0 0"},attrs:{width:"100%",deviceId:t.deviceId,debug:!1,googleKey:t.googleKey},on:{cameras:t.onCameras,"camera-change":t.onCameraChange}})],1)],1):t._e()],1),t._v(" "),n("v-flex",{attrs:{xs12:"",md6:""}},[n("v-card",[n("v-avatar",{attrs:{tile:"tile",size:"100%",color:"grey lighten-4"}},[n("img",{attrs:{src:t.img}})]),t._v(" "),n("v-card-title",{attrs:{"primary-title":""}},[n("v-text-field",{attrs:{rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",readonly:"",box:""},model:{value:t.valFotografia,callback:function(e){t.valFotografia=e},expression:"valFotografia"}})],1)],1)],1),t._v(" "),n("v-select",{attrs:{xs4:"",items:t.devices,label:"Seleccione camara","item-text":"label","item-value":"deviceId"},model:{value:t.camera,callback:function(e){t.camera=e},expression:"camera"}}),t._v(" "),n("v-btn",{attrs:{xs3:"",small:"",color:"primary"},on:{click:t.onCapture}},[t._v("Capturar foto "),n("v-icon",[t._v("camera")])],1)],1)],1)],1),t._v(" "),t.sustituir?n("v-stepper-content",{attrs:{step:"3"}},[n("v-form",{ref:"form3",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-3",attrs:{items:t.sustituciones,"item-text":"nombre","item-value":"id",label:"Motivo de la sustitución",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedSustituir.sustitucion_id,callback:function(e){t.$set(t.selectedSustituir,"sustitucion_id",e)},expression:"selectedSustituir.sustitucion_id"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[[n("vue-clip",{attrs:{options:t.options,"on-complete":t.complete},scopedSlots:t._u([{key:"clip-uploader-body",fn:function(e){return t._l(e.files,function(e,r){return n("div",{key:r},["success"==e.status?n("v-icon",{attrs:{color:"success"}},[t._v("check_circle")]):t._e(),t._v(" "),"success"==e.status?n("span",{staticClass:"green--text"},[t._v(" correcto.")]):t._e(),t._v(" "),"error"==e.status?n("v-icon",{attrs:{color:"error"}},[t._v("error")]):t._e(),t._v(" "),"error"==e.status?n("span",{staticClass:"red--text"},[t._v(" "+t._s(e.errorMessage))]):t._e()],1)})}}],null,!1,4294490384)},[n("template",{slot:"clip-uploader-action"},[n("div",{staticClass:"dz-message v-btn v-btn--small theme--light success"},[t._v("Subir archivo PDF")])])],2)],t._v(" "),n("v-text-field",{attrs:{readonly:"",box:"",label:"Archivo PDF",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.valArchivo,callback:function(e){t.valArchivo=e},expression:"valArchivo"}})],2)],1)],1)],1):t._e()],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),1!=t.step?n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.previousStep()}}},[t._v("Anterior")]):t._e(),t._v(" "),2!=t.step&&0==t.sustituir?n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.nextStep()}}},[t._v("Siguiente")]):t._e(),t._v(" "),1==t.sustituir&&3!=t.step?n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.nextStep()}}},[t._v("Siguiente")]):t._e(),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),2==t.step&&0==t.sustituir?n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1):t._e(),t._v(" "),3==t.step&&1==t.sustituir?n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1):t._e()],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(764),n(768),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o),c=n(765),u=n.n(c);function l(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{CardForm:u.a},props:["item","bus"],data:function(){return{dialog:!1,headers:[{text:"Carnet de productor",align:"center",sortable:!1},{text:"Fecha emisión",align:"center",sortable:!1},{text:"Fecha conclusión",align:"center",sortable:!1},{text:"Estado",align:"center",sortable:!1},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:"",disableNuevoItem:!1,personaId:null}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogCard",function(e){t.dialog=!0,t.selectedItem=e,t.personaId=e.id,t.getTable(),e.carnet_productor.length>0&&(t.disableNuevoItem=!0)}),this.bus.$on("closeDialogCard",function(){t.getTable()})},computed:{},watch:{},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.personaId=null,this.bus.$emit("closeDialogCard")},getTable:function(){var t=l(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s.a.get("api/carnet_productor/fill/"+JSON.stringify({persona_id:this.personaId}));case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),nuevoItem:function(t,e){this.bus.$emit("openDialogCardForm",Object.assign(t,e))},editItem:function(t,e){this.bus.$emit("openDialogCardForm",Object.assign(t,e))},duplicarItem:function(t,e){this.bus.$emit("openDialogCardForm",Object.assign(t,e))},renovarItem:function(t,e){this.bus.$emit("openDialogCardForm",Object.assign(t,e))},removeItem:function(){var t=l(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialog Remove","api/carnet_productor/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},image:function(t){return t.fotografia},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")},formatDecimal:function(t){return parseFloat(t).toFixed(2)},printItem:function(){var t=l(i.a.mark(function t(e){var n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s()({method:"GET",url:"api/carnet_productor/print/"+e.id,responseType:"arraybuffer"});case 3:n=t.sent,r=new Blob([n.data],{type:"application/pdf"}),printJS(window.URL.createObjectURL(r)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(766),n(767),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{},props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},personas:[],departamentos:[],provincias:[],municipios:[],federaciones:[],federacion:null,centrales:[],central:null,comunidades:[],comunidad:null,regionales:[],regional:null,menu:null,emision_date_formatted:null,emision_date:null,menu2:null,conclusion_date_formatted:null,conclusion_date:null,mode:null,formTitle:"Nuevo",duplicar:!1,renovar:!1,errorCarnetProductor:null,personaId:null}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogCardForm",function(e){t.dialog=!0,t.mode=e.mode,"nuevo"==t.mode&&(t.formTitle="Nuevo",t.personaId=e,t.duplicar=!1,t.renovar=!1,t.emision_date_formatted=t.$moment().format("DD/MM/YYYY"),t.conclusion_date_formatted=t.$moment().add(5,"years").format("DD/MM/YYYY"),t.selectedItem.fecha_emision=t.$moment().format("YYYY-MM-DD"),t.selectedItem.fecha_conclusion=t.$moment().add(5,"years").format("YYYY-MM-DD")),"editar"==t.mode&&(t.selectedIndex=e,t.selectedItem=e,t.getProvincias(),t.getMunicipios(),t.getDependientes(),t.federacion=e.federacion.nombre,t.central=e.central.nombre,t.regional=e.regional.nombre,t.comunidad=e.comunidad.nombre,t.formTitle="Editar",t.duplicar=!1,t.renovar=!1,t.emision_date_formatted=t.$moment(e.fecha_emision).format("DD/MM/YYYY"),t.conclusion_date_formatted=t.$moment(e.fecha_conclusion).format("DD/MM/YYYY")),"duplicar"==t.mode&&(t.selectedIndex=e,t.selectedItem=e,t.getProvincias(),t.getMunicipios(),t.getDependientes(),t.federacion=e.federacion.nombre,t.central=e.central.nombre,t.regional=e.regional.nombre,t.comunidad=e.comunidad.nombre,t.formTitle="Duplicado numero: ",t.duplicar=!0,t.renovar=!1,t.emision_date_formatted=t.$moment(e.fecha_emision).format("DD/MM/YYYY"),t.conclusion_date_formatted=t.$moment(e.fecha_conclusion).format("DD/MM/YYYY"),t.getCarnetProductor(e)),"renovar"==t.mode&&(t.selectedIndex=e,t.selectedItem=e,t.getProvincias(),t.getMunicipios(),t.getDependientes(),t.federacion=e.federacion.nombre,t.central=e.central.nombre,t.regional=e.regional.nombre,t.comunidad=e.comunidad.nombre,t.formTitle="Renovar carnet de: ",t.duplicar=!1,t.renovar=!0,t.selectedItem.fecha_emision=t.$moment().format("YYYY-MM-DD"),t.emision_date_formatted=t.$moment(t.selectedItem.fecha_emision).format("DD/MM/YYYY"),t.selectedItem.fecha_conclusion=t.$moment().add(5,"years").format("YYYY-MM-DD"),t.conclusion_date_formatted=t.$moment(t.selectedItem.fecha_conclusion).format("DD/MM/YYYY"),t.selectedItem.duplicado=0)}),this.getPersonas(),this.getDepartamentos()},computed:{},watch:{emision_date:function(t){this.selectedItem.fecha_emision=t,this.emision_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")},conclusion_date:function(t){this.selectedItem.fecha_conclusion=t,this.conclusion_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.federacion=null,this.central=null,this.regional=null,this.comunidad=null,this.$refs.form.reset(),this.bus.$emit("closeDialogCard"),this.mode=null,this.formTitle="Nuevo",this.duplicar=null,this.personaId=null},save:function(){var t=c(i.a.mark(function t(){var e,n,r,a,o,c,u,l;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,this.selectedItem.user_id=this.$store.getters["auth/user"].id,!this.$refs.form.validate()){t.next=66;break}return t.next=5,s.a.get("api/federacion/fill/"+JSON.stringify({nombre:this.federacion}));case 5:if(!((e=t.sent).data.length>0)){t.next=10;break}this.selectedItem.federacion_id=e.data[0].id,t.next=14;break;case 10:return t.next=12,s.a.post("api/federacion",{municipio_id:this.selectedItem.municipio_id,nombre:this.federacion});case 12:n=t.sent,this.selectedItem.federacion_id=n.data.id;case 14:return t.next=16,s.a.get("api/central/fill/"+JSON.stringify({nombre:this.central}));case 16:if(!((r=t.sent).data.length>0)){t.next=21;break}this.selectedItem.central_id=r.data[0].id,t.next=25;break;case 21:return t.next=23,s.a.post("api/central",{municipio_id:this.selectedItem.municipio_id,nombre:this.central});case 23:a=t.sent,this.selectedItem.central_id=a.data.id;case 25:return t.next=27,s.a.get("api/comunidad/fill/"+JSON.stringify({nombre:this.comunidad}));case 27:if(!((o=t.sent).data.length>0)){t.next=32;break}this.selectedItem.comunidad_id=o.data[0].id,t.next=36;break;case 32:return t.next=34,s.a.post("api/comunidad",{municipio_id:this.selectedItem.municipio_id,nombre:this.comunidad});case 34:c=t.sent,this.selectedItem.comunidad_id=c.data.id;case 36:return t.next=38,s.a.get("api/regional/fill/"+JSON.stringify({nombre:this.regional}));case 38:if(!((u=t.sent).data.length>0)){t.next=43;break}this.selectedItem.regional_id=u.data[0].id,t.next=47;break;case 43:return t.next=45,s.a.post("api/regional",{municipio_id:this.selectedItem.municipio_id,nombre:this.regional});case 45:l=t.sent,this.selectedItem.regional_id=l.data.id;case 47:if(-1==this.selectedIndex){t.next=61;break}if("editar"!=this.mode){t.next=51;break}return t.next=51,s.a.put("api/carnet_productor/"+this.selectedItem.id,this.selectedItem);case 51:if("duplicar"!=this.mode){t.next=54;break}return t.next=54,s.a.put("api/carnet_productor/"+this.selectedItem.id,{duplicado:this.selectedItem.duplicado});case 54:if("renovar"!=this.mode){t.next=59;break}return t.next=57,s.a.put("api/carnet_productor/"+this.selectedItem.id,{renovado:!0});case 57:return t.next=59,s.a.post("api/carnet_productor",this.selectedItem);case 59:t.next=64;break;case 61:return this.selectedItem.persona_id=this.personaId,t.next=64,s.a.post("api/carnet_productor",this.selectedItem);case 64:this.$toast.success("Correcto."),this.close();case 66:t.next=71;break;case 68:t.prev=68,t.t0=t.catch(0),console.log(t.t0);case 71:case"end":return t.stop()}},t,this,[[0,68]])}));return function(){return t.apply(this,arguments)}}(),getPersonas:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/persona/fill/"+JSON.stringify({tipo_persona_id:1}));case 2:e=t.sent,this.personas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getDepartamentos:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/departamento");case 2:e=t.sent,this.departamentos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getProvincias:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/provincia/fill/"+JSON.stringify({departamento_id:this.selectedItem.departamento_id}));case 2:e=t.sent,this.provincias=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getMunicipios:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/municipio/fill/"+JSON.stringify({provincia_id:this.selectedItem.provincia_id}));case 2:e=t.sent,this.municipios=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getDependientes:function(){var t=c(i.a.mark(function t(){var e,n,r,a,o,c,u,l,d,f,h,p,m,v,_,g,b,y,x,w,k,C,E,S,I,M,T,D;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/federacion/fill/"+JSON.stringify({municipio_id:this.selectedItem.municipio_id}));case 2:for(e=t.sent,n=!0,r=!1,a=void 0,t.prev=6,o=e.data[Symbol.iterator]();!(n=(c=o.next()).done);n=!0)u=c.value,this.federaciones.push(u.nombre);t.next=14;break;case 10:t.prev=10,t.t0=t.catch(6),r=!0,a=t.t0;case 14:t.prev=14,t.prev=15,!n&&o.return&&o.return();case 17:if(t.prev=17,!r){t.next=20;break}throw a;case 20:return t.finish(17);case 21:return t.finish(14);case 22:return t.next=24,s.a.get("api/central/fill/"+JSON.stringify({municipio_id:this.selectedItem.municipio_id}));case 24:for(l=t.sent,d=!0,f=!1,h=void 0,t.prev=28,p=l.data[Symbol.iterator]();!(d=(m=p.next()).done);d=!0)v=m.value,this.centrales.push(v.nombre);t.next=36;break;case 32:t.prev=32,t.t1=t.catch(28),f=!0,h=t.t1;case 36:t.prev=36,t.prev=37,!d&&p.return&&p.return();case 39:if(t.prev=39,!f){t.next=42;break}throw h;case 42:return t.finish(39);case 43:return t.finish(36);case 44:return t.next=46,s.a.get("api/comunidad/fill/"+JSON.stringify({municipio_id:this.selectedItem.municipio_id}));case 46:for(_=t.sent,g=!0,b=!1,y=void 0,t.prev=50,x=_.data[Symbol.iterator]();!(g=(w=x.next()).done);g=!0)k=w.value,this.comunidades.push(k.nombre);t.next=58;break;case 54:t.prev=54,t.t2=t.catch(50),b=!0,y=t.t2;case 58:t.prev=58,t.prev=59,!g&&x.return&&x.return();case 61:if(t.prev=61,!b){t.next=64;break}throw y;case 64:return t.finish(61);case 65:return t.finish(58);case 66:return t.next=68,s.a.get("api/regional/fill/"+JSON.stringify({municipio_id:this.selectedItem.municipio_id}));case 68:for(C=t.sent,E=!0,S=!1,I=void 0,t.prev=72,M=C.data[Symbol.iterator]();!(E=(T=M.next()).done);E=!0)D=T.value,this.regionales.push(D.nombre);t.next=80;break;case 76:t.prev=76,t.t3=t.catch(72),S=!0,I=t.t3;case 80:t.prev=80,t.prev=81,!E&&M.return&&M.return();case 83:if(t.prev=83,!S){t.next=86;break}throw I;case 86:return t.finish(83);case 87:return t.finish(80);case 88:case"end":return t.stop()}},t,this,[[6,10,14,22],[15,,17,21],[28,32,36,44],[37,,39,43],[50,54,58,66],[59,,61,65],[72,76,80,88],[81,,83,87]])}));return function(){return t.apply(this,arguments)}}(),verificarCarnetProductor:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/carnet_productor/fill/"+JSON.stringify({carnet:this.selectedItem.carnet}));case 2:t.sent.data.length>0?this.errorCarnetProductor="Ya existe este carnet.":this.errorCarnetProductor=null;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getCarnetProductor:function(){var t=c(i.a.mark(function t(e){var n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/carnet_productor/"+e.id);case 2:n=t.sent,this.selectedItem.duplicado=n.data.duplicado+1;case 4:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("\n "+t._s(t.formTitle)+" \n "),"duplicar"==t.mode?n("span",[t._v(t._s(t.selectedItem.duplicado))]):t._e(),t._v(" "),"renovar"==t.mode?n("span",[t._v(t._s(t.fullName(t.selectedItem.persona)))]):t._e()])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-autocomplete",{attrs:{items:t.departamentos,"item-text":"nombre","item-value":"id",label:"Departamento de producción",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido.</span>","persistent-hint":"",disabled:t.duplicar},on:{change:function(e){return t.getProvincias()}},model:{value:t.selectedItem.departamento_id,callback:function(e){t.$set(t.selectedItem,"departamento_id",e)},expression:"selectedItem.departamento_id"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.provincias,"item-text":"nombre","item-value":"id",label:"Provincia de producción",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido.</span>","persistent-hint":"",disabled:t.duplicar},on:{change:function(e){return t.getMunicipios()}},model:{value:t.selectedItem.provincia_id,callback:function(e){t.$set(t.selectedItem,"provincia_id",e)},expression:"selectedItem.provincia_id"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.municipios,"item-text":"nombre","item-value":"id",label:"Municipio de producción",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido.</span>","persistent-hint":"",disabled:t.duplicar},on:{change:function(e){return t.getDependientes()}},model:{value:t.selectedItem.municipio_id,callback:function(e){t.$set(t.selectedItem,"municipio_id",e)},expression:"selectedItem.municipio_id"}}),t._v(" "),n("v-combobox",{attrs:{items:t.federaciones,label:"Federación",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido, Puede crear un nuevo registro.</span>","persistent-hint":"",disabled:t.duplicar},model:{value:t.federacion,callback:function(e){t.federacion=e},expression:"federacion"}}),t._v(" "),n("v-combobox",{attrs:{items:t.centrales,label:"Central",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido, Puede crear un nuevo registro.</span>","persistent-hint":"",disabled:t.duplicar},model:{value:t.central,callback:function(e){t.central=e},expression:"central"}}),t._v(" "),n("v-combobox",{attrs:{items:t.comunidades,label:"Comunidad",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido, Puede crear un nuevo registro.</span>","persistent-hint":"",disabled:t.duplicar},model:{value:t.comunidad,callback:function(e){t.comunidad=e},expression:"comunidad"}}),t._v(" "),n("v-combobox",{attrs:{items:t.regionales,label:"Regional",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido, Puede crear un nuevo registro.</span>","persistent-hint":"",disabled:t.duplicar},model:{value:t.regional,callback:function(e){t.regional=e},expression:"regional"}}),t._v(" "),n("v-text-field",{attrs:{label:"Codigo de socio",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",disabled:t.duplicar},model:{value:t.selectedItem.codigo_socio,callback:function(e){t.$set(t.selectedItem,"codigo_socio",e)},expression:"selectedItem.codigo_socio"}}),t._v(" "),n("v-text-field",{attrs:{label:"Codigo",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",disabled:t.duplicar},model:{value:t.selectedItem.codigo,callback:function(e){t.$set(t.selectedItem,"codigo",e)},expression:"selectedItem.codigo"}}),t._v(" "),n("v-text-field",{attrs:{label:"Numero de carnet de productor",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.errorCarnetProductor,disabled:t.duplicar},on:{change:function(e){return t.verificarCarnetProductor()}},model:{value:t.selectedItem.carnet,callback:function(e){t.$set(t.selectedItem,"carnet",e)},expression:"selectedItem.carnet"}}),t._v(" "),n("v-text-field",{attrs:{label:"Superficie (m2.)",type:"number",step:"0.01",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t<=1e5||"Exede el limite"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",disabled:t.duplicar},model:{value:t.selectedItem.superficie,callback:function(e){t.$set(t.selectedItem,"superficie",e)},expression:"selectedItem.superficie"}}),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px",disabled:t.duplicar||t.renovar},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de emisión","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",disabled:t.duplicar||t.renovar},slot:"activator",model:{value:t.emision_date_formatted,callback:function(e){t.emision_date_formatted=e},expression:"emision_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"es-bo"},on:{input:function(e){t.menu=!1}},model:{value:t.emision_date,callback:function(e){t.emision_date=e},expression:"emision_date"}})],1)],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px",disabled:t.duplicar||t.renovar},model:{value:t.menu2,callback:function(e){t.menu2=e},expression:"menu2"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de conclusión","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",disabled:t.duplicar||t.renovar},slot:"activator",model:{value:t.conclusion_date_formatted,callback:function(e){t.conclusion_date_formatted=e},expression:"conclusion_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"es-bo"},on:{input:function(e){t.menu2=!1}},model:{value:t.conclusion_date,callback:function(e){t.conclusion_date=e},expression:"conclusion_date"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Carnet")])],1),t._v(" "),n("v-toolbar",[n("v-toolbar-title",[t._v("Carnet de productor")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:t.disableNuevoItem},on:{click:function(e){return t.nuevoItem(t.personaId,{mode:"nuevo"})}},slot:"activator"},[n("v-icon",[t._v("add_circle")])],1),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("CardForm",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-card-text",[n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.carnet)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.formatDate(e.item.fecha_emision))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.formatDate(e.item.fecha_conclusion))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[e.item.renovado?n("v-chip",{attrs:{small:"",color:"orange","text-color":"white"}},[t._v("renovado")]):n("v-chip",{attrs:{small:"",color:"green","text-color":"white"}},[t._v("vigente")])],1),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:e.item.fecha_conclusion<t.$moment().format("YYYY-MM-DD")},on:{click:function(n){return t.printItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("print")])],1),t._v(" "),n("span",[t._v("Imprimir")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:e.item.fecha_conclusion<t.$moment().format("YYYY-MM-DD")},on:{click:function(n){return t.duplicarItem(e.item,{mode:"duplicar"})}},slot:"activator"},[n("v-icon",[t._v(t._s(e.item.duplicado>9?"filter_9_plus":"filter_"+(e.item.duplicado+1)))])],1),t._v(" "),n("span",[t._v("Duplicar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:e.item.fecha_conclusion>t.$moment().format("YYYY-MM-DD")||e.item.renovado},on:{click:function(n){return t.renovarItem(e.item,{mode:"renovar"})}},slot:"activator"},[n("v-icon",[t._v("filter")])],1),t._v(" "),n("span",[t._v("Renovar")])],1),t._v(" "),t.$store.getters["auth/user"].roles.filter(function(t){return"admin"===t.name}).length>0?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1):t._e()],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.persona.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Departamento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.departamento.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Provincia: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.provincia.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("municipio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.municipio.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Federación: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.federacion.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Central: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.central.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Regional: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.regional.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Comunidad: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.comunidad.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Código de socio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.codigo_socio))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Código: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.codigo))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Superficie (m"),n("sup",[t._v("2")]),t._v(".): ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDecimal(e.item.superficie)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Numero de duplicados: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.duplicado))])])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Salir")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(3),o=n.n(a);e.default={name:"RemoveItem",props:["url","bus"],data:function(){return{path:"",dialog:!1,accion:null,seletedItem:{}}},methods:{resetVariables:function(){this.path=""},close:function(){this.resetVariables(),this.dialog=!1,this.bus.$emit("closeDialog")},save:function(){var t,e=(t=i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,o.a.put(this.path,this.seletedItem);case 3:e=t.sent,console.log(e.data),this.$toast.success("Correcto."),this.close(),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),console.log(t.t0);case 12:case"end":return t.stop()}},t,this,[[0,9]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}()},mounted:function(){var t=this;this.bus.$on("openDialogConfirm",function(e){t.path=e.url,t.seletedItem=e.item,t.accion=e.action,t.dialog=!0,console.log(e)})}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"28%"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-card-text",[n("div",{staticClass:"headline font-weight-regular"},[t._v('¿Está seguro de realizar la accion "'+t._s(t.accion)+'" en este registro?')])]),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"warning",small:""},on:{click:t.close}},[n("v-icon",{attrs:{small:""}},[t._v("check")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:""},on:{click:t.save}},[n("v-icon",{attrs:{small:""}},[t._v("close")]),t._v(" Si")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Productores")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("ConfirmItem",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("Card",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.codigo))]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.fullName(e.item))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.carnet_identidad+" "+e.item.departamento_extension.sigla)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[e.item.sustitucion_id?n("v-chip",{attrs:{small:"",color:"blue","text-color":"white"}},[t._v("Sustituido")]):t._e(),t._v(" "),e.item.cesaciones.length>0?n("v-chip",{attrs:{small:"",color:"grey","text-color":"white"}},[t._v("Cesado")]):t._e(),t._v(" "),null==e.item.sustitucion_id&&0==e.item.cesaciones.length?n("v-chip",{attrs:{small:"",color:"green","text-color":"white"}},[t._v("Vigente")]):t._e()],1),t._v(" "),n("td",{staticClass:"justify-center layout"},[null==e.item.sustitucion_id?n("v-tooltip",{attrs:{top:""}},[n("v-switch",{staticClass:"mt-2",attrs:{slot:"activator",color:"success"},on:{change:function(n){return t.activeItem(e.item)}},slot:"activator",model:{value:e.item.activo,callback:function(n){t.$set(e.item,"activo",n)},expression:"props.item.activo"}}),t._v(" "),n("span",[t._v(t._s(e.item.activo?"Activo":"Inactivo"))])],1):t._e(),t._v(" "),null==e.item.sustitucion_id?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.cardItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("credit_card")])],1),t._v(" "),n("span",[t._v("Carnet de productor")])],1):t._e(),t._v(" "),null==e.item.sustitucion_id?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item,{sustituir:!0})}},slot:"activator"},[n("v-icon",[t._v("person_add")])],1),t._v(" "),n("span",[t._v("Sustituir")])],1):t._e(),t._v(" "),null==e.item.sustitucion_id?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item,{sustituir:!1})}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1):t._e(),t._v(" "),t.$acl.check("admin")&&null==e.item.sustitucion_id&&0==e.item.cesaciones.length?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1):t._e()],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Estado civil: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.estado_civil))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Genero: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s("M"==e.item.genero?"Masculino":"Femenino"))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Telefono: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.telefono))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Email: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.email))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Domicilio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.domicilio))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.fecha_nacimiento)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Pais de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.pais_nacimiento.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Departamento de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.departamento_nacimiento_id?n("span",[t._v("\n "+t._s(e.item.departamento_nacimiento.nombre)+"\n ")]):t._e()])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Provincia de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.provincia_nacimiento_id?n("span",[t._v("\n "+t._s(e.item.provincia_nacimiento.nombre)+"\n ")]):t._e()])]),t._v(" "),e.item.sustitucion_id?n("tr",[n("th",{attrs:{colspan:"2"}},[t._v("SUSTITUCIÓN")])]):t._e(),t._v(" "),e.item.sustitucion_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Sustituido por: ")]),t._v(" "),e.item.persona?n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(t.fullName(e.item.persona))+" "),n("br"),t._v(" \n CI.: "+t._s(e.item.persona.carnet_identidad+" "+e.item.persona.departamento_extension.sigla)+" \n ")]):t._e()]):t._e(),t._v(" "),e.item.sustitucion_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Motivo de sustitución: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.sustitucion.descripcion)+" ")])]):t._e(),t._v(" "),e.item.sustitucion_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Documento de sustitución: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.adjunto_sustitucion,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)]):t._e()])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(773),n(783),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(774),f=n.n(d),h=n(777),p=n.n(h),m=n(108),v=n.n(m);function _(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,ConfirmItem:v.a,Form:f.a,Card:p.a},data:function(){return{bus:new o.a,headers:[{text:"Código",value:"codigo",align:"center"},{text:"Nombre",value:"primer_apellido",align:"center"},{text:"Carnet de identidad",value:"carnet_identidad",align:"center"},{text:"Estado",align:"center",sortable:!1},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=_(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/persona/fill/"+JSON.stringify({tipo_persona_id:2}));case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),cardItem:function(t){this.bus.$emit("openDialogCard",t)},editItem:function(t,e){this.bus.$emit("openDialog",Object.assign(t,e))},activeItem:function(t){t.activo?this.bus.$emit("openDialogConfirm",{action:"Activar",url:"api/persona/"+t.id,item:{activo:!0}}):this.bus.$emit("openDialogConfirm",{action:"Inactivar",url:"api/persona/"+t.id,item:{activo:!1}})},removeItem:function(){var t=_(i.a.mark(function t(e){var n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/guia_internacion/fill/"+JSON.stringify({persona_id:e.id}));case 2:return n=t.sent,t.next=5,c.a.get("api/hoja_ruta/fill/"+JSON.stringify({persona_id:e.id}));case 5:r=t.sent,n.data.length>0||r.data.length>0?this.$toast.info("Este productor tiene hoja de ruta o guía de internación."):this.bus.$emit("openDialogRemove","api/persona/"+e.id);case 7:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},image:function(t){return t.fotografia},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e,n){var r=n(0)(n(775),n(776),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(23),l=n.n(u),d=n(42);n.n(d);function f(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}o.a.use(l.a),e.default={components:{WebCam:d.WebCam},props:["item","bus"],data:function(){return{step:1,valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},selectedSustituir:{},pais_nacimiento:null,menu:null,errorCarnet:null,errorEmail:null,birth_date:null,birth_date_formatted:null,estadoCivil:["Soltero","Casado","Divorciado","Viudo"],generos:[{nombre:"MASCULINO",valor:"M"},{nombre:"FEMENINO",valor:"F"}],paises:[],departamentos:[],provincias:[],tiposPersona:[],departamentosProduccion:[],provinciasProduccion:[],municipiosProduccion:[],regionales:[],img:null,camera:null,deviceId:null,devices:[],frontCam:!0,report:null,googleKey:"",valFotografia:null,getCamera:!1,sustituir:!1,valArchivo:null,sustituirA:null,idOld:null,sustituciones:[],options:{url:"api/upload/file",headers:c.a.defaults.headers.common,paramName:"file",uploadMultiple:!1,acceptedFiles:{extensions:["application/pdf"],message:"Formato no permitido."},maxFilesize:{limit:5,message:"El archivo excede los 5Mb."},maxFiles:1},fileSustituir:null}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.sustituir=e.sustituir,t.dialog=!0,t.selectedIndex=e,t.sustituir?(t.sustituirA=t.fullName(e),t.idOld=e.id,t.selectedItem.tipo_persona_id=e.tipo_persona_id,t.getSustituciones()):(t.selectedItem=e,t.pais_nacimiento=e.pais_nacimiento.nombre,t.birth_date_formatted=t.$moment(e.fecha_nacimiento).format("DD/MM/YYYY"),t.img=e.fotografia,t.valFotografia="Fotografia capturada.",t.getProvincias())}),this.getPaises(),this.getDepartamentos(),this.getProvincias(),this.getTiposPersona()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":this.sustituir?"Sustituir a:":"Editar"},device:function(){var t=this;return find(this.devices,function(e){return e.deviceId==t.deviceId})}},watch:{birth_date:function(t){this.selectedItem.fecha_nacimiento=t,this.birth_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")},camera:function(t){this.deviceId=t}},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.selectedSustituir={},this.pais_nacimiento=null,this.img=null,this.step=1,this.errorCarnet=null,this.errorEmail=null,this.sustituirA=null,this.idOld=null,this.fileSustituir=null,this.valArchivo=null,this.valFotografia=null,1==this.getCamera&&this.onStop(),this.$refs.form1.reset(),this.$refs.form2.reset(),this.sustituir&&this.$refs.form3.reset(),this.sustituir=!1,this.bus.$emit("closeDialog")},save:function(){var t=f(i.a.mark(function t(){var e,n,r,a,o;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,this.selectedItem.user_id=this.$store.getters["auth/user"].id,!this.$refs.form2.validate()||0!=this.sustituir){t.next=24;break}return t.next=5,c.a.get("api/pais/fill/"+JSON.stringify({nombre:this.pais_nacimiento}));case 5:if(!((e=t.sent).data.length>0)){t.next=10;break}this.selectedItem.pais_nacimiento_id=e.data[0].id,t.next=14;break;case 10:return t.next=12,c.a.post("api/pais",{nombre:this.pais_nacimiento});case 12:n=t.sent,this.selectedItem.pais_nacimiento_id=n.data.id;case 14:if(-1==this.selectedIndex){t.next=19;break}return t.next=17,c.a.put("api/persona/"+this.selectedItem.id,this.selectedItem);case 17:t.next=22;break;case 19:return this.selectedItem.tipo_persona_id=2,t.next=22,c.a.post("api/persona",this.selectedItem);case 22:this.$toast.success("Correcto."),this.close();case 24:if(!this.$refs.form3.validate()||!this.sustituir){t.next=47;break}return t.next=27,c.a.get("api/pais/fill/"+JSON.stringify({nombre:this.pais_nacimiento}));case 27:if(!((r=t.sent).data.length>0)){t.next=32;break}this.selectedItem.pais_nacimiento_id=r.data[0].id,t.next=36;break;case 32:return t.next=34,c.a.post("api/pais",{nombre:this.pais_nacimiento});case 34:a=t.sent,this.selectedItem.pais_nacimiento_id=a.data.id;case 36:return this.selectedItem.tipo_persona_id=2,t.next=39,c.a.post("api/persona",this.selectedItem);case 39:return o=t.sent,this.selectedSustituir.persona_id=o.data.id,this.selectedSustituir.sustituido=!0,this.selectedSustituir.adjunto_sustitucion=this.fileSustituir,t.next=45,c.a.put("api/persona/"+this.idOld,this.selectedSustituir);case 45:this.$toast.success("Correcto."),this.close();case 47:t.next=52;break;case 49:t.prev=49,t.t0=t.catch(0),console.log(t.t0);case 52:case"end":return t.stop()}},t,this,[[0,49]])}));return function(){return t.apply(this,arguments)}}(),getPaises:function(){var t=f(i.a.mark(function t(){var e,n,r,a,o,s,u;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/pais");case 2:for(e=t.sent,n=!0,r=!1,a=void 0,t.prev=6,o=e.data[Symbol.iterator]();!(n=(s=o.next()).done);n=!0)u=s.value,this.paises.push(u.nombre);t.next=14;break;case 10:t.prev=10,t.t0=t.catch(6),r=!0,a=t.t0;case 14:t.prev=14,t.prev=15,!n&&o.return&&o.return();case 17:if(t.prev=17,!r){t.next=20;break}throw a;case 20:return t.finish(17);case 21:return t.finish(14);case 22:case"end":return t.stop()}},t,this,[[6,10,14,22],[15,,17,21]])}));return function(){return t.apply(this,arguments)}}(),getDepartamentos:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/departamento");case 2:e=t.sent,this.departamentos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getProvincias:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.selectedItem.departamento_nacimiento_id||(this.selectedItem.departamento_nacimiento_id=null),t.next=3,c.a.get("api/provincia/fill/"+JSON.stringify({departamento_id:this.selectedItem.departamento_nacimiento_id}));case 3:e=t.sent,this.provincias=e.data;case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),validProvincia:function(){this.selectedItem.provincia_nacimiento_id||(this.selectedItem.provincia_nacimiento_id=null)},getTiposPersona:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/tipo_persona");case 2:e=t.sent,this.tiposPersona=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),verificarCarnet:function(){var t=f(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/persona/fill/"+JSON.stringify({carnet_identidad:this.selectedItem.carnet_identidad}));case 2:t.sent.data.length>0?this.errorCarnet="Ya existe este carnet.":this.errorCarnet=null;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),verificarEmail:function(){var t=f(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/persona/fill/"+JSON.stringify({email:this.selectedItem.email}));case 2:t.sent.data.length>0?this.errorEmail="Ya existe este email.":this.errorEmail=null;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getSustituciones:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/sustitucion/fill/"+JSON.stringify({tipo_persona_id:this.selectedItem.tipo_persona_id}));case 2:e=t.sent,this.sustituciones=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),nextStep:function(){switch(this.step){case 1:this.$refs.form1.validate()&&null==this.errorCarnet&&(this.step=2,0==this.getCamera?this.getCamera=!0:this.onStart());break;case 2:this.sustituir&&(this.step=3,1==this.getCamera&&this.onStop())}},previousStep:function(){switch(this.step){case 3:this.step=2;break;case 2:this.step=1,1==this.getCamera&&this.onStop()}},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},onCapture:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.$refs.webcam.capture();case 2:return this.img=t.sent,t.next=5,c.a.post("api/upload/base64_image",{base64:this.img});case 5:e=t.sent,this.selectedItem.fotografia=e.data,this.selectedItem.biometrico=e.data,this.selectedItem.carnet_escaneado=e.data,this.valFotografia="Fotografia capturada";case 10:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),onStop:function(){this.$refs.webcam.stop()},onStart:function(){this.$refs.webcam.start()},onCameras:function(t){this.devices=t},onCameraChange:function(t){this.deviceId=t,this.camera=t},complete:function(t,e,n){this.fileSustituir=n.response,this.valArchivo="Cargado correctamente."}},filters:{percent:function(t){return t?(Math.floor(1e4*t)/100).toFixed(0)+"%":""}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))]),t._v(" "),n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.sustituirA))])],1),t._v(" "),n("v-card-text",[n("v-stepper",{attrs:{vertical:""},model:{value:t.step,callback:function(e){t.step=e},expression:"step"}},[n("v-stepper-header",[n("v-stepper-step",{attrs:{step:"1",complete:t.step>1}},[t._v("Información general")]),t._v(" "),n("v-divider"),t._v(" "),n("v-stepper-step",{attrs:{step:"2",complete:t.step>2}},[t._v("Fotografía")]),t._v(" "),t.sustituir?n("v-divider"):t._e(),t._v(" "),t.sustituir?n("v-stepper-step",{attrs:{step:"3",complete:t.step>3}},[t._v("Sustitución")]):t._e()],1),t._v(" "),n("v-stepper-items",[n("v-stepper-content",{attrs:{step:"1"}},[n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Primer apellido",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.primer_apellido,callback:function(e){t.$set(t.selectedItem,"primer_apellido",e)},expression:"selectedItem.primer_apellido"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{attrs:{label:"Segundo apellido"},model:{value:t.selectedItem.segundo_apellido,callback:function(e){t.$set(t.selectedItem,"segundo_apellido",e)},expression:"selectedItem.segundo_apellido"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-2",attrs:{label:"Carnet de identidad",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=20||"No mayor a 20 caracteres"}],"error-messages":t.errorCarnet,hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.verificarCarnet()}},model:{value:t.selectedItem.carnet_identidad,callback:function(e){t.$set(t.selectedItem,"carnet_identidad",e)},expression:"selectedItem.carnet_identidad"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.departamentos,"item-text":"sigla","item-value":"id",label:"Extension",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.departamento_extension_id,callback:function(e){t.$set(t.selectedItem,"departamento_extension_id",e)},expression:"selectedItem.departamento_extension_id"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.estadoCivil,label:"Estado civil",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.estado_civil,callback:function(e){t.$set(t.selectedItem,"estado_civil",e)},expression:"selectedItem.estado_civil"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.generos,"item-text":"nombre","item-value":"valor",label:"Genero",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.genero,callback:function(e){t.$set(t.selectedItem,"genero",e)},expression:"selectedItem.genero"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-2",attrs:{label:"Telefono/Celular"},model:{value:t.selectedItem.telefono,callback:function(e){t.$set(t.selectedItem,"telefono",e)},expression:"selectedItem.telefono"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-2",attrs:{label:"Email","error-messages":t.errorEmail},on:{change:function(e){return t.verificarEmail()}},model:{value:t.selectedItem.email,callback:function(e){t.$set(t.selectedItem,"email",e)},expression:"selectedItem.email"}})],1)],1),t._v(" "),n("v-text-field",{attrs:{label:"Domicilio",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=500||"No mayor a 500 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.domicilio,callback:function(e){t.$set(t.selectedItem,"domicilio",e)},expression:"selectedItem.domicilio"}}),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de nacimiento","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.birth_date_formatted,callback:function(e){t.birth_date_formatted=e},expression:"birth_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"ES"},on:{input:function(e){t.menu=!1}},model:{value:t.birth_date,callback:function(e){t.birth_date=e},expression:"birth_date"}})],1)],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-combobox",{staticClass:"mr-2",attrs:{items:t.paises,label:"País de nacimiento",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido, Puede crear un nuevo registro de país.</span>","persistent-hint":""},model:{value:t.pais_nacimiento,callback:function(e){t.pais_nacimiento=e},expression:"pais_nacimiento"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.departamentos,"item-text":"nombre","item-value":"id",label:"Departamento de nacimiento",clearable:""},on:{change:function(e){return t.getProvincias()}},model:{value:t.selectedItem.departamento_nacimiento_id,callback:function(e){t.$set(t.selectedItem,"departamento_nacimiento_id",e)},expression:"selectedItem.departamento_nacimiento_id"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{attrs:{items:t.provincias,"item-text":"nombre","item-value":"id",label:"Provincia de nacimiento",clearable:""},on:{change:function(e){return t.validProvincia()}},model:{value:t.selectedItem.provincia_nacimiento_id,callback:function(e){t.$set(t.selectedItem,"provincia_nacimiento_id",e)},expression:"selectedItem.provincia_nacimiento_id"}})],1)],1)],1)],1),t._v(" "),n("v-stepper-content",{attrs:{step:"2"}},[n("v-form",{ref:"form2",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs12:"",md6:""}},[t.getCamera?n("v-card",{attrs:{dark:"",color:"primary",height:"380"}},[n("v-card-title",[n("v-icon",{attrs:{large:"",left:""}},[t._v("\n camera\n ")]),t._v(" "),t.device?n("span",{staticClass:"title font-weight-light"},[t._v("\n "+t._s(t.device.label)+"\n ")]):t._e()],1),t._v(" "),n("v-card-text",{staticClass:"px-0"},[n("web-cam",{ref:"webcam",staticStyle:{margin:"-130px 0 0 0"},attrs:{width:"100%",deviceId:t.deviceId,debug:!1,googleKey:t.googleKey},on:{cameras:t.onCameras,"camera-change":t.onCameraChange}})],1)],1):t._e()],1),t._v(" "),n("v-flex",{attrs:{xs12:"",md6:""}},[n("v-card",[n("v-avatar",{attrs:{tile:"tile",size:"100%",color:"grey lighten-4"}},[n("img",{attrs:{src:t.img}})]),t._v(" "),n("v-card-title",{attrs:{"primary-title":""}},[n("v-text-field",{attrs:{rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",readonly:"",box:""},model:{value:t.valFotografia,callback:function(e){t.valFotografia=e},expression:"valFotografia"}})],1)],1)],1),t._v(" "),n("v-select",{attrs:{xs4:"",items:t.devices,label:"Seleccione camara","item-text":"label","item-value":"deviceId"},model:{value:t.camera,callback:function(e){t.camera=e},expression:"camera"}}),t._v(" "),n("v-btn",{attrs:{xs3:"",small:"",color:"primary"},on:{click:t.onCapture}},[t._v("Capturar foto "),n("v-icon",[t._v("camera")])],1)],1)],1)],1),t._v(" "),t.sustituir?n("v-stepper-content",{attrs:{step:"3"}},[n("v-form",{ref:"form3",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-3",attrs:{items:t.sustituciones,"item-text":"nombre","item-value":"id",label:"Motivo de la sustitución",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedSustituir.sustitucion_id,callback:function(e){t.$set(t.selectedSustituir,"sustitucion_id",e)},expression:"selectedSustituir.sustitucion_id"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[[n("vue-clip",{attrs:{options:t.options,"on-complete":t.complete},scopedSlots:t._u([{key:"clip-uploader-body",fn:function(e){return t._l(e.files,function(e,r){return n("div",{key:r},["success"==e.status?n("v-icon",{attrs:{color:"success"}},[t._v("check_circle")]):t._e(),t._v(" "),"success"==e.status?n("span",{staticClass:"green--text"},[t._v(" correcto.")]):t._e(),t._v(" "),"error"==e.status?n("v-icon",{attrs:{color:"error"}},[t._v("error")]):t._e(),t._v(" "),"error"==e.status?n("span",{staticClass:"red--text"},[t._v(" "+t._s(e.errorMessage))]):t._e()],1)})}}],null,!1,4294490384)},[n("template",{slot:"clip-uploader-action"},[n("div",{staticClass:"dz-message v-btn v-btn--small theme--light success"},[t._v("Subir archivo PDF")])])],2)],t._v(" "),n("v-text-field",{attrs:{readonly:"",box:"",label:"Archivo PDF",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.valArchivo,callback:function(e){t.valArchivo=e},expression:"valArchivo"}})],2)],1)],1)],1):t._e()],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),1!=t.step?n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.previousStep()}}},[t._v("Anterior")]):t._e(),t._v(" "),2!=t.step&&0==t.sustituir?n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.nextStep()}}},[t._v("Siguiente")]):t._e(),t._v(" "),1==t.sustituir&&3!=t.step?n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.nextStep()}}},[t._v("Siguiente")]):t._e(),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),2==t.step&&0==t.sustituir?n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1):t._e(),t._v(" "),3==t.step&&1==t.sustituir?n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1):t._e()],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(778),n(782),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o),c=n(779),u=n.n(c);function l(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{CardForm:u.a},props:["item","bus"],data:function(){return{dialog:!1,headers:[{text:"Carnet de productor",align:"center",sortable:!1},{text:"Fecha emisión",align:"center",sortable:!1},{text:"Fecha conclusión",align:"center",sortable:!1},{text:"Estado",align:"center",sortable:!1},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:"",disableNuevoItem:!1,personaId:null}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogCard",function(e){t.dialog=!0,t.selectedItem=e,t.personaId=e.id,t.getTable()}),this.bus.$on("closeDialogCard",function(){t.getTable()})},computed:{},watch:{},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.personaId=null,this.bus.$emit("closeDialogCard")},getTable:function(){var t=l(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s.a.get("api/carnet_productor/fill/"+JSON.stringify({persona_id:this.personaId}));case 3:e=t.sent,this.table=e.data,e.data.length>0&&(this.disableNuevoItem=!0),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(){return t.apply(this,arguments)}}(),nuevoItem:function(t,e){this.bus.$emit("openDialogCardForm",Object.assign(t,e))},editItem:function(t,e){this.bus.$emit("openDialogCardForm",Object.assign(t,e))},duplicarItem:function(t,e){this.bus.$emit("openDialogCardForm",Object.assign(t,e))},renovarItem:function(t,e){this.bus.$emit("openDialogCardForm",Object.assign(t,e))},removeItem:function(){var t=l(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/carnet_productor/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},image:function(t){return t.fotografia},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")},formatDecimal:function(t){return parseFloat(t).toFixed(2)},printItem:function(){var t=l(i.a.mark(function t(e){var n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s()({method:"GET",url:"api/carnet_productor/print/"+e.id,responseType:"arraybuffer"});case 3:n=t.sent,r=new Blob([n.data],{type:"application/pdf"}),printJS(window.URL.createObjectURL(r)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(780),n(781),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{},props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},personas:[],departamentos:[],provincias:[],municipios:[],federaciones:[],federacion:null,centrales:[],central:null,comunidades:[],comunidad:null,regionales:[],regional:null,menu:null,emision_date_formatted:null,emision_date:null,menu2:null,conclusion_date_formatted:null,conclusion_date:null,mode:null,formTitle:"Nuevo",duplicar:!1,renovar:!1,errorCarnetProductor:null,personaId:null}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogCardForm",function(e){t.dialog=!0,t.mode=e.mode,"nuevo"==t.mode&&(t.formTitle="Nuevo",t.personaId=e,t.duplicar=!1,t.renovar=!1,t.emision_date_formatted=t.$moment().format("DD/MM/YYYY"),t.conclusion_date_formatted=t.$moment().add(5,"years").format("DD/MM/YYYY"),t.selectedItem.fecha_emision=t.$moment().format("YYYY-MM-DD"),t.selectedItem.fecha_conclusion=t.$moment().add(5,"years").format("YYYY-MM-DD")),"editar"==t.mode&&(t.selectedIndex=e,t.selectedItem=e,t.getProvincias(),t.getMunicipios(),t.getDependientes(),t.federacion=e.federacion.nombre,t.central=e.central.nombre,t.regional=e.regional.nombre,t.comunidad=e.comunidad.nombre,t.formTitle="Editar",t.duplicar=!1,t.renovar=!1,t.emision_date_formatted=t.$moment(e.fecha_emision).format("DD/MM/YYYY"),t.conclusion_date_formatted=t.$moment(e.fecha_conclusion).format("DD/MM/YYYY")),"duplicar"==t.mode&&(t.selectedIndex=e,t.selectedItem=e,t.getProvincias(),t.getMunicipios(),t.getDependientes(),t.federacion=e.federacion.nombre,t.central=e.central.nombre,t.regional=e.regional.nombre,t.comunidad=e.comunidad.nombre,t.formTitle="Duplicado numero: ",t.duplicar=!0,t.renovar=!1,t.emision_date_formatted=t.$moment(e.fecha_emision).format("DD/MM/YYYY"),t.conclusion_date_formatted=t.$moment(e.fecha_conclusion).format("DD/MM/YYYY"),t.getCarnetProductor(e)),"renovar"==t.mode&&(t.selectedIndex=e,t.selectedItem=e,t.getProvincias(),t.getMunicipios(),t.getDependientes(),t.federacion=e.federacion.nombre,t.central=e.central.nombre,t.regional=e.regional.nombre,t.comunidad=e.comunidad.nombre,t.formTitle="Renovar carnet de: ",t.duplicar=!1,t.renovar=!0,t.selectedItem.fecha_emision=t.$moment().format("YYYY-MM-DD"),t.emision_date_formatted=t.$moment(t.selectedItem.fecha_emision).format("DD/MM/YYYY"),t.selectedItem.fecha_conclusion=t.$moment().add(5,"years").format("YYYY-MM-DD"),t.conclusion_date_formatted=t.$moment(t.selectedItem.fecha_conclusion).format("DD/MM/YYYY"),t.selectedItem.duplicado=0)}),this.getPersonas(),this.getDepartamentos()},computed:{},watch:{emision_date:function(t){this.selectedItem.fecha_emision=t,this.emision_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")},conclusion_date:function(t){this.selectedItem.fecha_conclusion=t,this.conclusion_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.federacion=null,this.central=null,this.regional=null,this.comunidad=null,this.$refs.form.reset(),this.bus.$emit("closeDialogCard"),this.mode=null,this.formTitle="Nuevo",this.duplicar=null,this.personaId=null},save:function(){var t=c(i.a.mark(function t(){var e,n,r,a,o,c,u,l;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,this.selectedItem.user_id=this.$store.getters["auth/user"].id,!this.$refs.form.validate()){t.next=66;break}return t.next=5,s.a.get("api/federacion/fill/"+JSON.stringify({nombre:this.federacion}));case 5:if(!((e=t.sent).data.length>0)){t.next=10;break}this.selectedItem.federacion_id=e.data[0].id,t.next=14;break;case 10:return t.next=12,s.a.post("api/federacion",{municipio_id:this.selectedItem.municipio_id,nombre:this.federacion});case 12:n=t.sent,this.selectedItem.federacion_id=n.data.id;case 14:return t.next=16,s.a.get("api/central/fill/"+JSON.stringify({nombre:this.central}));case 16:if(!((r=t.sent).data.length>0)){t.next=21;break}this.selectedItem.central_id=r.data[0].id,t.next=25;break;case 21:return t.next=23,s.a.post("api/central",{municipio_id:this.selectedItem.municipio_id,nombre:this.central});case 23:a=t.sent,this.selectedItem.central_id=a.data.id;case 25:return t.next=27,s.a.get("api/comunidad/fill/"+JSON.stringify({nombre:this.comunidad}));case 27:if(!((o=t.sent).data.length>0)){t.next=32;break}this.selectedItem.comunidad_id=o.data[0].id,t.next=36;break;case 32:return t.next=34,s.a.post("api/comunidad",{municipio_id:this.selectedItem.municipio_id,nombre:this.comunidad});case 34:c=t.sent,this.selectedItem.comunidad_id=c.data.id;case 36:return t.next=38,s.a.get("api/regional/fill/"+JSON.stringify({nombre:this.regional}));case 38:if(!((u=t.sent).data.length>0)){t.next=43;break}this.selectedItem.regional_id=u.data[0].id,t.next=47;break;case 43:return t.next=45,s.a.post("api/regional",{municipio_id:this.selectedItem.municipio_id,nombre:this.regional});case 45:l=t.sent,this.selectedItem.regional_id=l.data.id;case 47:if(-1==this.selectedIndex){t.next=61;break}if("editar"!=this.mode){t.next=51;break}return t.next=51,s.a.put("api/carnet_productor/"+this.selectedItem.id,this.selectedItem);case 51:if("duplicar"!=this.mode){t.next=54;break}return t.next=54,s.a.put("api/carnet_productor/"+this.selectedItem.id,{duplicado:this.selectedItem.duplicado});case 54:if("renovar"!=this.mode){t.next=59;break}return t.next=57,s.a.put("api/carnet_productor/"+this.selectedItem.id,{renovado:!0});case 57:return t.next=59,s.a.post("api/carnet_productor",this.selectedItem);case 59:t.next=64;break;case 61:return this.selectedItem.persona_id=this.personaId,t.next=64,s.a.post("api/carnet_productor",this.selectedItem);case 64:this.$toast.success("Correcto."),this.close();case 66:t.next=71;break;case 68:t.prev=68,t.t0=t.catch(0),console.log(t.t0);case 71:case"end":return t.stop()}},t,this,[[0,68]])}));return function(){return t.apply(this,arguments)}}(),getPersonas:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/persona/fill/"+JSON.stringify({tipo_persona_id:1}));case 2:e=t.sent,this.personas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getDepartamentos:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/departamento");case 2:e=t.sent,this.departamentos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getProvincias:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/provincia/fill/"+JSON.stringify({departamento_id:this.selectedItem.departamento_id}));case 2:e=t.sent,this.provincias=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getMunicipios:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/municipio/fill/"+JSON.stringify({provincia_id:this.selectedItem.provincia_id}));case 2:e=t.sent,this.municipios=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getDependientes:function(){var t=c(i.a.mark(function t(){var e,n,r,a,o,c,u,l,d,f,h,p,m,v,_,g,b,y,x,w,k,C,E,S,I,M,T,D;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/federacion/fill/"+JSON.stringify({municipio_id:this.selectedItem.municipio_id}));case 2:for(e=t.sent,n=!0,r=!1,a=void 0,t.prev=6,o=e.data[Symbol.iterator]();!(n=(c=o.next()).done);n=!0)u=c.value,this.federaciones.push(u.nombre);t.next=14;break;case 10:t.prev=10,t.t0=t.catch(6),r=!0,a=t.t0;case 14:t.prev=14,t.prev=15,!n&&o.return&&o.return();case 17:if(t.prev=17,!r){t.next=20;break}throw a;case 20:return t.finish(17);case 21:return t.finish(14);case 22:return t.next=24,s.a.get("api/central/fill/"+JSON.stringify({municipio_id:this.selectedItem.municipio_id}));case 24:for(l=t.sent,d=!0,f=!1,h=void 0,t.prev=28,p=l.data[Symbol.iterator]();!(d=(m=p.next()).done);d=!0)v=m.value,this.centrales.push(v.nombre);t.next=36;break;case 32:t.prev=32,t.t1=t.catch(28),f=!0,h=t.t1;case 36:t.prev=36,t.prev=37,!d&&p.return&&p.return();case 39:if(t.prev=39,!f){t.next=42;break}throw h;case 42:return t.finish(39);case 43:return t.finish(36);case 44:return t.next=46,s.a.get("api/comunidad/fill/"+JSON.stringify({municipio_id:this.selectedItem.municipio_id}));case 46:for(_=t.sent,g=!0,b=!1,y=void 0,t.prev=50,x=_.data[Symbol.iterator]();!(g=(w=x.next()).done);g=!0)k=w.value,this.comunidades.push(k.nombre);t.next=58;break;case 54:t.prev=54,t.t2=t.catch(50),b=!0,y=t.t2;case 58:t.prev=58,t.prev=59,!g&&x.return&&x.return();case 61:if(t.prev=61,!b){t.next=64;break}throw y;case 64:return t.finish(61);case 65:return t.finish(58);case 66:return t.next=68,s.a.get("api/regional/fill/"+JSON.stringify({municipio_id:this.selectedItem.municipio_id}));case 68:for(C=t.sent,E=!0,S=!1,I=void 0,t.prev=72,M=C.data[Symbol.iterator]();!(E=(T=M.next()).done);E=!0)D=T.value,this.regionales.push(D.nombre);t.next=80;break;case 76:t.prev=76,t.t3=t.catch(72),S=!0,I=t.t3;case 80:t.prev=80,t.prev=81,!E&&M.return&&M.return();case 83:if(t.prev=83,!S){t.next=86;break}throw I;case 86:return t.finish(83);case 87:return t.finish(80);case 88:case"end":return t.stop()}},t,this,[[6,10,14,22],[15,,17,21],[28,32,36,44],[37,,39,43],[50,54,58,66],[59,,61,65],[72,76,80,88],[81,,83,87]])}));return function(){return t.apply(this,arguments)}}(),verificarCarnetProductor:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/carnet_productor/fill/"+JSON.stringify({carnet:this.selectedItem.carnet}));case 2:t.sent.data.length>0?this.errorCarnetProductor="Ya existe este carnet.":this.errorCarnetProductor=null;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getCarnetProductor:function(){var t=c(i.a.mark(function t(e){var n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/carnet_productor/"+e.id);case 2:n=t.sent,this.selectedItem.duplicado=n.data.duplicado+1;case 4:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("\n "+t._s(t.formTitle)+" \n "),"duplicar"==t.mode?n("span",[t._v(t._s(t.selectedItem.duplicado))]):t._e(),t._v(" "),"renovar"==t.mode?n("span",[t._v(t._s(t.fullName(t.selectedItem.persona)))]):t._e()])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-autocomplete",{attrs:{items:t.departamentos,"item-text":"nombre","item-value":"id",label:"Departamento de producción",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido.</span>","persistent-hint":"",disabled:t.duplicar},on:{change:function(e){return t.getProvincias()}},model:{value:t.selectedItem.departamento_id,callback:function(e){t.$set(t.selectedItem,"departamento_id",e)},expression:"selectedItem.departamento_id"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.provincias,"item-text":"nombre","item-value":"id",label:"Provincia de producción",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido.</span>","persistent-hint":"",disabled:t.duplicar},on:{change:function(e){return t.getMunicipios()}},model:{value:t.selectedItem.provincia_id,callback:function(e){t.$set(t.selectedItem,"provincia_id",e)},expression:"selectedItem.provincia_id"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.municipios,"item-text":"nombre","item-value":"id",label:"Municipio de producción",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido.</span>","persistent-hint":"",disabled:t.duplicar},on:{change:function(e){return t.getDependientes()}},model:{value:t.selectedItem.municipio_id,callback:function(e){t.$set(t.selectedItem,"municipio_id",e)},expression:"selectedItem.municipio_id"}}),t._v(" "),n("v-combobox",{attrs:{items:t.federaciones,label:"Federación",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido, Puede crear un nuevo registro.</span>","persistent-hint":"",disabled:t.duplicar},model:{value:t.federacion,callback:function(e){t.federacion=e},expression:"federacion"}}),t._v(" "),n("v-combobox",{attrs:{items:t.centrales,label:"Central",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido, Puede crear un nuevo registro.</span>","persistent-hint":"",disabled:t.duplicar},model:{value:t.central,callback:function(e){t.central=e},expression:"central"}}),t._v(" "),n("v-combobox",{attrs:{items:t.comunidades,label:"Comunidad",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido, Puede crear un nuevo registro.</span>","persistent-hint":"",disabled:t.duplicar},model:{value:t.comunidad,callback:function(e){t.comunidad=e},expression:"comunidad"}}),t._v(" "),n("v-combobox",{attrs:{items:t.regionales,label:"Regional",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido, Puede crear un nuevo registro.</span>","persistent-hint":"",disabled:t.duplicar},model:{value:t.regional,callback:function(e){t.regional=e},expression:"regional"}}),t._v(" "),n("v-text-field",{attrs:{label:"Codigo de socio",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",disabled:t.duplicar},model:{value:t.selectedItem.codigo_socio,callback:function(e){t.$set(t.selectedItem,"codigo_socio",e)},expression:"selectedItem.codigo_socio"}}),t._v(" "),n("v-text-field",{attrs:{label:"Codigo",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",disabled:t.duplicar},model:{value:t.selectedItem.codigo,callback:function(e){t.$set(t.selectedItem,"codigo",e)},expression:"selectedItem.codigo"}}),t._v(" "),n("v-text-field",{attrs:{label:"Numero de carnet de productor",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.errorCarnetProductor,disabled:t.duplicar},on:{change:function(e){return t.verificarCarnetProductor()}},model:{value:t.selectedItem.carnet,callback:function(e){t.$set(t.selectedItem,"carnet",e)},expression:"selectedItem.carnet"}}),t._v(" "),n("v-text-field",{attrs:{label:"Superficie (m2.)",type:"number",step:"0.01",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t<=1e5||"Exede el limite"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",disabled:t.duplicar},model:{value:t.selectedItem.superficie,callback:function(e){t.$set(t.selectedItem,"superficie",e)},expression:"selectedItem.superficie"}}),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px",disabled:t.duplicar||t.renovar},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de emisión","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",disabled:t.duplicar||t.renovar},slot:"activator",model:{value:t.emision_date_formatted,callback:function(e){t.emision_date_formatted=e},expression:"emision_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"es-bo"},on:{input:function(e){t.menu=!1}},model:{value:t.emision_date,callback:function(e){t.emision_date=e},expression:"emision_date"}})],1)],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px",disabled:t.duplicar||t.renovar},model:{value:t.menu2,callback:function(e){t.menu2=e},expression:"menu2"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de conclusión","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",disabled:t.duplicar||t.renovar},slot:"activator",model:{value:t.conclusion_date_formatted,callback:function(e){t.conclusion_date_formatted=e},expression:"conclusion_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"es-bo"},on:{input:function(e){t.menu2=!1}},model:{value:t.conclusion_date,callback:function(e){t.conclusion_date=e},expression:"conclusion_date"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Carnet")])],1),t._v(" "),n("v-toolbar",[n("v-toolbar-title",[t._v("Carnet de productor")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:t.disableNuevoItem},on:{click:function(e){return t.nuevoItem(t.personaId,{mode:"nuevo"})}},slot:"activator"},[n("v-icon",[t._v("add_circle")])],1),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("CardForm",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-card-text",[n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.carnet)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.formatDate(e.item.fecha_emision))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.formatDate(e.item.fecha_conclusion))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[e.item.renovado?n("v-chip",{attrs:{small:"",color:"orange","text-color":"white"}},[t._v("renovado")]):n("v-chip",{attrs:{small:"",color:"green","text-color":"white"}},[t._v("vigente")])],1),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:e.item.fecha_conclusion<t.$moment().format("YYYY-MM-DD")},on:{click:function(n){return t.printItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("print")])],1),t._v(" "),n("span",[t._v("Imprimir")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:e.item.fecha_conclusion<t.$moment().format("YYYY-MM-DD")},on:{click:function(n){return t.duplicarItem(e.item,{mode:"duplicar"})}},slot:"activator"},[n("v-icon",[t._v(t._s(e.item.duplicado>9?"filter_9_plus":"filter_"+(e.item.duplicado+1)))])],1),t._v(" "),n("span",[t._v("Duplicar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:e.item.fecha_conclusion>t.$moment().format("YYYY-MM-DD")||e.item.renovado},on:{click:function(n){return t.renovarItem(e.item,{mode:"renovar"})}},slot:"activator"},[n("v-icon",[t._v("filter")])],1),t._v(" "),n("span",[t._v("Renovar")])],1),t._v(" "),t.$store.getters["auth/user"].roles.filter(function(t){return"admin"===t.name}).length>0?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1):t._e()],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.persona.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Departamento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.departamento.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Provincia: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.provincia.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("municipio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.municipio.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Federación: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.federacion.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Central: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.central.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Regional: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.regional.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Comunidad: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.comunidad.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Código de socio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.codigo_socio))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Código: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.codigo))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Superficie (m"),n("sup",[t._v("2")]),t._v(".): ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDecimal(e.item.superficie)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Numero de duplicados: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.duplicado))])])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Salir")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Productores al detalle")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}}),t._v(" "),n("ConfirmItem",{attrs:{bus:t.bus}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("Card",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.codigo))]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.fullName(e.item))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.carnet_identidad+" "+e.item.departamento_extension.sigla)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[e.item.sustitucion_id?n("v-chip",{attrs:{small:"",color:"blue","text-color":"white"}},[t._v("Sustituido")]):t._e(),t._v(" "),e.item.cesaciones.length>0?n("v-chip",{attrs:{small:"",color:"grey","text-color":"white"}},[t._v("Cesado")]):t._e(),t._v(" "),null==e.item.sustitucion_id&&0==e.item.cesaciones.length?n("v-chip",{attrs:{small:"",color:"green","text-color":"white"}},[t._v("Vigente")]):t._e()],1),t._v(" "),n("td",{staticClass:"justify-center layout"},[null==e.item.sustitucion_id?n("v-tooltip",{attrs:{top:""}},[n("v-switch",{staticClass:"mt-2",attrs:{slot:"activator",color:"success"},on:{change:function(n){return t.activeItem(e.item)}},slot:"activator",model:{value:e.item.activo,callback:function(n){t.$set(e.item,"activo",n)},expression:"props.item.activo"}}),t._v(" "),n("span",[t._v(t._s(e.item.activo?"Activo":"Inactivo"))])],1):t._e(),t._v(" "),null==e.item.sustitucion_id&&0==e.item.cesaciones.length?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.cardItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("credit_card")])],1),t._v(" "),n("span",[t._v("Carnet de productor")])],1):t._e(),t._v(" "),null==e.item.sustitucion_id&&0==e.item.cesaciones.length?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item,{sustituir:!0})}},slot:"activator"},[n("v-icon",[t._v("person_add")])],1),t._v(" "),n("span",[t._v("Sustituir")])],1):t._e(),t._v(" "),null==e.item.sustitucion_id&&0==e.item.cesaciones.length?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item,{sustituir:!1})}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1):t._e(),t._v(" "),t.$acl.check("admin")&&null==e.item.sustitucion_id&&0==e.item.cesaciones.length?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1):t._e()],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Estado civil: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.estado_civil))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Genero: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s("M"==e.item.genero?"Masculino":"Femenino"))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Telefono: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.telefono))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Email: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.email))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Domicilio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.domicilio))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.fecha_nacimiento)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Pais de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.pais_nacimiento.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Departamento de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.departamento_nacimiento_id?n("span",[t._v("\n "+t._s(e.item.departamento_nacimiento.nombre)+"\n ")]):t._e()])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Provincia de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.provincia_nacimiento_id?n("span",[t._v("\n "+t._s(e.item.provincia_nacimiento.nombre)+"\n ")]):t._e()])]),t._v(" "),e.item.sustitucion_id?n("tr",[n("th",{attrs:{colspan:"2"}},[t._v("SUSTITUCIÓN")])]):t._e(),t._v(" "),e.item.sustitucion_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Sustituido por: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(t.fullName(e.item.persona))+" "),n("br"),t._v(" \n CI.: "+t._s(e.item.persona.carnet_identidad+" "+e.item.persona.departamento_extension.sigla)+" \n ")])]):t._e(),t._v(" "),e.item.sustitucion_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Motivo de sustitución: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.sustitucion.descripcion)+" ")])]):t._e(),t._v(" "),e.item.sustitucion_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Documento de sustitución: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.adjunto_sustitucion,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)]):t._e(),t._v(" "),e.item.cesaciones.length>0?n("tr",[n("th",{attrs:{colspan:"2"}},[t._v("CESACIÓN")])]):t._e(),t._v(" "),e.item.cesaciones.length>0?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Motivo de cesación: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.cesaciones[0].descripcion)+" ")])]):t._e(),t._v(" "),e.item.cesaciones.length>0?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Documento de cesación: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.cesaciones[0].pivot.adjunto_cesacion,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)]):t._e()])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(785),n(801),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(786),f=n.n(d),h=n(789),p=n.n(h),m=n(792),v=n.n(m),_=n(798),g=n.n(_),b=n(108),y=n.n(b);function x(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,ConfirmItem:y.a,Form:f.a,Cesar:p.a,Card:v.a,ActiveItem:g.a},data:function(){return{bus:new o.a,headers:[{text:"Código",value:"codigo",align:"center"},{text:"Nombre",value:"primer_apellido",align:"center"},{text:"Carnet de identidad",value:"carnet_identidad",align:"center"},{text:"Estado",align:"center",sortable:!1},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=x(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/persona/fill/"+JSON.stringify({tipo_persona_id:3}));case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),cardItem:function(t){this.bus.$emit("openDialogCard",t)},cesarItem:function(t){this.bus.$emit("openDialogCesar",t)},editItem:function(t,e){this.bus.$emit("openDialog",Object.assign(t,e))},reactivarItem:function(t){this.bus.$emit("openDialogActive","api/persona_cesacion/"+t.cesaciones[0].pivot.id)},activeItem:function(t){t.activo?this.bus.$emit("openDialogConfirm",{action:"Activar",url:"api/persona/"+t.id,item:{activo:!0}}):this.bus.$emit("openDialogConfirm",{action:"Inactivar",url:"api/persona/"+t.id,item:{activo:!1}})},removeItem:function(){var t=x(i.a.mark(function t(e){var n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/hoja_ruta/fill/"+JSON.stringify({persona_id:e.id}));case 2:n=t.sent,console.log(n.data),n.data.length>0?this.$toast.info("Este comercializador tiene hojas de ruta."):this.bus.$emit("openDialogRemove","api/persona/"+e.id);case 5:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},image:function(t){return t.fotografia},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e,n){var r=n(0)(n(787),n(788),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(23),l=n.n(u),d=n(42);n.n(d);function f(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}o.a.use(l.a),e.default={components:{WebCam:d.WebCam},props:["item","bus"],data:function(){return{step:1,valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},selectedSustituir:{},pais_nacimiento:null,menu:null,errorCarnet:null,errorEmail:null,birth_date:null,birth_date_formatted:null,estadoCivil:["Soltero","Casado","Divorciado","Viudo"],generos:[{nombre:"MASCULINO",valor:"M"},{nombre:"FEMENINO",valor:"F"}],paises:[],departamentos:[],provincias:[],tiposPersona:[],departamentosProduccion:[],provinciasProduccion:[],municipiosProduccion:[],regionales:[],img:null,camera:null,deviceId:null,devices:[],frontCam:!0,report:null,googleKey:"",valFotografia:null,getCamera:!1,sustituir:!1,valArchivo:null,sustituirA:null,idOld:null,sustituciones:[],options:{url:"api/upload/file",headers:c.a.defaults.headers.common,paramName:"file",uploadMultiple:!1,acceptedFiles:{extensions:["application/pdf"],message:"Formato no permitido."},maxFilesize:{limit:5,message:"El archivo excede los 5Mb."},maxFiles:1},fileSustituir:null}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.sustituir=e.sustituir,t.dialog=!0,t.selectedIndex=e,t.sustituir?(t.sustituirA=t.fullName(e),t.idOld=e.id,t.selectedItem.tipo_persona_id=e.tipo_persona_id,t.getSustituciones()):(t.selectedItem=e,t.pais_nacimiento=e.pais_nacimiento.nombre,t.birth_date_formatted=t.$moment(e.fecha_nacimiento).format("DD/MM/YYYY"),t.img=e.fotografia,t.valFotografia="Fotografia capturada.",t.getProvincias(),t.getProvinciasProduccion(),t.getMunicipiosProduccion())}),this.getPaises(),this.getDepartamentos(),this.getProvincias(),this.getTiposPersona(),this.getDepartamentosProduccion(),this.getProvinciasProduccion(),this.getMunicipiosProduccion()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":this.sustituir?"Sustituir a:":"Editar"},device:function(){var t=this;return find(this.devices,function(e){return e.deviceId==t.deviceId})}},watch:{birth_date:function(t){this.selectedItem.fecha_nacimiento=t,this.birth_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")},camera:function(t){this.deviceId=t}},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.selectedSustituir={},this.pais_nacimiento=null,this.img=null,this.step=1,this.errorCarnet=null,this.errorEmail=null,this.sustituirA=null,this.idOld=null,this.fileSustituir=null,this.valArchivo=null,this.valFotografia=null,1==this.getCamera&&this.onStop(),this.$refs.form1.reset(),this.$refs.form2.reset(),this.sustituir&&this.$refs.form3.reset(),this.sustituir=!1,this.bus.$emit("closeDialog")},save:function(){var t=f(i.a.mark(function t(){var e,n,r,a,o;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,this.selectedItem.user_id=this.$store.getters["auth/user"].id,!this.$refs.form2.validate()||0!=this.sustituir){t.next=24;break}return t.next=5,c.a.get("api/pais/fill/"+JSON.stringify({nombre:this.pais_nacimiento}));case 5:if(!((e=t.sent).data.length>0)){t.next=10;break}this.selectedItem.pais_nacimiento_id=e.data[0].id,t.next=14;break;case 10:return t.next=12,c.a.post("api/pais",{nombre:this.pais_nacimiento});case 12:n=t.sent,this.selectedItem.pais_nacimiento_id=n.data.id;case 14:if(-1==this.selectedIndex){t.next=19;break}return t.next=17,c.a.put("api/persona/"+this.selectedItem.id,this.selectedItem);case 17:t.next=22;break;case 19:return this.selectedItem.tipo_persona_id=3,t.next=22,c.a.post("api/persona",this.selectedItem);case 22:this.$toast.success("Correcto."),this.close();case 24:if(!this.$refs.form3.validate()||!this.sustituir){t.next=48;break}return t.next=27,c.a.get("api/pais/fill/"+JSON.stringify({nombre:this.pais_nacimiento}));case 27:if(!((r=t.sent).data.length>0)){t.next=32;break}this.selectedItem.pais_nacimiento_id=r.data[0].id,t.next=36;break;case 32:return t.next=34,c.a.post("api/pais",{nombre:this.pais_nacimiento});case 34:a=t.sent,this.selectedItem.pais_nacimiento_id=a.data.id;case 36:return this.selectedItem.tipo_persona_id=3,t.next=39,c.a.post("api/persona",this.selectedItem);case 39:return o=t.sent,this.selectedSustituir.persona_id=o.data.id,this.selectedSustituir.sustituido=!0,this.selectedSustituir.adjunto_sustitucion=this.fileSustituir,console.log(this.idOld),t.next=46,c.a.put("api/persona/"+this.idOld,this.selectedSustituir);case 46:this.$toast.success("Correcto."),this.close();case 48:t.next=53;break;case 50:t.prev=50,t.t0=t.catch(0),console.log(t.t0);case 53:case"end":return t.stop()}},t,this,[[0,50]])}));return function(){return t.apply(this,arguments)}}(),getPaises:function(){var t=f(i.a.mark(function t(){var e,n,r,a,o,s,u;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/pais");case 2:for(e=t.sent,n=!0,r=!1,a=void 0,t.prev=6,o=e.data[Symbol.iterator]();!(n=(s=o.next()).done);n=!0)u=s.value,this.paises.push(u.nombre);t.next=14;break;case 10:t.prev=10,t.t0=t.catch(6),r=!0,a=t.t0;case 14:t.prev=14,t.prev=15,!n&&o.return&&o.return();case 17:if(t.prev=17,!r){t.next=20;break}throw a;case 20:return t.finish(17);case 21:return t.finish(14);case 22:case"end":return t.stop()}},t,this,[[6,10,14,22],[15,,17,21]])}));return function(){return t.apply(this,arguments)}}(),getDepartamentos:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/departamento");case 2:e=t.sent,this.departamentos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getProvincias:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/provincia/fill/"+JSON.stringify({departamento_id:this.selectedItem.departamento_nacimiento_id}));case 2:e=t.sent,this.provincias=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getTiposPersona:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/tipo_persona");case 2:e=t.sent,this.tiposPersona=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),verificarCarnet:function(){var t=f(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/persona/fill/"+JSON.stringify({carnet_identidad:this.selectedItem.carnet_identidad}));case 2:t.sent.data.length>0?this.errorCarnet="Ya existe este carnet.":this.errorCarnet=null;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),verificarEmail:function(){var t=f(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/persona/fill/"+JSON.stringify({email:this.selectedItem.email}));case 2:t.sent.data.length>0?this.errorEmail="Ya existe este email.":this.errorEmail=null;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getDepartamentosProduccion:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/departamento");case 2:e=t.sent,this.departamentosProduccion=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getProvinciasProduccion:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/provincia/fill/"+JSON.stringify({departamento_id:this.selectedItem.departamento_produccion_id}));case 2:e=t.sent,this.provinciasProduccion=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getMunicipiosProduccion:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/municipio/fill/"+JSON.stringify({provincia_id:this.selectedItem.provincia_produccion_id}));case 2:e=t.sent,this.municipiosProduccion=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getSustituciones:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/sustitucion/fill/"+JSON.stringify({tipo_persona_id:this.selectedItem.tipo_persona_id}));case 2:e=t.sent,this.sustituciones=e.data,console.log(this.sustituciones);case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),nextStep:function(){switch(this.step){case 1:this.$refs.form1.validate()&&(this.step=2,0==this.getCamera?this.getCamera=!0:this.onStart());break;case 2:this.sustituir&&(this.step=3,1==this.getCamera&&this.onStop())}},previousStep:function(){switch(this.step){case 3:this.step=2;break;case 2:this.step=1,1==this.getCamera&&this.onStop()}},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},onCapture:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.$refs.webcam.capture();case 2:return this.img=t.sent,t.next=5,c.a.post("api/upload/base64_image",{base64:this.img});case 5:e=t.sent,this.selectedItem.fotografia=e.data,this.selectedItem.biometrico=e.data,this.selectedItem.carnet_escaneado=e.data,this.valFotografia="Fotografia capturada";case 10:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),onStop:function(){this.$refs.webcam.stop()},onStart:function(){this.$refs.webcam.start()},onCameras:function(t){this.devices=t},onCameraChange:function(t){this.deviceId=t,this.camera=t},complete:function(t,e,n){this.fileSustituir=n.response,this.valArchivo="Cargado correctamente."}},filters:{percent:function(t){return t?(Math.floor(1e4*t)/100).toFixed(0)+"%":""}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))]),t._v(" "),n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.sustituirA))])],1),t._v(" "),n("v-card-text",[n("v-stepper",{attrs:{vertical:""},model:{value:t.step,callback:function(e){t.step=e},expression:"step"}},[n("v-stepper-header",[n("v-stepper-step",{attrs:{step:"1",complete:t.step>1}},[t._v("Información general")]),t._v(" "),n("v-divider"),t._v(" "),n("v-stepper-step",{attrs:{step:"2",complete:t.step>2}},[t._v("Fotografía")]),t._v(" "),t.sustituir?n("v-divider"):t._e(),t._v(" "),t.sustituir?n("v-stepper-step",{attrs:{step:"3",complete:t.step>3}},[t._v("Sustitución")]):t._e()],1),t._v(" "),n("v-stepper-items",[n("v-stepper-content",{attrs:{step:"1"}},[n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Primer apellido",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.primer_apellido,callback:function(e){t.$set(t.selectedItem,"primer_apellido",e)},expression:"selectedItem.primer_apellido"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{attrs:{label:"Segundo apellido"},model:{value:t.selectedItem.segundo_apellido,callback:function(e){t.$set(t.selectedItem,"segundo_apellido",e)},expression:"selectedItem.segundo_apellido"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-2",attrs:{label:"Carnet de identidad",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=20||"No mayor a 20 caracteres"}],"error-messages":t.errorCarnet,hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.verificarCarnet()}},model:{value:t.selectedItem.carnet_identidad,callback:function(e){t.$set(t.selectedItem,"carnet_identidad",e)},expression:"selectedItem.carnet_identidad"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.departamentos,"item-text":"sigla","item-value":"id",label:"Extension",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.departamento_extension_id,callback:function(e){t.$set(t.selectedItem,"departamento_extension_id",e)},expression:"selectedItem.departamento_extension_id"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.estadoCivil,label:"Estado civil",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.estado_civil,callback:function(e){t.$set(t.selectedItem,"estado_civil",e)},expression:"selectedItem.estado_civil"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.generos,"item-text":"nombre","item-value":"valor",label:"Genero",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.genero,callback:function(e){t.$set(t.selectedItem,"genero",e)},expression:"selectedItem.genero"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-2",attrs:{label:"Telefono/Celular"},model:{value:t.selectedItem.telefono,callback:function(e){t.$set(t.selectedItem,"telefono",e)},expression:"selectedItem.telefono"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-2",attrs:{label:"Email","error-messages":t.errorEmail},on:{change:function(e){return t.verificarEmail()}},model:{value:t.selectedItem.email,callback:function(e){t.$set(t.selectedItem,"email",e)},expression:"selectedItem.email"}})],1)],1),t._v(" "),n("v-text-field",{attrs:{label:"Domicilio",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=500||"No mayor a 500 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.domicilio,callback:function(e){t.$set(t.selectedItem,"domicilio",e)},expression:"selectedItem.domicilio"}}),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de nacimiento","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.birth_date_formatted,callback:function(e){t.birth_date_formatted=e},expression:"birth_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"ES"},on:{input:function(e){t.menu=!1}},model:{value:t.birth_date,callback:function(e){t.birth_date=e},expression:"birth_date"}})],1)],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-combobox",{staticClass:"mr-2",attrs:{items:t.paises,label:"País de nacimiento",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido, Puede crear un nuevo registro de país.</span>","persistent-hint":""},model:{value:t.pais_nacimiento,callback:function(e){t.pais_nacimiento=e},expression:"pais_nacimiento"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.departamentos,"item-text":"nombre","item-value":"id",label:"Departamento de nacimiento",clearable:""},on:{change:function(e){return t.getProvincias()}},model:{value:t.selectedItem.departamento_nacimiento_id,callback:function(e){t.$set(t.selectedItem,"departamento_nacimiento_id",e)},expression:"selectedItem.departamento_nacimiento_id"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{attrs:{items:t.provincias,"item-text":"nombre","item-value":"id",label:"Provincia de nacimiento",clearable:""},model:{value:t.selectedItem.provincia_nacimiento_id,callback:function(e){t.$set(t.selectedItem,"provincia_nacimiento_id",e)},expression:"selectedItem.provincia_nacimiento_id"}})],1)],1)],1)],1),t._v(" "),n("v-stepper-content",{attrs:{step:"2"}},[n("v-form",{ref:"form2",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs12:"",md6:""}},[t.getCamera?n("v-card",{attrs:{dark:"",color:"primary",height:"380"}},[n("v-card-title",[n("v-icon",{attrs:{large:"",left:""}},[t._v("\n camera\n ")]),t._v(" "),t.device?n("span",{staticClass:"title font-weight-light"},[t._v("\n "+t._s(t.device.label)+"\n ")]):t._e()],1),t._v(" "),n("v-card-text",{staticClass:"px-0"},[n("web-cam",{ref:"webcam",staticStyle:{margin:"-130px 0 0 0"},attrs:{width:"100%",deviceId:t.deviceId,debug:!1,googleKey:t.googleKey},on:{cameras:t.onCameras,"camera-change":t.onCameraChange}})],1)],1):t._e()],1),t._v(" "),n("v-flex",{attrs:{xs12:"",md6:""}},[n("v-card",[n("v-avatar",{attrs:{tile:"tile",size:"100%",color:"grey lighten-4"}},[n("img",{attrs:{src:t.img}})]),t._v(" "),n("v-card-title",{attrs:{"primary-title":""}},[n("v-text-field",{attrs:{rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",readonly:"",box:""},model:{value:t.valFotografia,callback:function(e){t.valFotografia=e},expression:"valFotografia"}})],1)],1)],1),t._v(" "),n("v-select",{attrs:{xs4:"",items:t.devices,label:"Seleccione camara","item-text":"label","item-value":"deviceId"},model:{value:t.camera,callback:function(e){t.camera=e},expression:"camera"}}),t._v(" "),n("v-btn",{attrs:{xs3:"",small:"",color:"primary"},on:{click:t.onCapture}},[t._v("Capturar foto "),n("v-icon",[t._v("camera")])],1)],1)],1)],1),t._v(" "),t.sustituir?n("v-stepper-content",{attrs:{step:"3"}},[n("v-form",{ref:"form3",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-3",attrs:{items:t.sustituciones,"item-text":"nombre","item-value":"id",label:"Motivo de la sustitución",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedSustituir.sustitucion_id,callback:function(e){t.$set(t.selectedSustituir,"sustitucion_id",e)},expression:"selectedSustituir.sustitucion_id"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[[n("vue-clip",{attrs:{options:t.options,"on-complete":t.complete},scopedSlots:t._u([{key:"clip-uploader-body",fn:function(e){return t._l(e.files,function(e,r){return n("div",{key:r},["success"==e.status?n("v-icon",{attrs:{color:"success"}},[t._v("check_circle")]):t._e(),t._v(" "),"success"==e.status?n("span",{staticClass:"green--text"},[t._v(" correcto.")]):t._e(),t._v(" "),"error"==e.status?n("v-icon",{attrs:{color:"error"}},[t._v("error")]):t._e(),t._v(" "),"error"==e.status?n("span",{staticClass:"red--text"},[t._v(" "+t._s(e.errorMessage))]):t._e()],1)})}}],null,!1,4294490384)},[n("template",{slot:"clip-uploader-action"},[n("div",{staticClass:"dz-message v-btn v-btn--small theme--light success"},[t._v("Subir archivo PDF")])])],2)],t._v(" "),n("v-text-field",{attrs:{readonly:"",box:"",label:"Archivo PDF",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.valArchivo,callback:function(e){t.valArchivo=e},expression:"valArchivo"}})],2)],1)],1)],1):t._e()],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),1!=t.step?n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.previousStep()}}},[t._v("Anterior")]):t._e(),t._v(" "),2!=t.step&&0==t.sustituir?n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.nextStep()}}},[t._v("Siguiente")]):t._e(),t._v(" "),1==t.sustituir&&3!=t.step?n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.nextStep()}}},[t._v("Siguiente")]):t._e(),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),2==t.step&&0==t.sustituir?n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1):t._e(),t._v(" "),3==t.step&&1==t.sustituir?n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1):t._e()],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(790),n(791),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(23),l=n.n(u);function d(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}o.a.use(l.a),e.default={components:{},props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},cesaciones:[],options:{url:"api/upload/file",headers:c.a.defaults.headers.common,paramName:"file",uploadMultiple:!1,acceptedFiles:{extensions:["application/pdf"],message:"Formato no permitido."},maxFilesize:{limit:5,message:"El archivo exede los 5Mb."},maxFiles:1},fileCesar:null,valArchivo:null}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogCesar",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e,t.getCesaciones()})},computed:{},watch:{},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.fileCesar=null,this.valArchivo=null,this.bus.$emit("closeDialog")},save:function(){var t=d(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,this.selectedItem.user_id=this.$store.getters["auth/user"].id,!this.$refs.form.validate()){t.next=11;break}return this.selectedItem.adjunto_cesacion=this.fileCesar,this.selectedItem.persona_id=this.selectedItem.id,t.next=7,c.a.post("api/persona_cesacion",this.selectedItem);case 7:e=t.sent,console.log(e.data),this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}));return function(){return t.apply(this,arguments)}}(),getCesaciones:function(){var t=d(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/cesacion/fill/"+JSON.stringify({tipo_persona_id:this.selectedItem.tipo_persona_id}));case 2:e=t.sent,this.cesaciones=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},complete:function(t,e,n){this.fileCesar=n.response,this.valArchivo="Cargado correctamente."}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Cesación temporal")])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-3",attrs:{items:t.cesaciones,"item-text":"nombre","item-value":"id",label:"Motivo de la cesación",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.cesacion_id,callback:function(e){t.$set(t.selectedItem,"cesacion_id",e)},expression:"selectedItem.cesacion_id"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[[n("vue-clip",{attrs:{options:t.options,"on-complete":t.complete},scopedSlots:t._u([{key:"clip-uploader-body",fn:function(e){return t._l(e.files,function(e,r){return n("div",{key:r},["success"==e.status?n("v-icon",{attrs:{color:"success"}},[t._v("check_circle")]):t._e(),t._v(" "),"success"==e.status?n("span",{staticClass:"green--text"},[t._v(" correcto.")]):t._e(),t._v(" "),"error"==e.status?n("v-icon",{attrs:{color:"error"}},[t._v("error")]):t._e(),t._v(" "),"error"==e.status?n("span",{staticClass:"red--text"},[t._v(" "+t._s(e.errorMessage))]):t._e()],1)})}}])},[n("template",{slot:"clip-uploader-action"},[n("div",{staticClass:"dz-message v-btn v-btn--small theme--light success"},[t._v("Subir archivo PDF")])])],2)],t._v(" "),n("v-text-field",{attrs:{readonly:"",box:"",label:"Archivo PDF",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.valArchivo,callback:function(e){t.valArchivo=e},expression:"valArchivo"}})],2)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(793),n(797),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o),c=n(794),u=n.n(c),l=n(6),d=n.n(l);function f(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:d.a,CardForm:u.a},props:["item","bus"],data:function(){return{dialog:!1,headers:[{text:"Carnet de productor",align:"center",sortable:!1},{text:"Fecha emisión",align:"center",sortable:!1},{text:"Fecha conclusión",align:"center",sortable:!1},{text:"Estado",align:"center",sortable:!1},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:"",disableNuevoItem:!1,personaId:[]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogCard",function(e){t.dialog=!0,t.selectedItem=e,t.personaId=e,t.getTable()}),this.bus.$on("closeDialogCard",function(){t.getTable()})},computed:{},watch:{},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.personaId=[],this.bus.$emit("closeDialogCard")},getTable:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s.a.get("api/carnet_comercializador/fill/"+JSON.stringify({persona_id:this.personaId.id}));case 3:e=t.sent,this.table=e.data,console.log("res",e.data),e.data.length>0&&(this.disableNuevoItem=!0),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),console.log(t.t0);case 12:case"end":return t.stop()}},t,this,[[0,9]])}));return function(){return t.apply(this,arguments)}}(),nuevoItem:function(t,e){this.bus.$emit("openDialogCardForm",Object.assign(t,e))},editItem:function(t,e){this.bus.$emit("openDialogCardForm",Object.assign(t,e))},duplicarItem:function(t,e){this.bus.$emit("openDialogCardForm",Object.assign(t,e))},renovarItem:function(t,e){this.bus.$emit("openDialogCardForm",Object.assign(t,e))},removeItem:function(){var t=f(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/carnet_comercializador/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},image:function(t){return t.fotografia},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")},formatDecimal:function(t){return parseFloat(t).toFixed(2)},printItem:function(){var t=f(i.a.mark(function t(e){var n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s()({method:"GET",url:"api/carnet_comercializador/print/"+e.id,responseType:"arraybuffer"});case 3:n=t.sent,r=new Blob([n.data],{type:"application/pdf"}),printJS(window.URL.createObjectURL(r)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(795),n(796),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{},props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},menu:null,emision_date_formatted:null,emision_date:null,menu2:null,conclusion_date_formatted:null,conclusion_date:null,mode:null,formTitle:"Nuevo",duplicar:!1,renovar:!1,errorCarnetComercializador:null,personaId:null,persona:[]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogCardForm",function(e){t.dialog=!0,t.mode=e.mode,"nuevo"==t.mode&&(t.formTitle="Nuevo",t.personaId=e.id,t.duplicar=!1,t.renovar=!1,t.emision_date_formatted=t.$moment().format("DD/MM/YYYY"),t.conclusion_date_formatted=t.$moment().add(5,"years").format("DD/MM/YYYY"),t.selectedItem.fecha_emision=t.$moment().format("YYYY-MM-DD"),t.selectedItem.fecha_conclusion=t.$moment().add(5,"years").format("YYYY-MM-DD"),t.selectedItem.carnet=e.carnet_identidad),"editar"==t.mode&&(t.selectedIndex=e,t.selectedItem=e,t.formTitle="Editar",t.duplicar=!1,t.renovar=!1,t.emision_date_formatted=t.$moment(e.fecha_emision).format("DD/MM/YYYY"),t.conclusion_date_formatted=t.$moment(e.fecha_conclusion).format("DD/MM/YYYY")),"duplicar"==t.mode&&(t.selectedIndex=e,t.selectedItem=e,t.formTitle="Duplicado numero: ",t.duplicar=!0,t.renovar=!1,t.emision_date_formatted=t.$moment(e.fecha_emision).format("DD/MM/YYYY"),t.conclusion_date_formatted=t.$moment(e.fecha_conclusion).format("DD/MM/YYYY"),t.getCarnetComercializador(e)),"renovar"==t.mode&&(t.selectedIndex=e,t.selectedItem=e,t.formTitle="Renovar carnet de: ",t.duplicar=!1,t.renovar=!0,t.selectedItem.fecha_emision=t.$moment().format("YYYY-MM-DD"),t.emision_date_formatted=t.$moment(t.selectedItem.fecha_emision).format("DD/MM/YYYY"),t.selectedItem.fecha_conclusion=t.$moment().add(5,"years").format("YYYY-MM-DD"),t.conclusion_date_formatted=t.$moment(t.selectedItem.fecha_conclusion).format("DD/MM/YYYY"),t.selectedItem.duplicado=0)})},computed:{},watch:{emision_date:function(t){this.selectedItem.fecha_emision=t,this.emision_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")},conclusion_date:function(t){this.selectedItem.fecha_conclusion=t,this.conclusion_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.federacion=null,this.central=null,this.regional=null,this.comunidad=null,this.$refs.form.reset(),this.bus.$emit("closeDialogCard"),this.mode=null,this.formTitle="Nuevo",this.duplicar=null,this.personaId=null},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,this.selectedItem.user_id=this.$store.getters["auth/user"].id,!this.$refs.form.validate()){t.next=22;break}if(-1==this.selectedIndex){t.next=17;break}if("editar"!=this.mode){t.next=7;break}return t.next=7,s.a.put("api/carnet_comercializador/"+this.selectedItem.id,this.selectedItem);case 7:if("duplicar"!=this.mode){t.next=10;break}return t.next=10,s.a.put("api/carnet_comercializador/"+this.selectedItem.id,{duplicado:this.selectedItem.duplicado});case 10:if("renovar"!=this.mode){t.next=15;break}return t.next=13,s.a.put("api/carnet_comercializador/"+this.selectedItem.id,{renovado:!0});case 13:return t.next=15,s.a.post("api/carnet_comercializador",this.selectedItem);case 15:t.next=20;break;case 17:return this.selectedItem.persona_id=this.personaId,t.next=20,s.a.post("api/carnet_comercializador",this.selectedItem);case 20:this.$toast.success("Correcto."),this.close();case 22:t.next=27;break;case 24:t.prev=24,t.t0=t.catch(0),console.log(t.t0);case 27:case"end":return t.stop()}},t,this,[[0,24]])}));return function(){return t.apply(this,arguments)}}(),verificarCarnetComercializador:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/carnet_comercializador/fill/"+JSON.stringify({carnet:this.selectedItem.carnet}));case 2:t.sent.data.length>0?this.errorCarnetComercializador="Ya existe este carnet.":this.errorCarnetComercializador=null;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getCarnetComercializador:function(){var t=c(i.a.mark(function t(e){var n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/carnet_comercializador/"+e.id);case 2:n=t.sent,this.selectedItem.duplicado=n.data.duplicado+1;case 4:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("\n "+t._s(t.formTitle)+" \n "),"duplicar"==t.mode?n("span",[t._v(t._s(t.selectedItem.duplicado))]):t._e(),t._v(" "),"renovar"==t.mode?n("span",[t._v(t._s(t.fullName(t.selectedItem.persona)))]):t._e()])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-text-field",{attrs:{label:"Numero de carnet de comercializador",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.errorCarnetComercializador,disabled:t.duplicar},on:{change:function(e){return t.verificarCarnetComercializador()}},model:{value:t.selectedItem.carnet,callback:function(e){t.$set(t.selectedItem,"carnet",e)},expression:"selectedItem.carnet"}}),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px",disabled:t.duplicar||t.renovar},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de emisión","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",disabled:t.duplicar||t.renovar},slot:"activator",model:{value:t.emision_date_formatted,callback:function(e){t.emision_date_formatted=e},expression:"emision_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"es-bo"},on:{input:function(e){t.menu=!1}},model:{value:t.emision_date,callback:function(e){t.emision_date=e},expression:"emision_date"}})],1)],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px",disabled:t.duplicar||t.renovar},model:{value:t.menu2,callback:function(e){t.menu2=e},expression:"menu2"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de conclusión","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",disabled:t.duplicar||t.renovar},slot:"activator",model:{value:t.conclusion_date_formatted,callback:function(e){t.conclusion_date_formatted=e},expression:"conclusion_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"es-bo"},on:{input:function(e){t.menu2=!1}},model:{value:t.conclusion_date,callback:function(e){t.conclusion_date=e},expression:"conclusion_date"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Carnet")])],1),t._v(" "),n("v-toolbar",[n("v-toolbar-title",[t._v("Carnet de comercializador")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:t.disableNuevoItem},on:{click:function(e){return t.nuevoItem(t.personaId,{mode:"nuevo"})}},slot:"activator"},[n("v-icon",[t._v("add_circle")])],1),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("CardForm",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-card-text",[n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.carnet)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.formatDate(e.item.fecha_emision))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.formatDate(e.item.fecha_conclusion))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[e.item.renovado?n("v-chip",{attrs:{small:"",color:"orange","text-color":"white"}},[t._v("renovado")]):n("v-chip",{attrs:{small:"",color:"green","text-color":"white"}},[t._v("vigente")])],1),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:e.item.fecha_conclusion<t.$moment().format("YYYY-MM-DD")},on:{click:function(n){return t.printItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("print")])],1),t._v(" "),n("span",[t._v("Imprimir")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:e.item.fecha_conclusion<t.$moment().format("YYYY-MM-DD")},on:{click:function(n){return t.duplicarItem(e.item,{mode:"duplicar"})}},slot:"activator"},[n("v-icon",[t._v(t._s(e.item.duplicado>9?"filter_9_plus":"filter_"+(e.item.duplicado+1)))])],1),t._v(" "),n("span",[t._v("Duplicar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:e.item.fecha_conclusion>t.$moment().format("YYYY-MM-DD")||e.item.renovado},on:{click:function(n){return t.renovarItem(e.item,{mode:"renovar"})}},slot:"activator"},[n("v-icon",[t._v("filter")])],1),t._v(" "),n("span",[t._v("Renovar")])],1),t._v(" "),t.$store.getters["auth/user"].roles.filter(function(t){return"admin"===t.name}).length>0?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1):t._e()],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.persona.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Numero de duplicados: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.duplicado))])])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Salir")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(799),n(800),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(3),o=n.n(a);e.default={name:"RemoveItem",props:["url","bus"],data:function(){return{path:"",dialog:!1}},methods:{resetVariables:function(){this.path=""},close:function(){this.resetVariables(),this.dialog=!1,this.bus.$emit("closeDialog")},save:function(){var t,e=(t=i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,o.a.put(this.path,{activo:!1});case 3:e=t.sent,console.log(e.data),this.$toast.success("Correcto."),this.close(),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),console.log(t.t0);case 12:case"end":return t.stop()}},t,this,[[0,9]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}()},mounted:function(){var t=this;this.bus.$on("openDialogActive",function(e){t.path=e,t.dialog=!0})}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"28%"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-card-text",[n("div",{staticClass:"headline font-weight-regular"},[t._v("¿Está seguro que quitar la cesación de este registro?")])]),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"warning",small:""},on:{click:t.close}},[n("v-icon",{attrs:{small:""}},[t._v("check")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:""},on:{click:t.save}},[n("v-icon",{attrs:{small:""}},[t._v("close")]),t._v(" Si")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Comercializadores al detalle")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Card",{attrs:{bus:t.bus}}),t._v(" "),n("Cesar",{attrs:{bus:t.bus}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}}),t._v(" "),n("ActiveItem",{attrs:{bus:t.bus}}),t._v(" "),n("ConfirmItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.codigo))]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.fullName(e.item))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.carnet_identidad+" "+e.item.departamento_extension.sigla)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[e.item.sustitucion_id?n("v-chip",{attrs:{small:"",color:"blue","text-color":"white"}},[t._v("Sustituido")]):t._e(),t._v(" "),e.item.cesaciones.length>0?n("v-chip",{attrs:{small:"",color:"grey","text-color":"white"}},[t._v("Cesado")]):t._e(),t._v(" "),null==e.item.sustitucion_id&&0==e.item.cesaciones.length?n("v-chip",{attrs:{small:"",color:"green","text-color":"white"}},[t._v("Vigente")]):t._e()],1),t._v(" "),n("td",{staticClass:"justify-center layout"},[null==e.item.sustitucion_id?n("v-tooltip",{attrs:{top:""}},[n("v-switch",{staticClass:"mt-2",attrs:{slot:"activator",color:"success"},on:{change:function(n){return t.activeItem(e.item)}},slot:"activator",model:{value:e.item.activo,callback:function(n){t.$set(e.item,"activo",n)},expression:"props.item.activo"}}),t._v(" "),n("span",[t._v(t._s(e.item.activo?"Activo":"Inactivo"))])],1):t._e(),t._v(" "),null==e.item.sustitucion_id&&0==e.item.cesaciones.length?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.cardItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("credit_card")])],1),t._v(" "),n("span",[t._v("Carnet de productor")])],1):t._e(),t._v(" "),4==e.item.tipo_persona_id&&null==e.item.sustitucion_id&&0==e.item.cesaciones.length?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.cesarItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("cancel")])],1),t._v(" "),n("span",[t._v("Cesación")])],1):t._e(),t._v(" "),null==e.item.sustitucion_id&&0==e.item.cesaciones.length?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item,{sustituir:!0})}},slot:"activator"},[n("v-icon",[t._v("person_add")])],1),t._v(" "),n("span",[t._v("Sustituir")])],1):t._e(),t._v(" "),null==e.item.sustitucion_id&&0==e.item.cesaciones.length?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item,{sustituir:!1})}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1):t._e(),t._v(" "),t.$acl.check("admin")&&null==e.item.sustitucion_id&&0==e.item.cesaciones.length?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1):t._e(),t._v(" "),e.item.cesaciones.length>0?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.reactivarItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("add_circle_outline")])],1),t._v(" "),n("span",[t._v("Quitar cesación")])],1):t._e()],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Estado civil: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.estado_civil))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Genero: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s("M"==e.item.genero?"Masculino":"Femenino"))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Telefono: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.telefono))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Email: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.email))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Domicilio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.domicilio))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.fecha_nacimiento)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Pais de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.pais_nacimiento.nombre))])]),t._v(" "),e.item.departamento_nacimiento_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Departamento de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.departamento_nacimiento.nombre))])]):t._e(),t._v(" "),e.item.provincia_nacimiento_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Provincia de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.provincia_nacimiento.nombre))])]):t._e(),t._v(" "),e.item.sustitucion_id?n("tr",[n("th",{attrs:{colspan:"2"}},[t._v("SUSTITUCIÓN")])]):t._e(),t._v(" "),e.item.sustitucion_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Sustituido por: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(t.fullName(e.item.persona))+" "),n("br"),t._v(" \n CI.: "+t._s(e.item.persona.carnet_identidad+" "+e.item.persona.departamento_extension.sigla)+" \n ")])]):t._e(),t._v(" "),e.item.sustitucion_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Motivo de sustitución: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.sustitucion.descripcion)+" ")])]):t._e(),t._v(" "),e.item.sustitucion_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Documento de sustitución: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.adjunto_sustitucion,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)]):t._e(),t._v(" "),e.item.cesaciones.length>0?n("tr",[n("th",{attrs:{colspan:"2"}},[t._v("CESACIÓN")])]):t._e(),t._v(" "),e.item.cesaciones.length>0?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Motivo de cesación: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.cesaciones[0].descripcion)+" ")])]):t._e(),t._v(" "),e.item.cesaciones.length>0?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Documento de cesación: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.cesaciones[0].pivot.adjunto_cesacion,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)]):t._e()])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(803),n(813),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(804),f=n.n(d),h=n(807),p=n.n(h);function m(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a,Card:p.a},data:function(){return{bus:new o.a,headers:[{text:"Empresa",value:"nombre",align:"center"},{text:"NIT",value:"nit",align:"center"},{text:"Numero fundempresa",align:"center",sortable:!1},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=m(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/empresa");case 3:e=t.sent,this.table=e.data,console.log(e.data),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(){return t.apply(this,arguments)}}(),cardItem:function(t){this.bus.$emit("openDialogCard",t)},editItem:function(t,e){this.bus.$emit("openDialog",Object.assign(t,e))},removeItem:function(){var t=m(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/guia_internacion/fill/"+JSON.stringify({persona_id:e.id}));case 2:t.sent.data.length>0?this.$toast.info("Este productor tiene guía de internación."):this.bus.$emit("openDialogRemove","api/persona/"+e.id);case 4:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},image:function(t){return t.fotografia},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e,n){var r=n(0)(n(805),n(806),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(23),l=n.n(u),d=n(42);n.n(d);function f(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}o.a.use(l.a),e.default={components:{WebCam:d.WebCam},props:["item","bus"],data:function(){return{step:1,valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},selectedEmpresa:{},pais_nacimiento:null,menu:null,errorCarnet:null,errorEmail:null,birth_date:null,birth_date_formatted:null,estadoCivil:["Soltero","Casado","Divorciado","Viudo"],generos:[{nombre:"MASCULINO",valor:"M"},{nombre:"FEMENINO",valor:"F"}],paises:[],departamentos:[],provincias:[],tiposPersona:[],img:null,camera:null,deviceId:null,devices:[],frontCam:!0,report:null,googleKey:"",valFotografia:null,getCamera:!1}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.dialog=!0,t.selectedIndex=e,t.selectedEmpresa=e,t.selectedItem=e.persona,t.pais_nacimiento=e.persona.pais_nacimiento.nombre,t.birth_date_formatted=t.$moment(e.fecha_nacimiento).format("DD/MM/YYYY"),t.img=e.persona.fotografia,t.valFotografia="Fotografia capturada.",t.getProvincias()}),this.getPaises(),this.getDepartamentos(),this.getProvincias()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar"},device:function(){var t=this;return find(this.devices,function(e){return e.deviceId==t.deviceId})}},watch:{birth_date:function(t){this.selectedItem.fecha_nacimiento=t,this.birth_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")},camera:function(t){this.deviceId=t}},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.selectedEmpresa={},this.pais_nacimiento=null,this.img=null,this.step=1,this.errorCarnet=null,this.errorEmail=null,1==this.getCamera&&this.onStop(),this.$refs.form1.reset(),this.$refs.form2.reset(),this.bus.$emit("closeDialog")},save:function(){var t=f(i.a.mark(function t(){var e,n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,this.selectedItem.user_id=this.$store.getters["auth/user"].id,this.selectedEmpresa.user_id=this.$store.getters["auth/user"].id,!this.$refs.form2.validate()){t.next=31;break}return t.next=6,c.a.get("api/pais/fill/"+JSON.stringify({nombre:this.pais_nacimiento}));case 6:if(!((e=t.sent).data.length>0)){t.next=11;break}this.selectedItem.pais_nacimiento_id=e.data[0].id,t.next=15;break;case 11:return t.next=13,c.a.post("api/pais",{nombre:this.pais_nacimiento});case 13:n=t.sent,this.selectedItem.pais_nacimiento_id=n.data.id;case 15:if(-1==this.selectedIndex){t.next=22;break}return t.next=18,c.a.put("api/persona/"+this.selectedItem.id,this.selectedItem);case 18:return t.next=20,c.a.put("api/empresa/"+this.selectedEmpresa.id,this.selectedEmpresa);case 20:t.next=29;break;case 22:return this.selectedItem.tipo_persona_id=4,t.next=25,c.a.post("api/persona",this.selectedItem);case 25:return r=t.sent,this.selectedEmpresa.persona_id=r.data.id,t.next=29,c.a.post("api/empresa",this.selectedEmpresa);case 29:this.$toast.success("Correcto."),this.close();case 31:t.next=36;break;case 33:t.prev=33,t.t0=t.catch(0),console.log(t.t0);case 36:case"end":return t.stop()}},t,this,[[0,33]])}));return function(){return t.apply(this,arguments)}}(),getPaises:function(){var t=f(i.a.mark(function t(){var e,n,r,a,o,s,u;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/pais");case 2:for(e=t.sent,n=!0,r=!1,a=void 0,t.prev=6,o=e.data[Symbol.iterator]();!(n=(s=o.next()).done);n=!0)u=s.value,this.paises.push(u.nombre);t.next=14;break;case 10:t.prev=10,t.t0=t.catch(6),r=!0,a=t.t0;case 14:t.prev=14,t.prev=15,!n&&o.return&&o.return();case 17:if(t.prev=17,!r){t.next=20;break}throw a;case 20:return t.finish(17);case 21:return t.finish(14);case 22:case"end":return t.stop()}},t,this,[[6,10,14,22],[15,,17,21]])}));return function(){return t.apply(this,arguments)}}(),getDepartamentos:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/departamento");case 2:e=t.sent,this.departamentos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getProvincias:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.selectedItem.departamento_nacimiento_id||(this.selectedItem.departamento_nacimiento_id=null),t.next=3,c.a.get("api/provincia/fill/"+JSON.stringify({departamento_id:this.selectedItem.departamento_nacimiento_id}));case 3:e=t.sent,this.provincias=e.data;case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),validProvincia:function(){this.selectedItem.provincia_nacimiento_id||(this.selectedItem.provincia_nacimiento_id=null)},getTiposPersona:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/tipo_persona");case 2:e=t.sent,this.tiposPersona=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),verificarCarnet:function(){var t=f(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/persona/fill/"+JSON.stringify({carnet_identidad:this.selectedItem.carnet_identidad}));case 2:t.sent.data.length>0?this.errorCarnet="Ya existe este carnet.":this.errorCarnet=null;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),verificarEmail:function(){var t=f(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/persona/fill/"+JSON.stringify({email:this.selectedItem.email}));case 2:t.sent.data.length>0?this.errorEmail="Ya existe este email.":this.errorEmail=null;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),nextStep:function(){switch(this.step){case 1:this.$refs.form1.validate()&&(this.step=2,0==this.getCamera?this.getCamera=!0:this.onStart())}},previousStep:function(){switch(this.step){case 3:this.step=2;break;case 2:this.step=1,1==this.getCamera&&this.onStop()}},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},onCapture:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.$refs.webcam.capture();case 2:return this.img=t.sent,t.next=5,c.a.post("api/upload/base64_image",{base64:this.img});case 5:e=t.sent,this.selectedItem.fotografia=e.data,this.selectedItem.biometrico=e.data,this.selectedItem.carnet_escaneado=e.data,this.valFotografia="Fotografia capturada";case 10:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),onStop:function(){this.$refs.webcam.stop()},onStart:function(){this.$refs.webcam.start()},onCameras:function(t){this.devices=t},onCameraChange:function(t){this.deviceId=t,this.camera=t}},filters:{percent:function(t){return t?(Math.floor(1e4*t)/100).toFixed(0)+"%":""}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-stepper",{attrs:{vertical:""},model:{value:t.step,callback:function(e){t.step=e},expression:"step"}},[n("v-stepper-header",[n("v-stepper-step",{attrs:{step:"1",complete:t.step>1}},[t._v("Información general")]),t._v(" "),n("v-divider"),t._v(" "),n("v-stepper-step",{attrs:{step:"2",complete:t.step>2}},[t._v("Fotografía")])],1),t._v(" "),n("v-stepper-items",[n("v-stepper-content",{attrs:{step:"1"}},[n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Nombre de empresa",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedEmpresa.nombre,callback:function(e){t.$set(t.selectedEmpresa,"nombre",e)},expression:"selectedEmpresa.nombre"}}),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Númer de identificación tributaria (NIT)",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=15||"No mayor a 15 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedEmpresa.nit,callback:function(e){t.$set(t.selectedEmpresa,"nit",e)},expression:"selectedEmpresa.nit"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{attrs:{label:"Número de fundempresa",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=15||"No mayor a 15 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedEmpresa.numero_fundempresa,callback:function(e){t.$set(t.selectedEmpresa,"numero_fundempresa",e)},expression:"selectedEmpresa.numero_fundempresa"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Dirección de la empresa",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=100||"No mayor a 100 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedEmpresa.direccion,callback:function(e){t.$set(t.selectedEmpresa,"direccion",e)},expression:"selectedEmpresa.direccion"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{attrs:{label:"Telefono de la empresa",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=15||"No mayor a 15 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedEmpresa.telefono,callback:function(e){t.$set(t.selectedEmpresa,"telefono",e)},expression:"selectedEmpresa.telefono"}})],1)],1),t._v(" "),n("h3",{attrs:{align:"center"}},[t._v("REPRESENTANTE LEGAL")]),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Primer apellido",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.primer_apellido,callback:function(e){t.$set(t.selectedItem,"primer_apellido",e)},expression:"selectedItem.primer_apellido"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{attrs:{label:"Segundo apellido"},model:{value:t.selectedItem.segundo_apellido,callback:function(e){t.$set(t.selectedItem,"segundo_apellido",e)},expression:"selectedItem.segundo_apellido"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-2",attrs:{label:"Carnet de identidad",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=20||"No mayor a 20 caracteres"}],"error-messages":t.errorCarnet,hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.verificarCarnet()}},model:{value:t.selectedItem.carnet_identidad,callback:function(e){t.$set(t.selectedItem,"carnet_identidad",e)},expression:"selectedItem.carnet_identidad"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.departamentos,"item-text":"sigla","item-value":"id",label:"Extension",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.departamento_extension_id,callback:function(e){t.$set(t.selectedItem,"departamento_extension_id",e)},expression:"selectedItem.departamento_extension_id"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.estadoCivil,label:"Estado civil",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.estado_civil,callback:function(e){t.$set(t.selectedItem,"estado_civil",e)},expression:"selectedItem.estado_civil"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.generos,"item-text":"nombre","item-value":"valor",label:"Genero",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.genero,callback:function(e){t.$set(t.selectedItem,"genero",e)},expression:"selectedItem.genero"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-2",attrs:{label:"Telefono/Celular"},model:{value:t.selectedItem.telefono,callback:function(e){t.$set(t.selectedItem,"telefono",e)},expression:"selectedItem.telefono"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-2",attrs:{label:"Email","error-messages":t.errorEmail},on:{change:function(e){return t.verificarEmail()}},model:{value:t.selectedItem.email,callback:function(e){t.$set(t.selectedItem,"email",e)},expression:"selectedItem.email"}})],1)],1),t._v(" "),n("v-text-field",{attrs:{label:"Domicilio",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=500||"No mayor a 500 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.domicilio,callback:function(e){t.$set(t.selectedItem,"domicilio",e)},expression:"selectedItem.domicilio"}}),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de nacimiento","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.birth_date_formatted,callback:function(e){t.birth_date_formatted=e},expression:"birth_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":""},on:{input:function(e){t.menu=!1}},model:{value:t.birth_date,callback:function(e){t.birth_date=e},expression:"birth_date"}})],1)],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-combobox",{staticClass:"mr-2",attrs:{items:t.paises,label:"País de nacimiento",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido, Puede crear un nuevo registro de país.</span>","persistent-hint":""},model:{value:t.pais_nacimiento,callback:function(e){t.pais_nacimiento=e},expression:"pais_nacimiento"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.departamentos,"item-text":"nombre","item-value":"id",label:"Departamento de nacimiento",clearable:""},on:{change:function(e){return t.getProvincias()}},model:{value:t.selectedItem.departamento_nacimiento_id,callback:function(e){t.$set(t.selectedItem,"departamento_nacimiento_id",e)},expression:"selectedItem.departamento_nacimiento_id"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{attrs:{items:t.provincias,"item-text":"nombre","item-value":"id",label:"Provincia de nacimiento",clearable:""},on:{change:function(e){return t.validProvincia()}},model:{value:t.selectedItem.provincia_nacimiento_id,callback:function(e){t.$set(t.selectedItem,"provincia_nacimiento_id",e)},expression:"selectedItem.provincia_nacimiento_id"}})],1)],1)],1)],1),t._v(" "),n("v-stepper-content",{attrs:{step:"2"}},[n("v-form",{ref:"form2",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs12:"",md6:""}},[t.getCamera?n("v-card",{attrs:{dark:"",color:"primary",height:"380"}},[n("v-card-title",[n("v-icon",{attrs:{large:"",left:""}},[t._v("\n camera\n ")]),t._v(" "),t.device?n("span",{staticClass:"title font-weight-light"},[t._v("\n "+t._s(t.device.label)+"\n ")]):t._e()],1),t._v(" "),n("v-card-text",{staticClass:"px-0"},[n("web-cam",{ref:"webcam",staticStyle:{margin:"-130px 0 0 0"},attrs:{width:"100%",deviceId:t.deviceId,debug:!1,googleKey:t.googleKey},on:{cameras:t.onCameras,"camera-change":t.onCameraChange}})],1)],1):t._e()],1),t._v(" "),n("v-flex",{attrs:{xs12:"",md6:""}},[n("v-card",[n("v-avatar",{attrs:{tile:"tile",size:"100%",color:"grey lighten-4"}},[n("img",{attrs:{src:t.img}})]),t._v(" "),n("v-card-title",{attrs:{"primary-title":""}},[n("v-text-field",{attrs:{rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",readonly:"",box:""},model:{value:t.valFotografia,callback:function(e){t.valFotografia=e},expression:"valFotografia"}})],1)],1)],1),t._v(" "),n("v-select",{attrs:{xs4:"",items:t.devices,label:"Seleccione camara","item-text":"label","item-value":"deviceId"},model:{value:t.camera,callback:function(e){t.camera=e},expression:"camera"}}),t._v(" "),n("v-btn",{attrs:{xs3:"",small:"",color:"primary"},on:{click:t.onCapture}},[t._v("Capturar foto "),n("v-icon",[t._v("camera")])],1)],1)],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),1!=t.step?n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.previousStep()}}},[t._v("Anterior")]):t._e(),t._v(" "),n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.nextStep()}}},[t._v("Siguiente")]),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),2==t.step?n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1):t._e()],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(808),n(812),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o),c=n(809),u=n.n(c),l=n(6),d=n.n(l);function f(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:d.a,CardForm:u.a},props:["item","bus"],data:function(){return{dialog:!1,headers:[{text:"Autorizacion",align:"center",sortable:!1},{text:"Fecha emisión",align:"center",sortable:!1},{text:"Fecha conclusión",align:"center",sortable:!1},{text:"Estado",align:"center",sortable:!1},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:"",disableNuevoItem:!1,personaId:null}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogCard",function(e){t.dialog=!0,t.selectedItem=e,t.personaId=e.id,t.getTable(),e.autorizaciones.length>0&&(t.disableNuevoItem=!0)}),this.bus.$on("closeDialogCard",function(){t.getTable()})},computed:{},watch:{},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.personaId=null,this.bus.$emit("closeDialogCard")},getTable:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s.a.get("api/autorizacion/fill/"+JSON.stringify({empresa_id:this.personaId}));case 3:e=t.sent,this.table=e.data,console.log(e.data),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(){return t.apply(this,arguments)}}(),nuevoItem:function(t,e){this.bus.$emit("openDialogCardForm",Object.assign(t,e))},editItem:function(t,e){this.bus.$emit("openDialogCardForm",Object.assign(t,e))},duplicarItem:function(t,e){this.bus.$emit("openDialogCardForm",Object.assign(t,e))},renovarItem:function(t,e){this.bus.$emit("openDialogCardForm",Object.assign(t,e))},removeItem:function(){var t=f(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/autorizacion/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},image:function(t){return t.fotografia},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")},formatDecimal:function(t){return parseFloat(t).toFixed(2)},printItem:function(){var t=f(i.a.mark(function t(e){var n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s()({method:"GET",url:"api/autorizacion/print/"+e.id,responseType:"arraybuffer"});case 3:n=t.sent,r=new Blob([n.data],{type:"application/pdf"}),printJS(window.URL.createObjectURL(r)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(810),n(811),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{},props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},personas:[],menu:null,emision_date_formatted:null,emision_date:null,menu2:null,conclusion_date_formatted:null,conclusion_date:null,mode:null,formTitle:"Nuevo",duplicar:!1,renovar:!1,errorAutorizacion:null,personaId:null}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogCardForm",function(e){t.dialog=!0,t.mode=e.mode,"nuevo"==t.mode&&(t.formTitle="Nuevo",t.personaId=e,t.duplicar=!1,t.renovar=!1,t.emision_date_formatted=t.$moment().format("DD/MM/YYYY"),t.conclusion_date_formatted=t.$moment().add(5,"years").format("DD/MM/YYYY"),t.selectedItem.fecha_emision=t.$moment().format("YYYY-MM-DD"),t.selectedItem.fecha_conclusion=t.$moment().add(5,"years").format("YYYY-MM-DD")),"editar"==t.mode&&(t.selectedIndex=e,t.selectedItem=e,t.formTitle="Editar",t.duplicar=!1,t.renovar=!1,t.emision_date_formatted=t.$moment(e.fecha_emision).format("DD/MM/YYYY"),t.conclusion_date_formatted=t.$moment(e.fecha_conclusion).format("DD/MM/YYYY")),"duplicar"==t.mode&&(t.selectedIndex=e,t.selectedItem=e,t.formTitle="Duplicado numero: ",t.duplicar=!0,t.renovar=!1,t.emision_date_formatted=t.$moment(e.fecha_emision).format("DD/MM/YYYY"),t.conclusion_date_formatted=t.$moment(e.fecha_conclusion).format("DD/MM/YYYY"),t.getAutorizacion(e)),"renovar"==t.mode&&(console.log(t.mode),t.selectedIndex=e,t.selectedItem=e,t.formTitle="Renovar carnet de: ",t.duplicar=!1,t.renovar=!0,t.selectedItem.fecha_emision=t.$moment().format("YYYY-MM-DD"),t.emision_date_formatted=t.$moment(t.selectedItem.fecha_emision).format("DD/MM/YYYY"),t.selectedItem.fecha_conclusion=t.$moment().add(5,"years").format("YYYY-MM-DD"),t.conclusion_date_formatted=t.$moment(t.selectedItem.fecha_conclusion).format("DD/MM/YYYY"),t.selectedItem.duplicado=0)})},computed:{},watch:{emision_date:function(t){this.selectedItem.fecha_emision=t,this.emision_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")},conclusion_date:function(t){this.selectedItem.fecha_conclusion=t,this.conclusion_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.$refs.form.reset(),this.bus.$emit("closeDialogCard"),this.mode=null,this.formTitle="Nuevo",this.duplicar=null,this.personaId=null},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,this.selectedItem.user_id=this.$store.getters["auth/user"].id,!this.$refs.form.validate()){t.next=22;break}if(-1==this.selectedIndex){t.next=17;break}if("editar"!=this.mode){t.next=7;break}return t.next=7,s.a.put("api/autorizacion/"+this.selectedItem.id,this.selectedItem);case 7:if("duplicar"!=this.mode){t.next=10;break}return t.next=10,s.a.put("api/autorizacion/"+this.selectedItem.id,{duplicado:this.selectedItem.duplicado});case 10:if("renovar"!=this.mode){t.next=15;break}return t.next=13,s.a.put("api/autorizacion/"+this.selectedItem.id,{renovado:!0});case 13:return t.next=15,s.a.post("api/autorizacion",this.selectedItem);case 15:t.next=20;break;case 17:return this.selectedItem.empresa_id=this.personaId,t.next=20,s.a.post("api/autorizacion",this.selectedItem);case 20:this.$toast.success("Correcto."),this.close();case 22:t.next=27;break;case 24:t.prev=24,t.t0=t.catch(0),console.log(t.t0);case 27:case"end":return t.stop()}},t,this,[[0,24]])}));return function(){return t.apply(this,arguments)}}(),getPersonas:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/persona/fill/"+JSON.stringify({tipo_persona_id:1}));case 2:e=t.sent,this.personas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),verificarAutorizacion:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/autorizacion/fill/"+JSON.stringify({autorizacion:this.selectedItem.autorizacion}));case 2:t.sent.data.length>0?this.errorCarnetProductor="Ya existe esta autorización.":this.errorCarnetProductor=null;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getAutorizacion:function(){var t=c(i.a.mark(function t(e){var n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/autorizacion/"+e.id);case 2:n=t.sent,console.log(n.data),this.selectedItem.duplicado=n.data.duplicado+1;case 5:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("\n "+t._s(t.formTitle)+" \n "),"duplicar"==t.mode?n("span",[t._v(t._s(t.selectedItem.duplicado))]):t._e()])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-text-field",{attrs:{label:"Numero de autorización",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.errorAutorizacion,disabled:t.duplicar},on:{change:function(e){return t.verificarAutorizacion()}},model:{value:t.selectedItem.autorizacion,callback:function(e){t.$set(t.selectedItem,"autorizacion",e)},expression:"selectedItem.autorizacion"}}),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px",disabled:t.duplicar||t.renovar},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de emisión","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",disabled:t.duplicar||t.renovar},slot:"activator",model:{value:t.emision_date_formatted,callback:function(e){t.emision_date_formatted=e},expression:"emision_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"es-bo"},on:{input:function(e){t.menu=!1}},model:{value:t.emision_date,callback:function(e){t.emision_date=e},expression:"emision_date"}})],1)],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px",disabled:t.duplicar||t.renovar},model:{value:t.menu2,callback:function(e){t.menu2=e},expression:"menu2"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de conclusión","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",disabled:t.duplicar||t.renovar},slot:"activator",model:{value:t.conclusion_date_formatted,callback:function(e){t.conclusion_date_formatted=e},expression:"conclusion_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"es-bo"},on:{input:function(e){t.menu2=!1}},model:{value:t.conclusion_date,callback:function(e){t.conclusion_date=e},expression:"conclusion_date"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Carnet")])],1),t._v(" "),n("v-toolbar",[n("v-toolbar-title",[t._v("Autorizaciones")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:t.disableNuevoItem},on:{click:function(e){return t.nuevoItem(t.personaId,{mode:"nuevo"})}},slot:"activator"},[n("v-icon",[t._v("add_circle")])],1),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("CardForm",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-card-text",[n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.autorizacion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.formatDate(e.item.fecha_emision))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.formatDate(e.item.fecha_conclusion))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t.$moment(e.item.fecha_conclusion).format("DD/MM/YYYY")>=t.$moment().format("DD/MM/YYYY")?n("v-chip",{attrs:{small:"",color:"green","text-color":"white"}},[t._v("vigente")]):n("v-chip",{attrs:{small:"",color:"orange","text-color":"white"}},[t._v("vencido")])],1),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:e.item.fecha_conclusion<t.$moment().format("YYYY-MM-DD")},on:{click:function(n){return t.printItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("print")])],1),t._v(" "),n("span",[t._v("Imprimir")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:e.item.fecha_conclusion<t.$moment().format("YYYY-MM-DD")},on:{click:function(n){return t.duplicarItem(e.item,{mode:"duplicar"})}},slot:"activator"},[n("v-icon",[t._v(t._s(e.item.duplicado>9?"filter_9_plus":"filter_"+(e.item.duplicado+1)))])],1),t._v(" "),n("span",[t._v("Duplicar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:e.item.fecha_conclusion>t.$moment().format("YYYY-MM-DD")||e.item.renovado},on:{click:function(n){return t.renovarItem(e.item,{mode:"renovar"})}},slot:"activator"},[n("v-icon",[t._v("filter")])],1),t._v(" "),n("span",[t._v("Renovar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:e.item.fecha_conclusion<t.$moment().format("YYYY-MM-DD")},on:{click:function(n){return t.editItem(e.item,{mode:"editar"})}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),t.$store.getters["auth/user"].roles.filter(function(t){return"admin"===t.name}).length>0?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1):t._e()],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Salir")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Empresas")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("Card",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.nit)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.numero_fundempresa)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.cardItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("credit_card")])],1),t._v(" "),n("span",[t._v("Autorización")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item,{sustituir:!1})}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),t.$store.getters["auth/user"].roles.filter(function(t){return"admin"===t.name}).length>0?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1):t._e()],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.persona.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Dirección de empresa: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.direccion))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Telefono de empresa: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.telefono))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-center",attrs:{colspan:"2"}},[t._v("REPRESENTANTE LEGAL")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Nombre: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.fullName(e.item.persona)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("CI: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.persona.carnet_identidad+" "+e.item.persona.departamento_extension.sigla))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Estado civil: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.persona.estado_civil))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Genero: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s("M"==e.item.persona.genero?"Masculino":"Femenino"))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Telefono: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.persona.telefono))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Email: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.persona.email))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Domicilio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.persona.domicilio))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.persona.fecha_nacimiento)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Pais de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.persona.pais_nacimiento.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Departamento de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.persona.departamento_nacimiento_id?n("span",[t._v("\n "+t._s(e.item.persona.departamento_nacimiento.nombre)+"\n ")]):t._e()])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Provincia de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.persona.provincia_nacimiento_id?n("span",[t._v("\n "+t._s(e.item.persona.provincia_nacimiento.nombre)+"\n ")]):t._e()])])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(815),n(819),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(816),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Entidad de investigación",value:"nombre",align:"center"},{text:"Direccion",value:"direccion",align:"center"},{text:"Telefono",align:"center",sortable:!1},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/entidad_investigacion");case 3:e=t.sent,this.table=e.data,console.log(e.data),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(){return t.apply(this,arguments)}}(),cardItem:function(t){this.bus.$emit("openDialogCard",t)},editItem:function(t,e){this.bus.$emit("openDialog",Object.assign(t,e))},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/guia_internacion/fill/"+JSON.stringify({persona_id:e.id}));case 2:t.sent.data.length>0?this.$toast.info("Este productor tiene guía de internación."):this.bus.$emit("openDialogRemove","api/persona/"+e.id);case 4:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},image:function(t){return t.fotografia},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e,n){var r=n(0)(n(817),n(818),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(23),l=n.n(u),d=n(42);n.n(d);function f(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}o.a.use(l.a),e.default={components:{WebCam:d.WebCam},props:["item","bus"],data:function(){return{step:1,valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},selectedEmpresa:{},pais_nacimiento:null,menu:null,errorCarnet:null,errorEmail:null,birth_date:null,birth_date_formatted:null,estadoCivil:["Soltero","Casado","Divorciado","Viudo"],generos:[{nombre:"MASCULINO",valor:"M"},{nombre:"FEMENINO",valor:"F"}],paises:[],departamentos:[],provincias:[],tiposPersona:[],img:null,camera:null,deviceId:null,devices:[],frontCam:!0,report:null,googleKey:"",valFotografia:null,getCamera:!1}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.dialog=!0,t.selectedIndex=e,t.selectedEmpresa=e,t.selectedItem=e.persona,t.pais_nacimiento=e.persona.pais_nacimiento.nombre,t.birth_date_formatted=t.$moment(e.fecha_nacimiento).format("DD/MM/YYYY"),t.img=e.persona.fotografia,t.valFotografia="Fotografia capturada.",t.getProvincias()}),this.getPaises(),this.getDepartamentos(),this.getProvincias()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar"},device:function(){var t=this;return find(this.devices,function(e){return e.deviceId==t.deviceId})}},watch:{birth_date:function(t){this.selectedItem.fecha_nacimiento=t,this.birth_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")},camera:function(t){this.deviceId=t}},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.selectedEmpresa={},this.pais_nacimiento=null,this.img=null,this.step=1,this.errorCarnet=null,this.errorEmail=null,1==this.getCamera&&this.onStop(),this.$refs.form1.reset(),this.$refs.form2.reset(),this.bus.$emit("closeDialog")},save:function(){var t=f(i.a.mark(function t(){var e,n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,this.selectedItem.user_id=this.$store.getters["auth/user"].id,this.selectedEmpresa.user_id=this.$store.getters["auth/user"].id,!this.$refs.form2.validate()){t.next=31;break}return t.next=6,c.a.get("api/pais/fill/"+JSON.stringify({nombre:this.pais_nacimiento}));case 6:if(!((e=t.sent).data.length>0)){t.next=11;break}this.selectedItem.pais_nacimiento_id=e.data[0].id,t.next=15;break;case 11:return t.next=13,c.a.post("api/pais",{nombre:this.pais_nacimiento});case 13:n=t.sent,this.selectedItem.pais_nacimiento_id=n.data.id;case 15:if(-1==this.selectedIndex){t.next=22;break}return t.next=18,c.a.put("api/persona/"+this.selectedItem.id,this.selectedItem);case 18:return t.next=20,c.a.put("api/entidad_investigacion/"+this.selectedEmpresa.id,this.selectedEmpresa);case 20:t.next=29;break;case 22:return this.selectedItem.tipo_persona_id=6,t.next=25,c.a.post("api/persona",this.selectedItem);case 25:return r=t.sent,this.selectedEmpresa.persona_id=r.data.id,t.next=29,c.a.post("api/entidad_investigacion",this.selectedEmpresa);case 29:this.$toast.success("Correcto."),this.close();case 31:t.next=36;break;case 33:t.prev=33,t.t0=t.catch(0),console.log(t.t0);case 36:case"end":return t.stop()}},t,this,[[0,33]])}));return function(){return t.apply(this,arguments)}}(),getPaises:function(){var t=f(i.a.mark(function t(){var e,n,r,a,o,s,u;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/pais");case 2:for(e=t.sent,n=!0,r=!1,a=void 0,t.prev=6,o=e.data[Symbol.iterator]();!(n=(s=o.next()).done);n=!0)u=s.value,this.paises.push(u.nombre);t.next=14;break;case 10:t.prev=10,t.t0=t.catch(6),r=!0,a=t.t0;case 14:t.prev=14,t.prev=15,!n&&o.return&&o.return();case 17:if(t.prev=17,!r){t.next=20;break}throw a;case 20:return t.finish(17);case 21:return t.finish(14);case 22:case"end":return t.stop()}},t,this,[[6,10,14,22],[15,,17,21]])}));return function(){return t.apply(this,arguments)}}(),getDepartamentos:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/departamento");case 2:e=t.sent,this.departamentos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getProvincias:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.selectedItem.departamento_nacimiento_id||(this.selectedItem.departamento_nacimiento_id=null),t.next=3,c.a.get("api/provincia/fill/"+JSON.stringify({departamento_id:this.selectedItem.departamento_nacimiento_id}));case 3:e=t.sent,this.provincias=e.data;case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),validProvincia:function(){this.selectedItem.provincia_nacimiento_id||(this.selectedItem.provincia_nacimiento_id=null)},getTiposPersona:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/tipo_persona");case 2:e=t.sent,this.tiposPersona=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),verificarCarnet:function(){var t=f(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/persona/fill/"+JSON.stringify({carnet_identidad:this.selectedItem.carnet_identidad}));case 2:t.sent.data.length>0?this.errorCarnet="Ya existe este carnet.":this.errorCarnet=null;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),verificarEmail:function(){var t=f(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/persona/fill/"+JSON.stringify({email:this.selectedItem.email}));case 2:t.sent.data.length>0?this.errorEmail="Ya existe este email.":this.errorEmail=null;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),nextStep:function(){switch(this.step){case 1:this.$refs.form1.validate()&&(this.step=2,0==this.getCamera?this.getCamera=!0:this.onStart())}},previousStep:function(){switch(this.step){case 3:this.step=2;break;case 2:this.step=1,1==this.getCamera&&this.onStop()}},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},onCapture:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.$refs.webcam.capture();case 2:return this.img=t.sent,t.next=5,c.a.post("api/upload/base64_image",{base64:this.img});case 5:e=t.sent,this.selectedItem.fotografia=e.data,this.selectedItem.biometrico=e.data,this.selectedItem.carnet_escaneado=e.data,this.valFotografia="Fotografia capturada";case 10:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),onStop:function(){this.$refs.webcam.stop()},onStart:function(){this.$refs.webcam.start()},onCameras:function(t){this.devices=t},onCameraChange:function(t){this.deviceId=t,this.camera=t}},filters:{percent:function(t){return t?(Math.floor(1e4*t)/100).toFixed(0)+"%":""}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-stepper",{attrs:{vertical:""},model:{value:t.step,callback:function(e){t.step=e},expression:"step"}},[n("v-stepper-header",[n("v-stepper-step",{attrs:{step:"1",complete:t.step>1}},[t._v("Información general")]),t._v(" "),n("v-divider"),t._v(" "),n("v-stepper-step",{attrs:{step:"2",complete:t.step>2}},[t._v("Fotografía")])],1),t._v(" "),n("v-stepper-items",[n("v-stepper-content",{attrs:{step:"1"}},[n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Nombre de instituto o entidad de investigación",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedEmpresa.nombre,callback:function(e){t.$set(t.selectedEmpresa,"nombre",e)},expression:"selectedEmpresa.nombre"}}),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Dirección de la empresa",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=100||"No mayor a 100 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedEmpresa.direccion,callback:function(e){t.$set(t.selectedEmpresa,"direccion",e)},expression:"selectedEmpresa.direccion"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{attrs:{label:"Telefono de la empresa",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=15||"No mayor a 15 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedEmpresa.telefono,callback:function(e){t.$set(t.selectedEmpresa,"telefono",e)},expression:"selectedEmpresa.telefono"}})],1)],1),t._v(" "),n("h3",{attrs:{align:"center"}},[t._v("REPRESENTANTE LEGAL")]),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Primer apellido",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.primer_apellido,callback:function(e){t.$set(t.selectedItem,"primer_apellido",e)},expression:"selectedItem.primer_apellido"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{attrs:{label:"Segundo apellido"},model:{value:t.selectedItem.segundo_apellido,callback:function(e){t.$set(t.selectedItem,"segundo_apellido",e)},expression:"selectedItem.segundo_apellido"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-2",attrs:{label:"Carnet de identidad",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=20||"No mayor a 20 caracteres"}],"error-messages":t.errorCarnet,hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.verificarCarnet()}},model:{value:t.selectedItem.carnet_identidad,callback:function(e){t.$set(t.selectedItem,"carnet_identidad",e)},expression:"selectedItem.carnet_identidad"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.departamentos,"item-text":"sigla","item-value":"id",label:"Extension",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.departamento_extension_id,callback:function(e){t.$set(t.selectedItem,"departamento_extension_id",e)},expression:"selectedItem.departamento_extension_id"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.estadoCivil,label:"Estado civil",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.estado_civil,callback:function(e){t.$set(t.selectedItem,"estado_civil",e)},expression:"selectedItem.estado_civil"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.generos,"item-text":"nombre","item-value":"valor",label:"Genero",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.genero,callback:function(e){t.$set(t.selectedItem,"genero",e)},expression:"selectedItem.genero"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-2",attrs:{label:"Telefono/Celular"},model:{value:t.selectedItem.telefono,callback:function(e){t.$set(t.selectedItem,"telefono",e)},expression:"selectedItem.telefono"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-2",attrs:{label:"Email","error-messages":t.errorEmail},on:{change:function(e){return t.verificarEmail()}},model:{value:t.selectedItem.email,callback:function(e){t.$set(t.selectedItem,"email",e)},expression:"selectedItem.email"}})],1)],1),t._v(" "),n("v-text-field",{attrs:{label:"Domicilio",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=500||"No mayor a 500 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.domicilio,callback:function(e){t.$set(t.selectedItem,"domicilio",e)},expression:"selectedItem.domicilio"}}),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de nacimiento","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.birth_date_formatted,callback:function(e){t.birth_date_formatted=e},expression:"birth_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":""},on:{input:function(e){t.menu=!1}},model:{value:t.birth_date,callback:function(e){t.birth_date=e},expression:"birth_date"}})],1)],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-combobox",{staticClass:"mr-2",attrs:{items:t.paises,label:"País de nacimiento",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido, Puede crear un nuevo registro de país.</span>","persistent-hint":""},model:{value:t.pais_nacimiento,callback:function(e){t.pais_nacimiento=e},expression:"pais_nacimiento"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.departamentos,"item-text":"nombre","item-value":"id",label:"Departamento de nacimiento",clearable:""},on:{change:function(e){return t.getProvincias()}},model:{value:t.selectedItem.departamento_nacimiento_id,callback:function(e){t.$set(t.selectedItem,"departamento_nacimiento_id",e)},expression:"selectedItem.departamento_nacimiento_id"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{attrs:{items:t.provincias,"item-text":"nombre","item-value":"id",label:"Provincia de nacimiento",clearable:""},on:{change:function(e){return t.validProvincia()}},model:{value:t.selectedItem.provincia_nacimiento_id,callback:function(e){t.$set(t.selectedItem,"provincia_nacimiento_id",e)},expression:"selectedItem.provincia_nacimiento_id"}})],1)],1)],1)],1),t._v(" "),n("v-stepper-content",{attrs:{step:"2"}},[n("v-form",{ref:"form2",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs12:"",md6:""}},[t.getCamera?n("v-card",{attrs:{dark:"",color:"primary",height:"380"}},[n("v-card-title",[n("v-icon",{attrs:{large:"",left:""}},[t._v("\n camera\n ")]),t._v(" "),t.device?n("span",{staticClass:"title font-weight-light"},[t._v("\n "+t._s(t.device.label)+"\n ")]):t._e()],1),t._v(" "),n("v-card-text",{staticClass:"px-0"},[n("web-cam",{ref:"webcam",staticStyle:{margin:"-130px 0 0 0"},attrs:{width:"100%",deviceId:t.deviceId,debug:!1,googleKey:t.googleKey},on:{cameras:t.onCameras,"camera-change":t.onCameraChange}})],1)],1):t._e()],1),t._v(" "),n("v-flex",{attrs:{xs12:"",md6:""}},[n("v-card",[n("v-avatar",{attrs:{tile:"tile",size:"100%",color:"grey lighten-4"}},[n("img",{attrs:{src:t.img}})]),t._v(" "),n("v-card-title",{attrs:{"primary-title":""}},[n("v-text-field",{attrs:{rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",readonly:"",box:""},model:{value:t.valFotografia,callback:function(e){t.valFotografia=e},expression:"valFotografia"}})],1)],1)],1),t._v(" "),n("v-select",{attrs:{xs4:"",items:t.devices,label:"Seleccione camara","item-text":"label","item-value":"deviceId"},model:{value:t.camera,callback:function(e){t.camera=e},expression:"camera"}}),t._v(" "),n("v-btn",{attrs:{xs3:"",small:"",color:"primary"},on:{click:t.onCapture}},[t._v("Capturar foto "),n("v-icon",[t._v("camera")])],1)],1)],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),1!=t.step?n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.previousStep()}}},[t._v("Anterior")]):t._e(),t._v(" "),n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.nextStep()}}},[t._v("Siguiente")]),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),2==t.step?n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1):t._e()],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Instituciones y entidades de investigación")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}}),t._v(" "),n("Form",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.direccion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.telefono)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item,{sustituir:!1})}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),t.$store.getters["auth/user"].roles.filter(function(t){return"admin"===t.name}).length>0?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1):t._e()],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.persona.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-center",attrs:{colspan:"2"}},[t._v("REPRESENTANTE LEGAL")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Nombre: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.fullName(e.item.persona)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("CI: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.persona.carnet_identidad+" "+e.item.persona.departamento_extension.sigla))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Estado civil: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.persona.estado_civil))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Genero: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s("M"==e.item.persona.genero?"Masculino":"Femenino"))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Telefono: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.persona.telefono))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Email: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.persona.email))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Domicilio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.persona.domicilio))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.persona.fecha_nacimiento)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Pais de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.persona.pais_nacimiento.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Departamento de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.persona.departamento_nacimiento_id?n("span",[t._v("\n "+t._s(e.item.persona.departamento_nacimiento.nombre)+"\n ")]):t._e()])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Provincia de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.persona.provincia_nacimiento_id?n("span",[t._v("\n "+t._s(e.item.persona.provincia_nacimiento.nombre)+"\n ")]):t._e()])])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(821),n(825),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(822),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Organización",value:"nombre",align:"center"},{text:"Direccion",value:"direccion",align:"center"},{text:"Telefono",align:"center",sortable:!1},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/beneficiario_donacion");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),cardItem:function(t){this.bus.$emit("openDialogCard",t)},editItem:function(t,e){this.bus.$emit("openDialog",Object.assign(t,e))},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/guia_internacion/fill/"+JSON.stringify({persona_id:e.id}));case 2:t.sent.data.length>0?this.$toast.info("Este productor tiene guía de internación."):this.bus.$emit("openDialogRemove","api/persona/"+e.id);case 4:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},image:function(t){return t.fotografia},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e,n){var r=n(0)(n(823),n(824),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(23),l=n.n(u),d=n(42);n.n(d);function f(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}o.a.use(l.a),e.default={components:{WebCam:d.WebCam},props:["item","bus"],data:function(){return{step:1,valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},selectedEmpresa:{},pais_nacimiento:null,menu:null,errorCarnet:null,errorEmail:null,birth_date:null,birth_date_formatted:null,estadoCivil:["Soltero","Casado","Divorciado","Viudo"],generos:[{nombre:"MASCULINO",valor:"M"},{nombre:"FEMENINO",valor:"F"}],paises:[],departamentos:[],provincias:[],tiposPersona:[],img:null,camera:null,deviceId:null,devices:[],frontCam:!0,report:null,googleKey:"",valFotografia:null,getCamera:!1}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.dialog=!0,t.selectedIndex=e,t.selectedEmpresa=e,t.selectedItem=e.persona,t.pais_nacimiento=e.persona.pais_nacimiento.nombre,t.birth_date_formatted=t.$moment(e.fecha_nacimiento).format("DD/MM/YYYY"),t.img=e.persona.fotografia,t.valFotografia="Fotografia capturada.",t.getProvincias()}),this.getPaises(),this.getDepartamentos(),this.getProvincias()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar"},device:function(){var t=this;return find(this.devices,function(e){return e.deviceId==t.deviceId})}},watch:{birth_date:function(t){this.selectedItem.fecha_nacimiento=t,this.birth_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")},camera:function(t){this.deviceId=t}},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.selectedEmpresa={},this.pais_nacimiento=null,this.img=null,this.step=1,this.errorCarnet=null,this.errorEmail=null,1==this.getCamera&&this.onStop(),this.$refs.form1.reset(),this.$refs.form2.reset(),this.bus.$emit("closeDialog")},save:function(){var t=f(i.a.mark(function t(){var e,n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,this.selectedItem.user_id=this.$store.getters["auth/user"].id,this.selectedEmpresa.user_id=this.$store.getters["auth/user"].id,!this.$refs.form2.validate()){t.next=31;break}return t.next=6,c.a.get("api/pais/fill/"+JSON.stringify({nombre:this.pais_nacimiento}));case 6:if(!((e=t.sent).data.length>0)){t.next=11;break}this.selectedItem.pais_nacimiento_id=e.data[0].id,t.next=15;break;case 11:return t.next=13,c.a.post("api/pais",{nombre:this.pais_nacimiento});case 13:n=t.sent,this.selectedItem.pais_nacimiento_id=n.data.id;case 15:if(-1==this.selectedIndex){t.next=22;break}return t.next=18,c.a.put("api/persona/"+this.selectedItem.id,this.selectedItem);case 18:return t.next=20,c.a.put("api/beneficiario_donacion/"+this.selectedEmpresa.id,this.selectedEmpresa);case 20:t.next=29;break;case 22:return this.selectedItem.tipo_persona_id=6,t.next=25,c.a.post("api/persona",this.selectedItem);case 25:return r=t.sent,this.selectedEmpresa.persona_id=r.data.id,t.next=29,c.a.post("api/beneficiario_donacion",this.selectedEmpresa);case 29:this.$toast.success("Correcto."),this.close();case 31:t.next=36;break;case 33:t.prev=33,t.t0=t.catch(0),console.log(t.t0);case 36:case"end":return t.stop()}},t,this,[[0,33]])}));return function(){return t.apply(this,arguments)}}(),getPaises:function(){var t=f(i.a.mark(function t(){var e,n,r,a,o,s,u;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/pais");case 2:for(e=t.sent,n=!0,r=!1,a=void 0,t.prev=6,o=e.data[Symbol.iterator]();!(n=(s=o.next()).done);n=!0)u=s.value,this.paises.push(u.nombre);t.next=14;break;case 10:t.prev=10,t.t0=t.catch(6),r=!0,a=t.t0;case 14:t.prev=14,t.prev=15,!n&&o.return&&o.return();case 17:if(t.prev=17,!r){t.next=20;break}throw a;case 20:return t.finish(17);case 21:return t.finish(14);case 22:case"end":return t.stop()}},t,this,[[6,10,14,22],[15,,17,21]])}));return function(){return t.apply(this,arguments)}}(),getDepartamentos:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/departamento");case 2:e=t.sent,this.departamentos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getProvincias:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.selectedItem.departamento_nacimiento_id||(this.selectedItem.departamento_nacimiento_id=null),t.next=3,c.a.get("api/provincia/fill/"+JSON.stringify({departamento_id:this.selectedItem.departamento_nacimiento_id}));case 3:e=t.sent,this.provincias=e.data;case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),validProvincia:function(){this.selectedItem.provincia_nacimiento_id||(this.selectedItem.provincia_nacimiento_id=null)},getTiposPersona:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/tipo_persona");case 2:e=t.sent,this.tiposPersona=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),verificarCarnet:function(){var t=f(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/persona/fill/"+JSON.stringify({carnet_identidad:this.selectedItem.carnet_identidad}));case 2:t.sent.data.length>0?this.errorCarnet="Ya existe este carnet.":this.errorCarnet=null;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),verificarEmail:function(){var t=f(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/persona/fill/"+JSON.stringify({email:this.selectedItem.email}));case 2:t.sent.data.length>0?this.errorEmail="Ya existe este email.":this.errorEmail=null;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),nextStep:function(){switch(this.step){case 1:this.$refs.form1.validate()&&(this.step=2,0==this.getCamera?this.getCamera=!0:this.onStart())}},previousStep:function(){switch(this.step){case 3:this.step=2;break;case 2:this.step=1,1==this.getCamera&&this.onStop()}},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},onCapture:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.$refs.webcam.capture();case 2:return this.img=t.sent,t.next=5,c.a.post("api/upload/base64_image",{base64:this.img});case 5:e=t.sent,this.selectedItem.fotografia=e.data,this.selectedItem.biometrico=e.data,this.selectedItem.carnet_escaneado=e.data,this.valFotografia="Fotografia capturada";case 10:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),onStop:function(){this.$refs.webcam.stop()},onStart:function(){this.$refs.webcam.start()},onCameras:function(t){this.devices=t},onCameraChange:function(t){this.deviceId=t,this.camera=t}},filters:{percent:function(t){return t?(Math.floor(1e4*t)/100).toFixed(0)+"%":""}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-stepper",{attrs:{vertical:""},model:{value:t.step,callback:function(e){t.step=e},expression:"step"}},[n("v-stepper-header",[n("v-stepper-step",{attrs:{step:"1",complete:t.step>1}},[t._v("Información general")]),t._v(" "),n("v-divider"),t._v(" "),n("v-stepper-step",{attrs:{step:"2",complete:t.step>2}},[t._v("Fotografía")])],1),t._v(" "),n("v-stepper-items",[n("v-stepper-content",{attrs:{step:"1"}},[n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Nombre de organización beneficiaria de donación",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedEmpresa.nombre,callback:function(e){t.$set(t.selectedEmpresa,"nombre",e)},expression:"selectedEmpresa.nombre"}}),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Dirección de la empresa",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=100||"No mayor a 100 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedEmpresa.direccion,callback:function(e){t.$set(t.selectedEmpresa,"direccion",e)},expression:"selectedEmpresa.direccion"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{attrs:{label:"Telefono de la empresa",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=15||"No mayor a 15 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedEmpresa.telefono,callback:function(e){t.$set(t.selectedEmpresa,"telefono",e)},expression:"selectedEmpresa.telefono"}})],1)],1),t._v(" "),n("h3",{attrs:{align:"center"}},[t._v("REPRESENTANTE LEGAL")]),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Primer apellido",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.primer_apellido,callback:function(e){t.$set(t.selectedItem,"primer_apellido",e)},expression:"selectedItem.primer_apellido"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{attrs:{label:"Segundo apellido"},model:{value:t.selectedItem.segundo_apellido,callback:function(e){t.$set(t.selectedItem,"segundo_apellido",e)},expression:"selectedItem.segundo_apellido"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-2",attrs:{label:"Carnet de identidad",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=20||"No mayor a 20 caracteres"}],"error-messages":t.errorCarnet,hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.verificarCarnet()}},model:{value:t.selectedItem.carnet_identidad,callback:function(e){t.$set(t.selectedItem,"carnet_identidad",e)},expression:"selectedItem.carnet_identidad"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.departamentos,"item-text":"sigla","item-value":"id",label:"Extension",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.departamento_extension_id,callback:function(e){t.$set(t.selectedItem,"departamento_extension_id",e)},expression:"selectedItem.departamento_extension_id"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.estadoCivil,label:"Estado civil",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.estado_civil,callback:function(e){t.$set(t.selectedItem,"estado_civil",e)},expression:"selectedItem.estado_civil"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.generos,"item-text":"nombre","item-value":"valor",label:"Genero",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.genero,callback:function(e){t.$set(t.selectedItem,"genero",e)},expression:"selectedItem.genero"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-2",attrs:{label:"Telefono/Celular"},model:{value:t.selectedItem.telefono,callback:function(e){t.$set(t.selectedItem,"telefono",e)},expression:"selectedItem.telefono"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-2",attrs:{label:"Email","error-messages":t.errorEmail},on:{change:function(e){return t.verificarEmail()}},model:{value:t.selectedItem.email,callback:function(e){t.$set(t.selectedItem,"email",e)},expression:"selectedItem.email"}})],1)],1),t._v(" "),n("v-text-field",{attrs:{label:"Domicilio",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=500||"No mayor a 500 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.domicilio,callback:function(e){t.$set(t.selectedItem,"domicilio",e)},expression:"selectedItem.domicilio"}}),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de nacimiento","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.birth_date_formatted,callback:function(e){t.birth_date_formatted=e},expression:"birth_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":""},on:{input:function(e){t.menu=!1}},model:{value:t.birth_date,callback:function(e){t.birth_date=e},expression:"birth_date"}})],1)],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-combobox",{staticClass:"mr-2",attrs:{items:t.paises,label:"País de nacimiento",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido, Puede crear un nuevo registro de país.</span>","persistent-hint":""},model:{value:t.pais_nacimiento,callback:function(e){t.pais_nacimiento=e},expression:"pais_nacimiento"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.departamentos,"item-text":"nombre","item-value":"id",label:"Departamento de nacimiento",clearable:""},on:{change:function(e){return t.getProvincias()}},model:{value:t.selectedItem.departamento_nacimiento_id,callback:function(e){t.$set(t.selectedItem,"departamento_nacimiento_id",e)},expression:"selectedItem.departamento_nacimiento_id"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{attrs:{items:t.provincias,"item-text":"nombre","item-value":"id",label:"Provincia de nacimiento",clearable:""},on:{change:function(e){return t.validProvincia()}},model:{value:t.selectedItem.provincia_nacimiento_id,callback:function(e){t.$set(t.selectedItem,"provincia_nacimiento_id",e)},expression:"selectedItem.provincia_nacimiento_id"}})],1)],1)],1)],1),t._v(" "),n("v-stepper-content",{attrs:{step:"2"}},[n("v-form",{ref:"form2",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs12:"",md6:""}},[t.getCamera?n("v-card",{attrs:{dark:"",color:"primary",height:"380"}},[n("v-card-title",[n("v-icon",{attrs:{large:"",left:""}},[t._v("\n camera\n ")]),t._v(" "),t.device?n("span",{staticClass:"title font-weight-light"},[t._v("\n "+t._s(t.device.label)+"\n ")]):t._e()],1),t._v(" "),n("v-card-text",{staticClass:"px-0"},[n("web-cam",{ref:"webcam",staticStyle:{margin:"-130px 0 0 0"},attrs:{width:"100%",deviceId:t.deviceId,debug:!1,googleKey:t.googleKey},on:{cameras:t.onCameras,"camera-change":t.onCameraChange}})],1)],1):t._e()],1),t._v(" "),n("v-flex",{attrs:{xs12:"",md6:""}},[n("v-card",[n("v-avatar",{attrs:{tile:"tile",size:"100%",color:"grey lighten-4"}},[n("img",{attrs:{src:t.img}})]),t._v(" "),n("v-card-title",{attrs:{"primary-title":""}},[n("v-text-field",{attrs:{rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",readonly:"",box:""},model:{value:t.valFotografia,callback:function(e){t.valFotografia=e},expression:"valFotografia"}})],1)],1)],1),t._v(" "),n("v-select",{attrs:{xs4:"",items:t.devices,label:"Seleccione camara","item-text":"label","item-value":"deviceId"},model:{value:t.camera,callback:function(e){t.camera=e},expression:"camera"}}),t._v(" "),n("v-btn",{attrs:{xs3:"",small:"",color:"primary"},on:{click:t.onCapture}},[t._v("Capturar foto "),n("v-icon",[t._v("camera")])],1)],1)],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),1!=t.step?n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.previousStep()}}},[t._v("Anterior")]):t._e(),t._v(" "),n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.nextStep()}}},[t._v("Siguiente")]),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),2==t.step?n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1):t._e()],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Representantes y organizaciones beneficiarias de donaciones")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}}),t._v(" "),n("Form",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.direccion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.telefono)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item,{sustituir:!1})}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{"topv-if":"$store.getters['auth/user'].roles.filter(e => e.name === 'admin').length > 0"}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.persona.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-center",attrs:{colspan:"2"}},[t._v("REPRESENTANTE LEGAL")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Nombre: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.fullName(e.item.persona)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("CI: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.persona.carnet_identidad+" "+e.item.persona.departamento_extension.sigla))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("CI: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.persona.carnet_identidad+" "+e.item.persona.departamento_extension.sigla))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Estado civil: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.persona.estado_civil))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Genero: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s("M"==e.item.persona.genero?"Masculino":"Femenino"))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Telefono: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.persona.telefono))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Email: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.persona.email))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Domicilio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.persona.domicilio))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.persona.fecha_nacimiento)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Pais de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.persona.pais_nacimiento.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Departamento de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.persona.departamento_nacimiento_id?n("span",[t._v("\n "+t._s(e.item.persona.departamento_nacimiento.nombre)+"\n ")]):t._e()])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Provincia de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.persona.provincia_nacimiento_id?n("span",[t._v("\n "+t._s(e.item.persona.provincia_nacimiento.nombre)+"\n ")]):t._e()])])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(827),n(831),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(828),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre del beneficiario",value:"nombre",align:"center"},{text:"Carnet de identidad",value:"carnet_identidad",align:"center"},{text:"Estado Civil",align:"estado_civil",sortable:!1},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/persona/fill/"+JSON.stringify({tipo_persona_id:7}));case 3:e=t.sent,this.table=e.data,console.log(e.data),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/guia_internacion/fill/"+JSON.stringify({persona_id:e.id}));case 2:t.sent.data.length>0?this.$toast.info("Este productor tiene guía de internación."):this.bus.$emit("openDialogRemove","api/persona/"+e.id);case 4:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},image:function(t){return t.fotografia},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e,n){var r=n(0)(n(829),n(830),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(23),l=n.n(u),d=n(42);n.n(d);function f(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}o.a.use(l.a),e.default={components:{WebCam:d.WebCam},props:["item","bus"],data:function(){return{step:1,valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},pais_nacimiento:null,menu:null,errorCarnet:null,errorEmail:null,birth_date:null,birth_date_formatted:null,estadoCivil:["Soltero","Casado","Divorciado","Viudo"],generos:[{nombre:"MASCULINO",valor:"M"},{nombre:"FEMENINO",valor:"F"}],paises:[],departamentos:[],provincias:[],tiposPersona:[],img:null,camera:null,deviceId:null,devices:[],frontCam:!0,report:null,googleKey:"",valFotografia:null,getCamera:!1}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.dialog=!0,t.selectedIndex=e,t.selectedItem=e,t.pais_nacimiento=e.pais_nacimiento.nombre,t.birth_date_formatted=t.$moment(e.fecha_nacimiento).format("DD/MM/YYYY"),t.img=e.fotografia,t.valFotografia="Fotografia capturada.",t.getProvincias()}),this.getPaises(),this.getDepartamentos(),this.getProvincias()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar"},device:function(){var t=this;return find(this.devices,function(e){return e.deviceId==t.deviceId})}},watch:{birth_date:function(t){this.selectedItem.fecha_nacimiento=t,this.birth_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")},camera:function(t){this.deviceId=t}},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.selectedEmpresa={},this.pais_nacimiento=null,this.img=null,this.step=1,this.errorCarnet=null,this.errorEmail=null,1==this.getCamera&&this.onStop(),this.$refs.form1.reset(),this.$refs.form2.reset(),this.bus.$emit("closeDialog")},save:function(){var t=f(i.a.mark(function t(){var e,n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,this.selectedItem.user_id=this.$store.getters["auth/user"].id,!this.$refs.form2.validate()){t.next=25;break}return t.next=5,c.a.get("api/pais/fill/"+JSON.stringify({nombre:this.pais_nacimiento}));case 5:if(!((e=t.sent).data.length>0)){t.next=10;break}this.selectedItem.pais_nacimiento_id=e.data[0].id,t.next=14;break;case 10:return t.next=12,c.a.post("api/pais",{nombre:this.pais_nacimiento});case 12:n=t.sent,this.selectedItem.pais_nacimiento_id=n.data.id;case 14:if(-1==this.selectedIndex){t.next=19;break}return t.next=17,c.a.put("api/persona/"+this.selectedItem.id,this.selectedItem);case 17:t.next=23;break;case 19:return this.selectedItem.tipo_persona_id=7,t.next=22,c.a.post("api/persona",this.selectedItem);case 22:t.sent;case 23:this.$toast.success("Correcto."),this.close();case 25:t.next=30;break;case 27:t.prev=27,t.t0=t.catch(0),console.log(t.t0);case 30:case"end":return t.stop()}},t,this,[[0,27]])}));return function(){return t.apply(this,arguments)}}(),getPaises:function(){var t=f(i.a.mark(function t(){var e,n,r,a,o,s,u;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/pais");case 2:for(e=t.sent,n=!0,r=!1,a=void 0,t.prev=6,o=e.data[Symbol.iterator]();!(n=(s=o.next()).done);n=!0)u=s.value,this.paises.push(u.nombre);t.next=14;break;case 10:t.prev=10,t.t0=t.catch(6),r=!0,a=t.t0;case 14:t.prev=14,t.prev=15,!n&&o.return&&o.return();case 17:if(t.prev=17,!r){t.next=20;break}throw a;case 20:return t.finish(17);case 21:return t.finish(14);case 22:case"end":return t.stop()}},t,this,[[6,10,14,22],[15,,17,21]])}));return function(){return t.apply(this,arguments)}}(),getDepartamentos:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/departamento");case 2:e=t.sent,this.departamentos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getProvincias:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.selectedItem.departamento_nacimiento_id||(this.selectedItem.departamento_nacimiento_id=null),t.next=3,c.a.get("api/provincia/fill/"+JSON.stringify({departamento_id:this.selectedItem.departamento_nacimiento_id}));case 3:e=t.sent,this.provincias=e.data;case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),validProvincia:function(){this.selectedItem.provincia_nacimiento_id||(this.selectedItem.provincia_nacimiento_id=null)},getTiposPersona:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/tipo_persona");case 2:e=t.sent,this.tiposPersona=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),verificarCarnet:function(){var t=f(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/persona/fill/"+JSON.stringify({carnet_identidad:this.selectedItem.carnet_identidad}));case 2:t.sent.data.length>0?this.errorCarnet="Ya existe este carnet.":this.errorCarnet=null;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),verificarEmail:function(){var t=f(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/persona/fill/"+JSON.stringify({email:this.selectedItem.email}));case 2:t.sent.data.length>0?this.errorEmail="Ya existe este email.":this.errorEmail=null;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),nextStep:function(){switch(this.step){case 1:this.$refs.form1.validate()&&(this.step=2,0==this.getCamera?this.getCamera=!0:this.onStart())}},previousStep:function(){switch(this.step){case 3:this.step=2;break;case 2:this.step=1,1==this.getCamera&&this.onStop()}},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},onCapture:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.$refs.webcam.capture();case 2:return this.img=t.sent,t.next=5,c.a.post("api/upload/base64_image",{base64:this.img});case 5:e=t.sent,this.selectedItem.fotografia=e.data,this.selectedItem.biometrico=e.data,this.selectedItem.carnet_escaneado=e.data,this.valFotografia="Fotografia capturada";case 10:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),onStop:function(){this.$refs.webcam.stop()},onStart:function(){this.$refs.webcam.start()},onCameras:function(t){this.devices=t},onCameraChange:function(t){this.deviceId=t,this.camera=t}},filters:{percent:function(t){return t?(Math.floor(1e4*t)/100).toFixed(0)+"%":""}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-stepper",{attrs:{vertical:""},model:{value:t.step,callback:function(e){t.step=e},expression:"step"}},[n("v-stepper-header",[n("v-stepper-step",{attrs:{step:"1",complete:t.step>1}},[t._v("Información general")]),t._v(" "),n("v-divider"),t._v(" "),n("v-stepper-step",{attrs:{step:"2",complete:t.step>2}},[t._v("Fotografía")])],1),t._v(" "),n("v-stepper-items",[n("v-stepper-content",{attrs:{step:"1"}},[n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Primer apellido",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.primer_apellido,callback:function(e){t.$set(t.selectedItem,"primer_apellido",e)},expression:"selectedItem.primer_apellido"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{attrs:{label:"Segundo apellido"},model:{value:t.selectedItem.segundo_apellido,callback:function(e){t.$set(t.selectedItem,"segundo_apellido",e)},expression:"selectedItem.segundo_apellido"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-2",attrs:{label:"Carnet de identidad",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=20||"No mayor a 20 caracteres"}],"error-messages":t.errorCarnet,hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.verificarCarnet()}},model:{value:t.selectedItem.carnet_identidad,callback:function(e){t.$set(t.selectedItem,"carnet_identidad",e)},expression:"selectedItem.carnet_identidad"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.departamentos,"item-text":"sigla","item-value":"id",label:"Extension",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.departamento_extension_id,callback:function(e){t.$set(t.selectedItem,"departamento_extension_id",e)},expression:"selectedItem.departamento_extension_id"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.estadoCivil,label:"Estado civil",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.estado_civil,callback:function(e){t.$set(t.selectedItem,"estado_civil",e)},expression:"selectedItem.estado_civil"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.generos,"item-text":"nombre","item-value":"valor",label:"Genero",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.genero,callback:function(e){t.$set(t.selectedItem,"genero",e)},expression:"selectedItem.genero"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-2",attrs:{label:"Telefono/Celular"},model:{value:t.selectedItem.telefono,callback:function(e){t.$set(t.selectedItem,"telefono",e)},expression:"selectedItem.telefono"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-2",attrs:{label:"Email","error-messages":t.errorEmail},on:{change:function(e){return t.verificarEmail()}},model:{value:t.selectedItem.email,callback:function(e){t.$set(t.selectedItem,"email",e)},expression:"selectedItem.email"}})],1)],1),t._v(" "),n("v-text-field",{attrs:{label:"Domicilio",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=500||"No mayor a 500 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.domicilio,callback:function(e){t.$set(t.selectedItem,"domicilio",e)},expression:"selectedItem.domicilio"}}),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de nacimiento","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.birth_date_formatted,callback:function(e){t.birth_date_formatted=e},expression:"birth_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":""},on:{input:function(e){t.menu=!1}},model:{value:t.birth_date,callback:function(e){t.birth_date=e},expression:"birth_date"}})],1)],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-combobox",{staticClass:"mr-2",attrs:{items:t.paises,label:"País de nacimiento",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido, Puede crear un nuevo registro de país.</span>","persistent-hint":""},model:{value:t.pais_nacimiento,callback:function(e){t.pais_nacimiento=e},expression:"pais_nacimiento"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.departamentos,"item-text":"nombre","item-value":"id",label:"Departamento de nacimiento",clearable:""},on:{change:function(e){return t.getProvincias()}},model:{value:t.selectedItem.departamento_nacimiento_id,callback:function(e){t.$set(t.selectedItem,"departamento_nacimiento_id",e)},expression:"selectedItem.departamento_nacimiento_id"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{attrs:{items:t.provincias,"item-text":"nombre","item-value":"id",label:"Provincia de nacimiento",clearable:""},on:{change:function(e){return t.validProvincia()}},model:{value:t.selectedItem.provincia_nacimiento_id,callback:function(e){t.$set(t.selectedItem,"provincia_nacimiento_id",e)},expression:"selectedItem.provincia_nacimiento_id"}})],1)],1)],1)],1),t._v(" "),n("v-stepper-content",{attrs:{step:"2"}},[n("v-form",{ref:"form2",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs12:"",md6:""}},[t.getCamera?n("v-card",{attrs:{dark:"",color:"primary",height:"380"}},[n("v-card-title",[n("v-icon",{attrs:{large:"",left:""}},[t._v("\n camera\n ")]),t._v(" "),t.device?n("span",{staticClass:"title font-weight-light"},[t._v("\n "+t._s(t.device.label)+"\n ")]):t._e()],1),t._v(" "),n("v-card-text",{staticClass:"px-0"},[n("web-cam",{ref:"webcam",staticStyle:{margin:"-130px 0 0 0"},attrs:{width:"100%",deviceId:t.deviceId,debug:!1,googleKey:t.googleKey},on:{cameras:t.onCameras,"camera-change":t.onCameraChange}})],1)],1):t._e()],1),t._v(" "),n("v-flex",{attrs:{xs12:"",md6:""}},[n("v-card",[n("v-avatar",{attrs:{tile:"tile",size:"100%",color:"grey lighten-4"}},[n("img",{attrs:{src:t.img}})]),t._v(" "),n("v-card-title",{attrs:{"primary-title":""}},[n("v-text-field",{attrs:{rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",readonly:"",box:""},model:{value:t.valFotografia,callback:function(e){t.valFotografia=e},expression:"valFotografia"}})],1)],1)],1),t._v(" "),n("v-select",{attrs:{xs4:"",items:t.devices,label:"Seleccione camara","item-text":"label","item-value":"deviceId"},model:{value:t.camera,callback:function(e){t.camera=e},expression:"camera"}}),t._v(" "),n("v-btn",{attrs:{xs3:"",small:"",color:"primary"},on:{click:t.onCapture}},[t._v("Capturar foto "),n("v-icon",[t._v("camera")])],1)],1)],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),1!=t.step?n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.previousStep()}}},[t._v("Anterior")]):t._e(),t._v(" "),n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.nextStep()}}},[t._v("Siguiente")]),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),2==t.step?n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1):t._e()],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Beneficiarios de proyectos de desarrollo integral")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}}),t._v(" "),n("Form",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.fullName(e.item))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.carnet_identidad+" "+e.item.departamento_extension.sigla)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.estado_civil)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),t.$store.getters["auth/user"].roles.filter(function(t){return"admin"===t.name}).length>0?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1):t._e()],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Genero: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s("M"==e.item.genero?"Masculino":"Femenino"))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Telefono: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.telefono))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Email: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.email))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Domicilio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.domicilio))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.fecha_nacimiento)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Pais de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.pais_nacimiento.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Departamento de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.departamento_nacimiento_id?n("span",[t._v("\n "+t._s(e.item.departamento_nacimiento.nombre)+"\n ")]):t._e()])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Provincia de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.provincia_nacimiento_id?n("span",[t._v("\n "+t._s(e.item.provincia_nacimiento.nombre)+"\n ")]):t._e()])])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(833),n(844),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(834),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Fecha parcela",value:"fecha_parcela",align:"center"},{text:"Código catastral",value:"codigo_catastral",align:"center"},{text:"Comunidad",value:"comunidad.nombre",align:"center"},{text:"Latitud",value:"latitud",align:"center"},{text:"Longitud",value:"longitud",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/parcela");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/parcela/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e,n){var r=n(0)(n(835),n(843),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(68),l=n.n(u),d=n(74);n.n(d);function f(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}o.a.use(l.a),e.default={components:{lmap:d},props:["item","bus"],data:function(){return{bus_map:new o.a,step:1,valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},personas:[],temp:[],persona:null,menu:null,menu1:null,begin_date:null,begin_date_formatted:null,end_date:null,end_date_formatted:null,vehiculos:[],vehiculo:null,marcas:[],marca:null,colores:[],color:null,correlativo:null,departamentos:[],localidad:null,localidades:[],rutas:[],ruta:null,markers:[],markersTemp:[],place:null,lat:-16.290154,lng:-63.588654,zoom:5,puestos_de_control:[],permanencia:[],error:"",puestos_venta:[],direct:!1,comunidades:[],regionales:[]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.dialog=!0,t.selectedIndex=e,t.selectedItem=e,t.selectedItem.persona_id=e.personas[0].pivot.persona_id,t.begin_date_formatted=t.$moment(e.fecha_inicio).format("DD/MM/YYYY"),t.end_date_formatted=t.$moment(e.fecha_final).format("DD/MM/YYYY")}),this.bus.$on("closeDialogIniciar",function(){t.close()}),this.getDepartamentos(),this.getPersonas(),this.getVehiculos(),this.getMarcas(),this.getRutas(),this.getPuestosControl(),this.getLocalidades(),this.getPuestosVenta(),this.getComunidades(),this.getRegionales()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar"}},watch:{begin_date:function(t){this.selectedItem.fecha_parcela=t,this.begin_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},methods:{close:function(){this.persona=null,this.verifica=!1,this.encontrado={},this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.step=1,this.direct=!1,this.$refs.form1.reset(),this.$refs.form2.reset(),this.bus.$emit("closeDialog")},save:function(){var t=f(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,this.selectedItem.user_id=this.$store.getters["auth/user"].id,!this.$refs.form2.validate()){t.next=13;break}if(-1==this.selectedIndex){t.next=8;break}return t.next=6,c.a.put("api/parcela/"+this.selectedItem.id,this.selectedItem);case 6:t.next=11;break;case 8:return this.selectedItem.personas=[this.persona.id],t.next=11,c.a.post("api/parcela",this.selectedItem);case 11:this.$toast.success("Correcto."),this.close();case 13:t.next=18;break;case 15:t.prev=15,t.t0=t.catch(0),console.log(t.t0);case 18:case"end":return t.stop()}},t,this,[[0,15]])}));return function(){return t.apply(this,arguments)}}(),getPersonas:function(){var t=f(i.a.mark(function t(){var e,n,r,a,o,s,u,l;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/persona/fill/"+JSON.stringify({tipo_persona_id:1}));case 2:return e=t.sent,t.next=5,c.a.get("api/persona/fill/"+JSON.stringify({tipo_persona_id:2}));case 5:for(n=t.sent,this.temp=e.data.concat(n.data),r=!0,a=!1,o=void 0,t.prev=10,s=this.temp[Symbol.iterator]();!(r=(u=s.next()).done);r=!0)0==(l=u.value).poder.length&&this.personas.push(l);t.next=18;break;case 14:t.prev=14,t.t0=t.catch(10),a=!0,o=t.t0;case 18:t.prev=18,t.prev=19,!r&&s.return&&s.return();case 21:if(t.prev=21,!a){t.next=24;break}throw o;case 24:return t.finish(21);case 25:return t.finish(18);case 26:case"end":return t.stop()}},t,this,[[10,14,18,26],[19,,21,25]])}));return function(){return t.apply(this,arguments)}}(),getPersona:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/persona/fill/"+JSON.stringify({id:this.selectedItem.persona_id}));case 2:e=t.sent,this.persona=e.data[0];case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getVehiculos:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/vehiculo");case 2:e=t.sent,this.vehiculos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getMarcas:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/marca");case 2:e=t.sent,this.marcas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getLocalidades:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/localidad");case 2:e=t.sent,this.localidades=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getDepartamentos:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/departamento");case 2:e=t.sent,this.departamentos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getRutas:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/ruta");case 2:e=t.sent,this.rutas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getRuta:function(){var t=f(i.a.mark(function t(){var e,n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/ruta/"+this.selectedItem.ruta_id);case 2:for(e=t.sent,this.ruta=e.data,this.markersTemp=[],n=0;n<this.ruta.puestos_de_control.length;n++)this.markersTemp.push({id:this.ruta.puestos_de_control[n].id,position:{lat:parseFloat(this.ruta.puestos_de_control[n].latitud),lng:parseFloat(this.ruta.puestos_de_control[n].longitud)}});case 6:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getPuestosVenta:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/puesto_venta");case 2:e=t.sent,this.puestos_venta=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getPuestosControl:function(){var t=f(i.a.mark(function t(){var e,n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/puesto_de_control");case 2:for(e=t.sent,this.puestos_de_control=e.data,n=0;n<this.puestos_de_control.length;n++)(r=this.addMarker()).position.lat=parseFloat(this.puestos_de_control[n].latitud),r.position.lng=parseFloat(this.puestos_de_control[n].longitud),r.id=this.puestos_de_control[n].id;case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getCorrelativo:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/hoja_ruta/max/correlativo");case 2:e=t.sent,this.selectedItem.correlativo=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getComunidades:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/comunidad");case 2:e=t.sent,this.comunidades=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getRegionales:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/regional");case 2:e=t.sent,this.regionales=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),printItem:function(){var t=f(i.a.mark(function t(e){var n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c()({method:"GET",url:"api/hoja_ruta/print/"+e.id,responseType:"arraybuffer"});case 3:n=t.sent,r=new Blob([n.data],{type:"application/pdf"}),printJS(window.URL.createObjectURL(r)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}(),addMarker:function(){return this.lastId++,this.markers.push({position:{lat:48.8538302,lng:2.2982161},opacity:1,draggable:!0,enabled:!0,clicked:0,rightClicked:0,dragended:0,ifw:!0,ifw2text:"This text is bad please change me :( "}),this.markers[this.markers.length-1]},nextStep:function(){switch(this.step){case 1:this.$refs.form1.validate()&&(this.step=2)}},previousStep:function(){switch(this.step){case 2:this.step=1}},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},openMap:function(){this.bus_map.$emit("openMap")},setGeo:function(){null!=this.selectedItem.longitud&&null!=this.selectedItem.latitud&&this.bus_map.$emit("setMarker",{lat:this.selectedItem.latitud,lng:this.selectedItem.longitud})}}}},function(t,e,n){var r={"./af":147,"./af.js":147,"./ar":148,"./ar-dz":149,"./ar-dz.js":149,"./ar-kw":150,"./ar-kw.js":150,"./ar-ly":151,"./ar-ly.js":151,"./ar-ma":152,"./ar-ma.js":152,"./ar-sa":153,"./ar-sa.js":153,"./ar-tn":154,"./ar-tn.js":154,"./ar.js":148,"./az":155,"./az.js":155,"./be":156,"./be.js":156,"./bg":157,"./bg.js":157,"./bm":158,"./bm.js":158,"./bn":159,"./bn.js":159,"./bo":160,"./bo.js":160,"./br":161,"./br.js":161,"./bs":162,"./bs.js":162,"./ca":163,"./ca.js":163,"./cs":164,"./cs.js":164,"./cv":165,"./cv.js":165,"./cy":166,"./cy.js":166,"./da":167,"./da.js":167,"./de":168,"./de-at":169,"./de-at.js":169,"./de-ch":170,"./de-ch.js":170,"./de.js":168,"./dv":171,"./dv.js":171,"./el":172,"./el.js":172,"./en-SG":173,"./en-SG.js":173,"./en-au":174,"./en-au.js":174,"./en-ca":175,"./en-ca.js":175,"./en-gb":176,"./en-gb.js":176,"./en-ie":177,"./en-ie.js":177,"./en-il":178,"./en-il.js":178,"./en-nz":179,"./en-nz.js":179,"./eo":180,"./eo.js":180,"./es":109,"./es-do":181,"./es-do.js":181,"./es-us":182,"./es-us.js":182,"./es.js":109,"./et":183,"./et.js":183,"./eu":184,"./eu.js":184,"./fa":185,"./fa.js":185,"./fi":186,"./fi.js":186,"./fo":187,"./fo.js":187,"./fr":188,"./fr-ca":189,"./fr-ca.js":189,"./fr-ch":190,"./fr-ch.js":190,"./fr.js":188,"./fy":191,"./fy.js":191,"./ga":192,"./ga.js":192,"./gd":193,"./gd.js":193,"./gl":194,"./gl.js":194,"./gom-latn":195,"./gom-latn.js":195,"./gu":196,"./gu.js":196,"./he":197,"./he.js":197,"./hi":198,"./hi.js":198,"./hr":199,"./hr.js":199,"./hu":200,"./hu.js":200,"./hy-am":201,"./hy-am.js":201,"./id":202,"./id.js":202,"./is":203,"./is.js":203,"./it":204,"./it-ch":205,"./it-ch.js":205,"./it.js":204,"./ja":206,"./ja.js":206,"./jv":207,"./jv.js":207,"./ka":208,"./ka.js":208,"./kk":209,"./kk.js":209,"./km":210,"./km.js":210,"./kn":211,"./kn.js":211,"./ko":212,"./ko.js":212,"./ku":213,"./ku.js":213,"./ky":214,"./ky.js":214,"./lb":215,"./lb.js":215,"./lo":216,"./lo.js":216,"./lt":217,"./lt.js":217,"./lv":218,"./lv.js":218,"./me":219,"./me.js":219,"./mi":220,"./mi.js":220,"./mk":221,"./mk.js":221,"./ml":222,"./ml.js":222,"./mn":223,"./mn.js":223,"./mr":224,"./mr.js":224,"./ms":225,"./ms-my":226,"./ms-my.js":226,"./ms.js":225,"./mt":227,"./mt.js":227,"./my":228,"./my.js":228,"./nb":229,"./nb.js":229,"./ne":230,"./ne.js":230,"./nl":231,"./nl-be":232,"./nl-be.js":232,"./nl.js":231,"./nn":233,"./nn.js":233,"./pa-in":234,"./pa-in.js":234,"./pl":235,"./pl.js":235,"./pt":236,"./pt-br":237,"./pt-br.js":237,"./pt.js":236,"./ro":238,"./ro.js":238,"./ru":239,"./ru.js":239,"./sd":240,"./sd.js":240,"./se":241,"./se.js":241,"./si":242,"./si.js":242,"./sk":243,"./sk.js":243,"./sl":244,"./sl.js":244,"./sq":245,"./sq.js":245,"./sr":246,"./sr-cyrl":247,"./sr-cyrl.js":247,"./sr.js":246,"./ss":248,"./ss.js":248,"./sv":249,"./sv.js":249,"./sw":250,"./sw.js":250,"./ta":251,"./ta.js":251,"./te":252,"./te.js":252,"./tet":253,"./tet.js":253,"./tg":254,"./tg.js":254,"./th":255,"./th.js":255,"./tl-ph":256,"./tl-ph.js":256,"./tlh":257,"./tlh.js":257,"./tr":258,"./tr.js":258,"./tzl":259,"./tzl.js":259,"./tzm":260,"./tzm-latn":261,"./tzm-latn.js":261,"./tzm.js":260,"./ug-cn":262,"./ug-cn.js":262,"./uk":263,"./uk.js":263,"./ur":264,"./ur.js":264,"./uz":265,"./uz-latn":266,"./uz-latn.js":266,"./uz.js":265,"./vi":267,"./vi.js":267,"./x-pseudo":268,"./x-pseudo.js":268,"./yo":269,"./yo.js":269,"./zh-cn":270,"./zh-cn.js":270,"./zh-hk":271,"./zh-hk.js":271,"./zh-tw":272,"./zh-tw.js":272};function i(t){return n(a(t))}function a(t){var e=r[t];if(!(e+1))throw new Error("Cannot find module '"+t+"'.");return e}i.keys=function(){return Object.keys(r)},i.resolve=a,t.exports=i,i.id=836},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=(n.n(r),n(341)),a=(n.n(i),n(342));n.n(a);delete i.Icon.Default.prototype._getIconUrl,i.Icon.Default.mergeOptions({iconRetinaUrl:n(344),iconUrl:n(273),shadowUrl:n(75)}),e.default={props:["item","bus"],data:function(){return{latitud:null,longitud:null}},created:function(){},mounted:function(){var t=this;this.initMap(),this.resize(),this.bus.$on("setMarker",function(e){t.resize(),t.addmarker(e)}),this.bus.$on("openMap",function(){t.resize()}),this.bus.$on("addExtraMarker",function(e){t.addExtraMarker(e)}),this.bus.$on("clearMap",function(e){t.clearLayer()}),this.bus.$on("selectExtraMarker",function(e){t.selectExtraMarker(e)})},methods:{initMap:function(){var t=this;this.map=L.map("map").setView([-16.290154,-63.588654],6),L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(this.map),this.layerGroup=L.layerGroup(),this.layerGroup.addTo(this.map),this.map.on("click",function(e){return t.addmarker(e.latlng)})},clearLayer:function(){this.layerGroup.clearLayers()},addmarker:function(t){this.layerGroup.clearLayers();var e=L.marker(t);this.latitud=t.lat,this.longitud=t.lng,e.addTo(this.layerGroup),this.map.setView(t,7),this.sendMarker(e.getLatLng())},addExtraMarker:function(t){var e=this;this.map.off("click");var r=L.marker(t.latlng,{markerId:t.id});r.on("click",function(r){r.target.setIcon(L.icon({iconRetinaUrl:"/img/marker-icon-2x.png",iconUrl:"/img/marker-icon.png",shadowUrl:n(75)})),e.bus.$emit("marker_id",{latlng:t.latLng,id:r.target.options.markerId})}),r.addTo(this.layerGroup),this.map.setView(t.latlng,7)},selectExtraMarker:function(t){var e=this;this.map.off("click"),this.markersTemp=[];var r=L.marker(t.latlng,{markerId:t.id});this.layerGroup.eachLayer(function(i){t.id===i.options.markerId&&(r.setIcon(L.icon({iconRetinaUrl:"/img/marker-icon-2x.png",iconUrl:"/img/marker-icon.png",shadowUrl:n(75)})),r.addTo(e.layerGroup))})},resize:function(){var t=this;setTimeout(function(){t.map.invalidateSize()},50),this.layerGroup.clearLayers()},sendMarker:function(t){this.bus.$emit("marked",t)}}}},function(t,e,n){var r=n(343);(t.exports=n(55)(!1)).push([t.i,".leaflet-image-layer,.leaflet-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane,.leaflet-pane>canvas,.leaflet-pane>svg,.leaflet-tile,.leaflet-tile-container,.leaflet-zoom-box{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-overlay-pane svg,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer{max-width:none!important;max-height:none!important}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-bottom,.leaflet-top{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-tile{will-change:opacity}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}.leaflet-zoom-anim .leaflet-zoom-animated{will-change:transform;-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-pan-anim .leaflet-tile,.leaflet-zoom-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-control,.leaflet-popup-pane{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-image-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-image-layer.leaflet-interactive,.leaflet-marker-icon.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline:0}.leaflet-container a{color:#0078a8}.leaflet-container a.leaflet-active{outline:2px solid orange}.leaflet-zoom-box{border:2px dotted #38f;background:hsla(0,0%,100%,.5)}.leaflet-container{font:12px/1.5 Helvetica Neue,Arial,Helvetica,sans-serif}.leaflet-bar{box-shadow:0 1px 5px rgba(0,0,0,.65);border-radius:4px}.leaflet-bar a,.leaflet-bar a:hover{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px rgba(0,0,0,.4);background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url("+r(n(839))+");width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url("+r(n(840))+");background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers-expanded .leaflet-control-layers-toggle,.leaflet-control-layers .leaflet-control-layers-list{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url("+r(n(273))+')}.leaflet-container .leaflet-control-attribution{background:#fff;background:hsla(0,0%,100%,.7);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover{text-decoration:underline}.leaflet-container .leaflet-control-attribution,.leaflet-container .leaflet-control-scale{font-size:11px}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;font-size:11px;white-space:nowrap;overflow:hidden;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;background:hsla(0,0%,100%,.5)}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers{box-shadow:none}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-layers{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 19px;line-height:1.4}.leaflet-popup-content p{margin:18px 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px rgba(0,0,0,.4)}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;padding:4px 4px 0 0;border:none;text-align:center;width:18px;height:14px;font:16px/14px Tahoma,Verdana,sans-serif;color:#c3c3c3;text-decoration:none;font-weight:700;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover{color:#999}.leaflet-popup-scrolled{overflow:auto;border-bottom:1px solid #ddd;border-top:1px solid #ddd}.leaflet-oldie .leaflet-popup-content-wrapper{zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678,M12=0.70710678,M21=-0.70710678,M22=0.70710678)}.leaflet-oldie .leaflet-popup-tip-container{margin-top:-1px}.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px rgba(0,0,0,.4)}.leaflet-tooltip.leaflet-clickable{cursor:pointer;pointer-events:auto}.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before,.leaflet-tooltip-top:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}',""])},function(t,e){t.exports="/images/vendor/leaflet/dist/layers.png?a6137456ed160d7606981aa57c559898"},function(t,e){t.exports="/images/vendor/leaflet/dist/layers-2x.png?4f0283c6ce28e888000e978e537a6a56"},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,r=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var i,a=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(a)?t:(i=0===a.indexOf("//")?a:0===a.indexOf("/")?n+a:r+a.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")})}},function(t,e){t.exports={render:function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"map",attrs:{id:"map"}})},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},on:{"!click":function(e){return t.openMap(e)}},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-stepper",{attrs:{vertical:""},model:{value:t.step,callback:function(e){t.step=e},expression:"step"}},[n("v-stepper-header",[n("v-stepper-step",{attrs:{step:"1",complete:t.step>1}},[t._v("Productor")]),t._v(" "),n("v-divider"),t._v(" "),n("v-stepper-step",{attrs:{step:"2",complete:t.step>2}},[t._v("Parcela")])],1),t._v(" "),n("v-stepper-items",[n("v-stepper-content",{attrs:{step:"1"}},[n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-autocomplete",{attrs:{items:t.personas,"item-text":"carnet_identidad","item-value":"id",label:"Carnet de identidad",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.getPersona()}},model:{value:t.selectedItem.persona_id,callback:function(e){t.$set(t.selectedItem,"persona_id",e)},expression:"selectedItem.persona_id"}})],1),t._v(" "),null!=t.persona?n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:t.persona.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Nombre: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s(t.fullName(t.persona))+" ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Carnet de identidad: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s(t.persona.carnet_identidad+" "+t.persona.departamento_extension.sigla)+" ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Estado civil: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s(t.persona.estado_civil)+" ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Género: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s("M"==t.persona.genero?"Masculino":"Femenino")+" ")])])])])],1)],1)],1):t._e()],1),t._v(" "),n("v-stepper-content",{attrs:{step:"2"}},[n("v-form",{ref:"form2",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm4:"",md4:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Edad de parcela",type:"number",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.edad_parcela,callback:function(e){t.$set(t.selectedItem,"edad_parcela",e)},expression:"selectedItem.edad_parcela"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.comunidades,"item-text":"nombre","item-value":"id",label:"Comunidad",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.comunidad_id,callback:function(e){t.$set(t.selectedItem,"comunidad_id",e)},expression:"selectedItem.comunidad_id"}}),t._v(" "),n("v-text-field",{attrs:{label:"Latitud",type:"number",rules:[function(t){return!!t||"Requerido"},function(t){return/^-?([1-8]?[1-9]|[1-9]0)\.{1}\d{1,6}/.test(t)||"latitud incorrecta"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.setGeo()}},model:{value:t.selectedItem.latitud,callback:function(e){t.$set(t.selectedItem,"latitud",e)},expression:"selectedItem.latitud"}}),t._v(" "),n("v-text-field",{attrs:{label:"Longitud",type:"number",rules:[function(t){return!!t||"Requerido"},function(t){return/^-?([1-8]?[1-9]|[1-9]0)\.{1}\d{1,6}/.test(t)||"longitud incorrecta"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.setGeo()}},model:{value:t.selectedItem.longitud,callback:function(e){t.$set(t.selectedItem,"longitud",e)},expression:"selectedItem.longitud"}}),t._v(" "),n("v-text-field",{attrs:{label:"Hectareas",type:"number",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.hectareas,callback:function(e){t.$set(t.selectedItem,"hectareas",e)},expression:"selectedItem.hectareas"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm4:"",md4:""}},[n("v-card-text",[n("v-textarea",{attrs:{label:"Descripción",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=500||"No mayor a 500 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}}),t._v(" "),n("v-text-field",{attrs:{label:"Codigo catastral",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=100||"No mayor a 100 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.codigo_catastral,callback:function(e){t.$set(t.selectedItem,"codigo_catastral",e)},expression:"selectedItem.codigo_catastral"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.regionales,"item-text":"nombre","item-value":"id",label:"Región",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.region_id,callback:function(e){t.$set(t.selectedItem,"region_id",e)},expression:"selectedItem.region_id"}})],1)],1),t._v(" "),n("v-flex",{attrs:{xs12:"",sm4:"",md4:""}},[n("v-card-text",[n("lmap",{staticStyle:{height:"350px"},attrs:{bus:t.bus_map}})],1)],1)],1)],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),1!=t.step?n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.previousStep()}}},[t._v("Anterior")]):t._e(),t._v(" "),2!=t.step?n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.nextStep()}}},[t._v("Siguiente")]):t._e(),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),2==t.step?n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1):t._e()],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Parcelas")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.formatDate(e.item.fecha_parcela))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.codigo_catastral)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.comunidad.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.latitud)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.longitud)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Descripción: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.descripcion))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Hectáreas: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.hectareas))])]),t._v(" "),null!=e.item.motivo_actualizacion?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Motivo de actualización: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.motivo_actualizacion.nombre))])]):t._e(),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Código catastral: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.codigo_catastral))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Región: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.region.nombre))])])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(846),n(853),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(847),l=n.n(u),d=n(850),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{Form:l.a,Verificacion:f.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre",value:"primer_apellido",align:"center"},{text:"Carnet de identidad",value:"carnet_identidad",align:"center"},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],idpersona:0,search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable(),t.idpersona=item.id,t.selectedItem=idpersona}),this.bus.$on("openDialogForm",function(e){t.idpersona=e.id,t.dialog=!0,t.selectedItem=e,t.selectedIndex=e,t.getTable2()})},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.table=[],this.bus.$emit("closeDialog",this.selectedItem)},getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/persona/fill/"+JSON.stringify({tipo_persona_id:1}));case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),getTable2:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/parcela/showfill/"+this.selectedItem.id);case 3:e=t.sent,this.table2=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),getTableVerificacion:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/parcela/showfillver/"+this.selectedItem.id);case 3:e=t.sent,this.table2=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialogForm",t)},formItem:function(t){this.bus.$emit("openDialogVer",t)},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},image:function(t){return t.fotografia},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e,n){var r=n(0)(n(848),n(849),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}e.default={components:{},props:["item","bus"],data:function(){var t;return u(t={step:1,valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{}},"selectedItem",{user_id:null}),u(t,"regiones",[]),u(t,"motivos",[]),u(t,"parcela",[]),u(t,"table",[]),u(t,"table2",[]),u(t,"lat",-16.290154),u(t,"lng",-63.588654),u(t,"options",{url:"api/upload/file",headers:s.a.defaults.headers.common,paramName:"file",uploadMultiple:!1,acceptedFiles:{extensions:["application/pdf"],message:"Formato no permitido."},maxFilesize:{limit:5,message:"El archivo excede los 5Mb."},maxFiles:1}),u(t,"fileAdjunto",null),u(t,"valArchivo",null),t},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogForm",function(e){t.idpersona=e.id,t.dialog=!0,t.selectedIndex=e,t.selectedItem=e,t.getTable()}),this.getRegiones(),this.getMotivosActualizacion()},computed:{},watch:{},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialogForm"),this.selectedIndex=-1,this.selectedItem={},this.fileAdjunto=null,this.table=[],this.table2=[]},save:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,this.selectedItem.user_id=this.$store.getters["auth/user"].id,!this.$refs.form.validate()){t.next=13;break}if("Editar"!=this.selectedItem.mode){t.next=6;break}t.next=11;break;case 6:return e={informe_adjunto:this.fileAdjunto,observaciones:this.selectedItem.observaciones,verificacion_destruccion:!1},t.next=9,s.a.post("api/autorizacionrenovacion",e);case 9:return t.next=11,s.a.put("api/parcela/edit/"+this.selectedItem.id,this.selectedItem);case 11:this.$toast.success("Correcto."),this.close();case 13:t.next=18;break;case 15:t.prev=15,t.t0=t.catch(0),console.log(t.t0);case 18:case"end":return t.stop()}},t,this,[[0,15]])}));return function(){return t.apply(this,arguments)}}(),getRegiones:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/regional");case 2:e=t.sent,this.regiones=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getMotivosActualizacion:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/motivoactualizacion");case 2:e=t.sent,this.motivos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getTable:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s.a.get("api/parcela/showfill/"+this.selectedItem.id);case 3:e=t.sent,this.table=e.data[0],this.selectedItem=this.table,t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")},complete:function(t,e,n){this.fileAdjunto=n.response,this.valArchivo="Cargado correctamente."},setGeo:function(){null!=this.selectedItem.longitud&&null!=this.selectedItem.latitud&&this.bus_map.$emit("setMarker",{lat:this.selectedItem.latitud,lng:this.selectedItem.longitud})}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Registro de Autorización de Renovación")])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-autocomplete",{attrs:{items:t.regiones,"item-text":"nombre","item-value":"id",label:"Region",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.region_id,callback:function(e){t.$set(t.selectedItem,"region_id",e)},expression:"selectedItem.region_id"}}),t._v(" "),n("v-text-field",{attrs:{label:"Codigo",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=5||"No mayor a 5 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.codigo_catastral,callback:function(e){t.$set(t.selectedItem,"codigo_catastral",e)},expression:"selectedItem.codigo_catastral"}}),t._v(" "),n("v-text-field",{attrs:{label:"Latitud",type:"number",rules:[function(t){return!!t||"Requerido"},function(t){return/^-?([1-8]?[1-9]|[1-9]0)\.{1}\d{1,6}/.test(t)||"latitud incorrecta"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.setGeo()}},model:{value:t.selectedItem.latitud,callback:function(e){t.$set(t.selectedItem,"latitud",e)},expression:"selectedItem.latitud"}}),t._v(" "),n("v-text-field",{attrs:{"aria-disabled":"true",label:"Longitud",type:"number",rules:[function(t){return!!t||"Requerido"},function(t){return/^-?([1-8]?[1-9]|[1-9]0)\.{1}\d{1,6}/.test(t)||"longitud incorrecta"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.setGeo()}},model:{value:t.selectedItem.longitud,callback:function(e){t.$set(t.selectedItem,"longitud",e)},expression:"selectedItem.longitud"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-select",{attrs:{items:t.motivos,"item-text":"nombre","item-value":"id",label:"Motivo de Actualización"},model:{value:t.selectedItem.motivo_actualizacion_id,callback:function(e){t.$set(t.selectedItem,"motivo_actualizacion_id",e)},expression:"selectedItem.motivo_actualizacion_id"}}),t._v(" "),n("v-textarea",{attrs:{label:"Observaciones"},model:{value:t.selectedItem.observaciones,callback:function(e){t.$set(t.selectedItem,"observaciones",e)},expression:"selectedItem.observaciones"}}),t._v(" "),[n("vue-clip",{attrs:{options:t.options,"on-complete":t.complete},scopedSlots:t._u([{key:"clip-uploader-body",fn:function(e){return t._l(e.files,function(e,r){return n("div",{key:r},["success"==e.status?n("v-icon",{attrs:{color:"success"}},[t._v("check_circle")]):t._e(),t._v(" "),"success"==e.status?n("span",{staticClass:"green--text"},[t._v(" correcto.")]):t._e(),t._v(" "),"error"==e.status?n("v-icon",{attrs:{color:"error"}},[t._v("error")]):t._e(),t._v(" "),"error"==e.status?n("span",{staticClass:"red--text"},[t._v(" "+t._s(e.errorMessage))]):t._e()],1)})}}])},[n("template",{slot:"clip-uploader-action"},[n("div",{staticClass:"dz-message v-btn v-btn--small theme--light success"},[t._v("Subir archivo PDF")])])],2)],t._v(" "),n("v-text-field",{attrs:{readonly:"",box:"",label:"Archivo PDF"},model:{value:t.valArchivo,callback:function(e){t.valArchivo=e},expression:"valArchivo"}})],2)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(851),n(852),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{},props:["item","bus"],data:function(){return{step:1,valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},regiones:[],motivos:[],parcela:[],table:[],table2:[],lat:-16.290154,lng:-63.588654,options:{url:"api/upload/file",headers:s.a.defaults.headers.common,paramName:"file",uploadMultiple:!1,acceptedFiles:{extensions:["application/pdf"],message:"Formato no permitido."},maxFilesize:{limit:5,message:"El archivo excede los 5Mb."},maxFiles:1},fileAdjunto:null,valArchivo:null}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogVer",function(e){t.idpersona=e.id,t.dialog=!0,t.selectedItem=e,t.selectedIndex=e,t.getTableVerificacion()}),this.getRegiones(),this.getMotivosActualizacion()},computed:{},watch:{},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialogVer"),this.selectedIndex=-1,this.selectedItem={},this.fileAdjunto=null,this.table=[],this.table2=[]},save:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,this.selectedItem.user_id=this.$store.getters["auth/user"].id,!this.$refs.form.validate()){t.next=13;break}if("Editar"!=this.selectedItem.mode){t.next=6;break}t.next=11;break;case 6:return e={informe_adjunto:this.fileAdjunto,observaciones:this.selectedItem.observaciones,verificacion_destruccion:!1},t.next=9,s.a.post("api/autorizacionrenovacion",e);case 9:return t.next=11,s.a.put("api/parcela/edit/"+this.selectedItem.id,this.selectedItem);case 11:this.$toast.success("Correcto."),this.close();case 13:t.next=18;break;case 15:t.prev=15,t.t0=t.catch(0),console.log(t.t0);case 18:case"end":return t.stop()}},t,this,[[0,15]])}));return function(){return t.apply(this,arguments)}}(),getRegiones:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/regional");case 2:e=t.sent,this.regiones=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getMotivosActualizacion:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/motivoactualizacion");case 2:e=t.sent,this.motivos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getTableVerificacion:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s.a.get("api/parcela/showfillver/"+this.selectedItem.id);case 3:e=t.sent,this.table2=e.data[0],this.selectedItem=this.table2,t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")},complete:function(t,e,n){this.fileAdjunto=n.response,this.valArchivo="Cargado correctamente."},setGeo:function(){null!=this.selectedItem.longitud&&null!=this.selectedItem.latitud&&this.bus_map.$emit("setMarker",{lat:this.selectedItem.latitud,lng:this.selectedItem.longitud})}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Verficación de Autorización de Renovación")])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-autocomplete",{attrs:{items:t.regiones,"item-text":"nombre","item-value":"id",label:"Region",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.region_id,callback:function(e){t.$set(t.selectedItem,"region_id",e)},expression:"selectedItem.region_id"}}),t._v(" "),n("v-text-field",{attrs:{label:"Codigo",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=5||"No mayor a 5 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.codigo_catastral,callback:function(e){t.$set(t.selectedItem,"codigo_catastral",e)},expression:"selectedItem.codigo_catastral"}}),t._v(" "),n("v-text-field",{attrs:{label:"Latitud",type:"number",rules:[function(t){return!!t||"Requerido"},function(t){return/^-?([1-8]?[1-9]|[1-9]0)\.{1}\d{1,6}/.test(t)||"latitud incorrecta"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.setGeo()}},model:{value:t.selectedItem.latitud,callback:function(e){t.$set(t.selectedItem,"latitud",e)},expression:"selectedItem.latitud"}}),t._v(" "),n("v-text-field",{attrs:{label:"Longitud",type:"number",rules:[function(t){return!!t||"Requerido"},function(t){return/^-?([1-8]?[1-9]|[1-9]0)\.{1}\d{1,6}/.test(t)||"longitud incorrecta"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.setGeo()}},model:{value:t.selectedItem.longitud,callback:function(e){t.$set(t.selectedItem,"longitud",e)},expression:"selectedItem.longitud"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-select",{attrs:{items:t.motivos,"item-text":"nombre","item-value":"id",label:"Motivo de Actualización"},model:{value:t.selectedItem.motivo_actualizacion_id,callback:function(e){t.$set(t.selectedItem,"motivo_actualizacion_id",e)},expression:"selectedItem.motivo_actualizacion_id"}}),t._v(" "),n("v-textarea",{attrs:{label:"Observaciones"},model:{value:t.selectedItem.observaciones,callback:function(e){t.$set(t.selectedItem,"observaciones",e)},expression:"selectedItem.observaciones"}}),t._v(" "),[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Adjunto: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:t.selectedItem.informe_adjunto,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)])])])],1)]],2)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Registro de Autorización de Renovaciones de Parcelas de Coca ")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("Verificacion",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.fullName(e.item))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.carnet_identidad+" "+e.item.departamento_extension.sigla)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("credit_card")])],1),t._v(" "),n("span",[t._v("Registro de Renovación")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.formItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("assignment")])],1),t._v(" "),n("span",[t._v("Verificación de Renovación")])],1)],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Estado civil: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.estado_civil))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Genero: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s("M"==e.item.genero?"Masculino":"Femenino"))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Teléfono: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.telefono))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Email: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.email))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Domicilio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.domicilio))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.fecha_nacimiento)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Pais de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.pais_nacimiento.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Departamento de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.departamento_nacimiento_id?n("span",[t._v("\n "+t._s(e.item.departamento_nacimiento.nombre)+"\n ")]):t._e()])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Provincia de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.provincia_nacimiento_id?n("span",[t._v("\n "+t._s(e.item.provincia_nacimiento.nombre)+"\n ")]):t._e()])])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(855),n(858),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(345),l=n.n(u);e.default={components:{Form:l.a},data:function(){return{bus:new o.a,headers:[{text:"Comunidad",value:"comunidad.nombre",align:"center"},{text:"Hectáreas",value:"hectareas",align:"center"},{text:"Latitud",value:"latitud",align:"center"},{text:"Longitud",value:"longitud",align:"center"},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t,e=(t=i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/parcela");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}(),openItem:function(t){this.bus.$emit("openDialogForm",t)}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o),c=n(345),u=n.n(c),l=n(108),d=n.n(l);function f(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}e.default={components:{Form:u.a,ConfirmItem:d.a},props:["item","bus"],data:function(){var t;return f(t={valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},table:[],search:null,headers:[{text:"Comunidad",value:"nombre",align:"center"},{text:"Hectáreas",value:"hectareas",align:"center"},{text:"Descripción",value:"descripcion",align:"center"},{text:"Racionalizado",value:"verificacion_destruccion",align:"center"}]},"table",[]),f(t,"search",""),f(t,"idpersona",0),t},computed:{},mounted:function(){var t=this;this.bus.$on("openDialogForm",function(e){t.dialog=!0,t.selectedItem=e,t.getTable()}),this.bus.$on("closeDialogForm",function(){t.getTable()})},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.table=[],this.bus.$emit("closeDialog",this.selecteditem)},getTable:function(){var t,e=(t=i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s.a.get("api/autorizacionrenovacion/showfill/"+this.selectedItem.id);case 3:e=t.sent,this.table=e.data,console.log(this.table),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}(),activeItem:function(t){t.verificacion_destruccion?this.bus.$emit("openDialogConfirm",{action:"Racionalizado",url:"api/autorizacionrenovacion/"+t.id,item:{verificacion_destruccion:!0}}):this.bus.$emit("openDialogConfirm",{action:"No Racionalizado",url:"api/autorizacionrenovacion/"+t.id,item:{verificacion_destruccion:!1}})}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Verificación Renovación")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("ConfirmItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-card-text",[n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.hectareas)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.descripcion)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-switch",{staticClass:"mt-2",attrs:{slot:"activator",color:"success"},on:{change:function(n){return t.activeItem(e.item)}},slot:"activator",model:{value:e.item.verificacion_destruccion,callback:function(n){t.$set(e.item,"verificacion_destruccion",n)},expression:"props.item.verificacion_destruccion"}}),t._v(" "),n("span",[t._v(t._s(e.item.verificacion_destruccion?"Racionalizado":"No Racionalizado"))])],1)])]}}])})],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Consulta de Renovaciones y Verficiación de Parcelas")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s(e.item.comunidad.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s(e.item.hectareas)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.latitud)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.longitud)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.openItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("assignment")])],1),t._v(" "),n("span",[t._v("Verificación de Renovación")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(860),n(864),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(861),f=n.n(d);e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Fecha",value:"fecha",align:"center"},{text:"Unidad",value:"unidad",align:"center"},{text:"Hectareas",value:"hectareas",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t,e=(t=i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/zonas_racionalizadas");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)}}}},function(t,e,n){var r=n(0)(n(862),n(863),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(74);n.n(u);function l(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={props:["item","bus"],components:{lmap:u},data:function(){return{loading:!1,bus_map:new o.a,valid:!0,dialog:!1,search:null,errorCodigo:null,selectedIndex:-1,selectedItem:{latitud:null,longitud:null},departamentos:[],provincias:[],regionales:[],unidades:[],menu:null,place:null,error:"",statusText:"",parcelas:[],productores:[],tipo_ejecucion:[],cancelSource:null,racionalizacion_date:null,racionalizacion_date_formatted:null,zona:null}},watch:{search:function(t){t&&t!==this.select&&this.getProductor(t)},racionalizacion_date:function(t){this.selectedItem.fecha_racionalizacion=t,this.racionalizacion_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},created:function(){},mounted:function(){var t,e=this;this.bus.$on("openDialog",(t=l(i.a.mark(function t(n){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e.dialog=!0,t.next=3,c.a.get("api/zonas_racionalizadas/"+n.id);case 3:e.zona=t.sent,console.log(e.zona.data[0]),e.selectedIndex=n,e.selectedItem=e.zona.data[0],e.bus_map.$emit("setMarker",{lat:e.selectedItem.latitud,lng:e.selectedItem.longitud});case 8:case"end":return t.stop()}},t,e)})),function(e){return t.apply(this,arguments)})),this.bus_map.$on("marked",function(t){e.selectedItem.latitud=t.lat,e.selectedItem.longitud=t.lng}),this.bus_map.$on("marker_id",function(t){var n=e.parcelas_productor.find(function(e){return e.id=t.id});e.selectedItem.longitud=n.longitud,e.selectedItem.latitud=n.latitud,e.selectedItem.hectareas=n.hectareas,e.selectedItem.parcela_id=n.id}),this.getEntryData(),this.getTipoEjecuciones()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{openMap:function(){this.bus_map.$emit("openMap")},getEntryData:function(){var t=l(i.a.mark(function t(){var e,n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/departamento");case 2:return e=t.sent,this.departamentos=e.data,t.next=6,c.a.get("api/unidades");case 6:return n=t.sent,this.unidades=n.data,t.next=10,c.a.get("api/regional");case 10:r=t.sent,this.regionales=r.data;case 12:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getProvincias:function(){var t=l(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/provincia/fill/"+JSON.stringify({departamento_id:this.selectedItem.departamento_id}));case 2:e=t.sent,this.provincias=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getProductor:function(t){var e=this;t.length<3||(this.cancelSearch(),this.cancelSource=c.a.CancelToken.source(),c.a.get("api/productor?carnet="+t,{cancelToken:this.cancelSource.token}).then(function(t){e.productores=t.data}),this.errorCodigo="no se encontro el codigo")},cancelSearch:function(){this.cancelSource&&this.cancelSource.cancel("Start new search, stop active search")},getParcelasProductor:function(){var t=l(i.a.mark(function t(e){var n,r=this;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/parcela/productor/"+e);case 2:n=t.sent,this.parcelas_productor=n.data,this.bus_map.$emit("clearMap"),this.parcelas_productor.forEach(function(t){r.bus_map.$emit("addExtraMarker",{latlng:[t.latitud,t.longitud],id:t.id})});case 6:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),getParcela:function(){var t=this,e=this.parcelas.find(function(e){return e.id==t.selectedItem.parcela_id});this.bus_map.$emit("setMarker",{lat:e.latitud,lng:e.longitud}),this.selectedItem.longitud=e.longitud,this.selectedItem.latitud=e.latitud,this.selectedItem.hectareas=e.hectareas},getTipoEjecuciones:function(){var t=l(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/ejecucion/");case 2:e=t.sent,this.tipo_ejecucion=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={puestos_de_control:[]},this.markersTemp=[]},save:function(){var t=l(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=6;break}return t.next=4,c.a.post("api/zonas_racionalizadas",this.selectedItem);case 4:this.$toast.success("Correcto."),this.close();case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(){return t.apply(this,arguments)}}(),setDescription:function(t){this.description=t}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},on:{"!click":function(e){return t.openMap(e)}},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm4:"",md4:""}},[n("v-card-text",[n("v-select",{attrs:{items:t.departamentos,"item-text":"nombre","item-value":"id",label:"Departamento",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.getProvincias()}},model:{value:t.selectedItem.departamento_id,callback:function(e){t.$set(t.selectedItem,"departamento_id",e)},expression:"selectedItem.departamento_id"}}),t._v(" "),n("v-select",{attrs:{items:t.provincias,"item-text":"nombre","item-value":"id",label:"Provincia",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.provincia_id,callback:function(e){t.$set(t.selectedItem,"provincia_id",e)},expression:"selectedItem.provincia_id"}}),t._v(" "),n("v-select",{attrs:{items:t.regionales,"item-text":"nombre","item-value":"id",label:"Region",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.regional_id,callback:function(e){t.$set(t.selectedItem,"regional_id",e)},expression:"selectedItem.regional_id"}}),t._v(" "),n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de racionalizacion","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.racionalizacion_date_formatted,callback:function(e){t.racionalizacion_date_formatted=e},expression:"racionalizacion_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":""},on:{input:function(e){t.menu=!1}},model:{value:t.racionalizacion_date,callback:function(e){t.racionalizacion_date=e},expression:"racionalizacion_date"}})],1),t._v(" "),n("v-select",{attrs:{items:t.unidades,"item-text":"descripcion","item-value":"id",label:"Unidad",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.unidad_id,callback:function(e){t.$set(t.selectedItem,"unidad_id",e)},expression:"selectedItem.unidad_id"}}),t._v(" "),n("v-select",{attrs:{items:t.tipo_ejecucion,"item-text":"descripcion_ejecucion","item-value":"id",label:"Racionalizacion/Erradicacion",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.tipo_ejecucion_id,callback:function(e){t.$set(t.selectedItem,"tipo_ejecucion_id",e)},expression:"selectedItem.tipo_ejecucion_id"}}),t._v(" "),n("v-text-field",{attrs:{label:"Hectareas afectadas",type:"number",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.hectareas_afectadas,callback:function(e){t.$set(t.selectedItem,"hectareas_afectadas",e)},expression:"selectedItem.hectareas_afectadas"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm4:"",md4:""}},[n("v-card-text",[n("v-autocomplete",{attrs:{loading:t.loading,items:t.productores,"search-input":t.search,"item-text":"carnet_identidad","item-value":"id",label:"Carnet productor"},on:{"update:searchInput":function(e){t.search=e},"update:search-input":function(e){t.search=e},change:function(e){return t.getParcelasProductor(t.selectedItem.productor_id)}},model:{value:t.selectedItem.productor_id,callback:function(e){t.$set(t.selectedItem,"productor_id",e)},expression:"selectedItem.productor_id"}}),t._v(" "),n("v-text-field",{attrs:{label:"Latitud",type:"number",rules:[function(t){return!!t||"Requerido"},function(t){return/^-?([1-8]?[1-9]|[1-9]0)\.{1}\d{1,6}/.test(t)||"latitud incorrecta"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",disabled:""},model:{value:t.selectedItem.latitud,callback:function(e){t.$set(t.selectedItem,"latitud",e)},expression:"selectedItem.latitud"}}),t._v(" "),n("v-text-field",{attrs:{label:"Longitud",type:"number",rules:[function(t){return!!t||"Requerido"},function(t){return/^-?([1-8]?[1-9]|[1-9]0)\.{1}\d{1,6}/.test(t)||"latitud incorrecta"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",disabled:""},model:{value:t.selectedItem.longitud,callback:function(e){t.$set(t.selectedItem,"longitud",e)},expression:"selectedItem.longitud"}}),t._v(" "),n("v-text-field",{attrs:{label:"Hectareas",type:"number",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",disabled:""},model:{value:t.selectedItem.hectareas,callback:function(e){t.$set(t.selectedItem,"hectareas",e)},expression:"selectedItem.hectareas"}}),t._v(" "),n("v-textarea",{attrs:{label:"Descripción",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=500||"No mayor a 500 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm4:"",md4:""}},[n("v-card-text",[n("lmap",{staticStyle:{height:"300px"},attrs:{bus:t.bus_map}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Zonas Racionalizadas")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(t._f("moment")(e.item.fecha_racionalizacion,"DD-MM-YYYY"))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.unidad_nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.hectareas_afectadas)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(866),n(952),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(867),f=n.n(d),h=n(48);n.n(h);function p(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Nro. Guía de internación",value:"correlativo",align:"center"},{text:"Nombre",value:"persona.primer_apellido",align:"center"},{text:"Carnet de identidad",value:"persona.carnet_identidad",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=p(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/guia_internacion");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),printGuiaItem:function(){var t=p(i.a.mark(function t(e){var n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c()({method:"GET",url:"api/guia_internacion/print/"+e.id,responseType:"arraybuffer"});case 3:n=t.sent,r=new Blob([n.data],{type:"application/pdf"}),printJS(window.URL.createObjectURL(r)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}(),printRetencionItem:function(){var t=p(i.a.mark(function t(e){var n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c()({method:"GET",url:"api/retencion/print/"+e.retencion[0].id,responseType:"arraybuffer"});case 3:n=t.sent,r=new Blob([n.data],{type:"application/pdf"}),printJS(window.URL.createObjectURL(r)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=p(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/control_guia_internacion/fill/"+JSON.stringify({guia_internacion_id:e.id}));case 2:t.sent.data.length>0?this.$toast.info("Esta guía de internación fue controlada."):this.bus.$emit("openDialogRemove","api/guia_internacion/"+e.id);case 4:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")},formatDateTime:function(t){return this.$moment(t).format("DD/MM/YYYY HH:mm")}}}},function(t,e,n){var r=n(0)(n(868),n(951),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o),c=n(42),u=(n.n(c),n(275));function l(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{WebCam:c.WebCam},props:["item","bus"],data:function(){return{step:1,valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},personas:[],persona:[],errorCarnet:null,userValid:!0,rutas:[],menu:null,orden_date:null,orden_date_formatted:null,vehiculos:[],marcas:[],headers:[{text:"Nombre",value:"primer_apellido",align:"center"},{text:"Carnet de identidad",value:"carnet_identidad",align:"center"},{text:"Carnet de productor",value:"carnet_productor[0].carnet",align:"center"},{text:"Email",value:"email",align:"center"},{text:"Estado",align:"center",sortable:!1}],captures:[],imgReport:[],frontCam:!1,webcam:null,img:null,camera:null,deviceId:null,devices:[],reconocido:null,faceMensaje:!1,descriptors:{desc1:null,desc2:null},threshold:.4,loading:!1,porcentajeReconocido:0}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.dialog=!0,t.selectedIndex=e,t.selectedItem=e,t.orden_date_formatted=t.$moment(e.fecha_orden_comunal).format("DD/MM/YYYY"),t.getPersona()}),this.getPersonas(),this.getRutas(),this.getVehiculos(),this.getMarcas(),this.loadModels()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar"},device:function(){var t=this;return find(this.devices,function(e){return e.deviceId==t.deviceId})}},watch:{orden_date:function(t){this.selectedItem.fecha_orden_comunal=t,this.orden_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")},camera:function(t){this.deviceId=t}},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.step=1,this.persona=[],this.errorCarnet=null,this.userValid=!0,this.$refs.form1.reset(),this.$refs.form2.reset(),this.captures=[],this.imgReport=[],this.frontCam=!1,this.webcam=null,this.img=null,this.camera=null,this.deviceId=null,this.devices=[],this.reconocido=!1,this.faceMensaje=!1,this.porcentajeReconocido=0,this.bus.$emit("closeDialog")},save:function(){var t=l(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form2.validate()){t.next=12;break}if(this.selectedItem.user_id=this.$store.getters["auth/user"].id,-1==this.selectedIndex){t.next=8;break}return t.next=6,s.a.put("api/guia_internacion/"+this.selectedItem.id,this.selectedItem);case 6:t.next=10;break;case 8:return t.next=10,s.a.post("api/guia_internacion",this.selectedItem);case 10:this.$toast.success("Correcto."),this.close();case 12:t.next=17;break;case 14:t.prev=14,t.t0=t.catch(0),console.log(t.t0);case 17:case"end":return t.stop()}},t,this,[[0,14]])}));return function(){return t.apply(this,arguments)}}(),getPersonas:function(){var t=l(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/persona");case 2:e=t.sent,this.personas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getPersona:function(){var t=l(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/persona/fill/"+JSON.stringify({id:this.selectedItem.persona_id}));case 2:e=t.sent,this.persona=e.data,1==e.data[0].tipo_persona_id||2==e.data[0].tipo_persona_id||1==e.data[0].activo?null==e.data[0].sustitucion_id&&0==e.data[0].cesaciones.length?(this.errorCarnet=null,this.userValid=!0):(this.errorCarnet="Se encuentra sustituido.",this.userValid=!1):(this.errorCarnet="No es productor o productor al detalle.",this.userValid=!1);case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getRutas:function(){var t=l(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/ruta");case 2:e=t.sent,this.rutas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getLibras:function(){this.selectedItem.libras=50*this.selectedItem.numero_taques},getVehiculos:function(){var t=l(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/vehiculo");case 2:e=t.sent,this.vehiculos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getMarcas:function(){var t=l(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/marca");case 2:e=t.sent,this.marcas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),loadModels:function(){var t=l(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="/models",t.next=3,u.f(e);case 3:return t.next=5,u.d(e);case 5:return t.next=7,u.e(e);case 7:return t.next=9,u.g.ssdMobilenetv1.loadFromUri("/models");case 9:return t.next=11,u.g.faceLandmark68Net.loadFromUri("/models");case 11:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),onCapture:function(){var t=l(i.a.mark(function t(){var e,n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.loading=!0,this.faceMensaje=!1,this.descriptors={desc1:null,desc2:null},t.next=5,this.$refs.webcam.capture();case 5:return e=t.sent,t.next=8,s.a.post("api/upload/base64_image",{base64:e});case 8:return n=t.sent,this.onSelectionChanged(1,this.persona[0].fotografia),this.onSelectionChanged(2,n.data),this.updateResult(),t.next=14,s.a.post("api/upload/delete",{nombre:n.data});case 14:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),onSelectionChanged:function(){var t=l(i.a.mark(function t(e,n){var r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,u.c(n);case 2:return r=t.sent,this.$refs.prueba.src=r.src,t.next=7,u.a(r);case 7:this.descriptors["desc"+e]=t.sent;case 8:case"end":return t.stop()}},t,this)}));return function(e,n){return t.apply(this,arguments)}}(),updateResult:function(){if(null!=this.descriptors.desc2){var t=u.h(u.b(this.descriptors.desc1,this.descriptors.desc2));t>this.threshold?this.reconocido=!1:this.reconocido=!0,this.loading=!1,this.faceMensaje=!0,this.porcentajeReconocido=100-100*t}},onStarted:function(t){console.log("On Started Event",t)},onStopped:function(t){console.log("On Stopped Event",t)},onStop:function(){this.$refs.webcam.stop()},onStart:function(){this.$refs.webcam.start()},onError:function(t){console.log("On Error Event",t)},onCameras:function(t){this.devices=t},onCameraChange:function(t){this.deviceId=t,this.camera=t,console.log("On Camera Change Event",t)},nextStep:function(){switch(this.step){case 1:this.$refs.form1.validate()&&(this.step=2)}},previousStep:function(){switch(this.step){case 2:this.step=1}},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")}}}},function(t,e,n){"use strict";e.byteLength=function(t){var e=u(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=u(t),o=r[0],s=r[1],c=new a(function(t,e,n){return 3*(e+n)/4-n}(0,o,s)),l=0,d=s>0?o-4:o;for(n=0;n<d;n+=4)e=i[t.charCodeAt(n)]<<18|i[t.charCodeAt(n+1)]<<12|i[t.charCodeAt(n+2)]<<6|i[t.charCodeAt(n+3)],c[l++]=e>>16&255,c[l++]=e>>8&255,c[l++]=255&e;2===s&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,c[l++]=255&e);1===s&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e);return c},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,a=[],o=0,s=n-i;o<s;o+=16383)a.push(l(t,o,o+16383>s?s:o+16383));1===i?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return a.join("")};for(var r=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=o.length;s<c;++s)r[s]=o[s],i[o.charCodeAt(s)]=s;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function l(t,e,n){for(var i,a,o=[],s=e;s<n;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),o.push(r[(a=i)>>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,n,r,i){var a,o,s=8*i-r-1,c=(1<<s)-1,u=c>>1,l=-7,d=n?i-1:0,f=n?-1:1,h=t[e+d];for(d+=f,a=h&(1<<-l)-1,h>>=-l,l+=s;l>0;a=256*a+t[e+d],d+=f,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=r;l>0;o=256*o+t[e+d],d+=f,l-=8);if(0===a)a=1-u;else{if(a===c)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,r),a-=u}return(h?-1:1)*o*Math.pow(2,a-r)},e.write=function(t,e,n,r,i,a){var o,s,c,u=8*a-i-1,l=(1<<u)-1,d=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:a-1,p=r?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=l):(o=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-o))<1&&(o--,c*=2),(e+=o+d>=1?f/c:f*Math.pow(2,1-d))*c>=2&&(o++,c/=2),o+d>=l?(s=0,o=l):o+d>=1?(s=(e*c-1)*Math.pow(2,i),o+=d):(s=e*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;t[n+h]=255&s,h+=p,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;t[n+h]=255&o,h+=p,o/=256,u-=8);t[n+h-p]|=128*m}},function(t,e){},function(t,e,n){"use strict";var r=n(11).Buffer,i=n(873);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n},t.prototype.concat=function(t){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var e,n,i,a=r.allocUnsafe(t>>>0),o=this.head,s=0;o;)e=o.data,n=a,i=s,e.copy(n,i),s+=o.data.length,o=o.next;return a},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,n){(function(e){function n(t){try{if(!e.localStorage)return!1}catch(t){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}}).call(e,n(20))},function(t,e,n){"use strict";t.exports=a;var r=n(351),i=n(88);function a(t){if(!(this instanceof a))return new a(t);r.call(this,t)}i.inherits=n(10),i.inherits(a,r),a.prototype._transform=function(t,e,n){n(null,t)}},function(t,e,n){t.exports=n(280)},function(t,e,n){t.exports=n(69)},function(t,e,n){t.exports=n(279).Transform},function(t,e,n){t.exports=n(279).PassThrough},function(t,e,n){var r=n(10),i=n(77),a=n(11).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function c(){this.init(),this._w=s,i.call(this,64,56)}function u(t){return t<<30|t>>>2}function l(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}r(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(t){for(var e,n=this._w,r=0|this._a,i=0|this._b,a=0|this._c,s=0|this._d,c=0|this._e,d=0;d<16;++d)n[d]=t.readInt32BE(4*d);for(;d<80;++d)n[d]=n[d-3]^n[d-8]^n[d-14]^n[d-16];for(var f=0;f<80;++f){var h=~~(f/20),p=0|((e=r)<<5|e>>>27)+l(h,i,a,s)+c+n[f]+o[h];c=s,s=a,a=u(i),i=r,r=p}this._a=r+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var t=a.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=c},function(t,e,n){var r=n(10),i=n(77),a=n(11).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function c(){this.init(),this._w=s,i.call(this,64,56)}function u(t){return t<<5|t>>>27}function l(t){return t<<30|t>>>2}function d(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}r(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(t){for(var e,n=this._w,r=0|this._a,i=0|this._b,a=0|this._c,s=0|this._d,c=0|this._e,f=0;f<16;++f)n[f]=t.readInt32BE(4*f);for(;f<80;++f)n[f]=(e=n[f-3]^n[f-8]^n[f-14]^n[f-16])<<1|e>>>31;for(var h=0;h<80;++h){var p=~~(h/20),m=u(r)+d(p,i,a,s)+c+n[h]+o[p]|0;c=s,s=a,a=l(i),i=r,r=m}this._a=r+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var t=a.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=c},function(t,e,n){var r=n(10),i=n(352),a=n(77),o=n(11).Buffer,s=new Array(64);function c(){this.init(),this._w=s,a.call(this,64,56)}r(c,i),c.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},c.prototype._hash=function(){var t=o.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=c},function(t,e,n){var r=n(10),i=n(353),a=n(77),o=n(11).Buffer,s=new Array(160);function c(){this.init(),this._w=s,a.call(this,128,112)}r(c,i),c.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},c.prototype._hash=function(){var t=o.allocUnsafe(48);function e(e,n,r){t.writeInt32BE(e,r),t.writeInt32BE(n,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=c},function(t,e,n){"use strict";var r=n(10),i=n(11).Buffer,a=n(56),o=i.alloc(128),s=64;function c(t,e){a.call(this,"digest"),"string"==typeof e&&(e=i.from(e)),this._alg=t,this._key=e,e.length>s?e=t(e):e.length<s&&(e=i.concat([e,o],s));for(var n=this._ipad=i.allocUnsafe(s),r=this._opad=i.allocUnsafe(s),c=0;c<s;c++)n[c]=54^e[c],r[c]=92^e[c];this._hash=[n]}r(c,a),c.prototype._update=function(t){this._hash.push(t)},c.prototype._final=function(){var t=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,t]))},t.exports=c},function(t,e,n){t.exports=n(356)},function(t,e,n){(function(e,r){var i,a=n(358),o=n(359),s=n(360),c=n(11).Buffer,u=e.crypto&&e.crypto.subtle,l={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},d=[];function f(t,e,n,r,i){return u.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then(function(t){return u.deriveBits({name:"PBKDF2",salt:e,iterations:n,hash:{name:i}},t,r<<3)}).then(function(t){return c.from(t)})}t.exports=function(t,n,h,p,m,v){"function"==typeof m&&(v=m,m=void 0);var _=l[(m=m||"sha1").toLowerCase()];if(!_||"function"!=typeof e.Promise)return r.nextTick(function(){var e;try{e=s(t,n,h,p,m)}catch(t){return v(t)}v(null,e)});if(a(t,n,h,p),"function"!=typeof v)throw new Error("No callback provided to pbkdf2");c.isBuffer(t)||(t=c.from(t,o)),c.isBuffer(n)||(n=c.from(n,o)),function(t,e){t.then(function(t){r.nextTick(function(){e(null,t)})},function(t){r.nextTick(function(){e(t)})})}(function(t){if(e.process&&!e.process.browser)return Promise.resolve(!1);if(!u||!u.importKey||!u.deriveBits)return Promise.resolve(!1);if(void 0!==d[t])return d[t];var n=f(i=i||c.alloc(8),i,10,128,t).then(function(){return!0}).catch(function(){return!1});return d[t]=n,n}(_).then(function(e){return e?f(t,n,h,p,_):s(t,n,h,p,m)}),v)}}).call(e,n(20),n(26))},function(t,e,n){var r=n(888),i=n(285),a=n(286),o=n(903),s=n(112);function c(t,e,n){if(t=t.toLowerCase(),a[t])return i.createCipheriv(t,e,n);if(o[t])return new r({key:e,iv:n,mode:t});throw new TypeError("invalid suite type")}function u(t,e,n){if(t=t.toLowerCase(),a[t])return i.createDecipheriv(t,e,n);if(o[t])return new r({key:e,iv:n,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}e.createCipher=e.Cipher=function(t,e){var n,r;if(t=t.toLowerCase(),a[t])n=a[t].key,r=a[t].iv;else{if(!o[t])throw new TypeError("invalid suite type");n=8*o[t].key,r=o[t].iv}var i=s(e,!1,n,r);return c(t,i.key,i.iv)},e.createCipheriv=e.Cipheriv=c,e.createDecipher=e.Decipher=function(t,e){var n,r;if(t=t.toLowerCase(),a[t])n=a[t].key,r=a[t].iv;else{if(!o[t])throw new TypeError("invalid suite type");n=8*o[t].key,r=o[t].iv}var i=s(e,!1,n,r);return u(t,i.key,i.iv)},e.createDecipheriv=e.Decipheriv=u,e.listCiphers=e.getCiphers=function(){return Object.keys(o).concat(i.getCiphers())}},function(t,e,n){var r=n(56),i=n(284),a=n(10),o=n(11).Buffer,s={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function c(t){r.call(this);var e,n=t.mode.toLowerCase(),i=s[n];e=t.decrypt?"decrypt":"encrypt";var a=t.key;o.isBuffer(a)||(a=o.from(a)),"des-ede"!==n&&"des-ede-cbc"!==n||(a=o.concat([a,a.slice(0,8)]));var c=t.iv;o.isBuffer(c)||(c=o.from(c)),this._des=i.create({key:a,iv:c,type:e})}s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],t.exports=c,a(c,r),c.prototype._update=function(t){return o.from(this._des.update(t))},c.prototype._final=function(){return o.from(this._des.final())}},function(t,e,n){"use strict";e.readUInt32BE=function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},e.writeUInt32BE=function(t,e,n){t[0+n]=e>>>24,t[1+n]=e>>>16&255,t[2+n]=e>>>8&255,t[3+n]=255&e},e.ip=function(t,e,n,r){for(var i=0,a=0,o=6;o>=0;o-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>>s+o&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>>s+o&1}for(o=6;o>=0;o-=2){for(s=1;s<=25;s+=8)a<<=1,a|=e>>>s+o&1;for(s=1;s<=25;s+=8)a<<=1,a|=t>>>s+o&1}n[r+0]=i>>>0,n[r+1]=a>>>0},e.rip=function(t,e,n,r){for(var i=0,a=0,o=0;o<4;o++)for(var s=24;s>=0;s-=8)i<<=1,i|=e>>>s+o&1,i<<=1,i|=t>>>s+o&1;for(o=4;o<8;o++)for(s=24;s>=0;s-=8)a<<=1,a|=e>>>s+o&1,a<<=1,a|=t>>>s+o&1;n[r+0]=i>>>0,n[r+1]=a>>>0},e.pc1=function(t,e,n,r){for(var i=0,a=0,o=7;o>=5;o--){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>s+o&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+o&1}for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+o&1;for(o=1;o<=3;o++){for(s=0;s<=24;s+=8)a<<=1,a|=e>>s+o&1;for(s=0;s<=24;s+=8)a<<=1,a|=t>>s+o&1}for(s=0;s<=24;s+=8)a<<=1,a|=t>>s+o&1;n[r+0]=i>>>0,n[r+1]=a>>>0},e.r28shl=function(t,e){return t<<e&268435455|t>>>28-e};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(t,e,n,i){for(var a=0,o=0,s=r.length>>>1,c=0;c<s;c++)a<<=1,a|=t>>>r[c]&1;for(c=s;c<r.length;c++)o<<=1,o|=e>>>r[c]&1;n[i+0]=a>>>0,n[i+1]=o>>>0},e.expand=function(t,e,n){var r=0,i=0;r=(1&t)<<5|t>>>27;for(var a=23;a>=15;a-=4)r<<=6,r|=t>>>a&63;for(a=11;a>=3;a-=4)i|=t>>>a&63,i<<=6;i|=(31&t)<<1|t>>>31,e[n+0]=r>>>0,e[n+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(t,e){for(var n=0,r=0;r<4;r++){n<<=4,n|=i[64*r+(t>>>18-6*r&63)]}for(r=0;r<4;r++){n<<=4,n|=i[256+64*r+(e>>>18-6*r&63)]}return n>>>0};var a=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,n=0;n<a.length;n++)e<<=1,e|=t>>>a[n]&1;return e>>>0},e.padSplit=function(t,e,n){for(var r=t.toString(2);r.length<e;)r="0"+r;for(var i=[],a=0;a<e;a+=n)i.push(r.slice(a,a+n));return i.join(" ")}},function(t,e,n){"use strict";var r=n(35);function i(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}t.exports=i,i.prototype._init=function(){},i.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},i.prototype._buffer=function(t,e){for(var n=Math.min(this.buffer.length-this.bufferOff,t.length-e),r=0;r<n;r++)this.buffer[this.bufferOff+r]=t[e+r];return this.bufferOff+=n,n},i.prototype._flushBuffer=function(t,e){return this._update(this.buffer,0,t,e),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(t){var e=0,n=0,r=(this.bufferOff+t.length)/this.blockSize|0,i=new Array(r*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(t,e),this.bufferOff===this.buffer.length&&(n+=this._flushBuffer(i,n)));for(var a=t.length-(t.length-e)%this.blockSize;e<a;e+=this.blockSize)this._update(t,e,i,n),n+=this.blockSize;for(;e<t.length;e++,this.bufferOff++)this.buffer[this.bufferOff]=t[e];return i},i.prototype._updateDecrypt=function(t){for(var e=0,n=0,r=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,i=new Array(r*this.blockSize);r>0;r--)e+=this._buffer(t,e),n+=this._flushBuffer(i,n);return e+=this._buffer(t,e),i},i.prototype.final=function(t){var e,n;return t&&(e=this.update(t)),n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(n):n},i.prototype._pad=function(t,e){if(0===e)return!1;for(;e<t.length;)t[e++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t},i.prototype._unpad=function(t){return t},i.prototype._finalDecrypt=function(){r.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)}},function(t,e,n){"use strict";var r=n(35),i=n(10),a=n(284),o=a.utils,s=a.Cipher;function c(t){s.call(this,t);var e=new function(){this.tmp=new Array(2),this.keys=null};this._desState=e,this.deriveKeys(e,t.key)}i(c,s),t.exports=c,c.create=function(t){return new c(t)};var u=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];c.prototype.deriveKeys=function(t,e){t.keys=new Array(32),r.equal(e.length,this.blockSize,"Invalid key length");var n=o.readUInt32BE(e,0),i=o.readUInt32BE(e,4);o.pc1(n,i,t.tmp,0),n=t.tmp[0],i=t.tmp[1];for(var a=0;a<t.keys.length;a+=2){var s=u[a>>>1];n=o.r28shl(n,s),i=o.r28shl(i,s),o.pc2(n,i,t.keys,a)}},c.prototype._update=function(t,e,n,r){var i=this._desState,a=o.readUInt32BE(t,e),s=o.readUInt32BE(t,e+4);o.ip(a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,s,i.tmp,0):this._decrypt(i,a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],o.writeUInt32BE(n,a,r),o.writeUInt32BE(n,s,r+4)},c.prototype._pad=function(t,e){for(var n=t.length-e,r=e;r<t.length;r++)t[r]=n;return!0},c.prototype._unpad=function(t){for(var e=t[t.length-1],n=t.length-e;n<t.length;n++)r.equal(t[n],e);return t.slice(0,t.length-e)},c.prototype._encrypt=function(t,e,n,r,i){for(var a=e,s=n,c=0;c<t.keys.length;c+=2){var u=t.keys[c],l=t.keys[c+1];o.expand(s,t.tmp,0),u^=t.tmp[0],l^=t.tmp[1];var d=o.substitute(u,l),f=s;s=(a^o.permute(d))>>>0,a=f}o.rip(s,a,r,i)},c.prototype._decrypt=function(t,e,n,r,i){for(var a=n,s=e,c=t.keys.length-2;c>=0;c-=2){var u=t.keys[c],l=t.keys[c+1];o.expand(a,t.tmp,0),u^=t.tmp[0],l^=t.tmp[1];var d=o.substitute(u,l),f=a;a=(s^o.permute(d))>>>0,s=f}o.rip(a,s,r,i)}},function(t,e,n){"use strict";var r=n(35),i=n(10),a={};e.instantiate=function(t){function e(e){t.call(this,e),this._cbcInit()}i(e,t);for(var n=Object.keys(a),r=0;r<n.length;r++){var o=n[r];e.prototype[o]=a[o]}return e.create=function(t){return new e(t)},e},a._cbcInit=function(){var t=new function(t){r.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}(this.options.iv);this._cbcState=t},a._update=function(t,e,n,r){var i=this._cbcState,a=this.constructor.super_.prototype,o=i.iv;if("encrypt"===this.type){for(var s=0;s<this.blockSize;s++)o[s]^=t[e+s];a._update.call(this,o,0,n,r);for(s=0;s<this.blockSize;s++)o[s]=n[r+s]}else{a._update.call(this,t,e,n,r);for(s=0;s<this.blockSize;s++)n[r+s]^=o[s];for(s=0;s<this.blockSize;s++)o[s]=t[e+s]}}},function(t,e,n){"use strict";var r=n(35),i=n(10),a=n(284),o=a.Cipher,s=a.DES;function c(t){o.call(this,t);var e=new function(t,e){r.equal(e.length,24,"Invalid key length");var n=e.slice(0,8),i=e.slice(8,16),a=e.slice(16,24);this.ciphers="encrypt"===t?[s.create({type:"encrypt",key:n}),s.create({type:"decrypt",key:i}),s.create({type:"encrypt",key:a})]:[s.create({type:"decrypt",key:a}),s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:n})]}(this.type,this.options.key);this._edeState=e}i(c,o),t.exports=c,c.create=function(t){return new c(t)},c.prototype._update=function(t,e,n,r){var i=this._edeState;i.ciphers[0]._update(t,e,n,r),i.ciphers[1]._update(n,r,n,r),i.ciphers[2]._update(n,r,n,r)},c.prototype._pad=s.prototype._pad,c.prototype._unpad=s.prototype._unpad},function(t,e,n){var r=n(286),i=n(364),a=n(11).Buffer,o=n(365),s=n(56),c=n(111),u=n(112);function l(t,e,n){s.call(this),this._cache=new f,this._cipher=new c.AES(e),this._prev=a.from(n),this._mode=t,this._autopadding=!0}n(10)(l,s),l.prototype._update=function(t){var e,n;this._cache.add(t);for(var r=[];e=this._cache.get();)n=this._mode.encrypt(this,e),r.push(n);return a.concat(r)};var d=a.alloc(16,16);function f(){this.cache=a.allocUnsafe(0)}function h(t,e,n){var s=r[t.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=a.from(e)),e.length!==s.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof n&&(n=a.from(n)),"GCM"!==s.mode&&n.length!==s.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===s.type?new o(s.module,e,n):"auth"===s.type?new i(s.module,e,n):new l(s.module,e,n)}l.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(d))throw this._cipher.scrub(),new Error("data not multiple of block length")},l.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},f.prototype.add=function(t){this.cache=a.concat([this.cache,t])},f.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},f.prototype.flush=function(){for(var t=16-this.cache.length,e=a.allocUnsafe(t),n=-1;++n<t;)e.writeUInt8(t,n);return a.concat([this.cache,e])},e.createCipheriv=h,e.createCipher=function(t,e){var n=r[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var i=u(e,!1,n.key,n.iv);return h(t,i.key,i.iv)}},function(t,e){e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},function(t,e,n){var r=n(89);e.encrypt=function(t,e){var n=r(e,t._prev);return t._prev=t._cipher.encryptBlock(n),t._prev},e.decrypt=function(t,e){var n=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return r(i,n)}},function(t,e,n){var r=n(11).Buffer,i=n(89);function a(t,e,n){var a=e.length,o=i(e,t._cache);return t._cache=t._cache.slice(a),t._prev=r.concat([t._prev,n?e:o]),o}e.encrypt=function(t,e,n){for(var i,o=r.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=r.allocUnsafe(0)),!(t._cache.length<=e.length)){o=r.concat([o,a(t,e,n)]);break}i=t._cache.length,o=r.concat([o,a(t,e.slice(0,i),n)]),e=e.slice(i)}return o}},function(t,e,n){var r=n(11).Buffer;function i(t,e,n){var i=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=r.concat([t._prev.slice(1),r.from([n?e:i])]),i}e.encrypt=function(t,e,n){for(var a=e.length,o=r.allocUnsafe(a),s=-1;++s<a;)o[s]=i(t,e[s],n);return o}},function(t,e,n){var r=n(11).Buffer;function i(t,e,n){for(var r,i,o,s=-1,c=0;++s<8;)r=t._cipher.encryptBlock(t._prev),i=e&1<<7-s?128:0,c+=(128&(o=r[0]^i))>>s%8,t._prev=a(t._prev,n?i:o);return c}function a(t,e){var n=t.length,i=-1,a=r.allocUnsafe(t.length);for(t=r.concat([t,r.from([e])]);++i<n;)a[i]=t[i]<<1|t[i+1]>>7;return a}e.encrypt=function(t,e,n){for(var a=e.length,o=r.allocUnsafe(a),s=-1;++s<a;)o[s]=i(t,e[s],n);return o}},function(t,e,n){(function(t){var r=n(89);function i(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}e.encrypt=function(e,n){for(;e._cache.length<n.length;)e._cache=t.concat([e._cache,i(e)]);var a=e._cache.slice(0,n.length);return e._cache=e._cache.slice(n.length),r(n,a)}}).call(e,n(19).Buffer)},function(t,e,n){var r=n(11).Buffer,i=r.alloc(16,0);function a(t){var e=r.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function o(t){this.h=t,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}o.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},o.prototype._multiply=function(){for(var t,e,n,r=[(t=this.h).readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)],i=[0,0,0,0],o=-1;++o<128;){for(0!=(this.state[~~(o/8)]&1<<7-o%8)&&(i[0]^=r[0],i[1]^=r[1],i[2]^=r[2],i[3]^=r[3]),n=0!=(1&r[3]),e=3;e>0;e--)r[e]=r[e]>>>1|(1&r[e-1])<<31;r[0]=r[0]>>>1,n&&(r[0]=r[0]^225<<24)}this.state=a(i)},o.prototype.update=function(t){var e;for(this.cache=r.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},o.prototype.final=function(t,e){return this.cache.length&&this.ghash(r.concat([this.cache,i],16)),this.ghash(a([0,t,0,e])),this.state},t.exports=o},function(t,e,n){var r=n(364),i=n(11).Buffer,a=n(286),o=n(365),s=n(56),c=n(111),u=n(112);function l(t,e,n){s.call(this),this._cache=new d,this._last=void 0,this._cipher=new c.AES(e),this._prev=i.from(n),this._mode=t,this._autopadding=!0}function d(){this.cache=i.allocUnsafe(0)}function f(t,e,n){var s=a[t.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=i.from(n)),"GCM"!==s.mode&&n.length!==s.iv)throw new TypeError("invalid iv length "+n.length);if("string"==typeof e&&(e=i.from(e)),e.length!==s.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===s.type?new o(s.module,e,n,!0):"auth"===s.type?new r(s.module,e,n,!0):new l(s.module,e,n)}n(10)(l,s),l.prototype._update=function(t){var e,n;this._cache.add(t);for(var r=[];e=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,e),r.push(n);return i.concat(r)},l.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");var n=-1;for(;++n<e;)if(t[n+(16-e)]!==e)throw new Error("unable to decrypt data");if(16===e)return;return t.slice(0,16-e)}(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},l.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},d.prototype.add=function(t){this.cache=i.concat([this.cache,t])},d.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},d.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var n=a[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=u(e,!1,n.key,n.iv);return f(t,r.key,r.iv)},e.createDecipheriv=f},function(t,e){e["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}},function(t,e,n){(function(t){var r=n(366),i=n(907),a=n(908);var o={binary:!0,hex:!0,base64:!0};e.DiffieHellmanGroup=e.createDiffieHellmanGroup=e.getDiffieHellman=function(e){var n=new t(i[e].prime,"hex"),r=new t(i[e].gen,"hex");return new a(n,r)},e.createDiffieHellman=e.DiffieHellman=function e(n,i,s,c){return t.isBuffer(i)||void 0===o[i]?e(n,"binary",i,s):(i=i||"binary",c=c||"binary",s=s||new t([2]),t.isBuffer(s)||(s=new t(s,c)),"number"==typeof n?new a(r(n,s),s,!0):(t.isBuffer(n)||(n=new t(n,i)),new a(n,s,!0)))}}).call(e,n(19).Buffer)},function(t,e){},function(t,e){},function(t,e){t.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},function(t,e,n){(function(e){var r=n(22),i=new(n(367)),a=new r(24),o=new r(11),s=new r(10),c=new r(3),u=new r(7),l=n(366),d=n(76);function f(t,n){return n=n||"utf8",e.isBuffer(t)||(t=new e(t,n)),this._pub=new r(t),this}function h(t,n){return n=n||"utf8",e.isBuffer(t)||(t=new e(t,n)),this._priv=new r(t),this}t.exports=m;var p={};function m(t,e,n){this.setGenerator(e),this.__prime=new r(t),this._prime=r.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,n?(this.setPublicKey=f,this.setPrivateKey=h):this._primeCode=8}function v(t,n){var r=new e(t.toArray());return n?r.toString(n):r}Object.defineProperty(m.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,e){var n=e.toString("hex"),r=[n,t.toString(16)].join("_");if(r in p)return p[r];var d,f=0;if(t.isEven()||!l.simpleSieve||!l.fermatTest(t)||!i.test(t))return f+=1,f+="02"===n||"05"===n?8:4,p[r]=f,f;switch(i.test(t.shrn(1))||(f+=2),n){case"02":t.mod(a).cmp(o)&&(f+=8);break;case"05":(d=t.mod(s)).cmp(c)&&d.cmp(u)&&(f+=8);break;default:f+=4}return p[r]=f,f}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new r(d(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(t){var n=(t=(t=new r(t)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new e(n.toArray()),a=this.getPrime();if(i.length<a.length){var o=new e(a.length-i.length);o.fill(0),i=e.concat([o,i])}return i},m.prototype.getPublicKey=function(t){return v(this._pub,t)},m.prototype.getPrivateKey=function(t){return v(this._priv,t)},m.prototype.getPrime=function(t){return v(this.__prime,t)},m.prototype.getGenerator=function(t){return v(this._gen,t)},m.prototype.setGenerator=function(t,n){return n=n||"utf8",e.isBuffer(t)||(t=new e(t,n)),this.__gen=t,this._gen=new r(t),this}}).call(e,n(19).Buffer)},function(t,e,n){(function(e){var r=n(87),i=n(277),a=n(10),o=n(910),s=n(942),c=n(356);function u(t){i.Writable.call(this);var e=c[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=r(e.hash),this._tag=e.id,this._signType=e.sign}function l(t){i.Writable.call(this);var e=c[t];if(!e)throw new Error("Unknown message digest");this._hash=r(e.hash),this._tag=e.id,this._signType=e.sign}function d(t){return new u(t)}function f(t){return new l(t)}Object.keys(c).forEach(function(t){c[t].id=new e(c[t].id,"hex"),c[t.toLowerCase()]=c[t]}),a(u,i.Writable),u.prototype._write=function(t,e,n){this._hash.update(t),n()},u.prototype.update=function(t,n){return"string"==typeof t&&(t=new e(t,n)),this._hash.update(t),this},u.prototype.sign=function(t,e){this.end();var n=this._hash.digest(),r=o(n,t,this._hashType,this._signType,this._tag);return e?r.toString(e):r},a(l,i.Writable),l.prototype._write=function(t,e,n){this._hash.update(t),n()},l.prototype.update=function(t,n){return"string"==typeof t&&(t=new e(t,n)),this._hash.update(t),this},l.prototype.verify=function(t,n,r){"string"==typeof n&&(n=new e(n,r)),this.end();var i=this._hash.digest();return s(n,i,t,this._signType,this._tag)},t.exports={Sign:d,Verify:f,createSign:d,createVerify:f}}).call(e,n(19).Buffer)},function(t,e,n){(function(e){var r=n(354),i=n(288),a=n(289).ec,o=n(22),s=n(114),c=n(377);function u(t,n,i,a){if((t=new e(t.toArray())).length<n.byteLength()){var o=new e(n.byteLength()-t.length);o.fill(0),t=e.concat([o,t])}var s=i.length,c=function(t,n){t=(t=l(t,n)).mod(n);var r=new e(t.toArray());if(r.length<n.byteLength()){var i=new e(n.byteLength()-r.length);i.fill(0),r=e.concat([i,r])}return r}(i,n),u=new e(s);u.fill(1);var d=new e(s);return d.fill(0),d=r(a,d).update(u).update(new e([0])).update(t).update(c).digest(),u=r(a,d).update(u).digest(),{k:d=r(a,d).update(u).update(new e([1])).update(t).update(c).digest(),v:u=r(a,d).update(u).digest()}}function l(t,e){var n=new o(t),r=(t.length<<3)-e.bitLength();return r>0&&n.ishrn(r),n}function d(t,n,i){var a,o;do{for(a=new e(0);8*a.length<t.bitLength();)n.v=r(i,n.k).update(n.v).digest(),a=e.concat([a,n.v]);o=l(a,t),n.k=r(i,n.k).update(n.v).update(new e([0])).digest(),n.v=r(i,n.k).update(n.v).digest()}while(-1!==o.cmp(t));return o}function f(t,e,n,r){return t.toRed(o.mont(n)).redPow(e).fromRed().mod(r)}t.exports=function(t,n,r,h,p){var m=s(n);if(m.curve){if("ecdsa"!==h&&"ecdsa/rsa"!==h)throw new Error("wrong private key type");return function(t,n){var r=c[n.curve.join(".")];if(!r)throw new Error("unknown curve "+n.curve.join("."));var i=new a(r).keyFromPrivate(n.privateKey).sign(t);return new e(i.toDER())}(t,m)}if("dsa"===m.type){if("dsa"!==h)throw new Error("wrong private key type");return function(t,n,r){for(var i,a=n.params.priv_key,s=n.params.p,c=n.params.q,h=n.params.g,p=new o(0),m=l(t,c).mod(c),v=!1,_=u(a,c,t,r);!1===v;)i=d(c,_,r),p=f(h,i,s,c),0===(v=i.invm(c).imul(m.add(a.mul(p))).mod(c)).cmpn(0)&&(v=!1,p=new o(0));return function(t,n){t=t.toArray(),n=n.toArray(),128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n));var r=[48,t.length+n.length+4,2,t.length];return r=r.concat(t,[2,n.length],n),new e(r)}(p,v)}(t,m,r)}if("rsa"!==h&&"ecdsa/rsa"!==h)throw new Error("wrong private key type");t=e.concat([p,t]);for(var v=m.modulus.byteLength(),_=[0,1];t.length+_.length+1<v;)_.push(255);_.push(0);for(var g=-1;++g<t.length;)_.push(t[g]);return i(_,m)},t.exports.getKey=u,t.exports.makeKey=d}).call(e,n(19).Buffer)},function(t,e){t.exports={_args:[["elliptic@6.5.1","/var/lib/go-agent/pipelines/build_app"]],_development:!0,_from:"elliptic@6.5.1",_id:"elliptic@6.5.1",_inBundle:!1,_integrity:"sha512-xvJINNLbTeWQjrl6X+7eQCrIy/YPv5XCpKW6kB5mKvtnGILoLDcySuwomfdzt0BMdLNVnuRNTuzKNHj0bva1Cg==",_location:"/elliptic",_phantomChildren:{},_requested:{type:"version",registry:!0,raw:"elliptic@6.5.1",name:"elliptic",escapedName:"elliptic",rawSpec:"6.5.1",saveSpec:null,fetchSpec:"6.5.1"},_requiredBy:["/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.5.1.tgz",_spec:"6.5.1",_where:"/var/lib/go-agent/pipelines/build_app",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^3.0.4",grunt:"^1.0.4","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.2",jscs:"^3.0.7",jshint:"^2.6.0",mocha:"^6.1.4"},files:["lib"],homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",name:"elliptic",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.5.1"}},function(t,e,n){"use strict";var r=n(36),i=n(22),a=n(10),o=n(113),s=r.assert;function c(t){o.call(this,"short",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(t,e,n,r){o.BasePoint.call(this,t,"affine"),null===e&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(e,16),this.y=new i(n,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function l(t,e,n,r){o.BasePoint.call(this,t,"jacobian"),null===e&&null===n&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(e,16),this.y=new i(n,16),this.z=new i(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}a(c,o),t.exports=c,c.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,n;if(t.beta)e=new i(t.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);e=(e=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(t.lambda)n=new i(t.lambda,16);else{var a=this._getEndoRoots(this.n);0===this.g.mul(a[0]).x.cmp(this.g.x.redMul(e))?n=a[0]:(n=a[1],s(0===this.g.mul(n).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:n,basis:t.basis?t.basis.map(function(t){return{a:new i(t.a,16),b:new i(t.b,16)}}):this._getEndoBasis(n)}}},c.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:i.mont(t),n=new i(2).toRed(e).redInvm(),r=n.redNeg(),a=new i(3).toRed(e).redNeg().redSqrt().redMul(n);return[r.redAdd(a).fromRed(),r.redSub(a).fromRed()]},c.prototype._getEndoBasis=function(t){for(var e,n,r,a,o,s,c,u,l,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),f=t,h=this.n.clone(),p=new i(1),m=new i(0),v=new i(0),_=new i(1),g=0;0!==f.cmpn(0);){var b=h.div(f);u=h.sub(b.mul(f)),l=v.sub(b.mul(p));var y=_.sub(b.mul(m));if(!r&&u.cmp(d)<0)e=c.neg(),n=p,r=u.neg(),a=l;else if(r&&2==++g)break;c=u,h=f,f=u,v=p,p=l,_=m,m=y}o=u.neg(),s=l;var x=r.sqr().add(a.sqr());return o.sqr().add(s.sqr()).cmp(x)>=0&&(o=e,s=n),r.negative&&(r=r.neg(),a=a.neg()),o.negative&&(o=o.neg(),s=s.neg()),[{a:r,b:a},{a:o,b:s}]},c.prototype._endoSplit=function(t){var e=this.endo.basis,n=e[0],r=e[1],i=r.b.mul(t).divRound(this.n),a=n.b.neg().mul(t).divRound(this.n),o=i.mul(n.a),s=a.mul(r.a),c=i.mul(n.b),u=a.mul(r.b);return{k1:t.sub(o).sub(s),k2:c.add(u).neg()}},c.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var n=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var a=r.fromRed().isOdd();return(e&&!a||!e&&a)&&(r=r.redNeg()),this.point(t,r)},c.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,n=t.y,r=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(i).cmpn(0)},c.prototype._endoWnafMulAdd=function(t,e,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,a=0;a<t.length;a++){var o=this._endoSplit(e[a]),s=t[a],c=s._getBeta();o.k1.negative&&(o.k1.ineg(),s=s.neg(!0)),o.k2.negative&&(o.k2.ineg(),c=c.neg(!0)),r[2*a]=s,r[2*a+1]=c,i[2*a]=o.k1,i[2*a+1]=o.k2}for(var u=this._wnafMulAdd(1,r,i,2*a,n),l=0;l<2*a;l++)r[l]=null,i[l]=null;return u},a(u,o.BasePoint),c.prototype.point=function(t,e,n){return new u(this,t,e,n)},c.prototype.pointFromJSON=function(t,e){return u.fromJSON(this,t,e)},u.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var n=this.curve,r=function(t){return n.point(t.x.redMul(n.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(r)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(r)}}}return e}},u.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},u.fromJSON=function(t,e,n){"string"==typeof e&&(e=JSON.parse(e));var r=t.point(e[0],e[1],n);if(!e[2])return r;function i(e){return t.point(e[0],e[1],n)}var a=e[2];return r.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[r].concat(a.doubles.points.map(i))},naf:a.naf&&{wnd:a.naf.wnd,points:[r].concat(a.naf.points.map(i))}},r},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var n=e.redSqr().redISub(this.x).redISub(t.x),r=e.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},u.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,n=this.x.redSqr(),r=t.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(e).redMul(r),a=i.redSqr().redISub(this.x.redAdd(this.x)),o=i.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(t){return t=new i(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},u.prototype.mulAdd=function(t,e,n){var r=[this,e],i=[t,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i):this.curve._wnafMulAdd(1,r,i,2)},u.prototype.jmulAdd=function(t,e,n){var r=[this,e],i=[t,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i,!0):this.curve._wnafMulAdd(1,r,i,2,!0)},u.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},u.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var n=this.precomputed,r=function(t){return t.neg()};e.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return e},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},a(l,o.BasePoint),c.prototype.jpoint=function(t,e,n){return new l(this,t,e,n)},l.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),n=this.x.redMul(e),r=this.y.redMul(e).redMul(t);return this.curve.point(n,r)},l.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},l.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(e),i=t.x.redMul(n),a=this.y.redMul(e.redMul(t.z)),o=t.y.redMul(n.redMul(this.z)),s=r.redSub(i),c=a.redSub(o);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),l=u.redMul(s),d=r.redMul(u),f=c.redSqr().redIAdd(l).redISub(d).redISub(d),h=c.redMul(d.redISub(f)).redISub(a.redMul(l)),p=this.z.redMul(t.z).redMul(s);return this.curve.jpoint(f,h,p)},l.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),n=this.x,r=t.x.redMul(e),i=this.y,a=t.y.redMul(e).redMul(this.z),o=n.redSub(r),s=i.redSub(a);if(0===o.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=o.redSqr(),u=c.redMul(o),l=n.redMul(c),d=s.redSqr().redIAdd(u).redISub(l).redISub(l),f=s.redMul(l.redISub(d)).redISub(i.redMul(u)),h=this.z.redMul(o);return this.curve.jpoint(d,f,h)},l.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var e=this,n=0;n<t;n++)e=e.dbl();return e}var r=this.curve.a,i=this.curve.tinv,a=this.x,o=this.y,s=this.z,c=s.redSqr().redSqr(),u=o.redAdd(o);for(n=0;n<t;n++){var l=a.redSqr(),d=u.redSqr(),f=d.redSqr(),h=l.redAdd(l).redIAdd(l).redIAdd(r.redMul(c)),p=a.redMul(d),m=h.redSqr().redISub(p.redAdd(p)),v=p.redISub(m),_=h.redMul(v);_=_.redIAdd(_).redISub(f);var g=u.redMul(s);n+1<t&&(c=c.redMul(f)),a=m,s=g,u=_}return this.curve.jpoint(a,u.redMul(i),s)},l.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},l.prototype._zeroDbl=function(){var t,e,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),a=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(r).redISub(a);o=o.redIAdd(o);var s=r.redAdd(r).redIAdd(r),c=s.redSqr().redISub(o).redISub(o),u=a.redIAdd(a);u=(u=u.redIAdd(u)).redIAdd(u),t=c,e=s.redMul(o.redISub(c)).redISub(u),n=this.y.redAdd(this.y)}else{var l=this.x.redSqr(),d=this.y.redSqr(),f=d.redSqr(),h=this.x.redAdd(d).redSqr().redISub(l).redISub(f);h=h.redIAdd(h);var p=l.redAdd(l).redIAdd(l),m=p.redSqr(),v=f.redIAdd(f);v=(v=v.redIAdd(v)).redIAdd(v),t=m.redISub(h).redISub(h),e=p.redMul(h.redISub(t)).redISub(v),n=(n=this.y.redMul(this.z)).redIAdd(n)}return this.curve.jpoint(t,e,n)},l.prototype._threeDbl=function(){var t,e,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),a=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(r).redISub(a);o=o.redIAdd(o);var s=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),c=s.redSqr().redISub(o).redISub(o);t=c;var u=a.redIAdd(a);u=(u=u.redIAdd(u)).redIAdd(u),e=s.redMul(o.redISub(c)).redISub(u),n=this.y.redAdd(this.y)}else{var l=this.z.redSqr(),d=this.y.redSqr(),f=this.x.redMul(d),h=this.x.redSub(l).redMul(this.x.redAdd(l));h=h.redAdd(h).redIAdd(h);var p=f.redIAdd(f),m=(p=p.redIAdd(p)).redAdd(p);t=h.redSqr().redISub(m),n=this.y.redAdd(this.z).redSqr().redISub(d).redISub(l);var v=d.redSqr();v=(v=(v=v.redIAdd(v)).redIAdd(v)).redIAdd(v),e=h.redMul(p.redISub(t)).redISub(v)}return this.curve.jpoint(t,e,n)},l.prototype._dbl=function(){var t=this.curve.a,e=this.x,n=this.y,r=this.z,i=r.redSqr().redSqr(),a=e.redSqr(),o=n.redSqr(),s=a.redAdd(a).redIAdd(a).redIAdd(t.redMul(i)),c=e.redAdd(e),u=(c=c.redIAdd(c)).redMul(o),l=s.redSqr().redISub(u.redAdd(u)),d=u.redISub(l),f=o.redSqr();f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var h=s.redMul(d).redISub(f),p=n.redAdd(n).redMul(r);return this.curve.jpoint(l,h,p)},l.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),n=this.z.redSqr(),r=e.redSqr(),i=t.redAdd(t).redIAdd(t),a=i.redSqr(),o=this.x.redAdd(e).redSqr().redISub(t).redISub(r),s=(o=(o=(o=o.redIAdd(o)).redAdd(o).redIAdd(o)).redISub(a)).redSqr(),c=r.redIAdd(r);c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var u=i.redIAdd(o).redSqr().redISub(a).redISub(s).redISub(c),l=e.redMul(u);l=(l=l.redIAdd(l)).redIAdd(l);var d=this.x.redMul(s).redISub(l);d=(d=d.redIAdd(d)).redIAdd(d);var f=this.y.redMul(u.redMul(c.redISub(u)).redISub(o.redMul(s)));f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var h=this.z.redAdd(o).redSqr().redISub(n).redISub(s);return this.curve.jpoint(d,f,h)},l.prototype.mul=function(t,e){return t=new i(t,e),this.curve._wnafMul(this,t)},l.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),n=t.z.redSqr();if(0!==this.x.redMul(n).redISub(t.x.redMul(e)).cmpn(0))return!1;var r=e.redMul(this.z),i=n.redMul(t.z);return 0===this.y.redMul(i).redISub(t.y.redMul(r)).cmpn(0)},l.prototype.eqXToP=function(t){var e=this.z.redSqr(),n=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(n))return!0;for(var r=t.clone(),i=this.curve.redN.redMul(e);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(i),0===this.x.cmp(n))return!0}},l.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(t,e,n){"use strict";var r=n(22),i=n(10),a=n(113),o=n(36);function s(t){a.call(this,"mont",t),this.a=new r(t.a,16).toRed(this.red),this.b=new r(t.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(t,e,n){a.BasePoint.call(this,t,"projective"),null===e&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(e,16),this.z=new r(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,a),t.exports=s,s.prototype.validate=function(t){var e=t.normalize().x,n=e.redSqr(),r=n.redMul(e).redAdd(n.redMul(this.a)).redAdd(e);return 0===r.redSqrt().redSqr().cmp(r)},i(c,a.BasePoint),s.prototype.decodePoint=function(t,e){return this.point(o.toArray(t,e),1)},s.prototype.point=function(t,e){return new c(this,t,e)},s.prototype.pointFromJSON=function(t){return c.fromJSON(this,t)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(t,e){return new c(t,e[0],e[1]||t.one)},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},c.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),n=t.redSub(e),r=t.redMul(e),i=n.redMul(e.redAdd(this.curve.a24.redMul(n)));return this.curve.point(r,i)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(t,e){var n=this.x.redAdd(this.z),r=this.x.redSub(this.z),i=t.x.redAdd(t.z),a=t.x.redSub(t.z).redMul(n),o=i.redMul(r),s=e.z.redMul(a.redAdd(o).redSqr()),c=e.x.redMul(a.redISub(o).redSqr());return this.curve.point(s,c)},c.prototype.mul=function(t){for(var e=t.clone(),n=this,r=this.curve.point(null,null),i=[];0!==e.cmpn(0);e.iushrn(1))i.push(e.andln(1));for(var a=i.length-1;a>=0;a--)0===i[a]?(n=n.diffAdd(r,this),r=r.dbl()):(r=n.diffAdd(r,this),n=n.dbl());return r},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(t,e,n){"use strict";var r=n(36),i=n(22),a=n(10),o=n(113),s=r.assert;function c(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,o.call(this,"edwards",t),this.a=new i(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function u(t,e,n,r,a){o.BasePoint.call(this,t,"projective"),null===e&&null===n&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(e,16),this.y=new i(n,16),this.z=r?new i(r,16):this.curve.one,this.t=a&&new i(a,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}a(c,o),t.exports=c,c.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},c.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},c.prototype.jpoint=function(t,e,n,r){return this.point(t,e,n,r)},c.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var n=t.redSqr(),r=this.c2.redSub(this.a.redMul(n)),a=this.one.redSub(this.c2.redMul(this.d).redMul(n)),o=r.redMul(a.redInvm()),s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var c=s.fromRed().isOdd();return(e&&!c||!e&&c)&&(s=s.redNeg()),this.point(t,s)},c.prototype.pointFromY=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var n=t.redSqr(),r=n.redSub(this.c2),a=n.redMul(this.d).redMul(this.c2).redSub(this.a),o=r.redMul(a.redInvm());if(0===o.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==e&&(s=s.redNeg()),this.point(s,t)},c.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),n=t.y.redSqr(),r=e.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(n)));return 0===r.cmp(i)},a(u,o.BasePoint),c.prototype.pointFromJSON=function(t){return u.fromJSON(this,t)},c.prototype.point=function(t,e,n,r){return new u(this,t,e,n,r)},u.fromJSON=function(t,e){return new u(t,e[0],e[1],e[2])},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var r=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),a=r.redAdd(e),o=a.redSub(n),s=r.redSub(e),c=i.redMul(o),u=a.redMul(s),l=i.redMul(s),d=o.redMul(a);return this.curve.point(c,u,d,l)},u.prototype._projDbl=function(){var t,e,n,r=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var o=(u=this.curve._mulA(i)).redAdd(a);if(this.zOne)t=r.redSub(i).redSub(a).redMul(o.redSub(this.curve.two)),e=o.redMul(u.redSub(a)),n=o.redSqr().redSub(o).redSub(o);else{var s=this.z.redSqr(),c=o.redSub(s).redISub(s);t=r.redSub(i).redISub(a).redMul(c),e=o.redMul(u.redSub(a)),n=o.redMul(c)}}else{var u=i.redAdd(a);s=this.curve._mulC(this.z).redSqr(),c=u.redSub(s).redSub(s);t=this.curve._mulC(r.redISub(u)).redMul(c),e=this.curve._mulC(u).redMul(i.redISub(a)),n=u.redMul(c)}return this.curve.point(t,e,n)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),n=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),r=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),a=n.redSub(e),o=i.redSub(r),s=i.redAdd(r),c=n.redAdd(e),u=a.redMul(o),l=s.redMul(c),d=a.redMul(c),f=o.redMul(s);return this.curve.point(u,l,f,d)},u.prototype._projAdd=function(t){var e,n,r=this.z.redMul(t.z),i=r.redSqr(),a=this.x.redMul(t.x),o=this.y.redMul(t.y),s=this.curve.d.redMul(a).redMul(o),c=i.redSub(s),u=i.redAdd(s),l=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(a).redISub(o),d=r.redMul(c).redMul(l);return this.curve.twisted?(e=r.redMul(u).redMul(o.redSub(this.curve._mulA(a))),n=c.redMul(u)):(e=r.redMul(u).redMul(o.redSub(a)),n=this.curve._mulC(c).redMul(u)),this.curve.point(d,e,n)},u.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},u.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},u.prototype.mulAdd=function(t,e,n){return this.curve._wnafMulAdd(1,[this,e],[t,n],2,!1)},u.prototype.jmulAdd=function(t,e,n){return this.curve._wnafMulAdd(1,[this,e],[t,n],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},u.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var n=t.clone(),r=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(r),0===this.x.cmp(e))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},function(t,e,n){"use strict";e.sha1=n(916),e.sha224=n(917),e.sha256=n(371),e.sha384=n(918),e.sha512=n(372)},function(t,e,n){"use strict";var r=n(47),i=n(90),a=n(370),o=r.rotl32,s=r.sum32,c=r.sum32_5,u=a.ft_1,l=i.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function f(){if(!(this instanceof f))return new f;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(f,l),t.exports=f,f.blockSize=512,f.outSize=160,f.hmacStrength=80,f.padLength=64,f.prototype._update=function(t,e){for(var n=this.W,r=0;r<16;r++)n[r]=t[e+r];for(;r<n.length;r++)n[r]=o(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var i=this.h[0],a=this.h[1],l=this.h[2],f=this.h[3],h=this.h[4];for(r=0;r<n.length;r++){var p=~~(r/20),m=c(o(i,5),u(p,a,l,f),h,n[r],d[p]);h=f,f=l,l=o(a,30),a=i,i=m}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],a),this.h[2]=s(this.h[2],l),this.h[3]=s(this.h[3],f),this.h[4]=s(this.h[4],h)},f.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(t,e,n){"use strict";var r=n(47),i=n(371);function a(){if(!(this instanceof a))return new a;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}r.inherits(a,i),t.exports=a,a.blockSize=512,a.outSize=224,a.hmacStrength=192,a.padLength=64,a.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")}},function(t,e,n){"use strict";var r=n(47),i=n(372);function a(){if(!(this instanceof a))return new a;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}r.inherits(a,i),t.exports=a,a.blockSize=1024,a.outSize=384,a.hmacStrength=192,a.padLength=128,a.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")}},function(t,e,n){"use strict";var r=n(47),i=n(90),a=r.rotl32,o=r.sum32,s=r.sum32_3,c=r.sum32_4,u=i.BlockHash;function l(){if(!(this instanceof l))return new l;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function d(t,e,n,r){return t<=15?e^n^r:t<=31?e&n|~e&r:t<=47?(e|~n)^r:t<=63?e&r|n&~r:e^(n|~r)}function f(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function h(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}r.inherits(l,u),e.ripemd160=l,l.blockSize=512,l.outSize=160,l.hmacStrength=192,l.padLength=64,l.prototype._update=function(t,e){for(var n=this.h[0],r=this.h[1],i=this.h[2],u=this.h[3],l=this.h[4],g=n,b=r,y=i,x=u,w=l,k=0;k<80;k++){var C=o(a(c(n,d(k,r,i,u),t[p[k]+e],f(k)),v[k]),l);n=l,l=u,u=a(i,10),i=r,r=C,C=o(a(c(g,d(79-k,b,y,x),t[m[k]+e],h(k)),_[k]),w),g=w,w=x,x=a(y,10),y=b,b=C}C=s(this.h[1],i,x),this.h[1]=s(this.h[2],u,w),this.h[2]=s(this.h[3],l,g),this.h[3]=s(this.h[4],n,b),this.h[4]=s(this.h[0],r,y),this.h[0]=C},l.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"little"):r.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],v=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],_=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},function(t,e,n){"use strict";var r=n(47),i=n(35);function a(t,e,n){if(!(this instanceof a))return new a(t,e,n);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(e,n))}t.exports=a,a.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},a.prototype.update=function(t,e){return this.inner.update(t,e),this},a.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},function(t,e){t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(t,e,n){"use strict";var r=n(22),i=n(923),a=n(36),o=n(290),s=n(287),c=a.assert,u=n(924),l=n(925);function d(t){if(!(this instanceof d))return new d(t);"string"==typeof t&&(c(o.hasOwnProperty(t),"Unknown curve "+t),t=o[t]),t instanceof o.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}t.exports=d,d.prototype.keyPair=function(t){return new u(this,t)},d.prototype.keyFromPrivate=function(t,e){return u.fromPrivate(this,t,e)},d.prototype.keyFromPublic=function(t,e){return u.fromPublic(this,t,e)},d.prototype.genKeyPair=function(t){t||(t={});for(var e=new i({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||s(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),a=this.n.sub(new r(2));;){var o=new r(e.generate(n));if(!(o.cmp(a)>0))return o.iaddn(1),this.keyFromPrivate(o)}},d.prototype._truncateToN=function(t,e){var n=8*t.byteLength()-this.n.bitLength();return n>0&&(t=t.ushrn(n)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},d.prototype.sign=function(t,e,n,a){"object"==typeof n&&(a=n,n=null),a||(a={}),e=this.keyFromPrivate(e,n),t=this._truncateToN(new r(t,16));for(var o=this.n.byteLength(),s=e.getPrivate().toArray("be",o),c=t.toArray("be",o),u=new i({hash:this.hash,entropy:s,nonce:c,pers:a.pers,persEnc:a.persEnc||"utf8"}),d=this.n.sub(new r(1)),f=0;;f++){var h=a.k?a.k(f):new r(u.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(d)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var m=p.getX(),v=m.umod(this.n);if(0!==v.cmpn(0)){var _=h.invm(this.n).mul(v.mul(e.getPrivate()).iadd(t));if(0!==(_=_.umod(this.n)).cmpn(0)){var g=(p.getY().isOdd()?1:0)|(0!==m.cmp(v)?2:0);return a.canonical&&_.cmp(this.nh)>0&&(_=this.n.sub(_),g^=1),new l({r:v,s:_,recoveryParam:g})}}}}}},d.prototype.verify=function(t,e,n,i){t=this._truncateToN(new r(t,16)),n=this.keyFromPublic(n,i);var a=(e=new l(e,"hex")).r,o=e.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var s,c=o.invm(this.n),u=c.mul(t).umod(this.n),d=c.mul(a).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(u,n.getPublic(),d)).isInfinity()&&s.eqXToP(a):!(s=this.g.mulAdd(u,n.getPublic(),d)).isInfinity()&&0===s.getX().umod(this.n).cmp(a)},d.prototype.recoverPubKey=function(t,e,n,i){c((3&n)===n,"The recovery param is more than two bits"),e=new l(e,i);var a=this.n,o=new r(t),s=e.r,u=e.s,d=1&n,f=n>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");s=f?this.curve.pointFromX(s.add(this.curve.n),d):this.curve.pointFromX(s,d);var h=e.r.invm(a),p=a.sub(o).mul(h).umod(a),m=u.mul(h).umod(a);return this.g.mulAdd(p,s,m)},d.prototype.getKeyRecoveryParam=function(t,e,n,r){if(null!==(e=new l(e,r)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var a;try{a=this.recoverPubKey(t,e,i)}catch(t){continue}if(a.eq(n))return i}throw new Error("Unable to find valid recovery factor")}},function(t,e,n){"use strict";var r=n(291),i=n(368),a=n(35);function o(t){if(!(this instanceof o))return new o(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||"hex"),n=i.toArray(t.nonce,t.nonceEnc||"hex"),r=i.toArray(t.pers,t.persEnc||"hex");a(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,n,r)}t.exports=o,o.prototype._init=function(t,e,n){var r=t.concat(e).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},o.prototype._hmac=function(){return new r.hmac(this.hash,this.K)},o.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},o.prototype.reseed=function(t,e,n,r){"string"!=typeof e&&(r=n,n=e,e=null),t=i.toArray(t,e),n=i.toArray(n,r),a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(n||[])),this._reseed=1},o.prototype.generate=function(t,e,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(r=n,n=e,e=null),n&&(n=i.toArray(n,r||"hex"),this._update(n));for(var a=[];a.length<t;)this.V=this._hmac().update(this.V).digest(),a=a.concat(this.V);var o=a.slice(0,t);return this._update(n),this._reseed++,i.encode(o,e)}},function(t,e,n){"use strict";var r=n(22),i=n(36).assert;function a(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}t.exports=a,a.fromPublic=function(t,e,n){return e instanceof a?e:new a(t,{pub:e,pubEnc:n})},a.fromPrivate=function(t,e,n){return e instanceof a?e:new a(t,{priv:e,privEnc:n})},a.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},a.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},a.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},a.prototype._importPrivate=function(t,e){this.priv=new r(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},a.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?i(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},a.prototype.derive=function(t){return t.mul(this.priv).getX()},a.prototype.sign=function(t,e,n){return this.ec.sign(t,this,e,n)},a.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},a.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(t,e,n){"use strict";var r=n(22),i=n(36),a=i.assert;function o(t,e){if(t instanceof o)return t;this._importDER(t,e)||(a(t.r&&t.s,"Signature without r or s"),this.r=new r(t.r,16),this.s=new r(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function s(t,e){var n=t[e.place++];if(!(128&n))return n;for(var r=15&n,i=0,a=0,o=e.place;a<r;a++,o++)i<<=8,i|=t[o];return e.place=o,i}function c(t){for(var e=0,n=t.length-1;!t[e]&&!(128&t[e+1])&&e<n;)e++;return 0===e?t:t.slice(e)}function u(t,e){if(e<128)t.push(e);else{var n=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|n);--n;)t.push(e>>>(n<<3)&255);t.push(e)}}t.exports=o,o.prototype._importDER=function(t,e){t=i.toArray(t,e);var n=new function(){this.place=0};if(48!==t[n.place++])return!1;if(s(t,n)+n.place!==t.length)return!1;if(2!==t[n.place++])return!1;var a=s(t,n),o=t.slice(n.place,a+n.place);if(n.place+=a,2!==t[n.place++])return!1;var c=s(t,n);if(t.length!==c+n.place)return!1;var u=t.slice(n.place,c+n.place);return 0===o[0]&&128&o[1]&&(o=o.slice(1)),0===u[0]&&128&u[1]&&(u=u.slice(1)),this.r=new r(o),this.s=new r(u),this.recoveryParam=null,!0},o.prototype.toDER=function(t){var e=this.r.toArray(),n=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&n[0]&&(n=[0].concat(n)),e=c(e),n=c(n);!(n[0]||128&n[1]);)n=n.slice(1);var r=[2];u(r,e.length),(r=r.concat(e)).push(2),u(r,n.length);var a=r.concat(n),o=[48];return u(o,a.length),o=o.concat(a),i.encode(o,t)}},function(t,e,n){"use strict";var r=n(291),i=n(290),a=n(36),o=a.assert,s=a.parseBytes,c=n(927),u=n(928);function l(t){if(o("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof l))return new l(t);t=i[t].curve;this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=r.sha512}t.exports=l,l.prototype.sign=function(t,e){t=s(t);var n=this.keyFromSecret(e),r=this.hashInt(n.messagePrefix(),t),i=this.g.mul(r),a=this.encodePoint(i),o=this.hashInt(a,n.pubBytes(),t).mul(n.priv()),c=r.add(o).umod(this.curve.n);return this.makeSignature({R:i,S:c,Rencoded:a})},l.prototype.verify=function(t,e,n){t=s(t),e=this.makeSignature(e);var r=this.keyFromPublic(n),i=this.hashInt(e.Rencoded(),r.pubBytes(),t),a=this.g.mul(e.S());return e.R().add(r.pub().mul(i)).eq(a)},l.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return a.intFromLE(t.digest()).umod(this.curve.n)},l.prototype.keyFromPublic=function(t){return c.fromPublic(this,t)},l.prototype.keyFromSecret=function(t){return c.fromSecret(this,t)},l.prototype.makeSignature=function(t){return t instanceof u?t:new u(this,t)},l.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},l.prototype.decodePoint=function(t){var e=(t=a.parseBytes(t)).length-1,n=t.slice(0,e).concat(-129&t[e]),r=0!=(128&t[e]),i=a.intFromLE(n);return this.curve.pointFromY(i,r)},l.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},l.prototype.decodeInt=function(t){return a.intFromLE(t)},l.prototype.isPoint=function(t){return t instanceof this.pointClass}},function(t,e,n){"use strict";var r=n(36),i=r.assert,a=r.parseBytes,o=r.cachedProperty;function s(t,e){this.eddsa=t,this._secret=a(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=a(e.pub)}s.fromPublic=function(t,e){return e instanceof s?e:new s(t,{pub:e})},s.fromSecret=function(t,e){return e instanceof s?e:new s(t,{secret:e})},s.prototype.secret=function(){return this._secret},o(s,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),o(s,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),o(s,"privBytes",function(){var t=this.eddsa,e=this.hash(),n=t.encodingLength-1,r=e.slice(0,t.encodingLength);return r[0]&=248,r[n]&=127,r[n]|=64,r}),o(s,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),o(s,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),o(s,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),s.prototype.sign=function(t){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},s.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},s.prototype.getSecret=function(t){return i(this._secret,"KeyPair is public only"),r.encode(this.secret(),t)},s.prototype.getPublic=function(t){return r.encode(this.pubBytes(),t)},t.exports=s},function(t,e,n){"use strict";var r=n(22),i=n(36),a=i.assert,o=i.cachedProperty,s=i.parseBytes;function c(t,e){this.eddsa=t,"object"!=typeof e&&(e=s(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),a(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof r&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}o(c,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),o(c,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),o(c,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),o(c,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),c.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},c.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},t.exports=c},function(t,e,n){"use strict";var r=n(91);e.certificate=n(939);var i=r.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});e.RSAPrivateKey=i;var a=r.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});e.RSAPublicKey=a;var o=r.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())});e.PublicKey=o;var s=r.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),c=r.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())});e.PrivateKey=c;var u=r.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});e.EncryptedPrivateKey=u;var l=r.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});e.DSAPrivateKey=l,e.DSAparam=r.define("DSAparam",function(){this.int()});var d=r.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(f),this.key("publicKey").optional().explicit(1).bitstr())});e.ECPrivateKey=d;var f=r.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});e.signature=r.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},function(t,e,n){var r=n(91),i=n(10);function a(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}e.define=function(t,e){return new a(t,e)},a.prototype._createNamed=function(t){var e;try{e=n(931).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(t){e=function(t){this._initNamed(t)}}return i(e,t),e.prototype._initNamed=function(e){t.call(this,e)},new e(this)},a.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(r.decoders[t])),this.decoders[t]},a.prototype.decode=function(t,e,n){return this._getDecoder(e).decode(t,n)},a.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(r.encoders[t])),this.encoders[t]},a.prototype.encode=function(t,e,n){return this._getEncoder(e).encode(t,n)}},function(module,exports){var indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1},Object_keys=function(t){if(Object.keys)return Object.keys(t);var e=[];for(var n in t)e.push(n);return e},forEach=function(t,e){if(t.forEach)return t.forEach(e);for(var n=0;n<t.length;n++)e(t[n],n,t)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(t,e,n){Object.defineProperty(t,e,{writable:!0,enumerable:!1,configurable:!0,value:n})}}catch(t){return function(t,e,n){t[e]=n}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(t){if(!(this instanceof Script))return new Script(t);this.code=t};Script.prototype.runInContext=function(t){if(!(t instanceof Context))throw new TypeError("needs a 'context' argument.");var e=document.createElement("iframe");e.style||(e.style={}),e.style.display="none",document.body.appendChild(e);var n=e.contentWindow,r=n.eval,i=n.execScript;!r&&i&&(i.call(n,"null"),r=n.eval),forEach(Object_keys(t),function(e){n[e]=t[e]}),forEach(globals,function(e){t[e]&&(n[e]=t[e])});var a=Object_keys(n),o=r.call(n,this.code);return forEach(Object_keys(n),function(e){(e in t||-1===indexOf(a,e))&&(t[e]=n[e])}),forEach(globals,function(e){e in t||defineProp(t,e,n[e])}),document.body.removeChild(e),o},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(t){var e=Script.createContext(t),n=this.runInContext(e);return t&&forEach(Object_keys(e),function(n){t[n]=e[n]}),n},forEach(Object_keys(Script.prototype),function(t){exports[t]=Script[t]=function(e){var n=Script(e);return n[t].apply(n,[].slice.call(arguments,1))}}),exports.isContext=function(t){return t instanceof Context},exports.createScript=function(t){return exports.Script(t)},exports.createContext=Script.createContext=function(t){var e=new Context;return"object"==typeof t&&forEach(Object_keys(t),function(n){e[n]=t[n]}),e}},function(t,e,n){var r=n(10);function i(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function a(t,e){this.path=t,this.rethrow(e)}e.Reporter=i,i.prototype.isError=function(t){return t instanceof a},i.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},i.prototype.restore=function(t){var e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},i.prototype.enterKey=function(t){return this._reporterState.path.push(t)},i.prototype.exitKey=function(t){var e=this._reporterState;e.path=e.path.slice(0,t-1)},i.prototype.leaveKey=function(t,e,n){var r=this._reporterState;this.exitKey(t),null!==r.obj&&(r.obj[e]=n)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var t=this._reporterState,e=t.obj;return t.obj={},e},i.prototype.leaveObject=function(t){var e=this._reporterState,n=e.obj;return e.obj=t,n},i.prototype.error=function(t){var e,n=this._reporterState,r=t instanceof a;if(e=r?t:new a(n.path.map(function(t){return"["+JSON.stringify(t)+"]"}).join(""),t.message||t,t.stack),!n.options.partial)throw e;return r||n.errors.push(e),e},i.prototype.wrapResult=function(t){var e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},r(a,Error),a.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,a),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},function(t,e,n){var r=n(92).Reporter,i=n(92).EncoderBuffer,a=n(92).DecoderBuffer,o=n(35),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],c=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function u(t,e){var n={};this._baseState=n,n.enc=t,n.parent=e||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}t.exports=u;var l=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];u.prototype.clone=function(){var t=this._baseState,e={};l.forEach(function(n){e[n]=t[n]});var n=new this.constructor(e.parent);return n._baseState=e,n},u.prototype._wrap=function(){var t=this._baseState;c.forEach(function(e){this[e]=function(){var n=new this.constructor(this);return t.children.push(n),n[e].apply(n,arguments)}},this)},u.prototype._init=function(t){var e=this._baseState;o(null===e.parent),t.call(this),e.children=e.children.filter(function(t){return t._baseState.parent===this},this),o.equal(e.children.length,1,"Root node can have only one child")},u.prototype._useArgs=function(t){var e=this._baseState,n=t.filter(function(t){return t instanceof this.constructor},this);t=t.filter(function(t){return!(t instanceof this.constructor)},this),0!==n.length&&(o(null===e.children),e.children=n,n.forEach(function(t){t._baseState.parent=this},this)),0!==t.length&&(o(null===e.args),e.args=t,e.reverseArgs=t.map(function(t){if("object"!=typeof t||t.constructor!==Object)return t;var e={};return Object.keys(t).forEach(function(n){n==(0|n)&&(n|=0);var r=t[n];e[r]=n}),e}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(t){u.prototype[t]=function(){var e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}}),s.forEach(function(t){u.prototype[t]=function(){var e=this._baseState,n=Array.prototype.slice.call(arguments);return o(null===e.tag),e.tag=t,this._useArgs(n),this}}),u.prototype.use=function(t){o(t);var e=this._baseState;return o(null===e.use),e.use=t,this},u.prototype.optional=function(){return this._baseState.optional=!0,this},u.prototype.def=function(t){var e=this._baseState;return o(null===e.default),e.default=t,e.optional=!0,this},u.prototype.explicit=function(t){var e=this._baseState;return o(null===e.explicit&&null===e.implicit),e.explicit=t,this},u.prototype.implicit=function(t){var e=this._baseState;return o(null===e.explicit&&null===e.implicit),e.implicit=t,this},u.prototype.obj=function(){var t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},u.prototype.key=function(t){var e=this._baseState;return o(null===e.key),e.key=t,this},u.prototype.any=function(){return this._baseState.any=!0,this},u.prototype.choice=function(t){var e=this._baseState;return o(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map(function(e){return t[e]})),this},u.prototype.contains=function(t){var e=this._baseState;return o(null===e.use),e.contains=t,this},u.prototype._decode=function(t,e){var n=this._baseState;if(null===n.parent)return t.wrapResult(n.children[0]._decode(t,e));var r,i=n.default,o=!0,s=null;if(null!==n.key&&(s=t.enterKey(n.key)),n.optional){var c=null;if(null!==n.explicit?c=n.explicit:null!==n.implicit?c=n.implicit:null!==n.tag&&(c=n.tag),null!==c||n.any){if(o=this._peekTag(t,c,n.any),t.isError(o))return o}else{var u=t.save();try{null===n.choice?this._decodeGeneric(n.tag,t,e):this._decodeChoice(t,e),o=!0}catch(t){o=!1}t.restore(u)}}if(n.obj&&o&&(r=t.enterObject()),o){if(null!==n.explicit){var l=this._decodeTag(t,n.explicit);if(t.isError(l))return l;t=l}var d=t.offset;if(null===n.use&&null===n.choice){if(n.any)u=t.save();var f=this._decodeTag(t,null!==n.implicit?n.implicit:n.tag,n.any);if(t.isError(f))return f;n.any?i=t.raw(u):t=f}if(e&&e.track&&null!==n.tag&&e.track(t.path(),d,t.length,"tagged"),e&&e.track&&null!==n.tag&&e.track(t.path(),t.offset,t.length,"content"),i=n.any?i:null===n.choice?this._decodeGeneric(n.tag,t,e):this._decodeChoice(t,e),t.isError(i))return i;if(n.any||null!==n.choice||null===n.children||n.children.forEach(function(n){n._decode(t,e)}),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){var h=new a(i);i=this._getUse(n.contains,t._reporterState.obj)._decode(h,e)}}return n.obj&&o&&(i=t.leaveObject(r)),null===n.key||null===i&&!0!==o?null!==s&&t.exitKey(s):t.leaveKey(s,n.key,i),i},u.prototype._decodeGeneric=function(t,e,n){var r=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,r.args[0],n):/str$/.test(t)?this._decodeStr(e,t,n):"objid"===t&&r.args?this._decodeObjid(e,r.args[0],r.args[1],n):"objid"===t?this._decodeObjid(e,null,null,n):"gentime"===t||"utctime"===t?this._decodeTime(e,t,n):"null_"===t?this._decodeNull(e,n):"bool"===t?this._decodeBool(e,n):"objDesc"===t?this._decodeStr(e,t,n):"int"===t||"enum"===t?this._decodeInt(e,r.args&&r.args[0],n):null!==r.use?this._getUse(r.use,e._reporterState.obj)._decode(e,n):e.error("unknown tag: "+t)},u.prototype._getUse=function(t,e){var n=this._baseState;return n.useDecoder=this._use(t,e),o(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},u.prototype._decodeChoice=function(t,e){var n=this._baseState,r=null,i=!1;return Object.keys(n.choice).some(function(a){var o=t.save(),s=n.choice[a];try{var c=s._decode(t,e);if(t.isError(c))return!1;r={type:a,value:c},i=!0}catch(e){return t.restore(o),!1}return!0},this),i?r:t.error("Choice not matched")},u.prototype._createEncoderBuffer=function(t){return new i(t,this.reporter)},u.prototype._encode=function(t,e,n){var r=this._baseState;if(null===r.default||r.default!==t){var i=this._encodeValue(t,e,n);if(void 0!==i&&!this._skipDefault(i,e,n))return i}},u.prototype._encodeValue=function(t,e,n){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(t,e||new r);var a=null;if(this.reporter=e,i.optional&&void 0===t){if(null===i.default)return;t=i.default}var o=null,s=!1;if(i.any)a=this._createEncoderBuffer(t);else if(i.choice)a=this._encodeChoice(t,e);else if(i.contains)o=this._getUse(i.contains,n)._encode(t,e),s=!0;else if(i.children)o=i.children.map(function(n){if("null_"===n._baseState.tag)return n._encode(null,e,t);if(null===n._baseState.key)return e.error("Child should have a key");var r=e.enterKey(n._baseState.key);if("object"!=typeof t)return e.error("Child expected, but input is not object");var i=n._encode(t[n._baseState.key],e,t);return e.leaveKey(r),i},this).filter(function(t){return t}),o=this._createEncoderBuffer(o);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return e.error("Too many args for : "+i.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");var c=this.clone();c._baseState.implicit=null,o=this._createEncoderBuffer(t.map(function(n){var r=this._baseState;return this._getUse(r.args[0],t)._encode(n,e)},c))}else null!==i.use?a=this._getUse(i.use,n)._encode(t,e):(o=this._encodePrimitive(i.tag,t),s=!0);if(!i.any&&null===i.choice){var u=null!==i.implicit?i.implicit:i.tag,l=null===i.implicit?"universal":"context";null===u?null===i.use&&e.error("Tag could be omitted only for .use()"):null===i.use&&(a=this._encodeComposite(u,s,l,o))}return null!==i.explicit&&(a=this._encodeComposite(i.explicit,!1,"context",a)),a},u.prototype._encodeChoice=function(t,e){var n=this._baseState,r=n.choice[t.type];return r||o(!1,t.type+" not found in "+JSON.stringify(Object.keys(n.choice))),r._encode(t.value,e)},u.prototype._encodePrimitive=function(t,e){var n=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&n.args)return this._encodeObjid(e,n.reverseArgs[0],n.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,n.args&&n.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},u.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},u.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(t)}},function(t,e,n){var r=n(374);e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=r._reverse(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=r._reverse(e.tag)},function(t,e,n){var r=e;r.der=n(375),r.pem=n(936)},function(t,e,n){var r=n(10),i=n(19).Buffer,a=n(375);function o(t){a.call(this,t),this.enc="pem"}r(o,a),t.exports=o,o.prototype.decode=function(t,e){for(var n=t.toString().split(/[\r\n]+/g),r=e.label.toUpperCase(),o=/^-----(BEGIN|END) ([^-]+)-----$/,s=-1,c=-1,u=0;u<n.length;u++){var l=n[u].match(o);if(null!==l&&l[2]===r){if(-1!==s){if("END"!==l[1])break;c=u;break}if("BEGIN"!==l[1])break;s=u}}if(-1===s||-1===c)throw new Error("PEM section not found for: "+r);var d=n.slice(s+1,c).join("");d.replace(/[^a-z0-9\+\/=]+/gi,"");var f=new i(d,"base64");return a.prototype.decode.call(this,f,e)}},function(t,e,n){var r=e;r.der=n(376),r.pem=n(938)},function(t,e,n){var r=n(10),i=n(376);function a(t){i.call(this,t),this.enc="pem"}r(a,i),t.exports=a,a.prototype.encode=function(t,e){for(var n=i.prototype.encode.call(this,t).toString("base64"),r=["-----BEGIN "+e.label+"-----"],a=0;a<n.length;a+=64)r.push(n.slice(a,a+64));return r.push("-----END "+e.label+"-----"),r.join("\n")}},function(t,e,n){"use strict";var r=n(91),i=r.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),a=r.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),o=r.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),s=r.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())}),c=r.define("RelativeDistinguishedName",function(){this.setof(a)}),u=r.define("RDNSequence",function(){this.seqof(c)}),l=r.define("Name",function(){this.choice({rdnSequence:this.use(u)})}),d=r.define("Validity",function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))}),f=r.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),h=r.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(o),this.key("issuer").use(l),this.key("validity").use(d),this.key("subject").use(l),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(f).optional())}),p=r.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(h),this.key("signatureAlgorithm").use(o),this.key("signatureValue").bitstr())});t.exports=p},function(t,e){t.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},function(t,e,n){var r=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r\+\/\=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,a=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r\+\/\=]+)-----END \1-----$/m,o=n(112),s=n(285),c=n(11).Buffer;t.exports=function(t,e){var n,u=t.toString(),l=u.match(r);if(l){var d="aes"+l[1],f=c.from(l[2],"hex"),h=c.from(l[3].replace(/[\r\n]/g,""),"base64"),p=o(e,f.slice(0,8),parseInt(l[1],10)).key,m=[],v=s.createDecipheriv(d,p,f);m.push(v.update(h)),m.push(v.final()),n=c.concat(m)}else{var _=u.match(a);n=new c(_[2].replace(/[\r\n]/g,""),"base64")}return{tag:u.match(i)[1],data:n}}},function(t,e,n){(function(e){var r=n(22),i=n(289).ec,a=n(114),o=n(377);function s(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=e)throw new Error("invalid sig")}t.exports=function(t,n,c,u,l){var d=a(c);if("ec"===d.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(t,e,n){var r=o[n.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+n.data.algorithm.curve.join("."));var a=new i(r),s=n.data.subjectPrivateKey.data;return a.verify(e,t,s)}(t,n,d)}if("dsa"===d.type){if("dsa"!==u)throw new Error("wrong public key type");return function(t,e,n){var i=n.data.p,o=n.data.q,c=n.data.g,u=n.data.pub_key,l=a.signature.decode(t,"der"),d=l.s,f=l.r;s(d,o),s(f,o);var h=r.mont(i),p=d.invm(o);return 0===c.toRed(h).redPow(new r(e).mul(p).mod(o)).fromRed().mul(u.toRed(h).redPow(f.mul(p).mod(o)).fromRed()).mod(i).mod(o).cmp(f)}(t,n,d)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");n=e.concat([l,n]);for(var f=d.modulus.byteLength(),h=[1],p=0;n.length+h.length+2<f;)h.push(255),p++;h.push(0);for(var m=-1;++m<n.length;)h.push(n[m]);h=new e(h);var v=r.mont(d.modulus);t=(t=new r(t).toRed(v)).redPow(new r(d.publicExponent)),t=new e(t.fromRed().toArray());var _=p<8?1:0;for(f=Math.min(t.length,h.length),t.length!==h.length&&(_=1),m=-1;++m<f;)_|=t[m]^h[m];return 0===_}}).call(e,n(19).Buffer)},function(t,e,n){(function(e){var r=n(289),i=n(22);t.exports=function(t){return new o(t)};var a={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function o(t){this.curveType=a[t],this.curveType||(this.curveType={name:t}),this.curve=new r.ec(this.curveType.name),this.keys=void 0}function s(t,n,r){Array.isArray(t)||(t=t.toArray());var i=new e(t);if(r&&i.length<r){var a=new e(r-i.length);a.fill(0),i=e.concat([a,i])}return n?i.toString(n):i}a.p224=a.secp224r1,a.p256=a.secp256r1=a.prime256v1,a.p192=a.secp192r1=a.prime192v1,a.p384=a.secp384r1,a.p521=a.secp521r1,o.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)},o.prototype.computeSecret=function(t,n,r){return n=n||"utf8",e.isBuffer(t)||(t=new e(t,n)),s(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},o.prototype.getPublicKey=function(t,e){var n=this.keys.getPublic("compressed"===e,!0);return"hybrid"===e&&(n[n.length-1]%2?n[0]=7:n[0]=6),s(n,t)},o.prototype.getPrivateKey=function(t){return s(this.keys.getPrivate(),t)},o.prototype.setPublicKey=function(t,n){return n=n||"utf8",e.isBuffer(t)||(t=new e(t,n)),this.keys._importPublic(t),this},o.prototype.setPrivateKey=function(t,n){n=n||"utf8",e.isBuffer(t)||(t=new e(t,n));var r=new i(t);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this}}).call(e,n(19).Buffer)},function(t,e,n){e.publicEncrypt=n(945),e.privateDecrypt=n(946),e.privateEncrypt=function(t,n){return e.publicEncrypt(t,n,!0)},e.publicDecrypt=function(t,n){return e.privateDecrypt(t,n,!0)}},function(t,e,n){var r=n(114),i=n(76),a=n(87),o=n(378),s=n(379),c=n(22),u=n(380),l=n(288),d=n(11).Buffer;t.exports=function(t,e,n){var f;f=t.padding?t.padding:n?1:4;var h,p=r(t);if(4===f)h=function(t,e){var n=t.modulus.byteLength(),r=e.length,u=a("sha1").update(d.alloc(0)).digest(),l=u.length,f=2*l;if(r>n-f-2)throw new Error("message too long");var h=d.alloc(n-r-f-2),p=n-l-1,m=i(l),v=s(d.concat([u,h,d.alloc(1,1),e],p),o(m,p)),_=s(m,o(v,l));return new c(d.concat([d.alloc(1),_,v],n))}(p,e);else if(1===f)h=function(t,e,n){var r,a=e.length,o=t.modulus.byteLength();if(a>o-11)throw new Error("message too long");r=n?d.alloc(o-a-3,255):function(t){var e,n=d.allocUnsafe(t),r=0,a=i(2*t),o=0;for(;r<t;)o===a.length&&(a=i(2*t),o=0),(e=a[o++])&&(n[r++]=e);return n}(o-a-3);return new c(d.concat([d.from([0,n?1:2]),r,d.alloc(1),e],o))}(p,e,n);else{if(3!==f)throw new Error("unknown padding");if((h=new c(e)).cmp(p.modulus)>=0)throw new Error("data too long for modulus")}return n?l(h,p):u(h,p)}},function(t,e,n){var r=n(114),i=n(378),a=n(379),o=n(22),s=n(288),c=n(87),u=n(380),l=n(11).Buffer;t.exports=function(t,e,n){var d;d=t.padding?t.padding:n?1:4;var f,h=r(t),p=h.modulus.byteLength();if(e.length>p||new o(e).cmp(h.modulus)>=0)throw new Error("decryption error");f=n?u(new o(e),h):s(e,h);var m=l.alloc(p-f.length);if(f=l.concat([m,f],p),4===d)return function(t,e){var n=t.modulus.byteLength(),r=c("sha1").update(l.alloc(0)).digest(),o=r.length;if(0!==e[0])throw new Error("decryption error");var s=e.slice(1,o+1),u=e.slice(o+1),d=a(s,i(u,o)),f=a(u,i(d,n-o-1));if(function(t,e){t=l.from(t),e=l.from(e);var n=0,r=t.length;t.length!==e.length&&(n++,r=Math.min(t.length,e.length));var i=-1;for(;++i<r;)n+=t[i]^e[i];return n}(r,f.slice(0,o)))throw new Error("decryption error");var h=o;for(;0===f[h];)h++;if(1!==f[h++])throw new Error("decryption error");return f.slice(h)}(h,f);if(1===d)return function(t,e,n){var r=e.slice(0,2),i=2,a=0;for(;0!==e[i++];)if(i>=e.length){a++;break}var o=e.slice(2,i-1);("0002"!==r.toString("hex")&&!n||"0001"!==r.toString("hex")&&n)&&a++;o.length<8&&a++;if(a)throw new Error("decryption error");return e.slice(i)}(0,f,n);if(3===d)return f;throw new Error("unknown padding")}},function(t,e,n){"use strict";(function(t,r){function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var a=n(11),o=n(76),s=a.Buffer,c=a.kMaxLength,u=t.crypto||t.msCrypto,l=Math.pow(2,32)-1;function d(t,e){if("number"!=typeof t||t!=t)throw new TypeError("offset must be a number");if(t>l||t<0)throw new TypeError("offset must be a uint32");if(t>c||t>e)throw new RangeError("offset out of range")}function f(t,e,n){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>l||t<0)throw new TypeError("size must be a uint32");if(t+e>n||t>c)throw new RangeError("buffer too small")}function h(t,e,n,i){if(r.browser){var a=t.buffer,s=new Uint8Array(a,e,n);return u.getRandomValues(s),i?void r.nextTick(function(){i(null,t)}):t}if(!i)return o(n).copy(t,e),t;o(n,function(n,r){if(n)return i(n);r.copy(t,e),i(null,t)})}u&&u.getRandomValues||!r.browser?(e.randomFill=function(e,n,r,i){if(!(s.isBuffer(e)||e instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof n)i=n,n=0,r=e.length;else if("function"==typeof r)i=r,r=e.length-n;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return d(n,e.length),f(r,n,e.length),h(e,n,r,i)},e.randomFillSync=function(e,n,r){void 0===n&&(n=0);if(!(s.isBuffer(e)||e instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');d(n,e.length),void 0===r&&(r=e.length-n);return f(r,n,e.length),h(e,n,r)}):(e.randomFill=i,e.randomFillSync=i)}).call(e,n(20),n(26))},function(t,e){},function(t,e,n){"use strict";(function(t){e.a=function(){var e=t.Canvas||t.HTMLCanvasElement,n=t.Image||t.HTMLImageElement,a=t.fetch||function(){throw new Error("fetch - missing fetch implementation for nodejs environment")},o=Object(i.a)();return r.a({Canvas:e||function(){return function(){}}(),Image:n||function(){return function(){}}(),ImageData:t.ImageData||function(){return function(){}}(),Video:t.HTMLVideoElement||function(){return function(){}}(),createCanvasElement:function(){if(e)return new e;throw new Error("createCanvasElement - missing Canvas implementation for nodejs environment")},createImageElement:function(){if(n)return new n;throw new Error("createImageElement - missing Image implementation for nodejs environment")},fetch:a},o)};var r=n(7),i=n(381)}).call(e,n(20))},function(t,e,n){"use strict";(function(n,r){e.a=function(){return"object"==typeof n&&void 0!==t&&void 0!==r&&!!r.version}}).call(e,n(20),n(26))},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-stepper",{attrs:{vertical:""},model:{value:t.step,callback:function(e){t.step=e},expression:"step"}},[n("v-stepper-header",[n("v-stepper-step",{attrs:{step:"1",complete:t.step>1}},[t._v("Productor")]),t._v(" "),n("v-divider"),t._v(" "),n("v-stepper-step",{attrs:{step:"2",complete:t.step>2}},[t._v("Guia de internación")])],1),t._v(" "),n("v-stepper-items",[n("v-stepper-content",{attrs:{step:"1"}},[n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-autocomplete",{attrs:{items:t.personas,"item-text":"carnet_identidad","item-value":"id",label:"Carnet de identidad",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.errorCarnet},on:{change:function(e){return t.getPersona()}},model:{value:t.selectedItem.persona_id,callback:function(e){t.$set(t.selectedItem,"persona_id",e)},expression:"selectedItem.persona_id"}})],1),t._v(" "),n("v-data-table",{attrs:{headers:t.headers,items:t.persona,"hide-actions":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.fullName(e.item))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.carnet_identidad+" "+e.item.departamento_extension.sigla)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[e.item.carnet_productor.length>0?n("span",[t._v(t._s(e.item.carnet_productor[0].carnet)+" ")]):n("span",[t._v(" - ")])]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.email)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[e.item.sustitucion_id?n("v-chip",{attrs:{small:"",color:"blue","text-color":"white"}},[t._v("Sustituido")]):t._e(),t._v(" "),e.item.cesaciones.length>0?n("v-chip",{attrs:{small:"",color:"grey","text-color":"white"}},[t._v("Cesado")]):t._e(),t._v(" "),null==e.item.sustitucion_id&&0==e.item.cesaciones.length?n("v-chip",{attrs:{small:"",color:"green","text-color":"white"}},[t._v("Vigente")]):t._e()],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Telefono: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.telefono))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Estado civil: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.estado_civil))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Genero: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s("M"==e.item.genero?"Masculino":"Femenino"))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Telefono: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.telefono))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Email: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.email))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Domicilio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.domicilio))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.fecha_nacimiento)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Pais de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.pais_nacimiento.nombre))])]),t._v(" "),e.item.departamento_nacimiento_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Departamento de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.departamento_nacimiento.nombre))])]):t._e(),t._v(" "),e.item.provincia_nacimiento_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Provincia de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.provincia_nacimiento.nombre))])]):t._e(),t._v(" "),e.item.sustitucion_id?n("tr",[n("th",{attrs:{colspan:"2"}},[n("hr")])]):t._e(),t._v(" "),e.item.sustitucion_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Sustituido por: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(t.fullName(e.item.persona))+" "),n("br"),t._v(" \n CI.: "+t._s(e.item.persona.carnet_identidad+" "+e.item.persona.departamento_extension.sigla)+" \n ")])]):t._e(),t._v(" "),e.item.sustitucion_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Motivo de sustitución: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.sustitucion.descripcion)+" ")])]):t._e(),t._v(" "),e.item.sustitucion_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Documento de sustitución: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.adjunto_sustitucion,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)]):t._e(),t._v(" "),e.item.cesaciones.length>0?n("tr",[n("th",{attrs:{colspan:"2"}},[n("hr")])]):t._e(),t._v(" "),e.item.cesaciones.length>0?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Motivo de cesación: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.cesaciones[0].descripcion)+" ")])]):t._e(),t._v(" "),e.item.cesaciones.length>0?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Documento de cesación: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.cesaciones[0].pivot.adjunto_cesacion,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)]):t._e()])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2),t._v(" "),t.persona.length>0?n("v-layout",{staticClass:"mt-2 text-md-center",attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{md6:""}},[n("WebCam",{ref:"webcam",attrs:{width:"200",height:"auto",deviceId:t.deviceId},on:{cameras:t.onCameras,"camera-change":t.onCameraChange}}),t._v(" "),n("v-select",{attrs:{items:t.devices,label:"Seleccione camara","item-text":"label","item-value":"deviceId"},model:{value:t.camera,callback:function(e){t.camera=e},expression:"camera"}})],1),t._v(" "),n("v-flex",{attrs:{md6:""}},[n("v-btn",{attrs:{color:"indigo"},on:{"&click":function(e){return t.onCapture()}}},[n("v-icon",[t._v("face")]),t._v(" Reconocer rostro\n ")],1),t._v(" "),t.loading?n("v-progress-circular",{attrs:{indeterminate:"",color:"info"}}):t._e(),t._v(" "),n("v-avatar",{staticStyle:{display:"none"},attrs:{tile:"tile",size:"auto",color:"grey lighten-4"}},[n("img",{ref:"prueba",attrs:{src:t.img}})]),t._v(" "),t.faceMensaje?n("span",[n("v-alert",{attrs:{value:t.reconocido,color:"primary",icon:"check"}},[t._v("\n Identificado correctamente. "+t._s(t.porcentajeReconocido)+" %\n ")]),t._v(" "),n("v-alert",{attrs:{value:!t.reconocido,color:"warning",icon:"close"}},[t._v("\n Intente nuevamente. "+t._s(t.porcentajeReconocido)+" %\n ")])],1):t._e()],1)],1):t._e()],1),t._v(" "),n("v-stepper-content",{attrs:{step:"2"}},[n("v-form",{ref:"form2",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-autocomplete",{attrs:{items:t.rutas,"item-text":"nombre","item-value":"id",label:"Ruta"},model:{value:t.selectedItem.ruta_id,callback:function(e){t.$set(t.selectedItem,"ruta_id",e)},expression:"selectedItem.ruta_id"}}),t._v(" "),n("v-text-field",{attrs:{label:"Orden comunal",rules:[function(t){return!t||t.length<=15||"No mayor a 15 caracteres"}]},model:{value:t.selectedItem.orden_comunal,callback:function(e){t.$set(t.selectedItem,"orden_comunal",e)},expression:"selectedItem.orden_comunal"}}),t._v(" "),n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de orden comunal","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.orden_date_formatted,callback:function(e){t.orden_date_formatted=e},expression:"orden_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"es-bo"},on:{input:function(e){t.menu=!1}},model:{value:t.orden_date,callback:function(e){t.orden_date=e},expression:"orden_date"}})],1),t._v(" "),n("v-text-field",{attrs:{label:"Numero de taques",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t<=100||"No mayor a 100"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{input:function(e){return t.getLibras()}},model:{value:t.selectedItem.numero_taques,callback:function(e){t.$set(t.selectedItem,"numero_taques",e)},expression:"selectedItem.numero_taques"}}),t._v(" "),n("v-text-field",{attrs:{label:"Libras(Aprox.)",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t<=9999||"No mayor a 9999"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.libras,callback:function(e){t.$set(t.selectedItem,"libras",e)},expression:"selectedItem.libras"}}),t._v(" "),n("v-text-field",{attrs:{label:"Procedencia",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=500||"No mayor a 500 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.procedencia,callback:function(e){t.$set(t.selectedItem,"procedencia",e)},expression:"selectedItem.procedencia"}}),t._v(" "),n("v-text-field",{attrs:{label:"Conductor",rules:[function(t){return!t||t.length<=20||"No mayor a 20 caracteres"}]},model:{value:t.selectedItem.conductor,callback:function(e){t.$set(t.selectedItem,"conductor",e)},expression:"selectedItem.conductor"}}),t._v(" "),n("v-text-field",{attrs:{label:"Licencia",rules:[function(t){return!t||t.length<=20||"No mayor a 20 caracteres"}]},model:{value:t.selectedItem.licencia,callback:function(e){t.$set(t.selectedItem,"licencia",e)},expression:"selectedItem.licencia"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.vehiculos,"item-text":"nombre","item-value":"id",label:"Tipo de vehículo"},model:{value:t.selectedItem.vehiculo_id,callback:function(e){t.$set(t.selectedItem,"vehiculo_id",e)},expression:"selectedItem.vehiculo_id"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.marcas,"item-text":"nombre","item-value":"id",label:"Marca de vehículo"},model:{value:t.selectedItem.marca_id,callback:function(e){t.$set(t.selectedItem,"marca_id",e)},expression:"selectedItem.marca_id"}}),t._v(" "),n("v-text-field",{attrs:{label:"Color de vehículo",rules:[function(t){return!t||t.length<=20||"No mayor a 20 caracteres"}]},model:{value:t.selectedItem.color,callback:function(e){t.$set(t.selectedItem,"color",e)},expression:"selectedItem.color"}}),t._v(" "),n("v-text-field",{attrs:{label:"Placa de vehículo",rules:[function(t){return!t||t.length<=15||"No mayor a 15 caracteres"}]},model:{value:t.selectedItem.numero_placa,callback:function(e){t.$set(t.selectedItem,"numero_placa",e)},expression:"selectedItem.numero_placa"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),1!=t.step?n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.previousStep()}}},[t._v("Anterior")]):t._e(),t._v(" "),n("v-btn",{attrs:{disabled:!t.userValid||!t.reconocido,color:"info",small:""},nativeOn:{click:function(e){return t.nextStep()}}},[t._v("Siguiente")]),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),2==t.step?n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1):t._e()],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Guías de internación")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.correlativo)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.fullName(e.item.persona))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.persona.carnet_identidad+" "+e.item.persona.departamento_extension.sigla)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.printGuiaItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("print")])],1),t._v(" "),n("span",[t._v("Imprimir")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),t.$acl.check("admin")?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1):t._e()],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.persona.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Carnet productor: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.persona.carnet_productor.length>0?n("span",[t._v("\n "+t._s(e.item.persona.carnet_productor[0].carnet)+"\n ")]):t._e()])]),t._v(" "),e.item.ruta_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Ruta: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s(e.item.ruta.nombre)+" ")])]):t._e(),t._v(" "),e.item.ruta_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Puestos de control: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},t._l(e.item.ruta.puestos_de_control,function(e,r){return n("span",{key:r},[t._v("\n "+t._s(e.nombre)),n("br")])}),0)]):t._e(),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Orden comunal: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.orden_comunal))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha de orden comunal: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.fecha_orden_comunal))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Numero de taques: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.numero_taques))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Libras: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.libras))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Procedencia: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.procedencia))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Conductor: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.conductor))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Licencia: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.licencia))])]),t._v(" "),e.item.vehiculo_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Vehículo: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.vehiculo.nombre))])]):t._e(),t._v(" "),e.item.marca_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Marca: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.marca.nombre))])]):t._e(),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Color: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.color))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Numero de placa: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.numero_placa))])])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(954),n(964),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(955),f=n.n(d),h=n(48);n.n(h);function p(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Nro. Guía de internación",value:"correlativo",align:"center"},{text:"Nombre",value:"persona.primer_apellido",align:"center"},{text:"Carnet de identidad",value:"persona.carnet_identidad",align:"center"},{text:"Estado",align:"center",sortable:!1},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=p(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/guia_internacion/fill/"+JSON.stringify({controlado:!0}));case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),printItem:function(){var t=p(i.a.mark(function t(e){var n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c()({method:"GET",url:"api/guia_internacion/print/"+e.id,responseType:"arraybuffer"});case 3:n=t.sent,r=new Blob([n.data],{type:"application/pdf"}),printJS(window.URL.createObjectURL(r)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}(),removeItem:function(){var t=p(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/control_guia_internacion/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),printGuiaItem:function(){var t=p(i.a.mark(function t(e){var n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c()({method:"GET",url:"api/guia_internacion/print/"+e.id,responseType:"arraybuffer"});case 3:n=t.sent,r=new Blob([n.data],{type:"application/pdf"}),printJS(window.URL.createObjectURL(r)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}(),printRetencionItem:function(){var t=p(i.a.mark(function t(e){var n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c()({method:"GET",url:"api/retencion/print/"+e.retencion[0].id,responseType:"arraybuffer"});case 3:n=t.sent,r=new Blob([n.data],{type:"application/pdf"}),printJS(window.URL.createObjectURL(r)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")},formatDateTime:function(t){return this.$moment(t).format("DD/MM/YYYY HH:mm")}}}},function(t,e,n){var r=n(0)(n(956),n(963),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o),c=n(382),u=(n.n(c),n(275)),l=n(42),d=(n.n(l),n(86)),f=(n.n(d),n(958)),h=n.n(f),p=n(292);function m(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{WebCam:l.WebCam,Retener:h.a,QrcodeStream:p.QrcodeStream,QrcodeDropZone:p.QrcodeDropZone,QrcodeCapture:p.QrcodeCapture},props:["item","bus"],data:function(){return{step:1,valid:!1,dialog:!1,qrcam:!0,selectedIndex:-1,selectedItem:{},personas:[],guiasInternacion:[],menu:null,headers:[{text:"Nro. guía de internación",value:"correlativo",align:"center"},{text:"Nombre",value:"persona.primer_apellido",align:"center"},{text:"Carnet identidad",value:"persona.carnet_identidad",align:"center"},{text:"Estado",align:"center",sortable:!1},{text:"Opciones",align:"center",sortable:!1}],captures:[],imgReport:[],frontCam:!1,webcam:null,img:null,camera:null,deviceId:null,devices:[],reconocido:null,faceMensaje:!1,descriptors:{desc1:null,desc2:null},threshold:.4,loading:!1,porcentajeReconocido:0,error:null}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.dialog=!0,t.selectedIndex=e,t.selectedItem=e,t.getPersona()}),this.bus.$on("closeDialogQr",function(e){t.getGuiasInternacion()}),this.getPersonas(),this.loadModels()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo control":"Editar control"},device:function(){var t=this;return find(this.devices,function(e){return e.deviceId==t.deviceId})}},watch:{camera:function(t){this.deviceId=t}},methods:{close:function(){this.dialog=!1,this.qrcam=!0,this.valid=!1,this.guiasInternacion.length>0&&this.onStop(),this.selectedIndex=-1,this.selectedItem={},this.step=1,this.guiasInternacion=[],this.$refs.form1.reset(),this.captures=[],this.imgReport=[],this.frontCam=!1,this.webcam=null,this.img=null,this.camera=null,this.deviceId=null,this.devices=[],this.reconocido=!1,this.faceMensaje=!1,this.porcentajeReconocido=0,this.bus.$emit("closeDialog")},controlarItem:function(){var t=m(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogQr",e);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),retenerItem:function(t){this.bus.$emit("openDialogRetener",t)},getPersonas:function(){var t=m(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/persona");case 2:e=t.sent,this.personas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getGuiasInternacion:function(){var t=m(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/guia_internacion/fill/"+JSON.stringify({persona_id:this.selectedItem.persona_id,controlado:!1}));case 2:e=t.sent,this.guiasInternacion=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),loadModels:function(){var t=m(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="/models",t.next=3,u.f(e);case 3:return t.next=5,u.d(e);case 5:return t.next=7,u.e(e);case 7:return t.next=9,u.g.ssdMobilenetv1.loadFromUri("/models");case 9:return t.next=11,u.g.faceLandmark68Net.loadFromUri("/models");case 11:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),onCapture:function(){var t=m(i.a.mark(function t(){var e,n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.loading=!0,this.faceMensaje=!1,this.descriptors={desc1:null,desc2:null},t.next=5,this.$refs.webcam.capture();case 5:return e=t.sent,t.next=8,s.a.post("api/upload/base64_image",{base64:e});case 8:return n=t.sent,this.onSelectionChanged(1,this.guiasInternacion[0].persona.fotografia),this.onSelectionChanged(2,n.data),this.updateResult(),t.next=14,s.a.post("api/upload/delete",{nombre:n.data});case 14:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),onSelectionChanged:function(){var t=m(i.a.mark(function t(e,n){var r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,u.c(n);case 2:return r=t.sent,this.$refs.prueba.src=r.src,t.next=7,u.a(r);case 7:this.descriptors["desc"+e]=t.sent;case 8:case"end":return t.stop()}},t,this)}));return function(e,n){return t.apply(this,arguments)}}(),updateResult:function(){if(null!=this.descriptors.desc2){var t=u.h(u.b(this.descriptors.desc1,this.descriptors.desc2));t>this.threshold?this.reconocido=!1:this.reconocido=!0,this.loading=!1,this.faceMensaje=!0,this.porcentajeReconocido=100-100*t}},onStarted:function(t){console.log("On Started Event",t)},onStopped:function(t){console.log("On Stopped Event",t)},onStop:function(){this.$refs.webcam.stop()},onStart:function(){this.$refs.webcam.start()},onError:function(t){console.log("On Error Event",t)},onCameras:function(t){this.devices=t},onCameraChange:function(t){this.deviceId=t,this.camera=t,console.log("On Camera Change Event",t)},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")},onInit:function(){var t=m(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e;case 3:t.next=8;break;case 5:t.prev=5,t.t0=t.catch(0),"NotAllowedError"===t.t0.name?this.error="ERROR: Necesita proporcionar permisos para usar la camara":"NotFoundError"===t.t0.name?this.error="ERROR: No existe una camara en este dispositivo":"NotSupportedError"===t.t0.name?this.error="ERROR: Se requiere un contexto de seguridad (HTTPS, localhost)":"NotReadableError"===t.t0.name?this.error="ERROR: La camara se encuentra en uso":"OverconstrainedError"===t.t0.name?this.error="ERROR: Las camaras no son compatibles":"StreamApiNotSupportedError"===t.t0.name&&(this.error="ERROR: La API no es soportada por su navegador");case 8:case"end":return t.stop()}},t,this,[[0,5]])}));return function(e){return t.apply(this,arguments)}}(),onDecode:function(){var t=m(i.a.mark(function t(e){var n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.qrDecode=atob(e).split("|"),"INTERNACION"!=this.qrDecode[0]){t.next=17;break}return t.next=4,s.a.get("api/control_guia_internacion/fill/"+JSON.stringify({guia_internacion_id:this.qrDecode[1]}));case 4:if(!(t.sent.data.length>0)){t.next=9;break}this.error="Ya fue controlado",t.next=15;break;case 9:return t.next=11,s.a.get("api/guia_internacion/fill/"+JSON.stringify({id:this.qrDecode[1]}));case 11:n=t.sent,this.guiasInternacion=n.data,this.valid=!0,this.qrcam=!1;case 15:t.next=18;break;case 17:this.error="No reconocido";case 18:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),save:function(){var t=m(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s.a.post("api/control_guia_internacion",{guia_internacion_id:this.guiasInternacion[0].id,user_id:this.$store.getters["auth/user"].id});case 3:return t.next=5,s.a.put("api/guia_internacion/"+this.guiasInternacion[0].id,{controlado:!0});case 5:this.$toast.success("Correcto."),this.close(),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),console.log(t.t0);case 12:case"end":return t.stop()}},t,this,[[0,9]])}));return function(){return t.apply(this,arguments)}}()}}},function(t,e,n){"use strict";const r="'([^']+)'|\"([^\"]+)\"|[\\w\\s-]+",i=new RegExp("(bold|bolder|lighter|[1-9]00) +","i"),a=new RegExp("(italic|oblique) +","i"),o=new RegExp("(small-caps) +","i"),s=new RegExp("(ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded) +","i"),c=new RegExp("([\\d\\.]+)(px|pt|pc|in|cm|mm|%|em|ex|ch|rem|q) *((?:"+r+")( *, *(?:"+r+"))*)"),u={};t.exports=function(t){if(u[t])return u[t];const e=c.exec(t);if(!e)return;const n={weight:"normal",style:"normal",stretch:"normal",variant:"normal",size:parseFloat(e[1]),unit:e[2],family:e[3].replace(/["']/g,"").replace(/ *, */g,",")};let r,l,d,f,h=t.substring(0,e.index);switch((r=i.exec(h))&&(n.weight=r[1]),(l=a.exec(h))&&(n.style=l[1]),(d=o.exec(h))&&(n.variant=d[1]),(f=s.exec(h))&&(n.stretch=f[1]),n.unit){case"pt":n.size/=.75;break;case"pc":n.size*=16;break;case"in":n.size*=96;break;case"cm":n.size*=96/2.54;break;case"mm":n.size*=96/25.4;break;case"%":break;case"em":case"rem":n.size*=16/.75;break;case"q":n.size*=96/25.4/4}return u[t]=n}},function(t,e,n){var r=n(0)(n(959),n(960),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{},props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},causasRetencion:[],departamentos:[],provincias:[],municipios:[],localidades:[],vehiculos:[],marcas:[],embarcaciones:[]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogRetener",function(e){t.dialog=!0,t.selectedIndex=e,t.selectedItem=e,t.getCorrelativo(),t.getCausasRetencion(),t.getDepartamentos(),t.getLocalidades(),t.getVehiculos(),t.getMarcas(),t.getEmbarcaciones()})},computed:{},watch:{},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.causasRetencion=[],this.departamentosRetencion=[],this.provincias=[],this.municipios=[],this.localidades=[],this.vehiculos=[],this.marcas=[],this.embarcaciones=[],this.$refs.form.reset(),this.bus.$emit("closeDialog")},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}return this.selectedItem.user_id=this.$store.getters["auth/user"].id,this.selectedItem.guia_internacion_id=this.selectedItem.id,t.next=6,s.a.post("api/retencion",this.selectedItem);case 6:return t.sent,t.next=9,s.a.put("api/guia_internacion/"+this.selectedItem.id,{retenido:!0});case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}));return function(){return t.apply(this,arguments)}}(),getCorrelativo:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/retencion/max/correlativo");case 2:e=t.sent,this.selectedItem.correlativo=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getCausasRetencion:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/causa_retencion");case 2:e=t.sent,this.causasRetencion=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getDepartamentos:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/departamento");case 2:e=t.sent,this.departamentos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getProvincias:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/provincia");case 2:e=t.sent,this.provincias=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getMunicipios:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/municipio");case 2:e=t.sent,this.municipios=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getLocalidades:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/localidad");case 2:e=t.sent,this.localidades=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getVehiculos:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/vehiculo");case 2:e=t.sent,this.vehiculos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getMarcas:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/marca");case 2:e=t.sent,this.marcas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getEmbarcaciones:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/embarcacion");case 2:e=t.sent,this.embarcaciones=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getLibras:function(){this.selectedItem.libras=50*this.selectedItem.numero_taques},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Retener")])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-autocomplete",{attrs:{items:t.causasRetencion,"item-text":"nombre","item-value":"id",label:"Causa de retención",multiple:"","small-chips":"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.causas,callback:function(e){t.$set(t.selectedItem,"causas",e)},expression:"selectedItem.causas"}}),t._v(" "),n("v-text-field",{attrs:{label:"Iniciales de embalaje",rules:[function(t){return!t||t.length<=15||"No mayor a 15 caracteres"}]},model:{value:t.selectedItem.inicial_embalaje,callback:function(e){t.$set(t.selectedItem,"inicial_embalaje",e)},expression:"selectedItem.inicial_embalaje"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.departamentos,"item-text":"nombre","item-value":"id",label:"Departamento",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.getProvincias()}},model:{value:t.selectedItem.departamento_id,callback:function(e){t.$set(t.selectedItem,"departamento_id",e)},expression:"selectedItem.departamento_id"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.provincias,"item-text":"nombre","item-value":"id",label:"Provincias",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.getMunicipios()}},model:{value:t.selectedItem.provincia_id,callback:function(e){t.$set(t.selectedItem,"provincia_id",e)},expression:"selectedItem.provincia_id"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.municipios,"item-text":"nombre","item-value":"id",label:"Municipios",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.municipio_id,callback:function(e){t.$set(t.selectedItem,"municipio_id",e)},expression:"selectedItem.municipio_id"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.localidades,"item-text":"nombre","item-value":"id",label:"Localidad",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.localidad_id,callback:function(e){t.$set(t.selectedItem,"localidad_id",e)},expression:"selectedItem.localidad_id"}}),t._v(" "),n("v-text-field",{attrs:{label:"Lugar",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=100||"No mayor a 100"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.lugar,callback:function(e){t.$set(t.selectedItem,"lugar",e)},expression:"selectedItem.lugar"}}),t._v(" "),n("v-textarea",{attrs:{label:"Descripción",rows:"2",hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}}),t._v(" "),n("v-text-field",{attrs:{label:"Numero de taques",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t<=100||"No mayor a 100"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{input:function(e){return t.getLibras()}},model:{value:t.selectedItem.numero_taques,callback:function(e){t.$set(t.selectedItem,"numero_taques",e)},expression:"selectedItem.numero_taques"}}),t._v(" "),n("v-text-field",{attrs:{label:"Libras",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t<=9999||"No mayor a 9999"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.libras,callback:function(e){t.$set(t.selectedItem,"libras",e)},expression:"selectedItem.libras"}}),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Placa de vehículo",rules:[function(t){return!t||t.length<=15||"No mayor a 15 caracteres"}]},model:{value:t.selectedItem.numero_placa,callback:function(e){t.$set(t.selectedItem,"numero_placa",e)},expression:"selectedItem.numero_placa"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-autocomplete",{staticClass:"mr-3",attrs:{items:t.marcas,"item-text":"nombre","item-value":"id",label:"Marca de vehículo"},model:{value:t.selectedItem.marca_id,callback:function(e){t.$set(t.selectedItem,"marca_id",e)},expression:"selectedItem.marca_id"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-autocomplete",{attrs:{items:t.vehiculos,"item-text":"nombre","item-value":"id",label:"Tipo de vehículo"},model:{value:t.selectedItem.vehiculo_id,callback:function(e){t.$set(t.selectedItem,"vehiculo_id",e)},expression:"selectedItem.vehiculo_id"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Numero de vuelo",rules:[function(t){return!t||t.length<=15||"No mayor a 15 caracteres"}]},model:{value:t.selectedItem.numero_vuelo,callback:function(e){t.$set(t.selectedItem,"numero_vuelo",e)},expression:"selectedItem.numero_vuelo"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Empresa de vuelo",rules:[function(t){return!t||t.length<=30||"No mayor a 30 caracteres"}]},model:{value:t.selectedItem.empresa_vuelo,callback:function(e){t.$set(t.selectedItem,"empresa_vuelo",e)},expression:"selectedItem.empresa_vuelo"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{attrs:{label:"Otros datos de vuelo",rules:[function(t){return!t||t.length<=100||"No mayor a 100 caracteres"}]},model:{value:t.selectedItem.otros_vuelo,callback:function(e){t.$set(t.selectedItem,"otros_vuelo",e)},expression:"selectedItem.otros_vuelo"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Nombre de embarcación",rules:[function(t){return!t||t.length<=100||"No mayor a 100 caracteres"}]},model:{value:t.selectedItem.nombre_embarcacion,callback:function(e){t.$set(t.selectedItem,"nombre_embarcacion",e)},expression:"selectedItem.nombre_embarcacion"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-autocomplete",{staticClass:"mr-3",attrs:{items:t.embarcaciones,"item-text":"nombre","item-value":"id",label:"Tipo de embarcación"},model:{value:t.selectedItem.embarcacion_id,callback:function(e){t.$set(t.selectedItem,"embarcacion_id",e)},expression:"selectedItem.embarcacion_id"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{attrs:{label:"Numero de embarcación",rules:[function(t){return!t||t.length<=100||"No mayor a 100 caracteres"}]},model:{value:t.selectedItem.numero_embarcacion,callback:function(e){t.$set(t.selectedItem,"numero_embarcacion",e)},expression:"selectedItem.numero_embarcacion"}})],1)],1),t._v(" "),n("v-radio-group",{attrs:{row:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.responsable,callback:function(e){t.$set(t.selectedItem,"responsable",e)},expression:"selectedItem.responsable"}},[n("v-radio",{attrs:{label:"GECC",value:"GECC",color:"green"}}),t._v(" "),n("v-radio",{attrs:{label:"DIGCOIN",value:"DIGCOIN",color:"green"}})],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(962);"string"==typeof r&&(r=[[t.i,r,""]]);var i={transform:void 0};n(274)(r,i);r.locals&&(t.exports=r.locals)},function(t,e,n){(t.exports=n(55)(!1)).push([t.i,".wrapper[data-v-1f90552a]{display:flex;flex-flow:row nowrap;justify-content:space-around;align-items:center}.inside[data-v-1f90552a]{position:relative;max-width:100%;max-height:100%;z-index:0}.overlay[data-v-1f90552a],.tracking-layer[data-v-1f90552a]{position:absolute;width:100%;height:100%;top:0;left:0}.camera[data-v-1f90552a],.pause-frame[data-v-1f90552a]{display:block;object-fit:contain;max-width:100%;max-height:100%}",""])},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo control")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("Retener",{attrs:{bus:t.bus}}),t._v(" "),n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{md4:""}}),t._v(" "),n("v-flex",{attrs:{md4:""}},[n("p",{staticClass:"error"},[t._v(t._s(t.error))]),t._v(" "),n("p",{staticClass:"decode-result"},[n("b",[t._v("Enfoque con la cámara el codigo QR.")])]),t._v(" "),t.dialog&&t.qrcam?n("qrcode-stream",{on:{decode:t.onDecode,init:t.onInit}}):t._e()],1),t._v(" "),n("v-flex",{attrs:{md4:""}})],1)],1),t._v(" "),n("v-data-table",{attrs:{headers:t.headers,items:t.guiasInternacion,"hide-actions":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.correlativo)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.fullName(e.item.persona))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.persona.carnet_identidad+" "+e.item.persona.departamento_extension.sigla)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[e.item.retenido?n("v-chip",{staticClass:"caption",attrs:{small:"",color:"red","text-color":"white"}},[t._v("Retenido")]):t._e(),t._v(" "),e.item.controlado?n("v-chip",{attrs:{small:"",color:"green darken-2","text-color":"white"}},[t._v("Controlado")]):n("v-chip",{attrs:{small:"",color:"green lighten-2","text-color":"white"}},[t._v("Iniciado")])],1),t._v(" "),n("td",{staticClass:"text-xs-center"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:e.item.controlado||e.item.retenido},on:{click:function(e){return t.save()}},slot:"activator"},[n("v-icon",[t._v("check_circle")])],1),t._v(" "),n("span",[t._v("Controlar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:e.item.controlado||e.item.retenido},on:{click:function(n){return t.retenerItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("cancel")])],1),t._v(" "),n("span",[t._v("Retener")])],1)],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.persona.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Carnet de productor: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.persona.carnet_productor.length>0?n("span",[t._v("\n "+t._s(e.item.persona.carnet_productor[0].carnet)+" \n ")]):t._e()])]),t._v(" "),e.item.ruta_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Ruta: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s(e.item.ruta.nombre)+" ")])]):t._e(),t._v(" "),e.item.ruta_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Puestos de control: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},t._l(e.item.ruta.puestos_de_control,function(e,r){return n("span",{key:r},[t._v("\n "+t._s(e.nombre)),n("br")])}),0)]):t._e(),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Orden comunal: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.orden_comunal))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha de orden comunal: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.fecha_orden_comunal))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Numero de taques: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.numero_taques))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Libras: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.libras))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Procedencia: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.procedencia))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Conductor: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.conductor))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Licencia: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.licencia))])]),t._v(" "),e.item.vehiculo_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Vehículo: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.vehiculo.nombre))])]):t._e(),t._v(" "),e.item.marca_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Marca: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.marca.nombre))])]):t._e(),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Color: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.color))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Numero de placa: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.numero_placa))])])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2),t._v(" "),t.guiasInternacion.length>0?n("v-layout",{staticClass:"mt-2 text-md-center",attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{md6:""}},[n("WebCam",{ref:"webcam",attrs:{width:"200",height:"auto",deviceId:t.deviceId},on:{cameras:t.onCameras,"camera-change":t.onCameraChange}}),t._v(" "),n("v-select",{attrs:{items:t.devices,label:"Seleccione camara","item-text":"label","item-value":"deviceId"},model:{value:t.camera,callback:function(e){t.camera=e},expression:"camera"}})],1),t._v(" "),n("v-flex",{attrs:{md6:""}},[n("v-btn",{attrs:{color:"indigo"},on:{"&click":function(e){return t.onCapture()}}},[n("v-icon",[t._v("face")]),t._v(" Reconocer rostro\n ")],1),t._v(" "),t.loading?n("v-progress-circular",{attrs:{indeterminate:"",color:"info"}}):t._e(),t._v(" "),n("v-avatar",{staticStyle:{display:"none"},attrs:{tile:"tile",size:"auto",color:"grey lighten-4"}},[n("img",{ref:"prueba",attrs:{src:t.img}})]),t._v(" "),t.faceMensaje?n("span",[n("v-alert",{attrs:{value:t.reconocido,color:"primary",icon:"check"}},[t._v("\n Identificado correctamente. "+t._s(t.porcentajeReconocido)+" %\n ")]),t._v(" "),n("v-alert",{attrs:{value:!t.reconocido,color:"warning",icon:"close"}},[t._v("\n Intente nuevamente. "+t._s(t.porcentajeReconocido)+" %\n ")])],1):t._e()],1)],1):t._e()],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Control de guías de internación")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.correlativo)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.fullName(e.item.persona))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.persona.carnet_identidad+" "+e.item.persona.departamento_extension.sigla)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[e.item.retencion.length>0?n("v-chip",{attrs:{small:"",color:"red","text-color":"white"}},[t._v("Retenido")]):t._e(),t._v(" "),e.item.control_guia_internacion.length>0?n("v-chip",{attrs:{small:"",color:"green darken-2","text-color":"white"}},[t._v("Controlado")]):t._e()],1),t._v(" "),n("td",{staticClass:"justify-center layout"},[t.$acl.check("admin")?n("v-menu",{attrs:{"offset-y":""}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},slot:"activator"},[n("v-icon",[t._v("print")])],1),t._v(" "),n("span",[t._v("Imprimir")])],1),t._v(" "),n("v-list",[n("v-list-tile",{on:{click:function(n){return t.printGuiaItem(e.item)}}},[n("v-list-tile-title",[t._v("Guía de internación")])],1),t._v(" "),e.item.retencion.length>0?n("v-list-tile",{on:{click:function(n){return t.printRetencionItem(e.item)}}},[n("v-list-tile-title",[t._v("Retención")])],1):t._e()],1)],1):t._e(),t._v(" "),t.$acl.check("admin")?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1):t._e()],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.persona.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Carnet productor: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.persona.carnet_productor.length>0?e.item.persona.carnet_productor[0].carnet:"-"))])]),t._v(" "),e.item.ruta_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Ruta: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s(e.item.ruta.nombre)+" ")])]):t._e(),t._v(" "),e.item.ruta_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Puestos de control: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},t._l(e.item.ruta.puestos_de_control,function(e,r){return n("span",{key:r},[t._v("\n "+t._s(e.nombre)),n("br")])}),0)]):t._e(),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Orden comunal: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.orden_comunal))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha de orden comunal: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.fecha_orden_comunal))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Numero de taques: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.numero_taques))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Libras: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.libras))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Procedencia: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.procedencia))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Conductor: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.conductor))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Licencia: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.licencia))])]),t._v(" "),e.item.vehiculo_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Vehículo: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.vehiculo.nombre))])]):t._e(),t._v(" "),e.item.marca_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Marca: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.marca.nombre))])]):t._e(),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Color: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.color))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Numero de placa: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.numero_placa))])])]),t._v(" "),e.item.retencion.length>0?n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{attrs:{colspan:"2"}},[t._v("RETENCION")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Iniciales de embalaje: ")]),t._v(" "),n("td",{staticClass:"text-xs-left",attrs:{colspan:"3"}},[t._v("\n "+t._s(e.item.retencion[0].inicial_embalaje)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Causas de retención: ")]),t._v(" "),n("td",{staticClass:"text-xs-left",attrs:{colspan:"3"}},[n("v-list",t._l(e.item.retencion[0].causas_retencion,function(e,r){return n("v-list-tile",{key:r},[n("v-list-tile-content",[n("v-list-tile-title",{staticClass:"caption"},[t._v("\n "+t._s(e.nombre)+"\n ")])],1)],1)}),1)],1)]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Departamento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left",attrs:{colspan:"3"}},[t._v("\n "+t._s(e.item.retencion[0].departamento.nombre)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Municipio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left",attrs:{colspan:"3"}},[t._v("\n "+t._s(e.item.retencion[0].municipio.nombre)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Localidad: ")]),t._v(" "),n("td",{staticClass:"text-xs-left",attrs:{colspan:"3"}},[t._v("\n "+t._s(e.item.retencion[0].localidad.nombre)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Lugar: ")]),t._v(" "),n("td",{staticClass:"text-xs-left",attrs:{colspan:"3"}},[t._v("\n "+t._s(e.item.retencion[0].lugar)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Descripción: ")]),t._v(" "),n("td",{staticClass:"text-xs-left",attrs:{colspan:"3"}},[t._v("\n "+t._s(e.item.retencion[0].descripcion)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Numero de taques: ")]),t._v(" "),n("td",{staticClass:"text-xs-left",attrs:{colspan:"3"}},[t._v("\n "+t._s(e.item.retencion[0].numero_taques)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Libras: ")]),t._v(" "),n("td",{staticClass:"text-xs-left",attrs:{colspan:"3"}},[t._v("\n "+t._s(e.item.retencion[0].libras)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Terrestre: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("Número de placa:\n "+t._s(e.item.retencion[0].numero_placa)+"\n ")]),t._v(" "),e.item.retencion[0].vehiculo_id?n("td",{staticClass:"text-xs-left"},[t._v("Tipo:\n "+t._s(e.item.retencion[0].vehiculo.nombre)+"\n ")]):t._e(),t._v(" "),e.item.retencion[0].marca_id?n("td",{staticClass:"text-xs-left"},[t._v("Marca:\n "+t._s(e.item.retencion[0].marca.nombre)+"\n ")]):t._e()]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Aereo: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("Número de vuelo:\n "+t._s(e.item.retencion[0].numero_vuelo)+"\n ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("Empresa:\n "+t._s(e.item.retencion[0].empresa_vuelo)+"\n ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("Otros:\n "+t._s(e.item.retencion[0].otros_vuelo)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fluvial: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("Nombre embarcación:\n "+t._s(e.item.retencion[0].nombre_embarcacion)+"\n ")]),t._v(" "),e.item.retencion[0].embarcacion_id?n("td",{staticClass:"text-xs-left"},[t._v("Tipo:\n "+t._s(e.item.retencion[0].embarcacion.nombre)+"\n ")]):t._e(),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("Número embarcación:\n "+t._s(e.item.retencion[0].numero_embarcacion)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Responsable: ")]),t._v(" "),n("td",{staticClass:"text-xs-left",attrs:{colspan:"3"}},[t._v("\n "+t._s(e.item.retencion[0].responsable)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha y hora: ")]),t._v(" "),n("td",{staticClass:"text-xs-left",attrs:{colspan:"3"}},[t._v("\n "+t._s(t.formatDateTime(e.item.retencion[0].created_at))+"\n ")])])]):t._e()])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(966),n(973),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(967),f=n.n(d),h=n(48),p=(n.n(h),n(970)),m=n.n(p);function v(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a,Cambio:m.a},data:function(){return{bus:new o.a,headers:[{text:"Municipio",value:"puesto_venta.municipio.nombre",align:"center"},{text:"Mercado",value:"puesto_venta.mercado",align:"center"},{text:"Zona",value:"puesto_venta.zona",align:"center"},{text:"Dirección",value:"puesto_venta.direccion",align:"center"},{text:"Estado",value:"puesto_venta.cambiado",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()}),this.bus.$on("closeDialogCambiar",function(){t.getTable()})},methods:{getTable:function(){var t=v(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/persona_puesto_venta");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),cambiar:function(t){this.bus.$emit("openDialogCambiar",t)},editItem:function(t,e){this.bus.$emit("openDialog",Object.assign(t,e))},removeItem:function(){var t=v(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/persona_puesto_venta/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")},formatDateTime:function(t){return this.$moment(t).format("DD/MM/YYYY HH:mm")}}}},function(t,e,n){var r=n(0)(n(968),n(969),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o),c=n(23);n.n(c);function u(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{},props:["item","bus"],data:function(){return{step:1,valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},selectedCambia:{},selectedPuesto:{},cambia:!1,idOld:null,adjuntos:null,comercializadores:[],comercializador:[],errorPersona:null,headers:[{text:"Nombre",value:"primer_apellido",align:"center"},{text:"Carnet de identidad",value:"carnet_identidad",align:"center"},{text:"Telefono",value:"telefono",align:"center"},{text:"Email",value:"email",align:"center"},{text:"Estado",align:"center",sortable:!1}],options:{url:"api/upload/file",headers:s.a.defaults.headers.common,paramName:"file",uploadMultiple:!1,acceptedFiles:{extensions:["application/pdf"],message:"Formato no permitido."},maxFilesize:{limit:5,message:"El archivo excede los 5Mb."},maxFiles:1},municipios:[]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.dialog=!0,t.selectedIndex=e,t.selectedItem=e,t.cambia=e.cambia,t.idOld=e.id,t.getComercializador(),t.selectedPuesto.municipio_id=e.puesto_venta.municipio_id,t.selectedPuesto.zona=e.puesto_venta.zona,t.selectedPuesto.mercado=e.puesto_venta.mercado,t.selectedPuesto.direccion=e.puesto_venta.direccion}),this.getComercializadores(),this.getMunicipios()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar"}},watch:{},methods:{close:function(){this.$refs.form1.reset(),this.$refs.form2.reset(),this.cambia&&this.$refs.form3.reset(),this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.selectedCambia={},this.cambia=!1,this.idOld=null,this.adjuntos=null,this.step=1,this.bus.$emit("closeDialog"),this.comercializador=[]},save:function(){var t=u(i.a.mark(function t(){var e,n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form2.validate()){t.next=10;break}return t.next=4,s.a.post("api/puesto_venta",this.selectedPuesto);case 4:return e=t.sent,n={puesto_venta_id:e.data.id,persona_id:this.comercializador[0].id},t.next=8,s.a.post("api/persona_puesto_venta",n);case 8:this.$toast.success("Correcto."),this.close();case 10:t.next=15;break;case 12:t.prev=12,t.t0=t.catch(0),console.log(t.t0);case 15:case"end":return t.stop()}},t,this,[[0,12]])}));return function(){return t.apply(this,arguments)}}(),getComercializadores:function(){var t=u(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return{tipo_persona_id:4},t.next=3,s.a.get("api/persona");case 3:e=t.sent,this.comercializadores=e.data;case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getComercializador:function(){var t=u(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/persona/fill/"+JSON.stringify({id:this.selectedItem.persona_id}));case 2:1!=(e=t.sent).data[0].tipo_persona_id?(this.comercializador=e.data,this.errorPersona=null):this.errorPersona="Tipo de persona no permitido";case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getMunicipios:function(){var t=u(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/municipio");case 2:e=t.sent,this.municipios=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),complete:function(t,e,n){this.selectedCambia.adjuntos_cambio=n.response,this.adjuntos="Cargado correctamente."},nextStep:function(){switch(this.step){case 1:this.$refs.form1.validate()&&(this.step=2)}},previousStep:function(){switch(this.step){case 2:this.step=1}},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-stepper",{attrs:{vertical:""},model:{value:t.step,callback:function(e){t.step=e},expression:"step"}},[n("v-stepper-header",[n("v-stepper-step",{attrs:{step:"1",complete:t.step>1}},[t._v("Comercializador")]),t._v(" "),n("v-divider"),t._v(" "),n("v-stepper-step",{attrs:{step:"2",complete:t.step>2}},[t._v("Puesto de venta")])],1),t._v(" "),n("v-stepper-items",[n("v-stepper-content",{attrs:{step:"1"}},[n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-autocomplete",{attrs:{items:t.comercializadores,"item-text":"carnet_identidad","item-value":"id",label:"Carnet de identidad de comercializador",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.errorPersona},on:{change:function(e){return t.getComercializador()}},model:{value:t.selectedItem.persona_id,callback:function(e){t.$set(t.selectedItem,"persona_id",e)},expression:"selectedItem.persona_id"}})],1),t._v(" "),n("v-data-table",{attrs:{headers:t.headers,items:t.comercializador,"hide-actions":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.fullName(e.item))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.carnet_identidad+" "+e.item.departamento_extension.sigla)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.telefono)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.email)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}})])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Estado civil: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.estado_civil))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Genero: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s("M"==e.item.genero?"Masculino":"Femenino"))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.fecha_nacimiento)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Pais de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.pais_nacimiento.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Departamento de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.departamento_nacimiento.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Provincia de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.provincia_nacimiento.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Domicilio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.domicilio))])]),t._v(" "),1==e.item.sustituido?n("tr",[n("th",{attrs:{colspan:"2"}},[n("hr")])]):t._e(),t._v(" "),1==e.item.sustituido?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Sustituyo a: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.fullName(e.item.comercializador))+" ")])]):t._e(),t._v(" "),1==e.item.sustituido?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Motivo de sustitución: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.motivo_sustitucion)+" ")])]):t._e(),t._v(" "),1==e.item.sustituido?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Documento de sustitución: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("a",{attrs:{href:"uploads/"+e.item.adjuntos_sustitucion,target:"blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)])]):t._e(),t._v(" "),1==e.item.cesado?n("tr",[n("th",{attrs:{colspan:"2"}},[n("hr")])]):t._e(),t._v(" "),1==e.item.cesado?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Motivo de cesación: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.motivo_cesacion)+" ")])]):t._e(),t._v(" "),1==e.item.cesado?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Documento de cesación: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("a",{attrs:{href:"uploads/"+e.item.adjuntos_cesacion,target:"blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)])]):t._e()])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1),t._v(" "),n("v-stepper-content",{attrs:{step:"2"}},[n("v-form",{ref:"form2",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-autocomplete",{attrs:{items:t.municipios,"item-value":"id","item-text":"nombre",label:"Municipio",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedPuesto.municipio_id,callback:function(e){t.$set(t.selectedPuesto,"municipio_id",e)},expression:"selectedPuesto.municipio_id"}}),t._v(" "),n("v-text-field",{attrs:{label:"Zona",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=64||"No mayor a 64 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedPuesto.zona,callback:function(e){t.$set(t.selectedPuesto,"zona",e)},expression:"selectedPuesto.zona"}}),t._v(" "),n("v-text-field",{attrs:{label:"Mercado",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=64||"No mayor a 64 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedPuesto.mercado,callback:function(e){t.$set(t.selectedPuesto,"mercado",e)},expression:"selectedPuesto.mercado"}}),t._v(" "),n("v-text-field",{attrs:{label:"Dirección",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=64||"No mayor a 64 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedPuesto.direccion,callback:function(e){t.$set(t.selectedPuesto,"direccion",e)},expression:"selectedPuesto.direccion"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),1!=t.step?n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.previousStep()}}},[t._v("Anterior")]):t._e(),t._v(" "),2!=t.step?n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.nextStep()}}},[t._v("Siguiente")]):t._e(),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),2==t.step&&0==t.cambia?n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1):t._e()],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(971),n(972),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o),c=n(23);n.n(c);function u(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{},props:["item","bus"],data:function(){return{step:1,valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},selectedCambia:{},selectedPuesto:{},cambia:!1,idOld:null,adjuntos:null,comercializadores:[],comercializador:[],headers:[{text:"Nombre",value:"primer_apellido",align:"center"},{text:"Carnet de identidad",value:"carnet_identidad",align:"center"},{text:"Telefono",value:"telefono",align:"center"},{text:"Email",value:"email",align:"center"},{text:"Estado",align:"center",sortable:!1}],options:{url:"api/upload/file",headers:s.a.defaults.headers.common,paramName:"file",uploadMultiple:!1,acceptedFiles:{extensions:["application/pdf"],message:"Formato no permitido."},maxFilesize:{limit:5,message:"El archivo excede los 5Mb."},maxFiles:1},municipios:[]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogCambiar",function(e){t.dialog=!0,t.selectedIndex=e,t.selectedItem=e})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar"}},watch:{},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.selectedCambia={},this.cambia=!1,this.adjuntos=null,this.bus.$emit("closeDialogCambiar")},save:function(){var t=u(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form1.validate()){t.next=10;break}return e={user_id:this.$store.getters["auth/user"].id,persona_puesto_venta_id:this.selectedItem.id,motivo_cambio:this.selectedCambia.motivo_cambio,adjunto:this.selectedCambia.adjunto},t.next=5,s.a.post("api/autorizacion_cpv",e);case 5:return t.sent,t.next=8,s.a.put("api/puesto_venta/"+this.selectedItem.puesto_venta.id,{cambiado:!0});case 8:this.$toast.success("Correcto."),this.close();case 10:t.next=15;break;case 12:t.prev=12,t.t0=t.catch(0),console.log(t.t0);case 15:case"end":return t.stop()}},t,this,[[0,12]])}));return function(){return t.apply(this,arguments)}}(),getComercializadores:function(){var t=u(i.a.mark(function t(){var e,n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e={tipo_persona_id:4},t.next=3,s.a.get("api/persona/fill/"+JSON.stringify(e));case 3:n=t.sent,this.comercializadores=n.data;case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getComercializador:function(){var t=u(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/persona/fill/"+JSON.stringify({id:this.selectedItem.persona_id}));case 2:e=t.sent,this.comercializador=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getMunicipios:function(){var t=u(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/municipio");case 2:e=t.sent,this.municipios=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),complete:function(t,e,n){this.selectedCambia.adjunto=n.response,this.adjuntos="Cargado correctamente."},nextStep:function(){switch(this.step){case 1:this.$refs.form1.validate()&&(this.step=2)}},previousStep:function(){switch(this.step){case 2:this.step=1}},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-textarea",{staticClass:"mr-2",attrs:{label:"Motivo del cambio",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedCambia.motivo_cambio,callback:function(e){t.$set(t.selectedCambia,"motivo_cambio",e)},expression:"selectedCambia.motivo_cambio"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[[n("vue-clip",{attrs:{options:t.options,"on-complete":t.complete},scopedSlots:t._u([{key:"clip-uploader-body",fn:function(e){return t._l(e.files,function(e,r){return n("div",{key:r},["success"==e.status?n("v-icon",{attrs:{color:"success"}},[t._v("check_circle")]):t._e(),t._v(" "),"success"==e.status?n("span",{staticClass:"green--text"},[t._v(" correcto.")]):t._e(),t._v(" "),"error"==e.status?n("v-icon",{attrs:{color:"error"}},[t._v("error")]):t._e(),t._v(" "),"error"==e.status?n("span",{staticClass:"red--text"},[t._v(" "+t._s(e.errorMessage))]):t._e()],1)})}}])},[n("template",{slot:"clip-uploader-action"},[n("div",{staticClass:"dz-message v-btn v-btn--small theme--light info"},[t._v("Subir archivo PDF")])])],2)],t._v(" "),n("v-text-field",{attrs:{readonly:"",box:"",label:"Archivo PDF",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=64||"No mayor a 64 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.adjuntos,callback:function(e){t.adjuntos=e},expression:"adjuntos"}})],2)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Áreas y puestos de venta")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}}),t._v(" "),n("Cambio",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.puesto_venta.municipio.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.puesto_venta.mercado)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.puesto_venta.zona)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.puesto_venta.direccion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[0==e.item.puesto_venta.cambiado?n("v-chip",{staticClass:"white--text",attrs:{color:"success"}},[t._v("Activo")]):t._e(),t._v(" "),1==e.item.puesto_venta.cambiado?n("v-chip",{staticClass:"white--text",attrs:{color:"error"}},[t._v("Cambiado")]):t._e()],1),t._v(" "),n("td",{staticClass:"justify-center layout"},[e.item.puesto_venta.cambiado?t._e():n("span",[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.cambiar(e.item)}},slot:"activator"},[n("v-icon",[t._v("refresh")])],1),t._v(" "),n("span",[t._v("Cambiar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs2:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.persona.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs10:""}},[n("table",[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Nombre del propietario: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s(e.item.persona.nombre)+" ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Carnet del propietario: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s(e.item.persona.carnet_identidad)+" ")])]),t._v(" "),e.item.puesto_venta.cambiado?n("tr",[n("td",{attrs:{colspan:"2"}},[n("hr")])]):t._e(),t._v(" "),e.item.puesto_venta.cambiado?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Motivo de cambio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s(e.item.autorizacion_cambio_puesto_venta[0].motivo_cambio)+" ")])]):t._e(),t._v(" "),e.item.puesto_venta.cambiado?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Documento de cambio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("a",{attrs:{href:e.item.autorizacion_cambio_puesto_venta[0].adjunto,target:"blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)])]):t._e()])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(975),n(985),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(976),l=n.n(u),d=n(982),f=n.n(d);e.default={components:{Form:l.a,RetencionPersona:f.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre",value:"primer_apellido",align:"center"},{text:"Carnet de identidad",value:"carnet_identidad",align:"center"},{text:"Tipo persona",value:"tipo_persona.nombre",align:"center"},{text:"Estado",value:"nombre",align:"center"},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t,e=(t=i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/persona");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}(),retencionItem:function(t){this.bus.$emit("openDialog",t)},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},image:function(t){return t.fotografia},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e,n){var r=n(0)(n(977),n(981),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o),c=n(978),u=n.n(c),l=n(6),d=n.n(l);function f(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:d.a,Retencion:u.a},props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},retenciones:[],search:null,headers:[{text:"Nro. Retención",align:"center",sortable:!1},{text:"Iniciales embajaje",align:"center",sortable:!1},{text:"Taques",align:"center",sortable:!1},{text:"Fecha",align:"center",sortable:!1},{text:"Opciones",align:"center",sortable:!1}]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.dialog=!0,t.selectedIndex=e,t.selectedItem=e,t.getRetenciones()}),this.bus.$on("openDialogRetencion",function(e){t.getRetenciones()}),this.bus.$on("closeDialogRetencion",function(){t.getRetenciones()}),this.bus.$on("closeDialog",function(){t.getRetenciones()})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},watch:{},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.retenciones=[],this.bus.$emit("closeDialog")},getRetenciones:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s.a.get("api/retencion/fill/"+JSON.stringify({persona_id:this.selectedItem.id}));case 3:e=t.sent,this.retenciones=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),retenerItem:function(t,e){this.bus.$emit("openDialogRetener",Object.assign(t,e))},printItem:function(){var t=f(i.a.mark(function t(e){var n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s()({method:"GET",url:"api/retencion/print/"+e.id,responseType:"arraybuffer"});case 3:n=t.sent,r=new Blob([n.data],{type:"application/pdf"}),printJS(window.URL.createObjectURL(r)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}(),removeItem:function(){var t=f(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/retencion/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")}}}},function(t,e,n){var r=n(0)(n(979),n(980),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{},props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},selectedPersona:{},causasRetencion:[],departamentos:[],provincias:[],municipios:[],localidades:[],vehiculos:[],marcas:[],embarcaciones:[],personas:[],headers:[{text:"Nombre",value:"primer_apellido",align:"center"},{text:"Carnet de identidad",value:"carnet_identidad",align:"center"},{text:"Estado",value:"nombre",align:"center"},{text:"Opciones",align:"center",sortable:!1,width:"270"}],search:""}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogRetener",function(e){if(t.dialog=!0,t.selectedItem=e,t.selectedItem.causas=[],"editar"==e.mode){t.selectedIndex=e,t.selectedPersona=e.persona;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e.causas_retencion[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c=o.value;n.push(c.id)}}catch(t){i=!0,a=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}t.selectedItem.causas=n}else t.selectedPersona=e,t.getCorrelativo();t.getProvincias(),t.getMunicipios()}),this.getPersonas(),this.getCausasRetencion(),this.getDepartamentos(),this.getLocalidades(),this.getVehiculos(),this.getMarcas(),this.getEmbarcaciones()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},watch:{},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.selectedPersona={},this.provincias=[],this.municipios=[],this.persona=[],this.$refs.form.reset(),this.bus.$emit("closeDialogRetencion")},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=15;break}if(this.selectedItem.user_id=this.$store.getters["auth/user"].id,-1==this.selectedIndex){t.next=9;break}return t.next=6,s.a.put("api/retencion/"+this.selectedItem.id,this.selectedItem);case 6:t.sent,t.next=13;break;case 9:return this.selectedItem.persona_id=this.selectedItem.id,t.next=12,s.a.post("api/retencion",this.selectedItem);case 12:t.sent;case 13:this.$toast.success("Correcto."),this.close();case 15:t.next=20;break;case 17:t.prev=17,t.t0=t.catch(0),console.log(t.t0);case 20:case"end":return t.stop()}},t,this,[[0,17]])}));return function(){return t.apply(this,arguments)}}(),getPersonas:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/persona");case 2:e=t.sent,this.personas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getPersona:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(null==this.selectedItem.persona_id){t.next=7;break}return t.next=3,s.a.get("api/persona/fill/"+JSON.stringify({id:this.selectedItem.persona_id}));case 3:e=t.sent,this.persona=e.data,t.next=8;break;case 7:this.persona=[];case 8:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),clearPersona:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.selectedItem.persona_id=null,this.getPersona();case 2:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getCorrelativo:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/retencion/max/correlativo");case 2:e=t.sent,this.selectedItem.correlativo=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getCausasRetencion:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/causa_retencion");case 2:e=t.sent,this.causasRetencion=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getDepartamentos:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/departamento");case 2:e=t.sent,this.departamentos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getProvincias:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/provincia");case 2:e=t.sent,this.provincias=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getMunicipios:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/municipio");case 2:e=t.sent,this.municipios=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getLocalidades:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/localidad");case 2:e=t.sent,this.localidades=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getVehiculos:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/vehiculo");case 2:e=t.sent,this.vehiculos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getMarcas:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/marca");case 2:e=t.sent,this.marcas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getEmbarcaciones:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/embarcacion");case 2:e=t.sent,this.embarcaciones=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getLibras:function(){this.selectedItem.libras=50*this.selectedItem.numero_taques},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Retención")])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-text-field",{attrs:{label:"Número",readonly:"",box:""},model:{value:t.selectedItem.correlativo,callback:function(e){t.$set(t.selectedItem,"correlativo",e)},expression:"selectedItem.correlativo"}}),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Nombre",disabled:!0},model:{value:t.selectedPersona.nombre,callback:function(e){t.$set(t.selectedPersona,"nombre",e)},expression:"selectedPersona.nombre"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Primer apellido",disabled:!0},model:{value:t.selectedPersona.primer_apellido,callback:function(e){t.$set(t.selectedPersona,"primer_apellido",e)},expression:"selectedPersona.primer_apellido"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Segundo apellido",disabled:!0},model:{value:t.selectedPersona.segundo_apellido,callback:function(e){t.$set(t.selectedPersona,"segundo_apellido",e)},expression:"selectedPersona.segundo_apellido"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs8:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Carnet de identidad",disabled:!0},model:{value:t.selectedPersona.carnet_identidad,callback:function(e){t.$set(t.selectedPersona,"carnet_identidad",e)},expression:"selectedPersona.carnet_identidad"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}})],1),t._v(" "),n("v-text-field",{attrs:{label:"Iniciales de embalaje",rules:[function(t){return!t||t.length<=15||"No mayor a 15 caracteres"}]},model:{value:t.selectedItem.inicial_embalaje,callback:function(e){t.$set(t.selectedItem,"inicial_embalaje",e)},expression:"selectedItem.inicial_embalaje"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.causasRetencion,"item-text":"nombre","item-value":"id",label:"Causa de retención",multiple:"","small-chips":"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.causas,callback:function(e){t.$set(t.selectedItem,"causas",e)},expression:"selectedItem.causas"}}),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs4:""}},[n("v-autocomplete",{staticClass:"mr-3",attrs:{items:t.departamentos,"item-text":"nombre","item-value":"id",label:"Departamento",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.getProvincias()}},model:{value:t.selectedItem.departamento_id,callback:function(e){t.$set(t.selectedItem,"departamento_id",e)},expression:"selectedItem.departamento_id"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-autocomplete",{staticClass:"mr3",attrs:{items:t.provincias,"item-text":"nombre","item-value":"id",label:"Provincias",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.getMunicipios()}},model:{value:t.selectedItem.provincia_id,callback:function(e){t.$set(t.selectedItem,"provincia_id",e)},expression:"selectedItem.provincia_id"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-autocomplete",{attrs:{items:t.municipios,"item-text":"nombre","item-value":"id",label:"Municipios",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.municipio_id,callback:function(e){t.$set(t.selectedItem,"municipio_id",e)},expression:"selectedItem.municipio_id"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-3",attrs:{items:t.localidades,"item-text":"nombre","item-value":"id",label:"Localidad",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.localidad_id,callback:function(e){t.$set(t.selectedItem,"localidad_id",e)},expression:"selectedItem.localidad_id"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{attrs:{label:"Lugar",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=100||"No mayor a 100"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.lugar,callback:function(e){t.$set(t.selectedItem,"lugar",e)},expression:"selectedItem.lugar"}})],1)],1),t._v(" "),n("v-textarea",{attrs:{label:"Descripción",rows:"2",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}}),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Numero de taques",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t<=100||"No mayor a 100"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{input:function(e){return t.getLibras()}},model:{value:t.selectedItem.numero_taques,callback:function(e){t.$set(t.selectedItem,"numero_taques",e)},expression:"selectedItem.numero_taques"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{attrs:{label:"Libras",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t<=9999||"No mayor a 9999"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.libras,callback:function(e){t.$set(t.selectedItem,"libras",e)},expression:"selectedItem.libras"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Placa de vehículo",rules:[function(t){return!t||t.length<=15||"No mayor a 15 caracteres"}]},model:{value:t.selectedItem.numero_placa,callback:function(e){t.$set(t.selectedItem,"numero_placa",e)},expression:"selectedItem.numero_placa"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-autocomplete",{staticClass:"mr-3",attrs:{items:t.marcas,"item-text":"nombre","item-value":"id",label:"Marca de vehículo"},model:{value:t.selectedItem.marca_id,callback:function(e){t.$set(t.selectedItem,"marca_id",e)},expression:"selectedItem.marca_id"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-autocomplete",{attrs:{items:t.vehiculos,"item-text":"nombre","item-value":"id",label:"Tipo de vehículo"},model:{value:t.selectedItem.vehiculo_id,callback:function(e){t.$set(t.selectedItem,"vehiculo_id",e)},expression:"selectedItem.vehiculo_id"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Numero de vuelo",rules:[function(t){return!t||t.length<=15||"No mayor a 15 caracteres"}]},model:{value:t.selectedItem.numero_vuelo,callback:function(e){t.$set(t.selectedItem,"numero_vuelo",e)},expression:"selectedItem.numero_vuelo"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Empresa de vuelo",rules:[function(t){return!t||t.length<=30||"No mayor a 30 caracteres"}]},model:{value:t.selectedItem.empresa_vuelo,callback:function(e){t.$set(t.selectedItem,"empresa_vuelo",e)},expression:"selectedItem.empresa_vuelo"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{attrs:{label:"Otros datos de vuelo",rules:[function(t){return!t||t.length<=100||"No mayor a 100 caracteres"}]},model:{value:t.selectedItem.otros_vuelo,callback:function(e){t.$set(t.selectedItem,"otros_vuelo",e)},expression:"selectedItem.otros_vuelo"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Nombre de embarcación",rules:[function(t){return!t||t.length<=100||"No mayor a 100 caracteres"}]},model:{value:t.selectedItem.nombre_embarcacion,callback:function(e){t.$set(t.selectedItem,"nombre_embarcacion",e)},expression:"selectedItem.nombre_embarcacion"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-autocomplete",{staticClass:"mr-3",attrs:{items:t.embarcaciones,"item-text":"nombre","item-value":"id",label:"Tipo de embarcación"},model:{value:t.selectedItem.embarcacion_id,callback:function(e){t.$set(t.selectedItem,"embarcacion_id",e)},expression:"selectedItem.embarcacion_id"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{attrs:{label:"Numero de embarcación",rules:[function(t){return!t||t.length<=100||"No mayor a 100 caracteres"}]},model:{value:t.selectedItem.numero_embarcacion,callback:function(e){t.$set(t.selectedItem,"numero_embarcacion",e)},expression:"selectedItem.numero_embarcacion"}})],1)],1),t._v(" "),n("v-radio-group",{attrs:{rules:[function(t){return!!t||"Requerido"}],required:"",row:""},model:{value:t.selectedItem.responsable,callback:function(e){t.$set(t.selectedItem,"responsable",e)},expression:"selectedItem.responsable"}},[n("v-radio",{attrs:{label:"GECC",value:"GECC",color:"green"}}),t._v(" "),n("v-radio",{attrs:{label:"DIGCOIN",value:"DIGCOIN",color:"green"}})],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("RemoveItem",{attrs:{bus:t.bus}}),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Retenciones")]),t._v(" "),n("Retencion",{attrs:{bus:t.bus}}),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(e){return t.retenerItem(t.selectedItem,{mode:"nuevo"})}},slot:"activator"},[n("v-icon",[t._v("add_circle")])],1),t._v(" "),n("span",[t._v("Nuevo")])],1)],1),t._v(" "),n("v-card-text",[n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.retenciones,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.correlativo)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.inicial_embalaje)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.numero_taques)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.formatDate(e.item.created_at))+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.printItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("print")])],1),t._v(" "),n("span",[t._v("Imprimir")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.retenerItem(e.item,{mode:"editar"})}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),t.$store.getters["auth/user"].roles.filter(function(t){return"admin"===t.name}).length>0?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1):t._e()],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.persona.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Causas: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},t._l(e.item.causas_retencion,function(e,r){return n("div",{key:r},[t._v("\n "+t._s(r+1)+".- "+t._s(e.nombre)+"\n ")])}),0)]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Departamento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.departamento.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Municipio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.municipio.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Localidad: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.localidad.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Lugar: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.lugar))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Descripción: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.descripcion))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Número de taques: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.numero_taques))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Libras: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.libras))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Vehiculo: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.vehiculo_id?n("div",[t._v("\n tipo: "+t._s(e.item.vehiculo.nombre)+" |\n ")]):t._e(),t._v(" "),e.item.marca_id?n("div",[t._v("\n marca: "+t._s(e.item.marca.nombre)+" |\n ")]):t._e(),t._v(" "),e.item.placa?n("div",[t._v("\n placa: "+t._s(e.item.placa)+"\n ")]):t._e()])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Vuelo: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.numero_vuelo?n("div",[t._v("\n numero: "+t._s(e.item.numero_vuelo)+" |\n ")]):t._e(),t._v(" "),e.item.empresa_vuelo?n("div",[t._v("\n empresa: "+t._s(e.item.empresaa_vuelo)+" |\n ")]):t._e(),t._v(" "),e.item.otros_vuelo?n("div",[t._v("\n otros: "+t._s(e.item.otros_vuelo)+"\n ")]):t._e()])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Embarcación: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.embarcacion_id?n("div",[t._v("\n tipo: "+t._s(e.item.embarcacion.nombre)+" |\n ")]):t._e(),t._v(" "),e.item.numero_embarcacion?n("div",[t._v("\n numero: "+t._s(e.item.numero_embarcacion)+" |\n ")]):t._e(),t._v(" "),e.item.nombre_embarcacion?n("div",[t._v("\n nombre: "+t._s(e.item.nombre_embarcacion)+"\n ")]):t._e()])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Responsable: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.responsable))])])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(983),n(984),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{},props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},selectedPersona:{},errorCarnet:null,causasRetencion:[],departamentos:[],provincias:[],municipios:[],localidades:[],vehiculos:[],marcas:[],embarcaciones:[],personas:[],persona:[],headers:[{text:"Nombre",align:"center",sortable:!1},{text:"Carnet de identidad",align:"center",sortable:!1},{text:"Tipo de persona",align:"center",sortable:!1},{text:"Carnet",align:"center",sortable:!1},{text:"Estado",align:"center",sortable:!1}]}},created:function(){},mounted:function(){this.getCausasRetencion(),this.getDepartamentos(),this.getLocalidades(),this.getVehiculos(),this.getMarcas(),this.getEmbarcaciones()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},watch:{},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.selectedPersona={},this.errorCarnet=null,this.provincias=[],this.municipios=[],this.persona=[],this.$refs.form.reset(),this.bus.$emit("closeDialog")},save:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=12;break}return this.selectedItem.user_id=this.$store.getters["auth/user"].id,this.selectedPersona.user_id=this.$store.getters["auth/user"].id,t.next=6,s.a.post("api/persona",this.selectedPersona);case 6:return e=t.sent,this.selectedItem.persona_id=e.data.id,t.next=10,s.a.post("api/retencion",this.selectedItem);case 10:this.$toast.success("Correcto."),this.close();case 12:t.next=17;break;case 14:t.prev=14,t.t0=t.catch(0),console.log(t.t0);case 17:case"end":return t.stop()}},t,this,[[0,14]])}));return function(){return t.apply(this,arguments)}}(),getCausasRetencion:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/causa_retencion");case 2:e=t.sent,this.causasRetencion=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getDepartamentos:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/departamento");case 2:e=t.sent,this.departamentos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getProvincias:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/provincia");case 2:e=t.sent,this.provincias=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getMunicipios:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/municipio");case 2:e=t.sent,this.municipios=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getLocalidades:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/localidad");case 2:e=t.sent,this.localidades=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getVehiculos:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/vehiculo");case 2:e=t.sent,this.vehiculos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getMarcas:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/marca");case 2:e=t.sent,this.marcas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getEmbarcaciones:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/embarcacion");case 2:e=t.sent,this.embarcaciones=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),verificarCarnet:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/persona/fill/"+JSON.stringify({carnet_identidad:this.selectedPersona.carnet_identidad}));case 2:t.sent.data.length>0?this.errorCarnet="Ya existe este carnet.":this.errorCarnet=null;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getLibras:function(){this.selectedItem.libras=50*this.selectedItem.numero_taques},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo ")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-alert",{attrs:{value:!0,type:"info"}},[t._v("\n Use este formulario solo en caso de no encontrar a la persona.\n ")]),t._v(" "),n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedPersona.nombre,callback:function(e){t.$set(t.selectedPersona,"nombre",e)},expression:"selectedPersona.nombre"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Primer apellido",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedPersona.primer_apellido,callback:function(e){t.$set(t.selectedPersona,"primer_apellido",e)},expression:"selectedPersona.primer_apellido"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Segundo apellido",rules:[function(t){return!t||t.length<=30||"No mayor a 30 caracteres"}]},model:{value:t.selectedPersona.segundo_apellido,callback:function(e){t.$set(t.selectedPersona,"segundo_apellido",e)},expression:"selectedPersona.segundo_apellido"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs8:""}},[n("v-text-field",{staticClass:"mr-2",attrs:{label:"Carnet de identidad",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=20||"No mayor a 20 caracteres"}],"error-messages":t.errorCarnet,hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.verificarCarnet()}},model:{value:t.selectedPersona.carnet_identidad,callback:function(e){t.$set(t.selectedPersona,"carnet_identidad",e)},expression:"selectedPersona.carnet_identidad"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.departamentos,"item-text":"sigla","item-value":"id",label:"Extension",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedPersona.departamento_extension_id,callback:function(e){t.$set(t.selectedPersona,"departamento_extension_id",e)},expression:"selectedPersona.departamento_extension_id"}})],1)],1),t._v(" "),n("v-text-field",{attrs:{label:"Iniciales de embalaje",rules:[function(t){return!t||t.length<=15||"No mayor a 15 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.inicial_embalaje,callback:function(e){t.$set(t.selectedItem,"inicial_embalaje",e)},expression:"selectedItem.inicial_embalaje"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.causasRetencion,"item-text":"nombre","item-value":"id",label:"Causa de retención",multiple:"","small-chips":"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.causas,callback:function(e){t.$set(t.selectedItem,"causas",e)},expression:"selectedItem.causas"}}),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs4:""}},[n("v-autocomplete",{staticClass:"mr-3",attrs:{items:t.departamentos,"item-text":"nombre","item-value":"id",label:"Departamento",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.getProvincias()}},model:{value:t.selectedItem.departamento_id,callback:function(e){t.$set(t.selectedItem,"departamento_id",e)},expression:"selectedItem.departamento_id"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-autocomplete",{staticClass:"mr3",attrs:{items:t.provincias,"item-text":"nombre","item-value":"id",label:"Provincias",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.getMunicipios()}},model:{value:t.selectedItem.provincia_id,callback:function(e){t.$set(t.selectedItem,"provincia_id",e)},expression:"selectedItem.provincia_id"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-autocomplete",{attrs:{items:t.municipios,"item-text":"nombre","item-value":"id",label:"Municipios",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.municipio_id,callback:function(e){t.$set(t.selectedItem,"municipio_id",e)},expression:"selectedItem.municipio_id"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-3",attrs:{items:t.localidades,"item-text":"nombre","item-value":"id",label:"Localidad",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.localidad_id,callback:function(e){t.$set(t.selectedItem,"localidad_id",e)},expression:"selectedItem.localidad_id"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{attrs:{label:"Lugar",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=100||"No mayor a 100"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.lugar,callback:function(e){t.$set(t.selectedItem,"lugar",e)},expression:"selectedItem.lugar"}})],1)],1),t._v(" "),n("v-textarea",{attrs:{label:"Descripción",rules:[function(t){return!!t||"Requerido"}],rows:"2",hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}}),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Numero de taques",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t<=100||"No mayor a 100"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{input:function(e){return t.getLibras()}},model:{value:t.selectedItem.numero_taques,callback:function(e){t.$set(t.selectedItem,"numero_taques",e)},expression:"selectedItem.numero_taques"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{attrs:{label:"Libras(Aprox.)",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t<=9999||"No mayor a 9999"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.libras,callback:function(e){t.$set(t.selectedItem,"libras",e)},expression:"selectedItem.libras"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Placa de vehículo",rules:[function(t){return!t||t.length<=15||"No mayor a 15 caracteres"}]},model:{value:t.selectedItem.numero_placa,callback:function(e){t.$set(t.selectedItem,"numero_placa",e)},expression:"selectedItem.numero_placa"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-autocomplete",{staticClass:"mr-3",attrs:{items:t.marcas,"item-text":"nombre","item-value":"id",label:"Marca de vehículo"},model:{value:t.selectedItem.marca_id,callback:function(e){t.$set(t.selectedItem,"marca_id",e)},expression:"selectedItem.marca_id"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-autocomplete",{attrs:{items:t.vehiculos,"item-text":"nombre","item-value":"id",label:"Tipo de vehículo"},model:{value:t.selectedItem.vehiculo_id,callback:function(e){t.$set(t.selectedItem,"vehiculo_id",e)},expression:"selectedItem.vehiculo_id"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Numero de vuelo",rules:[function(t){return!t||t.length<=15||"No mayor a 15 caracteres"}]},model:{value:t.selectedItem.numero_vuelo,callback:function(e){t.$set(t.selectedItem,"numero_vuelo",e)},expression:"selectedItem.numero_vuelo"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Empresa de vuelo",rules:[function(t){return!t||t.length<=30||"No mayor a 30 caracteres"}]},model:{value:t.selectedItem.empresa_vuelo,callback:function(e){t.$set(t.selectedItem,"empresa_vuelo",e)},expression:"selectedItem.empresa_vuelo"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{attrs:{label:"Otros datos de vuelo",rules:[function(t){return!t||t.length<=100||"No mayor a 100 caracteres"}]},model:{value:t.selectedItem.otros_vuelo,callback:function(e){t.$set(t.selectedItem,"otros_vuelo",e)},expression:"selectedItem.otros_vuelo"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Nombre de embarcación",rules:[function(t){return!t||t.length<=100||"No mayor a 100 caracteres"}]},model:{value:t.selectedItem.nombre_embarcacion,callback:function(e){t.$set(t.selectedItem,"nombre_embarcacion",e)},expression:"selectedItem.nombre_embarcacion"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-autocomplete",{staticClass:"mr-3",attrs:{items:t.embarcaciones,"item-text":"nombre","item-value":"id",label:"Tipo de embarcación"},model:{value:t.selectedItem.embarcacion_id,callback:function(e){t.$set(t.selectedItem,"embarcacion_id",e)},expression:"selectedItem.embarcacion_id"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{attrs:{label:"Numero de embarcación",rules:[function(t){return!t||t.length<=100||"No mayor a 100 caracteres"}]},model:{value:t.selectedItem.numero_embarcacion,callback:function(e){t.$set(t.selectedItem,"numero_embarcacion",e)},expression:"selectedItem.numero_embarcacion"}})],1)],1),t._v(" "),n("v-radio-group",{attrs:{rules:[function(t){return!!t||"Requerido"}],required:"",row:""},model:{value:t.selectedItem.responsable,callback:function(e){t.$set(t.selectedItem,"responsable",e)},expression:"selectedItem.responsable"}},[n("v-radio",{attrs:{label:"GECC",value:"GECC",color:"green"}}),t._v(" "),n("v-radio",{attrs:{label:"DIGCOIN",value:"DIGCOIN",color:"green"}})],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Retenciones")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("RetencionPersona",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-left",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.fullName(e.item))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.carnet_identidad+" "+e.item.departamento_extension.sigla)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.tipo_persona_id?e.item.tipo_persona.nombre:"-")+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[e.item.tipo_persona_id?n("div",[e.item.sustitucion_id?n("v-chip",{attrs:{small:"",color:"blue","text-color":"white"}},[t._v("Sustituido")]):t._e(),t._v(" "),e.item.cesaciones.length>0?n("v-chip",{attrs:{small:"",color:"grey","text-color":"white"}},[t._v("Cesado")]):t._e(),t._v(" "),null==e.item.sustitucion_id&&0==e.item.cesaciones.length?n("v-chip",{attrs:{small:"",color:"green","text-color":"white"}},[t._v("Vigente")]):t._e()],1):t._e()]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.retencionItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("assignment_return")])],1),t._v(" "),n("span",[t._v("Retención")])],1)],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[e.item.fotografia?n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.fotografia}})]):n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:"img/user.png"}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[e.item.tipo_persona_id?n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Estado civil: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.estado_civil))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Genero: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s("M"==e.item.genero?"Masculino":"F"==e.item.genero?"Femenino":"-"))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Telefono: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.telefono))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Email: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.email))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Domicilio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.domicilio))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.fecha_nacimiento)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Pais de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.pais_nacimiento.nombre))])]),t._v(" "),e.item.departamento_nacimiento_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Departamento de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.departamento_nacimiento.nombre))])]):t._e(),t._v(" "),e.item.provincia_nacimiento_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Provincia de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.provincia_nacimiento.nombre))])]):t._e(),t._v(" "),e.item.sustitucion_id?n("tr",[n("th",{attrs:{colspan:"2"}},[t._v("SUSTITUCIÓN")])]):t._e(),t._v(" "),e.item.sustitucion_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Sustituido por: ")]),t._v(" "),e.item.persona?n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(t.fullName(e.item.persona))+" "),n("br"),t._v(" \n CI.: "+t._s(e.item.persona.carnet_identidad+" "+e.item.persona.departamento_extension.sigla)+" \n ")]):t._e()]):t._e(),t._v(" "),e.item.sustitucion_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Motivo de sustitución: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.sustitucion.descripcion)+" ")])]):t._e(),t._v(" "),e.item.sustitucion_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Documento de sustitución: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.adjunto_sustitucion,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)]):t._e(),t._v(" "),e.item.cesaciones.length>0?n("tr",[n("th",{attrs:{colspan:"2"}},[t._v("CESACIÓN")])]):t._e(),t._v(" "),e.item.cesaciones.length>0?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Motivo de cesación: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.cesaciones[0].descripcion)+" ")])]):t._e(),t._v(" "),e.item.cesaciones.length>0?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Documento de cesación: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.cesaciones[0].pivot.adjunto_cesacion,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)]):t._e()]):t._e()])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(987),n(991),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(988),l=n.n(u),d=n(6),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:f.a,Form:l.a},data:function(){return{bus:new o.a,headers:[{text:"Resolución",align:"resolucion",sortable:!1},{text:"Nombre",align:"resolucion",sortable:!1},{text:"C.I.",align:"resolucion",sortable:!1},{text:"Número de taques",align:"numero_taques",sortable:!1},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:"",totalTaques:0}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/decomiso");case 3:e=t.sent,this.table=e.data,this.totalTaques=0,e.data.forEach(function(t,e,n){this.totalTaques=this.totalTaques+t.numero_taques},this),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),console.log(t.t0);case 12:case"end":return t.stop()}},t,this,[[0,9]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/decomiso/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_nombre,t.segundo_nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")},formatDateTime:function(t){return this.$moment(t).format("DD/MM/YYYY HH:mm")}}}},function(t,e,n){var r=n(0)(n(989),n(990),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{},props:["item","bus"],data:function(){return{dialog:!1,valid:!0,selectedIndex:-1,selectedItem:{},selectedSalida:{},resolucionesAdministrativas:[],resolucionAdministrativa:[],tipo:null,mode:null,errorResolucion:null,headers:[{text:"Resolución administrativa",value:"resolucion",align:"center"},{text:"Nombre",value:"persona.primer_apellido",align:"center"},{text:"Carnet identidad",value:"persona.carnet_identidad",align:"center"},{text:"Tipo",value:"persona.carnet_productor[0].carnet",align:"center"}]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.dialog=!0,t.selectedIndex=e,t.selectedItem=e}),this.getResolucionesAdministrativas()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":this.sustituir?"Sustituir a:":"Editar"}},watch:{},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.resolucionAdministrativa=[],this.errorResolucion=null,this.$refs.form1.reset(),this.bus.$emit("closeDialog")},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form1.validate()){t.next=12;break}if(this.selectedItem.user_id=this.$store.getters["auth/user"].id,-1==this.selectedIndex){t.next=8;break}return t.next=6,s.a.put("api/decomiso/"+this.selectedItem.id,this.selectedItem);case 6:t.next=10;break;case 8:return t.next=10,s.a.post("api/decomiso",this.selectedItem);case 10:this.$toast.success("Correcto."),this.close();case 12:t.next=17;break;case 14:t.prev=14,t.t0=t.catch(0),console.log(t.t0);case 17:case"end":return t.stop()}},t,this,[[0,14]])}));return function(){return t.apply(this,arguments)}}(),getResolucionesAdministrativas:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/resolucion_administrativa");case 2:e=t.sent,this.resolucionesAdministrativas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getResolucionAdministrativa:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/resolucion_administrativa/fill/"+JSON.stringify({id:this.selectedItem.resolucion_administrativa_id}));case 2:if(e=t.sent,this.resolucionAdministrativa=e.data,this.selectedItem.numero_taques=e.data[0].numero_taques,4!=e.data[0].tipo_resolucion_id){t.next=12;break}return t.next=8,s.a.get("api/decomiso/fill/"+JSON.stringify({resolucion_administrativa_id:this.selectedItem.resolucion_administrativa_id}));case 8:t.sent.data.length>0?this.errorResolucion="Esta resolución ya fue aplicada":this.errorResolucion=null,t.next=13;break;case 12:this.errorResolucion="No es resolución de decomiso.";case 13:this.tipo=e.data[0].tipo_resolucion_id;case 14:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_nombre,t.segundo_nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")},formatDateTime:function(t){return this.$moment(t).format("DD/MM/YYYY HH:mm")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-autocomplete",{attrs:{items:t.resolucionesAdministrativas,"item-text":"resolucion","item-value":"id",label:"Resolución administrativa",rules:[function(t){return!!t||"Requerido"}],"error-messages":t.errorResolucion,hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.getResolucionAdministrativa()}},model:{value:t.selectedItem.resolucion_administrativa_id,callback:function(e){t.$set(t.selectedItem,"resolucion_administrativa_id",e)},expression:"selectedItem.resolucion_administrativa_id"}})],1),t._v(" "),n("v-data-table",{attrs:{headers:t.headers,items:t.resolucionAdministrativa,"hide-actions":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.resolucion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.persona_id?t.fullName(e.item.persona):"-")+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.persona_id?e.item.persona.carnet_identidad+" "+e.item.persona.departamento_extension.sigla:"-")+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.tipo_resolucion.nombre)+" ")])])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[e.item.persona_id?n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.persona.fotografia}})]):n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:"img/user.png"}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha resolución: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(t.formatDate(e.item.fecha_resolucion))+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Número de taques: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.numero_taques)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Observaciones: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.observaciones)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Documento adjunto: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.adjunto,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Decomisos")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.resolucion_administrativa.resolucion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.fullName(e.item.resolucion_administrativa.persona))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.resolucion_administrativa.persona.carnet_identidad+" "+e.item.resolucion_administrativa.persona.departamento_extension.sigla)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.numero_taques)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:e.item.fecha_conclusion<t.$moment().format("YYYY-MM-DD")},on:{click:function(n){return t.editItem(e.item,{mode:"editar"})}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),t.$acl.check("admin")?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1):t._e()],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.resolucion_administrativa.persona.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Tipo de resolución: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.resolucion_administrativa.tipo_resolucion.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Documento adjunto: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.resolucion_administrativa.adjunto,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)])])])],1)],1)],1)]}},{key:"footer",fn:function(){return[n("td",{attrs:{colspan:"3"}},[n("strong",[t._v("Totales ")])]),t._v(" "),n("th",{staticClass:"text-xs-center"},[t._v("\n "+t._s(t.totalTaques)+" \n ")])]},proxy:!0}])},[t._v(" "),t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(993),n(1e3),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(994),f=n.n(d),h=n(48);n.n(h);function p(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Codigo Resolución",value:"resolucion_administrativa",align:"center"},{text:"Nombre de representante legal",value:"segundo_apellido",align:"center"},{text:"Carnet de identidad",value:"carnet_identidad",align:"center"},{text:"Estado",align:"center",sortable:!1},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=p(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/donacion");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),printItem:function(){var t=p(i.a.mark(function t(e){var n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c()({method:"GET",url:"api/puesto_venta/print/"+e.id,responseType:"arraybuffer"});case 3:n=t.sent,r=new Blob([n.data],{type:"application/pdf"}),printJS(window.URL.createObjectURL(r)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=p(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/donacion/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.primer_nombre,t.segundo_nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")},formatDateTime:function(t){return this.$moment(t).format("DD/MM/YYYY HH:mm")}}}},function(t,e,n){var r=n(0)(n(995),n(999),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(68),l=n.n(u),d=n(996),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}o.a.use(l.a),e.default={components:{Donar:f.a},props:["item","bus"],data:function(){return{step:1,valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},beneficiarios:[],headers:[{text:"Resolución",value:"resolucion",align:"center"},{text:"Tipo de resolucion",value:"tipo_resolucion.nombre",align:"center"},{text:"Fecha resolución",value:"fecha_resolucion",align:"center"},{text:"Numero de taques",value:"numero_taques",align:"center",sortable:!1},{text:"Opciones",align:"center",sortable:!1}],temp:[],beneficiario:null,search:"",id_ben_don:""}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.dialog=!0,t.selectedIndex=e,t.selectedItem=e,t.begin_date_formatted=t.$moment(e.fecha_inicio).format("DD/MM/YYYY"),t.end_date_formatted=t.$moment(e.fecha_final).format("DD/MM/YYYY")}),this.bus.$on("closeDialogIniciar",function(){t.close()}),this.bus.$on("closeDialogDonar",function(){t.close()}),this.getBeneficiarios()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar"}},watch:{},methods:{close:function(){this.comercializador=null,this.verifica=!1,this.encontrado={},this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.beneficiario=null,this.bus.$emit("closeDialog")},save:function(){var t=h(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,this.selectedItem.user_id=this.$store.getters["auth/user"].id,!this.$refs.form3.validate()){t.next=13;break}if(-1==this.selectedIndex){t.next=8;break}return t.next=6,c.a.put("api/hoja_ruta/"+this.selectedItem.id,this.selectedItem);case 6:t.next=11;break;case 8:return this.selectedItem.id_hoja_ruta=this.correlativo,t.next=11,c.a.post("api/hoja_ruta",this.selectedItem);case 11:this.$toast.success("Correcto."),this.close();case 13:t.next=18;break;case 15:t.prev=15,t.t0=t.catch(0),console.log(t.t0);case 18:case"end":return t.stop()}},t,this,[[0,15]])}));return function(){return t.apply(this,arguments)}}(),getBeneficiarios:function(){var t=h(i.a.mark(function t(){var e,n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e={tipo_persona_id:6},t.next=3,c.a.get("api/persona/fill/"+JSON.stringify(e));case 3:n=t.sent,this.beneficiarios=n.data;case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getBeneficiario:function(){var t=h(i.a.mark(function t(){var e,n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/persona/fill/"+JSON.stringify({id:this.selectedItem.persona_id}));case 2:for(e=t.sent,this.beneficiario=e.data[0],n=this.beneficiario.resoluciones_administrativas,r=0;r<n.length;r++)0==n[r].activo&&n.splice(r,1);this.beneficiario.resoluciones_administrativas=n,this.id_ben_don=this.beneficiario.beneficiario_donacions[0].id;case 8:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},donarItem:function(t){t.resolucion_administrativa_id=t.id,t.beneficiario_donacion_id=this.id_ben_don,this.bus.$emit("openDialogDonar",t)}}}},function(t,e,n){var r=n(0)(n(997),n(998),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={components:{},props:["item","bus"],data:function(){return{step:1,valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},comercializadores:[]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogDonar",function(e){t.dialog=!0,t.selectedItem=e,t.begin_date_formatted=t.$moment(e.fecha_inicio).format("DD/MM/YYYY"),t.end_date_formatted=t.$moment(e.fecha_final).format("DD/MM/YYYY")}),this.bus.$on("closeDialogIniciar",function(){t.close()})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar"}},watch:{begin_date:function(t){this.selectedItem.fecha_inicio=t,this.begin_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")},end_date:function(t){this.selectedItem.fecha_final=t,this.end_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},methods:{close:function(){this.comercializador=null,this.verifica=!1,this.encontrado={},this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.step=1,this.$refs.form1.reset(),this.bus.$emit("closeDialogDonar")},save:function(){var t,e=(t=i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,this.selectedItem.user_id=this.$store.getters["auth/user"].id,!this.$refs.form1.validate()){t.next=16;break}if(-1==this.selectedIndex){t.next=10;break}return t.next=6,s.a.put("api/resolucion_administrativa/"+this.selectedItem.resolucion_administrativa_id,{activo:!1});case 6:return t.next=8,s.a.post("api/donacion",this.selectedItem);case 8:t.next=14;break;case 10:return t.next=12,s.a.put("api/resolucion_administrativa/"+this.selectedItem.resolucion_administrativa_id,{activo:!1});case 12:return t.next=14,s.a.post("api/donacion",this.selectedItem);case 14:this.$toast.success("Correcto."),this.close();case 16:t.next=21;break;case 18:t.prev=18,t.t0=t.catch(0),console.log(t.t0);case 21:case"end":return t.stop()}},t,this,[[0,18]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-text-field",{attrs:{label:"Destino",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=100||"No mayor a 100 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.destino,callback:function(e){t.$set(t.selectedItem,"destino",e)},expression:"selectedItem.destino"}})],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("Donar",{attrs:{bus:t.bus}}),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-autocomplete",{attrs:{items:t.beneficiarios,"item-text":"carnet_identidad","item-value":"id",label:"Carnet de identidad",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.getBeneficiario()}},model:{value:t.selectedItem.persona_id,callback:function(e){t.$set(t.selectedItem,"persona_id",e)},expression:"selectedItem.persona_id"}})],1),t._v(" "),t.beneficiario?n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-flex",[n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.beneficiario.resoluciones_administrativas,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s(e.item.resolucion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.tipo_resolucion.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.fecha_resolucion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.numero_taques)+" ")]),t._v(" "),n("td",[6==e.item.tipo_resolucion_id?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.donarItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("check_circle")])],1),t._v(" "),n("span",[t._v("Registrar donación")])],1):n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:""},on:{click:function(n){return t.donarItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("check_circle")])],1),t._v(" "),n("span",[t._v("Registrar donación")])],1)],1)])]}}],null,!1,3662959296)},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n No se encontro ninguna resolución administrativa\n ")])],1)],2)],1)],1)],1):t._e()],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cerrar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Donaciones")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.resolucion_administrativa.resolucion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.fullName(e.item.beneficiario_donacion.persona))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.beneficiario_donacion.persona.carnet_identidad)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[e.item.entregado?n("v-chip",{attrs:{color:"primary","text-color":"white"}},[t._v("Entregado")]):n("v-chip",{attrs:{color:"secondary","text-color":"white"}},[t._v("Pendiente")])],1),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("table",[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Entidad: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s(e.item.beneficiario_donacion.nombre)+" ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Cantidad de taques: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s(e.item.numero_taques)+" ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Domicilio de representante legal: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s(t.fullName(e.item.beneficiario_donacion.persona))+" ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Destino: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s(e.item.destino)+" ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Observaciones: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s(e.item.observaciones)+" ")])])])])],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1002),n(1006),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1003),f=n.n(d),h=n(48);n.n(h);function p(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Resolución administrativa",value:"resolucion_administrativa.resolucion",align:"center"},{text:"Responsable",value:"resolucion_administrativa.persona.primer_apellido",align:"center"},{text:"C.I.",value:"resolucion_administrativa.persona.carnet_identidad",align:"center"},{text:"Numero de taques",align:"center",sortable:!1},{text:"Opciones",align:"center",sortable:!1}],table:[],search:"",totalTaques:0}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=p(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/incineracion");case 3:e=t.sent,this.table=e.data,this.totalTaques=0,e.data.forEach(function(t,e,n){this.totalTaques=this.totalTaques+t.numero_taques},this),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),console.log(t.t0);case 12:case"end":return t.stop()}},t,this,[[0,9]])}));return function(){return t.apply(this,arguments)}}(),printItem:function(){var t=p(i.a.mark(function t(e){var n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c()({method:"GET",url:"api/puesto_venta/print/"+e.id,responseType:"arraybuffer"});case 3:n=t.sent,r=new Blob([n.data],{type:"application/pdf"}),printJS(window.URL.createObjectURL(r)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=p(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/incineracion/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")},formatDateTime:function(t){return this.$moment(t).format("DD/MM/YYYY HH:mm")}}}},function(t,e,n){var r=n(0)(n(1004),n(1005),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{},props:["item","bus"],data:function(){return{step:1,valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},selectedSalida:{},resolucionesAdministrativas:[],resolucionAdministrativa:[],tipo:null,errorResolucion:null,headers:[{text:"Resolución administrativa",value:"resolucion",align:"center"},{text:"Nombre",value:"persona.primer_apellido",align:"center"},{text:"Carnet identidad",value:"persona.carnet_identidad",align:"center"},{text:"Tipo",value:"persona.carnet_productor[0].carnet",align:"center"}],ingreso:0,salida:0,saldo:0,menu:null,date_formatted:null,date:null,responsables:[],veedores:[],motivosIncineracion:[]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.dialog=!0,t.selectedIndex=e,t.selectedItem=e,t.date_formatted=t.$moment(e.plazo).format("DD/MM/YYYY");var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e.responsables[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c=o.value;n.push(c.nombre)}}catch(t){i=!0,a=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}t.selectedItem.responsables=n;var u=[],l=!0,d=!1,f=void 0;try{for(var h,p=e.veedores[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){var m=h.value;u.push(m.nombre)}}catch(t){d=!0,f=t}finally{try{!l&&p.return&&p.return()}finally{if(d)throw f}}t.selectedItem.veedores=u}),this.getResolucionesAdministrativas(),this.getResponsables(),this.getVeedores(),this.getMotivosIncineracion()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar"}},watch:{date:function(t){this.selectedItem.plazo=t,this.date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.step=1,this.retencion=[],this.$refs.form1.reset(),this.$refs.form2.reset(),this.bus.$emit("closeDialog")},save:function(){var t=c(i.a.mark(function t(){var e,n,r,a,o,c,u,l,d,f,h,p,m,v,_,g,b,y;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form2.validate()){t.next=89;break}this.selectedItem.user_id=this.$store.getters["auth/user"].id,e=[],n=!0,r=!1,a=void 0,t.prev=7,o=this.selectedItem.responsables[Symbol.iterator]();case 9:if(n=(c=o.next()).done){t.next=25;break}return u=c.value,t.next=13,s.a.get("api/responsable/fill/"+JSON.stringify({nombre:u}));case 13:if(!((l=t.sent).data.length>0)){t.next=18;break}e.push(l.data[0]),t.next=22;break;case 18:return t.next=20,s.a.post("api/responsable",{nombre:u});case 20:d=t.sent,e.push(d.data);case 22:n=!0,t.next=9;break;case 25:t.next=31;break;case 27:t.prev=27,t.t0=t.catch(7),r=!0,a=t.t0;case 31:t.prev=31,t.prev=32,!n&&o.return&&o.return();case 34:if(t.prev=34,!r){t.next=37;break}throw a;case 37:return t.finish(34);case 38:return t.finish(31);case 39:this.selectedItem.responsables=[],this.selectedItem.responsables=e,f=[],h=!0,p=!1,m=void 0,t.prev=45,v=this.selectedItem.veedores[Symbol.iterator]();case 47:if(h=(_=v.next()).done){t.next=63;break}return g=_.value,t.next=51,s.a.get("api/veedor/fill/"+JSON.stringify({nombre:g}));case 51:if(!((b=t.sent).data.length>0)){t.next=56;break}f.push(b.data[0]),t.next=60;break;case 56:return t.next=58,s.a.post("api/veedor",{nombre:g});case 58:y=t.sent,f.push(y.data);case 60:h=!0,t.next=47;break;case 63:t.next=69;break;case 65:t.prev=65,t.t1=t.catch(45),p=!0,m=t.t1;case 69:t.prev=69,t.prev=70,!h&&v.return&&v.return();case 72:if(t.prev=72,!p){t.next=75;break}throw m;case 75:return t.finish(72);case 76:return t.finish(69);case 77:if(this.selectedItem.veedores=[],this.selectedItem.veedores=f,-1==this.selectedIndex){t.next=84;break}return t.next=82,s.a.put("api/incineracion/"+this.selectedItem.id,this.selectedItem);case 82:t.next=87;break;case 84:return t.next=86,s.a.post("api/incineracion",this.selectedItem);case 86:t.sent;case 87:this.$toast.success("Correcto."),this.close();case 89:t.next=94;break;case 91:t.prev=91,t.t2=t.catch(0),console.log(t.t2);case 94:case"end":return t.stop()}},t,this,[[0,91],[7,27,31,39],[32,,34,38],[45,65,69,77],[70,,72,76]])}));return function(){return t.apply(this,arguments)}}(),getResolucionesAdministrativas:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/resolucion_administrativa");case 2:e=t.sent,this.resolucionesAdministrativas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getResolucionAdministrativa:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/resolucion_administrativa/fill/"+JSON.stringify({id:this.selectedItem.resolucion_administrativa_id}));case 2:if(e=t.sent,this.resolucionAdministrativa=e.data,this.selectedItem.numero_taques=e.data[0].numero_taques,7!=e.data[0].tipo_resolucion_id){t.next=12;break}return t.next=8,s.a.get("api/incineracion/fill/"+JSON.stringify({resolucion_administrativa_id:this.selectedItem.resolucion_administrativa_id}));case 8:t.sent.data.length>0?this.errorResolucion="Esta resolución ya fue aplicada":this.errorResolucion=null,t.next=13;break;case 12:this.errorResolucion="No es resolución de incineración.";case 13:this.tipo=e.data[0].tipo_resolucion_id;case 14:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getResponsables:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/responsable");case 2:e=t.sent,this.responsables=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getVeedores:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/veedor");case 2:e=t.sent,this.veedores=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getMotivosIncineracion:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/motivo_incineracion");case 2:e=t.sent,this.motivosIncineracion=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),nextStep:function(){switch(this.step){case 1:this.$refs.form1.validate()&&null==this.errorResolucion&&(this.step=2)}},previousStep:function(){switch(this.step){case 2:this.step=1}},fullName:function(t){return[t.nombre,t.primer_nombre,t.segundo_nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")},formatDateTime:function(t){return this.$moment(t).format("DD/MM/YYYY HH:mm")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-stepper",{attrs:{vertical:""},model:{value:t.step,callback:function(e){t.step=e},expression:"step"}},[n("v-stepper-header",[n("v-stepper-step",{attrs:{step:"1",complete:t.step>1}},[t._v("Resolución")]),t._v(" "),n("v-divider"),t._v(" "),n("v-stepper-step",{attrs:{step:"2",complete:t.step>2}},[t._v("Incineración")])],1),t._v(" "),n("v-stepper-items",[n("v-stepper-content",{attrs:{step:"1"}},[n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-autocomplete",{attrs:{items:t.resolucionesAdministrativas,"item-text":"resolucion","item-value":"id",label:"Resolución administrativa",rules:[function(t){return!!t||"Requerido"}],"error-messages":t.errorResolucion,hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.getResolucionAdministrativa()}},model:{value:t.selectedItem.resolucion_administrativa_id,callback:function(e){t.$set(t.selectedItem,"resolucion_administrativa_id",e)},expression:"selectedItem.resolucion_administrativa_id"}})],1),t._v(" "),n("v-data-table",{attrs:{headers:t.headers,items:t.resolucionAdministrativa,"hide-actions":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.resolucion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.persona_id?t.fullName(e.item.persona):"-")+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.persona_id?e.item.persona.carnet_identidad+" "+e.item.persona.departamento_extension.sigla:"-")+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.tipo_resolucion.nombre)+" ")])])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[e.item.persona_id?n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.persona.fotografia}})]):n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:"img/user.png"}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha resolución: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(t.formatDate(e.item.fecha_resolucion))+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Número de taques: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.numero_taques)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Observaciones: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.observaciones)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Documento adjunto: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.adjunto,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1),t._v(" "),n("v-stepper-content",{attrs:{step:"2"}},[n("v-form",{ref:"form2",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-autocomplete",{attrs:{items:t.motivosIncineracion,"item-text":"nombre","item-value":"id",label:"Motivo de la incineración",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.motivo_incineracion_id,callback:function(e){t.$set(t.selectedItem,"motivo_incineracion_id",e)},expression:"selectedItem.motivo_incineracion_id"}}),t._v(" "),n("v-text-field",{attrs:{label:"Cantidad de taques",type:"number",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t<=999||"No mayor a 999"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.numero_taques,callback:function(e){t.$set(t.selectedItem,"numero_taques",e)},expression:"selectedItem.numero_taques"}}),t._v(" "),n("v-text-field",{attrs:{label:"Lugar de incineración",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=500||"No mayor a 500 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.lugar,callback:function(e){t.$set(t.selectedItem,"lugar",e)},expression:"selectedItem.lugar"}}),t._v(" "),n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-3",attrs:{slot:"activator",label:"Plazo para la incineración","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.date_formatted,callback:function(e){t.date_formatted=e},expression:"date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":""},on:{input:function(e){t.menu=!1}},model:{value:t.date,callback:function(e){t.date=e},expression:"date"}})],1),t._v(" "),n("v-combobox",{attrs:{items:t.responsables,"item-text":"nombre","return-object":!1,label:"Responsable",rules:[function(t){return!!t||"Requerido"}],multiple:"",chips:""},model:{value:t.selectedItem.responsables,callback:function(e){t.$set(t.selectedItem,"responsables",e)},expression:"selectedItem.responsables"}}),t._v(" "),n("v-combobox",{attrs:{items:t.veedores,"item-text":"nombre","return-object":!1,label:"Veedor",rules:[function(t){return!!t||"Requerido"}],multiple:"",chips:""},model:{value:t.selectedItem.veedores,callback:function(e){t.$set(t.selectedItem,"veedores",e)},expression:"selectedItem.veedores"}}),t._v(" "),n("v-text-field",{attrs:{label:"Autorización",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=64||"No mayor a 64 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.autorizacion,callback:function(e){t.$set(t.selectedItem,"autorizacion",e)},expression:"selectedItem.autorizacion"}}),t._v(" "),n("v-text-field",{attrs:{label:"Medio de transporte",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=64||"No mayor a 64 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.transporte,callback:function(e){t.$set(t.selectedItem,"transporte",e)},expression:"selectedItem.transporte"}}),t._v(" "),n("v-text-field",{attrs:{label:"Destino de las cenizas",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=64||"No mayor a 64 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.destino,callback:function(e){t.$set(t.selectedItem,"destino",e)},expression:"selectedItem.destino"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),1!=t.step?n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.previousStep()}}},[t._v("Anterior")]):t._e(),t._v(" "),n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.nextStep()}}},[t._v("Siguiente")]),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),2==t.step?n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1):t._e()],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Incineraciones")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[e.item.resolucion_administrativa?n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.resolucion_administrativa.resolucion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.fullName(e.item.resolucion_administrativa.persona))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.resolucion_administrativa.persona.carnet_identidad+" "+e.item.resolucion_administrativa.persona.departamento_extension.sigla)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.numero_taques)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),t.$acl.check("admin")?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1):t._e()],1)]):t._e()]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.resolucion_administrativa.persona.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Tipo de resolución: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.resolucion_administrativa.tipo_resolucion.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Motivo de incineración: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.motivo_incineracion.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Lugar: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.lugar))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Plazo: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.plazo)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Destino: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.destino))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Autorización: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.autorizacion))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Transporte: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.transporte))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Responsables: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},t._l(e.item.responsables,function(e,r){return n("div",{key:r},[t._v("\n "+t._s(e.nombre)+"\n ")])}),0)]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Veedores: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},t._l(e.item.veedores,function(e,r){return n("div",{key:r},[t._v("\n "+t._s(e.nombre)+"\n ")])}),0)]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Observaciones: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.observaciones))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Documento adjunto: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.resolucion_administrativa.adjunto,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)])])])],1)],1)],1)]}},{key:"footer",fn:function(){return[n("td",{attrs:{colspan:"3"}},[n("strong",[t._v("Totales ")])]),t._v(" "),n("th",{staticClass:"text-xs-center"},[t._v("\n "+t._s(t.totalTaques)+" \n ")])]},proxy:!0}])},[t._v(" "),t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1008),n(1012),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(1009),l=n.n(u),d=n(6),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:f.a,Form:l.a},data:function(){return{bus:new o.a,headers:[{text:"Resolución",align:"resolucion",sortable:!1},{text:"Nombre",align:"resolucion",sortable:!1},{text:"C.I.",align:"resolucion",sortable:!1},{text:"Número de taques",align:"numero_taques",sortable:!1},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:"",totalTaques:0}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/devolucion");case 3:e=t.sent,this.table=e.data,this.totalTaques=0,e.data.forEach(function(t,e,n){this.totalTaques=this.totalTaques+t.numero_taques},this),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),console.log(t.t0);case 12:case"end":return t.stop()}},t,this,[[0,9]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/devolucion/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_nombre,t.segundo_nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")},formatDateTime:function(t){return this.$moment(t).format("DD/MM/YYYY HH:mm")}}}},function(t,e,n){var r=n(0)(n(1010),n(1011),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{},props:["item","bus"],data:function(){return{dialog:!1,valid:!0,selectedIndex:-1,selectedItem:{},selectedSalida:{},resolucionesAdministrativas:[],resolucionAdministrativa:[],tipo:null,mode:null,errorResolucion:null,headers:[{text:"Resolución administrativa",value:"resolucion",align:"center"},{text:"Nombre",value:"persona.primer_apellido",align:"center"},{text:"Carnet identidad",value:"persona.carnet_identidad",align:"center"},{text:"Tipo",value:"persona.carnet_productor[0].carnet",align:"center"}]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.dialog=!0,t.selectedIndex=e,t.selectedItem=e}),this.getResolucionesAdministrativas()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":this.sustituir?"Sustituir a:":"Editar"}},watch:{},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.resolucionAdministrativa=[],this.errorResolucion=null,this.$refs.form1.reset(),this.bus.$emit("closeDialog")},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form1.validate()){t.next=12;break}if(this.selectedItem.user_id=this.$store.getters["auth/user"].id,-1==this.selectedIndex){t.next=8;break}return t.next=6,s.a.put("api/devolucion/"+this.selectedItem.id,this.selectedItem);case 6:t.next=10;break;case 8:return t.next=10,s.a.post("api/devolucion",this.selectedItem);case 10:this.$toast.success("Correcto."),this.close();case 12:t.next=17;break;case 14:t.prev=14,t.t0=t.catch(0),console.log(t.t0);case 17:case"end":return t.stop()}},t,this,[[0,14]])}));return function(){return t.apply(this,arguments)}}(),getResolucionesAdministrativas:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/resolucion_administrativa");case 2:e=t.sent,this.resolucionesAdministrativas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getResolucionAdministrativa:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/resolucion_administrativa/fill/"+JSON.stringify({id:this.selectedItem.resolucion_administrativa_id}));case 2:if(e=t.sent,this.resolucionAdministrativa=e.data,this.selectedItem.numero_taques=e.data[0].numero_taques,5!=e.data[0].tipo_resolucion_id){t.next=12;break}return t.next=8,s.a.get("api/devolucion/fill/"+JSON.stringify({resolucion_administrativa_id:this.selectedItem.resolucion_administrativa_id}));case 8:t.sent.data.length>0?this.errorResolucion="Esta resolución ya fue aplicada":this.errorResolucion=null,t.next=13;break;case 12:this.errorResolucion="No es resolución de devolución.";case 13:this.tipo=e.data[0].tipo_resolucion_id;case 14:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_nombre,t.segundo_nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")},formatDateTime:function(t){return this.$moment(t).format("DD/MM/YYYY HH:mm")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-autocomplete",{attrs:{items:t.resolucionesAdministrativas,"item-text":"resolucion","item-value":"id",label:"Resolución administrativa",rules:[function(t){return!!t||"Requerido"}],"error-messages":t.errorResolucion,hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.getResolucionAdministrativa()}},model:{value:t.selectedItem.resolucion_administrativa_id,callback:function(e){t.$set(t.selectedItem,"resolucion_administrativa_id",e)},expression:"selectedItem.resolucion_administrativa_id"}})],1),t._v(" "),n("v-data-table",{attrs:{headers:t.headers,items:t.resolucionAdministrativa,"hide-actions":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.resolucion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.persona_id?t.fullName(e.item.persona):"-")+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.persona_id?e.item.persona.carnet_identidad+" "+e.item.persona.departamento_extension.sigla:"-")+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.tipo_resolucion.nombre)+" ")])])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[e.item.persona_id?n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.persona.fotografia}})]):n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:"img/user.png"}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha resolución: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(t.formatDate(e.item.fecha_resolucion))+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Número de taques: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.numero_taques)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Observaciones: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.observaciones)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Documento adjunto: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.adjunto,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Devoluciones")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.resolucion_administrativa.resolucion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.fullName(e.item.resolucion_administrativa.persona))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.resolucion_administrativa.persona.carnet_identidad+" "+e.item.resolucion_administrativa.persona.departamento_extension.sigla)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.numero_taques)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:e.item.fecha_conclusion<t.$moment().format("YYYY-MM-DD")},on:{click:function(n){return t.editItem(e.item,{mode:"editar"})}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),t.$acl.check("admin")?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1):t._e()],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.resolucion_administrativa.persona.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Tipo de resolución: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.resolucion_administrativa.tipo_resolucion.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Documento adjunto: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.resolucion_administrativa.adjunto,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)])])])],1)],1)],1)]}},{key:"footer",fn:function(){return[n("td",{attrs:{colspan:"3"}},[n("strong",[t._v("Totales ")])]),t._v(" "),n("th",{staticClass:"text-xs-center"},[t._v("\n "+t._s(t.totalTaques)+" \n ")])]},proxy:!0}])},[t._v(" "),t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1014),n(1039),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1015),f=n.n(d),h=n(1018),p=n.n(h),m=n(48),v=(n.n(m),n(1021)),_=n.n(v),g=n(1027),b=n.n(g),y=n(1033),x=n.n(y),w=n(86);n.n(w);function k(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a,Salida:p.a,Decomiso:b.a,Devolucion:_.a,Donacion:x.a},data:function(){return{bus:new o.a,headers:[{text:"Nro. retención",value:"correlativo",align:"center"},{text:"Nombre",value:"retencion.persona.paterno",align:"center"},{text:"CI.",value:"retencion.persona.carnet_identidad",align:"center"},{text:"N° taques ingresado",value:"retencion.persona.nombre",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:"",saldos:[],totalDeposito:0,totalDevuelto:0,totalDecomiso:0}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=k(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/deposito");case 3:e=t.sent,this.table=e.data,this.totalDeposito=0,this.totalDevuelto=0,this.totalDecomiso=0,e.data.forEach(function(t,e,n){this.totalDeposito=this.totalDeposito+t.numero_taques,t.devoluciones.forEach(function(t){this.totalDevuelto=this.totalDevuelto+t.numero_taques},this),t.decomisos.forEach(function(t){this.totalDecomiso=this.totalDecomiso+t.numero_taques},this)},this),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(0),console.log(t.t0);case 14:case"end":return t.stop()}},t,this,[[0,11]])}));return function(){return t.apply(this,arguments)}}(),devolverItem:function(t){this.bus.$emit("openDialogDevolver",t)},decomisarItem:function(t){this.bus.$emit("openDialogDecomisar",t)},donarItem:function(t){this.bus.$emit("openDialogDonar",t)},exitItem:function(t,e){this.bus.$emit("openDialogExit",Object.assign(t,e))},editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=k(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/deposito/fill/"+JSON.stringify({id:e.id,tipo:"SALIDA"}));case 2:t.sent.data.length>0?this.$toast.info("Este deposito ya tiene salida."):this.bus.$emit("openDialogRemove","api/deposito/"+e.id);case 4:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")},formatDateTime:function(t){return this.$moment(t).format("DD/MM/YYYY HH:mm")},devuelto:function(t){var e=0;return t.devoluciones.forEach(function(t){e+=t.numero_taques}),e},decomisado:function(t){var e=0;return t.decomisos.forEach(function(t){e+=t.numero_taques}),e},verificaDeposito:function(t){var e=0,n=0;return t.devoluciones.forEach(function(t){e+=t.numero_taques}),t.decomisos.forEach(function(t){n+=t.numero_taques}),e+n>=t.numero_taques}}}},function(t,e,n){var r=n(0)(n(1016),n(1017),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o),c=n(292);function u(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{QrcodeStream:c.QrcodeStream,QrcodeDropZone:c.QrcodeDropZone,QrcodeCapture:c.QrcodeCapture},props:["item","bus"],data:function(){return{step:1,valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},retenciones:[],retencion:[],valQr:null,errorQr:null,headers:[{text:"Nro. Retención",value:"correlativo",align:"center"},{text:"Iniciales embalaje",value:"primer_apellido",align:"center"},{text:"Documento",value:"carnet_identidad",align:"center"},{text:"Fecha de retención",align:"center",sortable:!1}],qrDecode:[],error:null,correlativo:"dsdsd"}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.dialog=!0,t.selectedIndex=e,t.selectedItem=e,t.getRetencion(),t.valQr="Correcto."}),this.getRetenciones(),this.selectedItem.retencion_id=1},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar"}},watch:{},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.step=1,this.retencion=[],this.$refs.form1.reset(),this.$refs.form2.reset(),this.bus.$emit("closeDialog")},save:function(){var t=u(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form2.validate()){t.next=13;break}if(this.selectedItem.user_id=this.$store.getters["auth/user"].id,-1==this.selectedIndex){t.next=8;break}return t.next=6,s.a.put("api/deposito/"+this.selectedItem.id,this.selectedItem);case 6:t.next=11;break;case 8:return this.selectedItem.tipo_movimiento="INGRESO",t.next=11,s.a.post("api/deposito",this.selectedItem);case 11:this.$toast.success("Correcto."),this.close();case 13:t.next=18;break;case 15:t.prev=15,t.t0=t.catch(0),console.log(t.t0);case 18:case"end":return t.stop()}},t,this,[[0,15]])}));return function(){return t.apply(this,arguments)}}(),getRetenciones:function(){var t=u(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/retencion");case 2:e=t.sent,this.retenciones=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getRetencion:function(){var t=u(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/retencion/fill/"+JSON.stringify({id:this.selectedItem.retencion_id}));case 2:e=t.sent,this.retencion=e.data,this.selectedItem.numero_taques=e.data[0].numero_taques;case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getRutas:function(){var t=u(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/ruta");case 2:e=t.sent,this.rutas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getVehiculos:function(){var t=u(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/vehiculo");case 2:e=t.sent,this.vehiculos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getMarcas:function(){var t=u(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/marca");case 2:e=t.sent,this.marcas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),onDecode:function(){var t=u(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.qrDecode=atob(e).split("|"),this.selectedItem.retencion_id=this.qrDecode[1],this.correlativo=this.qrDecode[2],"RETENCION"!=this.qrDecode[0]){t.next=10;break}return t.next=6,s.a.get("api/deposito/fill/"+JSON.stringify({retencion_id:this.selectedItem.retencion_id}));case 6:t.sent.data.length>0?(this.errorQr="Ya existe en depositos.",this.valQr=null):(this.errorQr=null,this.valQr="Correcto",this.getRetencion()),t.next=12;break;case 10:this.errorQr="No es una retención.",this.valQr=null;case 12:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),onInit:function(){var t=u(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e;case 3:t.next=8;break;case 5:t.prev=5,t.t0=t.catch(0),"NotAllowedError"===t.t0.name?this.error="ERROR: Necesita proporcionar permisos para usar la camara":"NotFoundError"===t.t0.name?this.error="ERROR: No existe una camara en este dispositivo":"NotSupportedError"===t.t0.name?this.error="ERROR: Se requiere un contexto de seguridad (HTTPS, localhost)":"NotReadableError"===t.t0.name?this.error="ERROR: La camara se encuentra en uso":"OverconstrainedError"===t.t0.name?this.error="ERROR: Las camaras no son compatibles":"StreamApiNotSupportedError"===t.t0.name&&(this.error="ERROR: La API no es soportada por su navegador");case 8:case"end":return t.stop()}},t,this,[[0,5]])}));return function(e){return t.apply(this,arguments)}}(),nextStep:function(){switch(this.step){case 1:this.$refs.form1.validate()&&null==this.errorRetencion&&(this.step=2)}},previousStep:function(){switch(this.step){case 2:this.step=1}},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")},formatDateTime:function(t){return this.$moment(t).format("DD/MM/YYYY HH:mm")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-stepper",{attrs:{vertical:""},model:{value:t.step,callback:function(e){t.step=e},expression:"step"}},[n("v-stepper-header",[n("v-stepper-step",{attrs:{step:"1",complete:t.step>1}},[t._v("Retención")]),t._v(" "),n("v-divider"),t._v(" "),n("v-stepper-step",{attrs:{step:"2",complete:t.step>2}},[t._v("Deposito")])],1),t._v(" "),n("v-stepper-items",[n("v-stepper-content",{attrs:{step:"1"}},[n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{md6:""}},[n("p",{staticClass:"error"},[t._v(t._s(t.error))]),t._v(" "),n("p",{staticClass:"decode-result"},[n("b",[t._v("Código QR.")])]),t._v(" "),t.dialog?n("qrcode-stream",{staticClass:"mr-4",on:{decode:t.onDecode,init:t.onInit}}):t._e()],1),t._v(" "),n("v-flex",{attrs:{md6:""}},[n("v-text-field",{staticClass:"mt-5",attrs:{rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",readonly:"",box:"","error-messages":t.errorQr},model:{value:t.valQr,callback:function(e){t.valQr=e},expression:"valQr"}})],1)],1)],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.retencion,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.correlativo)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.inicial_embalaje)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[e.item.guia_internacion_id?n("v-chip",{attrs:{small:"",color:"green","text-color":"white"}},[t._v("Guía de internación")]):t._e(),t._v(" "),e.item.hoja_ruta_id?n("v-chip",{attrs:{small:"",color:"green","text-color":"white"}},[t._v("Hoja de ruta")]):t._e(),t._v(" "),null==e.item.guia_internacion_id&&null==e.item.hoja_ruta_id?n("v-chip",{attrs:{small:"",color:"grey","text-color":"white"}},[t._v("Sin documentos")]):t._e()],1),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.formatDate(e.item.created_at))+" ")])])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[e.item.persona_id?n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.persona.fotografia}})]):n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:"img/user.png"}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Nro. documento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.guia_internacion_id?n("span",[t._v(" \n "+t._s(e.item.guia_internacion.correlativo)+"\n ")]):t._e(),t._v(" "),e.item.hoja_ruta_id?n("span",[t._v("\n "+t._s(e.item.hoja_ruta.id_hoja_ruta)+"\n ")]):t._e()])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Nombres y apellidos: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.persona_id?n("span",[t._v("\n "+t._s(t.fullName(e.item.persona))+"\n ")]):n("span",[t._v("\n "+t._s(t.fullName(e.item))+"\n ")])])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Cedula identidad: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.persona_id?n("span",[t._v("\n "+t._s(e.item.persona.carnet_identidad+" "+e.item.persona.departamento_extension.sigla)+"\n ")]):n("span",[t._v("\n "+t._s(e.item.carnet_identidad)+"\n ")])])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Iniciales de embalaje: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.inicial_embalaje)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Causas de retención: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-list",t._l(e.item.causas_retencion,function(e,r){return n("v-list-tile",{key:r},[n("v-list-tile-content",[n("v-list-tile-title",{staticClass:"caption"},[t._v("\n "+t._s(e.nombre)+"\n ")])],1)],1)}),1)],1)]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Departamento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.departamento.nombre)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Municipio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.municipio.nombre)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Localidad: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.localidad.nombre)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Lugar: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.lugar)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Descripción: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.descripcion)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Numero de taques: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.numero_taques)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Libras: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.libras)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Terrestre: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("Número de placa:\n "+t._s(e.item.numero_placa)+"\n ")]),t._v(" "),e.item.vehiculo_id?n("td",{staticClass:"text-xs-left"},[t._v("Tipo:\n "+t._s(e.item.vehiculo.nombre)+"\n ")]):t._e(),t._v(" "),e.item.marca_id?n("td",{staticClass:"text-xs-left"},[t._v("Marca:\n "+t._s(e.item.marca.nombre)+"\n ")]):t._e()]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Aereo: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("Número de vuelo:\n "+t._s(e.item.numero_vuelo)+"\n ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("Empresa:\n "+t._s(e.item.empresa_vuelo)+"\n ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("Otros:\n "+t._s(e.item.otros_vuelo)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fluvial: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("Nombre embarcación:\n "+t._s(e.item.nombre_embarcacion)+"\n ")]),t._v(" "),e.item.embarcacion_id?n("td",{staticClass:"text-xs-left"},[t._v("Tipo:\n "+t._s(e.item.embarcacion.nombre)+"\n ")]):t._e(),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("Número embarcación:\n "+t._s(e.item.numero_embarcacion)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Responsable: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.responsable)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha y hora: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(t.formatDateTime(e.item.created_at))+"\n ")])])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1),t._v(" "),n("v-stepper-content",{attrs:{step:"2"}},[n("v-form",{ref:"form2",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-text-field",{attrs:{label:"Estado",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.estado,callback:function(e){t.$set(t.selectedItem,"estado",e)},expression:"selectedItem.estado"}}),t._v(" "),n("v-textarea",{attrs:{label:"Observaciones",rows:"2"},model:{value:t.selectedItem.observaciones,callback:function(e){t.$set(t.selectedItem,"observaciones",e)},expression:"selectedItem.observaciones"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),1!=t.step?n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.previousStep()}}},[t._v("Anterior")]):t._e(),t._v(" "),n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.nextStep()}}},[t._v("Siguiente")]),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),2==t.step?n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1):t._e()],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1019),n(1020),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o),c=n(86);n.n(c);function u(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{},props:["item","bus"],data:function(){return{step:1,valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},selectedSalida:{},resolucionesAdministrativas:[],resolucionAdministrativa:[],tipo:null,mode:null,errorResolucion:null,headers:[{text:"Resolución administrativa",value:"resolucion",align:"center"},{text:"Nombre",value:"persona.primer_apellido",align:"center"},{text:"Carnet identidad",value:"persona.carnet_identidad",align:"center"},{text:"Tipo",value:"persona.carnet_productor[0].carnet",align:"center"}],ingreso:0,salida:0,saldo:0}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogExit",function(e){t.mode=e.mode,t.dialog=!0,t.selectedIndex=e,t.selectedItem=e,t.selectedSalida.deposito_id=t.selectedItem.id,t.getResolucionesAdministrativas()})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar"}},watch:{},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.selectedSalida={},this.tipo=null,this.resolucionAdministrativa=[],this.errorResolucion=null,this.ingreso=0,this.salida=0,this.saldo=0,this.$refs.form1.reset(),this.bus.$emit("closeDialog")},save:function(){var t=u(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form1.validate()){t.next=23;break}if(-1==this.selectedIndex){t.next=21;break}if(this.selectedSalida.user_id=this.$store.getters["auth/user"].id,this.selectedItem.user_id=this.$store.getters["auth/user"].id,this.selectedItem.numero_taques_salida=this.salida,this.selectedItem.numero_taques_saldo=this.saldo,4!=this.tipo){t.next=13;break}return t.next=10,s.a.post("api/decomiso",this.selectedSalida);case 10:return t.sent,t.next=13,s.a.put("api/deposito/"+this.selectedItem.id,this.selectedItem);case 13:if(5!=this.tipo){t.next=21;break}return t.next=16,s.a.post("api/devolucion",this.selectedSalida);case 16:return t.sent,t.next=19,s.a.put("api/deposito/"+this.selectedItem.id,this.selectedItem);case 19:return t.next=21,s.a.put("api/guia_internacion/"+this.selectedItem.retencion.guia_internacion_id,{retenido:!1});case 21:this.$toast.success("Correcto."),this.close();case 23:t.next=28;break;case 25:t.prev=25,t.t0=t.catch(0),console.log(t.t0);case 28:case"end":return t.stop()}},t,this,[[0,25]])}));return function(){return t.apply(this,arguments)}}(),getResolucionesAdministrativas:function(){var t=u(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/resolucion_administrativa");case 2:e=t.sent,this.resolucionesAdministrativas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getResolucionAdministrativa:function(){var t=u(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.ingreso=0,this.salida=0,this.saldo=0,t.next=5,s.a.get("api/resolucion_administrativa/fill/"+JSON.stringify({id:this.selectedSalida.resolucion_administrativa_id}));case 5:e=t.sent,this.resolucionAdministrativa=e.data,this.salida=this.selectedItem.numero_taques_salida+e.data[0].numero_taques,this.saldo=this.selectedItem.numero_taques_saldo-e.data[0].numero_taques,"decomisar"==this.mode&&(this.selectedSalida.numero_taques_ingreso=e.data[0].numero_taques,this.selectedSalida.numero_taques_saldo=e.data[0].numero_taques,4==e.data[0].tipo_resolucion_id?this.errorResolucion=null:this.errorResolucion="No es resolución de decomiso."),"devolver"==this.mode&&(this.selectedSalida.numero_taques=e.data[0].numero_taques,5==e.data[0].tipo_resolucion_id?this.errorResolucion=null:this.errorResolucion="No es resolución de devolución."),"donar"==this.mode&&(6==e.data[0].tipo_resolucion_id?this.errorResolucion=null:this.errorResolucion="No es resolución de donación."),this.tipo=e.data[0].tipo_resolucion_id;case 13:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),nextStep:function(){switch(this.step){case 1:this.$refs.form1.validate()&&(this.step=2)}},previousStep:function(){switch(this.step){case 2:this.step=1}},fullName:function(t){return[t.nombre,t.primer_nombre,t.segundo_nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")},formatDateTime:function(t){return this.$moment(t).format("DD/MM/YYYY HH:mm")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Salida")])],1),t._v(" "),n("v-card-text",[n("v-stepper",{attrs:{vertical:""},model:{value:t.step,callback:function(e){t.step=e},expression:"step"}},[n("v-stepper-header",[n("v-stepper-step",{attrs:{step:"1",complete:t.step>1}},[t._v("Resolución administrativa")]),t._v(" "),n("v-divider"),t._v(" "),"donar"==t.mode||"incinerar"==t.mode?n("v-stepper-step",{attrs:{step:"2",complete:t.step>2}},[t._v("Salida")]):t._e()],1),t._v(" "),n("v-stepper-items",[n("v-stepper-content",{attrs:{step:"1"}},[n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-autocomplete",{attrs:{items:t.resolucionesAdministrativas,"item-text":"resolucion","item-value":"id",label:"Resolución administrativa",rules:[function(t){return!!t||"Requerido"}],"error-messages":t.errorResolucion,hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.getResolucionAdministrativa()}},model:{value:t.selectedSalida.resolucion_administrativa_id,callback:function(e){t.$set(t.selectedSalida,"resolucion_administrativa_id",e)},expression:"selectedSalida.resolucion_administrativa_id"}})],1),t._v(" "),n("v-data-table",{attrs:{headers:t.headers,items:t.resolucionAdministrativa,"hide-actions":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.resolucion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.persona_id?t.fullName(e.item.persona):"-")+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.persona_id?e.item.persona.carnet_identidad+" "+e.item.persona.departamento_extension.sigla:"-")+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.tipo_resolucion.nombre)+" ")])])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[e.item.persona_id?n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.persona.fotografia}})]):n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:"img/user.png"}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha resolución: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(t.formatDate(e.item.fecha_resolucion))+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Número de taques: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.numero_taques)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Observaciones: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.observaciones)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Documento adjunto: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.adjunto,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1),t._v(" "),"donar"==t.mode||"incinerar"==t.mode?n("v-stepper-content",{attrs:{step:"2"}},[n("v-form",{ref:"form2",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}})],1):t._e()],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),"donar"==t.mode||"incinerar"==t.mode?n("span",[1!=t.step?n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.previousStep()}}},[t._v("Anterior")]):t._e(),t._v(" "),n("v-btn",{attrs:{color:"info",small:"",disabled:!t.valid},nativeOn:{click:function(e){return t.nextStep()}}},[t._v("Siguiente")])],1):t._e(),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),1==t.step&&"decomisar"==t.mode||"devolver"==t.mode?n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1):t._e(),t._v(" "),2==t.step&&"donar"==t.mode||"incinerar"==t.mode?n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1):t._e()],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1022),n(1026),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o),c=n(1023),u=n.n(c);function l(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{DevolucionForm:u.a},props:["item","bus"],data:function(){return{dialog:!1,headers:[{text:"Resolución",align:"resolucion",sortable:!1},{text:"Número de taques",align:"numero_taques",sortable:!1},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:"",disableNuevoItem:!1}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogDevolver",function(e){t.dialog=!0,t.selectedItem=e,t.getTable()}),this.bus.$on("closeDialogDevolucion",function(){t.getTable()})},computed:{},watch:{},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.bus.$emit("closeDialog")},getTable:function(){var t=l(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s.a.get("api/devolucion");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),nuevoItem:function(t){this.bus.$emit("openDialogDevolucionForm",t)},removeItem:function(){var t=l(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/devolucion/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},image:function(t){return t.fotografia},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")},formatDecimal:function(t){return parseFloat(t).toFixed(2)}}}},function(t,e,n){var r=n(0)(n(1024),n(1025),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{},props:["item","bus"],data:function(){return{step:1,valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},selectedSalida:{},resolucionesAdministrativas:[],resolucionAdministrativa:[],tipo:null,mode:null,errorResolucion:null,headers:[{text:"Resolución administrativa",value:"resolucion",align:"center"},{text:"Nombre",value:"persona.primer_apellido",align:"center"},{text:"Carnet identidad",value:"persona.carnet_identidad",align:"center"},{text:"Tipo",value:"persona.carnet_productor[0].carnet",align:"center"}],ingreso:0,salida:0,saldo:0,beneficiarios:[],hojasRuta:[]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogDevolucionForm",function(e){t.dialog=!0,t.selectedIndex=e,t.selectedItem=e,t.selectedItem.deposito_id=e.id,t.getResolucionesAdministrativas()})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar"}},watch:{},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.resolucionAdministrativa=[],this.errorResolucion=null,this.$refs.form1.reset(),this.bus.$emit("closeDialogDevolucion")},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form1.validate()){t.next=8;break}if(-1==this.selectedIndex){t.next=6;break}return this.selectedItem.user_id=this.$store.getters["auth/user"].id,t.next=6,s.a.post("api/devolucion",this.selectedItem);case 6:this.$toast.success("Correcto."),this.close();case 8:t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),console.log(t.t0);case 13:case"end":return t.stop()}},t,this,[[0,10]])}));return function(){return t.apply(this,arguments)}}(),getResolucionesAdministrativas:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/resolucion_administrativa");case 2:e=t.sent,this.resolucionesAdministrativas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getResolucionAdministrativa:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/resolucion_administrativa/fill/"+JSON.stringify({id:this.selectedItem.resolucion_administrativa_id}));case 2:e=t.sent,this.resolucionAdministrativa=e.data,this.selectedItem.numero_taques=e.data[0].numero_taques,5==e.data[0].tipo_resolucion_id?this.errorResolucion=null:this.errorResolucion="No es resolución de devolucion.",this.tipo=e.data[0].tipo_resolucion_id;case 7:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_nombre,t.segundo_nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")},formatDateTime:function(t){return this.$moment(t).format("DD/MM/YYYY HH:mm")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("\n Nuevo\n ")])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-autocomplete",{attrs:{items:t.resolucionesAdministrativas,"item-text":"resolucion","item-value":"id",label:"Resolución administrativa",rules:[function(t){return!!t||"Requerido"}],"error-messages":t.errorResolucion,hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.getResolucionAdministrativa()}},model:{value:t.selectedItem.resolucion_administrativa_id,callback:function(e){t.$set(t.selectedItem,"resolucion_administrativa_id",e)},expression:"selectedItem.resolucion_administrativa_id"}})],1),t._v(" "),n("v-data-table",{attrs:{headers:t.headers,items:t.resolucionAdministrativa,"hide-actions":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.resolucion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.persona_id?t.fullName(e.item.persona):"-")+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.persona_id?e.item.persona.carnet_identidad+" "+e.item.persona.departamento_extension.sigla:"-")+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.tipo_resolucion.nombre)+" ")])])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[e.item.persona_id?n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.persona.fotografia}})]):n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:"img/user.png"}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha resolución: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(t.formatDate(e.item.fecha_resolucion))+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Número de taques: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.numero_taques)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Observaciones: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.observaciones)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Documento adjunto: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.adjunto,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}}),t._v(" "),n("v-toolbar",[n("v-toolbar-title",[t._v("Devoluciones")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(e){return t.nuevoItem(t.selectedItem)}},slot:"activator"},[n("v-icon",[t._v("add_circle")])],1),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("DevolucionForm",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-card-text",[n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.resolucion_administrativa.resolucion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.numero_taques)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:e.item.fecha_conclusion<t.$moment().format("YYYY-MM-DD")},on:{click:function(n){return t.editItem(e.item,{mode:"editar"})}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3",disabled:e.item.fecha_conclusion<t.$moment().format("YYYY-MM-DD")},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.resolucion_administrativa.persona.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Nombre: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.fullName(e.item.resolucion_administrativa.persona)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("CI: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.resolucion_administrativa.persona.carnet_identidad))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Tipo de resolución: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.resolucion_administrativa.tipo_resolucion.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Documento adjunto: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.resolucion_administrativa.adjunto,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Salir")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1028),n(1032),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o),c=n(1029),u=n.n(c);function l(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{DecomisoForm:u.a},props:["item","bus"],data:function(){return{dialog:!1,headers:[{text:"Resolución",align:"resolucion",sortable:!1},{text:"Número de taques",align:"numero_taques",sortable:!1},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:"",disableNuevoItem:!1}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogDecomisar",function(e){t.dialog=!0,t.selectedItem=e,t.getTable()}),this.bus.$on("closeDialogDecomiso",function(){t.getTable()})},computed:{},watch:{},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.bus.$emit("closeDialog")},getTable:function(){var t=l(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s.a.get("api/decomiso");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),nuevoItem:function(t){this.bus.$emit("openDialogDecomisoForm",t)},removeItem:function(){var t=l(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/decomiso/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},image:function(t){return t.fotografia},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")},formatDecimal:function(t){return parseFloat(t).toFixed(2)}}}},function(t,e,n){var r=n(0)(n(1030),n(1031),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{},props:["item","bus"],data:function(){return{step:1,valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},selectedSalida:{},resolucionesAdministrativas:[],resolucionAdministrativa:[],tipo:null,mode:null,errorResolucion:null,headers:[{text:"Resolución administrativa",value:"resolucion",align:"center"},{text:"Nombre",value:"persona.primer_apellido",align:"center"},{text:"Carnet identidad",value:"persona.carnet_identidad",align:"center"},{text:"Tipo",value:"persona.carnet_productor[0].carnet",align:"center"}],ingreso:0,salida:0,saldo:0,beneficiarios:[],hojasRuta:[]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogDecomisoForm",function(e){t.dialog=!0,t.selectedIndex=e,t.selectedItem=e,t.selectedItem.deposito_id=e.id,t.getResolucionesAdministrativas()})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar"}},watch:{},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.resolucionAdministrativa=[],this.errorResolucion=null,this.$refs.form1.reset(),this.bus.$emit("closeDialogDecomiso")},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form1.validate()){t.next=8;break}if(-1==this.selectedIndex){t.next=6;break}return this.selectedItem.user_id=this.$store.getters["auth/user"].id,t.next=6,s.a.post("api/decomiso",this.selectedItem);case 6:this.$toast.success("Correcto."),this.close();case 8:t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),console.log(t.t0);case 13:case"end":return t.stop()}},t,this,[[0,10]])}));return function(){return t.apply(this,arguments)}}(),getResolucionesAdministrativas:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/resolucion_administrativa");case 2:e=t.sent,this.resolucionesAdministrativas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getResolucionAdministrativa:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/resolucion_administrativa/fill/"+JSON.stringify({id:this.selectedItem.resolucion_administrativa_id}));case 2:e=t.sent,this.resolucionAdministrativa=e.data,this.selectedItem.numero_taques=e.data[0].numero_taques,4==e.data[0].tipo_resolucion_id?this.errorResolucion=null:this.errorResolucion="No es resolución de decomiso.",this.tipo=e.data[0].tipo_resolucion_id;case 7:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_nombre,t.segundo_nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")},formatDateTime:function(t){return this.$moment(t).format("DD/MM/YYYY HH:mm")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("\n Nuevo\n ")])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-autocomplete",{attrs:{items:t.resolucionesAdministrativas,"item-text":"resolucion","item-value":"id",label:"Resolución administrativa",rules:[function(t){return!!t||"Requerido"}],"error-messages":t.errorResolucion,hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.getResolucionAdministrativa()}},model:{value:t.selectedItem.resolucion_administrativa_id,callback:function(e){t.$set(t.selectedItem,"resolucion_administrativa_id",e)},expression:"selectedItem.resolucion_administrativa_id"}})],1),t._v(" "),n("v-data-table",{attrs:{headers:t.headers,items:t.resolucionAdministrativa,"hide-actions":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.resolucion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.persona_id?t.fullName(e.item.persona):"-")+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.persona_id?e.item.persona.carnet_identidad+" "+e.item.persona.departamento_extension.sigla:"-")+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.tipo_resolucion.nombre)+" ")])])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[e.item.persona_id?n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.persona.fotografia}})]):n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:"img/user.png"}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha resolución: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(t.formatDate(e.item.fecha_resolucion))+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Número de taques: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.numero_taques)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Observaciones: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.observaciones)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Documento adjunto: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.adjunto,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}}),t._v(" "),n("v-toolbar",[n("v-toolbar-title",[t._v("Decomisos")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(e){return t.nuevoItem(t.selectedItem)}},slot:"activator"},[n("v-icon",[t._v("add_circle")])],1),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("DecomisoForm",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-card-text",[n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.resolucion_administrativa.resolucion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.numero_taques)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:e.item.fecha_conclusion<t.$moment().format("YYYY-MM-DD")},on:{click:function(n){return t.editItem(e.item,{mode:"editar"})}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3",disabled:e.item.fecha_conclusion<t.$moment().format("YYYY-MM-DD")},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.resolucion_administrativa.persona.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Nombre: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.fullName(e.item.resolucion_administrativa.persona)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("CI: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.resolucion_administrativa.persona.carnet_identidad))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Tipo de resolución: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.resolucion_administrativa.tipo_resolucion.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Documento adjunto: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.resolucion_administrativa.adjunto,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Salir")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1034),n(1038),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o),c=n(1035),u=n.n(c);function l(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{DonacionForm:u.a},props:["item","bus"],data:function(){return{dialog:!1,headers:[{text:"Resolución",align:"resolucion",sortable:!1},{text:"Número de taques",align:"numero_taques",sortable:!1},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:"",disableNuevoItem:!1,personaId:[]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogDonar",function(e){t.dialog=!0,t.selectedItem=e,t.personaId=e,t.getTable()}),this.bus.$on("closeDialogDonar",function(){t.getTable()})},computed:{},watch:{},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.personaId=[],this.bus.$emit("closeDialogCard")},getTable:function(){var t=l(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s.a.get("api/donacion");case 3:e=t.sent,this.table=e.data,console.log("res",e.data),e.data.length>0&&(this.disableNuevoItem=!0),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),console.log(t.t0);case 12:case"end":return t.stop()}},t,this,[[0,9]])}));return function(){return t.apply(this,arguments)}}(),nuevoItem:function(t,e){this.bus.$emit("openDialogDonacionForm",Object.assign(t,e))},removeItem:function(){var t=l(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},image:function(t){return t.fotografia},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")},formatDecimal:function(t){return parseFloat(t).toFixed(2)},printItem:function(){var t=l(i.a.mark(function t(e){var n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s()({method:"GET",url:"api/carnet_comercializador/print/"+e.id,responseType:"arraybuffer"});case 3:n=t.sent,r=new Blob([n.data],{type:"application/pdf"}),printJS(window.URL.createObjectURL(r)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1036),n(1037),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{},props:["item","bus"],data:function(){return{step:1,valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},selectedSalida:{},resolucionesAdministrativas:[],resolucionAdministrativa:[],tipo:null,mode:null,errorResolucion:null,headers:[{text:"Resolución administrativa",value:"resolucion",align:"center"},{text:"Nombre",value:"persona.primer_apellido",align:"center"},{text:"Carnet identidad",value:"persona.carnet_identidad",align:"center"},{text:"Tipo",value:"persona.carnet_productor[0].carnet",align:"center"}],ingreso:0,salida:0,saldo:0,beneficiarios:[],hojasRuta:[]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogDonacionForm",function(e){t.mode=e.mode,t.dialog=!0,t.selectedIndex=e,t.selectedItem=e,t.selectedItem.decomiso_id=e.decomisos[0].id,t.getResolucionesAdministrativas(),t.getBeneficiarios()})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar"}},watch:{},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.selectedSalida={},this.tipo=null,this.resolucionAdministrativa=[],this.errorResolucion=null,this.ingreso=0,this.salida=0,this.saldo=0,this.beneficiarios=[],this.hojaRuta=[],this.$refs.form1.reset(),this.bus.$emit("closeDialog")},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form1.validate()){t.next=10;break}if(-1==this.selectedIndex){t.next=8;break}return this.selectedItem.user_id=this.$store.getters["auth/user"].id,t.next=6,s.a.post("api/donacion",this.selectedItem);case 6:t.sent,console.log(this.selectedItem);case 8:this.$toast.success("Correcto."),this.close();case 10:t.next=15;break;case 12:t.prev=12,t.t0=t.catch(0),console.log(t.t0);case 15:case"end":return t.stop()}},t,this,[[0,12]])}));return function(){return t.apply(this,arguments)}}(),getResolucionesAdministrativas:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/resolucion_administrativa");case 2:e=t.sent,this.resolucionesAdministrativas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getResolucionAdministrativa:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/resolucion_administrativa/fill/"+JSON.stringify({id:this.selectedItem.resolucion_administrativa_id}));case 2:e=t.sent,this.resolucionAdministrativa=e.data,this.selectedItem.numero_taques=e.data[0].numero_taques,6==e.data[0].tipo_resolucion_id?this.errorResolucion=null:this.errorResolucion="No es resolución de donación.",this.tipo=e.data[0].tipo_resolucion_id;case 7:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getBeneficiarios:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/beneficiario_donacion");case 2:e=t.sent,this.beneficiarios=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getHojaRuta:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/hoja_ruta");case 2:e=t.sent,this.hojasRuta=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),nextStep:function(){switch(this.step){case 1:this.$refs.form1.validate()&&(this.step=2)}},previousStep:function(){switch(this.step){case 2:this.step=1}},fullName:function(t){return[t.nombre,t.primer_nombre,t.segundo_nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")},formatDateTime:function(t){return this.$moment(t).format("DD/MM/YYYY HH:mm")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("\n "+t._s(t.formTitle)+" \n ")])],1),t._v(" "),n("v-card-text",[n("v-stepper",{attrs:{vertical:""},model:{value:t.step,callback:function(e){t.step=e},expression:"step"}},[n("v-stepper-header",[n("v-stepper-step",{attrs:{step:"1",complete:t.step>1}},[t._v("Resolución administrativa")]),t._v(" "),n("v-divider"),t._v(" "),n("v-stepper-step",{attrs:{step:"2",complete:t.step>2}},[t._v("Salida")])],1),t._v(" "),n("v-stepper-items",[n("v-stepper-content",{attrs:{step:"1"}},[n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-autocomplete",{attrs:{items:t.resolucionesAdministrativas,"item-text":"resolucion","item-value":"id",label:"Resolución administrativa",rules:[function(t){return!!t||"Requerido"}],"error-messages":t.errorResolucion,hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.getResolucionAdministrativa()}},model:{value:t.selectedItem.resolucion_administrativa_id,callback:function(e){t.$set(t.selectedItem,"resolucion_administrativa_id",e)},expression:"selectedItem.resolucion_administrativa_id"}})],1),t._v(" "),n("v-data-table",{attrs:{headers:t.headers,items:t.resolucionAdministrativa,"hide-actions":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.resolucion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.persona_id?t.fullName(e.item.persona):"-")+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.persona_id?e.item.persona.carnet_identidad+" "+e.item.persona.departamento_extension.sigla:"-")+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.tipo_resolucion.nombre)+" ")])])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[e.item.persona_id?n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.persona.fotografia}})]):n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:"img/user.png"}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha resolución: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(t.formatDate(e.item.fecha_resolucion))+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Número de taques: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.numero_taques)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Observaciones: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.observaciones)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Documento adjunto: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.adjunto,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1),t._v(" "),n("v-stepper-content",{attrs:{step:"2"}},[n("v-form",{ref:"form2",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-autocomplete",{attrs:{items:t.beneficiarios,"item-text":"nombre","item-value":"id",label:"Beneficiario de donación",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.beneficiario_donacion_id,callback:function(e){t.$set(t.selectedItem,"beneficiario_donacion_id",e)},expression:"selectedItem.beneficiario_donacion_id"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.hojasRuta,"item-text":"correlativo","item-value":"id",label:"Hoja de ruta"},model:{value:t.selectedItem.hoja_ruta_id,callback:function(e){t.$set(t.selectedItem,"hoja_ruta_id",e)},expression:"selectedItem.hoja_ruta_id"}}),t._v(" "),n("v-text-field",{attrs:{label:"Destino",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.destino,callback:function(e){t.$set(t.selectedItem,"destino",e)},expression:"selectedItem.destino"}}),t._v(" "),n("v-textarea",{attrs:{label:"Observaciones",rows:"2"},model:{value:t.selectedItem.observaciones,callback:function(e){t.$set(t.selectedItem,"observaciones",e)},expression:"selectedItem.observaciones"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),1!=t.step?n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.previousStep()}}},[t._v("Anterior")]):t._e(),t._v(" "),n("v-btn",{attrs:{color:"info",small:"",disabled:!t.valid},nativeOn:{click:function(e){return t.nextStep()}}},[t._v("Siguiente")]),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}}),t._v(" "),n("v-toolbar",[n("v-toolbar-title",[t._v("Donaciones")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:t.disableNuevoItem},on:{click:function(e){return t.nuevoItem(t.personaId,{mode:"nuevo"})}},slot:"activator"},[n("v-icon",[t._v("add_circle")])],1),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("DonacionForm",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-card-text",[n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.resolucion_administrativa.resolucion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.numero_taques)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:e.item.fecha_conclusion<t.$moment().format("YYYY-MM-DD")},on:{click:function(n){return t.editItem(e.item,{mode:"editar"})}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3",disabled:e.item.fecha_conclusion<t.$moment().format("YYYY-MM-DD")},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.persona.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Numero de duplicados: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.duplicado))])])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Salir")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Depositos")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Decomiso",{attrs:{bus:t.bus}}),t._v(" "),n("Devolucion",{attrs:{bus:t.bus}}),t._v(" "),n("Donacion",{attrs:{bus:t.bus}}),t._v(" "),n("Salida",{attrs:{bus:t.bus}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.retencion.correlativo)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-left",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.fullName(e.item.retencion.persona))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-left",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.retencion.persona.carnet_identidad)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.numero_taques)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),t.$store.getters["auth/user"].roles.filter(function(t){return"admin"===t.name}).length>0?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1):t._e()],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[e.item.retencion.persona_id?n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.retencion.persona.fotografia}})]):n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:"img/user.png"}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha de deposito:")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(t.formatDate(e.item.created_at))+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Estado: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.estado)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Observaciones: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.observaciones)+"\n ")])]),t._v(" "),n("tr",[n("th",{attrs:{colspan:"2"}},[t._v("DATOS DE DEVOLUCIÓN")])]),t._v(" "),n("tr",[n("td",{attrs:{colspan:"2"}},[n("table",t._l(e.item.devoluciones,function(e,r){return n("span",{key:r},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Resolución administrativa: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.resolucion_administrativa.resolucion)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Numero de taques: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.numero_taques)+"\n ")])])])}),0)])]),t._v(" "),n("tr",[n("th",{attrs:{colspan:"2"}},[t._v("DATOS DE DECOMISO")])]),t._v(" "),n("tr",[n("td",{attrs:{colspan:"2"}},[n("table",t._l(e.item.decomisos,function(e,r){return n("span",{key:r},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Resolución administrativa: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.resolucion_administrativa.resolucion)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Numero de taques: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.numero_taques_ingreso)+"\n ")])])])}),0)])]),t._v(" "),n("tr",[n("th",{attrs:{colspan:"2"}},[t._v("DATOS DE RETENCIÓN")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Nro. retención: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.retencion.correlativo)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Documento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.retencion.guia_internacion_id?n("span",[t._v("\n Nro. guía de internación: "+t._s(e.item.retencion.guia_internacion.correlativo)+"\n ")]):t._e(),t._v(" "),e.item.retencion.hoja_ruta_id?n("span",[t._v("\n Nro. hoja de ruta: "+t._s(e.item.retencion.hoja_ruta.correlativo)+"\n ")]):t._e(),t._v(" "),null==e.item.retencion.guia_internacion_id&&null==e.item.retencion.hoja_ruta_id?n("span",[t._v("\n Sin documentos\n ")]):t._e()])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Nombres y apellidos: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.retencion.persona_id?n("span",[t._v("\n "+t._s(t.fullName(e.item.retencion.persona))+"\n ")]):n("span",[t._v("\n "+t._s(t.fullName(e.item.retencion))+"\n ")])])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Cedula identidad: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.retencion.persona_id?n("span",[t._v("\n "+t._s(e.item.retencion.persona.carnet_identidad+" "+e.item.retencion.persona.departamento_extension.sigla)+"\n ")]):n("span",[t._v("\n "+t._s(e.item.retencion.carnet_identidad)+"\n ")])])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Iniciales de embalaje: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.retencion.inicial_embalaje)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Causas de retención: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-list",t._l(e.item.retencion.causas_retencion,function(e,r){return n("v-list-tile",{key:r},[n("v-list-tile-content",[n("v-list-tile-title",{staticClass:"caption"},[t._v("\n "+t._s(e.nombre)+"\n ")])],1)],1)}),1)],1)]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Departamento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.retencion.departamento.nombre)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Municipio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.retencion.municipio.nombre)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Localidad: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.retencion.localidad.nombre)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Lugar: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.retencion.lugar)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Descripción: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.retencion.descripcion)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Numero de taques: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.retencion.numero_taques)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Libras: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.retencion.libras)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Terrestre: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("Número de placa:\n "+t._s(e.item.retencion.numero_placa)+"\n ")]),t._v(" "),e.item.retencion.vehiculo_id?n("td",{staticClass:"text-xs-left"},[t._v("Tipo:\n "+t._s(e.item.retencion.vehiculo.nombre)+"\n ")]):t._e(),t._v(" "),e.item.retencion.marca_id?n("td",{staticClass:"text-xs-left"},[t._v("Marca:\n "+t._s(e.item.retencion.marca.nombre)+"\n ")]):t._e()]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Aereo: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("Número de vuelo:\n "+t._s(e.item.retencion.numero_vuelo)+"\n ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("Empresa:\n "+t._s(e.item.retencion.empresa_vuelo)+"\n ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("Otros:\n "+t._s(e.item.retencion.otros_vuelo)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fluvial: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("Nombre embarcación:\n "+t._s(e.item.retencion.nombre_embarcacion)+"\n ")]),t._v(" "),e.item.retencion.embarcacion_id?n("td",{staticClass:"text-xs-left"},[t._v("Tipo:\n "+t._s(e.item.retencion.embarcacion.nombre)+"\n ")]):t._e(),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("Número embarcación:\n "+t._s(e.item.retencion.numero_embarcacion)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Responsable: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(e.item.retencion.responsable)+"\n ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha y hora de retención: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(t.formatDateTime(e.item.retencion.created_at))+" \n ")])])])])],1)],1)],1)]}},{key:"footer",fn:function(){return[n("td",{attrs:{colspan:"3"}},[n("strong",[t._v("Totales ")])]),t._v(" "),n("th",{staticClass:"text-xs-center"},[t._v("\n "+t._s(t.totalDeposito)+" \n ")])]},proxy:!0}])},[t._v(" "),t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1041),n(1045),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1042),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,RolForm:f.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre",value:"name",align:"center"},{text:"Display Name",value:"display_name",align:"center"},{text:"Descripción",value:"description",align:"center"},{text:"Fecha",value:"created_at",align:"center"},{text:"Opciones",align:"center",sortable:!1}],roles:[],search:""}},computed:{},mounted:function(){var t=this;this.getRoles(),this.bus.$on("closeDialog",function(){t.getRoles()})},methods:{getRoles:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/role");case 3:e=t.sent,this.roles=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t,e){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/role/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1043),n(1044),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},permisos:[]}},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e}),this.getPermisos()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{getPermisos:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/permission");case 2:e=t.sent,this.permisos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/role/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/role",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}));return function(){return t.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.name,callback:function(e){t.$set(t.selectedItem,"name",e)},expression:"selectedItem.name"}})],1),t._v(" "),n("v-card-text",[n("v-text-field",{attrs:{label:"Display Name",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.display_name,callback:function(e){t.$set(t.selectedItem,"display_name",e)},expression:"selectedItem.display_name"}}),t._v(" "),n("v-select",{attrs:{items:t.permisos,"item-text":"name","item-value":"id",chips:"",label:"Permisos",multiple:"",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length>0||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.permissions,callback:function(e){t.$set(t.selectedItem,"permissions",e)},expression:"selectedItem.permissions"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Descripción",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.description,callback:function(e){t.$set(t.selectedItem,"description",e)},expression:"selectedItem.description"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("\n Roles\n ")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("RolForm",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.roles,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.name))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.display_name))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.description))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(t._f("moment")(e.item.created_at,"DD/MM /YYYY")))]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-result",value:!0,color:"error",icon:"fa fa-times"},slot:"no-result"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])]],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1047),n(1051),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1048),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,PermissionForm:f.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre",value:"name",align:"center"},{text:"Display Name",value:"display_name",align:"center"},{text:"Descripción",value:"description",align:"center"},{text:"Fecha",value:"created_at",align:"center"},{text:"Opciones",align:"center",sortable:!1}],permissions:[],search:""}},computed:{},mounted:function(){var t=this;this.getPermissions(),this.bus.$on("closeDialog",function(){t.getPermissions()})},methods:{getPermissions:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/permission");case 3:e=t.sent,this.permissions=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t,e){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/permission/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1049),n(1050),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{}}},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t,e=(t=i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/permission/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/permission",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.name,callback:function(e){t.$set(t.selectedItem,"name",e)},expression:"selectedItem.name"}})],1),t._v(" "),n("v-card-text",[n("v-text-field",{attrs:{label:"Display Name",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.display_name,callback:function(e){t.$set(t.selectedItem,"display_name",e)},expression:"selectedItem.display_name"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Descripción",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.description,callback:function(e){t.$set(t.selectedItem,"description",e)},expression:"selectedItem.description"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("\n Permisos\n ")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("PermissionForm",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.permissions,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.name))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.display_name))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.description))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(t._f("moment")(e.item.created_at,"DD/MM/YYYY")))]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-result",value:!0,color:"error",icon:"fa fa-times"},slot:"no-result"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])]],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1053),n(1057),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1054),f=n.n(d),h=n(84);function p(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,UserForm:f.a},data:function(){return{bus:new o.a,headers:[{text:"Usuario",value:"user_name",align:"center"},{text:"Email",value:"email",align:"center"},{text:"Nombre",value:"name",align:"center"},{text:"Primer apellido",value:"last_name",align:"center"},{text:"Segundo apellido",value:"mothers_last_name",align:"center"},{text:"Fecha",value:"created_at",align:"center"},{text:"Opciones",align:"center",sortable:!1}],users:[],search:""}},computed:Object(h.b)({auth:"auth/user"}),mounted:function(){var t=this;this.getUsers(),this.bus.$on("closeDialog",function(){t.getUsers()})},methods:{getUsers:function(){var t=p(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/user");case 3:e=t.sent,this.users=e.data,t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=p(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.auth.id!=e.id?this.bus.$emit("openDialogRemove","api/user/"+e.id):this.$toast.error("No se puede borrar.");case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1055),n(1056),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},validEmail:null,roles:[],show1:!1}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.selectedItem=e;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=t.selectedItem.roles[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c=o.value;n.push(c.id)}}catch(t){i=!0,a=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}t.selectedItem.roles=[],t.selectedItem.roles=n,t.dialog=!0,t.selectedIndex=e}),this.getRoles()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{getRoles:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/role");case 2:e=t.sent,this.roles=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),checkEmail:function(){var t=c(i.a.mark(function t(){var e,n=this;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/user");case 2:e=(e=t.sent).data.filter(function(t){return t.email==n.selectedItem.email}),this.selectedItem.password=this.selectedItem.email,e.length>0?this.validEmail="Este email ya existe.":this.validEmail=null;case 6:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/user/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/user",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}));return function(){return t.apply(this,arguments)}}(),recovery:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s.a.put("api/updatepass/"+this.selectedItem.id,{password:this.selectedItem.email});case 3:this.$toast.success("Correcto!, Su contraseña es su email."),this.close(),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Nombre de usuario",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.user_name,callback:function(e){t.$set(t.selectedItem,"user_name",e)},expression:"selectedItem.user_name"}}),t._v(" "),n("v-text-field",{attrs:{label:"Email",rules:[function(t){return!!t||"Requerido"},function(t){return/.+@.+/.test(t)||"E-mail no es valido"}],"error-messages":t.validEmail,hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.checkEmail()}},model:{value:t.selectedItem.email,callback:function(e){t.$set(t.selectedItem,"email",e)},expression:"selectedItem.email"}}),t._v(" "),-1==t.selectedIndex?n("v-text-field",{attrs:{value:t.selectedItem.password,"append-icon":t.show1?"visibility":"visibility_off",type:t.show1?"text":"password",label:"Contraseña",hint:"<span class='blue--text'>* La contraseña es el email</span>","persistent-hint":"",counter:"",box:"",readonly:""},on:{"click:append":function(e){t.show1=!t.show1}},model:{value:t.selectedItem.password,callback:function(e){t.$set(t.selectedItem,"password",e)},expression:"selectedItem.password"}}):t._e(),t._v(" "),n("v-select",{attrs:{items:t.roles,"item-text":"name","item-value":"id",chips:"",label:"Roles",multiple:"",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length>0||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.roles,callback:function(e){t.$set(t.selectedItem,"roles",e)},expression:"selectedItem.roles"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.name,callback:function(e){t.$set(t.selectedItem,"name",e)},expression:"selectedItem.name"}}),t._v(" "),n("v-text-field",{attrs:{label:"Primer apellido",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.last_name,callback:function(e){t.$set(t.selectedItem,"last_name",e)},expression:"selectedItem.last_name"}}),t._v(" "),n("v-text-field",{attrs:{label:"Segundo apellido",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.mothers_last_name,callback:function(e){t.$set(t.selectedItem,"mothers_last_name",e)},expression:"selectedItem.mothers_last_name"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),-1!=t.selectedIndex?n("v-btn",{attrs:{color:"info",small:""},on:{click:function(e){return t.recovery()}}},[n("v-icon",[t._v("build")]),t._v(" Restablecer contraseña")],1):t._e(),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Usuarios")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("UserForm",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.users,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.user_name)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.email)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.name)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.last_name)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.mothers_last_name)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(t._f("moment")(e.item.created_at,"DD/MM/YYYY"))+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1059),n(1066),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1060),f=n.n(d),h=n(1063),p=n.n(h);function m(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a,Edit:p.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre del titular",value:"persona.nombre",align:"center"},{text:"Carnet del titular",value:"persona.carnet_identidad",align:"center"},{text:"Nombre del apoderado",value:"poder.nombre",align:"center"},{text:"Carnet del apoderado",value:"poder.carnet_identidad",align:"center"},{text:"Motivo",value:"motivo",align:"center"},{text:"Adjuntos",value:"adjuntos",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=m(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/poder");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialogEdit",t)},removeItem:function(){var t=m(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/poder/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1061),n(1062),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(23),l=n.n(u),d=n(42);n.n(d);function f(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}o.a.use(l.a),e.default={components:{WebCam:d.WebCam},props:["item","bus"],data:function(){return{step:1,valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},pais_nacimiento:null,menu:null,errorCarnet:null,errorEmail:null,birth_date:null,birth_date_formatted:null,estadoCivil:["Soltero","Casado","Divorciado","Viudo"],generos:[{nombre:"MASCULINO",valor:"M"},{nombre:"FEMENINO",valor:"F"}],paises:[],departamentos:[],provincias:[],img:null,camera:null,deviceId:null,devices:[],frontCam:!0,report:null,googleKey:"",valFotografia:null,getCamera:!1,sustituir:!1,sustituirA:null,idOld:null,options:{url:"api/upload/file",headers:c.a.defaults.headers.common,paramName:"file",uploadMultiple:!1,acceptedFiles:{extensions:["application/pdf"],message:"Formato no permitido."},maxFilesize:{limit:5,message:"El archivo excede los 5Mb."},maxFiles:1},fileMotivo:null,verifica:!1,carnet:"",encontrado:{},comercializadores:[],comercializador:null,valArchivo:null}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.sustituir=e.sustituir,t.dialog=!0,t.selectedIndex=e,t.sustituir?(t.sustituirA=t.fullName(e),t.idOld=e.id):(t.selectedItem=e,t.pais_nacimiento=e.pais_nacimiento.nombre,t.birth_date_formatted=t.$moment(e.fecha_nacimiento).format("DD/MM/YYYY"),t.img=e.fotografia,t.valFotografia="Fotografia capturada.",t.getProvincias())}),this.getPaises(),this.getDepartamentos(),this.getProvincias(),this.getComercializadores()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":this.sustituir?"Sustituir a:":"Editar"},device:function(){var t=this;return find(this.devices,function(e){return e.deviceId==t.deviceId})}},watch:{birth_date:function(t){this.selectedItem.fecha_nacimiento=t,this.birth_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")},camera:function(t){this.deviceId=t}},methods:{buscarCo:function(){var t=f(i.a.mark(function t(){var e,n=this;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e={carnet_identidad:this.carnet},t.next=3,c.a.get("api/poder/fill/"+JSON.stringify(e)).then(function(t){t.data.length>0?(n.verifica=!0,n.encontrado=t.data[0]):n.verifica=!1});case 3:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),close:function(){this.comercializador=null,this.carnet="",this.encontrado={},this.verifica=!1,this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.pais_nacimiento=null,this.img=null,this.step=1,this.$refs.form1.reset(),this.$refs.form2.reset(),this.$refs.form3.reset(),this.errorCarnet=null,this.errorEmail=null,this.bus.$emit("closeDialog"),this.sustituir=!1,this.sustituirA=null,this.idOld=null,this.fileSustituir=null,1==this.getCamera&&this.onStop(),this.valArchivo=null},save:function(){var t=f(i.a.mark(function t(){var e,n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,this.selectedItem.user_id=this.$store.getters["auth/user"].id,!this.$refs.form3.validate()){t.next=37;break}return e={nombre:this.pais_nacimiento},t.next=6,c.a.get("api/pais/fill/"+JSON.stringify(e));case 6:if(!((n=t.sent).data.length>0)){t.next=11;break}this.selectedItem.pais_nacimiento_id=n.data[0].id,t.next=15;break;case 11:return t.next=13,c.a.post("api/pais",{nombre:this.pais_nacimiento});case 13:t.sent,this.selectedItem.pais_nacimiento_id=setPais.data.id;case 15:if(-1==this.selectedIndex){t.next=29;break}if(!this.sustituir){t.next=25;break}return t.next=19,c.a.put("api/persona/"+this.idOld,{sustituido:!0});case 19:return this.selectedItem.persona_id=this.idOld,this.selectedItem.adjuntos=this.fileSustituir,t.next=23,c.a.post("api/persona",this.selectedItem);case 23:t.next=27;break;case 25:return t.next=27,c.a.put("api/persona/"+this.selectedItem.id,this.selectedItem);case 27:t.next=35;break;case 29:return this.selectedItem.tipo_persona_id=3,r={motivo:this.selectedItem.motivo,adjuntos:this.fileMotivo,persona:this.selectedItem,persona_id:this.comercializador.id,user_id:this.selectedItem.user_id},t.next=33,c.a.put("api/persona/"+this.comercializador.id,{activo:!1});case 33:return t.next=35,c.a.post("api/poder",r);case 35:this.$toast.success("Correcto."),this.close();case 37:t.next=42;break;case 39:t.prev=39,t.t0=t.catch(0),console.log(t.t0);case 42:case"end":return t.stop()}},t,this,[[0,39]])}));return function(){return t.apply(this,arguments)}}(),getPaises:function(){var t=f(i.a.mark(function t(){var e,n,r,a,o,s,u;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/pais");case 2:for(e=t.sent,n=!0,r=!1,a=void 0,t.prev=6,o=e.data[Symbol.iterator]();!(n=(s=o.next()).done);n=!0)u=s.value,this.paises.push(u.nombre);t.next=14;break;case 10:t.prev=10,t.t0=t.catch(6),r=!0,a=t.t0;case 14:t.prev=14,t.prev=15,!n&&o.return&&o.return();case 17:if(t.prev=17,!r){t.next=20;break}throw a;case 20:return t.finish(17);case 21:return t.finish(14);case 22:case"end":return t.stop()}},t,this,[[6,10,14,22],[15,,17,21]])}));return function(){return t.apply(this,arguments)}}(),getDepartamentos:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/departamento");case 2:e=t.sent,this.departamentos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getProvincias:function(){var t=f(i.a.mark(function t(){var e,n=this;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/provincia");case 2:e=t.sent,this.provincias=e.data.filter(function(t){return t.departamento_id==n.selectedItem.departamento_nacimiento_id});case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),verificarCarnet:function(){var t=f(i.a.mark(function t(){var e,n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e={carnet_identidad:this.selectedItem.carnet_identidad},t.next=3,c.a.get("api/persona/fill/"+JSON.stringify(e));case 3:return n=t.sent,t.next=6,c.a.get("api/persona/fill/"+JSON.stringify(e));case 6:r=t.sent,n.data.length>0||r.data.length>0?this.errorCarnet="Ya existe este carnet.":this.errorCarnet=null;case 8:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),verificarEmail:function(){var t=f(i.a.mark(function t(){var e,n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e={email:this.selectedItem.email},t.next=3,c.a.get("api/persona/fill/"+JSON.stringify(e));case 3:return n=t.sent,t.next=6,c.a.get("api/persona/fill/"+JSON.stringify(e));case 6:r=t.sent,n.data.length>0||r.data.length>0?this.errorEmail="Ya existe este email.":this.errorEmail=null;case 8:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getComercializadores:function(){var t=f(i.a.mark(function t(){var e,n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e={tipo_persona_id:3},t.next=3,c.a.get("api/persona/fill/"+JSON.stringify(e));case 3:n=t.sent,this.comercializadores=n.data;case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getComercializador:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/persona/fill/"+JSON.stringify({id:this.selectedItem.persona_id}));case 2:e=t.sent,this.comercializador=e.data[0];case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),nextStep:function(){switch(this.step){case 1:this.$refs.form1.validate()&&(this.step=2);break;case 2:this.$refs.form2.validate()&&(this.step=3,0==this.getCamera?this.getCamera=!0:this.onStart());break;case 3:this.$refs.form3.validate()&&(this.step=4,this.onStop());break;default:this.step=1}},previousStep:function(){switch(this.step){case 4:this.step=3,1==this.getCamera&&this.onStart();break;case 3:this.step=2,1==this.getCamera&&this.onStop();break;case 2:default:this.step=1}},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},onCapture:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.$refs.webcam.capture();case 2:return this.img=t.sent,t.next=5,c.a.post("api/upload/base64_image",{base64:this.img});case 5:e=t.sent,this.selectedItem.fotografia=e.data,this.selectedItem.biometrico=e.data,this.selectedItem.carnet_escaneado=e.data,this.valFotografia="Fotografia capturada";case 10:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),onStop:function(){this.$refs.webcam.stop()},onStart:function(){this.$refs.webcam.start()},onCameras:function(t){this.devices=t},onCameraChange:function(t){this.deviceId=t,this.camera=t},complete:function(t,e,n){this.fileMotivo=n.response,this.valArchivo="Cargado correctamente."}},filters:{percent:function(t){return t?(Math.floor(1e4*t)/100).toFixed(0)+"%":""}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))]),t._v(" "),n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.sustituirA))])],1),t._v(" "),n("v-card-text",[n("v-stepper",{attrs:{vertical:""},model:{value:t.step,callback:function(e){t.step=e},expression:"step"}},[n("v-stepper-header",[n("v-stepper-step",{attrs:{step:"1",complete:t.step>1}},[t._v("Verficación")]),t._v(" "),n("v-divider"),t._v(" "),n("v-stepper-step",{attrs:{step:"2",complete:t.step>2}},[t._v("Información")]),t._v(" "),n("v-divider"),t._v(" "),n("v-stepper-step",{attrs:{step:"3",complete:t.step>3}},[t._v("Fotografia")]),t._v(" "),n("v-divider"),t._v(" "),n("v-stepper-step",{attrs:{step:"4",complete:t.step>4}},[t._v("Concesión de poder")])],1),t._v(" "),n("v-stepper-items",[n("v-stepper-content",{attrs:{step:"1"}},[n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-autocomplete",{attrs:{items:t.comercializadores,"item-text":"carnet_identidad","item-value":"id",label:"Carnet de identidad",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.getComercializador()}},model:{value:t.selectedItem.persona_id,callback:function(e){t.$set(t.selectedItem,"persona_id",e)},expression:"selectedItem.persona_id"}})],1),t._v(" "),t.comercializador?n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:t.comercializador.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Nombre: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s(t.fullName(t.comercializador))+" ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Carnet de identidad: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s(t.comercializador.carnet_identidad+" "+t.comercializador.departamento_extension.sigla)+" ")])])])])],1)],1)],1):t._e()],1),t._v(" "),n("v-stepper-content",{attrs:{step:"2"}},[n("v-form",{ref:"form2",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Primer apellido",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=30||"No mayor a 30 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.primer_apellido,callback:function(e){t.$set(t.selectedItem,"primer_apellido",e)},expression:"selectedItem.primer_apellido"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{attrs:{label:"Segundo apellido"},model:{value:t.selectedItem.segundo_apellido,callback:function(e){t.$set(t.selectedItem,"segundo_apellido",e)},expression:"selectedItem.segundo_apellido"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-2",attrs:{label:"Carnet de identidad",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=20||"No mayor a 20 caracteres"}],"error-messages":t.errorCarnet,hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.verificarCarnet()}},model:{value:t.selectedItem.carnet_identidad,callback:function(e){t.$set(t.selectedItem,"carnet_identidad",e)},expression:"selectedItem.carnet_identidad"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.departamentos,"item-text":"sigla","item-value":"id",label:"Extension",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.departamento_extension_id,callback:function(e){t.$set(t.selectedItem,"departamento_extension_id",e)},expression:"selectedItem.departamento_extension_id"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.estadoCivil,label:"Estado civil",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.estado_civil,callback:function(e){t.$set(t.selectedItem,"estado_civil",e)},expression:"selectedItem.estado_civil"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.generos,"item-text":"nombre","item-value":"valor",label:"Genero",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.genero,callback:function(e){t.$set(t.selectedItem,"genero",e)},expression:"selectedItem.genero"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-2",attrs:{label:"Telefono/Celular",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=20||"No mayor a 20 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.telefono,callback:function(e){t.$set(t.selectedItem,"telefono",e)},expression:"selectedItem.telefono"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-text-field",{staticClass:"mr-2",attrs:{label:"Email","error-messages":t.errorEmail,rules:[function(t){return!!t||"Requerido"},function(t){return/.+@.+/.test(t)||"E-mail no es valido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.verificarEmail()}},model:{value:t.selectedItem.email,callback:function(e){t.$set(t.selectedItem,"email",e)},expression:"selectedItem.email"}})],1)],1),t._v(" "),n("v-text-field",{attrs:{label:"Domicilio",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=500||"No mayor a 500 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.domicilio,callback:function(e){t.$set(t.selectedItem,"domicilio",e)},expression:"selectedItem.domicilio"}}),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de nacimiento","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.birth_date_formatted,callback:function(e){t.birth_date_formatted=e},expression:"birth_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":""},on:{input:function(e){t.menu=!1}},model:{value:t.birth_date,callback:function(e){t.birth_date=e},expression:"birth_date"}})],1)],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-combobox",{staticClass:"mr-2",attrs:{items:t.paises,label:"País de nacimiento",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido, Puede crear un nuevo registro de país.</span>","persistent-hint":""},model:{value:t.pais_nacimiento,callback:function(e){t.pais_nacimiento=e},expression:"pais_nacimiento"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.departamentos,"item-text":"nombre","item-value":"id",label:"Departamento de nacimiento",clearable:""},on:{change:function(e){return t.getProvincias()}},model:{value:t.selectedItem.departamento_nacimiento_id,callback:function(e){t.$set(t.selectedItem,"departamento_nacimiento_id",e)},expression:"selectedItem.departamento_nacimiento_id"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[n("v-autocomplete",{attrs:{items:t.provincias,"item-text":"nombre","item-value":"id",label:"Provincia de nacimiento",clearable:""},model:{value:t.selectedItem.provincia_nacimiento_id,callback:function(e){t.$set(t.selectedItem,"provincia_nacimiento_id",e)},expression:"selectedItem.provincia_nacimiento_id"}})],1)],1)],1)],1),t._v(" "),n("v-stepper-content",{attrs:{step:"3"}},[n("v-form",{ref:"form3",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs12:"",md6:""}},[t.getCamera?n("v-card",{attrs:{dark:"",color:"primary",height:"380"}},[n("v-card-title",[n("v-icon",{attrs:{large:"",left:""}},[t._v("\n camera\n ")]),t._v(" "),t.device?n("span",{staticClass:"title font-weight-light"},[t._v("\n "+t._s(t.device.label)+"\n ")]):t._e()],1),t._v(" "),n("v-card-text",{staticClass:"px-0"},[n("web-cam",{ref:"webcam",staticStyle:{margin:"-130px 0 0 0"},attrs:{width:"100%",deviceId:t.deviceId,debug:!1,googleKey:t.googleKey},on:{cameras:t.onCameras,"camera-change":t.onCameraChange}})],1)],1):t._e()],1),t._v(" "),n("v-flex",{attrs:{xs12:"",md6:""}},[n("v-card",[n("v-avatar",{attrs:{tile:"tile",size:"100%",color:"grey lighten-4"}},[n("img",{attrs:{src:t.img}})]),t._v(" "),n("v-card-title",{attrs:{"primary-title":""}},[n("v-text-field",{attrs:{rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",readonly:"",box:""},model:{value:t.valFotografia,callback:function(e){t.valFotografia=e},expression:"valFotografia"}})],1)],1)],1),t._v(" "),n("v-select",{attrs:{xs4:"",items:t.devices,label:"Seleccione camara","item-text":"label","item-value":"deviceId"},model:{value:t.camera,callback:function(e){t.camera=e},expression:"camera"}}),t._v(" "),n("v-btn",{attrs:{xs3:"",small:"",color:"primary"},on:{click:t.onCapture}},[t._v("Capturar foto "),n("v-icon",[t._v("camera")])],1)],1)],1)],1),t._v(" "),n("v-stepper-content",{attrs:{step:"4"}},[n("v-form",{ref:"form4",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-textarea",{staticClass:"mr-2",attrs:{label:"Motivo de la conseción de poder",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.motivo,callback:function(e){t.$set(t.selectedItem,"motivo",e)},expression:"selectedItem.motivo"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[[n("vue-clip",{attrs:{options:t.options,"on-complete":t.complete},scopedSlots:t._u([{key:"clip-uploader-body",fn:function(e){return t._l(e.files,function(e,r){return n("div",{key:r},["success"==e.status?n("v-icon",{attrs:{color:"success"}},[t._v("check_circle")]):t._e(),t._v(" "),"success"==e.status?n("span",{staticClass:"green--text"},[t._v(" correcto.")]):t._e(),t._v(" "),"error"==e.status?n("v-icon",{attrs:{color:"error"}},[t._v("error")]):t._e(),t._v(" "),"error"==e.status?n("span",{staticClass:"red--text"},[t._v(" "+t._s(e.errorMessage))]):t._e()],1)})}}])},[n("template",{slot:"clip-uploader-action"},[n("div",{staticClass:"dz-message v-btn v-btn--small theme--light info"},[t._v("Subir archivo PDF")])])],2)],t._v(" "),n("v-text-field",{attrs:{readonly:"",box:"",label:"Archivo PDF",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.valArchivo,callback:function(e){t.valArchivo=e},expression:"valArchivo"}})],2)],1)],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),1!=t.step?n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.previousStep()}}},[t._v("Anterior")]):t._e(),t._v(" "),t.comercializador?n("v-btn",{attrs:{color:"info",small:"",disabled:!t.valid},nativeOn:{click:function(e){return t.nextStep()}}},[t._v("Siguiente")]):t._e(),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),4==t.step?n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1):t._e()],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1064),n(1065),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},error:"",options:{url:"api/upload/file",headers:s.a.defaults.headers.common,paramName:"file",uploadMultiple:!1,acceptedFiles:{extensions:["application/pdf"],message:"Formato no permitido."},maxFiles:1},fileMotivo:null,fileAdjunto:null}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogEdit",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e,t.valArchivo="Ya existe un archivo en la base de datos.",t.tempArchivo=t.selectedItem.adjuntos,t.fileMotivo=null})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "},formAdjunto:function(){return-1===this.selectedIndex?"Subir archivo PDF ":"Sustituir archivo PDF "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={},this.fileAdjunto=null},save:function(){var t,e=(t=i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=8;break}if(-1==this.selectedIndex){t.next=6;break}return this.selectedItem.adjuntos=this.fileMotivo,t.next=6,s.a.put("api/poder/"+this.selectedItem.id,this.selectedItem);case 6:this.$toast.success("Correcto."),this.close();case 8:t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),console.log(t.t0);case 13:case"end":return t.stop()}},t,this,[[0,10]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}(),complete:function(t,e,n){this.fileMotivo=n.response}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs6:""}},[n("v-textarea",{staticClass:"mr-2",attrs:{label:"Motivo de la conseción de poder",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.motivo,callback:function(e){t.$set(t.selectedItem,"motivo",e)},expression:"selectedItem.motivo"}})],1),t._v(" "),n("v-flex",{attrs:{xs6:""}},[[t.selectedItem.adjuntos?n("v-chip",[n("v-btn",{attrs:{icon:"",href:t.selectedItem.adjuntos,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1),t._v("Archivo actual\n ")],1):t._e(),t._v(" "),t.dialog?n("vue-clip",{attrs:{options:t.options,"on-complete":t.complete},scopedSlots:t._u([{key:"clip-uploader-body",fn:function(e){return t._l(e.files,function(e,r){return n("div",{key:r},["success"==e.status?n("v-icon",{attrs:{color:"success"}},[t._v("check_circle")]):t._e(),t._v(" "),"success"==e.status?n("span",{staticClass:"green--text"},[t._v(" correcto.")]):t._e(),t._v(" "),"error"==e.status?n("v-icon",{attrs:{color:"error"}},[t._v("error")]):t._e(),t._v(" "),"error"==e.status?n("span",{staticClass:"red--text"},[t._v(" "+t._s(e.errorMessage))]):t._e()],1)})}}],null,!1,4294490384)},[n("template",{slot:"clip-uploader-action"},[n("div",{staticClass:"dz-message v-btn v-btn--small theme--light success"},[t._v(t._s(t.formAdjunto))])])],2):t._e()]],2)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Transporte y comercializadores con poder")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Edit",{attrs:{bus:t.bus}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.persona.nombre)+" "+t._s(e.item.persona.primer_apellido))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.persona.carnet_identidad)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.poder.nombre)+" "+t._s(e.item.poder.primer_apellido)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.poder.carnet_identidad)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.motivo)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[n("a",{attrs:{href:e.item.adjuntos,target:"blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1068),n(1072),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1069),f=n.n(d),h=n(48);n.n(h);function p(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"ID",value:"correlativo",align:"center"},{text:"Nombre",value:"comercializador.primer_apellido",align:"center"},{text:"Carnet de identidad",value:"comercializador.carnet_identidad",align:"center"},{text:"Codigo Comercializador",value:"codigo_comercializador",align:"center"},{text:"Estado",value:"estado",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=p(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/hoja_ruta/fill/"+JSON.stringify({tipo_hoja_ruta:1}));case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),printItem:function(){var t=p(i.a.mark(function t(e){var n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c()({method:"GET",url:"api/hoja_ruta/print/"+e.id,responseType:"arraybuffer"});case 3:n=t.sent,r=new Blob([n.data],{type:"application/pdf"}),printJS(window.URL.createObjectURL(r)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=p(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/hoja_ruta/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")},formatDateTime:function(t){return this.$moment(t).format("DD/MM/YYYY HH:mm")}}}},function(t,e,n){var r=n(0)(n(1070),n(1071),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(68),l=n.n(u),d=n(74);n.n(d);function f(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}o.a.use(l.a),e.default={components:{lmap:d},props:["item","bus"],data:function(){return{loading:!1,bus_map:new o.a,step:1,valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},comercializadores:[],temp:[],comercializador:null,menu:null,menu1:null,begin_date:null,begin_date_formatted:null,end_date:null,end_date_formatted:null,vehiculos:[],vehiculo:null,marcas:[],marca:null,colores:[],color:null,correlativo:null,departamentos:[],localidad:null,localidades:[],rutas:[],ruta:null,markers:[],markersTemp:[],place:null,lat:-16.290154,lng:-63.588654,zoom:5,puestos_de_control:[],permanencia:[],error:"",puestos_venta:[],direct:!1}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.dialog=!0,t.selectedIndex=e,t.selectedItem=e,t.begin_date_formatted=t.$moment(e.fecha_inicio).format("DD/MM/YYYY"),t.end_date_formatted=t.$moment(e.fecha_final).format("DD/MM/YYYY"),t.bus_map.$emit("openMap"),t.getPuestosControl(),t.getRuta()}),this.bus.$on("closeDialogIniciar",function(){t.close()}),this.getDepartamentos(),this.getComercializadores(),this.getVehiculos(),this.getMarcas(),this.getRutas(),this.getPuestosControl(),this.getLocalidades(),this.getPuestosVenta()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar"}},watch:{begin_date:function(t){this.selectedItem.fecha_inicio=t,this.begin_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")},end_date:function(t){this.selectedItem.fecha_final=t,this.end_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},methods:{openMap:function(){this.getPuestosControl(),this.bus_map.$emit("openMap")},close:function(){this.comercializador=null,this.verifica=!1,this.encontrado={},this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.step=1,this.direct=!1,this.$refs.form1.reset(),this.$refs.form2.reset(),this.bus.$emit("closeDialog")},save:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,this.selectedItem.user_id=this.$store.getters["auth/user"].id,!this.$refs.form3.validate()){t.next=14;break}if(-1==this.selectedIndex){t.next=8;break}return t.next=6,c.a.put("api/hoja_ruta/"+this.selectedItem.id,this.selectedItem);case 6:t.next=12;break;case 8:return t.next=10,c.a.post("api/hoja_ruta",this.selectedItem);case 10:e=t.sent,this.printItem(e.data);case 12:this.$toast.success("Correcto."),this.close();case 14:t.next=19;break;case 16:t.prev=16,t.t0=t.catch(0),console.log(t.t0);case 19:case"end":return t.stop()}},t,this,[[0,16]])}));return function(){return t.apply(this,arguments)}}(),getComercializadores:function(){var t=f(i.a.mark(function t(){var e,n,r,a,o,s,u;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/persona/hoja_ruta");case 2:for(e=t.sent,this.temp=e.data,n=!0,r=!1,a=void 0,t.prev=7,o=this.temp[Symbol.iterator]();!(n=(s=o.next()).done);n=!0)0==(u=s.value).poder.length&&1!=u.tipo_persona_id&&this.comercializadores.push(u);t.next=15;break;case 11:t.prev=11,t.t0=t.catch(7),r=!0,a=t.t0;case 15:t.prev=15,t.prev=16,!n&&o.return&&o.return();case 18:if(t.prev=18,!r){t.next=21;break}throw a;case 21:return t.finish(18);case 22:return t.finish(15);case 23:case"end":return t.stop()}},t,this,[[7,11,15,23],[16,,18,22]])}));return function(){return t.apply(this,arguments)}}(),getComercializador:function(){var t=f(i.a.mark(function t(){var e,n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/persona/fill/"+JSON.stringify({id:this.selectedItem.persona_id}));case 2:return e=t.sent,this.comercializador=e.data[0],t.next=6,c.a.get("api/hoja_ruta/fill/"+JSON.stringify({persona_id:e.data[0].id}));case 6:(n=t.sent).data.length>0?(this.direct=!0,n.data[0].taques=null,r=new Date,this.begin_date_formatted=this.$moment(r).format("DD/MM/YYYY"),this.end_date_formatted=this.$moment(r).format("DD/MM/YYYY"),this.selectedItem=n.data[0]):this.$refs.form2.reset();case 8:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getVehiculos:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/vehiculo");case 2:e=t.sent,this.vehiculos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getMarcas:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/marca");case 2:e=t.sent,this.marcas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getLocalidades:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/localidad");case 2:e=t.sent,this.localidades=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getDepartamentos:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/departamento");case 2:e=t.sent,this.departamentos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getRutas:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/ruta");case 2:e=t.sent,this.rutas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getRuta:function(){var t=f(i.a.mark(function t(){var e,n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/ruta/"+this.selectedItem.ruta_id);case 2:for(e=t.sent,this.ruta=e.data,this.bus_map.$emit("clearMap"),this.setMarcadores(this.puestos_de_control),n=0;n<this.ruta.puestos_de_control.length;n++)this.bus_map.$emit("selectExtraMarker",{latlng:[this.ruta.puestos_de_control[n].latitud,this.ruta.puestos_de_control[n].longitud],id:this.ruta.puestos_de_control[n].id});case 7:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getPuestosVenta:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/puesto_venta");case 2:e=t.sent,this.puestos_venta=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getPuestosControl:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/puesto_de_control");case 2:e=t.sent,this.puestos_de_control=e.data,this.setMarcadores(this.puestos_de_control);case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),setMarcadores:function(){var t=f(i.a.mark(function t(e){var n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:for(n=0;n<e.length;n++)this.bus_map.$emit("addExtraMarker",{latlng:[e[n].latitud,e[n].longitud],id:e[n].id});case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),getCorrelativo:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/hoja_ruta/max/correlativo");case 2:e=t.sent,this.selectedItem.correlativo=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),printItem:function(){var t=f(i.a.mark(function t(e){var n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c()({method:"GET",url:"api/hoja_ruta/print/"+e.id,responseType:"arraybuffer"});case 3:n=t.sent,r=new Blob([n.data],{type:"application/pdf"}),printJS(window.URL.createObjectURL(r)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}(),addMarker:function(){return this.lastId++,this.markers.push({position:{lat:48.8538302,lng:2.2982161},opacity:1,draggable:!0,enabled:!0,clicked:0,rightClicked:0,dragended:0,ifw:!0,ifw2text:"This text is bad please change me :( "}),this.markers[this.markers.length-1]},nextStep:function(){switch(this.step){case 1:this.$refs.form1.validate()&&(this.step=2);break;case 2:this.$refs.form2.validate()&&(this.step=3)}},previousStep:function(){switch(this.step){case 3:this.step=2;break;case 2:this.step=1}},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},on:{"!click":function(e){return t.openMap(e)}},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-stepper",{attrs:{vertical:""},model:{value:t.step,callback:function(e){t.step=e},expression:"step"}},[n("v-stepper-header",[n("v-stepper-step",{attrs:{step:"1",complete:t.step>1}},[t._v("Comercializador")]),t._v(" "),n("v-divider"),t._v(" "),n("v-stepper-step",{attrs:{step:"2",complete:t.step>2}},[t._v("Hoja de ruta")]),t._v(" "),n("v-divider"),t._v(" "),n("v-stepper-step",{attrs:{step:"3",complete:t.step>3}},[t._v("Definición de ruta")])],1),t._v(" "),n("v-stepper-items",[n("v-stepper-content",{attrs:{step:"1"}},[n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-autocomplete",{attrs:{items:t.comercializadores,"item-text":"carnet_identidad","item-value":"id",label:"Carnet de identidad",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.getComercializador()}},model:{value:t.selectedItem.persona_id,callback:function(e){t.$set(t.selectedItem,"persona_id",e)},expression:"selectedItem.persona_id"}})],1),t._v(" "),null!=t.comercializador?n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:t.comercializador.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Nombre: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s(t.fullName(t.comercializador))+" ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Carnet de identidad: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s(t.comercializador.carnet_identidad+" "+t.comercializador.departamento_extension.sigla)+" ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Estado civil: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s(t.comercializador.estado_civil)+" ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Género: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s("M"==t.comercializador.genero?"Masculino":"Femenino")+" ")])])])])],1)],1)],1):t._e()],1),t._v(" "),n("v-stepper-content",{attrs:{step:"2"}},[n("v-form",{ref:"form2",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-text-field",{attrs:{label:"Codigo de Comercializador",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=100||"No mayor a 100 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.codigo_comercializador,callback:function(e){t.$set(t.selectedItem,"codigo_comercializador",e)},expression:"selectedItem.codigo_comercializador"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.puestos_venta,"item-text":"mercado","item-value":"id",label:"Puesto de venta",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.puesto_venta_id,callback:function(e){t.$set(t.selectedItem,"puesto_venta_id",e)},expression:"selectedItem.puesto_venta_id"}}),t._v(" "),n("v-text-field",{attrs:{label:"Numero de taques",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t<=999||"No mayor a 3 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.taques,callback:function(e){t.$set(t.selectedItem,"taques",e)},expression:"selectedItem.taques"}}),t._v(" "),n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha inicio validez","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.begin_date_formatted,callback:function(e){t.begin_date_formatted=e},expression:"begin_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"es-bo"},on:{input:function(e){t.menu=!1}},model:{value:t.begin_date,callback:function(e){t.begin_date=e},expression:"begin_date"}})],1),t._v(" "),n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu1,callback:function(e){t.menu1=e},expression:"menu1"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha fin validez","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.end_date_formatted,callback:function(e){t.end_date_formatted=e},expression:"end_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"es-bo"},on:{input:function(e){t.menu1=!1}},model:{value:t.end_date,callback:function(e){t.end_date=e},expression:"end_date"}})],1),t._v(" "),n("v-select",{attrs:{label:"Departamento de Procedencia",items:t.departamentos,"item-text":"nombre","item-value":"id",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.procedencia_id,callback:function(e){t.$set(t.selectedItem,"procedencia_id",e)},expression:"selectedItem.procedencia_id"}}),t._v(" "),n("v-select",{attrs:{label:"Departamento de Destino",items:t.departamentos,"item-text":"nombre","item-value":"id",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.destino_id,callback:function(e){t.$set(t.selectedItem,"destino_id",e)},expression:"selectedItem.destino_id"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.localidades,"item-text":"nombre","item-value":"id",label:"Localidad",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.localidad_id,callback:function(e){t.$set(t.selectedItem,"localidad_id",e)},expression:"selectedItem.localidad_id"}}),t._v(" "),n("v-text-field",{attrs:{label:"Destino de la coca",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.destino_coca,callback:function(e){t.$set(t.selectedItem,"destino_coca",e)},expression:"selectedItem.destino_coca"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.vehiculos,"item-text":"nombre","item-value":"id",label:"Vehículos"},model:{value:t.selectedItem.vehiculo_id,callback:function(e){t.$set(t.selectedItem,"vehiculo_id",e)},expression:"selectedItem.vehiculo_id"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.marcas,"item-text":"nombre","item-value":"id",label:"Marca del vehículo"},model:{value:t.selectedItem.marca_id,callback:function(e){t.$set(t.selectedItem,"marca_id",e)},expression:"selectedItem.marca_id"}}),t._v(" "),n("v-text-field",{attrs:{label:"Numero de Placa"},model:{value:t.selectedItem.numero_placa,callback:function(e){t.$set(t.selectedItem,"numero_placa",e)},expression:"selectedItem.numero_placa"}}),t._v(" "),n("v-text-field",{attrs:{label:"Color de vehiculo"},model:{value:t.selectedItem.color,callback:function(e){t.$set(t.selectedItem,"color",e)},expression:"selectedItem.color"}}),t._v(" "),n("v-text-field",{attrs:{label:"Nombre del conductor"},model:{value:t.selectedItem.nombre_conductor,callback:function(e){t.$set(t.selectedItem,"nombre_conductor",e)},expression:"selectedItem.nombre_conductor"}})],1)],1),t._v(" "),n("v-stepper-content",{attrs:{step:"3"}},[n("v-form",{ref:"form3",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-autocomplete",{attrs:{items:t.rutas,"item-text":"nombre","item-value":"id",label:"Elija la ruta",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.getRuta()}},model:{value:t.selectedItem.ruta_id,callback:function(e){t.$set(t.selectedItem,"ruta_id",e)},expression:"selectedItem.ruta_id"}})],1),t._v(" "),n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("lmap",{staticStyle:{height:"350px"},attrs:{bus:t.bus_map}})],1)],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),1!=t.step?n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.previousStep()}}},[t._v("Anterior")]):t._e(),t._v(" "),n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.nextStep()}}},[t._v("Siguiente")]),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),3==t.step||1==t.direct&&2==t.step?n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1):t._e()],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Hojas de ruta")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.correlativo)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.fullName(e.item.persona))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.persona.carnet_identidad+" "+e.item.persona.departamento_extension.sigla)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.codigo_comercializador)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[0==e.item.estado?n("v-chip",{attrs:{color:"success","text-color":"white"}},[t._v("En curso")]):t._e(),t._v(" "),1==e.item.estado?n("v-chip",{attrs:{color:"default","text-color":"white"}},[t._v("Concluido")]):t._e()],1),t._v(" "),n("td",{staticClass:"justify-center layout"},[t.$store.getters["auth/user"].roles.filter(function(t){return"admin"===t.name}).length>0?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.printItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("print")])],1),t._v(" "),n("span",[t._v("Imprimir")])],1):t._e(),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),t.$store.getters["auth/user"].roles.filter(function(t){return"admin"===t.name}).length>0?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1):t._e()],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs2:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.persona.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs10:""}},[n("table",[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Dirección del puesto de venta: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.puesto_venta.mercado))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Numero de taques: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.taques))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha inicio validez: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.fecha_inicio))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha final validez: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.fecha_final))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Procedencia: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.procedencia.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Destino: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.destino.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Localidad: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.localidad.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Destino: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.destino_coca))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Color: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.color))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Numero de placa: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.numero_placa))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Nombre del conductor: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.nombre_conductor))])]),t._v(" "),n("v-divider"),t._v(" "),n("tr",[n("th",[t._v("Puestos de control")]),t._v(" "),n("td",[n("v-divider"),t._v(" "),n("table",[n("thead",[n("tr",[n("th",[t._v("Nombre")]),t._v(" "),n("th",[t._v("Dirección")])])]),t._v(" "),n("tbody",t._l(e.item.ruta.puestos_de_control,function(e,r){return n("tr",{key:r},[n("td",[t._v(t._s(e.nombre))]),t._v(" "),n("td",[t._v(t._s(e.direccion))])])}),0)])],1)])],1)])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1074),n(1078),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1075),f=n.n(d),h=n(48);n.n(h);function p(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"ID",value:"correlativo",align:"center"},{text:"Nombre",value:"productor.primer_apellido",align:"center"},{text:"Carnet de identidad",value:"productor.carnet_identidad",align:"center"},{text:"Codigo Productor",value:"codigo_productor",align:"center"},{text:"Estado",value:"estado",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=p(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/hoja_ruta/fill/"+JSON.stringify({tipo_hoja_ruta:2}));case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),printItem:function(){var t=p(i.a.mark(function t(e){var n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c()({method:"GET",url:"api/hoja_ruta/print/"+e.id,responseType:"arraybuffer"});case 3:n=t.sent,r=new Blob([n.data],{type:"application/pdf"}),printJS(window.URL.createObjectURL(r)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=p(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/hoja_ruta/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")},formatDateTime:function(t){return this.$moment(t).format("DD/MM/YYYY HH:mm")}}}},function(t,e,n){var r=n(0)(n(1076),n(1077),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(68),l=n.n(u),d=n(74);n.n(d);function f(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}o.a.use(l.a),e.default={components:{lmap:d},props:["item","bus"],data:function(){return{loading:!1,bus_map:new o.a,step:1,valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},productores:[],temp:[],productor:null,menu:null,menu1:null,begin_date:null,begin_date_formatted:null,end_date:null,end_date_formatted:null,vehiculos:[],vehiculo:null,marcas:[],marca:null,colores:[],color:null,correlativo:null,departamentos:[],localidad:null,localidades:[],rutas:[],ruta:null,markers:[],markersTemp:[],place:null,lat:-16.290154,lng:-63.588654,zoom:5,puestos_de_control:[],permanencia:[],error:"",puestos_venta:[],direct:!1}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.dialog=!0,t.selectedIndex=e,t.selectedItem=e,t.begin_date_formatted=t.$moment(e.fecha_inicio).format("DD/MM/YYYY"),t.end_date_formatted=t.$moment(e.fecha_final).format("DD/MM/YYYY"),t.bus_map.$emit("openMap"),t.getPuestosControl(),t.getRuta()}),this.bus.$on("closeDialogIniciar",function(){t.close()}),this.getDepartamentos(),this.getProductores(),this.getVehiculos(),this.getMarcas(),this.getRutas(),this.getPuestosControl(),this.getLocalidades(),this.getPuestosVenta()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar"}},watch:{begin_date:function(t){this.selectedItem.fecha_inicio=t,this.begin_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")},end_date:function(t){this.selectedItem.fecha_final=t,this.end_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},methods:{openMap:function(){this.getPuestosControl(),this.bus_map.$emit("openMap")},close:function(){this.productor=null,this.verifica=!1,this.encontrado={},this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.step=1,this.direct=!1,this.$refs.form1.reset(),this.$refs.form2.reset(),this.bus.$emit("closeDialog")},save:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,this.selectedItem.user_id=this.$store.getters["auth/user"].id,!this.$refs.form3.validate()){t.next=16;break}if(-1==this.selectedIndex){t.next=9;break}return this.selectedItem.tipo_hoja_ruta=2,t.next=7,c.a.put("api/hoja_ruta/"+this.selectedItem.id,this.selectedItem);case 7:t.next=14;break;case 9:return this.selectedItem.tipo_hoja_ruta=2,t.next=12,c.a.post("api/hoja_ruta",this.selectedItem);case 12:e=t.sent,this.printItem(e.data);case 14:this.$toast.success("Correcto."),this.close();case 16:t.next=21;break;case 18:t.prev=18,t.t0=t.catch(0),console.log(t.t0);case 21:case"end":return t.stop()}},t,this,[[0,18]])}));return function(){return t.apply(this,arguments)}}(),getProductores:function(){var t=f(i.a.mark(function t(){var e,n,r,a,o,s,u;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/persona/hoja_ruta");case 2:for(e=t.sent,this.temp=e.data,n=!0,r=!1,a=void 0,t.prev=7,o=this.temp[Symbol.iterator]();!(n=(s=o.next()).done);n=!0)0==(u=s.value).poder.length&&1==u.tipo_persona_id&&this.productores.push(u);t.next=15;break;case 11:t.prev=11,t.t0=t.catch(7),r=!0,a=t.t0;case 15:t.prev=15,t.prev=16,!n&&o.return&&o.return();case 18:if(t.prev=18,!r){t.next=21;break}throw a;case 21:return t.finish(18);case 22:return t.finish(15);case 23:case"end":return t.stop()}},t,this,[[7,11,15,23],[16,,18,22]])}));return function(){return t.apply(this,arguments)}}(),getProductor:function(){var t=f(i.a.mark(function t(){var e,n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/persona/fill/"+JSON.stringify({id:this.selectedItem.persona_id}));case 2:return e=t.sent,this.productor=e.data[0],t.next=6,c.a.get("api/hoja_ruta/fill/"+JSON.stringify({persona_id:e.data[0].id}));case 6:(n=t.sent).data.length>0?(this.direct=!0,n.data[0].taques=null,r=new Date,this.begin_date_formatted=this.$moment(r).format("DD/MM/YYYY"),this.end_date_formatted=this.$moment(r).format("DD/MM/YYYY"),this.selectedItem=n.data[0]):this.$refs.form2.reset();case 8:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getVehiculos:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/vehiculo");case 2:e=t.sent,this.vehiculos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getMarcas:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/marca");case 2:e=t.sent,this.marcas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getLocalidades:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/localidad");case 2:e=t.sent,this.localidades=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getDepartamentos:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/departamento");case 2:e=t.sent,this.departamentos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getRutas:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/ruta");case 2:e=t.sent,this.rutas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getRuta:function(){var t=f(i.a.mark(function t(){var e,n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/ruta/"+this.selectedItem.ruta_id);case 2:for(e=t.sent,this.ruta=e.data,this.bus_map.$emit("clearMap"),this.setMarcadores(this.puestos_de_control),n=0;n<this.ruta.puestos_de_control.length;n++)this.bus_map.$emit("selectExtraMarker",{latlng:[this.ruta.puestos_de_control[n].latitud,this.ruta.puestos_de_control[n].longitud],id:this.ruta.puestos_de_control[n].id});case 7:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getPuestosVenta:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/puesto_venta");case 2:e=t.sent,this.puestos_venta=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getPuestosControl:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/puesto_de_control");case 2:e=t.sent,this.puestos_de_control=e.data,this.setMarcadores(this.puestos_de_control);case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),setMarcadores:function(){var t=f(i.a.mark(function t(e){var n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:for(n=0;n<e.length;n++)this.bus_map.$emit("addExtraMarker",{latlng:[e[n].latitud,e[n].longitud],id:e[n].id});case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),getCorrelativo:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/hoja_ruta/max/correlativo");case 2:e=t.sent,this.selectedItem.correlativo=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),printItem:function(){var t=f(i.a.mark(function t(e){var n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c()({method:"GET",url:"api/hoja_ruta/print/"+e.id,responseType:"arraybuffer"});case 3:n=t.sent,r=new Blob([n.data],{type:"application/pdf"}),printJS(window.URL.createObjectURL(r)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}(),addMarker:function(){return this.lastId++,this.markers.push({position:{lat:48.8538302,lng:2.2982161},opacity:1,draggable:!0,enabled:!0,clicked:0,rightClicked:0,dragended:0,ifw:!0,ifw2text:"This text is bad please change me :( "}),this.markers[this.markers.length-1]},nextStep:function(){switch(this.step){case 1:this.$refs.form1.validate()&&(this.step=2);break;case 2:this.$refs.form2.validate()&&(this.step=3)}},previousStep:function(){switch(this.step){case 3:this.step=2;break;case 2:this.step=1}},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-stepper",{attrs:{vertical:""},model:{value:t.step,callback:function(e){t.step=e},expression:"step"}},[n("v-stepper-header",[n("v-stepper-step",{attrs:{step:"1",complete:t.step>1}},[t._v("Productor")]),t._v(" "),n("v-divider"),t._v(" "),n("v-stepper-step",{attrs:{step:"2",complete:t.step>2}},[t._v("Hoja de ruta\n ")]),t._v(" "),n("v-divider"),t._v(" "),n("v-stepper-step",{attrs:{step:"3",complete:t.step>3}},[t._v("Definición de ruta")])],1),t._v(" "),n("v-stepper-items",[n("v-stepper-content",{attrs:{step:"1"}},[n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-autocomplete",{attrs:{items:t.productores,"item-text":"carnet_identidad","item-value":"id",label:"Carnet de identidad",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.getProductor()}},model:{value:t.selectedItem.persona_id,callback:function(e){t.$set(t.selectedItem,"persona_id",e)},expression:"selectedItem.persona_id"}})],1),t._v(" "),null!=t.productor?n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:t.productor.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Nombre: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s(t.fullName(t.productor))+" ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Carnet de identidad: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s(t.productor.carnet_identidad+" "+t.productor.departamento_extension.sigla)+" ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Estado civil: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s(t.productor.estado_civil)+" ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Género: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s("M"==t.productor.genero?"Masculino":"Femenino")+" ")])])])])],1)],1)],1):t._e()],1),t._v(" "),n("v-stepper-content",{attrs:{step:"2"}},[n("v-form",{ref:"form2",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-text-field",{attrs:{label:"Codigo de Productor",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=100||"No mayor a 100 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.codigo_comercializador,callback:function(e){t.$set(t.selectedItem,"codigo_comercializador",e)},expression:"selectedItem.codigo_comercializador"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.puestos_venta,"item-text":"mercado","item-value":"id",label:"Puesto de venta",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.puesto_venta_id,callback:function(e){t.$set(t.selectedItem,"puesto_venta_id",e)},expression:"selectedItem.puesto_venta_id"}}),t._v(" "),n("v-text-field",{attrs:{label:"Numero de taques",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t<=999||"No mayor a 3 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.taques,callback:function(e){t.$set(t.selectedItem,"taques",e)},expression:"selectedItem.taques"}}),t._v(" "),n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha inicio validez","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.begin_date_formatted,callback:function(e){t.begin_date_formatted=e},expression:"begin_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"es-bo"},on:{input:function(e){t.menu=!1}},model:{value:t.begin_date,callback:function(e){t.begin_date=e},expression:"begin_date"}})],1),t._v(" "),n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu1,callback:function(e){t.menu1=e},expression:"menu1"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha fin validez","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.end_date_formatted,callback:function(e){t.end_date_formatted=e},expression:"end_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"es-bo"},on:{input:function(e){t.menu1=!1}},model:{value:t.end_date,callback:function(e){t.end_date=e},expression:"end_date"}})],1),t._v(" "),n("v-select",{attrs:{label:"Departamento de Procedencia",items:t.departamentos,"item-text":"nombre","item-value":"id",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.procedencia_id,callback:function(e){t.$set(t.selectedItem,"procedencia_id",e)},expression:"selectedItem.procedencia_id"}}),t._v(" "),n("v-select",{attrs:{label:"Departamento de Destino",items:t.departamentos,"item-text":"nombre","item-value":"id",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.destino_id,callback:function(e){t.$set(t.selectedItem,"destino_id",e)},expression:"selectedItem.destino_id"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.localidades,"item-text":"nombre","item-value":"id",label:"Localidad",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.localidad_id,callback:function(e){t.$set(t.selectedItem,"localidad_id",e)},expression:"selectedItem.localidad_id"}}),t._v(" "),n("v-text-field",{attrs:{label:"Destino de la coca",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.destino_coca,callback:function(e){t.$set(t.selectedItem,"destino_coca",e)},expression:"selectedItem.destino_coca"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.vehiculos,"item-text":"nombre","item-value":"id",label:"Vehículos"},model:{value:t.selectedItem.vehiculo_id,callback:function(e){t.$set(t.selectedItem,"vehiculo_id",e)},expression:"selectedItem.vehiculo_id"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.marcas,"item-text":"nombre","item-value":"id",label:"Marca del vehículo"},model:{value:t.selectedItem.marca_id,callback:function(e){t.$set(t.selectedItem,"marca_id",e)},expression:"selectedItem.marca_id"}}),t._v(" "),n("v-text-field",{attrs:{label:"Numero de Placa"},model:{value:t.selectedItem.numero_placa,callback:function(e){t.$set(t.selectedItem,"numero_placa",e)},expression:"selectedItem.numero_placa"}}),t._v(" "),n("v-text-field",{attrs:{label:"Color de vehiculo"},model:{value:t.selectedItem.color,callback:function(e){t.$set(t.selectedItem,"color",e)},expression:"selectedItem.color"}}),t._v(" "),n("v-text-field",{attrs:{label:"Nombre del conductor"},model:{value:t.selectedItem.nombre_conductor,callback:function(e){t.$set(t.selectedItem,"nombre_conductor",e)},expression:"selectedItem.nombre_conductor"}})],1)],1),t._v(" "),n("v-stepper-content",{attrs:{step:"3"}},[n("v-form",{ref:"form3",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-autocomplete",{attrs:{items:t.rutas,"item-text":"nombre","item-value":"id",label:"Elija la ruta",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.getRuta()}},model:{value:t.selectedItem.ruta_id,callback:function(e){t.$set(t.selectedItem,"ruta_id",e)},expression:"selectedItem.ruta_id"}})],1),t._v(" "),n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("lmap",{staticStyle:{height:"350px"},attrs:{bus:t.bus_map}})],1)],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),1!=t.step?n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.previousStep()}}},[t._v("Anterior")]):t._e(),t._v(" "),n("v-btn",{attrs:{color:"info",small:""},nativeOn:{click:function(e){return t.nextStep()}}},[t._v("Siguiente")]),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),3==t.step||1==t.direct&&2==t.step?n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1):t._e()],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Hojas de ruta trueque")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.correlativo)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.fullName(e.item.persona))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.persona.carnet_identidad+" "+e.item.persona.departamento_extension.sigla)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[0==e.item.estado?n("v-chip",{attrs:{color:"success","text-color":"white"}},[t._v("En curso")]):t._e(),t._v(" "),1==e.item.estado?n("v-chip",{attrs:{color:"default","text-color":"white"}},[t._v("Concluido")]):t._e()],1),t._v(" "),n("td",{staticClass:"justify-center layout"},[t.$store.getters["auth/user"].roles.filter(function(t){return"admin"===t.name}).length>0?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.printItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("print")])],1),t._v(" "),n("span",[t._v("Imprimir")])],1):t._e(),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),t.$store.getters["auth/user"].roles.filter(function(t){return"admin"===t.name}).length>0?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1):t._e()],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs2:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.persona.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs10:""}},[n("table",[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Dirección del puesto de venta: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.puesto_venta.mercado))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Numero de taques: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.taques))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha inicio validez: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.fecha_inicio))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha final validez: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.fecha_final))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Procedencia: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.procedencia.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Destino: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.destino.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Localidad: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.localidad.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Destino: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.destino_coca))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Color: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.color))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Numero de placa: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.numero_placa))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Nombre del conductor: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.nombre_conductor))])]),t._v(" "),n("v-divider"),t._v(" "),n("tr",[n("th",[t._v("Puestos de control")]),t._v(" "),n("td",[n("v-divider"),t._v(" "),n("table",[n("thead",[n("tr",[n("th",[t._v("Nombre")]),t._v(" "),n("th",[t._v("Dirección")])])]),t._v(" "),n("tbody",t._l(e.item.ruta.puestos_de_control,function(e,r){return n("tr",{key:r},[n("td",[t._v(t._s(e.nombre))]),t._v(" "),n("td",[t._v(t._s(e.direccion))])])}),0)])],1)])],1)])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1080),n(1096),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(48),l=(n.n(u),n(6)),d=n.n(l),f=n(1081),h=n.n(f),p=n(1084),m=n.n(p),v=n(1087),_=n.n(v);function g(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:d.a,Control:h.a,Qr:_.a,Retener:m.a},data:function(){return{bus:new o.a,headers:[{text:"ID",value:"hoja_ruta.id_ruta",align:"center"},{text:"Productor/Comercializador",value:"hoja_ruta.persona.primer_apellido",align:"center"},{text:"Carnet de identidad",value:"hoja_ruta.persona.carnet_identidad",align:"center"},{text:"Codigo Comercializador",value:"hoja_ruta.codigo_comercializador",align:"center"},{text:"Estado",align:"center",sortable:!1},{text:"Decomisado",align:"center",sortable:!1},{text:"Opciones",align:"center",sortable:!1}],table:[],search:"",table2:[]}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialogControl1",function(){t.getTable()}),this.bus.$on("closeDialogRefresh",function(){t.getTable()}),this.bus.$on("closeDialogOpcion",function(){t.getTable()}),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=g(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/control_hoja_ruta");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),refresh:function(){var t=this;c.a.get("api/control_hoja_ruta").then(function(e){t.table=e.data})},printItem:function(){var t=g(i.a.mark(function t(e){var n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c()({method:"GET",url:"api/hoja_ruta/print/"+e.hoja_ruta.id,responseType:"arraybuffer"});case 3:n=t.sent,r=new Blob([n.data],{type:"application/pdf"}),printJS(window.URL.createObjectURL(r)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}(),printRetencionItem:function(){var t=g(i.a.mark(function t(e){var n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c()({method:"GET",url:"api/retencion/printhoja/"+e.hoja_ruta.retencion[0].id,responseType:"arraybuffer"});case 3:n=t.sent,r=new Blob([n.data],{type:"application/pdf"}),printJS(window.URL.createObjectURL(r)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},controlItem:function(t){this.bus.$emit("openDialogControl",t)},retenerItem:function(t){this.bus.$emit("openDialogRetener",t)},removeItem:function(){var t=g(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/hoja_ruta/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")},formatDateTime:function(t){return this.$moment(t).format("DD/MM/YYYY HH:mm")}}}},function(t,e,n){var r=n(0)(n(1082),n(1083),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(23),l=n.n(u);function d(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}o.a.use(l.a),e.default={components:{},props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},selectedControl:{},puestosControl:[],sw:!1,headers:[{text:"Nombre",value:"nombre",align:"center"},{text:"Dirección",value:"direccion",align:"center"},{text:"estado",align:"left",sortable:!1}]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogControl",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e,t.verificaPuesto()})},computed:{},watch:{},methods:{close:function(){this.bus.$emit("closeDialogControl1",this.selectedItem),this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.selectedControl={}},refresh:function(){var t=d(i.a.mark(function t(){var e,n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e={id:this.selectedItem.id},t.next=3,c.a.get("api/control_hoja_ruta/fill/"+JSON.stringify(e));case 3:n=t.sent,this.selectedItem=n.data,this.verificaPuesto();case 6:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),printItem:function(){var t=d(i.a.mark(function t(e){var n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c()({method:"GET",url:"api/guia_internacion/print/"+e.id,responseType:"arraybuffer"});case 3:n=t.sent,r=new Blob([n.data],{type:"application/pdf"}),printJS(window.URL.createObjectURL(r)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},verificaPuesto:function(){var t=d(i.a.mark(function t(){var e,n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:e=0;case 1:if(!(e<this.selectedItem.hoja_ruta.ruta.puestos_de_control.length)){t.next=10;break}return n={control_id:this.selectedItem.id,puesto_id:this.selectedItem.hoja_ruta.ruta.puestos_de_control[e].id},t.next=5,c.a.get("api/control_puesto/fill/"+JSON.stringify(n));case 5:t.sent.data.length>0?this.selectedItem.hoja_ruta.ruta.puestos_de_control[e].visitado=!0:this.selectedItem.hoja_ruta.ruta.puestos_de_control[e].visitado=!1;case 7:e++,t.next=1;break;case 10:this.puestosControl=this.selectedItem.hoja_ruta.ruta.puestos_de_control;case 11:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),terminado:function(){var t=d(i.a.mark(function t(e,n){var r,a,o;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:!1,r=[],a=0;case 3:if(!(a<n.length)){t.next=20;break}return o={control_id:e.id,puesto_id:n[a].id},t.next=7,c.a.get("api/control_puesto/fill/"+JSON.stringify(o));case 7:if(t.sent.data.length>0&&r.push(!0),!(r.length>=n.length)){t.next=17;break}return t.next=12,c.a.put("api/hoja_ruta/"+e.hoja_ruta.id,{estado:!0});case 12:this.bus.$emit("closeDialogRefresh",this.selectedItem),this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.selectedControl={};case 17:a++,t.next=3;break;case 20:case"end":return t.stop()}},t,this)}));return function(e,n){return t.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Puestos de control")])],1),t._v(" "),n("v-card-text",[t.puestosControl?n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.puestosControl,"rows-per-page-items":[5,10,20,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.direccion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[n("v-switch",{attrs:{disabled:""},model:{value:e.item.visitado,callback:function(n){t.$set(e.item,"visitado",n)},expression:"props.item.visitado"}})],1)])]}}],null,!1,2603976730)},[t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin Puestos de control.\n ")])],1)],2):t._e()],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cerrar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1085),n(1086),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{},props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},causasRetencion:[],departamentos:[],provincias:[],municipios:[],localidades:[],vehiculos:[],marcas:[],embarcaciones:[]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogRetener",function(e){t.dialog=!0,t.selectedIndex=e,t.selectedItem=e,t.getCorrelativo(),t.getCausasRetencion(),t.getDepartamentos(),t.getLocalidades(),t.getVehiculos(),t.getMarcas(),t.getEmbarcaciones()})},computed:{},watch:{},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.causasRetencion=[],this.departamentosRetencion=[],this.provincias=[],this.municipios=[],this.localidades=[],this.vehiculos=[],this.marcas=[],this.embarcaciones=[],this.$refs.form.reset(),this.bus.$emit("closeDialog")},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}return this.selectedItem.user_id=this.$store.getters["auth/user"].id,this.selectedItem.hoja_ruta_id=this.selectedItem.id,t.next=6,s.a.post("api/retencion",this.selectedItem);case 6:return t.sent,t.next=9,s.a.put("api/hoja_ruta/"+this.selectedItem.id,{retenido:!0});case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}));return function(){return t.apply(this,arguments)}}(),getCorrelativo:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/retencion/max/correlativo");case 2:e=t.sent,this.selectedItem.correlativo=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getCausasRetencion:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/causa_retencion");case 2:e=t.sent,this.causasRetencion=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getDepartamentos:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/departamento");case 2:e=t.sent,this.departamentos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getProvincias:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/provincia");case 2:e=t.sent,this.provincias=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getMunicipios:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/municipio");case 2:e=t.sent,this.municipios=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getLocalidades:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/localidad");case 2:e=t.sent,this.localidades=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getVehiculos:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/vehiculo");case 2:e=t.sent,this.vehiculos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getMarcas:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/marca");case 2:e=t.sent,this.marcas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getEmbarcaciones:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/embarcacion");case 2:e=t.sent,this.embarcaciones=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getLibras:function(){this.selectedItem.libras=50*this.selectedItem.numero_taques},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Retener")])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-autocomplete",{attrs:{items:t.causasRetencion,"item-text":"nombre","item-value":"id",label:"Causa de retención",multiple:"","small-chips":"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.causas,callback:function(e){t.$set(t.selectedItem,"causas",e)},expression:"selectedItem.causas"}}),t._v(" "),n("v-text-field",{attrs:{label:"Iniciales de embalaje",rules:[function(t){return!t||t.length<=15||"No mayor a 15 caracteres"}]},model:{value:t.selectedItem.inicial_embalaje,callback:function(e){t.$set(t.selectedItem,"inicial_embalaje",e)},expression:"selectedItem.inicial_embalaje"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.departamentos,"item-text":"nombre","item-value":"id",label:"Departamento",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.getProvincias()}},model:{value:t.selectedItem.departamento_id,callback:function(e){t.$set(t.selectedItem,"departamento_id",e)},expression:"selectedItem.departamento_id"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.provincias,"item-text":"nombre","item-value":"id",label:"Provincias",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.getMunicipios()}},model:{value:t.selectedItem.provincia_id,callback:function(e){t.$set(t.selectedItem,"provincia_id",e)},expression:"selectedItem.provincia_id"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.municipios,"item-text":"nombre","item-value":"id",label:"Municipios",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.municipio_id,callback:function(e){t.$set(t.selectedItem,"municipio_id",e)},expression:"selectedItem.municipio_id"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.localidades,"item-text":"nombre","item-value":"id",label:"Localidad",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.localidad_id,callback:function(e){t.$set(t.selectedItem,"localidad_id",e)},expression:"selectedItem.localidad_id"}}),t._v(" "),n("v-text-field",{attrs:{label:"Lugar",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=100||"No mayor a 100"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.lugar,callback:function(e){t.$set(t.selectedItem,"lugar",e)},expression:"selectedItem.lugar"}}),t._v(" "),n("v-textarea",{attrs:{label:"Descripción",rows:"2",hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}}),t._v(" "),n("v-text-field",{attrs:{label:"Numero de taques",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t<=100||"No mayor a 100"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{input:function(e){return t.getLibras()}},model:{value:t.selectedItem.numero_taques,callback:function(e){t.$set(t.selectedItem,"numero_taques",e)},expression:"selectedItem.numero_taques"}}),t._v(" "),n("v-text-field",{attrs:{label:"Libras",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t<=9999||"No mayor a 9999"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.libras,callback:function(e){t.$set(t.selectedItem,"libras",e)},expression:"selectedItem.libras"}}),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Placa de vehículo",rules:[function(t){return!t||t.length<=15||"No mayor a 15 caracteres"}]},model:{value:t.selectedItem.numero_placa,callback:function(e){t.$set(t.selectedItem,"numero_placa",e)},expression:"selectedItem.numero_placa"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-autocomplete",{staticClass:"mr-3",attrs:{items:t.marcas,"item-text":"nombre","item-value":"id",label:"Marca de vehículo"},model:{value:t.selectedItem.marca_id,callback:function(e){t.$set(t.selectedItem,"marca_id",e)},expression:"selectedItem.marca_id"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-autocomplete",{attrs:{items:t.vehiculos,"item-text":"nombre","item-value":"id",label:"Tipo de vehículo"},model:{value:t.selectedItem.vehiculo_id,callback:function(e){t.$set(t.selectedItem,"vehiculo_id",e)},expression:"selectedItem.vehiculo_id"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Numero de vuelo",rules:[function(t){return!t||t.length<=15||"No mayor a 15 caracteres"}]},model:{value:t.selectedItem.numero_vuelo,callback:function(e){t.$set(t.selectedItem,"numero_vuelo",e)},expression:"selectedItem.numero_vuelo"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Empresa de vuelo",rules:[function(t){return!t||t.length<=30||"No mayor a 30 caracteres"}]},model:{value:t.selectedItem.empresa_vuelo,callback:function(e){t.$set(t.selectedItem,"empresa_vuelo",e)},expression:"selectedItem.empresa_vuelo"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{attrs:{label:"Otros datos de vuelo",rules:[function(t){return!t||t.length<=100||"No mayor a 100 caracteres"}]},model:{value:t.selectedItem.otros_vuelo,callback:function(e){t.$set(t.selectedItem,"otros_vuelo",e)},expression:"selectedItem.otros_vuelo"}})],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{staticClass:"mr-3",attrs:{label:"Nombre de embarcación",rules:[function(t){return!t||t.length<=100||"No mayor a 100 caracteres"}]},model:{value:t.selectedItem.nombre_embarcacion,callback:function(e){t.$set(t.selectedItem,"nombre_embarcacion",e)},expression:"selectedItem.nombre_embarcacion"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-autocomplete",{staticClass:"mr-3",attrs:{items:t.embarcaciones,"item-text":"nombre","item-value":"id",label:"Tipo de embarcación"},model:{value:t.selectedItem.embarcacion_id,callback:function(e){t.$set(t.selectedItem,"embarcacion_id",e)},expression:"selectedItem.embarcacion_id"}})],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-text-field",{attrs:{label:"Numero de embarcación",rules:[function(t){return!t||t.length<=100||"No mayor a 100 caracteres"}]},model:{value:t.selectedItem.numero_embarcacion,callback:function(e){t.$set(t.selectedItem,"numero_embarcacion",e)},expression:"selectedItem.numero_embarcacion"}})],1)],1),t._v(" "),n("v-radio-group",{attrs:{row:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.responsable,callback:function(e){t.$set(t.selectedItem,"responsable",e)},expression:"selectedItem.responsable"}},[n("v-radio",{attrs:{label:"GECC",value:"GECC",color:"green"}}),t._v(" "),n("v-radio",{attrs:{label:"DIGCOIN",value:"DIGCOIN",color:"green"}})],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1088),n(1095),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(23),l=n.n(u),d=n(1089),f=n.n(d),h=n(382),p=(n.n(h),n(275)),m=n(42);n.n(m);function v(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}o.a.use(l.a),e.default={components:{ControlQr:f.a,WebCam:m.WebCam},props:["item","bus"],data:function(){return{dialog:!1,selectedIndex:-1,selectedItem:{},comercializadores:[],control_hoja_rutas:[],puestosControl:[],headers:[{text:"Correlativo",value:"hoja_ruta.correlativo",align:"center"},{text:"Nombre",value:"persona.primer_apellido",align:"center"},{text:"Carnet de identidad",value:"persona.carnet_identidad",align:"center"},{text:"Estado",align:"center",sortable:!1},{text:"Opciones",align:"center",sortable:!1}],headers2:[{text:"Nombre",value:"nombre",align:"center"},{text:"Dirección",value:"direccion",align:"center"},{text:"Estado",value:"Estado",align:"center"},{text:"Fecha y hora de visita",value:"created_at",align:"center"}],captures:[],imgReport:[],frontCam:!1,webcam:null,img:null,camera:null,deviceId:null,devices:[],faceMensaje:!1,descriptors:{desc1:null,desc2:null},reconocido:!1,threshold:.3,loading:!1,stat_face_rec:0,porcentajeReconocido:0,error:null}},created:function(){},mounted:function(){var t=this;this.bus.$on("closeDialogQr",function(e){t.selectedItem=e,t.close()}),this.getComercializadores(),this.loadModels()},computed:{},watch:{},methods:{loadModels:function(){var t=v(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="/models",t.next=3,p.f(e);case 3:return t.next=5,p.d(e);case 5:return t.next=7,p.e(e);case 7:return t.next=9,p.g.ssdMobilenetv1.loadFromUri("/models");case 9:return t.next=11,p.g.faceLandmark68Net.loadFromUri("/models");case 11:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.hojasRutas=[],this.control_hoja_rutas=[],this.puestosControl=[],this.bus.$emit("closeDialog"),this.reconocido=!1},imprimirItem:function(t){this.bus.$emit("openDialogImprimir",t)},controlQrItem:function(t){this.bus.$emit("openDialogQr",t)},getComercializadores:function(){var t=v(i.a.mark(function t(){var e,n,r,a;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e={tipo_persona_id:2},t.next=3,c.a.get("api/persona/fill/"+JSON.stringify(e));case 3:return n=t.sent,r={tipo_persona_id:3},t.next=7,c.a.get("api/persona/fill/"+JSON.stringify(r));case 7:a=t.sent,this.comercializadores=n.data.concat(a.data);case 9:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getControlHojaRuta:function(){var t=v(i.a.mark(function t(){var e,n,r,a,o,s;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e={persona_id:this.selectedItem.persona_id,estado:!1,control:!1},t.next=3,c.a.get("api/hoja_ruta/fill/"+JSON.stringify(e));case 3:if(!((n=t.sent).data.length>0)){t.next=21;break}return r={hoja_ruta_id:n.data[0].id},t.next=8,c.a.get("api/control_hoja_ruta/fill/"+JSON.stringify(r));case 8:a=t.sent,this.control_hoja_rutas=a.data,o=0;case 11:if(!(o<this.control_hoja_rutas[0].hoja_ruta.ruta.puestos_de_control.length)){t.next=20;break}return e={control_id:this.control_hoja_rutas[0].id,puesto_id:this.control_hoja_rutas[0].hoja_ruta.ruta.puestos_de_control[o].id},t.next=15,c.a.get("api/control_puesto/fill/"+JSON.stringify(e));case 15:(s=t.sent).data.length>0?(this.control_hoja_rutas[0].hoja_ruta.ruta.puestos_de_control[o].visitado=!0,this.control_hoja_rutas[0].hoja_ruta.ruta.puestos_de_control[o].fecha=s.data[0].created_at):(this.control_hoja_rutas[0].hoja_ruta.ruta.puestos_de_control[o].visitado=!1,this.control_hoja_rutas[0].hoja_ruta.ruta.puestos_de_control[o].fecha="No visitado");case 17:o++,t.next=11;break;case 20:this.puestosControl=this.control_hoja_rutas[0].hoja_ruta.ruta.puestos_de_control;case 21:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")},formatDateTime:function(t){return this.$moment(t).format("DD/MM/YYYY HH:mm")},onCapture:function(){var t=v(i.a.mark(function t(){var e,n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.loading=!0,this.faceMensaje=!1,this.descriptors={desc1:null,desc2:null},t.next=5,this.$refs.webcam.capture();case 5:return e=t.sent,t.next=8,c.a.post("api/upload/base64_image",{base64:e});case 8:return n=t.sent,this.onSelectionChanged(1,this.control_hoja_rutas[0].hoja_ruta.persona.fotografia),this.onSelectionChanged(2,n.data),this.updateResult(),t.next=14,c.a.post("api/upload/delete",{nombre:n.data});case 14:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),onSelectionChanged:function(){var t=v(i.a.mark(function t(e,n){var r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,p.c(n);case 2:return r=t.sent,this.$refs.prueba.src=r.src,t.next=7,p.a(r);case 7:this.descriptors["desc"+e]=t.sent;case 8:case"end":return t.stop()}},t,this)}));return function(e,n){return t.apply(this,arguments)}}(),updateResult:function(){if(null!=this.descriptors.desc2){var t=p.h(p.b(this.descriptors.desc1,this.descriptors.desc2));t>this.threshold?this.reconocido=!1:this.reconocido=!0,this.loading=!1,this.faceMensaje=!0,this.porcentajeReconocido=100-100*t}},onStarted:function(t){console.log("On Started Event",t)},onStopped:function(t){console.log("On Stopped Event",t)},onStop:function(){this.$refs.webcam.stop()},onStart:function(){this.$refs.webcam.start()},onError:function(t){console.log("On Error Event",t)},onCameras:function(t){this.devices=t,console.log("On Cameras Event",t)},onCameraChange:function(t){this.deviceId=t,this.camera=t,console.log("On Camera Change Event",t)},onInit:function(){var t=v(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e;case 3:t.next=8;break;case 5:t.prev=5,t.t0=t.catch(0),"NotAllowedError"===t.t0.name?this.error="ERROR: Necesita proporcionar permisos para usar la camara":"NotFoundError"===t.t0.name?this.error="ERROR: No existe una camara en este dispositivo":"NotSupportedError"===t.t0.name?this.error="ERROR: Se requiere un contexto de seguridad (HTTPS, localhost)":"NotReadableError"===t.t0.name?this.error="ERROR: La camara se encuentra en uso":"OverconstrainedError"===t.t0.name?this.error="ERROR: Las camaras no son compatibles":"StreamApiNotSupportedError"===t.t0.name&&(this.error="ERROR: La API no es soportada por su navegador");case 8:case"end":return t.stop()}},t,this,[[0,5]])}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1090),n(1094),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o),c=n(292),u=n(1091),l=n.n(u);function d(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{QrcodeStream:c.QrcodeStream,QrcodeDropZone:c.QrcodeDropZone,QrcodeCapture:c.QrcodeCapture,Guarda:l.a},props:["item","bus"],data:function(){return{result:"",error:"",selectedIndex:-1,selectedItem:{},dialog:!1,control_hoja_ruta:null,permiso:!0,habilitado:!0,usuario:null}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogQr",function(e){t.dialog=!0,t.selectedIndex=e,t.selectedItem=e,t.habilitar()}),this.bus.$on("closeDialogGuarda",function(e){t.terminado(t.control_hoja_ruta,t.control_hoja_ruta.hoja_ruta.ruta.puestos_de_control),t.close()})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar"}},watch:{},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.bus.$emit("closeDialogQr"),this.control_hoja_ruta=null},guarda:function(t){console.log(this.control_hoja_ruta);var e={control_id:t.id,puesto_id:t.puesto.id,user_id:this.$store.getters["auth/user"].id,hoja_ruta_id:this.control_hoja_ruta.hoja_ruta_id};this.bus.$emit("openDialogGuarda",e)},save:function(){var t=d(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form2.validate()){t.next=13;break}if(this.selectedItem.user_id=this.$store.getters["auth/user"].id,-1==this.selectedIndex){t.next=8;break}return t.next=6,s.a.put("api/guia_internacion/"+this.selectedItem.id,this.selectedItem);case 6:t.next=11;break;case 8:return this.selectedItem.id_guia_internacion=this.selectedItem.correlativo,t.next=11,s.a.post("api/guia_internacion",this.selectedItem);case 11:this.$toast.success("Correcto."),this.close();case 13:t.next=18;break;case 15:t.prev=15,t.t0=t.catch(0),console.log(t.t0);case 18:case"end":return t.stop()}},t,this,[[0,15]])}));return function(){return t.apply(this,arguments)}}(),nextStep:function(){switch(this.step){case 1:this.$refs.form1.validate()&&(this.step=2)}},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")},onDecode:function(t){this.getControlHojaRuta(t)},onInit:function(){var t=d(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e;case 3:t.next=8;break;case 5:t.prev=5,t.t0=t.catch(0),"NotAllowedError"===t.t0.name?this.error="ERROR: Necesita proporcionar permisos para usar la camara":"NotFoundError"===t.t0.name?this.error="ERROR: No existe una camara en este dispositivo":"NotSupportedError"===t.t0.name?this.error="ERROR: Se requiere un contexto de seguridad (HTTPS, localhost)":"NotReadableError"===t.t0.name?this.error="ERROR: La camara se encuentra en uso":"OverconstrainedError"===t.t0.name?this.error="ERROR: Las camaras no son compatibles":"StreamApiNotSupportedError"===t.t0.name&&(this.error="ERROR: La API no es soportada por su navegador");case 8:case"end":return t.stop()}},t,this,[[0,5]])}));return function(e){return t.apply(this,arguments)}}(),getControlHojaRuta:function(){var t=d(i.a.mark(function t(e){var n,r,a,o,c,u,l,d,f,h;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n={persona_id:this.selectedItem.persona_id,estado:!1,control:!1,retenido:!1},t.next=3,s.a.get("api/hoja_ruta/fill/"+JSON.stringify(n));case 3:if(!((r=t.sent).data.length>0)){t.next=45;break}return a={hoja_ruta_id:r.data[0].id},t.next=8,s.a.get("api/control_hoja_ruta/fill/"+JSON.stringify(a));case 8:o=t.sent,c=!0,u=!1,l=void 0,t.prev=12,d=o.data[0].hoja_ruta.ruta.puestos_de_control[Symbol.iterator]();case 14:if(c=(f=d.next()).done){t.next=28;break}if(h=f.value,btoa(h.nombre+o.data[0].hoja_ruta.correlativo+o.data[0].hoja_ruta.persona.carnet_identidad+o.data[0].hoja_ruta.persona.nombre+o.data[0].hoja_ruta.persona.primer_apellido)!=e){t.next=25;break}return this.control_hoja_ruta=o.data[0],this.control_hoja_ruta.puesto=h,t.next=22,s.a.get("api/control_puesto/fill/"+JSON.stringify({control_id:this.control_hoja_ruta.id,puesto_id:h.id}));case 22:return t.sent.data.length>0?this.permiso=!0:this.permiso=!1,t.abrupt("return",this.control_hoja_ruta);case 25:c=!0,t.next=14;break;case 28:t.next=34;break;case 30:t.prev=30,t.t0=t.catch(12),u=!0,l=t.t0;case 34:t.prev=34,t.prev=35,!c&&d.return&&d.return();case 37:if(t.prev=37,!u){t.next=40;break}throw l;case 40:return t.finish(37);case 41:return t.finish(34);case 42:return t.abrupt("return",this.control_hoja_ruta=null);case 45:this.control_hoja_ruta=null;case 46:case"end":return t.stop()}},t,this,[[12,30,34,42],[35,,37,41]])}));return function(e){return t.apply(this,arguments)}}(),terminado:function(){var t=d(i.a.mark(function t(e,n){var r,a,o;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:!1,r=[],a=0;case 3:if(!(a<n.length)){t.next=16;break}return o={control_id:e.id,puesto_id:n[a].id},t.next=7,s.a.get("api/control_puesto/fill/"+JSON.stringify(o));case 7:if(t.sent.data.length>0&&r.push(!0),!(r.length>=n.length)){t.next=13;break}return t.next=12,s.a.put("api/hoja_ruta/"+e.hoja_ruta.id,{estado:!0});case 12:this.close();case 13:a++,t.next=3;break;case 16:case"end":return t.stop()}},t,this)}));return function(e,n){return t.apply(this,arguments)}}(),habilitar:function(){var t=d(i.a.mark(function t(){var e,n,r,a,o;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e={persona_id:this.selectedItem.persona_id,estado:!1,control:!1,retenido:!1},t.next=3,s.a.get("api/hoja_ruta/fill/"+JSON.stringify(e));case 3:if(!((n=t.sent).data.length>0)){t.next=16;break}return r={hoja_ruta_id:n.data[0].id},t.next=8,s.a.get("api/control_hoja_ruta/fill/"+JSON.stringify(r));case 8:return a=t.sent,o={control_id:a.data[0].id,user_id:this.$store.getters["auth/user"].id},t.next=12,s.a.get("api/control_puesto/fill/"+JSON.stringify(o));case 12:t.sent.data.length>0?(this.habilitado=!1,this.usuario=this.$store.getters["auth/user"]):this.habilitado=!0,t.next=17;break;case 16:return t.abrupt("return",this.habilitado=!0);case 17:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1092),n(1093),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(23),l=n.n(u);o.a.use(l.a),e.default={components:{},props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},selectedControl:{},options:{url:"api/upload",headers:c.a.defaults.headers.common,paramName:"file",uploadMultiple:!1,acceptedFiles:{extensions:["application/pdf"],message:"Formato no permitido."},maxFiles:1},fileCesar:null}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogGuarda",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e})},computed:{},watch:{},methods:{close:function(){this.bus.$emit("closeDialogGuarda",this.selectedItem),this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.selectedControl={},this.fileCesar=null},save:function(){var t,e=(t=i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,this.selectedItem.user_id=this.$store.getters["auth/user"].id,t.next=4,c.a.post("api/"+this.selectedItem.hoja_ruta_id+"/control_puesto",this.selectedItem);case 4:t.sent,this.$toast.success("Correcto."),this.selectedItem=!0,this.close(),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),console.log(t.t0);case 13:case"end":return t.stop()}},t,this,[[0,10]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}(),cancelar:function(){this.selectedItem=!1,this.close()}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"400px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Iniciar control")])],1),t._v(" "),n("v-card-text",[t._v(" \n Esta a punto de guardar el puesto de control como visitado, esta acción es irreversible y no podra editar ni cambiar a futuro.\n ")]),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Marcar Puesto de control")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"500px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("Guarda",{attrs:{bus:t.bus}}),t._v(" "),n("v-card-text",[n("v-flex",[n("p",{staticClass:"error"},[t._v(t._s(t.error))]),t._v(" "),n("p",{staticClass:"decode-result"},[n("b",[t._v("Enfoque con la cámara el codigo QR de la hoja de ruta correspondiente")])]),t._v(" "),t.dialog&&1==t.habilitado?n("qrcode-stream",{on:{decode:t.onDecode,init:t.onInit}}):t._e(),t._v(" "),0==t.habilitado?n("span",[t._v("Ya se controló esta hoja de ruta por el funcionario "+t._s(t.usuario.name)+" "+t._s(t.usuario.last_name)+" "+t._s(t.usuario.mothers_last_name)+" ")]):t._e()],1),t._v(" "),t.control_hoja_ruta?n("v-flex",[n("v-card",[n("v-flex",[n("p",[t._v("Correlativo de la hoja de ruta: "+t._s(t.control_hoja_ruta.hoja_ruta.correlativo))]),t._v(" "),n("p",[t._v("Carnet de identidad de la persona: "+t._s(t.control_hoja_ruta.hoja_ruta.persona.carnet_identidad))]),t._v(" "),n("p",[t._v("Nombre de la persona: "+t._s(t.control_hoja_ruta.hoja_ruta.persona.nombre)+" "+t._s(t.control_hoja_ruta.hoja_ruta.persona.primer_apellido)+" "+t._s(t.control_hoja_ruta.hoja_ruta.persona.segundo_apellido))]),t._v(" "),n("p",[t._v("Puesto de control: "+t._s(t.control_hoja_ruta.puesto.nombre))]),t._v(" "),n("p",[t._v("Dirección puesto de control: "+t._s(t.control_hoja_ruta.puesto.direccion))])])],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),t.permiso?t._e():n("v-btn",{attrs:{color:"success",small:""},nativeOn:{click:function(e){return t.guarda(t.control_hoja_ruta)}}},[n("v-icon",[t._v("check")]),t._v(" Marcar como visitado")],1),t._v(" "),t.permiso?n("v-btn",{attrs:{color:"error",small:""}},[n("v-icon",[t._v("close")]),t._v(" Ya se visitó el puesto de control")],1):t._e()],1)],1):t._e()],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cerrar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("room")]),t._v(" "),n("span",[t._v("Marcar puesto de control")])],1),t._v(" "),n("ControlQr",{attrs:{bus:t.bus}}),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Identificar comercializador")])],1),t._v(" "),n("v-card-text",[n("v-autocomplete",{attrs:{items:t.comercializadores,"item-text":"carnet_identidad","item-value":"id",label:"Carnet de identidad",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.getControlHojaRuta()}},model:{value:t.selectedItem.persona_id,callback:function(e){t.$set(t.selectedItem,"persona_id",e)},expression:"selectedItem.persona_id"}}),t._v(" "),t.control_hoja_rutas.length>0&&0==t.reconocido?n("v-layout",{attrs:{xs12:""}},[n("v-flex",{attrs:{xs7:""}},[n("WebCam",{ref:"webcam",attrs:{width:"100%",height:"auto"}})],1),t._v(" "),n("v-flex",{attrs:{xs5:""}},[n("v-btn",{attrs:{color:"indigo"},on:{"&click":function(e){return t.onCapture()}}},[n("v-icon",[t._v("face")]),t._v(" Reconocer rostro\n ")],1),t._v(" "),n("v-avatar",{staticStyle:{display:"none"},attrs:{tile:"tile",size:"auto",color:"grey lighten-4"}},[n("img",{ref:"prueba",attrs:{src:t.img}})]),t._v(" "),t.loading?n("v-progress-circular",{attrs:{indeterminate:"",color:"info"}}):t._e(),t._v(" "),t.faceMensaje?n("span",[n("v-alert",{attrs:{value:t.reconocido,color:"primary",icon:"check"}},[t._v("\n Identificado correctamente. "+t._s(t.porcentajeReconocido)+" %\n ")]),t._v(" "),n("v-alert",{attrs:{value:!t.reconocido,color:"warning",icon:"close"}},[t._v("\n Intente nuevamente. No se pudo reconocer el rostro.!\n ")])],1):t._e()],1)],1):t._e(),t._v(" "),1==t.reconocido?n("v-btn",{attrs:{xs3:"",color:"success"}},[t._v(" Rostro identificado exitosamente"),n("v-icon",[t._v("check")])],1):t._e(),t._v(" "),1==t.reconocido?n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.control_hoja_rutas,"rows-per-page-items":[5,10,20,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.hoja_ruta.correlativo)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.fullName(e.item.hoja_ruta.persona))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.hoja_ruta.persona.carnet_identidad+" "+e.item.hoja_ruta.persona.departamento_extension.sigla)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[0==e.item.hoja_ruta.estado?n("v-chip",{attrs:{color:"success","text-color":"white"}},[t._v("En curso")]):t._e(),t._v(" "),1==e.item.hoja_ruta.estado?n("v-chip",{attrs:{color:"green","text-color":"white"}},[t._v("Terminado")]):t._e()],1),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(e){return t.controlQrItem(t.selectedItem)}},slot:"activator"},[n("v-icon",[t._v("control_camera")])],1),t._v(" "),n("span",[t._v("Control")])],1)],1)])]}},{key:"expand",fn:function(e){return[n("v-card",[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.hoja_ruta.persona.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[t.puestosControl?n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers2,items:t.puestosControl,"rows-per-page-items":[5,10,20,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.direccion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[n("v-switch",{attrs:{readonly:""},model:{value:e.item.visitado,callback:function(n){t.$set(e.item,"visitado",n)},expression:"props.item.visitado"}})],1),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.fecha)+" ")])])]}}],null,!0)},[t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin Puestos de control.\n ")])],1)],2):t._e()],1)],1)],1)],1)]}}],null,!1,1425193107)},[t._v(" "),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin Hojas de ruta.\n ")])],1)],2):t._e()],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Control de hojas de ruta")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Qr",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}}),t._v(" "),n("Control",{attrs:{bus:t.bus}}),t._v(" "),n("Retener",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.hoja_ruta.correlativo)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.fullName(e.item.hoja_ruta.persona))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.hoja_ruta.persona.carnet_identidad+" "+e.item.hoja_ruta.persona.departamento_extension.sigla)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.hoja_ruta.codigo_comercializador)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[0==e.item.hoja_ruta.estado?n("v-chip",{attrs:{color:"success","text-color":"white"}},[t._v("En curso")]):t._e(),t._v(" "),1==e.item.hoja_ruta.estado?n("v-chip",{attrs:{color:"error","text-color":"white"}},[t._v("Terminado")]):t._e()],1),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[0==e.item.hoja_ruta.retenido?n("v-chip",{attrs:{color:"success","text-color":"white"}},[t._v("No retenido ")]):t._e(),t._v(" "),1==e.item.hoja_ruta.retenido?n("v-chip",{attrs:{color:"error","text-color":"white"}},[t._v("Retenido")]):t._e()],1),t._v(" "),n("td",{staticClass:"justify-center layout"},[0==e.item.hoja_ruta.estado&&0==e.item.hoja_ruta.retenido?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.controlItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("where_to_vote")])],1),t._v(" "),n("span",[t._v("Estado de puestos de control")])],1):t._e(),t._v(" "),n("v-tooltip",{attrs:{top:""}},[0==e.item.hoja_ruta.retenido?n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.retenerItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("backspace")])],1):t._e(),t._v(" "),n("span",[t._v("Retener")])],1)],1)])]}},{key:"expand",fn:function(e){return[n("v-card",[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs2:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.hoja_ruta.persona.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs5:""}},[n("table",[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Numero de taques: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.hoja_ruta.taques))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Dirección de Puesto: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.hoja_ruta.puesto_venta.mercado))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Procedencia: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.hoja_ruta.procedencia.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Conductor: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.hoja_ruta.nombre_conductor))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Vehiculo: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.hoja_ruta.vehiculo?e.item.hoja_ruta.vehiculo.nombre:""))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Marca: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.hoja_ruta.vehiculo?e.item.hoja_ruta.marca.nombre:""))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Color: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.hoja_ruta.color))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Número de placa: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.hoja_ruta.numero_placa))])])])]),t._v(" "),n("v-flex",{attrs:{xs5:""}},[e.item.decomisado?n("table",[n("caption",[n("v-chip",{attrs:{color:"primary","text-color":"white"}},[t._v("Decomisado")])],1),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("ID Retencion: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.decomiso_retencion.id_retencion))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Nombre: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.fullName(e.item.decomiso_retencion)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Carnet de productor: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.decomiso_retencion.carnet_productor))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Iniciales de embalaje productor: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.decomiso_retencion.iniciales_embalaje_productor))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Iniciales de embalaje comercializador: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.decomiso_retencion.iniciales_embalaje_comercializador))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Causa de retención: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.decomiso_retencion.causa_retencion.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Lugar: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.decomiso_retencion.lugar))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha y hora: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDateTime(e.item.decomiso_retencion.fecha_hora)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Localidad: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.decomiso_retencion.localidad.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Departamento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.decomiso_retencion.departamento.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Provincia: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.decomiso_retencion.provincia.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Municipio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.decomiso_retencion.municipio.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Descripción del hecho: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.decomiso_retencion.descripcion_hecho))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Cantidad de taques/bultos: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.decomiso_retencion.cantidad_taques_bultos))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Libras: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.decomiso_retencion.libras))])]),t._v(" "),e.item.decomiso_retencion.vehiculo_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Vehículo: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.decomiso_retencion.vehiculo.nombre))])]):t._e(),t._v(" "),e.item.decomiso_retencion.marca_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Marca de vehículo: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.decomiso_retencion.marca.nombre))])]):t._e(),t._v(" "),e.item.decomiso_retencion.vehiculo_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Placa de vehículo: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.decomiso_retencion.terrestre_placa))])]):t._e(),t._v(" "),e.item.decomiso_retencion.vehiculo_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Empresa aerea: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.decomiso_retencion.aereo_empresa))])]):t._e(),t._v(" "),e.item.decomiso_retencion.vehiculo_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Número de vuelo: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.decomiso_retencion.aereo_numero_vuelo))])]):t._e(),t._v(" "),e.item.decomiso_retencion.vehiculo_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Otros datos del vuelo: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.decomiso_retencion.aereo_otros))])]):t._e(),t._v(" "),e.item.decomiso_retencion.embarcacion_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Embarcación: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.decomiso_retencion.embarcacion.nombre))])]):t._e(),t._v(" "),e.item.decomiso_retencion.embarcacion_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Nombre de embarcacion: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.decomiso_retencion.fluvial_nombre_embarcacion))])]):t._e(),t._v(" "),e.item.decomiso_retencion.embarcacion_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Registro de embarcacion: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.decomiso_retencion.fluvial_numero_registro))])]):t._e(),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Responsable: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.decomiso_retencion.responsable.nombre))])])]):t._e()])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1098),n(1110),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1099),f=n.n(d),h=n(1102),p=n.n(h),m=n(1105),v=n.n(m);function _(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a,FormCon:p.a,FormEval:v.a},data:function(){return{bus:new o.a,headers:[{text:"Fecha",value:"fecha_capacitacion",align:"center"},{text:"Tipo",value:"tipo_actividad",align:"center"},{text:"Responsable",value:"responsable_nombre",align:"center"},{text:"Presupuesto",value:"presupuesto",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],searchval:"",cancelSource:null}},computed:{},watch:{searchval:function(t){t&&t!==this.search&&this.getCapacitaciones(t)}},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getCapacitaciones:function(t){var e=this;t.length<3||(this.cancelSearch(),this.cancelSource=c.a.CancelToken.source(),c.a.get("api/capacitaciones/fullsearch?search="+t,{cancelToken:this.cancelSource.token}).then(function(t){e.table=t.data}))},cancelSearch:function(){this.cancelSource&&this.cancelSource.cancel("canceled search")},getTable:function(){var t=_(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/capacitaciones");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),ConcluirItem:function(t){this.bus.$emit("openDialogConcluir",t)},EvaluarItem:function(t){this.bus.$emit("openDialogEvaluar",t)},editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=_(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/capacitaciones/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e,n){var r=n(0)(n(1100),n(1101),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={props:["item","bus"],data:function(){return{loading:!1,search:null,valid:!0,menu:null,dialog:!1,selectedIndex:-1,selectedItem:{},error:"",proyectos:[],cancelSouce:null,capacitacion_date:null,capacitacion_date_formatted:null}},watch:{search:function(t){t&&t!==this.select&&this.getProyectos(t)},capacitacion_date:function(t){this.selectedItem.fecha_capacitacion=t,this.capacitacion_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.selectedItem=e,t.capacitacion_date_formatted=t.$moment(e.fecha_capacitacion).format("DD/MM/YYYY"),t.dialog=!0,t.selectedIndex=e})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},getProyectos:function(t){var e=this;t.length<3||(this.cancelSearch(),this.cancelSouce=s.a.CancelToken.source(),s.a.get("api/proyectos/search?arg="+t,{cancelToken:this.cancelSouce.token}).then(function(t){e.proyectos=t.data}))},cancelSearch:function(){this.cancelSource&&this.cancelSouce.cancel("Start new search")},save:function(){var t,e=(t=i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/capacitaciones/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/capacitaciones",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de Capacitacion","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.capacitacion_date_formatted,callback:function(e){t.capacitacion_date_formatted=e},expression:"capacitacion_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"es-bo"},on:{input:function(e){t.menu=!1}},model:{value:t.capacitacion_date,callback:function(e){t.capacitacion_date=e},expression:"capacitacion_date"}})],1),t._v(" "),n("v-text-field",{attrs:{label:"Tipo de Actividad",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},model:{value:t.selectedItem.tipo_actividad,callback:function(e){t.$set(t.selectedItem,"tipo_actividad",e)},expression:"selectedItem.tipo_actividad"}}),t._v(" "),n("v-text-field",{attrs:{label:"Organizacion",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.organizacion,callback:function(e){t.$set(t.selectedItem,"organizacion",e)},expression:"selectedItem.organizacion"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Responsable",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.responsable_nombre,callback:function(e){t.$set(t.selectedItem,"responsable_nombre",e)},expression:"selectedItem.responsable_nombre"}}),t._v(" "),n("v-text-field",{attrs:{label:"Presupuesto",type:"number",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.presupuesto,callback:function(e){t.$set(t.selectedItem,"presupuesto",e)},expression:"selectedItem.presupuesto"}}),t._v(" "),n("v-autocomplete",{attrs:{label:"Nombre del proyecto",loading:t.loading,items:t.proyectos,"search-input":t.search,"item-text":"nombre","item-value":"id",rules:[function(t){return!!t||"Requerido"}]},on:{"update:searchInput":function(e){t.search=e},"update:search-input":function(e){t.search=e}},model:{value:t.selectedItem.proyecto_id,callback:function(e){t.$set(t.selectedItem,"proyecto_id",e)},expression:"selectedItem.proyecto_id"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1103),n(1104),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={props:["item","bus"],data:function(){return{valid:!0,menu:null,dialog:!1,selectedIndex:-1,selectedItem:{},error:""}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogConcluir",function(e){t.selectedItem.capacitacion_id=e.id,t.dialog=!0})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t,e=(t=i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/capacitaciones/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/capacitaciones/"+this.selectedItem.capacitacion_id+"/concluir",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de conclusion","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.selectedItem.fecha_conclusion,callback:function(e){t.$set(t.selectedItem,"fecha_conclusion",e)},expression:"selectedItem.fecha_conclusion"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":""},on:{input:function(e){t.menu=!1}},model:{value:t.selectedItem.fecha_conclusion,callback:function(e){t.$set(t.selectedItem,"fecha_conclusion",e)},expression:"selectedItem.fecha_conclusion"}})],1),t._v(" "),n("v-textarea",{attrs:{label:"Informe",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},model:{value:t.selectedItem.informe,callback:function(e){t.$set(t.selectedItem,"informe",e)},expression:"selectedItem.informe"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Presupuesto ejecutado",type:"number",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.presupuesto_ejecutado,callback:function(e){t.$set(t.selectedItem,"presupuesto_ejecutado",e)},expression:"selectedItem.presupuesto_ejecutado"}}),t._v(" "),n("v-textarea",{attrs:{label:"Observaciones",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.observaciones,callback:function(e){t.$set(t.selectedItem,"observaciones",e)},expression:"selectedItem.observaciones"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1108),n(1109),!1,function(t){n(1106)},null,null);t.exports=r.exports},function(t,e,n){var r=n(1107);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n(85)("eff4ac32",r,!0,{})},function(t,e,n){(t.exports=n(55)(!1)).push([t.i,".dropbox{outline:2px dashed grey;outline-offset:-10px;background:#e0ffff;color:dimgray;padding:10px;min-height:200px;position:relative;cursor:pointer}.input-file{opacity:0;width:100%;height:200px;position:absolute;cursor:pointer}.dropbox:hover{background:#add8e6}.dropbox p{font-size:1.2em;text-align:center;padding:50px 0}",""])},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={props:["item","bus"],data:function(){return{valid:!0,menu:null,dialog:!1,selectedIndex:-1,selectedItem:{},error:"",uploadFieldName:"photos",currentStatus:null,filesUpload:[]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogEvaluar",function(e){t.filesUpload=[],t.selectedItem.capacitacion_id=e.id,t.dialog=!0})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "},isInitial:function(){return 0===this.currentStatus},isSaving:function(){return 1===this.currentStatus},isSuccess:function(){return 2===this.currentStatus},isFailed:function(){return 3===this.currentStatus}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t,e=(t=i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=13;break}if(this.selectedItem.images=this.filesUpload,console.log(this.selectedItem),-1==this.selectedIndex){t.next=9;break}return t.next=7,s.a.put("api/capacitaciones/"+this.selectedItem.id,this.selectedItem);case 7:t.next=11;break;case 9:return t.next=11,s.a.post("api/capacitaciones/"+this.selectedItem.capacitacion_id+"/evaluar",this.selectedItem);case 11:this.$toast.success("Correcto."),this.close();case 13:t.next=18;break;case 15:t.prev=15,t.t0=t.catch(0),console.log(t.t0);case 18:case"end":return t.stop()}},t,this,[[0,15]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}(),filesChange:function(t,e){var n=this;this.filesUpload=[],Array.from(Array(e.length).keys()).map(function(t){var r=e[t],i=new FileReader;i.onload=n.fileOnload,i.readAsDataURL(r)})},fileOnload:function(t){this.filesUpload.push({fileName:"image"+this.filesUpload.length,src:t.target.result})}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de Evaluacion","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.selectedItem.fecha_evaluacion,callback:function(e){t.$set(t.selectedItem,"fecha_evaluacion",e)},expression:"selectedItem.fecha_evaluacion"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":""},on:{input:function(e){t.menu=!1}},model:{value:t.selectedItem.fecha_evaluacion,callback:function(e){t.$set(t.selectedItem,"fecha_evaluacion",e)},expression:"selectedItem.fecha_evaluacion"}})],1),t._v(" "),n("v-textarea",{attrs:{label:"Informe",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},model:{value:t.selectedItem.informe,callback:function(e){t.$set(t.selectedItem,"informe",e)},expression:"selectedItem.informe"}}),t._v(" "),n("v-textarea",{attrs:{label:"Observaciones",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.observaciones,callback:function(e){t.$set(t.selectedItem,"observaciones",e)},expression:"selectedItem.observaciones"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card",[n("v-container",{attrs:{"grid-list-sm":"",fluid:""}},[n("v-layout",{attrs:{row:"",wrap:""}},[0==t.filesUpload.length?n("div",{staticClass:"dropbox"},[n("input",{staticClass:"input-file",attrs:{type:"file",multiple:"",name:t.uploadFieldName,disabled:t.isSaving,accept:"image/*"},on:{change:function(e){t.filesChange(e.target.name,e.target.files),t.fileCount=e.target.files.length}}}),t._v(" "),n("p",[t._v("\n arrastre sus archivos aqui"),n("br"),t._v(" or click to browse\n ")])]):t._e(),t._v(" "),t._l(t.filesUpload,function(e){return n("v-flex",{key:e.fileName,attrs:{xs4:"","d-flex":""}},[n("v-card",{staticClass:"d-flex",attrs:{flat:"",tile:""}},[n("v-img",{staticClass:"grey lighten-2",attrs:{src:e.src,"aspect-ratio":"1"},scopedSlots:t._u([{key:"placeholder",fn:function(){return[n("v-layout",{attrs:{"fill-height":"","align-center":"","justify-center":"","ma-0":""}},[n("v-progress-circular",{attrs:{indeterminate:"",color:"grey lighten-5"}})],1)]},proxy:!0}],null,!0)})],1)],1)})],2)],1)],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Capacitaciones")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.searchval,callback:function(e){t.searchval=e},expression:"searchval"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}}),t._v(" "),n("FormCon",{attrs:{bus:t.bus}}),t._v(" "),n("FormEval",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(t.formatDate(e.item.fecha_capacitacion))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.tipo_actividad)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.responsable_nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.presupuesto)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-btn",{attrs:{slot:"activator",disabled:null!=e.item.evaluacion_id,flat:"",icon:"",color:"primary"},on:{click:function(n){return t.EvaluarItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("present_to_all")])],1),t._v(" "),n("span",[t._v("Evaluacion")])],1),t._v(" "),n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-btn",{attrs:{slot:"activator",disabled:null!=e.item.conclusion_id,flat:"",icon:"",color:"primary"},on:{click:function(n){return t.ConcluirItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("widgets")])],1),t._v(" "),n("span",[t._v("Conclusion")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.searchval)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1112),n(1116),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1113),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{Form:f.a,RemoveItem:l.a},data:function(){return{bus:new o.a,headers:[{text:"Tipo Convocatoria",value:"tipo_convocatoria.nombre",align:"center"},{text:"Fecha Inicio",value:"fecha_inicio",align:"center"},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()}),this.bus.$on("closeDialogForm",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/convocatoria/fill/"+JSON.stringify({tipo_proyecto:2}));case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialogForm",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/convocatoria/"+e.id),this.getTable();case 2:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e,n){var r=n(0)(n(1114),n(1115),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},convocatorias:[],fecha_date:null,fecha_date2:null,fecha_date_formatted:null,fecha_date_formatted2:null,menu:null,menu2:null,error:""}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogForm",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e,t.fecha_date_formatted=t.$moment().format("DD/MM/YYYY"),t.fecha_date_formatted2=t.$moment().format("DD/MM/YYYY"),t.getTipoConvocatoria()}),this.getTipoConvocatoria()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},watch:{fecha_date:function(t){this.selectedItem.fecha_inicio=t,this.fecha_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")},fecha_date2:function(t){this.selectedItem.fecha_fin=t,this.fecha_date_formatted2=this.$moment(t).format("DD/MM/YYYY")}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialogForm"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=12;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/convocatoria/"+this.selectedItem.id,this.selectedItem);case 5:t.next=10;break;case 7:return this.selectedItem.tipo_proyecto=2,t.next=10,s.a.post("api/convocatoria",this.selectedItem);case 10:this.$toast.success("Correcto."),this.close();case 12:t.next=17;break;case 14:t.prev=14,t.t0=t.catch(0),console.log(t.t0);case 17:case"end":return t.stop()}},t,this,[[0,14]])}));return function(){return t.apply(this,arguments)}}(),getTipoConvocatoria:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/tipo_convocatoria");case 2:e=t.sent,this.convocatorias=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Crear Convocatoria")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Codigo Referencia",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=15||"No mayor a 15 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},model:{value:t.selectedItem.codigo_referencia,callback:function(e){t.$set(t.selectedItem,"codigo_referencia",e)},expression:"selectedItem.codigo_referencia"}}),t._v(" "),n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha Inicio","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.fecha_date_formatted,callback:function(e){t.fecha_date_formatted=e},expression:"fecha_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"es-bo"},on:{input:function(e){t.menu=!1}},model:{value:t.fecha_date,callback:function(e){t.fecha_date=e},expression:"fecha_date"}})],1),t._v(" "),n("v-card-text",[n("v-textarea",{attrs:{label:"Terminos de Referencia",hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.terminos_referencia,callback:function(e){t.$set(t.selectedItem,"terminos_referencia",e)},expression:"selectedItem.terminos_referencia"}})],1)],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.convocatorias,"item-text":"nombre","item-value":"id",label:"Tipo de Convocatoria",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.tipo_convocatoria_id,callback:function(e){t.$set(t.selectedItem,"tipo_convocatoria_id",e)},expression:"selectedItem.tipo_convocatoria_id"}}),t._v(" "),n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu2,callback:function(e){t.menu2=e},expression:"menu2"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha Finalizacion","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.fecha_date_formatted2,callback:function(e){t.fecha_date_formatted2=e},expression:"fecha_date_formatted2"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"es-bo"},on:{input:function(e){t.menu2=!1}},model:{value:t.fecha_date2,callback:function(e){t.fecha_date2=e},expression:"fecha_date2"}})],1),t._v(" "),n("v-card-text",[n("v-textarea",{attrs:{label:"Indicaciones Calificables",hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.indicaciones_calificables,callback:function(e){t.$set(t.selectedItem,"indicaciones_calificables",e)},expression:"selectedItem.indicaciones_calificables"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Convocatorias para OII")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.tipo_convocatoria.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.formatDate(e.item.fecha_inicio))+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{staticClass:"justify-center layout",attrs:{xs12:""}},[n("h2",[t._v("Convocatoria")])]),t._v(" "),n("v-flex",{attrs:{xs12:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Código referencia : ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.codigo_referencia))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Indicaciones calificables: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.indicaciones_calificables))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha inicio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.fecha_inicio)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha final: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.fecha_fin)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Terminos de referencia : ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.terminos_referencia))])])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1118),n(1122),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1119),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre",value:"nombre",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/proyecto");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/proyecto/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e,n){var r=n(0)(n(1120),n(1121),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},municipios:[],convocatorias:[]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e}),this.getMunicipios(),this.getConvocatorias()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/proyecto/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/proyecto",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}));return function(){return t.apply(this,arguments)}}(),getMunicipios:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/municipio");case 2:e=t.sent,this.municipios=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getConvocatorias:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/convocatoria");case 2:e=t.sent,this.convocatorias=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-select",{attrs:{items:t.municipios,"item-value":"id","item-text":"nombre",label:"Municipio",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>"},model:{value:t.selectedItem.municipio_id,callback:function(e){t.$set(t.selectedItem,"municipio_id",e)},expression:"selectedItem.municipio_id"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.convocatorias,"item-text":"codigo_referencia","item-value":"id",label:"Convocatoria"},model:{value:t.selectedItem.convocatoria_id,callback:function(e){t.$set(t.selectedItem,"convocatoria_id",e)},expression:"selectedItem.convocatoria_id"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Proyectos")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{staticClass:"justify-center layout",attrs:{xs12:""}},[n("h2",[t._v("Convocatoria")])]),t._v(" "),n("v-flex",{attrs:{xs12:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Código referencia : ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.convocatoria.codigo_referencia))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Indicaciones calificables: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.convocatoria.indicaciones_calificables))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha inicio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.convocatoria.fecha_inicio)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha final: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.convocatoria.fecha_fin)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Terminos de referencia : ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.convocatoria.terminos_referencia))])])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1124),n(1128),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1125),f=n.n(d),h=n(48);n.n(h);function p(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Codigo Solicitud",value:"codigo_solicitud",align:"center"},{text:"Razón Social",value:"razon_social",align:"center"},{text:"Fecha Recepción",value:"fecha_recepcion",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()}),this.bus.$on("closeDialogForm",function(){t.getTable()})},methods:{getTable:function(){var t=p(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/solicitud");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=p(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/solicitud/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),printItem:function(){var t=p(i.a.mark(function t(e){var n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c()({method:"GET",url:"api/solicitud/print/"+e.id,responseType:"arraybuffer"});case 3:n=t.sent,r=new Blob([n.data],{type:"application/pdf"}),printJS(window.URL.createObjectURL(r)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}(),formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e,n){var r=n(0)(n(1126),n(1127),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},table:[],convocatorias:[],begin_date:null,begin_date_formatted:null,menu:null,error:""}},watch:{begin_date:function(t){this.selectedItem.fecha_recepcion=t,this.begin_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e,t.table=t.selectedItem,t.getTable(),t.begin_date_formatted=t.$moment(e.fecha_recepcion).format("DD/MM/YYYY")}),this.getTable()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{getTable:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/convocatoria");case 2:e=t.sent,this.convocatorias=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={},this.table=[],this.convocatorias=[]},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/solicitud/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/solicitud",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}));return function(){return t.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Registrar Recepción ")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm12:"",md12:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Código Solicitud",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=15||"No mayor a 15 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},model:{value:t.selectedItem.codigo_solicitud,callback:function(e){t.$set(t.selectedItem,"codigo_solicitud",e)},expression:"selectedItem.codigo_solicitud"}}),t._v(" "),n("v-autocomplete",{staticClass:"mr-2",attrs:{items:t.convocatorias,"item-text":"codigo_referencia","item-value":"id",label:"Convocatoria",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.convocatoria_id,callback:function(e){t.$set(t.selectedItem,"convocatoria_id",e)},expression:"selectedItem.convocatoria_id"}}),t._v(" "),n("v-text-field",{attrs:{label:"Nombre/Razón Social",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},model:{value:t.selectedItem.razon_social,callback:function(e){t.$set(t.selectedItem,"razon_social",e)},expression:"selectedItem.razon_social"}}),t._v(" "),n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de Recepción","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.begin_date_formatted,callback:function(e){t.begin_date_formatted=e},expression:"begin_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"ES"},on:{input:function(e){t.menu=!1}},model:{value:t.begin_date,callback:function(e){t.begin_date=e},expression:"begin_date"}})],1)],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v(" Recepción de Solicitudes ")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.codigo_solicitud))]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.razon_social))]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.formatDate(e.item.fecha_recepcion)))]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{staticClass:"justify-center layout",attrs:{xs12:""}},[n("h2",[t._v("Convocatoria")])]),t._v(" "),n("v-flex",{attrs:{xs12:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Código referencia : ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.convocatoria.codigo_referencia))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Indicaciones calificables: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.convocatoria.indicaciones_calificables))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha inicio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.convocatoria.fecha_inicio)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha final: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.convocatoria.fecha_fin)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Terminos de referencia : ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.convocatoria.terminos_referencia))])])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1130),n(1134),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1131),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{Form:f.a,RemoveItem:l.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre del Proyecto",value:"nombre",align:"center"},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()}),this.bus.$on("closeDialogForm",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/proyecto/priorizacionfill");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),priorizarItem:function(t){this.bus.$emit("openDialogForm",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:console.log(e.id),this.bus.$emit("openDialogRemove","api/priorizacion/"+e.id);case 2:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")},printItem:function(){var t=h(i.a.mark(function t(e){var n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c()({method:"GET",url:"api/priorizacion/print/"+e.id,responseType:"arraybuffer"});case 3:n=t.sent,r=new Blob([n.data],{type:"application/pdf"}),printJS(window.URL.createObjectURL(r)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1132),n(1133),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}e.default={components:{},props:["item","bus"],data:function(){var t;return u(t={valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},convocatorias:[]},"selectedItem",{proyecto:{}}),u(t,"fecha_date",null),u(t,"fecha_date_formatted",null),u(t,"menu",null),u(t,"error",""),t},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogForm",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e,t.fecha_date_formatted=t.$moment(e.fecha_creacion).format("DD/MM/YYYY")})},watch:{fecha_date:function(t){this.selectedItem.fecha_creacion=t,this.fecha_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},computed:{},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialogForm"),this.selectedIndex=-1,this.selectedItem={}},getPriorizacion:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/convocatoria");case 2:e=t.sent,this.priorizacion=e.data,this.selectedItem=this.priorizacion;case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=12;break}if(null==this.selectedItem.id){t.next=7;break}return t.next=5,s.a.put("api/priorizacion/"+this.selectedItem.id,this.selectedItem);case 5:t.next=10;break;case 7:return this.selectedItem.proyecto_id=this.selectedItem.idproyecto,t.next=10,s.a.post("api/priorizacion",this.selectedItem);case 10:this.$toast.success("Correcto."),this.close();case 12:t.next=17;break;case 14:t.prev=14,t.t0=t.catch(0),console.log(t.t0);case 17:case"end":return t.stop()}},t,this,[[0,14]])}));return function(){return t.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Priorizar")])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Nombre Propuesta",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},model:{value:t.selectedItem.nombre_propuesta,callback:function(e){t.$set(t.selectedItem,"nombre_propuesta",e)},expression:"selectedItem.nombre_propuesta"}}),t._v(" "),n("v-text-field",{attrs:{label:"Nombre del Representante",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},model:{value:t.selectedItem.nombre_representante,callback:function(e){t.$set(t.selectedItem,"nombre_representante",e)},expression:"selectedItem.nombre_representante"}}),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-switch",{staticClass:"mt-2",attrs:{slot:"activator",color:"success"},slot:"activator",model:{value:t.selectedItem.priorizacion,callback:function(e){t.$set(t.selectedItem,"priorizacion",e)},expression:"selectedItem.priorizacion"}}),t._v(" "),n("span",[t._v(t._s(t.selectedItem.priorizacion?"Priorizar":"No Priorizar"))])],1)],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-spacer"),t._v(" "),n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha Creación","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.fecha_date_formatted,callback:function(e){t.fecha_date_formatted=e},expression:"fecha_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"es-bo"},on:{input:function(e){t.menu=!1}},model:{value:t.fecha_date,callback:function(e){t.fecha_date=e},expression:"fecha_date"}})],1),t._v(" "),n("v-card-text",[n("v-textarea",{attrs:{label:"Conclusiones",hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.conclusiones,callback:function(e){t.$set(t.selectedItem,"conclusiones",e)},expression:"selectedItem.conclusiones"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Priorización para OII")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.priorizarItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("assignment")])],1),t._v(" "),n("span",[t._v("Priorización de OII")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{staticClass:"justify-center layout",attrs:{xs12:""}},[n("h2",[t._v("Convocatoria")])]),t._v(" "),n("v-flex",{attrs:{xs12:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Código referencia : ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.codigo_referencia))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Indicaciones calificables: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.indicaciones_calificables))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha inicio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.fecha_inicio)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha final: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.fecha_fin)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Terminos de referencia : ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.terminos_referencia))])])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1136),n(1140),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1137),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{Form:f.a,RemoveItem:l.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre del Proyecto",value:"nombre",align:"center"},{text:"Municipio",value:"municipio",align:"center"},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()}),this.bus.$on("closeDialogForm",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/proyecto/showfill");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),evaluarItem:function(t){this.bus.$emit("openDialogForm",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/evaluacionviabilidad/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")},printItem:function(){var t=h(i.a.mark(function t(e){var n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c()({method:"GET",url:"api/priorizacion/print/"+e.id,responseType:"arraybuffer"});case 3:n=t.sent,r=new Blob([n.data],{type:"application/pdf"}),printJS(window.URL.createObjectURL(r)),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1138),n(1139),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}e.default={components:{},props:["item","bus"],data:function(){var t;return u(t={valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{proyecto:{}},error:"",convocatorias:[],fecha_date:null,fecha_date_formatted:null,menu:null},"error",""),u(t,"options",{url:"api/upload/file",headers:s.a.defaults.headers.common,paramName:"file",uploadMultiple:!1,acceptedFiles:{extensions:["application/pdf"],message:"Formato no permitido."},maxFilesize:{limit:5,message:"El archivo excede los 5Mb."},maxFiles:1}),u(t,"fileAdjunto",null),u(t,"valArchivo",null),t},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogForm",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e,t.fecha_date_formatted=t.$moment(e.fecha).format("DD/MM/YYYY"),t.getProyectos()}),this.getProyectos()},computed:{},watch:{fecha_date:function(t){this.selectedItem.fecha=t,this.fecha_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},complete:function(t,e,n){this.fileAdjunto=n.response,this.valArchivo="Cargado correctamente."},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=13;break}if(null!=this.selectedItem.proyecto_id){t.next=9;break}return this.selectedItem.proyecto_id=this.selectedItem.idproyecto,this.selectedItem.informe_adjunto=this.fileAdjunto,t.next=7,s.a.post("api/evaluacionviabilidad",this.selectedItem);case 7:t.next=11;break;case 9:return t.next=11,s.a.put("api/evaluacionviabilidad/"+this.selectedItem.id,this.selectedItem);case 11:this.$toast.success("Correcto."),this.close();case 13:t.next=18;break;case 15:t.prev=15,t.t0=t.catch(0),console.log(t.t0);case 18:case"end":return t.stop()}},t,this,[[0,15]])}));return function(){return t.apply(this,arguments)}}(),getProyectos:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/evaluacionviabilidad");case 2:e=t.sent,this.convocatorias=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Evaluación de Viabilidad")])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Responsable",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},model:{value:t.selectedItem.responsable,callback:function(e){t.$set(t.selectedItem,"responsable",e)},expression:"selectedItem.responsable"}}),t._v(" "),n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.fecha_date_formatted,callback:function(e){t.fecha_date_formatted=e},expression:"fecha_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"es-bo"},on:{input:function(e){t.menu=!1}},model:{value:t.fecha_date,callback:function(e){t.fecha_date=e},expression:"fecha_date"}})],1),t._v(" "),n("v-text-field",{attrs:{label:"Presupuesto",type:"number",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},model:{value:t.selectedItem.presupuesto,callback:function(e){t.$set(t.selectedItem,"presupuesto",e)},expression:"selectedItem.presupuesto"}}),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-switch",{staticClass:"mt-2",attrs:{slot:"activator",color:"success"},slot:"activator",model:{value:t.selectedItem.estado,callback:function(e){t.$set(t.selectedItem,"estado",e)},expression:"selectedItem.estado"}}),t._v(" "),n("span",[t._v(t._s(t.selectedItem.estado?"Viable":"No Viable"))])],1)],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[[n("vue-clip",{attrs:{options:t.options,"on-complete":t.complete},scopedSlots:t._u([{key:"clip-uploader-body",fn:function(e){return t._l(e.files,function(e,r){return n("div",{key:r},["success"==e.status?n("v-icon",{attrs:{color:"success"}},[t._v("check_circle")]):t._e(),t._v(" "),"success"==e.status?n("span",{staticClass:"green--text"},[t._v(" correcto.")]):t._e(),t._v(" "),"error"==e.status?n("v-icon",{attrs:{color:"error"}},[t._v("error")]):t._e(),t._v(" "),"error"==e.status?n("span",{staticClass:"red--text"},[t._v(" "+t._s(e.errorMessage))]):t._e()],1)})}}])},[n("template",{slot:"clip-uploader-action"},[n("div",{staticClass:"dz-message v-btn v-btn--small theme--light success"},[t._v("Subir archivo PDF")])])],2)],t._v(" "),n("v-text-field",{attrs:{readonly:"",box:"",label:"Archivo PDF"},model:{value:t.valArchivo,callback:function(e){t.valArchivo=e},expression:"valArchivo"}}),t._v(" "),[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Adjunto: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:t.selectedItem.informe_adjunto,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)])])])],1)]],2)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Evaluación de Viabilidad de OII")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.municipio)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.evaluarItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("assignment")])],1),t._v(" "),n("span",[t._v("Evaluación de Viabilidad OII")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{staticClass:"justify-center layout",attrs:{xs12:""}},[n("h2",[t._v("Convocatoria")])]),t._v(" "),n("v-flex",{attrs:{xs12:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Código referencia : ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.codigo_referencia))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Indicaciones calificables: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.indicaciones_calificables))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha inicio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.fecha_inicio)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha final: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.fecha_fin)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Terminos de referencia : ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.terminos_referencia))])])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1142),n(1146),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1143),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{Form:f.a,RemoveItem:l.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre proyecto",value:"nombre",align:"center"},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()}),this.bus.$on("closeDialogForm",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/proyecto/supervisionfill");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),evaluarItem:function(t){this.bus.$emit("openDialogForm",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/supervision/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e,n){var r=n(0)(n(1144),n(1145),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{},props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},convocatorias:[],begin_date:null,begin_date_formatted:null,end_date:null,end_date_formatted:null,menu:null,menu2:null,error:"",options:{url:"api/upload/file",headers:s.a.defaults.headers.common,paramName:"file",uploadMultiple:!1,acceptedFiles:{extensions:["application/pdf"],message:"Formato no permitido."},maxFilesize:{limit:5,message:"El archivo excede los 5Mb."},maxFiles:1},fileAdjunto:null,valArchivo:null}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogForm",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e,t.getConvocatorias(),t.begin_date_formatted=t.$moment(e.fecha).format("DD/MM/YYYY"),t.end_date_formatted=t.$moment(e.fecha_visita).format("DD/MM/YYYY")}),this.getConvocatorias()},computed:{},watch:{begin_date:function(t){this.selectedItem.fecha=t,this.begin_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")},end_date:function(t){this.selectedItem.fecha_visita=t,this.end_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialogForm"),this.selectedIndex=-1,this.selectedItem={}},complete:function(t,e,n){this.fileAdjunto=n.response,this.valArchivo="Cargado correctamente."},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=13;break}if(null!=this.selectedItem.proyecto_id){t.next=9;break}return this.selectedItem.proyecto_id=this.selectedItem.idproyecto,this.selectedItem.fotografias=this.fileAdjunto,t.next=7,s.a.post("api/supervision",this.selectedItem);case 7:t.next=11;break;case 9:return t.next=11,s.a.put("api/supervision/"+this.selectedItem.id,this.selectedItem);case 11:this.$toast.success("Correcto."),this.close();case 13:t.next=18;break;case 15:t.prev=15,t.t0=t.catch(0),console.log(t.t0);case 18:case"end":return t.stop()}},t,this,[[0,15]])}));return function(){return t.apply(this,arguments)}}(),getConvocatorias:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/proyecto/supervisionfill");case 2:e=t.sent,this.convocatorias=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Asignar Obra")])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.begin_date_formatted,callback:function(e){t.begin_date_formatted=e},expression:"begin_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"ES"},on:{input:function(e){t.menu=!1}},model:{value:t.begin_date,callback:function(e){t.begin_date=e},expression:"begin_date"}})],1),t._v(" "),n("v-text-field",{attrs:{label:"Técnico",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},model:{value:t.selectedItem.responsable,callback:function(e){t.$set(t.selectedItem,"responsable",e)},expression:"selectedItem.responsable"}}),t._v(" "),n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu2,callback:function(e){t.menu2=e},expression:"menu2"}},[n("v-text-field",{attrs:{slot:"activator",label:"Fecha visita","prepend-icon":"event",readonly:""},slot:"activator",model:{value:t.end_date_formatted,callback:function(e){t.end_date_formatted=e},expression:"end_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"ES"},on:{input:function(e){t.menu2=!1}},model:{value:t.end_date,callback:function(e){t.end_date=e},expression:"end_date"}})],1),t._v(" "),n("v-text-field",{attrs:{label:"Porcentaje Avance",type:"number",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},model:{value:t.selectedItem.porcentaje_avance,callback:function(e){t.$set(t.selectedItem,"porcentaje_avance",e)},expression:"selectedItem.porcentaje_avance"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[[n("vue-clip",{attrs:{options:t.options,"on-complete":t.complete},scopedSlots:t._u([{key:"clip-uploader-body",fn:function(e){return t._l(e.files,function(e,r){return n("div",{key:r},["success"==e.status?n("v-icon",{attrs:{color:"success"}},[t._v("check_circle")]):t._e(),t._v(" "),"success"==e.status?n("span",{staticClass:"green--text"},[t._v(" correcto.")]):t._e(),t._v(" "),"error"==e.status?n("v-icon",{attrs:{color:"error"}},[t._v("error")]):t._e(),t._v(" "),"error"==e.status?n("span",{staticClass:"red--text"},[t._v(" "+t._s(e.errorMessage))]):t._e()],1)})}}])},[n("template",{slot:"clip-uploader-action"},[n("div",{staticClass:"dz-message v-btn v-btn--small theme--light success"},[t._v("Subir fotografías PDF")])])],2)],t._v(" "),n("v-text-field",{attrs:{readonly:"",box:"",label:"Archivo PDF"},model:{value:t.valArchivo,callback:function(e){t.valArchivo=e},expression:"valArchivo"}}),t._v(" "),[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Adjunto: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:t.selectedItem.fotografias,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)])])])],1)]],2)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Seguimiento de Obras para Evaluación")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.evaluarItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("assignment")])],1),t._v(" "),n("span",[t._v("Asignar Proyecto")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{staticClass:"justify-center layout",attrs:{xs12:""}},[n("h2",[t._v("Convocatoria")])]),t._v(" "),n("v-flex",{attrs:{xs12:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Código referencia : ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.codigo_referencia))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Indicaciones calificables: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.indicaciones_calificables))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha inicio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.fecha_inicio)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha final: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.fecha_fin)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Terminos de referencia : ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.terminos_referencia))])])])])],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{staticClass:"justify-center layout",attrs:{xs12:""}},[n("h2",[t._v("Evaluación de Viabilidad")])]),t._v(" "),n("v-flex",{attrs:{xs12:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Responsable : ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.responsable))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha : ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.fecha)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Presupuesto : ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.presupuesto))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Estado : ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.estado?"Viable":"No Viable"))])]),t._v(" "),[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Adjunto: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.informe_adjunto,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)])])])],1)]],2)])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1148),n(1152),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1149),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{Form:f.a,RemoveItem:l.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre Proyecto",value:"nombre",align:"center"},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()}),this.bus.$on("closeDialogForm",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/proyecto/cierreobrafill");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),evaluarItem:function(t){this.bus.$emit("openDialogForm",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/cierreobra/"+e.idcierre);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e,n){var r=n(0)(n(1150),n(1151),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{},props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},convocatorias:[],begin_date:null,begin_date_formatted:null,end_date:null,end_date_formatted:null,menu:null,menu2:null,error:"",options:{url:"api/upload/file",headers:s.a.defaults.headers.common,paramName:"file",uploadMultiple:!1,acceptedFiles:{extensions:["application/pdf"],message:"Formato no permitido."},maxFilesize:{limit:5,message:"El archivo excede los 5Mb."},maxFiles:1},fileAdjunto:null,valArchivo:null}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogForm",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e,t.getConvocatorias(),t.begin_date_formatted=t.$moment(e.fecha).format("DD/MM/YYYY"),t.end_date_formatted=t.$moment(e.fecha_cierre).format("DD/MM/YYYY")}),this.getConvocatorias()},computed:{},watch:{begin_date:function(t){this.selectedItem.fecha=t,this.begin_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")},end_date:function(t){this.selectedItem.fecha_cierre=t,this.end_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialogForm"),this.selectedIndex=-1,this.selectedItem={}},complete:function(t,e,n){this.fileAdjunto=n.response,this.valArchivo="Cargado correctamente."},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=13;break}if(null!=this.selectedItem.proyecto_id){t.next=9;break}return this.selectedItem.proyecto_id=this.selectedItem.idproyecto,this.selectedItem.fotografias=this.fileAdjunto,t.next=7,s.a.post("api/cierreobra",this.selectedItem);case 7:t.next=11;break;case 9:return t.next=11,s.a.put("api/cierreobra/"+this.selectedItem.id,this.selectedItem);case 11:this.$toast.success("Correcto."),this.close();case 13:t.next=18;break;case 15:t.prev=15,t.t0=t.catch(0),console.log(t.t0);case 18:case"end":return t.stop()}},t,this,[[0,15]])}));return function(){return t.apply(this,arguments)}}(),getConvocatorias:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/convocatoria/cierreobrafill");case 2:e=t.sent,this.convocatorias=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Cierre de la OII")])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.begin_date_formatted,callback:function(e){t.begin_date_formatted=e},expression:"begin_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"ES"},on:{input:function(e){t.menu=!1}},model:{value:t.begin_date,callback:function(e){t.begin_date=e},expression:"begin_date"}})],1),t._v(" "),n("v-text-field",{attrs:{label:"Responsable",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},model:{value:t.selectedItem.responsable,callback:function(e){t.$set(t.selectedItem,"responsable",e)},expression:"selectedItem.responsable"}}),t._v(" "),n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu2,callback:function(e){t.menu2=e},expression:"menu2"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha cierre","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.end_date_formatted,callback:function(e){t.end_date_formatted=e},expression:"end_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"ES"},on:{input:function(e){t.menu2=!1}},model:{value:t.end_date,callback:function(e){t.end_date=e},expression:"end_date"}})],1),t._v(" "),n("v-text-field",{attrs:{label:"Presupuesto ejecutado",type:"number",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},model:{value:t.selectedItem.presupuesto_ejecutado,callback:function(e){t.$set(t.selectedItem,"presupuesto_ejecutado",e)},expression:"selectedItem.presupuesto_ejecutado"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[[n("vue-clip",{attrs:{options:t.options,"on-complete":t.complete},scopedSlots:t._u([{key:"clip-uploader-body",fn:function(e){return t._l(e.files,function(e,r){return n("div",{key:r},["success"==e.status?n("v-icon",{attrs:{color:"success"}},[t._v("check_circle")]):t._e(),t._v(" "),"success"==e.status?n("span",{staticClass:"green--text"},[t._v(" correcto.")]):t._e(),t._v(" "),"error"==e.status?n("v-icon",{attrs:{color:"error"}},[t._v("error")]):t._e(),t._v(" "),"error"==e.status?n("span",{staticClass:"red--text"},[t._v(" "+t._s(e.errorMessage))]):t._e()],1)})}}])},[n("template",{slot:"clip-uploader-action"},[n("div",{staticClass:"dz-message v-btn v-btn--small theme--light success"},[t._v("Subir fotografías PDF")])])],2)],t._v(" "),n("v-text-field",{attrs:{readonly:"",box:"",label:"Archivo PDF"},model:{value:t.valArchivo,callback:function(e){t.valArchivo=e},expression:"valArchivo"}}),t._v(" "),[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Adjunto: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:t.selectedItem.fotografias,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)])])])],1)],t._v(" "),n("v-text-field",{attrs:{label:"Conclusiones",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},model:{value:t.selectedItem.conclusiones,callback:function(e){t.$set(t.selectedItem,"conclusiones",e)},expression:"selectedItem.conclusiones"}})],2)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Cierre de la Obra de Impacto Inmediato")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.evaluarItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("assignment")])],1),t._v(" "),n("span",[t._v("Cierre Proyecto")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{staticClass:"justify-center layout",attrs:{xs12:""}},[n("h2",[t._v("Convocatoria")])]),t._v(" "),n("v-flex",{attrs:{xs12:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Código referencia : ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.codigo_referencia))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Indicaciones calificables: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.indicaciones_calificables))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha inicio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.fecha_inicio)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha final: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.fecha_fin)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Términos de referencia : ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.terminos_referencia))])])])])],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{staticClass:"justify-center layout",attrs:{xs12:""}},[n("h2",[t._v("Supervisión")])]),t._v(" "),n("v-flex",{attrs:{xs12:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Responsable : ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.responsable))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha Visita : ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.fecha_visita)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Porcentaje Avance : ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.porcentaje_avance))])]),t._v(" "),[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Adjunto: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.fotografias,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)])])])],1)]],2)])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1154),n(1158),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1155),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{Form:f.a,RemoveItem:l.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre Proyecto",value:"nombre",align:"center"},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()}),this.bus.$on("closeDialogForm",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/proyecto/evaluacionfill");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),evaluarItem:function(t){this.bus.$emit("openDialogForm",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/evaluacionimpacto/"+e.idevaluacion);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e,n){var r=n(0)(n(1156),n(1157),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{},props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},convocatorias:[],begin_date:null,begin_date_formatted:null,end_date:null,end_date_formatted:null,menu:null,menu2:null,error:"",options:{url:"api/upload/file",headers:s.a.defaults.headers.common,paramName:"file",uploadMultiple:!1,acceptedFiles:{extensions:["application/pdf"],message:"Formato no permitido."},maxFilesize:{limit:5,message:"El archivo excede los 5Mb."},maxFiles:1},fileAdjunto:null,valArchivo:null}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogForm",function(e){console.log(e),t.selectedItem=e,t.dialog=!0,t.selectedIndex=e,t.getConvocatorias(),t.begin_date_formatted=t.$moment(e.fecha).format("DD/MM/YYYY"),t.end_date_formatted=t.$moment(e.fecha_cierre).format("DD/MM/YYYY")}),this.getConvocatorias()},computed:{},watch:{begin_date:function(t){this.selectedItem.fecha=t,this.begin_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")},end_date:function(t){this.selectedItem.fecha_cierre=t,this.end_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialogForm"),this.selectedIndex=-1,this.selectedItem={}},complete:function(t,e,n){this.fileAdjunto=n.response,this.valArchivo="Cargado correctamente."},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=13;break}if(null!=this.selectedItem.proyecto_id){t.next=9;break}return this.selectedItem.proyecto_id=this.selectedItem.idproyecto,this.selectedItem.fotografias=this.fileAdjunto,t.next=7,s.a.post("api/evaluacionimpacto_oii",this.selectedItem);case 7:t.next=11;break;case 9:return t.next=11,s.a.put("api/evaluacionimpacto_oii/"+this.selectedItem.id,this.selectedItem);case 11:this.$toast.success("Correcto."),this.close();case 13:t.next=18;break;case 15:t.prev=15,t.t0=t.catch(0),console.log(t.t0);case 18:case"end":return t.stop()}},t,this,[[0,15]])}));return function(){return t.apply(this,arguments)}}(),getConvocatorias:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/proyecto/evaluacionfill");case 2:e=t.sent,this.convocatorias=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Registro de Evaluación de Impacto")])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.begin_date_formatted,callback:function(e){t.begin_date_formatted=e},expression:"begin_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"ES"},on:{input:function(e){t.menu=!1}},model:{value:t.begin_date,callback:function(e){t.begin_date=e},expression:"begin_date"}})],1),t._v(" "),n("v-text-field",{attrs:{label:"Responsable",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},model:{value:t.selectedItem.responsable,callback:function(e){t.$set(t.selectedItem,"responsable",e)},expression:"selectedItem.responsable"}}),t._v(" "),n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu2,callback:function(e){t.menu2=e},expression:"menu2"}},[n("v-text-field",{attrs:{slot:"activator",label:"Fecha cierre","prepend-icon":"event",readonly:""},slot:"activator",model:{value:t.end_date_formatted,callback:function(e){t.end_date_formatted=e},expression:"end_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"ES"},on:{input:function(e){t.menu2=!1}},model:{value:t.end_date,callback:function(e){t.end_date=e},expression:"end_date"}})],1),t._v(" "),n("v-text-field",{attrs:{label:"Presupuesto ejecutado",type:"number",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},model:{value:t.selectedItem.presupuesto_ejecutado,callback:function(e){t.$set(t.selectedItem,"presupuesto_ejecutado",e)},expression:"selectedItem.presupuesto_ejecutado"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[[n("vue-clip",{attrs:{options:t.options,"on-complete":t.complete},scopedSlots:t._u([{key:"clip-uploader-body",fn:function(e){return t._l(e.files,function(e,r){return n("div",{key:r},["success"==e.status?n("v-icon",{attrs:{color:"success"}},[t._v("check_circle")]):t._e(),t._v(" "),"success"==e.status?n("span",{staticClass:"green--text"},[t._v(" correcto.")]):t._e(),t._v(" "),"error"==e.status?n("v-icon",{attrs:{color:"error"}},[t._v("error")]):t._e(),t._v(" "),"error"==e.status?n("span",{staticClass:"red--text"},[t._v(" "+t._s(e.errorMessage))]):t._e()],1)})}}])},[n("template",{slot:"clip-uploader-action"},[n("div",{staticClass:"dz-message v-btn v-btn--small theme--light success"},[t._v("Subir fotografías PDF")])])],2)],t._v(" "),n("v-text-field",{attrs:{readonly:"",box:"",label:"Archivo PDF"},model:{value:t.valArchivo,callback:function(e){t.valArchivo=e},expression:"valArchivo"}}),t._v(" "),[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Adjunto: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:t.selectedItem.fotografias,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)])])])],1)],t._v(" "),n("v-text-field",{attrs:{label:"Conclusiones",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},model:{value:t.selectedItem.conclusiones,callback:function(e){t.$set(t.selectedItem,"conclusiones",e)},expression:"selectedItem.conclusiones"}})],2)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Evaluación de Impacto")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.evaluarItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("assignment")])],1),t._v(" "),n("span",[t._v("Cierre Proyecto")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{staticClass:"justify-center layout",attrs:{xs12:""}},[n("h2",[t._v("Convocatoria")])]),t._v(" "),n("v-flex",{attrs:{xs12:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Código referencia : ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.codigo_referencia))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Indicaciones calificables: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.indicaciones_calificables))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha inicio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.fecha_inicio)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha final: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.fecha_fin)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Términos de referencia : ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.terminos_referencia))])])])])],1)],1),t._v(" "),n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{staticClass:"justify-center layout",attrs:{xs12:""}},[n("h2",[t._v("Cierre Obra")])]),t._v(" "),n("v-flex",{attrs:{xs12:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Responsable : ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.responsable))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha Cierre : ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.fecha_cierre)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Presupuesto Ejecutado : ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.presupuesto_ejecutado))])]),t._v(" "),[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Adjunto: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.fotografias,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)])])])],1)]],2)])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1160),n(1167),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(1161),l=n.n(u);e.default={components:{Resoluciones:l.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre",value:"primer_apellido",align:"center"},{text:"Carnet de identidad",value:"carnet_identidad",align:"center"},{text:"Tipo Persona",align:"center",sortable:!1},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t,e=(t=i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/persona");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}(),resolucionItem:function(t){this.bus.$emit("openDialogResolucion",t)},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},image:function(t){return t.fotografia},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e,n){var r=n(0)(n(1162),n(1166),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(1),a=n.n(i),o=n(2),s=(n.n(o),n(3)),c=n.n(s),u=n(6),l=n.n(u),d=n(1163),f=n.n(d);function h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},resoluciones:[],search:null,headers:[{text:"Nro. Resolucion",align:"center",sortable:!1},{text:"Tipo de resolución",align:"center",sortable:!1},{text:"Taques",align:"center",sortable:!1},{text:"Fecha de resolución administrativa",align:"center",sortable:!1},{text:"Opciones",align:"center",sortable:!1}]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogResolucion",function(e){t.dialog=!0,t.selectedItem=e,t.getResoluciones()}),this.bus.$on("closeDialogForm",function(){t.getResoluciones()})},computed:{},watch:{},methods:(r={close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.resoluciones=[],this.bus.$emit("closeDialog")},getResoluciones:function(){var t=p(a.a.mark(function t(){var e;return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/resolucion_administrativa/fill/"+JSON.stringify({persona_id:this.selectedItem.id}));case 3:e=t.sent,this.resoluciones=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t,e){this.bus.$emit("openDialogForm",Object.assign(t,e))},removeItem:function(t){this.bus.$emit("openDialogRemove","api/resolucion_administrativa/"+t.id)}},h(r,"removeItem",function(){var t=p(a.a.mark(function t(e){return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.emit(e);case 2:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()),h(r,"emit",function(t){var e=this;return new Promise(function(n,r){e.bus.$emit("openDialogRemove","api/resolucion_administrativa/"+t.id),e.$nextTick(function(){setTimeout(function(){e.getResoluciones()},3e3)})})}),h(r,"formatDate",function(t){return this.$moment(t).format("DD/MM/YYYY ")}),r)}},function(t,e,n){var r=n(0)(n(1164),n(1165),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{},props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},tiposResolucion:[],errorResolucion:null,menu:null,fecha_date:null,fecha_date_formatted:null,options:{url:"api/upload/file",headers:s.a.defaults.headers.common,paramName:"file",uploadMultiple:!1,acceptedFiles:{extensions:["application/pdf"],message:"Formato no permitido."},maxFilesize:{limit:5,message:"El archivo exede los 5Mb."},maxFiles:1},fileAdjunto:null,valArchivo:null}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogForm",function(e){t.dialog=!0,"nuevo"==e.mode?(t.selectedItem.persona_id=e.id,t.$refs.form.reset()):"editar"==e.mode&&(t.selectedItem=e,t.selectedIndex=e,t.fecha_date_formatted=t.$moment(e.fecha_resolucion).format("DD/MM/YYYY"),t.valArchivo="Cargado correctamente.")}),this.getTiposResolucion()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar"}},watch:{fecha_date:function(t){this.selectedItem.fecha_resolucion=t,this.fecha_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.menu=null,this.fecha_date=null,this.persona=[],this.retenciones=[],this.userValid=!0,this.fileAdjunto=null,this.errorResolucion=null,this.$refs.form.reset(),this.bus.$emit("closeDialogForm")},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=13;break}if(this.selectedItem.user_id=this.$store.getters["auth/user"].id,-1==this.selectedIndex){t.next=8;break}return t.next=6,s.a.put("api/resolucion_administrativa/"+this.selectedItem.id,this.selectedItem);case 6:t.next=11;break;case 8:return this.selectedItem.adjunto=this.fileAdjunto,t.next=11,s.a.post("api/resolucion_administrativa",this.selectedItem);case 11:this.$toast.success("Correcto."),this.close();case 13:t.next=18;break;case 15:t.prev=15,t.t0=t.catch(0),console.log(t.t0);case 18:case"end":return t.stop()}},t,this,[[0,15]])}));return function(){return t.apply(this,arguments)}}(),verificarResolucion:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/resolucion_administrativa/fill/"+JSON.stringify({resolucion:this.selectedItem.resolucion}));case 2:t.sent.data.length,this.errorResolucion=null;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getTiposResolucion:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/tipo_resolucion");case 2:e=t.sent,this.tiposResolucion=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),complete:function(t,e,n){this.fileAdjunto=n.response,this.valArchivo="Cargado correctamente."},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-text-field",{attrs:{label:"Resolución administrativa","error-messages":t.errorResolucion,rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=500||"No mayor a 500 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{change:function(e){return t.verificarResolucion()}},model:{value:t.selectedItem.resolucion,callback:function(e){t.$set(t.selectedItem,"resolucion",e)},expression:"selectedItem.resolucion"}}),t._v(" "),n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de resolución administrativa","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.fecha_date_formatted,callback:function(e){t.fecha_date_formatted=e},expression:"fecha_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"es-bo"},on:{input:function(e){t.menu=!1}},model:{value:t.fecha_date,callback:function(e){t.fecha_date=e},expression:"fecha_date"}})],1),t._v(" "),n("v-autocomplete",{attrs:{items:t.tiposResolucion,"item-text":"nombre","item-value":"id",label:"Tipo de resolución",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.tipo_resolucion_id,callback:function(e){t.$set(t.selectedItem,"tipo_resolucion_id",e)},expression:"selectedItem.tipo_resolucion_id"}}),t._v(" "),t.selectedItem.tipo_resolucion_id>=4?n("v-text-field",{attrs:{label:"Numero de taques",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t<=100||"No mayor a 100"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.numero_taques,callback:function(e){t.$set(t.selectedItem,"numero_taques",e)},expression:"selectedItem.numero_taques"}}):t._e(),t._v(" "),n("v-textarea",{attrs:{label:"Observaciones",row:"2"},model:{value:t.selectedItem.observaciones,callback:function(e){t.$set(t.selectedItem,"observaciones",e)},expression:"selectedItem.observaciones"}}),t._v(" "),[t.dialog?n("vue-clip",{attrs:{options:t.options,"on-complete":t.complete},scopedSlots:t._u([{key:"clip-uploader-body",fn:function(e){return t._l(e.files,function(e,r){return n("div",{key:r},["success"==e.status?n("v-icon",{attrs:{color:"success"}},[t._v("check_circle")]):t._e(),t._v(" "),"success"==e.status?n("span",{staticClass:"green--text"},[t._v(" correcto.")]):t._e(),t._v(" "),"error"==e.status?n("v-icon",{attrs:{color:"error"}},[t._v("error")]):t._e(),t._v(" "),"error"==e.status?n("span",{staticClass:"red--text"},[t._v(" "+t._s(e.errorMessage))]):t._e()],1)})}}],null,!1,4294490384)},[n("template",{slot:"clip-uploader-action"},[n("div",{staticClass:"dz-message v-btn v-btn--small theme--light success"},[t._v("Subir archivo PDF")])])],2):t._e()],t._v(" "),n("v-text-field",{attrs:{readonly:"",box:"",label:"Archivo PDF",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.valArchivo,callback:function(e){t.valArchivo=e},expression:"valArchivo"}})],2)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Resoluciones Administrativas")]),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}}),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(e){return t.editItem(t.selectedItem,{mode:"nuevo"})}},slot:"activator"},[n("v-icon",[t._v("add_circle")])],1),t._v(" "),n("span",[t._v("Nuevo")])],1)],1),t._v(" "),n("v-card-text",[n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.resoluciones,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.resolucion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.tipo_resolucion.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.numero_taques)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.formatDate(e.item.fecha_resolucion))+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item,{mode:"editar"})}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:!t.$store.getters["auth/user"].roles.filter(function(t){return"admin"===t.name}).length>0},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Observaciones: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s(e.item.observaciones)+" ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Adjunto: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.adjunto,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)])])])],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Resoluciones Administrativas")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Resoluciones",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-left",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.fullName(e.item))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.carnet_identidad+" "+e.item.departamento_extension.sigla)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.tipo_persona_id?e.item.tipo_persona.nombre:"-")+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.resolucionItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("assignment")])],1),t._v(" "),n("span",[t._v("Resoluciones Administrativas")])],1)],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Estado civil: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.estado_civil))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Genero: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s("M"==e.item.genero?"Masculino":"Femenino"))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Telefono: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.telefono))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Email: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.email))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Domicilio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.domicilio))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.fecha_nacimiento)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Pais de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.pais_nacimiento.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Departamento de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.departamento_nacimiento_id?n("span",[t._v("\n "+t._s(e.item.departamento_nacimiento.nombre)+"\n ")]):t._e()])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Provincia de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.provincia_nacimiento_id?n("span",[t._v("\n "+t._s(e.item.provincia_nacimiento.nombre)+"\n ")]):t._e()])]),t._v(" "),e.item.sustitucion_id?n("tr",[n("th",{attrs:{colspan:"2"}},[t._v("SUSTITUCIÓN")])]):t._e(),t._v(" "),e.item.sustitucion_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Sustituido por: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v("\n "+t._s(t.fullName(e.item.persona))+" "),n("br"),t._v(" \n CI.: "+t._s(e.item.persona.carnet_identidad+" "+e.item.persona.departamento_extension.sigla)+" \n ")])]):t._e(),t._v(" "),e.item.sustitucion_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Motivo de sustitución: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.sustitucion.descripcion)+" ")])]):t._e(),t._v(" "),e.item.sustitucion_id?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Documento de sustitución: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.adjunto_sustitucion,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)]):t._e(),t._v(" "),e.item.cesaciones.length>0?n("tr",[n("th",{attrs:{colspan:"2"}},[t._v("CESACIÓN")])]):t._e(),t._v(" "),e.item.cesaciones.length>0?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Motivo de cesación: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.cesaciones[0].descripcion)+" ")])]):t._e(),t._v(" "),e.item.cesaciones.length>0?n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Documento de cesación: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.cesaciones[0].pivot.adjunto_cesacion,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)]):t._e()])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1169),n(1173),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(1170),l=n.n(u);e.default={components:{Form:l.a},data:function(){return{bus:new o.a,headers:[{text:"Nro. Resolución",value:"resolucion",align:"center"},{text:"Tipo de resolución",value:"tipo_resolucion.nombre",align:"center"},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t,e=(t=i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/resolucion_administrativa/");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}(),resolucionItem:function(t){this.bus.$emit("openDialogForm",t)}}}},function(t,e,n){var r=n(0)(n(1171),n(1172),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={components:{},props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},resoluciones:[],search:null,headers:[{text:"Nro. Resolución",align:"center",sortable:!1},{text:"Fecha Resolución",align:"center",sortable:!1},{text:"Tipo de Resolución",align:"center",sortable:!1},{text:"Taques",align:"center",sortable:!1}]}},mounted:function(){var t=this;this.bus.$on("openDialogForm",function(e){t.dialog=!0,t.selectedItem=e,t.getResoluciones()})},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.resoluciones=[],this.bus.$emit("closeDialog")},getResoluciones:function(){var t,e=(t=i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s.a.get("api/resolucion_administrativa/fill/"+JSON.stringify({persona_id:this.selectedItem.persona_id}));case 3:e=t.sent,this.resoluciones=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}(),formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY ")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Resolución Administrativa")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}})],1),t._v(" "),n("v-card-text",[n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.resoluciones,"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.resolucion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.formatDate(e.item.fecha_resolucion))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.tipo_resolucion.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.numero_taques)+" ")])])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Observaciones: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(" "+t._s(e.item.observaciones)+" ")])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Adjunto: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.adjunto,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)])])])],1)]}}])})],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Consulta de Resoluciones Administrativas")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.resolucion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.tipo_resolucion.nombre)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.resolucionItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("assignment")])],1),t._v(" "),n("span",[t._v("Resolución Administrativa")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1175),n(1182),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(1176),l=n.n(u);e.default={components:{Sanciones:l.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre",value:"primer_apellido",align:"center"},{text:"Carnet de identidad",value:"carnet_identidad",align:"center"},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t,e=(t=i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/persona");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}(),sancionItem:function(t){this.bus.$emit("openDialogSancion",t)},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},image:function(t){return t.fotografia},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e,n){var r=n(0)(n(1177),n(1181),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o),c=n(6),u=n.n(c),l=n(1178),d=n.n(l);function f(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}function h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}e.default={components:{RemoveItem:u.a,Form:d.a},props:["item","bus"],data:function(){var t;return h(t={valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},table:[],search:null,headers:[{text:"Infracción",value:"infraccion.nombre",align:"center"},{text:"Codigo",value:"codigo",align:"center"},{text:"Nombre",value:"nombre",align:"center"},{text:"Monto",value:"monto",align:"center"},{text:"Descripción",value:"descripcion",align:"center"},{text:"Estado",value:"estado",align:"center"},{text:"Opciones",align:"center",sortable:!1}]},"table",[]),h(t,"search",""),h(t,"idpersona",0),t},computed:{},mounted:function(){var t=this;this.bus.$on("openDialogSancion",function(e){t.idpersona=e.id,t.dialog=!0,t.selectedItem=e,t.getTable()}),this.bus.$on("closeDialogForm",function(){t.getTable()}),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.table=[],this.bus.$emit("closeDialog",this.selecteditem)},getTable:function(){var t=f(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,void 0===this.selectedItem.id){t.next=6;break}return t.next=4,s.a.get("api/sancion/showfill/"+this.selectedItem.id);case 4:e=t.sent,this.table=e.data;case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(){return t.apply(this,arguments)}}(),formItem:function(t,e){this.bus.$emit("openDialogForm1",Object.assign(t,e))},editItem:function(t,e){this.bus.$emit("openDialogForm",Object.assign(t,e))},removeItem:function(){var t=f(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/sancion/"+e.id),this.getTable();case 2:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1179),n(1180),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{},props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},tiposSancion:[],infracciones:[],error:"",options:{url:"api/upload/file",headers:s.a.defaults.headers.common,paramName:"file",uploadMultiple:!1,acceptedFiles:{extensions:["application/pdf"],message:"Formato no permitido."},maxFilesize:{limit:5,message:"El archivo excede los 5Mb."},maxFiles:1},fileAdjunto:null,valArchivo:null}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogForm1",function(e){t.selectedItem.persona_id=e,t.dialog=!0}),this.bus.$on("openDialogForm",function(e){t.selectedItem.persona_id=e,t.selectedItem=e,t.selectedIndex=e,t.dialog=!0}),this.getTiposSancion(),this.getInfracciones()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{getInfracciones:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/infraccion");case 2:e=t.sent,this.infracciones=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getTiposSancion:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/tipo_sancion");case 2:e=t.sent,this.tiposSancion=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),complete:function(t,e,n){this.fileAdjunto=n.response,this.valArchivo="Cargado correctamente."},close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialogForm"),this.selectedIndex=-1,this.selectedItem={},this.fileAdjunto=null},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=13;break}if("Editar"!=this.selectedItem.mode){t.next=7;break}return t.next=5,s.a.put("api/sancion/"+this.selectedItem.id,this.selectedItem);case 5:t.next=11;break;case 7:return this.selectedItem.adjunto=this.fileAdjunto,this.selectedItem.estado=1,t.next=11,s.a.post("api/sancion",this.selectedItem);case 11:this.$toast.success("Correcto."),this.close();case 13:t.next=18;break;case 15:t.prev=15,t.t0=t.catch(0),console.log(t.t0);case 18:case"end":return t.stop()}},t,this,[[0,15]])}));return function(){return t.apply(this,arguments)}}(),codevalidate:function(){var t=this;s.a.get("/api/sancion/codigo/"+this.selectedItem.codigo).then(function(e){t.error=e.data})}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-select",{attrs:{items:t.infracciones,"item-text":"nombre","item-value":"id",label:"Tipo de Infracción",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.infraccion_id,callback:function(e){t.$set(t.selectedItem,"infraccion_id",e)},expression:"selectedItem.infraccion_id"}}),t._v(" "),n("v-select",{attrs:{items:t.tiposSancion,"item-text":"nombre","item-value":"nombre",label:"Tipo de Sanción",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}}),t._v(" "),n("v-text-field",{attrs:{label:"Codigo",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=5||"No mayor a 5 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},on:{change:function(e){return t.codevalidate()}},model:{value:t.selectedItem.codigo,callback:function(e){t.$set(t.selectedItem,"codigo",e)},expression:"selectedItem.codigo"}}),t._v(" "),n("v-text-field",{attrs:{label:"Monto"},model:{value:t.selectedItem.monto,callback:function(e){t.$set(t.selectedItem,"monto",e)},expression:"selectedItem.monto"}}),t._v(" "),n("v-text-field",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],attrs:{label:"Estado"},domProps:{textContent:t._s(1)},model:{value:t.selectedItem.estado,callback:function(e){t.$set(t.selectedItem,"estado",e)},expression:"selectedItem.estado"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-textarea",{attrs:{label:"Descripción",hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}}),t._v(" "),[n("vue-clip",{attrs:{options:t.options,"on-complete":t.complete},scopedSlots:t._u([{key:"clip-uploader-body",fn:function(e){return t._l(e.files,function(e,r){return n("div",{key:r},["success"==e.status?n("v-icon",{attrs:{color:"success"}},[t._v("check_circle")]):t._e(),t._v(" "),"success"==e.status?n("span",{staticClass:"green--text"},[t._v(" correcto.")]):t._e(),t._v(" "),"error"==e.status?n("v-icon",{attrs:{color:"error"}},[t._v("error")]):t._e(),t._v(" "),"error"==e.status?n("span",{staticClass:"red--text"},[t._v(" "+t._s(e.errorMessage))]):t._e()],1)})}}])},[n("template",{slot:"clip-uploader-action"},[n("div",{staticClass:"dz-message v-btn v-btn--small theme--light success"},[t._v("Subir archivo PDF")])])],2)],t._v(" "),n("v-text-field",{attrs:{readonly:"",box:"",label:"Archivo PDF",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.valArchivo,callback:function(e){t.valArchivo=e},expression:"valArchivo"}})],2)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Sanciones")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}}),t._v(" "),n("v-toolbar-title",[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(e){return t.formItem(t.idpersona,{mode:"Nuevo"})}},slot:"activator"},[n("v-icon",[t._v("add_circle")])],1),t._v(" "),n("span",[t._v("Registrar Cumplimiento")])],1)],1)],1),t._v(" "),n("v-card-text",[n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.nominfraccion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.codigo)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.monto)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.descripcion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[0==e.item.estado?n("v-chip",{attrs:{color:"default","text-color":"white"}},[t._v("No cumplido ")]):t._e(),t._v(" "),1==e.item.estado?n("v-chip",{attrs:{color:"success","text-color":"white"}},[t._v("Cumplido")]):t._e()],1),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item,{mode:"Editar"})}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Adjunto: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.adjunto,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)])])])],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Registro de Cumplimiento de Sanciones Monetarias")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Sanciones",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-left",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.fullName(e.item))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.carnet_identidad+" "+e.item.departamento_extension.sigla)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.sancionItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("assignment")])],1),t._v(" "),n("span",[t._v("Sanciones Monetarias")])],1)],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Estado civil: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.estado_civil))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Genero: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s("M"==e.item.genero?"Masculino":"Femenino"))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Telefono: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.telefono))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Email: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.email))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Domicilio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.domicilio))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.fecha_nacimiento)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Pais de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.pais_nacimiento.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Departamento de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.departamento_nacimiento_id?n("span",[t._v("\n "+t._s(e.item.departamento_nacimiento.nombre)+"\n ")]):t._e()])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Provincia de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.provincia_nacimiento_id?n("span",[t._v("\n "+t._s(e.item.provincia_nacimiento.nombre)+"\n ")]):t._e()])])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1184),n(1187),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(384),l=n.n(u);e.default={components:{Form:l.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre",value:"primer_apellido",align:"center"},{text:"Carnet de identidad",value:"carnet_identidad",align:"center"},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t,e=(t=i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/persona");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}(),sancionItem:function(t){this.bus.$emit("openDialogSancion",t)},fullName:function(t){return[t.nombre,t.primer_apellido,t.segundo_apellido].join(" ")},image:function(t){return t.fotografia},formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o),c=n(6),u=n.n(c),l=n(384),d=n.n(l);function f(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}e.default={components:{RemoveItem:u.a,Form:d.a},props:["item","bus"],data:function(){var t;return f(t={valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},table:[],search:null,headers:[{text:"Infracción",value:"infraccion.nombre",align:"center"},{text:"Codigo",value:"codigo",align:"center"},{text:"Nombre Sanción",value:"nombre",align:"center"},{text:"Monto",value:"monto",align:"center"},{text:"Descripción",value:"descripcion",align:"center"},{text:"Estado",value:"estado",align:"center"}]},"table",[]),f(t,"search",""),f(t,"idpersona",0),t},computed:{},mounted:function(){var t=this;this.bus.$on("openDialogSancion",function(e){t.idpersona=e.id,t.dialog=!0,t.selectedItem=e,t.getTable()}),this.bus.$on("closeDialogForm",function(){t.getTable()})},methods:{close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={},this.table=[],this.bus.$emit("closeDialog",this.selecteditem)},getTable:function(){var t,e=(t=i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,void 0===this.selectedItem.id){t.next=6;break}return t.next=4,s.a.get("api/sancion/showfill/"+this.selectedItem.id);case 4:e=t.sent,this.table=e.data;case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Infracciones")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}})],1),t._v(" "),n("v-card-text",[n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.nominfraccion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.codigo)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.monto)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.descripcion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[0==e.item.estado?n("v-chip",{attrs:{color:"default","text-color":"white"}},[t._v("No cumplido ")]):t._e(),t._v(" "),1==e.item.estado?n("v-chip",{attrs:{color:"success","text-color":"white"}},[t._v("Cumplido")]):t._e()],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Adjunto: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[n("v-btn",{attrs:{icon:"",href:e.item.adjunto,target:"_blank"}},[n("v-icon",{attrs:{color:"red"}},[t._v("picture_as_pdf")])],1)],1)])])])],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Consulta de Infracciones y Sanciones")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-left",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.fullName(e.item))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.carnet_identidad+" "+e.item.departamento_extension.sigla)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.sancionItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("assignment")])],1),t._v(" "),n("span",[t._v("Ver Infracciones y Sanciones")])],1)],1)])]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs3:""}},[n("v-avatar",{attrs:{size:"150px"}},[n("img",{attrs:{src:e.item.fotografia}})])],1),t._v(" "),n("v-flex",{attrs:{xs9:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Estado civil: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.estado_civil))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Genero: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s("M"==e.item.genero?"Masculino":"Femenino"))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Telefono: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.telefono))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Email: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.email))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Domicilio: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.domicilio))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Fecha de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(t.formatDate(e.item.fecha_nacimiento)))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Pais de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.pais_nacimiento.nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Departamento de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.departamento_nacimiento_id?n("span",[t._v("\n "+t._s(e.item.departamento_nacimiento.nombre)+"\n ")]):t._e()])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Provincia de nacimiento: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[e.item.provincia_nacimiento_id?n("span",[t._v("\n "+t._s(e.item.provincia_nacimiento.nombre)+"\n ")]):t._e()])])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1191),n(1192),!1,function(t){n(1189)},null,null);t.exports=r.exports},function(t,e,n){var r=n(1190);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n(85)("10d4e7a6",r,!0,{})},function(t,e,n){(t.exports=n(55)(!1)).push([t.i,".label0{font-size:1.2em}",""])},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o),c=n(68);n.n(c);function u(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{},data:function(){return{theDate:new Date,headers:[{text:"Tipo de reporte",value:"name",align:"center"},{text:"Opciones",align:"center",sortable:!1}],reportes:[{id:"hojaruta",name:"Reporte Diario de Hojas de Ruta Procesadas"},{id:"cantidad",name:"Reporte de Cantidad de Productores, Productores al Detalle y Comercializadores"},{id:"infopro",name:"Reporte de Información General - Productores"},{id:"infoprodet",name:"Reporte de Información General - Productores al detalle"},{id:"infocom",name:"Reporte de Información General - Comercializadores"},{id:"infoemp",name:"Reporte de Información General - Empresas industrializadoras"},{id:"infoben",name:"Reporte de Información General - Beneficiarios"},{id:"guiaint",name:"Reporte de Comercialización de Guías de Internación"},{id:"hojacom",name:"Reporte de Hojas de Ruta de Comercialización (kardex)"},{id:"volguia",name:"Reporte de Volumen de transporte de Guías de Internación"},{id:"volruta",name:"Reporte de Volumen de Transporte de Hojas de Ruta"},{id:"volcom",name:"Reporte de Volumen de Hoja de Coca comercializada"},{id:"voldepo",name:"Reporte de Volumen de Hoja de Coca Disponible, Entrante y saliente"}],fecha:[],valid:!0,menu:null,menu2:null,ini_date_formatted:null,fin_date_formatted:null,fecha_ini:null,fecha_fin:null,begin_date:null,end_date:null,search:"",api:"",param:"",filename:""}},computed:{},mounted:function(){this.formattedDate()},watch:{begin_date:function(t){this.fecha_ini=t,this.ini_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")},end_date:function(t){this.fecha_fin=t,this.fin_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},methods:{validateIni:function(t){return!(this.fecha_ini>this.fecha_fin)||"La fecha de inicio debe ser menor a la fecha de fin"},validateFin:function(t){return!(this.fecha_ini>this.fecha_fin)||"La fecha de fin debe ser mayor a la fecha de inicio"},formattedDate:function(){this.ini_date_formatted=this.$moment(this.theDate).format("DD/MM/YYYY"),this.fin_date_formatted=this.$moment(this.theDate).format("DD/MM/YYYY"),this.fecha_ini=this.$moment(this.theDate).format("YYYY-MM-DD"),this.fecha_fin=this.$moment(this.theDate).format("YYYY-MM-DD")},reporteExcel:function(){var t=u(i.a.mark(function t(e){var n,r,a,o,c,u;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.api="api/reporte/excel/?tipo="+e.id+"&fechaini="+this.fecha_ini+"&fechafin="+this.fecha_fin,this.filename=e.name,!(this.fecha_ini>this.fecha_fin)){t.next=6;break}this.$toast.error("Debe seleccionar la fecha correctamente"),t.next=24;break;case 6:return t.prev=6,t.next=9,s()({method:"GET",url:this.api,responseType:"arraybuffer"});case 9:n=t.sent,r=new Blob([n.data],{type:"application/vnd.ms-excel"}),a=window.URL.createObjectURL(r),(o=document.createElement("a")).href=a,c=new Date,u=this.$moment(c).format("DD-MM-YYYY "),o.setAttribute("download",this.filename+"-"+u+".xlsx"),document.body.appendChild(o),o.click(),t.next=24;break;case 21:t.prev=21,t.t0=t.catch(6),console.log(t.t0);case 24:case"end":return t.stop()}},t,this,[[6,21]])}));return function(e){return t.apply(this,arguments)}}(),reportePDF:function(){var t=u(i.a.mark(function t(e){var n,r,a,o,c,u;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.api="api/reporte/pdf/?tipo="+e.id+"&fechaini="+this.fecha_ini+"&fechafin="+this.fecha_fin,this.filename=e.name,!(this.fecha_ini>this.fecha_fin)){t.next=6;break}this.$toast.error("Debe seleccionar la fecha correctamente"),t.next=24;break;case 6:return t.prev=6,t.next=9,s()({method:"GET",url:this.api,responseType:"arraybuffer"});case 9:n=t.sent,r=new Blob([n.data],{type:"application/pdf"}),a=window.URL.createObjectURL(r),(o=document.createElement("a")).href=a,c=new Date,u=this.$moment(c).format("DD-MM-YYYY "),o.setAttribute("download",this.filename+"-"+u+".pdf"),document.body.appendChild(o),o.click(),t.next=24;break;case 21:t.prev=21,t.t0=t.catch(6),console.log(t.t0);case 24:case"end":return t.stop()}},t,this,[[6,21]])}));return function(e){return t.apply(this,arguments)}}(),formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Reportes de Comercialización")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1)],1),t._v(" "),n("v-card",[n("v-card-text",[n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs4:""}},[n("v-subheader",{staticClass:"black--text label0",attrs:{"align-center":""}},[t._v("Elegir fecha para el reporte")])],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de inicio",value:t.formattedDate,"prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"},t.validateIni],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.ini_date_formatted,callback:function(e){t.ini_date_formatted=e},expression:"ini_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":""},on:{input:function(e){t.menu=!1}},model:{value:t.begin_date,callback:function(e){t.begin_date=e},expression:"begin_date"}})],1)],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu2,callback:function(e){t.menu2=e},expression:"menu2"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de finalización",value:t.formattedDate,"prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"},t.validateFin],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.fin_date_formatted,callback:function(e){t.fin_date_formatted=e},expression:"fin_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":""},on:{input:function(e){t.menu2=!1}},model:{value:t.end_date,callback:function(e){t.end_date=e},expression:"end_date"}})],1)],1)],1)],1)],1)],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.reportes,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.name))]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"green"},on:{click:function(n){return t.reporteExcel(e.item)}},slot:"activator"},[n("v-icon",[t._v("note")])],1),t._v(" "),n("span",[t._v("Excel")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.reportePDF(e.item)}},slot:"activator"},[n("v-icon",[t._v("picture_as_pdf")])],1),t._v(" "),n("span",[t._v("PDF")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("Sin resultados.")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1196),n(1197),!1,function(t){n(1194)},null,null);t.exports=r.exports},function(t,e,n){var r=n(1195);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n(85)("9d364ace",r,!0,{})},function(t,e,n){(t.exports=n(55)(!1)).push([t.i,".label0{font-size:1.2em}",""])},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o),c=n(68);n.n(c);function u(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{},data:function(){return{theDate:new Date,headers:[{text:"Tipo de reporte",value:"name",align:"center"},{text:"Opciones",align:"center",sortable:!1}],reportes:[{id:"infoempind",name:"Reporte de Información General de Empresas Industrializadoras"},{id:"infoinv",name:"Reporte de Información General de Entidades e Instituciones de Investigación"},{id:"canthojemp",name:"Reporte de Cantidad de Hoja de Coca Comprada. Por empresa industrializadora, por periodo de tiempo"}],fecha:[],valid:!0,menu:null,menu2:null,ini_date_formatted:null,fin_date_formatted:null,fecha_ini:null,fecha_fin:null,begin_date:null,end_date:null,search:"",api:"",param:"",filename:""}},computed:{},mounted:function(){this.formattedDate()},watch:{begin_date:function(t){this.fecha_ini=t,this.ini_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")},end_date:function(t){this.fecha_fin=t,this.fin_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},methods:{validateIni:function(t){return!(this.fecha_ini>this.fecha_fin)||"La fecha de inicio debe ser menor a la fecha de fin"},validateFin:function(t){return!(this.fecha_ini>this.fecha_fin)||"La fecha de fin debe ser mayor a la fecha de inicio"},formattedDate:function(){this.ini_date_formatted=this.$moment(this.theDate).format("DD/MM/YYYY"),this.fin_date_formatted=this.$moment(this.theDate).format("DD/MM/YYYY"),this.fecha_ini=this.$moment(this.theDate).format("YYYY-MM-DD"),this.fecha_fin=this.$moment(this.theDate).format("YYYY-MM-DD")},getTable:function(){var t=u(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),reporteExcel:function(){var t=u(i.a.mark(function t(e){var n,r,a,o,c,u;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.api="api/reporte/excel/?tipo="+e.id+"&fechaini="+this.fecha_ini+"&fechafin="+this.fecha_fin,this.filename=e.name,!(this.fecha_ini>this.fecha_fin)){t.next=6;break}this.$toast.error("Debe seleccionar la fecha correctamente"),t.next=24;break;case 6:return t.prev=6,t.next=9,s()({method:"GET",url:this.api,responseType:"arraybuffer"});case 9:n=t.sent,r=new Blob([n.data],{type:"application/vnd.ms-excel"}),a=window.URL.createObjectURL(r),(o=document.createElement("a")).href=a,c=new Date,u=this.$moment(c).format("DD-MM-YYYY "),o.setAttribute("download",this.filename+"-"+u+".xlsx"),document.body.appendChild(o),o.click(),t.next=24;break;case 21:t.prev=21,t.t0=t.catch(6),console.log(t.t0);case 24:case"end":return t.stop()}},t,this,[[6,21]])}));return function(e){return t.apply(this,arguments)}}(),reportePDF:function(){var t=u(i.a.mark(function t(e){var n,r,a,o,c,u;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.api="api/reporte/pdf/?tipo="+e.id+"&fechaini="+this.fecha_ini+"&fechafin="+this.fecha_fin,this.filename=e.name,!(this.fecha_ini>this.fecha_fin)){t.next=6;break}this.$toast.error("Debe seleccionar la fecha correctamente"),t.next=24;break;case 6:return t.prev=6,t.next=9,s()({method:"GET",url:this.api,responseType:"arraybuffer"});case 9:n=t.sent,r=new Blob([n.data],{type:"application/pdf"}),a=window.URL.createObjectURL(r),(o=document.createElement("a")).href=a,c=new Date,u=this.$moment(c).format("DD-MM-YYYY "),o.setAttribute("download",this.filename+"-"+u+".pdf"),document.body.appendChild(o),o.click(),t.next=24;break;case 21:t.prev=21,t.t0=t.catch(6),console.log(t.t0);case 24:case"end":return t.stop()}},t,this,[[6,21]])}));return function(e){return t.apply(this,arguments)}}(),formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Reportes de Industrialización")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1)],1),t._v(" "),n("v-card",[n("v-card-text",[n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs4:""}},[n("v-subheader",{staticClass:"black--text label0",attrs:{"align-center":""}},[t._v("Elegir fecha para el reporte")])],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de inicio",value:t.formattedDate,"prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"},t.validateIni],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.ini_date_formatted,callback:function(e){t.ini_date_formatted=e},expression:"ini_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":""},on:{input:function(e){t.menu=!1}},model:{value:t.begin_date,callback:function(e){t.begin_date=e},expression:"begin_date"}})],1)],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu2,callback:function(e){t.menu2=e},expression:"menu2"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de finalización",value:t.formattedDate,"prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"},t.validateFin],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.fin_date_formatted,callback:function(e){t.fin_date_formatted=e},expression:"fin_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":""},on:{input:function(e){t.menu2=!1}},model:{value:t.end_date,callback:function(e){t.end_date=e},expression:"end_date"}})],1)],1)],1)],1)],1)],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.reportes,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.name))]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"green"},on:{click:function(n){return t.reporteExcel(e.item)}},slot:"activator"},[n("v-icon",[t._v("note")])],1),t._v(" "),n("span",[t._v("Excel")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.reportePDF(e.item)}},slot:"activator"},[n("v-icon",[t._v("picture_as_pdf")])],1),t._v(" "),n("span",[t._v("PDF")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("Sin resultados.")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1201),n(1202),!1,function(t){n(1199)},null,null);t.exports=r.exports},function(t,e,n){var r=n(1200);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n(85)("0d37f294",r,!0,{})},function(t,e,n){(t.exports=n(55)(!1)).push([t.i,".label0{font-size:1.2em}",""])},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o),c=n(68);n.n(c);function u(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{},data:function(){return{theDate:new Date,headers:[{text:"Tipo de reporte",value:"name",align:"center"},{text:"Opciones",align:"center",sortable:!1}],reportes:[{id:"proyecto",name:"Reporte de Proyectos"},{id:"oii",name:"Reporte de Obras de Impacto Inmediato"},{id:"capacitacion",name:"Reporte de Capacitaciones y Asistencias técnicas"}],fecha:[],valid:!0,menu:null,menu2:null,ini_date_formatted:null,fin_date_formatted:null,fecha_ini:null,fecha_fin:null,begin_date:null,end_date:null,search:"",api:"",param:"",filename:""}},computed:{},mounted:function(){this.formattedDate()},watch:{begin_date:function(t){this.fecha_ini=t,this.ini_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")},end_date:function(t){this.fecha_fin=t,this.fin_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},methods:{validateIni:function(t){return!(this.fecha_ini>this.fecha_fin)||"La fecha de inicio debe ser menor a la fecha de fin"},validateFin:function(t){return!(this.fecha_ini>this.fecha_fin)||"La fecha de fin debe ser mayor a la fecha de inicio"},formattedDate:function(){this.ini_date_formatted=this.$moment(this.theDate).format("DD/MM/YYYY"),this.fin_date_formatted=this.$moment(this.theDate).format("DD/MM/YYYY"),this.fecha_ini=this.$moment(this.theDate).format("YYYY-MM-DD"),this.fecha_fin=this.$moment(this.theDate).format("YYYY-MM-DD")},reporteExcel:function(){var t=u(i.a.mark(function t(e){var n,r,a,o,c,u;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.api="api/reporte/excel/?tipo="+e.id+"&fechaini="+this.fecha_ini+"&fechafin="+this.fecha_fin,this.filename=e.name,!(this.fecha_ini>this.fecha_fin)){t.next=6;break}this.$toast.error("Debe seleccionar la fecha correctamente"),t.next=24;break;case 6:return t.prev=6,t.next=9,s()({method:"GET",url:this.api,responseType:"arraybuffer"});case 9:n=t.sent,r=new Blob([n.data],{type:"application/vnd.ms-excel"}),a=window.URL.createObjectURL(r),(o=document.createElement("a")).href=a,c=new Date,u=this.$moment(c).format("DD-MM-YYYY "),o.setAttribute("download",this.filename+"-"+u+".xlsx"),document.body.appendChild(o),o.click(),t.next=24;break;case 21:t.prev=21,t.t0=t.catch(6),console.log(t.t0);case 24:case"end":return t.stop()}},t,this,[[6,21]])}));return function(e){return t.apply(this,arguments)}}(),reportePDF:function(){var t=u(i.a.mark(function t(e){var n,r,a,o,c,u;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.api="api/reporte/pdf/?tipo="+e.id+"&fechaini="+this.fecha_ini+"&fechafin="+this.fecha_fin,this.filename=e.name,!(this.fecha_ini>this.fecha_fin)){t.next=6;break}this.$toast.error("Debe seleccionar la fecha correctamente"),t.next=24;break;case 6:return t.prev=6,t.next=9,s()({method:"GET",url:this.api,responseType:"arraybuffer"});case 9:n=t.sent,r=new Blob([n.data],{type:"application/pdf"}),a=window.URL.createObjectURL(r),(o=document.createElement("a")).href=a,c=new Date,u=this.$moment(c).format("DD-MM-YYYY "),o.setAttribute("download",this.filename+"-"+u+".pdf"),document.body.appendChild(o),o.click(),t.next=24;break;case 21:t.prev=21,t.t0=t.catch(6),console.log(t.t0);case 24:case"end":return t.stop()}},t,this,[[6,21]])}));return function(e){return t.apply(this,arguments)}}(),formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Reportes de Desarrollo Integral")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1)],1),t._v(" "),n("v-card",[n("v-card-text",[n("v-form",{ref:"form1",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs4:""}},[n("v-subheader",{staticClass:"black--text label0",attrs:{"align-center":""}},[t._v("Elegir fecha para el reporte")])],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de inicio",value:t.formattedDate,"prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"},t.validateIni],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.ini_date_formatted,callback:function(e){t.ini_date_formatted=e},expression:"ini_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":""},on:{input:function(e){t.menu=!1}},model:{value:t.begin_date,callback:function(e){t.begin_date=e},expression:"begin_date"}})],1)],1),t._v(" "),n("v-flex",{attrs:{xs4:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu2,callback:function(e){t.menu2=e},expression:"menu2"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de finalización",value:t.formattedDate,"prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"},t.validateFin],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.fin_date_formatted,callback:function(e){t.fin_date_formatted=e},expression:"fin_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":""},on:{input:function(e){t.menu2=!1}},model:{value:t.end_date,callback:function(e){t.end_date=e},expression:"end_date"}})],1)],1)],1)],1)],1)],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.reportes,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.name))]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"green"},on:{click:function(n){return t.reporteExcel(e.item)}},slot:"activator"},[n("v-icon",[t._v("note")])],1),t._v(" "),n("span",[t._v("Excel")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.reportePDF(e.item)}},slot:"activator"},[n("v-icon",[t._v("picture_as_pdf")])],1),t._v(" "),n("span",[t._v("PDF")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("Sin resultados.")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1204),n(1208),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1205),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Titulo",value:"nombre",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:"",socket:null}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("/api/notificaciones/eventos");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/tipo_convocatoria/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1206),n(1207),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},error:"",prioridad:["BAJA","MEDIA","ALTA"]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t,e=(t=i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/notificaciones/eventos"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("/api/notificaciones/eventos",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},on:{submit:function(t){t.preventDefault()}},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm12:"",md12:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Nombre del evento Exepcional",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},model:{value:t.selectedItem.titulo,callback:function(e){t.$set(t.selectedItem,"titulo",e)},expression:"selectedItem.titulo"}}),t._v(" "),n("v-textarea",{attrs:{label:"Descripcion",rules:[function(t){return!!t||"requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}}),t._v(" "),n("v-select",{attrs:{items:t.prioridad,label:"Prioridad"},model:{value:t.selectedItem.prioridad,callback:function(e){t.$set(t.selectedItem,"prioridad",e)},expression:"selectedItem.prioridad"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("\n Eventos Exepcionales\n ")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.titulo))]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1210),n(1214),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1211),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Titulo",value:"nombre",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:"",socket:null}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("/api/notificaciones/mis_registros");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/tipo_convocatoria/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1212),n(1213),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},error:"",eventos:[],menu_ini:null,menu_hora_ini:null,menu_fin:null,menu_hora_fin:null,puestos_control:[]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e}),this.getEventos(),this.getPuestosControl()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},getEventos:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("/api/notificaciones/eventos");case 2:e=t.sent,this.eventos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getPuestosControl:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("/api/puesto_de_control");case 2:e=t.sent,this.puestos_control=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),save:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=7;break}return e={evento_id:this.selectedItem.evento_id,puesto_id:this.selectedItem.puesto_id,observaciones:this.selectedItem.descripcion,hora_inicio:this.selectedItem.fecha_inicio+" "+this.selectedItem.hora_inicio,hora_fin:this.selectedItem.fecha_fin+" "+this.selectedItem.hora_fin},t.next=5,s.a.post("/api/notificaciones/registro_eventos",e);case 5:this.$toast.success("Correcto."),this.close();case 7:t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),console.log(t.t0);case 12:case"end":return t.stop()}},t,this,[[0,9]])}));return function(){return t.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},on:{submit:function(t){t.preventDefault()}},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs6:"",sm6:"",md6:""}},[n("v-card-text",[n("v-autocomplete",{attrs:{rules:[function(t){return!!t||"requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error,"prepend-icon":"mdi-city",items:t.eventos,"item-text":"titulo","item-value":"id",label:"Evento"},model:{value:t.selectedItem.evento_id,callback:function(e){t.$set(t.selectedItem,"evento_id",e)},expression:"selectedItem.evento_id"}}),t._v(" "),n("v-autocomplete",{attrs:{rules:[function(t){return!!t||"requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error,"prepend-icon":"mdi-city",items:t.puestos_control,"item-text":"nombre","item-value":"id",label:"Puesto de control"},model:{value:t.selectedItem.puesto_id,callback:function(e){t.$set(t.selectedItem,"puesto_id",e)},expression:"selectedItem.puesto_id"}}),t._v(" "),n("v-textarea",{attrs:{label:"Descripcion",rules:[function(t){return!!t||"requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}})],1)],1),t._v(" "),n("v-flex",{attrs:{xs6:"",sm6:"",md6:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu_ini,callback:function(e){t.menu_ini=e},expression:"menu_ini"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de Inicio","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.selectedItem.fecha_inicio,callback:function(e){t.$set(t.selectedItem,"fecha_inicio",e)},expression:"selectedItem.fecha_inicio"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":""},on:{input:function(e){t.menu=!1}},model:{value:t.selectedItem.fecha_inicio,callback:function(e){t.$set(t.selectedItem,"fecha_inicio",e)},expression:"selectedItem.fecha_inicio"}})],1),t._v(" "),n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu_hora_ini,callback:function(e){t.menu_hora_ini=e},expression:"menu_hora_ini"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Hora de Inicio","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.selectedItem.hora_inicio,callback:function(e){t.$set(t.selectedItem,"hora_inicio",e)},expression:"selectedItem.hora_inicio"}}),t._v(" "),n("v-time-picker",{attrs:{landscape:!1},on:{input:function(e){t.menu=!1}},model:{value:t.selectedItem.hora_inicio,callback:function(e){t.$set(t.selectedItem,"hora_inicio",e)},expression:"selectedItem.hora_inicio"}})],1),t._v(" "),n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu_fin,callback:function(e){t.menu_fin=e},expression:"menu_fin"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de finalizacion","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.selectedItem.fecha_fin,callback:function(e){t.$set(t.selectedItem,"fecha_fin",e)},expression:"selectedItem.fecha_fin"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":""},on:{input:function(e){t.menu=!1}},model:{value:t.selectedItem.fecha_fin,callback:function(e){t.$set(t.selectedItem,"fecha_fin",e)},expression:"selectedItem.fecha_fin"}})],1),t._v(" "),n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu_hora_fin,callback:function(e){t.menu_hora_fin=e},expression:"menu_hora_fin"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Hora de Finalizacion","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.selectedItem.hora_fin,callback:function(e){t.$set(t.selectedItem,"hora_fin",e)},expression:"selectedItem.hora_fin"}}),t._v(" "),n("v-time-picker",{attrs:{landscape:!1},on:{input:function(e){t.menu=!1}},model:{value:t.selectedItem.hora_fin,callback:function(e){t.$set(t.selectedItem,"hora_fin",e)},expression:"selectedItem.hora_fin"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("\n Eventos Expecionales\n ")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.titulo))]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1216),n(1220),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1217),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Evento",value:"nombre",align:"center"},{text:"Puesto de control",value:"puesto_control",align:"center"},{text:"Usuario",value:"usuario",align:"center"},{text:"Fecha de evento",value:"fecha_evento",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:"",socket:null,messages:[]}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()}),window.Echo.channel("eventos_exepcionales").listen("SaltoPuestoControl",function(e){t.OnControlHojaEvent(e.control_hoja)})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("/api/notificaciones/registros");case 3:e=t.sent,this.table=e.data,t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/tipo_convocatoria/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),OnControlHojaEvent:function(t){this.$toast.info(t.evento," en ",t.puesto_control),this.table.unshift(t)}}}},function(t,e,n){var r=n(0)(n(1218),n(1219),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},error:"",eventos:[],menu_ini:null,menu_hora_ini:null,menu_fin:null,menu_hora_fin:null,puestos_control:[]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e}),this.getEventos(),this.getPuestosControl()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},getEventos:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("/api/notificaciones/eventos");case 2:e=t.sent,this.eventos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getPuestosControl:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("/api/puesto_de_control");case 2:e=t.sent,this.puestos_control=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),save:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=7;break}return e={evento_id:this.selectedItem.evento_id,puesto_id:this.selectedItem.puesto_id,observaciones:this.selectedItem.descripcion,hora_inicio:this.selectedItem.fecha_inicio+" "+this.selectedItem.hora_inicio,hora_fin:this.selectedItem.fecha_fin+" "+this.selectedItem.hora_fin},t.next=5,s.a.post("/api/notificaciones/registro_eventos",e);case 5:this.$toast.success("Correcto."),this.close();case 7:t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),console.log(t.t0);case 12:case"end":return t.stop()}},t,this,[[0,9]])}));return function(){return t.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},on:{submit:function(t){t.preventDefault()}},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs6:"",sm6:"",md6:""}},[n("v-card-text",[n("v-autocomplete",{attrs:{rules:[function(t){return!!t||"requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error,"prepend-icon":"mdi-city",items:t.eventos,"item-text":"titulo","item-value":"id",label:"Evento"},model:{value:t.selectedItem.evento_id,callback:function(e){t.$set(t.selectedItem,"evento_id",e)},expression:"selectedItem.evento_id"}}),t._v(" "),n("v-autocomplete",{attrs:{rules:[function(t){return!!t||"requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error,"prepend-icon":"mdi-city",items:t.puestos_control,"item-text":"nombre","item-value":"id",label:"Puesto de control"},model:{value:t.selectedItem.puesto_id,callback:function(e){t.$set(t.selectedItem,"puesto_id",e)},expression:"selectedItem.puesto_id"}}),t._v(" "),n("v-textarea",{attrs:{label:"Descripcion",rules:[function(t){return!!t||"requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}})],1)],1),t._v(" "),n("v-flex",{attrs:{xs6:"",sm6:"",md6:""}},[n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu_ini,callback:function(e){t.menu_ini=e},expression:"menu_ini"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de Inicio","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.selectedItem.fecha_inicio,callback:function(e){t.$set(t.selectedItem,"fecha_inicio",e)},expression:"selectedItem.fecha_inicio"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":""},on:{input:function(e){t.menu=!1}},model:{value:t.selectedItem.fecha_inicio,callback:function(e){t.$set(t.selectedItem,"fecha_inicio",e)},expression:"selectedItem.fecha_inicio"}})],1),t._v(" "),n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu_hora_ini,callback:function(e){t.menu_hora_ini=e},expression:"menu_hora_ini"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Hora de Inicio","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.selectedItem.hora_inicio,callback:function(e){t.$set(t.selectedItem,"hora_inicio",e)},expression:"selectedItem.hora_inicio"}}),t._v(" "),n("v-time-picker",{attrs:{landscape:!1},on:{input:function(e){t.menu=!1}},model:{value:t.selectedItem.hora_inicio,callback:function(e){t.$set(t.selectedItem,"hora_inicio",e)},expression:"selectedItem.hora_inicio"}})],1),t._v(" "),n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu_fin,callback:function(e){t.menu_fin=e},expression:"menu_fin"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha de finalizacion","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.selectedItem.fecha_fin,callback:function(e){t.$set(t.selectedItem,"fecha_fin",e)},expression:"selectedItem.fecha_fin"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":""},on:{input:function(e){t.menu=!1}},model:{value:t.selectedItem.fecha_fin,callback:function(e){t.$set(t.selectedItem,"fecha_fin",e)},expression:"selectedItem.fecha_fin"}})],1),t._v(" "),n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu_hora_fin,callback:function(e){t.menu_hora_fin=e},expression:"menu_hora_fin"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Hora de Finalizacion","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.selectedItem.hora_fin,callback:function(e){t.$set(t.selectedItem,"hora_fin",e)},expression:"selectedItem.hora_fin"}}),t._v(" "),n("v-time-picker",{attrs:{landscape:!1},on:{input:function(e){t.menu=!1}},model:{value:t.selectedItem.hora_fin,callback:function(e){t.$set(t.selectedItem,"hora_fin",e)},expression:"selectedItem.hora_fin"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("\n Monitoreo de eventos\n ")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.evento))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.puesto_control))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.usuario))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.hora_inicio))]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1222),n(1226),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1223),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Codigo",value:"codigo",align:"center"},{text:"Nombre",value:"nombre",align:"center"},{text:"Color",value:"color",align:"center"},{text:"Descripción",value:"descripcion",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/zona_autorizada");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/zona_autorizada/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1224),n(1225),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},error:""}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/zona_autorizada/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/zona_autorizada",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}));return function(){return t.apply(this,arguments)}}(),codevalidate:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e={codigo:this.selectedItem.codigo},t.next=3,s.a.get("api/zona_autorizada/show_fill/"+JSON.stringify(e));case 3:t.sent.data.length>0?this.error="El codigo ya existe":this.error="";case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Codigo",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=5||"No mayor a 5 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},on:{change:function(e){return t.codevalidate()}},model:{value:t.selectedItem.codigo,callback:function(e){t.$set(t.selectedItem,"codigo",e)},expression:"selectedItem.codigo"}}),t._v(" "),n("v-text-field",{attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Color",type:"color",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.color,callback:function(e){t.$set(t.selectedItem,"color",e)},expression:"selectedItem.color"}}),t._v(" "),n("v-textarea",{attrs:{label:"Descripción",rows:"1",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 100 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Zonas Autorizadas")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.codigo)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[n("v-chip",{attrs:{small:"",color:e.item.color,"text-color":e.item.color}})],1),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.descripcion)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1228),n(1232),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1229),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Codigo",value:"codigo",align:"center"},{text:"Nombre",value:"nombre",align:"center"},{text:"Descripción",value:"descripcion",align:"center"},{text:"Sigla",value:"sigla",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/departamento");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/departamento/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1230),n(1231),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},error:""}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/departamento/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/departamento",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}));return function(){return t.apply(this,arguments)}}(),codevalidate:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e={codigo:this.selectedItem.codigo},t.next=3,s.a.get("api/departamento/show_fill/"+JSON.stringify(e));case 3:t.sent.data.length>0?this.error="El codigo ya existe":this.error="";case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getZonasProductivas:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/zona_autorizada");case 2:e=t.sent,this.zonas_productivas=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Codigo",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=5||"No mayor a 5 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},on:{change:function(e){return t.codevalidate()}},model:{value:t.selectedItem.codigo,callback:function(e){t.$set(t.selectedItem,"codigo",e)},expression:"selectedItem.codigo"}}),t._v(" "),n("v-text-field",{attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Sigla",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=3||"No mayor a 3 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.sigla,callback:function(e){t.$set(t.selectedItem,"sigla",e)},expression:"selectedItem.sigla"}}),t._v(" "),n("v-textarea",{attrs:{label:"Descripción",rows:"1",hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Departamentos")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.codigo)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.descripcion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.sigla)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1234),n(1238),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1235),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Departamento",value:"departamento.nombre",align:"center"},{text:"Codigo",value:"codigo",align:"center"},{text:"Nombre",value:"nombre",align:"center"},{text:"Descripción",value:"descripcion",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/provincia");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/provincia/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1236),n(1237),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},departamentos:[],error:""}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e}),this.getDepartamentos()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{getDepartamentos:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/departamento");case 2:e=t.sent,this.departamentos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/provincia/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/provincia",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}));return function(){return t.apply(this,arguments)}}(),codevalidate:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e={codigo:this.selectedItem.codigo},t.next=3,s.a.get("api/provincia/show_fill/"+JSON.stringify(e));case 3:t.sent.data.length>0?this.error="El codigo ya existe":this.error="";case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-select",{attrs:{items:t.departamentos,"item-text":"nombre","item-value":"id",label:"Departamento",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.departamento_id,callback:function(e){t.$set(t.selectedItem,"departamento_id",e)},expression:"selectedItem.departamento_id"}}),t._v(" "),n("v-text-field",{attrs:{label:"Codigo",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=5||"No mayor a 5 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},on:{change:function(e){return t.codevalidate()}},model:{value:t.selectedItem.codigo,callback:function(e){t.$set(t.selectedItem,"codigo",e)},expression:"selectedItem.codigo"}}),t._v(" "),n("v-text-field",{attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-textarea",{attrs:{label:"Descripción",hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Provincias")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.departamento.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.codigo)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.descripcion)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1240),n(1244),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1241),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Provincia",value:"provincia.nombre",align:"center"},{text:"Codigo",value:"codigo",align:"center"},{text:"Nombre",value:"nombre",align:"center"},{text:"Descripción",value:"descripcion",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/municipio");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/municipio/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1242),n(1243),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},provincias:[],error:""}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e}),this.getProvincias()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{getProvincias:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/provincia");case 2:e=t.sent,this.provincias=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/municipio/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/municipio",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}));return function(){return t.apply(this,arguments)}}(),codevalidate:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e={codigo:this.selectedItem.codigo},t.next=3,s.a.get("api/municipio/show_fill/"+JSON.stringify(e));case 3:t.sent.data.length>0?this.error="El codigo ya existe":this.error="";case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-select",{attrs:{items:t.provincias,"item-text":"nombre","item-value":"id",label:"Provincia",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.provincia_id,callback:function(e){t.$set(t.selectedItem,"provincia_id",e)},expression:"selectedItem.provincia_id"}}),t._v(" "),n("v-text-field",{attrs:{label:"Codigo",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=5||"No mayor a 5 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},on:{change:function(e){return t.codevalidate()}},model:{value:t.selectedItem.codigo,callback:function(e){t.$set(t.selectedItem,"codigo",e)},expression:"selectedItem.codigo"}}),t._v(" "),n("v-text-field",{attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-textarea",{attrs:{label:"Descripción",hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Municipios")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.provincia.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.codigo)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.descripcion)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1246),n(1250),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1247),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Municipio",value:"municipio.nombre",align:"center"},{text:"Codigo",value:"codigo",align:"center"},{text:"Nombre de la federación",value:"nombre",align:"center"},{text:"Descripción",value:"description",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/federacion");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t,e){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/federacion/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1248),n(1249),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},municipios:[],select:"",error:""}},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e}),s.a.get("api/municipio").then(function(e){t.municipios=e.data})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t,e=(t=i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/federacion/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/federacion",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}(),codevalidate:function(){var t=this;s.a.get("/api/federacion/codigo/"+this.selectedItem.codigo).then(function(e){t.error=e.data})}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-select",{attrs:{items:t.municipios,"item-text":"nombre","item-value":"id",rules:[function(t){return!!t||"Requerido"}],label:"Municipio",hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.municipio_id,callback:function(e){t.$set(t.selectedItem,"municipio_id",e)},expression:"selectedItem.municipio_id"}}),t._v(" "),n("v-text-field",{attrs:{label:"Código",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=5||"No mayor a 5 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},on:{change:function(e){return t.codevalidate()}},model:{value:t.selectedItem.codigo,callback:function(e){t.$set(t.selectedItem,"codigo",e)},expression:"selectedItem.codigo"}}),t._v(" "),n("v-text-field",{attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=100||"No mayor a 100 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-textarea",{attrs:{label:"Descripción",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=500||"No mayor a 500 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("\n Federaciones\n ")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.municipio.nombre))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.codigo))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.nombre))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.descripcion))]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-result",value:!0,color:"error",icon:"fa fa-times"},slot:"no-result"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])]],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1252),n(1256),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1253),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre",value:"nombre",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/regional");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/regional/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1254),n(1255),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},municipios:[]}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e}),this.getMunicipios()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/regional/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/regional",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}));return function(){return t.apply(this,arguments)}}(),getMunicipios:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/municipio");case 2:e=t.sent,this.municipios=e.data,console.log(e.data);case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-select",{attrs:{items:t.municipios,"item-value":"id","item-text":"nombre",label:"Municipio",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>"},model:{value:t.selectedItem.municipio_id,callback:function(e){t.$set(t.selectedItem,"municipio_id",e)},expression:"selectedItem.municipio_id"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Regionales")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1258),n(1262),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1259),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Municipio",value:"municipio.nombre",align:"center"},{text:"Codigo",value:"codigo",align:"center"},{text:"Nombre",value:"nombre",align:"center"},{text:"Descripción",value:"descripcion",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/central");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/central/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1260),n(1261),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},municipios:[],error:""}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e}),this.getMunicipios()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{getMunicipios:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/municipio");case 2:e=t.sent,this.municipios=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/central/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/central",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}));return function(){return t.apply(this,arguments)}}(),codevalidate:function(){var t=this;s.a.get("/api/central/codigo/"+this.selectedItem.codigo).then(function(e){t.error=e.data})}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-select",{attrs:{items:t.municipios,"item-text":"nombre","item-value":"id",label:"Municipio",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.municipio_id,callback:function(e){t.$set(t.selectedItem,"municipio_id",e)},expression:"selectedItem.municipio_id"}}),t._v(" "),n("v-text-field",{attrs:{label:"Codigo",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=5||"No mayor a 5 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},on:{change:function(e){return t.codevalidate()}},model:{value:t.selectedItem.codigo,callback:function(e){t.$set(t.selectedItem,"codigo",e)},expression:"selectedItem.codigo"}}),t._v(" "),n("v-text-field",{attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-textarea",{attrs:{label:"Descripción",hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Centrales")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.municipio.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.codigo)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.descripcion)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1264),n(1268),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1265),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Central",value:"central.nombre",align:"center"},{text:"Codigo",value:"codigo",align:"center"},{text:"Nombre",value:"nombre",align:"center"},{text:"Descripción",value:"descripcion",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/sindicato");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/sindicato/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1266),n(1267),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},centrales:[],error:""}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e}),this.getCentrales()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{getCentrales:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/central");case 2:e=t.sent,this.centrales=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/sindicato/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/sindicato",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}));return function(){return t.apply(this,arguments)}}(),codevalidate:function(){var t=this;s.a.get("/api/sindicato/codigo/"+this.selectedItem.codigo).then(function(e){t.error=e.data})}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-select",{attrs:{items:t.centrales,"item-text":"nombre","item-value":"id",label:"Central",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.central_id,callback:function(e){t.$set(t.selectedItem,"central_id",e)},expression:"selectedItem.central_id"}}),t._v(" "),n("v-text-field",{attrs:{label:"Codigo",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=5||"No mayor a 5 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},on:{change:function(e){return t.codevalidate()}},model:{value:t.selectedItem.codigo,callback:function(e){t.$set(t.selectedItem,"codigo",e)},expression:"selectedItem.codigo"}}),t._v(" "),n("v-text-field",{attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-textarea",{attrs:{label:"Descripción",hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Sindicatos")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.central.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.codigo)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.descripcion)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1270),n(1274),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1271),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Codigo",value:"codigo",align:"center"},{text:"Nombre",value:"nombre",align:"center"},{text:"Descripción",value:"descripcion",align:"center"},{text:"Severidad",value:"severidad",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/infraccion");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/infraccion/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1272),n(1273),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},error:""}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t,e=(t=i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=12;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/infraccion/"+this.selectedItem.id,this.selectedItem);case 5:t.next=10;break;case 7:return this.selectedItem.estado="1",t.next=10,s.a.post("api/infraccion",this.selectedItem);case 10:this.$toast.success("Correcto."),this.close();case 12:t.next=17;break;case 14:t.prev=14,t.t0=t.catch(0),console.log(t.t0);case 17:case"end":return t.stop()}},t,this,[[0,14]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}(),codevalidate:function(){var t=this;s.a.get("/api/infraccion/codigo/"+this.selectedItem.codigo).then(function(e){t.error=e.data})}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Codigo",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=5||"No mayor a 5 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},on:{change:function(e){return t.codevalidate()}},model:{value:t.selectedItem.codigo,callback:function(e){t.$set(t.selectedItem,"codigo",e)},expression:"selectedItem.codigo"}}),t._v(" "),n("v-text-field",{attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}}),t._v(" "),n("v-textarea",{attrs:{label:"Descripción",hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Severidad",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=10||"No mayor a 10 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.severidad,callback:function(e){t.$set(t.selectedItem,"severidad",e)},expression:"selectedItem.severidad"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Infracciones")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.codigo)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.descripcion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.severidad)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1276),n(1280),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1277),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Departamento",value:"departamento.nombre",align:"center"},{text:"Codigo",value:"codigo",align:"center"},{text:"Nombre",value:"nombre",align:"center"},{text:"Descripción",value:"descripcion",align:"center"},{text:"Longitud",value:"longitud",align:"center"},{text:"Latitud",value:"latitud",align:"center"},{text:"Dirección",value:"direccion",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/mercado");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/mercado/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1278),n(1279),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(74);n.n(u);function l(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{lmap:u},props:["item","bus"],data:function(){return{loading:!1,bus_map:new o.a,valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{latitud:null,longitud:null},departamentos:[],place:null,lat:-16.290154,lng:-63.588654,zoom:5,error:"",evento:!0}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.bus_map.$emit("openMap"),t.selectedItem=e,t.setMarked(),t.dialog=!0,t.evento=!0,t.selectedIndex=e,t.lat=parseFloat(e.latitud),t.lng=parseFloat(e.longitud),t.zoom=15}),this.bus_map.$on("marked",function(e){t.selectedItem.latitud=e.lat,t.selectedItem.longitud=e.lng}),this.getDepartamentos()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{openMap:function(){this.bus_map.$emit("openMap")},setMarked:function(){this.evento&&this.bus_map.$emit("setMarker",{lat:this.selectedItem.latitud,lng:this.selectedItem.longitud})},getDepartamentos:function(){var t=l(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/departamento");case 2:e=t.sent,this.departamentos=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),close:function(){this.dialog=!1,this.evento=!1,this.selectedIndex=-1,this.selectedItem={},this.$refs.form.reset(),this.bus.$emit("closeDialog")},save:function(){var t=l(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,c.a.put("api/mercado/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,c.a.post("api/mercado",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}));return function(){return t.apply(this,arguments)}}(),setDescription:function(t){this.description=t},codevalidate:function(){var t=this;c.a.get("/api/mercado/codigo/"+this.selectedItem.codigo).then(function(e){t.error=e.data})}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},on:{"!click":function(e){return t.openMap(e)}},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm4:"",md4:""}},[n("v-card-text",[n("v-select",{attrs:{items:t.departamentos,"item-text":"nombre","item-value":"id",label:"Departamento",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.departamento_id,callback:function(e){t.$set(t.selectedItem,"departamento_id",e)},expression:"selectedItem.departamento_id"}}),t._v(" "),n("v-text-field",{attrs:{label:"Codigo",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=5||"No mayor a 5 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},on:{change:function(e){return t.codevalidate()}},model:{value:t.selectedItem.codigo,callback:function(e){t.$set(t.selectedItem,"codigo",e)},expression:"selectedItem.codigo"}}),t._v(" "),n("v-text-field",{attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=100||"No mayor a 100 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}}),t._v(" "),n("v-textarea",{attrs:{label:"Descripción",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=500||"No mayor a 500 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm4:"",md4:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Latitud",type:"number",rules:[function(t){return!!t||"Requerido"},function(t){return/^-?([1-8]?[1-9]|[1-9]0)\.{1}\d{1,6}/.test(t)||"latitud incorrecta"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{input:function(e){return t.setMarked(e)},change:t.setMarked},model:{value:t.selectedItem.latitud,callback:function(e){t.$set(t.selectedItem,"latitud",e)},expression:"selectedItem.latitud"}}),t._v(" "),n("v-text-field",{attrs:{label:"Longitud",type:"number",rules:[function(t){return!!t||"Requerido"},function(t){return/^-?([1-8]?[1-9]|[1-9]0)\.{1}\d{1,6}/.test(t)||"latitud incorrecta"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{input:function(e){return t.setMarked(e)},change:t.setMarked},model:{value:t.selectedItem.longitud,callback:function(e){t.$set(t.selectedItem,"longitud",e)},expression:"selectedItem.longitud"}}),t._v(" "),n("v-textarea",{attrs:{label:"Dirección",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=500||"No mayor a 500 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.direccion,callback:function(e){t.$set(t.selectedItem,"direccion",e)},expression:"selectedItem.direccion"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm4:"",md4:""}},[n("v-card-text",[n("lmap",{staticStyle:{height:"350px"},attrs:{bus:t.bus_map}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Mercados")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.departamento.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.codigo)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.descripcion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.latitud)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.longitud)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.direccion)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1282),n(1286),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1283),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Municipio",value:"municipio.nombre",align:"center"},{text:"Codigo",value:"codigo",align:"center"},{text:"Nombre",value:"nombre",align:"center"},{text:"Descripción",value:"descripcion",align:"center"},{text:"Latitud",value:"descripcion",align:"center"},{text:"Longitud",value:"descripcion",align:"center"},{text:" Dirección",value:"descripcion",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e,n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/puesto_de_control");case 3:for(e=t.sent,n=0;n<e.data.length;n++)e.data[n].rutas.length>0?e.data[n].borrar=!0:e.data[n].borrar=!1;this.table=e.data,t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/puesto_de_control/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1284),n(1285),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(74);n.n(u);function l(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{lmap:u},props:["item","bus"],data:function(){return{loading:!1,bus_map:new o.a,valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{latitud:null,longitud:null},municipios:[],place:null,lat:-16.290154,lng:-63.588654,zoom:5,error:"",evento:!0}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.bus_map.$emit("openMap"),t.selectedItem=e,t.setMarked(),t.dialog=!0,t.evento=!0,t.selectedIndex=e,t.lat=parseFloat(e.latitud),t.lng=parseFloat(e.longitud),t.zoom=15}),this.bus_map.$on("marked",function(e){t.selectedItem.latitud=e.lat,t.selectedItem.longitud=e.lng}),this.getMunicipios()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{setMarked:function(){this.evento&&this.bus_map.$emit("setMarker",{lat:this.selectedItem.latitud,lng:this.selectedItem.longitud})},openMap:function(){this.bus_map.$emit("openMap")},getMunicipios:function(){var t=l(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/municipio");case 2:e=t.sent,this.municipios=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),close:function(){this.dialog=!1,this.evento=!1,this.selectedIndex=-1,this.selectedItem={},this.$refs.form.reset(),this.bus.$emit("closeDialog")},save:function(){var t=l(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,c.a.put("api/puesto_de_control/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,c.a.post("api/puesto_de_control",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}));return function(){return t.apply(this,arguments)}}(),setDescription:function(t){this.description=t},codevalidate:function(){var t=this;c.a.get("/api/puesto_de_control/codigo/"+this.selectedItem.codigo).then(function(e){t.error=e.data})}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},on:{"!click":function(e){return t.openMap(e)}},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm4:"",md4:""}},[n("v-card-text",[n("v-select",{attrs:{items:t.municipios,"item-text":"nombre","item-value":"id",label:"Municipio",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.municipio_id,callback:function(e){t.$set(t.selectedItem,"municipio_id",e)},expression:"selectedItem.municipio_id"}}),t._v(" "),n("v-text-field",{attrs:{label:"Codigo",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=5||"No mayor a 5 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},on:{change:function(e){return t.codevalidate()}},model:{value:t.selectedItem.codigo,callback:function(e){t.$set(t.selectedItem,"codigo",e)},expression:"selectedItem.codigo"}}),t._v(" "),n("v-text-field",{attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=100||"No mayor a 100 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}}),t._v(" "),n("v-textarea",{attrs:{label:"Descripción",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=500||"No mayor a 500 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm4:"",md4:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Latitud",type:"number",rules:[function(t){return!!t||"Requerido"},function(t){return/^-?([1-8]?[1-9]|[1-9]0)\.{1}\d{1,6}/.test(t)||"latitud incorrecta"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{input:function(e){return t.setMarked(e)},change:t.setMarked},model:{value:t.selectedItem.latitud,callback:function(e){t.$set(t.selectedItem,"latitud",e)},expression:"selectedItem.latitud"}}),t._v(" "),n("v-text-field",{attrs:{label:"Longitud",type:"number",rules:[function(t){return!!t||"Requerido"},function(t){return/^-?([1-8]?[1-9]|[1-9]0)\.{1}\d{1,6}/.test(t)||"latitud incorrecta"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},on:{input:function(e){return t.setMarked(e)},change:t.setMarked},model:{value:t.selectedItem.longitud,callback:function(e){t.$set(t.selectedItem,"longitud",e)},expression:"selectedItem.longitud"}}),t._v(" "),n("v-textarea",{attrs:{label:"Dirección",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=500||"No mayor a 500 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.direccion,callback:function(e){t.$set(t.selectedItem,"direccion",e)},expression:"selectedItem.direccion"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm4:"",md4:""}},[n("v-card-text",[n("lmap",{staticStyle:{height:"350px"},attrs:{bus:t.bus_map}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Puestos de control")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.municipio.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.codigo)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.descripcion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.latitud)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.longitud)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.direccion)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",disabled:e.item.borrar,flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",disabled:e.item.borrar,flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1288),n(1292),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1289),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,hojas_control:[],control_puesto:[],headers:[{text:"Municipio",value:"municipio.nombre",align:"center"},{text:"Codigo",value:"codigo",align:"center"},{text:"Nombre",value:"nombre",align:"center"},{text:"Descripción",value:"descripcion",align:"center"},{text:"Origen",value:"origen.nombre",align:"center"},{text:"Destino",value:"destino.nombre",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:"",rutas:[]}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e,n,r,a,o;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.a.get("api/ruta");case 2:e=t.sent,this.table=e.data,n=0;case 5:if(!(n<this.table.length)){t.next=22;break}return r={ruta_id:this.table[n].id},t.next=9,c.a.get("api/hoja_ruta/fill/"+JSON.stringify(r));case 9:if(!((a=t.sent).data.length>0)){t.next=18;break}return o={hoja_ruta_id:a.data[0].id},t.next=14,c.a.get("api/control_hoja_ruta/fill/"+JSON.stringify(o));case 14:t.sent.data.length>0?this.table[n].borrar=!0:this.table[n].borrar=!1,t.next=19;break;case 18:this.table[n].borrar=!1;case 19:n++,t.next=5;break;case 22:this.rutas=this.table;case 23:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/ruta/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1290),n(1291),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o),c=n(341),u=(n.n(c),n(342));n.n(u);function l(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}delete c.Icon.Default.prototype._getIconUrl,c.Icon.Default.mergeOptions({iconRetinaUrl:n(344),iconUrl:n(273),shadowUrl:n(75)}),e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{puestos_de_control:[],origenla:null,origenln:null,destinola:null,destinoln:null},municipios:[],markers:[],markersTemp:[],place:null,puestos_de_control:[],permanencia:[],error:"",statusText:"",map:null,layerGroup:null,bounds:[]}},created:function(){},mounted:function(){var t=this;this.initMap(),this.bus.$on("openDialog",function(e){t.resize(),t.layerGroup.clearLayers(),t.selectedItem=e,t.dialog=!0,t.selectedIndex=e,t.zoom=5,t.markersTemp=[],t.puestos_de_control.forEach(function(r){var i=L.marker([r.latitud,r.longitud],{MyCustomId:r.id}).bindPopup(r.nombre);i.on("mouseover",function(t){this.openPopup()}),i.on("mouseout",function(t){this.closePopup()}),void 0!=e.puestos_de_control.find(function(t){return t.id==r.id})&&(i.setIcon(L.icon({popupAnchor:[0,-36],iconAnchor:[11,38],iconRetinaUrl:"/img/marker-icon-2x.png",iconUrl:"/img/marker-icon.png",shadowUrl:n(75)})),t.markersTemp.push({id:r.id,position:{lat:r.latitud,lng:r.longitud}}),t.bounds.push([r.latitud,r.longitud]),L.polyline(t.bounds,{color:"Brown"}).addTo(t.layerGroup),t.selectedItem.origenla=parseFloat(t.markersTemp[0].position.lat),t.selectedItem.origenln=parseFloat(t.markersTemp[0].position.lng),t.selectedItem.origen_id=t.markersTemp[0].id,t.selectedItem.destinola=parseFloat(t.markersTemp[t.markersTemp.length-1].position.lat),t.selectedItem.destinoln=parseFloat(t.markersTemp[t.markersTemp.length-1].position.lng),t.selectedItem.destino_id=t.markersTemp[t.markersTemp.length-1].id,t.selectedItem.puestos_de_control.push(r.id),t.map.setView([r.latitud,r.longitud],8)),i.addTo(t.layerGroup)})}),this.getEntryData()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{initMap:function(){this.map=L.map("map").setView([-16.290154,-63.588654],6),L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(this.map),this.layerGroup=L.layerGroup(),this.layerGroup.addTo(this.map)},resize:function(){var t=this;setTimeout(function(){t.map.invalidateSize()},50),this.layerGroup.clearLayers(),this.setMarkers(this.puestos_de_control),this.bounds=[]},getEntryData:function(){var t=l(i.a.mark(function t(){var e,n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/municipio");case 2:return e=t.sent,this.municipios=e.data,t.next=6,s.a.get("api/puesto_de_control");case 6:n=t.sent,this.puestos_de_control=n.data,this.setMarkers(this.puestos_de_control);case 9:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),setMarkers:function(t){for(var e=this,n=0;n<t.length;n++){var r=L.marker([t[n].latitud,t[n].longitud],{MyCustomId:t[n].id}).bindPopup(t[n].nombre).on("click",function(t){e.selectmarker(t.target)});r.on("mouseover",function(t){this.openPopup()}),r.on("mouseout",function(t){this.closePopup()}),r.addTo(this.layerGroup)}},selectmarker:function(t){t.setIcon(this.selectedIcon()),this.bounds.push(t.getLatLng()),L.polyline(this.bounds,{color:"Brown"}).addTo(this.layerGroup),this.markersTemp.push({id:t.options.MyCustomId,position:{lat:t.getLatLng().lat,lng:t.getLatLng().lng}}),this.selectedItem.origenla=parseFloat(this.markersTemp[0].position.lat),this.selectedItem.origenln=parseFloat(this.markersTemp[0].position.lng),this.selectedItem.origen_id=this.markersTemp[0].id,this.selectedItem.destinola=parseFloat(this.markersTemp[this.markersTemp.length-1].position.lat),this.selectedItem.destinoln=parseFloat(this.markersTemp[this.markersTemp.length-1].position.lng),this.selectedItem.destino_id=this.markersTemp[this.markersTemp.length-1].id,this.selectedItem.puestos_de_control.push(t.options.MyCustomId)},selectedIcon:function(){return L.icon({popupAnchor:[0,-36],iconRetinaUrl:"/img/marker-icon-2x.png",iconUrl:"/img/marker-icon.png",shadowUrl:n(75)})},close:function(){this.dialog=!1,this.selectedIndex=-1,this.selectedItem={puestos_de_control:[]},this.markersTemp=[],this.$refs.form.reset(),this.bus.$emit("closeDialog")},save:function(){var t=l(i.a.mark(function t(){var e,n,r,a,o,c;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=33;break}if(-1==this.selectedIndex){t.next=29;break}for(this.permanencia=[],e=!0,n=!1,r=void 0,t.prev=7,a=this.markersTemp[Symbol.iterator]();!(e=(o=a.next()).done);e=!0)c=o.value,this.permanencia.push(c.id);t.next=15;break;case 11:t.prev=11,t.t0=t.catch(7),n=!0,r=t.t0;case 15:t.prev=15,t.prev=16,!e&&a.return&&a.return();case 18:if(t.prev=18,!n){t.next=21;break}throw r;case 21:return t.finish(18);case 22:return t.finish(15);case 23:return this.selectedItem.puestos_de_control=this.permanencia,console.log(this.permanencia),t.next=27,s.a.put("api/ruta/"+this.selectedItem.id,this.selectedItem);case 27:t.next=31;break;case 29:return t.next=31,s.a.post("api/ruta",this.selectedItem);case 31:this.$toast.success("Correcto."),this.close();case 33:t.next=38;break;case 35:t.prev=35,t.t1=t.catch(0),console.log(t.t1);case 38:case"end":return t.stop()}},t,this,[[0,35],[7,11,15,23],[16,,18,22]])}));return function(){return t.apply(this,arguments)}}(),setDescription:function(t){this.description=t},codevalidate:function(){var t=this;s.a.get("/api/ruta/codigo/"+this.selectedItem.codigo).then(function(e){t.error=e.data})}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},on:{"!click":function(e){return t.resize(e)}},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm4:"",md4:""}},[n("v-card-text",[n("v-select",{attrs:{items:t.municipios,"item-text":"nombre","item-value":"id",label:"Municipio",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.municipio_id,callback:function(e){t.$set(t.selectedItem,"municipio_id",e)},expression:"selectedItem.municipio_id"}}),t._v(" "),n("v-text-field",{attrs:{label:"Codigo",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=5||"No mayor a 5 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},on:{change:function(e){return t.codevalidate()}},model:{value:t.selectedItem.codigo,callback:function(e){t.$set(t.selectedItem,"codigo",e)},expression:"selectedItem.codigo"}}),t._v(" "),n("v-text-field",{attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=100||"No mayor a 100 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}}),t._v(" "),n("v-textarea",{attrs:{label:"Descripción",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=500||"No mayor a 500 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm4:"",md4:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Origen: Latitud",type:"number",rules:[function(t){return!!t||"Requerido"},function(t){return/^-?([1-8]?[1-9]|[1-9]0)\.{1}\d{1,6}/.test(t)||"latitud incorrecta"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",disabled:""},model:{value:t.selectedItem.origenla,callback:function(e){t.$set(t.selectedItem,"origenla",e)},expression:"selectedItem.origenla"}}),t._v(" "),n("v-text-field",{attrs:{label:"Origen: Longitud",type:"number",rules:[function(t){return!!t||"Requerido"},function(t){return/^-?([1-8]?[1-9]|[1-9]0)\.{1}\d{1,6}/.test(t)||"latitud incorrecta"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",disabled:""},model:{value:t.selectedItem.origenln,callback:function(e){t.$set(t.selectedItem,"origenln",e)},expression:"selectedItem.origenln"}}),t._v(" "),n("v-text-field",{attrs:{label:"Destino: Latitud",type:"number",rules:[function(t){return!!t||"Requerido"},function(t){return/^-?([1-8]?[1-9]|[1-9]0)\.{1}\d{1,6}/.test(t)||"latitud incorrecta"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",disabled:""},model:{value:t.selectedItem.destinola,callback:function(e){t.$set(t.selectedItem,"destinola",e)},expression:"selectedItem.destinola"}}),t._v(" "),n("v-text-field",{attrs:{label:"Destino: Longitud",type:"number",rules:[function(t){return!!t||"Requerido"},function(t){return/^-?([1-8]?[1-9]|[1-9]0)\.{1}\d{1,6}/.test(t)||"latitud incorrecta"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"",disabled:""},model:{value:t.selectedItem.destinoln,callback:function(e){t.$set(t.selectedItem,"destinoln",e)},expression:"selectedItem.destinoln"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm4:"",md4:""}},[n("v-card-text",[n("span",[t._v("Elija los puntos de control de la ruta de forma ordenada desde el origen hasta el destino")]),t._v(" "),n("div",{staticClass:"map",staticStyle:{height:"300px"},attrs:{id:"map"}})])],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Rutas")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.rutas,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.municipio.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.codigo)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.descripcion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.origen.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.destino.nombre)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo",disabled:e.item.borrar},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3",disabled:e.item.borrar},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1294),n(1298),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1295),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre",value:"nombre",align:"center"},{text:"Monto",value:"valor",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/monto");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/monto/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1296),n(1297),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{}}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t,e=(t=i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/monto/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/monto",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-text-field",{attrs:{label:"Valor",type:"number",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.valor,callback:function(e){t.$set(t.selectedItem,"valor",e)},expression:"selectedItem.valor"}})],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Montos")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.valor)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1300),n(1304),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1301),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre",value:"nombre",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/localidad");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/localidad/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1302),n(1303),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},error:""}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/localidad/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/localidad",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}));return function(){return t.apply(this,arguments)}}(),nameValidate:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e={nombre:this.selectedItem.nombre},t.next=3,s.a.get("api/localidad/fill/"+JSON.stringify(e));case 3:t.sent.data.length>0?this.error="El nombre ya existe":this.error="";case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},on:{submit:function(t){t.preventDefault()}},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",[n("v-card-text",[n("v-text-field",{attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},on:{keyup:function(e){return t.nameValidate()}},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Localidades")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1306),n(1310),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1307),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre",value:"nombre",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/marca");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/marca/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1308),n(1309),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},error:""}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/marca/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/marca",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}));return function(){return t.apply(this,arguments)}}(),nameValidate:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e={nombre:this.selectedItem.nombre},t.next=3,s.a.get("api/marca/fill/"+JSON.stringify(e));case 3:t.sent.data.length>0?this.error="El nombre ya existe":this.error="";case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},on:{submit:function(t){t.preventDefault()}},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",[n("v-card-text",[n("v-text-field",{attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},on:{keyup:function(e){return t.nameValidate()}},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Marcas de vehículos")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1312),n(1316),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1313),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre",value:"nombre",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/vehiculo");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/vehiculo/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1314),n(1315),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},error:""}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/vehiculo/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/vehiculo",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}));return function(){return t.apply(this,arguments)}}(),nameValidate:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e={nombre:this.selectedItem.nombre},t.next=3,s.a.get("api/vehiculo/fill/"+JSON.stringify(e));case 3:t.sent.data.length>0?this.error="El nombre ya existe":this.error="";case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},on:{submit:function(t){t.preventDefault()}},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",[n("v-card-text",[n("v-text-field",{attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},on:{keyup:function(e){return t.nameValidate()}},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Vehículos")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1318),n(1322),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1319),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre",value:"nombre",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/tipo_convocatoria");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/tipo_convocatoria/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1320),n(1321),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},error:""}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t,e=(t=i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/tipo_convocatoria/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/tipo_convocatoria",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},on:{submit:function(t){t.preventDefault()}},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm12:"",md12:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Nombre de la convocatoria",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("\n Tipos de convocatoria\n ")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.nombre))]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1324),n(1328),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1325),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre",value:"nombre",align:"center"},{text:"Cargo",value:"valor",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/firmas");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/monto/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1326),n(1327),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},options:{url:"api/upload/file",headers:s.a.defaults.headers.common,paramName:"file",uploadMultiple:!1,acceptedFiles:{extensions:["image/*"],message:"Formato no permitido."},maxFilesize:{limit:5,message:"El archivo excede los 5Mb."},maxFiles:10},image:""}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e,t.image=e.img})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t,e=(t=i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=12;break}if(console.log(this.selectedItem),-1==this.selectedIndex){t.next=8;break}return t.next=6,s.a.put("api/firmas/"+this.selectedItem.id,this.selectedItem);case 6:t.next=10;break;case 8:return t.next=10,s.a.post("api/firmas",this.selectedItem);case 10:this.$toast.success("Correcto."),this.close();case 12:t.next=17;break;case 14:t.prev=14,t.t0=t.catch(0),console.log(t.t0);case 17:case"end":return t.stop()}},t,this,[[0,14]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}(),CompleteFirma:function(t,e,n){this.image=t.dataUrl,this.selectedItem.img=n.response}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}}),t._v(" "),n("v-text-field",{attrs:{label:"Cargo",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.cargo,callback:function(e){t.$set(t.selectedItem,"cargo",e)},expression:"selectedItem.cargo"}}),t._v(" "),n("v-text-field",{attrs:{label:"Institucion",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.institucion,callback:function(e){t.$set(t.selectedItem,"institucion",e)},expression:"selectedItem.institucion"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("vue-clip",{attrs:{options:t.options,"on-complete":t.CompleteFirma}},[n("template",{slot:"clip-uploader-action"},[n("div",{staticClass:"dz-message v-btn v-btn--block theme--light info"},[t._v("subir imagen de Fotografia")])])],2),t._v(" "),n("v-card",{staticClass:"d-flex",attrs:{flat:"",tile:""}},[n("v-img",{staticClass:"grey lighten-2",attrs:{src:t.image,"aspect-ratio":"1"},scopedSlots:t._u([{key:"placeholder",fn:function(){return[n("v-layout",{attrs:{"fill-height":"","align-center":"","justify-center":"","ma-0":""}},[n("v-progress-circular",{attrs:{indeterminate:"",color:"grey lighten-5"}})],1)]},proxy:!0}])})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Firmas")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.cargo)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1330),n(1334),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1331),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre",value:"nombre",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/comunidad");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/comunidad/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1332),n(1333),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},municipios:[],error:""}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e}),this.getMunicipios()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/comunidad/"+this.selectedItem.id,this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.post("api/comunidad",this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}));return function(){return t.apply(this,arguments)}}(),nameValidate:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e={nombre:this.selectedItem.nombre},t.next=3,s.a.get("api/comunidad/fill/"+JSON.stringify(e));case 3:t.sent.data.length>0?this.error="El nombre ya existe":this.error="";case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),getMunicipios:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/municipio");case 2:e=t.sent,this.municipios=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"indigo"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},on:{submit:function(t){t.preventDefault()}},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",[n("v-card-text",[n("v-text-field",{attrs:{label:"Nombre",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=50||"No mayor a 50 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},on:{keyup:function(e){return t.nameValidate()}},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}}),t._v(" "),n("v-autocomplete",{attrs:{items:t.municipios,"item-text":"nombre","item-value":"id",label:"Municipio",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.municipio_id,callback:function(e){t.$set(t.selectedItem,"municipio_id",e)},expression:"selectedItem.municipio_id"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Comunidades")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.nombre)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1336),n(1337),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s);e.default={components:{},data:function(){return{bus:new o.a,headers:[{text:"Usuario",value:"user_name",align:"center"},{text:"Evento",value:"method",align:"center"},{text:"Path",value:"path",align:"center"},{text:"Data",value:"data"},{text:"Ip Address",value:"ip_address",align:"center"},{text:"Created_at",value:"created_at",align:"center"},{text:"Updated_at",value:"updated_at",align:"center"}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t,e=(t=i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/action/index");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}(),formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY hh:mm:ss")}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Listado de Eventos del Sistema")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.user.name)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.method)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.path)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.data)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.ip_address)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.formatDate(e.item.created_at))+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.formatDate(e.item.updated_at))+" ")])])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1339),n(1343),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1340),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{Form:f.a,RemoveItem:l.a},data:function(){return{bus:new o.a,headers:[{text:"Titulo",value:"titulo",align:"center"},{text:"Descripcion",value:"descripcion",align:"center"},{text:"Usuario",value:"usuario",align:"center"},{text:"Fecha",value:"fecha",align:"center"},{text:"Opciones",align:"center",sortable:!1,width:"270"}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()}),this.bus.$on("closeDialogForm",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/evento/index");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialogForm",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/evento/"+e.id),this.getTable();case 2:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),formatDate:function(t){return this.$moment(t).format("DD/MM/YYYY")}}}},function(t,e,n){var r=n(0)(n(1341),n(1342),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);function c(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},prioridad:[],fecha_date:null,fecha_date_formatted:null,menu:null,error:"",options:{url:"api/upload/file",headers:s.a.defaults.headers.common,paramName:"file",uploadMultiple:!1,acceptedFiles:{extensions:["application/pdf"],message:"Formato no permitido."},maxFilesize:{limit:5,message:"El archivo excede los 5Mb."},maxFiles:1},fileAdjunto:null,valArchivo:null}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogForm",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e,t.fecha_date_formatted=t.$moment().format("DD/MM/YYYY"),t.getTipoPrioridad()}),this.getTipoPrioridad()},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},watch:{fecha_date:function(t){this.selectedItem.fecha=t,this.fecha_date_formatted=this.$moment(t).format("DD/MM/YYYY")||this.$moment().format("DD/MM/YYYY")}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialogForm"),this.selectedIndex=-1,this.selectedItem={}},complete:function(t,e,n){this.fileAdjunto=n.response,this.valArchivo="Cargado correctamente."},save:function(){var t=c(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=13;break}if(-1==this.selectedIndex){t.next=7;break}return t.next=5,s.a.put("api/evento/"+this.selectedItem.id,this.selectedItem);case 5:t.next=11;break;case 7:return this.selectedItem.lista_adjunto=this.fileAdjunto,this.selectedItem.prioridad_id=this.selectedItem.prioridad,t.next=11,s.a.post("api/evento",this.selectedItem);case 11:this.$toast.success("Correcto."),this.close();case 13:t.next=18;break;case 15:t.prev=15,t.t0=t.catch(0),console.log(t.t0);case 18:case"end":return t.stop()}},t,this,[[0,15]])}));return function(){return t.apply(this,arguments)}}(),getTipoPrioridad:function(){var t=c(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.a.get("api/tipo_prioridad");case 2:e=t.sent,this.prioridad=e.data;case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Crear Evento del Sistema")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Titulo",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=15||"No mayor a 15 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},model:{value:t.selectedItem.titulo,callback:function(e){t.$set(t.selectedItem,"titulo",e)},expression:"selectedItem.titulo"}}),t._v(" "),n("v-text-field",{attrs:{label:"Usuario",hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.usuario,callback:function(e){t.$set(t.selectedItem,"usuario",e)},expression:"selectedItem.usuario"}}),t._v(" "),n("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,lazy:"",transition:"scale-transition","offset-y":"","full-width":"","max-width":"290px","min-width":"290px"},model:{value:t.menu,callback:function(e){t.menu=e},expression:"menu"}},[n("v-text-field",{staticClass:"mr-2",attrs:{slot:"activator",label:"Fecha","prepend-icon":"event",readonly:"",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},slot:"activator",model:{value:t.fecha_date_formatted,callback:function(e){t.fecha_date_formatted=e},expression:"fecha_date_formatted"}}),t._v(" "),n("v-date-picker",{attrs:{"no-title":"",locale:"es-bo"},on:{input:function(e){t.menu=!1}},model:{value:t.fecha_date,callback:function(e){t.fecha_date=e},expression:"fecha_date"}})],1),t._v(" "),n("v-card-text",[n("v-textarea",{attrs:{label:"Descripcion",hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}})],1)],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-autocomplete",{staticClass:"mr-2",attrs:{"item-text":"nombre","item-value":"id",label:"Prioridad",items:t.prioridad,rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.prioridad,callback:function(e){t.$set(t.selectedItem,"prioridad",e)},expression:"selectedItem.prioridad"}}),t._v(" "),[n("vue-clip",{attrs:{options:t.options,"on-complete":t.complete},scopedSlots:t._u([{key:"clip-uploader-body",fn:function(e){return t._l(e.files,function(e,r){return n("div",{key:r},["success"==e.status?n("v-icon",{attrs:{color:"success"}},[t._v("check_circle")]):t._e(),t._v(" "),"success"==e.status?n("span",{staticClass:"green--text"},[t._v(" correcto.")]):t._e(),t._v(" "),"error"==e.status?n("v-icon",{attrs:{color:"error"}},[t._v("error")]):t._e(),t._v(" "),"error"==e.status?n("span",{staticClass:"red--text"},[t._v(" "+t._s(e.errorMessage))]):t._e()],1)})}}])},[n("template",{slot:"clip-uploader-action"},[n("div",{staticClass:"dz-message v-btn v-btn--small theme--light success"},[t._v("Subir archivo PDF")])])],2)],t._v(" "),n("v-text-field",{attrs:{readonly:"",box:"",label:"Archivo PDF"},model:{value:t.valArchivo,callback:function(e){t.valArchivo=e},expression:"valArchivo"}})],2)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Registro de Eventos del Sistema")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.titulo)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.descripcion)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.usuario)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(t.formatDate(e.item.fecha))+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1345),n(1349),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1346),f=n.n(d);function h(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a},data:function(){return{bus:new o.a,headers:[{text:"Nombre",value:"nombre",align:"center"},{text:"Email",value:"email",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:""}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=h(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("api/role/fill/"+JSON.stringify({id:9}));case 3:e=t.sent,console.log(e.data[0].users),this.table=e.data[0],t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log(t.t0);case 11:case"end":return t.stop()}},t,this,[[0,8]])}));return function(){return t.apply(this,arguments)}}(),addEntidad:function(t){this.bus.$emit("openDialogAdd",t)},editEntidad:function(t){this.bus.$emit("openDialogEdit",t)},removeItem:function(){var t=h(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/central/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}}},function(t,e,n){var r=n(0)(n(1347),n(1348),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},municipios:[],error:"",new:!0}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogAdd",function(e){t.selectedItem.user_id=e.id,t.dialog=!0}),this.bus.$on("openDialogEdit",function(e){t.selectedItem.user_id=e.id,t.selectedItem=e,t.dialog=!0,t.new=!1})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={},this.new=!0},save:function(){var t,e=(t=i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=11;break}if(!this.new){t.next=7;break}return t.next=5,s.a.post("api/entidad_servicio",this.selectedItem);case 5:t.next=9;break;case 7:return t.next=9,s.a.put("api/entidad_servicio/"+this.selectedItem.id,this.selectedItem);case 9:this.$toast.success("Correcto."),this.close();case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),console.log(t.t0);case 16:case"end":return t.stop()}},t,this,[[0,13]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v("Entidad de servicio")])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"Nombre de la entidad",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":"","error-messages":t.error},model:{value:t.selectedItem.nombre,callback:function(e){t.$set(t.selectedItem,"nombre",e)},expression:"selectedItem.nombre"}}),t._v(" "),n("v-text-field",{attrs:{label:"Responsable",rules:[function(t){return!!t||"Requerido"}],hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.responsable,callback:function(e){t.$set(t.selectedItem,"responsable",e)},expression:"selectedItem.responsable"}})],1)],1),t._v(" "),n("v-spacer"),t._v(" "),n("v-flex",{attrs:{xs12:"",sm6:"",md6:""}},[n("v-card-text",[n("v-textarea",{attrs:{label:"Descripción",hint:"<span class='blue--text'>*Requerido</span>","persistent-hint":""},model:{value:t.selectedItem.descripcion,callback:function(e){t.$set(t.selectedItem,"descripcion",e)},expression:"selectedItem.descripcion"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("Entidades con servicios")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table.users,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[e.item.entidad_servicios.length>0?[n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.name)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center",on:{click:function(t){e.expanded=!e.expanded}}},[t._v(" "+t._s(e.item.email)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[0==e.item.entidad_servicios?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.addEntidad(e.item)}},slot:"activator"},[n("v-icon",[t._v("home")])],1),t._v(" "),n("span",[t._v("Registrar entidad")])],1):t._e(),t._v(" "),e.item.entidad_servicios.length>0?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editEntidad(e.item.entidad_servicios[0])}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar entidad")])],1):t._e()],1)]:t._e(),t._v(" "),0==e.item.entidad_servicios.length?[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.name)+" ")]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.email)+" ")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[0==e.item.entidad_servicios?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.addEntidad(e.item)}},slot:"activator"},[n("v-icon",[t._v("home")])],1),t._v(" "),n("span",[t._v("Registrar entidad")])],1):t._e(),t._v(" "),e.item.entidad_servicios.length>0?n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.editEntidad(e.item.entidad_servicios[0])}},slot:"activator"},[n("v-icon",[t._v("edit")])],1),t._v(" "),n("span",[t._v("Editar entidad")])],1):t._e()],1)]:t._e()],2)]}},{key:"expand",fn:function(e){return[n("v-card",{attrs:{flat:"",color:"blue-grey lighten-5"}},[n("h2",{staticClass:"justify-center layout"},[t._v("ENTIDAD DE SERVICIO")]),t._v(" "),n("v-card-text",[n("v-layout",{attrs:{row:"",wrap:""}},[n("v-flex",{attrs:{xs12:""}},[n("table",{staticClass:"v-table theme--light"},[n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Nombre: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.entidad_servicios[0].nombre))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Genero: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.entidad_servicios[0].responsable))])]),t._v(" "),n("tr",[n("th",{staticClass:"text-xs-left"},[t._v("Telefono: ")]),t._v(" "),n("td",{staticClass:"text-xs-left"},[t._v(t._s(e.item.entidad_servicios[0].descripcion))])])])])],1)],1)],1)]}}])},[t._v(" "),t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1351),n(1358),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=n.n(a),s=n(3),c=n.n(s),u=n(6),l=n.n(u),d=n(1352),f=n.n(d),h=n(1355),p=n.n(h);function m(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})}}e.default={components:{RemoveItem:l.a,Form:f.a,ViewKey:p.a},data:function(){return{bus:new o.a,headers:[{text:"Fecha de Inicio",value:"fecha_ini",align:"center"},{text:"Fecha de Expiracion",value:"fecha_fin",align:"center"},{text:"Api Key",value:"fecha_fin",align:"center"},{text:"Opciones",align:"center",sortable:!1}],table:[],search:"",socket:null}},computed:{},mounted:function(){var t=this;this.getTable(),this.bus.$on("closeDialog",function(){t.getTable()})},methods:{getTable:function(){var t=m(i.a.mark(function t(){var e;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.get("/api/api_services/credentials");case 3:e=t.sent,this.table=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),editItem:function(t){this.bus.$emit("openDialog",t)},removeItem:function(){var t=m(i.a.mark(function t(e){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.bus.$emit("openDialogRemove","api/tipo_convocatoria/"+e.id);case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),showKeys:function(t){this.bus.$emit("openDialogKey",t)}}}},function(t,e,n){var r=n(0)(n(1353),n(1354),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},error:""}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialog",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t,e=(t=i.a.mark(function t(){var e,n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=9;break}return e={ip_address:this.selectedItem.ip_address},t.next=5,s.a.post("/api/api_services/credentials",e);case 5:n=t.sent,console.log(n),this.$toast.success("Correcto."),this.close();case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(0),console.log(t.t0);case 14:case"end":return t.stop()}},t,this,[[0,11]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-tooltip",{attrs:{slot:"activator",top:""},slot:"activator"},[n("v-icon",{attrs:{slot:"activator",large:"",dark:"",color:"primary"},slot:"activator"},[t._v("add_circle")]),t._v(" "),n("span",[t._v("Nuevo")])],1),t._v(" "),n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},on:{submit:function(t){t.preventDefault()}},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm12:"",md12:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"direccion IP",rules:[function(t){return!!t||"Requerido"},function(t){return t&&t.length<=15||"No mayor a 15 caracteres"}],hint:"<span class='blue--text'>*Requerido</span>","error-messages":t.error},model:{value:t.selectedItem.ip_address,callback:function(e){t.$set(t.selectedItem,"ip_address",e)},expression:"selectedItem.ip_address"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(1356),n(1357),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),a=n(2),o=(n.n(a),n(3)),s=n.n(o);e.default={props:["item","bus"],data:function(){return{valid:!0,dialog:!1,selectedIndex:-1,selectedItem:{},error:"",keyHidden:!0}},created:function(){},mounted:function(){var t=this;this.bus.$on("openDialogKey",function(e){t.selectedItem=e,t.dialog=!0,t.selectedIndex=e})},computed:{formTitle:function(){return-1===this.selectedIndex?"Nuevo ":"Editar "}},methods:{close:function(){this.dialog=!1,this.$refs.form.reset(),this.bus.$emit("closeDialog"),this.selectedIndex=-1,this.selectedItem={}},save:function(){var t,e=(t=i.a.mark(function t(){var e,n;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.$refs.form.validate()){t.next=9;break}return e={ip_address:this.selectedItem.ip_address},t.next=5,s.a.post("/api/api_services/credentials",e);case 5:n=t.sent,console.log(n),this.$toast.success("Correcto."),this.close();case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(0),console.log(t.t0);case 14:case"end":return t.stop()}},t,this,[[0,11]])}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(i,a){try{var o=e[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}()}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-dialog",{attrs:{persistent:"","max-width":"900px"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.close(e)}},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[n("v-card",[n("v-toolbar",{attrs:{dark:"",color:"primary"}},[n("v-toolbar-title",{staticClass:"white--text"},[t._v(t._s(t.formTitle))])],1),t._v(" "),n("v-card-text",[n("v-form",{ref:"form",attrs:{"lazy-validation":""},on:{submit:function(t){t.preventDefault()}},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[n("v-layout",{attrs:{wrap:""}},[n("v-flex",{attrs:{xs12:"",sm12:"",md12:""}},[n("v-card-text",[n("v-text-field",{attrs:{label:"direccion IP"},model:{value:t.selectedItem.ip_address,callback:function(e){t.$set(t.selectedItem,"ip_address",e)},expression:"selectedItem.ip_address"}}),t._v(" "),n("v-text-field",{attrs:{label:"Fecha de Inicio"},model:{value:t.selectedItem.created_at,callback:function(e){t.$set(t.selectedItem,"created_at",e)},expression:"selectedItem.created_at"}}),t._v(" "),n("v-text-field",{attrs:{label:"Fecha de caducidad"},model:{value:t.selectedItem.fecha_finalizacion,callback:function(e){t.$set(t.selectedItem,"fecha_finalizacion",e)},expression:"selectedItem.fecha_finalizacion"}}),t._v(" "),n("v-text-field",{attrs:{label:"Api key","append-icon":t.keyHidden?"visibility_off":"visibility",type:t.keyHidden?"password":"text"},on:{"click:append":function(){return t.keyHidden=!t.keyHidden}},model:{value:t.selectedItem.apiKey,callback:function(e){t.$set(t.selectedItem,"apiKey",e)},expression:"selectedItem.apiKey"}})],1)],1)],1)],1)],1),t._v(" "),n("v-card-actions",[n("v-spacer"),t._v(" "),n("v-btn",{attrs:{color:"error",small:""},nativeOn:{click:function(e){return t.close(e)}}},[n("v-icon",[t._v("close")]),t._v(" Cancelar")],1),t._v(" "),n("v-btn",{attrs:{color:"success",small:"",disabled:!t.valid},on:{click:function(e){return t.save()}}},[n("v-icon",[t._v("check")]),t._v(" Guardar")],1)],1)],1)],1)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{attrs:{fluid:""}},[n("v-toolbar",[n("v-toolbar-title",[t._v("\n Administracion de api keys\n ")]),t._v(" "),n("v-spacer"),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("v-toolbar-title",[n("v-text-field",{attrs:{"append-icon":"search",label:"Buscar","single-line":"","hide-details":"",width:"20px"},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),n("v-divider",{staticClass:"mx-2",attrs:{inset:"",vertical:""}}),t._v(" "),n("Form",{attrs:{bus:t.bus}}),t._v(" "),n("ViewKey",{attrs:{bus:t.bus}}),t._v(" "),n("RemoveItem",{attrs:{bus:t.bus}})],1),t._v(" "),n("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.table,search:t.search,"rows-per-page-items":[10,20,30,{text:"TODO",value:-1}],"disable-initial-sort":""},scopedSlots:t._u([{key:"items",fn:function(e){return[n("tr",[n("td",{staticClass:"text-xs-center"},[t._v(" "+t._s(e.item.created_at))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v(t._s(e.item.fecha_finalizacion))]),t._v(" "),n("td",{staticClass:"text-xs-center"},[t._v("***********")]),t._v(" "),n("td",{staticClass:"justify-center layout"},[n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"indigo"},on:{click:function(n){return t.showKeys(e.item)}},slot:"activator"},[n("v-icon",[t._v("visibility")])],1),t._v(" "),n("span",[t._v("ver clave")])],1),t._v(" "),n("v-tooltip",{attrs:{top:""}},[n("v-btn",{attrs:{slot:"activator",flat:"",icon:"",color:"red darken-3"},on:{click:function(n){return t.removeItem(e.item)}},slot:"activator"},[n("v-icon",[t._v("delete")])],1),t._v(" "),n("span",[t._v("Eliminar")])],1)],1)])]}}])},[t._v(" "),n("v-alert",{attrs:{slot:"no-results",value:!0,color:"error",icon:"fa fa-times"},slot:"no-results"},[t._v('\n Tu Busqueda de "'+t._s(t.search)+'" no encontró resultados.\n ')]),t._v(" "),n("template",{slot:"no-data"},[n("v-alert",{attrs:{slot:"no-results",value:!0,color:"info",icon:"fa fa-times"},slot:"no-results"},[t._v("\n Sin resultados.\n ")])],1)],2)],1)},staticRenderFns:[]}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._install=void 0;var r=n(1360);e._install=function(t,e){var n=e.initial,i=e.acceptLocalRules,a=e.globalRules,o=e.router,s=e.notfound,c=e.middleware;t.mixin((0,r.register)(n,i||!1,a||{},o,s,c))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.register=void 0;var r,i=n(2),a=(r=i)&&r.__esModule?r:{default:r},o=n(1361);var s=new a.default,c=[],u=!1;e.register=function(t,e,n,r,i,a){var l,d;return c=Array.isArray(t)?t:[t],null!==r&&a&&r.beforeEach((l=regeneratorRuntime.mark(function t(e,r,s){var u,l;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a({change:function(t){c=t}});case 2:if(u=i.path||i,e.path!==u){t.next=5;break}return t.abrupt("return",s());case 5:if("rule"in e.meta){t.next=7;break}return t.abrupt("return",console.error("[vue-acl] "+e.path+" not have rule"));case 7:if((l=e.meta.rule)in n&&(l=n[l]),(0,o.testPermission)(c,l)){t.next=13;break}if(!i.forwardQueryParams){t.next=12;break}return t.abrupt("return",s({path:u,query:e.query}));case 12:return t.abrupt("return",s(u));case 13:return t.abrupt("return",s());case 14:case"end":return t.stop()}},t,void 0)}),d=function(){var t=l.apply(this,arguments);return new Promise(function(e,n){return function r(i,a){try{var o=t[i](a),s=o.value}catch(t){return void n(t)}if(!o.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});e(s)}("next")})},function(t,e,n){return d.apply(this,arguments)})),{beforeCreate:function(){var t=this,r=this;this.$acl={change:function(t){t=Array.isArray(t)?t:[t],c.toString()!==t.toString()&&s.$emit("vueacl-permission-changed",t)},get get(){return c},get not(){return u=!0,this},check:function(t){var i=u;if(u=!1,t in n){var a=(0,o.testPermission)(this.get,n[t]);return i?!a:a}if(t in r){if(!e)return console.error("[vue-acl] acceptLocalRules is not enabled");var s=(0,o.testPermission)(this.get,r[t]);return i?!s:s}return!1}},s.$on("vueacl-permission-changed",function(e){c=e,"onChange"in t.$acl&&t.$acl.onChange(c),t.$forceUpdate()})},destroyed:function(){var t=this;s.$off("vueacl-permission-changed",function(e){c=e,"onChange"in t.$acl&&t.$acl.onChange(c),t.$forceUpdate()})}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.testPermission=function(t,e){if(void 0===e.generate&&!Array.isArray(e))return console.error("[vue-acl] your have invalid rules");Array.isArray(e)||(e=e.generate());var n=!1;if(e.forEach(function(t){t.includes("*")&&(n=!0)}),n)return!0;var r=!1;return e.map(function(e){var n=!0;return e.forEach(function(e){return n=n&&t.includes(e)}),n}).forEach(function(t){t&&(r=t)}),r}},function(t,e,n){var r;r=function(){"use strict";var t={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-snackbar",{staticClass:"application",attrs:{timeout:t.timeout,color:t.color,bottom:"bottom"===t.y,top:"top"===t.y,left:"left"===t.x,right:"right"===t.x,"auto-height":t.autoHeight,"multi-line":t.multiLine,vertical:t.vertical},on:{click:t.dismiss},model:{value:t.active,callback:function(e){t.active=e},expression:"active"}},[t.icon?n("v-icon",{staticClass:"mr-4",attrs:{dark:"",left:""}},[t._v(" "+t._s(t.icon)+" ")]):t._e(),t._v(" "+t._s(t.message)+" ")],1)},staticRenderFns:[],props:{x:{type:String,default:"right"},y:{type:String,default:"bottom"},color:{type:String,default:"info"},icon:{type:String},message:{type:String},timeout:{type:Number,default:3e3},dismissable:{type:Boolean,default:!0},autoHeight:{type:Boolean,default:!1},multiLine:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1}},data:function(){return{active:!1}},mounted:function(){var t=this;this.$nextTick(function(){return t.show()})},methods:{show:function(){this.active=!0},close:function(){this.active=!1},dismiss:function(){this.dismissable&&this.close()}}};function e(e,n){void 0===n&&(n={});var r=null,i=n.property||"$toast";function a(n,o){return void 0===o&&(o={}),r?(r.close(),void e.nextTick(function(){r=null,a(n,o)})):(o.message=n,function(n){r=new e(t),Object.assign(r,e.prototype[i].options,n),document.body.appendChild(r.$mount().$el)}(o))}e.prototype[i]=Object.assign(a,Object.assign({options:n},function(t){var e={};if(["success","info","error","warning"].forEach(function(t){e[t]=function(e,n){return a(e,Object.assign({color:t},n))}}),t.shorts){var n=function(n){var r=t.shorts[n];e[n]=function(t,e){return a(t,Object.assign({},r,e))}};for(var r in t.shorts)n(r)}return e}(n)))}return"undefined"!=typeof window&&window.Vue&&window.Vue.use(e),e},t.exports=r()},function(t,e,n){var r=n(1364);"string"==typeof r&&(r=[[t.i,r,""]]);var i={transform:void 0};n(274)(r,i);r.locals&&(t.exports=r.locals)},function(t,e,n){var r=n(343);(t.exports=n(55)(!1)).push([t.i,"@font-face{font-family:Material Icons;font-style:normal;font-weight:400;font-display:block;src:url("+r(n(1365))+');src:local("\\263A"),url('+r(n(1366))+') format("woff2"),url('+r(n(1367))+') format("woff"),url('+r(n(1368))+') format("truetype")}.material-icons{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}.material-icons._10k:before{content:"\\E951"}.material-icons._10mp:before{content:"\\E952"}.material-icons._11mp:before{content:"\\E953"}.material-icons._12mp:before{content:"\\E954"}.material-icons._13mp:before{content:"\\E955"}.material-icons._14mp:before{content:"\\E956"}.material-icons._15mp:before{content:"\\E957"}.material-icons._16mp:before{content:"\\E958"}.material-icons._17mp:before{content:"\\E959"}.material-icons._18mp:before{content:"\\E95A"}.material-icons._19mp:before{content:"\\E95B"}.material-icons._1k:before{content:"\\E95C"}.material-icons._1k_plus:before{content:"\\E95D"}.material-icons._20mp:before{content:"\\E95E"}.material-icons._21mp:before{content:"\\E95F"}.material-icons._22mp:before{content:"\\E960"}.material-icons._23mp:before{content:"\\E961"}.material-icons._24mp:before{content:"\\E962"}.material-icons._2k:before{content:"\\E963"}.material-icons._2k_plus:before{content:"\\E964"}.material-icons._2mp:before{content:"\\E965"}.material-icons._360:before{content:"\\E577"}.material-icons._3d_rotation:before{content:"\\E84D"}.material-icons._3k:before{content:"\\E966"}.material-icons._3k_plus:before{content:"\\E967"}.material-icons._3mp:before{content:"\\E968"}.material-icons._4k:before{content:"\\E072"}.material-icons._4k_plus:before{content:"\\E969"}.material-icons._4mp:before{content:"\\E96A"}.material-icons._5k:before{content:"\\E96B"}.material-icons._5k_plus:before{content:"\\E96C"}.material-icons._5mp:before{content:"\\E96D"}.material-icons._6k:before{content:"\\E96E"}.material-icons._6k_plus:before{content:"\\E96F"}.material-icons._6mp:before{content:"\\E970"}.material-icons._7k:before{content:"\\E971"}.material-icons._7k_plus:before{content:"\\E972"}.material-icons._7mp:before{content:"\\E973"}.material-icons._8k:before{content:"\\E974"}.material-icons._8k_plus:before{content:"\\E975"}.material-icons._8mp:before{content:"\\E976"}.material-icons._9k:before{content:"\\E977"}.material-icons._9k_plus:before{content:"\\E978"}.material-icons._9mp:before{content:"\\E979"}.material-icons.ac_unit:before{content:"\\EB3B"}.material-icons.access_alarm:before{content:"\\E190"}.material-icons.access_alarms:before{content:"\\E191"}.material-icons.access_time:before{content:"\\E192"}.material-icons.accessibility:before{content:"\\E84E"}.material-icons.accessibility_new:before{content:"\\E92C"}.material-icons.accessible:before{content:"\\E914"}.material-icons.accessible_forward:before{content:"\\E934"}.material-icons.account_balance:before{content:"\\E84F"}.material-icons.account_balance_wallet:before{content:"\\E850"}.material-icons.account_box:before{content:"\\E851"}.material-icons.account_circle:before{content:"\\E853"}.material-icons.account_tree:before{content:"\\E97A"}.material-icons.adb:before{content:"\\E60E"}.material-icons.add:before{content:"\\E145"}.material-icons.add_a_photo:before{content:"\\E439"}.material-icons.add_alarm:before{content:"\\E193"}.material-icons.add_alert:before{content:"\\E003"}.material-icons.add_box:before{content:"\\E146"}.material-icons.add_call:before{content:"\\E0E8"}.material-icons.add_chart:before{content:"\\E97B"}.material-icons.add_circle:before{content:"\\E147"}.material-icons.add_circle_outline:before{content:"\\E148"}.material-icons.add_comment:before{content:"\\E266"}.material-icons.add_ic_call:before{content:"\\E97C"}.material-icons.add_link:before{content:"\\E178"}.material-icons.add_location:before{content:"\\E567"}.material-icons.add_moderator:before{content:"\\E97D"}.material-icons.add_photo_alternate:before{content:"\\E43E"}.material-icons.add_shopping_cart:before{content:"\\E854"}.material-icons.add_to_home_screen:before{content:"\\E1FE"}.material-icons.add_to_photos:before{content:"\\E39D"}.material-icons.add_to_queue:before{content:"\\E05C"}.material-icons.adjust:before{content:"\\E39E"}.material-icons.airline_seat_flat:before{content:"\\E630"}.material-icons.airline_seat_flat_angled:before{content:"\\E631"}.material-icons.airline_seat_individual_suite:before{content:"\\E632"}.material-icons.airline_seat_legroom_extra:before{content:"\\E633"}.material-icons.airline_seat_legroom_normal:before{content:"\\E634"}.material-icons.airline_seat_legroom_reduced:before{content:"\\E635"}.material-icons.airline_seat_recline_extra:before{content:"\\E636"}.material-icons.airline_seat_recline_normal:before{content:"\\E637"}.material-icons.airplanemode_active:before{content:"\\E195"}.material-icons.airplanemode_inactive:before,.material-icons.airplanemode_off:before{content:"\\E194"}.material-icons.airplanemode_on:before{content:"\\E195"}.material-icons.airplay:before{content:"\\E055"}.material-icons.airport_shuttle:before{content:"\\EB3C"}.material-icons.alarm:before{content:"\\E855"}.material-icons.alarm_add:before{content:"\\E856"}.material-icons.alarm_off:before{content:"\\E857"}.material-icons.alarm_on:before{content:"\\E858"}.material-icons.album:before{content:"\\E019"}.material-icons.all_inbox:before{content:"\\E97F"}.material-icons.all_inclusive:before{content:"\\EB3D"}.material-icons.all_out:before{content:"\\E90B"}.material-icons.alternate_email:before{content:"\\E0E6"}.material-icons.amp_stories:before{content:"\\EA13"}.material-icons.android:before{content:"\\E859"}.material-icons.announcement:before{content:"\\E85A"}.material-icons.apartment:before{content:"\\EA40"}.material-icons.approval:before{content:"\\E982"}.material-icons.apps:before{content:"\\E5C3"}.material-icons.archive:before{content:"\\E149"}.material-icons.arrow_back:before{content:"\\E5C4"}.material-icons.arrow_back_ios:before{content:"\\E5E0"}.material-icons.arrow_downward:before{content:"\\E5DB"}.material-icons.arrow_drop_down:before{content:"\\E5C5"}.material-icons.arrow_drop_down_circle:before{content:"\\E5C6"}.material-icons.arrow_drop_up:before{content:"\\E5C7"}.material-icons.arrow_forward:before{content:"\\E5C8"}.material-icons.arrow_forward_ios:before{content:"\\E5E1"}.material-icons.arrow_left:before{content:"\\E5DE"}.material-icons.arrow_right:before{content:"\\E5DF"}.material-icons.arrow_right_alt:before{content:"\\E941"}.material-icons.arrow_upward:before{content:"\\E5D8"}.material-icons.art_track:before{content:"\\E060"}.material-icons.aspect_ratio:before{content:"\\E85B"}.material-icons.assessment:before{content:"\\E85C"}.material-icons.assignment:before{content:"\\E85D"}.material-icons.assignment_ind:before{content:"\\E85E"}.material-icons.assignment_late:before{content:"\\E85F"}.material-icons.assignment_return:before{content:"\\E860"}.material-icons.assignment_returned:before{content:"\\E861"}.material-icons.assignment_turned_in:before{content:"\\E862"}.material-icons.assistant:before{content:"\\E39F"}.material-icons.assistant_direction:before{content:"\\E988"}.material-icons.assistant_navigation:before{content:"\\E989"}.material-icons.assistant_photo:before{content:"\\E3A0"}.material-icons.atm:before{content:"\\E573"}.material-icons.attach_file:before{content:"\\E226"}.material-icons.attach_money:before{content:"\\E227"}.material-icons.attachment:before{content:"\\E2BC"}.material-icons.attractions:before{content:"\\EA52"}.material-icons.audiotrack:before{content:"\\E3A1"}.material-icons.autorenew:before{content:"\\E863"}.material-icons.av_timer:before{content:"\\E01B"}.material-icons.backspace:before{content:"\\E14A"}.material-icons.backup:before{content:"\\E864"}.material-icons.badge:before{content:"\\EA67"}.material-icons.bakery_dining:before{content:"\\EA53"}.material-icons.ballot:before{content:"\\E172"}.material-icons.bar_chart:before{content:"\\E26B"}.material-icons.bathtub:before{content:"\\EA41"}.material-icons.battery_alert:before{content:"\\E19C"}.material-icons.battery_charging_full:before{content:"\\E1A3"}.material-icons.battery_full:before{content:"\\E1A4"}.material-icons.battery_std:before{content:"\\E1A5"}.material-icons.battery_unknown:before{content:"\\E1A6"}.material-icons.beach_access:before{content:"\\EB3E"}.material-icons.beenhere:before{content:"\\E52D"}.material-icons.block:before{content:"\\E14B"}.material-icons.bluetooth:before{content:"\\E1A7"}.material-icons.bluetooth_audio:before{content:"\\E60F"}.material-icons.bluetooth_connected:before{content:"\\E1A8"}.material-icons.bluetooth_disabled:before{content:"\\E1A9"}.material-icons.bluetooth_searching:before{content:"\\E1AA"}.material-icons.blur_circular:before{content:"\\E3A2"}.material-icons.blur_linear:before{content:"\\E3A3"}.material-icons.blur_off:before{content:"\\E3A4"}.material-icons.blur_on:before{content:"\\E3A5"}.material-icons.bolt:before{content:"\\EA0B"}.material-icons.book:before{content:"\\E865"}.material-icons.bookmark:before{content:"\\E866"}.material-icons.bookmark_border:before,.material-icons.bookmark_outline:before{content:"\\E867"}.material-icons.bookmarks:before{content:"\\E98B"}.material-icons.border_all:before{content:"\\E228"}.material-icons.border_bottom:before{content:"\\E229"}.material-icons.border_clear:before{content:"\\E22A"}.material-icons.border_color:before{content:"\\E22B"}.material-icons.border_horizontal:before{content:"\\E22C"}.material-icons.border_inner:before{content:"\\E22D"}.material-icons.border_left:before{content:"\\E22E"}.material-icons.border_outer:before{content:"\\E22F"}.material-icons.border_right:before{content:"\\E230"}.material-icons.border_style:before{content:"\\E231"}.material-icons.border_top:before{content:"\\E232"}.material-icons.border_vertical:before{content:"\\E233"}.material-icons.branding_watermark:before{content:"\\E06B"}.material-icons.breakfast_dining:before{content:"\\EA54"}.material-icons.brightness_1:before{content:"\\E3A6"}.material-icons.brightness_2:before{content:"\\E3A7"}.material-icons.brightness_3:before{content:"\\E3A8"}.material-icons.brightness_4:before{content:"\\E3A9"}.material-icons.brightness_5:before{content:"\\E3AA"}.material-icons.brightness_6:before{content:"\\E3AB"}.material-icons.brightness_7:before{content:"\\E3AC"}.material-icons.brightness_auto:before{content:"\\E1AB"}.material-icons.brightness_high:before{content:"\\E1AC"}.material-icons.brightness_low:before{content:"\\E1AD"}.material-icons.brightness_medium:before{content:"\\E1AE"}.material-icons.broken_image:before{content:"\\E3AD"}.material-icons.brunch_dining:before{content:"\\EA73"}.material-icons.brush:before{content:"\\E3AE"}.material-icons.bubble_chart:before{content:"\\E6DD"}.material-icons.bug_report:before{content:"\\E868"}.material-icons.build:before{content:"\\E869"}.material-icons.burst_mode:before{content:"\\E43C"}.material-icons.bus_alert:before{content:"\\E98F"}.material-icons.business:before{content:"\\E0AF"}.material-icons.business_center:before{content:"\\EB3F"}.material-icons.cached:before{content:"\\E86A"}.material-icons.cake:before{content:"\\E7E9"}.material-icons.calendar_today:before{content:"\\E935"}.material-icons.calendar_view_day:before{content:"\\E936"}.material-icons.call:before{content:"\\E0B0"}.material-icons.call_end:before{content:"\\E0B1"}.material-icons.call_made:before{content:"\\E0B2"}.material-icons.call_merge:before{content:"\\E0B3"}.material-icons.call_missed:before{content:"\\E0B4"}.material-icons.call_missed_outgoing:before{content:"\\E0E4"}.material-icons.call_received:before{content:"\\E0B5"}.material-icons.call_split:before{content:"\\E0B6"}.material-icons.call_to_action:before{content:"\\E06C"}.material-icons.camera:before{content:"\\E3AF"}.material-icons.camera_alt:before{content:"\\E3B0"}.material-icons.camera_enhance:before{content:"\\E8FC"}.material-icons.camera_front:before{content:"\\E3B1"}.material-icons.camera_rear:before{content:"\\E3B2"}.material-icons.camera_roll:before{content:"\\E3B3"}.material-icons.cancel:before{content:"\\E5C9"}.material-icons.cancel_presentation:before{content:"\\E0E9"}.material-icons.cancel_schedule_send:before{content:"\\EA39"}.material-icons.car_rental:before{content:"\\EA55"}.material-icons.car_repair:before{content:"\\EA56"}.material-icons.card_giftcard:before{content:"\\E8F6"}.material-icons.card_membership:before{content:"\\E8F7"}.material-icons.card_travel:before{content:"\\E8F8"}.material-icons.cases:before{content:"\\E992"}.material-icons.casino:before{content:"\\EB40"}.material-icons.cast:before{content:"\\E307"}.material-icons.cast_connected:before{content:"\\E308"}.material-icons.category:before{content:"\\E574"}.material-icons.celebration:before{content:"\\EA65"}.material-icons.cell_wifi:before{content:"\\E0EC"}.material-icons.center_focus_strong:before{content:"\\E3B4"}.material-icons.center_focus_weak:before{content:"\\E3B5"}.material-icons.change_history:before{content:"\\E86B"}.material-icons.chat:before{content:"\\E0B7"}.material-icons.chat_bubble:before{content:"\\E0CA"}.material-icons.chat_bubble_outline:before{content:"\\E0CB"}.material-icons.check:before{content:"\\E5CA"}.material-icons.check_box:before{content:"\\E834"}.material-icons.check_box_outline_blank:before{content:"\\E835"}.material-icons.check_circle:before{content:"\\E86C"}.material-icons.check_circle_outline:before{content:"\\E92D"}.material-icons.chevron_left:before{content:"\\E5CB"}.material-icons.chevron_right:before{content:"\\E5CC"}.material-icons.child_care:before{content:"\\EB41"}.material-icons.child_friendly:before{content:"\\EB42"}.material-icons.chrome_reader_mode:before{content:"\\E86D"}.material-icons.circle_notifications:before{content:"\\E994"}.material-icons.class:before{content:"\\E86E"}.material-icons.clear:before{content:"\\E14C"}.material-icons.clear_all:before{content:"\\E0B8"}.material-icons.close:before{content:"\\E5CD"}.material-icons.closed_caption:before{content:"\\E01C"}.material-icons.closed_caption_off:before{content:"\\E996"}.material-icons.cloud:before{content:"\\E2BD"}.material-icons.cloud_circle:before{content:"\\E2BE"}.material-icons.cloud_done:before{content:"\\E2BF"}.material-icons.cloud_download:before{content:"\\E2C0"}.material-icons.cloud_off:before{content:"\\E2C1"}.material-icons.cloud_queue:before{content:"\\E2C2"}.material-icons.cloud_upload:before{content:"\\E2C3"}.material-icons.code:before{content:"\\E86F"}.material-icons.collections:before{content:"\\E3B6"}.material-icons.collections_bookmark:before{content:"\\E431"}.material-icons.color_lens:before{content:"\\E3B7"}.material-icons.colorize:before{content:"\\E3B8"}.material-icons.comment:before{content:"\\E0B9"}.material-icons.commute:before{content:"\\E940"}.material-icons.compare:before{content:"\\E3B9"}.material-icons.compare_arrows:before{content:"\\E915"}.material-icons.compass_calibration:before{content:"\\E57C"}.material-icons.compress:before{content:"\\E94D"}.material-icons.computer:before{content:"\\E30A"}.material-icons.confirmation_num:before,.material-icons.confirmation_number:before{content:"\\E638"}.material-icons.connected_tv:before{content:"\\E998"}.material-icons.contact_mail:before{content:"\\E0D0"}.material-icons.contact_phone:before{content:"\\E0CF"}.material-icons.contact_support:before{content:"\\E94C"}.material-icons.contactless:before{content:"\\EA71"}.material-icons.contacts:before{content:"\\E0BA"}.material-icons.content_copy:before{content:"\\E14D"}.material-icons.content_cut:before{content:"\\E14E"}.material-icons.content_paste:before{content:"\\E14F"}.material-icons.control_camera:before{content:"\\E074"}.material-icons.control_point:before{content:"\\E3BA"}.material-icons.control_point_duplicate:before{content:"\\E3BB"}.material-icons.copyright:before{content:"\\E90C"}.material-icons.create:before{content:"\\E150"}.material-icons.create_new_folder:before{content:"\\E2CC"}.material-icons.credit_card:before{content:"\\E870"}.material-icons.crop:before{content:"\\E3BE"}.material-icons.crop_16_9:before{content:"\\E3BC"}.material-icons.crop_3_2:before{content:"\\E3BD"}.material-icons.crop_5_4:before{content:"\\E3BF"}.material-icons.crop_7_5:before{content:"\\E3C0"}.material-icons.crop_din:before{content:"\\E3C1"}.material-icons.crop_free:before{content:"\\E3C2"}.material-icons.crop_landscape:before{content:"\\E3C3"}.material-icons.crop_original:before{content:"\\E3C4"}.material-icons.crop_portrait:before{content:"\\E3C5"}.material-icons.crop_rotate:before{content:"\\E437"}.material-icons.crop_square:before{content:"\\E3C6"}.material-icons.dangerous:before{content:"\\E99A"}.material-icons.dashboard:before{content:"\\E871"}.material-icons.dashboard_customize:before{content:"\\E99B"}.material-icons.data_usage:before{content:"\\E1AF"}.material-icons.date_range:before{content:"\\E916"}.material-icons.deck:before{content:"\\EA42"}.material-icons.dehaze:before{content:"\\E3C7"}.material-icons.delete:before{content:"\\E872"}.material-icons.delete_forever:before{content:"\\E92B"}.material-icons.delete_outline:before{content:"\\E92E"}.material-icons.delete_sweep:before{content:"\\E16C"}.material-icons.delivery_dining:before{content:"\\EA72"}.material-icons.departure_board:before{content:"\\E576"}.material-icons.description:before{content:"\\E873"}.material-icons.desktop_access_disabled:before{content:"\\E99D"}.material-icons.desktop_mac:before{content:"\\E30B"}.material-icons.desktop_windows:before{content:"\\E30C"}.material-icons.details:before{content:"\\E3C8"}.material-icons.developer_board:before{content:"\\E30D"}.material-icons.developer_mode:before{content:"\\E1B0"}.material-icons.device_hub:before{content:"\\E335"}.material-icons.device_thermostat:before{content:"\\E1FF"}.material-icons.device_unknown:before{content:"\\E339"}.material-icons.devices:before{content:"\\E1B1"}.material-icons.devices_other:before{content:"\\E337"}.material-icons.dialer_sip:before{content:"\\E0BB"}.material-icons.dialpad:before{content:"\\E0BC"}.material-icons.dinner_dining:before{content:"\\EA57"}.material-icons.directions:before{content:"\\E52E"}.material-icons.directions_bike:before{content:"\\E52F"}.material-icons.directions_boat:before{content:"\\E532"}.material-icons.directions_bus:before{content:"\\E530"}.material-icons.directions_car:before{content:"\\E531"}.material-icons.directions_ferry:before{content:"\\E532"}.material-icons.directions_railway:before{content:"\\E534"}.material-icons.directions_run:before{content:"\\E566"}.material-icons.directions_subway:before{content:"\\E533"}.material-icons.directions_train:before{content:"\\E534"}.material-icons.directions_transit:before{content:"\\E535"}.material-icons.directions_walk:before{content:"\\E536"}.material-icons.disc_full:before{content:"\\E610"}.material-icons.dnd_forwardslash:before{content:"\\E611"}.material-icons.dns:before{content:"\\E875"}.material-icons.do_not_disturb:before{content:"\\E612"}.material-icons.do_not_disturb_alt:before{content:"\\E611"}.material-icons.do_not_disturb_off:before{content:"\\E643"}.material-icons.do_not_disturb_on:before{content:"\\E644"}.material-icons.dock:before{content:"\\E30E"}.material-icons.domain:before{content:"\\E7EE"}.material-icons.domain_disabled:before{content:"\\E0EF"}.material-icons.done:before{content:"\\E876"}.material-icons.done_all:before{content:"\\E877"}.material-icons.done_outline:before{content:"\\E92F"}.material-icons.donut_large:before{content:"\\E917"}.material-icons.donut_small:before{content:"\\E918"}.material-icons.double_arrow:before{content:"\\EA50"}.material-icons.drafts:before{content:"\\E151"}.material-icons.drag_handle:before{content:"\\E25D"}.material-icons.drag_indicator:before{content:"\\E945"}.material-icons.drive_eta:before{content:"\\E613"}.material-icons.drive_file_move_outline:before{content:"\\E9A1"}.material-icons.drive_file_rename_outline:before{content:"\\E9A2"}.material-icons.drive_folder_upload:before{content:"\\E9A3"}.material-icons.dry_cleaning:before{content:"\\EA58"}.material-icons.duo:before{content:"\\E9A5"}.material-icons.dvr:before{content:"\\E1B2"}.material-icons.dynamic_feed:before{content:"\\EA14"}.material-icons.eco:before{content:"\\EA35"}.material-icons.edit:before{content:"\\E3C9"}.material-icons.edit_attributes:before{content:"\\E578"}.material-icons.edit_location:before{content:"\\E568"}.material-icons.edit_off:before{content:"\\E950"}.material-icons.eject:before{content:"\\E8FB"}.material-icons.email:before{content:"\\E0BE"}.material-icons.emoji_emotions:before{content:"\\EA22"}.material-icons.emoji_events:before{content:"\\EA23"}.material-icons.emoji_flags:before{content:"\\EA1A"}.material-icons.emoji_food_beverage:before{content:"\\EA1B"}.material-icons.emoji_nature:before{content:"\\EA1C"}.material-icons.emoji_objects:before{content:"\\EA24"}.material-icons.emoji_people:before{content:"\\EA1D"}.material-icons.emoji_symbols:before{content:"\\EA1E"}.material-icons.emoji_transportation:before{content:"\\EA1F"}.material-icons.enhance_photo_translate:before{content:"\\E8FC"}.material-icons.enhanced_encryption:before{content:"\\E63F"}.material-icons.equalizer:before{content:"\\E01D"}.material-icons.error:before{content:"\\E000"}.material-icons.error_outline:before{content:"\\E001"}.material-icons.euro:before{content:"\\EA15"}.material-icons.euro_symbol:before{content:"\\E926"}.material-icons.ev_station:before{content:"\\E56D"}.material-icons.event:before{content:"\\E878"}.material-icons.event_available:before{content:"\\E614"}.material-icons.event_busy:before{content:"\\E615"}.material-icons.event_note:before{content:"\\E616"}.material-icons.event_seat:before{content:"\\E903"}.material-icons.exit_to_app:before{content:"\\E879"}.material-icons.expand:before{content:"\\E94F"}.material-icons.expand_less:before{content:"\\E5CE"}.material-icons.expand_more:before{content:"\\E5CF"}.material-icons.explicit:before{content:"\\E01E"}.material-icons.explore:before{content:"\\E87A"}.material-icons.explore_off:before{content:"\\E9A8"}.material-icons.exposure:before{content:"\\E3CA"}.material-icons.exposure_minus_1:before{content:"\\E3CB"}.material-icons.exposure_minus_2:before{content:"\\E3CC"}.material-icons.exposure_neg_1:before{content:"\\E3CB"}.material-icons.exposure_neg_2:before{content:"\\E3CC"}.material-icons.exposure_plus_1:before{content:"\\E3CD"}.material-icons.exposure_plus_2:before{content:"\\E3CE"}.material-icons.exposure_zero:before{content:"\\E3CF"}.material-icons.extension:before{content:"\\E87B"}.material-icons.face:before{content:"\\E87C"}.material-icons.fast_forward:before{content:"\\E01F"}.material-icons.fast_rewind:before{content:"\\E020"}.material-icons.fastfood:before{content:"\\E57A"}.material-icons.favorite:before{content:"\\E87D"}.material-icons.favorite_border:before,.material-icons.favorite_outline:before{content:"\\E87E"}.material-icons.featured_play_list:before{content:"\\E06D"}.material-icons.featured_video:before{content:"\\E06E"}.material-icons.feedback:before{content:"\\E87F"}.material-icons.festival:before{content:"\\EA68"}.material-icons.fiber_dvr:before{content:"\\E05D"}.material-icons.fiber_manual_record:before{content:"\\E061"}.material-icons.fiber_new:before{content:"\\E05E"}.material-icons.fiber_pin:before{content:"\\E06A"}.material-icons.fiber_smart_record:before{content:"\\E062"}.material-icons.file_copy:before{content:"\\E173"}.material-icons.file_download:before{content:"\\E2C4"}.material-icons.file_download_done:before{content:"\\E9AA"}.material-icons.file_present:before{content:"\\EA0E"}.material-icons.file_upload:before{content:"\\E2C6"}.material-icons.filter:before{content:"\\E3D3"}.material-icons.filter_1:before{content:"\\E3D0"}.material-icons.filter_2:before{content:"\\E3D1"}.material-icons.filter_3:before{content:"\\E3D2"}.material-icons.filter_4:before{content:"\\E3D4"}.material-icons.filter_5:before{content:"\\E3D5"}.material-icons.filter_6:before{content:"\\E3D6"}.material-icons.filter_7:before{content:"\\E3D7"}.material-icons.filter_8:before{content:"\\E3D8"}.material-icons.filter_9:before{content:"\\E3D9"}.material-icons.filter_9_plus:before{content:"\\E3DA"}.material-icons.filter_b_and_w:before{content:"\\E3DB"}.material-icons.filter_center_focus:before{content:"\\E3DC"}.material-icons.filter_drama:before{content:"\\E3DD"}.material-icons.filter_frames:before{content:"\\E3DE"}.material-icons.filter_hdr:before{content:"\\E3DF"}.material-icons.filter_list:before{content:"\\E152"}.material-icons.filter_list_alt:before{content:"\\E94E"}.material-icons.filter_none:before{content:"\\E3E0"}.material-icons.filter_tilt_shift:before{content:"\\E3E2"}.material-icons.filter_vintage:before{content:"\\E3E3"}.material-icons.find_in_page:before{content:"\\E880"}.material-icons.find_replace:before{content:"\\E881"}.material-icons.fingerprint:before{content:"\\E90D"}.material-icons.fireplace:before{content:"\\EA43"}.material-icons.first_page:before{content:"\\E5DC"}.material-icons.fit_screen:before{content:"\\EA10"}.material-icons.fitness_center:before{content:"\\EB43"}.material-icons.flag:before{content:"\\E153"}.material-icons.flare:before{content:"\\E3E4"}.material-icons.flash_auto:before{content:"\\E3E5"}.material-icons.flash_off:before{content:"\\E3E6"}.material-icons.flash_on:before{content:"\\E3E7"}.material-icons.flight:before{content:"\\E539"}.material-icons.flight_land:before{content:"\\E904"}.material-icons.flight_takeoff:before{content:"\\E905"}.material-icons.flip:before{content:"\\E3E8"}.material-icons.flip_camera_android:before{content:"\\EA37"}.material-icons.flip_camera_ios:before{content:"\\EA38"}.material-icons.flip_to_back:before{content:"\\E882"}.material-icons.flip_to_front:before{content:"\\E883"}.material-icons.folder:before{content:"\\E2C7"}.material-icons.folder_open:before{content:"\\E2C8"}.material-icons.folder_shared:before{content:"\\E2C9"}.material-icons.folder_special:before{content:"\\E617"}.material-icons.font_download:before{content:"\\E167"}.material-icons.format_align_center:before{content:"\\E234"}.material-icons.format_align_justify:before{content:"\\E235"}.material-icons.format_align_left:before{content:"\\E236"}.material-icons.format_align_right:before{content:"\\E237"}.material-icons.format_bold:before{content:"\\E238"}.material-icons.format_clear:before{content:"\\E239"}.material-icons.format_color_fill:before{content:"\\E23A"}.material-icons.format_color_reset:before{content:"\\E23B"}.material-icons.format_color_text:before{content:"\\E23C"}.material-icons.format_indent_decrease:before{content:"\\E23D"}.material-icons.format_indent_increase:before{content:"\\E23E"}.material-icons.format_italic:before{content:"\\E23F"}.material-icons.format_line_spacing:before{content:"\\E240"}.material-icons.format_list_bulleted:before{content:"\\E241"}.material-icons.format_list_numbered:before{content:"\\E242"}.material-icons.format_list_numbered_rtl:before{content:"\\E267"}.material-icons.format_paint:before{content:"\\E243"}.material-icons.format_quote:before{content:"\\E244"}.material-icons.format_shapes:before{content:"\\E25E"}.material-icons.format_size:before{content:"\\E245"}.material-icons.format_strikethrough:before{content:"\\E246"}.material-icons.format_textdirection_l_to_r:before{content:"\\E247"}.material-icons.format_textdirection_r_to_l:before{content:"\\E248"}.material-icons.format_underline:before,.material-icons.format_underlined:before{content:"\\E249"}.material-icons.forum:before{content:"\\E0BF"}.material-icons.forward:before{content:"\\E154"}.material-icons.forward_10:before{content:"\\E056"}.material-icons.forward_30:before{content:"\\E057"}.material-icons.forward_5:before{content:"\\E058"}.material-icons.free_breakfast:before{content:"\\EB44"}.material-icons.fullscreen:before{content:"\\E5D0"}.material-icons.fullscreen_exit:before{content:"\\E5D1"}.material-icons.functions:before{content:"\\E24A"}.material-icons.g_translate:before{content:"\\E927"}.material-icons.gamepad:before{content:"\\E30F"}.material-icons.games:before{content:"\\E021"}.material-icons.gavel:before{content:"\\E90E"}.material-icons.gesture:before{content:"\\E155"}.material-icons.get_app:before{content:"\\E884"}.material-icons.gif:before{content:"\\E908"}.material-icons.goat:before{content:"\\DBFF"}.material-icons.golf_course:before{content:"\\EB45"}.material-icons.gps_fixed:before{content:"\\E1B3"}.material-icons.gps_not_fixed:before{content:"\\E1B4"}.material-icons.gps_off:before{content:"\\E1B5"}.material-icons.grade:before{content:"\\E885"}.material-icons.gradient:before{content:"\\E3E9"}.material-icons.grain:before{content:"\\E3EA"}.material-icons.graphic_eq:before{content:"\\E1B8"}.material-icons.grid_off:before{content:"\\E3EB"}.material-icons.grid_on:before{content:"\\E3EC"}.material-icons.grid_view:before{content:"\\E9B0"}.material-icons.group:before{content:"\\E7EF"}.material-icons.group_add:before{content:"\\E7F0"}.material-icons.group_work:before{content:"\\E886"}.material-icons.hail:before{content:"\\E9B1"}.material-icons.hardware:before{content:"\\EA59"}.material-icons.hd:before{content:"\\E052"}.material-icons.hdr_off:before{content:"\\E3ED"}.material-icons.hdr_on:before{content:"\\E3EE"}.material-icons.hdr_strong:before{content:"\\E3F1"}.material-icons.hdr_weak:before{content:"\\E3F2"}.material-icons.headset:before{content:"\\E310"}.material-icons.headset_mic:before{content:"\\E311"}.material-icons.headset_off:before{content:"\\E33A"}.material-icons.healing:before{content:"\\E3F3"}.material-icons.hearing:before{content:"\\E023"}.material-icons.height:before{content:"\\EA16"}.material-icons.help:before{content:"\\E887"}.material-icons.help_outline:before{content:"\\E8FD"}.material-icons.high_quality:before{content:"\\E024"}.material-icons.highlight:before{content:"\\E25F"}.material-icons.highlight_off:before,.material-icons.highlight_remove:before{content:"\\E888"}.material-icons.history:before{content:"\\E889"}.material-icons.home:before{content:"\\E88A"}.material-icons.home_filled:before{content:"\\E9B2"}.material-icons.home_work:before{content:"\\EA09"}.material-icons.horizontal_split:before{content:"\\E947"}.material-icons.hot_tub:before{content:"\\EB46"}.material-icons.hotel:before{content:"\\E53A"}.material-icons.hourglass_empty:before{content:"\\E88B"}.material-icons.hourglass_full:before{content:"\\E88C"}.material-icons.house:before{content:"\\EA44"}.material-icons.how_to_reg:before{content:"\\E174"}.material-icons.how_to_vote:before{content:"\\E175"}.material-icons.http:before{content:"\\E902"}.material-icons.https:before{content:"\\E88D"}.material-icons.icecream:before{content:"\\EA69"}.material-icons.image:before{content:"\\E3F4"}.material-icons.image_aspect_ratio:before{content:"\\E3F5"}.material-icons.image_search:before{content:"\\E43F"}.material-icons.imagesearch_roller:before{content:"\\E9B4"}.material-icons.import_contacts:before{content:"\\E0E0"}.material-icons.import_export:before{content:"\\E0C3"}.material-icons.important_devices:before{content:"\\E912"}.material-icons.inbox:before{content:"\\E156"}.material-icons.indeterminate_check_box:before{content:"\\E909"}.material-icons.info:before{content:"\\E88E"}.material-icons.info_outline:before{content:"\\E88F"}.material-icons.input:before{content:"\\E890"}.material-icons.insert_chart:before{content:"\\E24B"}.material-icons.insert_chart_outlined:before{content:"\\E26A"}.material-icons.insert_comment:before{content:"\\E24C"}.material-icons.insert_drive_file:before{content:"\\E24D"}.material-icons.insert_emoticon:before{content:"\\E24E"}.material-icons.insert_invitation:before{content:"\\E24F"}.material-icons.insert_link:before{content:"\\E250"}.material-icons.insert_photo:before{content:"\\E251"}.material-icons.inventory:before{content:"\\E179"}.material-icons.invert_colors:before{content:"\\E891"}.material-icons.invert_colors_off:before{content:"\\E0C4"}.material-icons.invert_colors_on:before{content:"\\E891"}.material-icons.iso:before{content:"\\E3F6"}.material-icons.keyboard:before{content:"\\E312"}.material-icons.keyboard_arrow_down:before{content:"\\E313"}.material-icons.keyboard_arrow_left:before{content:"\\E314"}.material-icons.keyboard_arrow_right:before{content:"\\E315"}.material-icons.keyboard_arrow_up:before{content:"\\E316"}.material-icons.keyboard_backspace:before{content:"\\E317"}.material-icons.keyboard_capslock:before{content:"\\E318"}.material-icons.keyboard_control:before{content:"\\E5D3"}.material-icons.keyboard_hide:before{content:"\\E31A"}.material-icons.keyboard_return:before{content:"\\E31B"}.material-icons.keyboard_tab:before{content:"\\E31C"}.material-icons.keyboard_voice:before{content:"\\E31D"}.material-icons.king_bed:before{content:"\\EA45"}.material-icons.kitchen:before{content:"\\EB47"}.material-icons.label:before{content:"\\E892"}.material-icons.label_important:before{content:"\\E937"}.material-icons.label_important_outline:before{content:"\\E948"}.material-icons.label_off:before{content:"\\E9B6"}.material-icons.label_outline:before{content:"\\E893"}.material-icons.landscape:before{content:"\\E3F7"}.material-icons.language:before{content:"\\E894"}.material-icons.laptop:before{content:"\\E31E"}.material-icons.laptop_chromebook:before{content:"\\E31F"}.material-icons.laptop_mac:before{content:"\\E320"}.material-icons.laptop_windows:before{content:"\\E321"}.material-icons.last_page:before{content:"\\E5DD"}.material-icons.launch:before{content:"\\E895"}.material-icons.layers:before{content:"\\E53B"}.material-icons.layers_clear:before{content:"\\E53C"}.material-icons.leak_add:before{content:"\\E3F8"}.material-icons.leak_remove:before{content:"\\E3F9"}.material-icons.lens:before{content:"\\E3FA"}.material-icons.library_add:before{content:"\\E02E"}.material-icons.library_add_check:before{content:"\\E9B7"}.material-icons.library_books:before{content:"\\E02F"}.material-icons.library_music:before{content:"\\E030"}.material-icons.lightbulb:before{content:"\\E0F0"}.material-icons.lightbulb_outline:before{content:"\\E90F"}.material-icons.line_style:before{content:"\\E919"}.material-icons.line_weight:before{content:"\\E91A"}.material-icons.linear_scale:before{content:"\\E260"}.material-icons.link:before{content:"\\E157"}.material-icons.link_off:before{content:"\\E16F"}.material-icons.linked_camera:before{content:"\\E438"}.material-icons.liquor:before{content:"\\EA60"}.material-icons.list:before{content:"\\E896"}.material-icons.list_alt:before{content:"\\E0EE"}.material-icons.live_help:before{content:"\\E0C6"}.material-icons.live_tv:before{content:"\\E639"}.material-icons.local_activity:before{content:"\\E53F"}.material-icons.local_airport:before{content:"\\E53D"}.material-icons.local_atm:before{content:"\\E53E"}.material-icons.local_attraction:before{content:"\\E53F"}.material-icons.local_bar:before{content:"\\E540"}.material-icons.local_cafe:before{content:"\\E541"}.material-icons.local_car_wash:before{content:"\\E542"}.material-icons.local_convenience_store:before{content:"\\E543"}.material-icons.local_dining:before{content:"\\E556"}.material-icons.local_drink:before{content:"\\E544"}.material-icons.local_florist:before{content:"\\E545"}.material-icons.local_gas_station:before{content:"\\E546"}.material-icons.local_grocery_store:before{content:"\\E547"}.material-icons.local_hospital:before{content:"\\E548"}.material-icons.local_hotel:before{content:"\\E549"}.material-icons.local_laundry_service:before{content:"\\E54A"}.material-icons.local_library:before{content:"\\E54B"}.material-icons.local_mall:before{content:"\\E54C"}.material-icons.local_movies:before{content:"\\E54D"}.material-icons.local_offer:before{content:"\\E54E"}.material-icons.local_parking:before{content:"\\E54F"}.material-icons.local_pharmacy:before{content:"\\E550"}.material-icons.local_phone:before{content:"\\E551"}.material-icons.local_pizza:before{content:"\\E552"}.material-icons.local_play:before{content:"\\E553"}.material-icons.local_post_office:before{content:"\\E554"}.material-icons.local_print_shop:before,.material-icons.local_printshop:before{content:"\\E555"}.material-icons.local_restaurant:before{content:"\\E556"}.material-icons.local_see:before{content:"\\E557"}.material-icons.local_shipping:before{content:"\\E558"}.material-icons.local_taxi:before{content:"\\E559"}.material-icons.location_city:before{content:"\\E7F1"}.material-icons.location_disabled:before{content:"\\E1B6"}.material-icons.location_history:before{content:"\\E55A"}.material-icons.location_off:before{content:"\\E0C7"}.material-icons.location_on:before{content:"\\E0C8"}.material-icons.location_searching:before{content:"\\E1B7"}.material-icons.lock:before{content:"\\E897"}.material-icons.lock_open:before{content:"\\E898"}.material-icons.lock_outline:before{content:"\\E899"}.material-icons.logout:before{content:"\\E9BA"}.material-icons.looks:before{content:"\\E3FC"}.material-icons.looks_3:before{content:"\\E3FB"}.material-icons.looks_4:before{content:"\\E3FD"}.material-icons.looks_5:before{content:"\\E3FE"}.material-icons.looks_6:before{content:"\\E3FF"}.material-icons.looks_one:before{content:"\\E400"}.material-icons.looks_two:before{content:"\\E401"}.material-icons.loop:before{content:"\\E028"}.material-icons.loupe:before{content:"\\E402"}.material-icons.low_priority:before{content:"\\E16D"}.material-icons.loyalty:before{content:"\\E89A"}.material-icons.lunch_dining:before{content:"\\EA61"}.material-icons.mail:before{content:"\\E158"}.material-icons.mail_outline:before{content:"\\E0E1"}.material-icons.map:before{content:"\\E55B"}.material-icons.margin:before{content:"\\E9BB"}.material-icons.mark_as_unread:before{content:"\\E9BC"}.material-icons.markunread:before{content:"\\E159"}.material-icons.markunread_mailbox:before{content:"\\E89B"}.material-icons.maximize:before{content:"\\E930"}.material-icons.meeting_room:before{content:"\\EB4F"}.material-icons.memory:before{content:"\\E322"}.material-icons.menu:before{content:"\\E5D2"}.material-icons.menu_book:before{content:"\\EA19"}.material-icons.menu_open:before{content:"\\E9BD"}.material-icons.merge_type:before{content:"\\E252"}.material-icons.message:before{content:"\\E0C9"}.material-icons.messenger:before{content:"\\E0CA"}.material-icons.messenger_outline:before{content:"\\E0CB"}.material-icons.mic:before{content:"\\E029"}.material-icons.mic_none:before{content:"\\E02A"}.material-icons.mic_off:before{content:"\\E02B"}.material-icons.minimize:before{content:"\\E931"}.material-icons.missed_video_call:before{content:"\\E073"}.material-icons.mms:before{content:"\\E618"}.material-icons.mobile_friendly:before{content:"\\E200"}.material-icons.mobile_off:before{content:"\\E201"}.material-icons.mobile_screen_share:before{content:"\\E0E7"}.material-icons.mode_comment:before{content:"\\E253"}.material-icons.mode_edit:before{content:"\\E254"}.material-icons.monetization_on:before{content:"\\E263"}.material-icons.money:before{content:"\\E57D"}.material-icons.money_off:before{content:"\\E25C"}.material-icons.monochrome_photos:before{content:"\\E403"}.material-icons.mood:before{content:"\\E7F2"}.material-icons.mood_bad:before{content:"\\E7F3"}.material-icons.more:before{content:"\\E619"}.material-icons.more_horiz:before{content:"\\E5D3"}.material-icons.more_vert:before{content:"\\E5D4"}.material-icons.motorcycle:before{content:"\\E91B"}.material-icons.mouse:before{content:"\\E323"}.material-icons.move_to_inbox:before{content:"\\E168"}.material-icons.movie:before{content:"\\E02C"}.material-icons.movie_creation:before{content:"\\E404"}.material-icons.movie_filter:before{content:"\\E43A"}.material-icons.mp:before{content:"\\E9C3"}.material-icons.multiline_chart:before{content:"\\E6DF"}.material-icons.multitrack_audio:before{content:"\\E1B8"}.material-icons.museum:before{content:"\\EA36"}.material-icons.music_note:before{content:"\\E405"}.material-icons.music_off:before{content:"\\E440"}.material-icons.music_video:before{content:"\\E063"}.material-icons.my_library_add:before{content:"\\E02E"}.material-icons.my_library_books:before{content:"\\E02F"}.material-icons.my_library_music:before{content:"\\E030"}.material-icons.my_location:before{content:"\\E55C"}.material-icons.nature:before{content:"\\E406"}.material-icons.nature_people:before{content:"\\E407"}.material-icons.navigate_before:before{content:"\\E408"}.material-icons.navigate_next:before{content:"\\E409"}.material-icons.navigation:before{content:"\\E55D"}.material-icons.near_me:before{content:"\\E569"}.material-icons.network_cell:before{content:"\\E1B9"}.material-icons.network_check:before{content:"\\E640"}.material-icons.network_locked:before{content:"\\E61A"}.material-icons.network_wifi:before{content:"\\E1BA"}.material-icons.new_releases:before{content:"\\E031"}.material-icons.next_week:before{content:"\\E16A"}.material-icons.nfc:before{content:"\\E1BB"}.material-icons.nightlife:before{content:"\\EA62"}.material-icons.nights_stay:before{content:"\\EA46"}.material-icons.no_encryption:before{content:"\\E641"}.material-icons.no_meeting_room:before{content:"\\EB4E"}.material-icons.no_sim:before{content:"\\E0CC"}.material-icons.not_interested:before{content:"\\E033"}.material-icons.not_listed_location:before{content:"\\E575"}.material-icons.note:before{content:"\\E06F"}.material-icons.note_add:before{content:"\\E89C"}.material-icons.notes:before{content:"\\E26C"}.material-icons.notification_important:before{content:"\\E004"}.material-icons.notifications:before{content:"\\E7F4"}.material-icons.notifications_active:before{content:"\\E7F7"}.material-icons.notifications_none:before{content:"\\E7F5"}.material-icons.notifications_off:before{content:"\\E7F6"}.material-icons.notifications_on:before{content:"\\E7F7"}.material-icons.notifications_paused:before{content:"\\E7F8"}.material-icons.now_wallpaper:before{content:"\\E1BC"}.material-icons.now_widgets:before{content:"\\E1BD"}.material-icons.offline_bolt:before{content:"\\E932"}.material-icons.offline_pin:before{content:"\\E90A"}.material-icons.offline_share:before{content:"\\E9C5"}.material-icons.ondemand_video:before{content:"\\E63A"}.material-icons.opacity:before{content:"\\E91C"}.material-icons.open_in_browser:before{content:"\\E89D"}.material-icons.open_in_new:before{content:"\\E89E"}.material-icons.open_with:before{content:"\\E89F"}.material-icons.outdoor_grill:before{content:"\\EA47"}.material-icons.outlined_flag:before{content:"\\E16E"}.material-icons.padding:before{content:"\\E9C8"}.material-icons.pages:before{content:"\\E7F9"}.material-icons.pageview:before{content:"\\E8A0"}.material-icons.palette:before{content:"\\E40A"}.material-icons.pan_tool:before{content:"\\E925"}.material-icons.panorama:before{content:"\\E40B"}.material-icons.panorama_fish_eye:before,.material-icons.panorama_fisheye:before{content:"\\E40C"}.material-icons.panorama_horizontal:before{content:"\\E40D"}.material-icons.panorama_photosphere:before{content:"\\E9C9"}.material-icons.panorama_photosphere_select:before{content:"\\E9CA"}.material-icons.panorama_vertical:before{content:"\\E40E"}.material-icons.panorama_wide_angle:before{content:"\\E40F"}.material-icons.park:before{content:"\\EA63"}.material-icons.party_mode:before{content:"\\E7FA"}.material-icons.pause:before{content:"\\E034"}.material-icons.pause_circle_filled:before{content:"\\E035"}.material-icons.pause_circle_outline:before{content:"\\E036"}.material-icons.pause_presentation:before{content:"\\E0EA"}.material-icons.payment:before{content:"\\E8A1"}.material-icons.people:before{content:"\\E7FB"}.material-icons.people_alt:before{content:"\\EA21"}.material-icons.people_outline:before{content:"\\E7FC"}.material-icons.perm_camera_mic:before{content:"\\E8A2"}.material-icons.perm_contact_cal:before,.material-icons.perm_contact_calendar:before{content:"\\E8A3"}.material-icons.perm_data_setting:before{content:"\\E8A4"}.material-icons.perm_device_info:before,.material-icons.perm_device_information:before{content:"\\E8A5"}.material-icons.perm_identity:before{content:"\\E8A6"}.material-icons.perm_media:before{content:"\\E8A7"}.material-icons.perm_phone_msg:before{content:"\\E8A8"}.material-icons.perm_scan_wifi:before{content:"\\E8A9"}.material-icons.person:before{content:"\\E7FD"}.material-icons.person_add:before{content:"\\E7FE"}.material-icons.person_add_disabled:before{content:"\\E9CB"}.material-icons.person_outline:before{content:"\\E7FF"}.material-icons.person_pin:before{content:"\\E55A"}.material-icons.person_pin_circle:before{content:"\\E56A"}.material-icons.personal_video:before{content:"\\E63B"}.material-icons.pets:before{content:"\\E91D"}.material-icons.phone:before{content:"\\E0CD"}.material-icons.phone_android:before{content:"\\E324"}.material-icons.phone_bluetooth_speaker:before{content:"\\E61B"}.material-icons.phone_callback:before{content:"\\E649"}.material-icons.phone_disabled:before{content:"\\E9CC"}.material-icons.phone_enabled:before{content:"\\E9CD"}.material-icons.phone_forwarded:before{content:"\\E61C"}.material-icons.phone_in_talk:before{content:"\\E61D"}.material-icons.phone_iphone:before{content:"\\E325"}.material-icons.phone_locked:before{content:"\\E61E"}.material-icons.phone_missed:before{content:"\\E61F"}.material-icons.phone_paused:before{content:"\\E620"}.material-icons.phonelink:before{content:"\\E326"}.material-icons.phonelink_erase:before{content:"\\E0DB"}.material-icons.phonelink_lock:before{content:"\\E0DC"}.material-icons.phonelink_off:before{content:"\\E327"}.material-icons.phonelink_ring:before{content:"\\E0DD"}.material-icons.phonelink_setup:before{content:"\\E0DE"}.material-icons.photo:before{content:"\\E410"}.material-icons.photo_album:before{content:"\\E411"}.material-icons.photo_camera:before{content:"\\E412"}.material-icons.photo_filter:before{content:"\\E43B"}.material-icons.photo_library:before{content:"\\E413"}.material-icons.photo_size_select_actual:before{content:"\\E432"}.material-icons.photo_size_select_large:before{content:"\\E433"}.material-icons.photo_size_select_small:before{content:"\\E434"}.material-icons.picture_as_pdf:before{content:"\\E415"}.material-icons.picture_in_picture:before{content:"\\E8AA"}.material-icons.picture_in_picture_alt:before{content:"\\E911"}.material-icons.pie_chart:before{content:"\\E6C4"}.material-icons.pie_chart_outlined:before{content:"\\E6C5"}.material-icons.pin_drop:before{content:"\\E55E"}.material-icons.pivot_table_chart:before{content:"\\E9CE"}.material-icons.place:before{content:"\\E55F"}.material-icons.play_arrow:before{content:"\\E037"}.material-icons.play_circle_fill:before,.material-icons.play_circle_filled:before{content:"\\E038"}.material-icons.play_circle_outline:before{content:"\\E039"}.material-icons.play_for_work:before{content:"\\E906"}.material-icons.playlist_add:before{content:"\\E03B"}.material-icons.playlist_add_check:before{content:"\\E065"}.material-icons.playlist_play:before{content:"\\E05F"}.material-icons.plus_one:before{content:"\\E800"}.material-icons.policy:before{content:"\\EA17"}.material-icons.poll:before{content:"\\E801"}.material-icons.polymer:before{content:"\\E8AB"}.material-icons.pool:before{content:"\\EB48"}.material-icons.portable_wifi_off:before{content:"\\E0CE"}.material-icons.portrait:before{content:"\\E416"}.material-icons.post_add:before{content:"\\EA20"}.material-icons.power:before{content:"\\E63C"}.material-icons.power_input:before{content:"\\E336"}.material-icons.power_off:before{content:"\\E646"}.material-icons.power_settings_new:before{content:"\\E8AC"}.material-icons.pregnant_woman:before{content:"\\E91E"}.material-icons.present_to_all:before{content:"\\E0DF"}.material-icons.print:before{content:"\\E8AD"}.material-icons.print_disabled:before{content:"\\E9CF"}.material-icons.priority_high:before{content:"\\E645"}.material-icons.public:before{content:"\\E80B"}.material-icons.publish:before{content:"\\E255"}.material-icons.query_builder:before{content:"\\E8AE"}.material-icons.question_answer:before{content:"\\E8AF"}.material-icons.queue:before{content:"\\E03C"}.material-icons.queue_music:before{content:"\\E03D"}.material-icons.queue_play_next:before{content:"\\E066"}.material-icons.quick_contacts_dialer:before{content:"\\E0CF"}.material-icons.quick_contacts_mail:before{content:"\\E0D0"}.material-icons.radio:before{content:"\\E03E"}.material-icons.radio_button_checked:before{content:"\\E837"}.material-icons.radio_button_off:before{content:"\\E836"}.material-icons.radio_button_on:before{content:"\\E837"}.material-icons.radio_button_unchecked:before{content:"\\E836"}.material-icons.railway_alert:before{content:"\\E9D1"}.material-icons.ramen_dining:before{content:"\\EA64"}.material-icons.rate_review:before{content:"\\E560"}.material-icons.receipt:before{content:"\\E8B0"}.material-icons.recent_actors:before{content:"\\E03F"}.material-icons.recommend:before{content:"\\E9D2"}.material-icons.record_voice_over:before{content:"\\E91F"}.material-icons.redeem:before{content:"\\E8B1"}.material-icons.redo:before{content:"\\E15A"}.material-icons.refresh:before{content:"\\E5D5"}.material-icons.remove:before{content:"\\E15B"}.material-icons.remove_circle:before{content:"\\E15C"}.material-icons.remove_circle_outline:before{content:"\\E15D"}.material-icons.remove_done:before{content:"\\E9D3"}.material-icons.remove_from_queue:before{content:"\\E067"}.material-icons.remove_moderator:before{content:"\\E9D4"}.material-icons.remove_red_eye:before{content:"\\E417"}.material-icons.remove_shopping_cart:before{content:"\\E928"}.material-icons.reorder:before{content:"\\E8FE"}.material-icons.repeat:before{content:"\\E040"}.material-icons.repeat_on:before{content:"\\E9D6"}.material-icons.repeat_one:before{content:"\\E041"}.material-icons.repeat_one_on:before{content:"\\E9D7"}.material-icons.replay:before{content:"\\E042"}.material-icons.replay_10:before{content:"\\E059"}.material-icons.replay_30:before{content:"\\E05A"}.material-icons.replay_5:before{content:"\\E05B"}.material-icons.replay_circle_filled:before{content:"\\E9D8"}.material-icons.reply:before{content:"\\E15E"}.material-icons.reply_all:before{content:"\\E15F"}.material-icons.report:before{content:"\\E160"}.material-icons.report_off:before{content:"\\E170"}.material-icons.report_problem:before{content:"\\E8B2"}.material-icons.reset_tv:before{content:"\\E9D9"}.material-icons.restaurant:before{content:"\\E56C"}.material-icons.restaurant_menu:before{content:"\\E561"}.material-icons.restore:before{content:"\\E8B3"}.material-icons.restore_from_trash:before{content:"\\E938"}.material-icons.restore_page:before{content:"\\E929"}.material-icons.ring_volume:before{content:"\\E0D1"}.material-icons.room:before{content:"\\E8B4"}.material-icons.room_service:before{content:"\\EB49"}.material-icons.rotate_90_degrees_ccw:before{content:"\\E418"}.material-icons.rotate_left:before{content:"\\E419"}.material-icons.rotate_right:before{content:"\\E41A"}.material-icons.rounded_corner:before{content:"\\E920"}.material-icons.router:before{content:"\\E328"}.material-icons.rowing:before{content:"\\E921"}.material-icons.rss_feed:before{content:"\\E0E5"}.material-icons.rtt:before{content:"\\E9AD"}.material-icons.rv_hookup:before{content:"\\E642"}.material-icons.satellite:before{content:"\\E562"}.material-icons.save:before{content:"\\E161"}.material-icons.save_alt:before{content:"\\E171"}.material-icons.saved_search:before{content:"\\EA11"}.material-icons.scanner:before{content:"\\E329"}.material-icons.scatter_plot:before{content:"\\E268"}.material-icons.schedule:before{content:"\\E8B5"}.material-icons.schedule_send:before{content:"\\EA0A"}.material-icons.school:before{content:"\\E80C"}.material-icons.score:before{content:"\\E269"}.material-icons.screen_lock_landscape:before{content:"\\E1BE"}.material-icons.screen_lock_portrait:before{content:"\\E1BF"}.material-icons.screen_lock_rotation:before{content:"\\E1C0"}.material-icons.screen_rotation:before{content:"\\E1C1"}.material-icons.screen_share:before{content:"\\E0E2"}.material-icons.sd:before{content:"\\E9DD"}.material-icons.sd_card:before{content:"\\E623"}.material-icons.sd_storage:before{content:"\\E1C2"}.material-icons.search:before{content:"\\E8B6"}.material-icons.security:before{content:"\\E32A"}.material-icons.segment:before{content:"\\E94B"}.material-icons.select_all:before{content:"\\E162"}.material-icons.send:before{content:"\\E163"}.material-icons.send_and_archive:before{content:"\\EA0C"}.material-icons.sentiment_dissatisfied:before{content:"\\E811"}.material-icons.sentiment_neutral:before{content:"\\E812"}.material-icons.sentiment_satisfied:before{content:"\\E813"}.material-icons.sentiment_satisfied_alt:before{content:"\\E0ED"}.material-icons.sentiment_very_dissatisfied:before{content:"\\E814"}.material-icons.sentiment_very_satisfied:before{content:"\\E815"}.material-icons.settings:before{content:"\\E8B8"}.material-icons.settings_applications:before{content:"\\E8B9"}.material-icons.settings_backup_restore:before{content:"\\E8BA"}.material-icons.settings_bluetooth:before{content:"\\E8BB"}.material-icons.settings_brightness:before{content:"\\E8BD"}.material-icons.settings_cell:before{content:"\\E8BC"}.material-icons.settings_display:before{content:"\\E8BD"}.material-icons.settings_ethernet:before{content:"\\E8BE"}.material-icons.settings_input_antenna:before{content:"\\E8BF"}.material-icons.settings_input_component:before{content:"\\E8C0"}.material-icons.settings_input_composite:before{content:"\\E8C1"}.material-icons.settings_input_hdmi:before{content:"\\E8C2"}.material-icons.settings_input_svideo:before{content:"\\E8C3"}.material-icons.settings_overscan:before{content:"\\E8C4"}.material-icons.settings_phone:before{content:"\\E8C5"}.material-icons.settings_power:before{content:"\\E8C6"}.material-icons.settings_remote:before{content:"\\E8C7"}.material-icons.settings_system_daydream:before{content:"\\E1C3"}.material-icons.settings_voice:before{content:"\\E8C8"}.material-icons.share:before{content:"\\E80D"}.material-icons.shield:before{content:"\\E9E0"}.material-icons.shop:before{content:"\\E8C9"}.material-icons.shop_two:before{content:"\\E8CA"}.material-icons.shopping_basket:before{content:"\\E8CB"}.material-icons.shopping_cart:before{content:"\\E8CC"}.material-icons.short_text:before{content:"\\E261"}.material-icons.show_chart:before{content:"\\E6E1"}.material-icons.shuffle:before{content:"\\E043"}.material-icons.shuffle_on:before{content:"\\E9E1"}.material-icons.shutter_speed:before{content:"\\E43D"}.material-icons.signal_cellular_4_bar:before{content:"\\E1C8"}.material-icons.signal_cellular_alt:before{content:"\\E202"}.material-icons.signal_cellular_connected_no_internet_4_bar:before{content:"\\E1CD"}.material-icons.signal_cellular_no_sim:before{content:"\\E1CE"}.material-icons.signal_cellular_null:before{content:"\\E1CF"}.material-icons.signal_cellular_off:before{content:"\\E1D0"}.material-icons.signal_wifi_4_bar:before{content:"\\E1D8"}.material-icons.signal_wifi_4_bar_lock:before{content:"\\E1D9"}.material-icons.signal_wifi_off:before{content:"\\E1DA"}.material-icons.sim_card:before{content:"\\E32B"}.material-icons.sim_card_alert:before{content:"\\E624"}.material-icons.single_bed:before{content:"\\EA48"}.material-icons.skip_next:before{content:"\\E044"}.material-icons.skip_previous:before{content:"\\E045"}.material-icons.slideshow:before{content:"\\E41B"}.material-icons.slow_motion_video:before{content:"\\E068"}.material-icons.smartphone:before{content:"\\E32C"}.material-icons.smoke_free:before{content:"\\EB4A"}.material-icons.smoking_rooms:before{content:"\\EB4B"}.material-icons.sms:before{content:"\\E625"}.material-icons.sms_failed:before{content:"\\E626"}.material-icons.snooze:before{content:"\\E046"}.material-icons.sort:before{content:"\\E164"}.material-icons.sort_by_alpha:before{content:"\\E053"}.material-icons.spa:before{content:"\\EB4C"}.material-icons.space_bar:before{content:"\\E256"}.material-icons.speaker:before{content:"\\E32D"}.material-icons.speaker_group:before{content:"\\E32E"}.material-icons.speaker_notes:before{content:"\\E8CD"}.material-icons.speaker_notes_off:before{content:"\\E92A"}.material-icons.speaker_phone:before{content:"\\E0D2"}.material-icons.speed:before{content:"\\E9E4"}.material-icons.spellcheck:before{content:"\\E8CE"}.material-icons.sports:before{content:"\\EA30"}.material-icons.sports_baseball:before{content:"\\EA51"}.material-icons.sports_basketball:before{content:"\\EA26"}.material-icons.sports_cricket:before{content:"\\EA27"}.material-icons.sports_esports:before{content:"\\EA28"}.material-icons.sports_football:before{content:"\\EA29"}.material-icons.sports_golf:before{content:"\\EA2A"}.material-icons.sports_handball:before{content:"\\EA33"}.material-icons.sports_hockey:before{content:"\\EA2B"}.material-icons.sports_kabaddi:before{content:"\\EA34"}.material-icons.sports_mma:before{content:"\\EA2C"}.material-icons.sports_motorsports:before{content:"\\EA2D"}.material-icons.sports_rugby:before{content:"\\EA2E"}.material-icons.sports_soccer:before{content:"\\EA2F"}.material-icons.sports_tennis:before{content:"\\EA32"}.material-icons.sports_volleyball:before{content:"\\EA31"}.material-icons.square_foot:before{content:"\\EA49"}.material-icons.stacked_bar_chart:before{content:"\\E9E6"}.material-icons.star:before{content:"\\E838"}.material-icons.star_border:before{content:"\\E83A"}.material-icons.star_half:before{content:"\\E839"}.material-icons.star_outline:before{content:"\\E83A"}.material-icons.stars:before{content:"\\E8D0"}.material-icons.stay_current_landscape:before{content:"\\E0D3"}.material-icons.stay_current_portrait:before{content:"\\E0D4"}.material-icons.stay_primary_landscape:before{content:"\\E0D5"}.material-icons.stay_primary_portrait:before{content:"\\E0D6"}.material-icons.stop:before{content:"\\E047"}.material-icons.stop_screen_share:before{content:"\\E0E3"}.material-icons.storage:before{content:"\\E1DB"}.material-icons.store:before{content:"\\E8D1"}.material-icons.store_mall_directory:before{content:"\\E563"}.material-icons.storefront:before{content:"\\EA12"}.material-icons.straighten:before{content:"\\E41C"}.material-icons.stream:before{content:"\\E9E9"}.material-icons.streetview:before{content:"\\E56E"}.material-icons.strikethrough_s:before{content:"\\E257"}.material-icons.style:before{content:"\\E41D"}.material-icons.subdirectory_arrow_left:before{content:"\\E5D9"}.material-icons.subdirectory_arrow_right:before{content:"\\E5DA"}.material-icons.subject:before{content:"\\E8D2"}.material-icons.subscriptions:before{content:"\\E064"}.material-icons.subtitles:before{content:"\\E048"}.material-icons.subway:before{content:"\\E56F"}.material-icons.supervised_user_circle:before{content:"\\E939"}.material-icons.supervisor_account:before{content:"\\E8D3"}.material-icons.surround_sound:before{content:"\\E049"}.material-icons.swap_calls:before{content:"\\E0D7"}.material-icons.swap_horiz:before{content:"\\E8D4"}.material-icons.swap_horizontal_circle:before{content:"\\E933"}.material-icons.swap_vert:before{content:"\\E8D5"}.material-icons.swap_vert_circle:before,.material-icons.swap_vertical_circle:before{content:"\\E8D6"}.material-icons.swipe:before{content:"\\E9EC"}.material-icons.switch_account:before{content:"\\E9ED"}.material-icons.switch_camera:before{content:"\\E41E"}.material-icons.switch_video:before{content:"\\E41F"}.material-icons.sync:before{content:"\\E627"}.material-icons.sync_alt:before{content:"\\EA18"}.material-icons.sync_disabled:before{content:"\\E628"}.material-icons.sync_problem:before{content:"\\E629"}.material-icons.system_update:before{content:"\\E62A"}.material-icons.system_update_alt:before,.material-icons.system_update_tv:before{content:"\\E8D7"}.material-icons.tab:before{content:"\\E8D8"}.material-icons.tab_unselected:before{content:"\\E8D9"}.material-icons.table_chart:before{content:"\\E265"}.material-icons.tablet:before{content:"\\E32F"}.material-icons.tablet_android:before{content:"\\E330"}.material-icons.tablet_mac:before{content:"\\E331"}.material-icons.tag:before{content:"\\E9EF"}.material-icons.tag_faces:before{content:"\\E420"}.material-icons.takeout_dining:before{content:"\\EA74"}.material-icons.tap_and_play:before{content:"\\E62B"}.material-icons.terrain:before{content:"\\E564"}.material-icons.text_fields:before{content:"\\E262"}.material-icons.text_format:before{content:"\\E165"}.material-icons.text_rotate_up:before{content:"\\E93A"}.material-icons.text_rotate_vertical:before{content:"\\E93B"}.material-icons.text_rotation_angledown:before{content:"\\E93C"}.material-icons.text_rotation_angleup:before{content:"\\E93D"}.material-icons.text_rotation_down:before{content:"\\E93E"}.material-icons.text_rotation_none:before{content:"\\E93F"}.material-icons.textsms:before{content:"\\E0D8"}.material-icons.texture:before{content:"\\E421"}.material-icons.theater_comedy:before{content:"\\EA66"}.material-icons.theaters:before{content:"\\E8DA"}.material-icons.thumb_down:before{content:"\\E8DB"}.material-icons.thumb_down_alt:before{content:"\\E816"}.material-icons.thumb_down_off_alt:before{content:"\\E9F2"}.material-icons.thumb_up:before{content:"\\E8DC"}.material-icons.thumb_up_alt:before{content:"\\E817"}.material-icons.thumb_up_off_alt:before{content:"\\E9F3"}.material-icons.thumbs_up_down:before{content:"\\E8DD"}.material-icons.time_to_leave:before{content:"\\E62C"}.material-icons.timelapse:before{content:"\\E422"}.material-icons.timeline:before{content:"\\E922"}.material-icons.timer:before{content:"\\E425"}.material-icons.timer_10:before{content:"\\E423"}.material-icons.timer_3:before{content:"\\E424"}.material-icons.timer_off:before{content:"\\E426"}.material-icons.title:before{content:"\\E264"}.material-icons.toc:before{content:"\\E8DE"}.material-icons.today:before{content:"\\E8DF"}.material-icons.toggle_off:before{content:"\\E9F5"}.material-icons.toggle_on:before{content:"\\E9F6"}.material-icons.toll:before{content:"\\E8E0"}.material-icons.tonality:before{content:"\\E427"}.material-icons.touch_app:before{content:"\\E913"}.material-icons.toys:before{content:"\\E332"}.material-icons.track_changes:before{content:"\\E8E1"}.material-icons.traffic:before{content:"\\E565"}.material-icons.train:before{content:"\\E570"}.material-icons.tram:before{content:"\\E571"}.material-icons.transfer_within_a_station:before{content:"\\E572"}.material-icons.transform:before{content:"\\E428"}.material-icons.transit_enterexit:before{content:"\\E579"}.material-icons.translate:before{content:"\\E8E2"}.material-icons.trending_down:before{content:"\\E8E3"}.material-icons.trending_flat:before,.material-icons.trending_neutral:before{content:"\\E8E4"}.material-icons.trending_up:before{content:"\\E8E5"}.material-icons.trip_origin:before{content:"\\E57B"}.material-icons.tune:before{content:"\\E429"}.material-icons.turned_in:before{content:"\\E8E6"}.material-icons.turned_in_not:before{content:"\\E8E7"}.material-icons.tv:before{content:"\\E333"}.material-icons.tv_off:before{content:"\\E647"}.material-icons.two_wheeler:before{content:"\\E9F9"}.material-icons.unarchive:before{content:"\\E169"}.material-icons.undo:before{content:"\\E166"}.material-icons.unfold_less:before{content:"\\E5D6"}.material-icons.unfold_more:before{content:"\\E5D7"}.material-icons.unsubscribe:before{content:"\\E0EB"}.material-icons.update:before{content:"\\E923"}.material-icons.upload_file:before{content:"\\E9FC"}.material-icons.usb:before{content:"\\E1E0"}.material-icons.verified_user:before{content:"\\E8E8"}.material-icons.vertical_align_bottom:before{content:"\\E258"}.material-icons.vertical_align_center:before{content:"\\E259"}.material-icons.vertical_align_top:before{content:"\\E25A"}.material-icons.vertical_split:before{content:"\\E949"}.material-icons.vibration:before{content:"\\E62D"}.material-icons.video_call:before{content:"\\E070"}.material-icons.video_collection:before{content:"\\E04A"}.material-icons.video_label:before{content:"\\E071"}.material-icons.video_library:before{content:"\\E04A"}.material-icons.videocam:before{content:"\\E04B"}.material-icons.videocam_off:before{content:"\\E04C"}.material-icons.videogame_asset:before{content:"\\E338"}.material-icons.view_agenda:before{content:"\\E8E9"}.material-icons.view_array:before{content:"\\E8EA"}.material-icons.view_carousel:before{content:"\\E8EB"}.material-icons.view_column:before{content:"\\E8EC"}.material-icons.view_comfortable:before,.material-icons.view_comfy:before{content:"\\E42A"}.material-icons.view_compact:before{content:"\\E42B"}.material-icons.view_day:before{content:"\\E8ED"}.material-icons.view_headline:before{content:"\\E8EE"}.material-icons.view_in_ar:before{content:"\\E9FE"}.material-icons.view_list:before{content:"\\E8EF"}.material-icons.view_module:before{content:"\\E8F0"}.material-icons.view_quilt:before{content:"\\E8F1"}.material-icons.view_stream:before{content:"\\E8F2"}.material-icons.view_week:before{content:"\\E8F3"}.material-icons.vignette:before{content:"\\E435"}.material-icons.visibility:before{content:"\\E8F4"}.material-icons.visibility_off:before{content:"\\E8F5"}.material-icons.voice_chat:before{content:"\\E62E"}.material-icons.voice_over_off:before{content:"\\E94A"}.material-icons.voicemail:before{content:"\\E0D9"}.material-icons.volume_down:before{content:"\\E04D"}.material-icons.volume_mute:before{content:"\\E04E"}.material-icons.volume_off:before{content:"\\E04F"}.material-icons.volume_up:before{content:"\\E050"}.material-icons.volunteer_activism:before{content:"\\EA70"}.material-icons.vpn_key:before{content:"\\E0DA"}.material-icons.vpn_lock:before{content:"\\E62F"}.material-icons.wallet_giftcard:before{content:"\\E8F6"}.material-icons.wallet_membership:before{content:"\\E8F7"}.material-icons.wallet_travel:before{content:"\\E8F8"}.material-icons.wallpaper:before{content:"\\E1BC"}.material-icons.warning:before{content:"\\E002"}.material-icons.watch:before{content:"\\E334"}.material-icons.watch_later:before{content:"\\E924"}.material-icons.waterfall_chart:before{content:"\\EA00"}.material-icons.waves:before{content:"\\E176"}.material-icons.wb_auto:before{content:"\\E42C"}.material-icons.wb_cloudy:before{content:"\\E42D"}.material-icons.wb_incandescent:before{content:"\\E42E"}.material-icons.wb_iridescent:before{content:"\\E436"}.material-icons.wb_shade:before{content:"\\EA01"}.material-icons.wb_sunny:before{content:"\\E430"}.material-icons.wb_twighlight:before{content:"\\EA02"}.material-icons.wc:before{content:"\\E63D"}.material-icons.web:before{content:"\\E051"}.material-icons.web_asset:before{content:"\\E069"}.material-icons.weekend:before{content:"\\E16B"}.material-icons.whatshot:before{content:"\\E80E"}.material-icons.where_to_vote:before{content:"\\E177"}.material-icons.widgets:before{content:"\\E1BD"}.material-icons.wifi:before{content:"\\E63E"}.material-icons.wifi_lock:before{content:"\\E1E1"}.material-icons.wifi_off:before{content:"\\E648"}.material-icons.wifi_tethering:before{content:"\\E1E2"}.material-icons.work:before{content:"\\E8F9"}.material-icons.work_off:before{content:"\\E942"}.material-icons.work_outline:before{content:"\\E943"}.material-icons.workspaces_filled:before{content:"\\EA0D"}.material-icons.workspaces_outline:before{content:"\\EA0F"}.material-icons.wrap_text:before{content:"\\E25B"}.material-icons.youtube_searched_for:before{content:"\\E8FA"}.material-icons.zoom_in:before{content:"\\E8FF"}.material-icons.zoom_out:before{content:"\\E900"}.material-icons.zoom_out_map:before{content:"\\E56B"}',""])},function(t,e){t.exports="/fonts/vendor/material-design-icons-icondist/MaterialIcons-Regular.eot?96c476804d7a788cc1c05351b287ee41"},function(t,e){t.exports="/fonts/vendor/material-design-icons-icondist/MaterialIcons-Regular.woff2?0509ab09c1b0d2200a4135803c91d6ce"},function(t,e){t.exports="/fonts/vendor/material-design-icons-icondist/MaterialIcons-Regular.woff?29b882f018fa6fe75fd338aaae6235b8"},function(t,e){t.exports="/fonts/vendor/material-design-icons-icondist/MaterialIcons-Regular.ttf?da4ea5cdfca6b3baab285741f5ccb59f"},function(t,e,n){var r=n(1370),i=n(293),a=n(390),o=n(115)("socket.io-client");t.exports=e=c;var s=e.managers={};function c(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,i=r(t),c=i.source,u=i.id,l=i.path,d=s[u]&&l in s[u].nsps;return e.forceNew||e["force new connection"]||!1===e.multiplex||d?(o("ignoring socket cache for %s",c),n=a(c,e)):(s[u]||(o("new io instance for %s",c),s[u]=a(c,e)),n=s[u]),i.query&&!e.query&&(e.query=i.query),n.socket(i.path,e)}e.protocol=i.protocol,e.connect=c,e.Manager=n(390),e.Socket=n(396)},function(t,e,n){var r=n(386),i=n(115)("socket.io-client:url");t.exports=function(t,e){var n=t;e=e||"undefined"!=typeof location&&location,null==t&&(t=e.protocol+"//"+e.host);"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?e.protocol+t:e.host+t),/^(https?|wss?):\/\//.test(t)||(i("protocol-less url %s",t),t=void 0!==e?e.protocol+"//"+t:"https://"+t),i("parse %s",t),n=r(t));n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443"));n.path=n.path||"/";var a=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+a+":"+n.port,n.href=n.protocol+"://"+a+(e&&e.port===n.port?"":":"+n.port),n}},function(t,e,n){t.exports=function(t){function e(t){let e=0;for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return r.colors[Math.abs(e)%r.colors.length]}function r(t){let n;function o(...t){if(!o.enabled)return;const e=o,i=Number(new Date),a=i-(n||i);e.diff=a,e.prev=n,e.curr=i,n=i,t[0]=r.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let s=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(n,i)=>{if("%%"===n)return n;s++;const a=r.formatters[i];if("function"==typeof a){const r=t[s];n=a.call(e,r),t.splice(s,1),s--}return n}),r.formatArgs.call(e,t),(e.log||r.log).apply(e,t)}return o.namespace=t,o.enabled=r.enabled(t),o.useColors=r.useColors(),o.color=e(t),o.destroy=i,o.extend=a,"function"==typeof r.init&&r.init(o),r.instances.push(o),o}function i(){const t=r.instances.indexOf(this);return-1!==t&&(r.instances.splice(t,1),!0)}function a(t,e){const n=r(this.namespace+(void 0===e?":":e)+t);return n.log=this.log,n}function o(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return r.debug=r,r.default=r,r.coerce=function(t){return t instanceof Error?t.stack||t.message:t},r.disable=function(){const t=[...r.names.map(o),...r.skips.map(o).map(t=>"-"+t)].join(",");return r.enable(""),t},r.enable=function(t){let e;r.save(t),r.names=[],r.skips=[];const n=("string"==typeof t?t:"").split(/[\s,]+/),i=n.length;for(e=0;e<i;e++)n[e]&&("-"===(t=n[e].replace(/\*/g,".*?"))[0]?r.skips.push(new RegExp("^"+t.substr(1)+"$")):r.names.push(new RegExp("^"+t+"$")));for(e=0;e<r.instances.length;e++){const t=r.instances[e];t.enabled=r.enabled(t.namespace)}},r.enabled=function(t){if("*"===t[t.length-1])return!0;let e,n;for(e=0,n=r.skips.length;e<n;e++)if(r.skips[e].test(t))return!1;for(e=0,n=r.names.length;e<n;e++)if(r.names[e].test(t))return!0;return!1},r.humanize=n(387),Object.keys(t).forEach(e=>{r[e]=t[e]}),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=e,r.enable(r.load()),r}},function(t,e,n){(function(r){function i(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=Object({MIX_PUSHER_APP_KEY:"",MIX_PUSHER_APP_CLUSTER:"mt1",NODE_ENV:"production"}).DEBUG),t}(e=t.exports=n(1373)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),!n)return;var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var i=0,a=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&"%c"===t&&(a=++i)}),t.splice(a,0,r)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=i,e.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(i())}).call(e,n(26))},function(t,e,n){function r(t){var n;function r(){if(r.enabled){var t=r,i=+new Date,a=i-(n||i);t.diff=a,t.prev=n,t.curr=i,n=i;for(var o=new Array(arguments.length),s=0;s<o.length;s++)o[s]=arguments[s];o[0]=e.coerce(o[0]),"string"!=typeof o[0]&&o.unshift("%O");var c=0;o[0]=o[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;c++;var i=e.formatters[r];if("function"==typeof i){var a=o[c];n=i.call(t,a),o.splice(c,1),c--}return n}),e.formatArgs.call(t,o),(r.log||e.log||console.log.bind(console)).apply(t,o)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=function(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}(t),r.destroy=i,"function"==typeof e.init&&e.init(r),e.instances.push(r),r}function i(){var t=e.instances.indexOf(this);return-1!==t&&(e.instances.splice(t,1),!0)}(e=t.exports=r.debug=r.default=r).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){var n;e.save(t),e.names=[],e.skips=[];var r=("string"==typeof t?t:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(t=r[n].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")));for(n=0;n<e.instances.length;n++){var a=e.instances[n];a.enabled=e.enabled(a.namespace)}},e.enabled=function(t){if("*"===t[t.length-1])return!0;var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(1374),e.instances=[],e.names=[],e.skips=[],e.formatters={}},function(t,e){var n=1e3,r=60*n,i=60*r,a=24*i,o=365.25*a;function s(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}t.exports=function(t,e){e=e||{};var c,u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!e)return;var s=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*o;case"days":case"day":case"d":return s*a;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(t);if("number"===u&&!1===isNaN(t))return e.long?s(c=t,a,"day")||s(c,i,"hour")||s(c,r,"minute")||s(c,n,"second")||c+" ms":function(t){if(t>=a)return Math.round(t/a)+"d";if(t>=i)return Math.round(t/i)+"h";if(t>=r)return Math.round(t/r)+"m";if(t>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}t.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var i=0;i<r.length;i++)if((n=r[i])===e||n.fn===e){r.splice(i,1);break}return this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),n=this._callbacks["$"+t];if(n)for(var r=0,i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,e);return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e,n){var r=n(388),i=n(389),a=Object.prototype.toString,o="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===a.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===a.call(File);e.deconstructPacket=function(t){var e=[],n=t.data,a=t;return a.data=function t(e,n){if(!e)return e;if(i(e)){var a={_placeholder:!0,num:n.length};return n.push(e),a}if(r(e)){for(var o=new Array(e.length),s=0;s<e.length;s++)o[s]=t(e[s],n);return o}if("object"==typeof e&&!(e instanceof Date)){var o={};for(var c in e)o[c]=t(e[c],n);return o}return e}(n,e),a.attachments=e.length,{packet:a,buffers:e}},e.reconstructPacket=function(t,e){return t.data=function t(e,n){if(!e)return e;if(e&&e._placeholder)return n[e.num];if(r(e))for(var i=0;i<e.length;i++)e[i]=t(e[i],n);else if("object"==typeof e)for(var a in e)e[a]=t(e[a],n);return e}(t.data,e),t.attachments=void 0,t},e.removeBlobs=function(t,e){var n=0,a=t;!function t(c,u,l){if(!c)return c;if(o&&c instanceof Blob||s&&c instanceof File){n++;var d=new FileReader;d.onload=function(){l?l[u]=this.result:a=this.result,--n||e(a)},d.readAsArrayBuffer(c)}else if(r(c))for(var f=0;f<c.length;f++)t(c[f],f,c);else if("object"==typeof c&&!i(c))for(var h in c)t(c[h],h,c)}(a),n||e(a)}},function(t,e,n){t.exports=n(1378),t.exports.parser=n(78)},function(t,e,n){var r=n(391),i=n(296),a=n(118)("engine.io-client:socket"),o=n(395),s=n(78),c=n(386),u=n(116);function l(t,e){if(!(this instanceof l))return new l(t,e);e=e||{},t&&"object"==typeof t&&(e=t,t=null),t?(t=c(t),e.hostname=t.host,e.secure="https"===t.protocol||"wss"===t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=c(e.host).host),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.agent=e.agent||!1,this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?443:80),this.query=e.query||{},"string"==typeof this.query&&(this.query=u.decode(this.query)),this.upgrade=!1!==e.upgrade,this.path=(e.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!e.forceJSONP,this.jsonp=!1!==e.jsonp,this.forceBase64=!!e.forceBase64,this.enablesXDR=!!e.enablesXDR,this.withCredentials=!1!==e.withCredentials,this.timestampParam=e.timestampParam||"t",this.timestampRequests=e.timestampRequests,this.transports=e.transports||["polling","websocket"],this.transportOptions=e.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=e.policyPort||843,this.rememberUpgrade=e.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=e.onlyBinaryUpgrades,this.perMessageDeflate=!1!==e.perMessageDeflate&&(e.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=e.pfx||null,this.key=e.key||null,this.passphrase=e.passphrase||null,this.cert=e.cert||null,this.ca=e.ca||null,this.ciphers=e.ciphers||null,this.rejectUnauthorized=void 0===e.rejectUnauthorized||e.rejectUnauthorized,this.forceNode=!!e.forceNode,this.isReactNative="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),("undefined"==typeof self||this.isReactNative)&&(e.extraHeaders&&Object.keys(e.extraHeaders).length>0&&(this.extraHeaders=e.extraHeaders),e.localAddress&&(this.localAddress=e.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}t.exports=l,l.priorWebsocketSuccess=!1,i(l.prototype),l.protocol=s.protocol,l.Socket=l,l.Transport=n(295),l.transports=n(391),l.parser=n(78),l.prototype.createTransport=function(t){a('creating transport "%s"',t);var e=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}(this.query);e.EIO=s.protocol,e.transport=t;var n=this.transportOptions[t]||{};return this.id&&(e.sid=this.id),new r[t]({query:e,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,withCredentials:n.withCredentials||this.withCredentials,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0,isReactNative:this.isReactNative})},l.prototype.open=function(){var t;if(this.rememberUpgrade&&l.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length){var e=this;return void setTimeout(function(){e.emit("error","No transports available")},0)}t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)},l.prototype.setTransport=function(t){a("setting transport %s",t.name);var e=this;this.transport&&(a("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",function(){e.onDrain()}).on("packet",function(t){e.onPacket(t)}).on("error",function(t){e.onError(t)}).on("close",function(){e.onClose("transport close")})},l.prototype.probe=function(t){a('probing transport "%s"',t);var e=this.createTransport(t,{probe:1}),n=!1,r=this;function i(){if(r.onlyBinaryUpgrades){var i=!this.supportsBinary&&r.transport.supportsBinary;n=n||i}n||(a('probe transport "%s" opened',t),e.send([{type:"ping",data:"probe"}]),e.once("packet",function(i){if(!n)if("pong"===i.type&&"probe"===i.data){if(a('probe transport "%s" pong',t),r.upgrading=!0,r.emit("upgrading",e),!e)return;l.priorWebsocketSuccess="websocket"===e.name,a('pausing current transport "%s"',r.transport.name),r.transport.pause(function(){n||"closed"!==r.readyState&&(a("changing transport and sending upgrade packet"),f(),r.setTransport(e),e.send([{type:"upgrade"}]),r.emit("upgrade",e),e=null,r.upgrading=!1,r.flush())})}else{a('probe transport "%s" failed',t);var o=new Error("probe error");o.transport=e.name,r.emit("upgradeError",o)}}))}function o(){n||(n=!0,f(),e.close(),e=null)}function s(n){var i=new Error("probe error: "+n);i.transport=e.name,o(),a('probe transport "%s" failed because of error: %s',t,n),r.emit("upgradeError",i)}function c(){s("transport closed")}function u(){s("socket closed")}function d(t){e&&t.name!==e.name&&(a('"%s" works - aborting "%s"',t.name,e.name),o())}function f(){e.removeListener("open",i),e.removeListener("error",s),e.removeListener("close",c),r.removeListener("close",u),r.removeListener("upgrading",d)}l.priorWebsocketSuccess=!1,e.once("open",i),e.once("error",s),e.once("close",c),this.once("close",u),this.once("upgrading",d),e.open()},l.prototype.onOpen=function(){if(a("socket open"),this.readyState="open",l.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){a("starting upgrade probes");for(var t=0,e=this.upgrades.length;t<e;t++)this.probe(this.upgrades[t])}},l.prototype.onPacket=function(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(a('socket receive: type "%s", data "%s"',t.type,t.data),this.emit("packet",t),this.emit("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emit("data",t.data),this.emit("message",t.data)}else a('packet received with socket readyState "%s"',this.readyState)},l.prototype.onHandshake=function(t){this.emit("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},l.prototype.onHeartbeat=function(t){clearTimeout(this.pingTimeoutTimer);var e=this;e.pingTimeoutTimer=setTimeout(function(){"closed"!==e.readyState&&e.onClose("ping timeout")},t||e.pingInterval+e.pingTimeout)},l.prototype.setPing=function(){var t=this;clearTimeout(t.pingIntervalTimer),t.pingIntervalTimer=setTimeout(function(){a("writing ping packet - expecting pong within %sms",t.pingTimeout),t.ping(),t.onHeartbeat(t.pingTimeout)},t.pingInterval)},l.prototype.ping=function(){var t=this;this.sendPacket("ping",function(){t.emit("ping")})},l.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},l.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(a("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},l.prototype.write=l.prototype.send=function(t,e,n){return this.sendPacket("message",t,e,n),this},l.prototype.sendPacket=function(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var i={type:t,data:e,options:n};this.emit("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}},l.prototype.close=function(){if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var t=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?r():e()}):this.upgrading?r():e()}function e(){t.onClose("forced close"),a("socket closing - telling transport to close"),t.transport.close()}function n(){t.removeListener("upgrade",n),t.removeListener("upgradeError",n),e()}function r(){t.once("upgrade",n),t.once("upgradeError",n)}return this},l.prototype.onError=function(t){a("socket error %j",t),l.priorWebsocketSuccess=!1,this.emit("error",t),this.onClose("transport error",t)},l.prototype.onClose=function(t,e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){a('socket close with reason: "%s"',t);clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",t,e),this.writeBuffer=[],this.prevBufferLen=0}},l.prototype.filterUpgrades=function(t){for(var e=[],n=0,r=t.length;n<r;n++)~o(this.transports,t[n])&&e.push(t[n]);return e}},function(t,e){try{t.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){t.exports=!1}},function(t,e,n){var r=n(294),i=n(392),a=n(296),o=n(117),s=n(118)("engine.io-client:polling-xhr");function c(){}function u(t){if(i.call(this,t),this.requestTimeout=t.requestTimeout,this.extraHeaders=t.extraHeaders,"undefined"!=typeof location){var e="https:"===location.protocol,n=location.port;n||(n=e?443:80),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||n!==t.port,this.xs=t.secure!==e}}function l(t){this.method=t.method||"GET",this.uri=t.uri,this.xd=!!t.xd,this.xs=!!t.xs,this.async=!1!==t.async,this.data=void 0!==t.data?t.data:null,this.agent=t.agent,this.isBinary=t.isBinary,this.supportsBinary=t.supportsBinary,this.enablesXDR=t.enablesXDR,this.withCredentials=t.withCredentials,this.requestTimeout=t.requestTimeout,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.extraHeaders=t.extraHeaders,this.create()}if(t.exports=u,t.exports.Request=l,o(u,i),u.prototype.supportsBinary=!0,u.prototype.request=function(t){return(t=t||{}).uri=this.uri(),t.xd=this.xd,t.xs=this.xs,t.agent=this.agent||!1,t.supportsBinary=this.supportsBinary,t.enablesXDR=this.enablesXDR,t.withCredentials=this.withCredentials,t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized,t.requestTimeout=this.requestTimeout,t.extraHeaders=this.extraHeaders,new l(t)},u.prototype.doWrite=function(t,e){var n="string"!=typeof t&&void 0!==t,r=this.request({method:"POST",data:t,isBinary:n}),i=this;r.on("success",e),r.on("error",function(t){i.onError("xhr post error",t)}),this.sendXhr=r},u.prototype.doPoll=function(){s("xhr poll");var t=this.request(),e=this;t.on("data",function(t){e.onData(t)}),t.on("error",function(t){e.onError("xhr poll error",t)}),this.pollXhr=t},a(l.prototype),l.prototype.create=function(){var t={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized;var e=this.xhr=new r(t),n=this;try{s("xhr open %s: %s",this.method,this.uri),e.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var i in e.setDisableHeaderCheck&&e.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(i)&&e.setRequestHeader(i,this.extraHeaders[i])}catch(t){}if("POST"===this.method)try{this.isBinary?e.setRequestHeader("Content-type","application/octet-stream"):e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{e.setRequestHeader("Accept","*/*")}catch(t){}"withCredentials"in e&&(e.withCredentials=this.withCredentials),this.requestTimeout&&(e.timeout=this.requestTimeout),this.hasXDR()?(e.onload=function(){n.onLoad()},e.onerror=function(){n.onError(e.responseText)}):e.onreadystatechange=function(){if(2===e.readyState)try{var t=e.getResponseHeader("Content-Type");(n.supportsBinary&&"application/octet-stream"===t||"application/octet-stream; charset=UTF-8"===t)&&(e.responseType="arraybuffer")}catch(t){}4===e.readyState&&(200===e.status||1223===e.status?n.onLoad():setTimeout(function(){n.onError("number"==typeof e.status?e.status:0)},0))},s("xhr data %s",this.data),e.send(this.data)}catch(t){return void setTimeout(function(){n.onError(t)},0)}"undefined"!=typeof document&&(this.index=l.requestsCount++,l.requests[this.index]=this)},l.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},l.prototype.onData=function(t){this.emit("data",t),this.onSuccess()},l.prototype.onError=function(t){this.emit("error",t),this.cleanup(!0)},l.prototype.cleanup=function(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=c:this.xhr.onreadystatechange=c,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete l.requests[this.index],this.xhr=null}},l.prototype.onLoad=function(){var t;try{var e;try{e=this.xhr.getResponseHeader("Content-Type")}catch(t){}t=("application/octet-stream"===e||"application/octet-stream; charset=UTF-8"===e)&&this.xhr.response||this.xhr.responseText}catch(t){this.onError(t)}null!=t&&this.onData(t)},l.prototype.hasXDR=function(){return"undefined"!=typeof XDomainRequest&&!this.xs&&this.enablesXDR},l.prototype.abort=function(){this.cleanup()},l.requestsCount=0,l.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",f);else if("function"==typeof addEventListener){var d="onpagehide"in self?"pagehide":"unload";addEventListener(d,f,!1)}function f(){for(var t in l.requests)l.requests.hasOwnProperty(t)&&l.requests[t].abort()}},function(t,e){t.exports=Object.keys||function(t){var e=[],n=Object.prototype.hasOwnProperty;for(var r in t)n.call(t,r)&&e.push(r);return e}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e){t.exports=function(t,e,n){var r=t.byteLength;if(e=e||0,n=n||r,t.slice)return t.slice(e,n);if(e<0&&(e+=r),n<0&&(n+=r),n>r&&(n=r),e>=r||e>=n||0===r)return new ArrayBuffer(0);for(var i=new Uint8Array(t),a=new Uint8Array(n-e),o=e,s=0;o<n;o++,s++)a[s]=i[o];return a.buffer}},function(t,e){function n(){}t.exports=function(t,e,r){var i=!1;return r=r||n,a.count=t,0===t?e():a;function a(t,n){if(a.count<=0)throw new Error("after called too many times");--a.count,t?(i=!0,e(t),e=r):0!==a.count||i||e(null,n)}}},function(t,e){var n,r,i,a=String.fromCharCode;function o(t){for(var e,n,r=[],i=0,a=t.length;i<a;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<a?56320==(64512&(n=t.charCodeAt(i++)))?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),i--):r.push(e);return r}function s(t,e){if(t>=55296&&t<=57343){if(e)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function c(t,e){return a(t>>e&63|128)}function u(t,e){if(0==(4294967168&t))return a(t);var n="";return 0==(4294965248&t)?n=a(t>>6&31|192):0==(4294901760&t)?(s(t,e)||(t=65533),n=a(t>>12&15|224),n+=c(t,6)):0==(4292870144&t)&&(n=a(t>>18&7|240),n+=c(t,12),n+=c(t,6)),n+=a(63&t|128)}function l(){if(i>=r)throw Error("Invalid byte index");var t=255&n[i];if(i++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function d(t){var e,a;if(i>r)throw Error("Invalid byte index");if(i==r)return!1;if(e=255&n[i],i++,0==(128&e))return e;if(192==(224&e)){if((a=(31&e)<<6|l())>=128)return a;throw Error("Invalid continuation byte")}if(224==(240&e)){if((a=(15&e)<<12|l()<<6|l())>=2048)return s(a,t)?a:65533;throw Error("Invalid continuation byte")}if(240==(248&e)&&(a=(7&e)<<18|l()<<12|l()<<6|l())>=65536&&a<=1114111)return a;throw Error("Invalid UTF-8 detected")}t.exports={version:"2.1.2",encode:function(t,e){for(var n=!1!==(e=e||{}).strict,r=o(t),i=r.length,a=-1,s="";++a<i;)s+=u(r[a],n);return s},decode:function(t,e){var s=!1!==(e=e||{}).strict;n=o(t),r=n.length,i=0;for(var c,u=[];!1!==(c=d(s));)u.push(c);return function(t){for(var e,n=t.length,r=-1,i="";++r<n;)(e=t[r])>65535&&(i+=a((e-=65536)>>>10&1023|55296),e=56320|1023&e),i+=a(e);return i}(u)}}},function(t,e){!function(){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(256),r=0;r<t.length;r++)n[t.charCodeAt(r)]=r;e.encode=function(e){var n,r=new Uint8Array(e),i=r.length,a="";for(n=0;n<i;n+=3)a+=t[r[n]>>2],a+=t[(3&r[n])<<4|r[n+1]>>4],a+=t[(15&r[n+1])<<2|r[n+2]>>6],a+=t[63&r[n+2]];return i%3==2?a=a.substring(0,a.length-1)+"=":i%3==1&&(a=a.substring(0,a.length-2)+"=="),a},e.decode=function(t){var e,r,i,a,o,s=.75*t.length,c=t.length,u=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var l=new ArrayBuffer(s),d=new Uint8Array(l);for(e=0;e<c;e+=4)r=n[t.charCodeAt(e)],i=n[t.charCodeAt(e+1)],a=n[t.charCodeAt(e+2)],o=n[t.charCodeAt(e+3)],d[u++]=r<<2|i>>4,d[u++]=(15&i)<<4|a>>2,d[u++]=(3&a)<<6|63&o;return l}}()},function(t,e){var n=void 0!==n?n:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,r=function(){try{return 2===new Blob(["hi"]).size}catch(t){return!1}}(),i=r&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(t){return!1}}(),a=n&&n.prototype.append&&n.prototype.getBlob;function o(t){return t.map(function(t){if(t.buffer instanceof ArrayBuffer){var e=t.buffer;if(t.byteLength!==e.byteLength){var n=new Uint8Array(t.byteLength);n.set(new Uint8Array(e,t.byteOffset,t.byteLength)),e=n.buffer}return e}return t})}function s(t,e){e=e||{};var r=new n;return o(t).forEach(function(t){r.append(t)}),e.type?r.getBlob(e.type):r.getBlob()}function c(t,e){return new Blob(o(t),e||{})}"undefined"!=typeof Blob&&(s.prototype=Blob.prototype,c.prototype=Blob.prototype),t.exports=r?i?Blob:c:a?s:void 0},function(t,e,n){t.exports=function(t){function e(t){let e=0;for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return r.colors[Math.abs(e)%r.colors.length]}function r(t){let n;function o(...t){if(!o.enabled)return;const e=o,i=Number(new Date),a=i-(n||i);e.diff=a,e.prev=n,e.curr=i,n=i,t[0]=r.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let s=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(n,i)=>{if("%%"===n)return n;s++;const a=r.formatters[i];if("function"==typeof a){const r=t[s];n=a.call(e,r),t.splice(s,1),s--}return n}),r.formatArgs.call(e,t),(e.log||r.log).apply(e,t)}return o.namespace=t,o.enabled=r.enabled(t),o.useColors=r.useColors(),o.color=e(t),o.destroy=i,o.extend=a,"function"==typeof r.init&&r.init(o),r.instances.push(o),o}function i(){const t=r.instances.indexOf(this);return-1!==t&&(r.instances.splice(t,1),!0)}function a(t,e){const n=r(this.namespace+(void 0===e?":":e)+t);return n.log=this.log,n}function o(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return r.debug=r,r.default=r,r.coerce=function(t){return t instanceof Error?t.stack||t.message:t},r.disable=function(){const t=[...r.names.map(o),...r.skips.map(o).map(t=>"-"+t)].join(",");return r.enable(""),t},r.enable=function(t){let e;r.save(t),r.names=[],r.skips=[];const n=("string"==typeof t?t:"").split(/[\s,]+/),i=n.length;for(e=0;e<i;e++)n[e]&&("-"===(t=n[e].replace(/\*/g,".*?"))[0]?r.skips.push(new RegExp("^"+t.substr(1)+"$")):r.names.push(new RegExp("^"+t+"$")));for(e=0;e<r.instances.length;e++){const t=r.instances[e];t.enabled=r.enabled(t.namespace)}},r.enabled=function(t){if("*"===t[t.length-1])return!0;let e,n;for(e=0,n=r.skips.length;e<n;e++)if(r.skips[e].test(t))return!1;for(e=0,n=r.names.length;e<n;e++)if(r.names[e].test(t))return!0;return!1},r.humanize=n(387),Object.keys(t).forEach(e=>{r[e]=t[e]}),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=e,r.enable(r.load()),r}},function(t,e,n){(function(e){var r=n(392),i=n(117);t.exports=l;var a,o=/\n/g,s=/\\n/g;function c(){}function u(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:{}}function l(t){if(r.call(this,t),this.query=this.query||{},!a){var e=u();a=e.___eio=e.___eio||[]}this.index=a.length;var n=this;a.push(function(t){n.onData(t)}),this.query.j=this.index,"function"==typeof addEventListener&&addEventListener("beforeunload",function(){n.script&&(n.script.onerror=c)},!1)}i(l,r),l.prototype.supportsBinary=!1,l.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),r.prototype.doClose.call(this)},l.prototype.doPoll=function(){var t=this,e=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),e.async=!0,e.src=this.uri(),e.onerror=function(e){t.onError("jsonp poll error",e)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(e,n):(document.head||document.body).appendChild(e),this.script=e,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout(function(){var t=document.createElement("iframe");document.body.appendChild(t),document.body.removeChild(t)},100)},l.prototype.doWrite=function(t,e){var n=this;if(!this.form){var r,i=document.createElement("form"),a=document.createElement("textarea"),c=this.iframeId="eio_iframe_"+this.index;i.className="socketio",i.style.position="absolute",i.style.top="-1000px",i.style.left="-1000px",i.target=c,i.method="POST",i.setAttribute("accept-charset","utf-8"),a.name="d",i.appendChild(a),document.body.appendChild(i),this.form=i,this.area=a}function u(){l(),e()}function l(){if(n.iframe)try{n.form.removeChild(n.iframe)}catch(t){n.onError("jsonp polling iframe removal error",t)}try{var t='<iframe src="javascript:0" name="'+n.iframeId+'">';r=document.createElement(t)}catch(t){(r=document.createElement("iframe")).name=n.iframeId,r.src="javascript:0"}r.id=n.iframeId,n.form.appendChild(r),n.iframe=r}this.form.action=this.uri(),l(),t=t.replace(s,"\\\n"),this.area.value=t.replace(o,"\\n");try{this.form.submit()}catch(t){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===n.iframe.readyState&&u()}:this.iframe.onload=u}}).call(e,n(20))},function(t,e,n){(function(e){var r,i,a=n(295),o=n(78),s=n(116),c=n(117),u=n(394),l=n(118)("engine.io-client:websocket");if("undefined"!=typeof WebSocket?r=WebSocket:"undefined"!=typeof self&&(r=self.WebSocket||self.MozWebSocket),"undefined"==typeof window)try{i=n(1391)}catch(t){}var d=r||i;function f(t){t&&t.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=t.perMessageDeflate,this.usingBrowserWebSocket=r&&!t.forceNode,this.protocols=t.protocols,this.usingBrowserWebSocket||(d=i),a.call(this,t)}t.exports=f,c(f,a),f.prototype.name="websocket",f.prototype.supportsBinary=!0,f.prototype.doOpen=function(){if(this.check()){var t=this.uri(),e=this.protocols,n={agent:this.agent,perMessageDeflate:this.perMessageDeflate};n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?e?new d(t,e):new d(t):new d(t,e,n)}catch(t){return this.emit("error",t)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},f.prototype.addEventListeners=function(){var t=this;this.ws.onopen=function(){t.onOpen()},this.ws.onclose=function(){t.onClose()},this.ws.onmessage=function(e){t.onData(e.data)},this.ws.onerror=function(e){t.onError("websocket error",e)}},f.prototype.write=function(t){var n=this;this.writable=!1;for(var r=t.length,i=0,a=r;i<a;i++)!function(t){o.encodePacket(t,n.supportsBinary,function(i){if(!n.usingBrowserWebSocket){var a={};if(t.options&&(a.compress=t.options.compress),n.perMessageDeflate)("string"==typeof i?e.byteLength(i):i.length)<n.perMessageDeflate.threshold&&(a.compress=!1)}try{n.usingBrowserWebSocket?n.ws.send(i):n.ws.send(i,a)}catch(t){l("websocket closed before onclose event")}--r||s()})}(t[i]);function s(){n.emit("flush"),setTimeout(function(){n.writable=!0,n.emit("drain")},0)}},f.prototype.onClose=function(){a.prototype.onClose.call(this)},f.prototype.doClose=function(){void 0!==this.ws&&this.ws.close()},f.prototype.uri=function(){var t=this.query||{},e=this.secure?"wss":"ws",n="";return this.port&&("wss"===e&&443!==Number(this.port)||"ws"===e&&80!==Number(this.port))&&(n=":"+this.port),this.timestampRequests&&(t[this.timestampParam]=u()),this.supportsBinary||(t.b64=1),(t=s.encode(t)).length&&(t="?"+t),e+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+t},f.prototype.check=function(){return!(!d||"__initialize"in d&&this.name===f.prototype.name)}}).call(e,n(19).Buffer)},function(t,e){},function(t,e){t.exports=function(t,e){for(var n=[],r=(e=e||0)||0;r<t.length;r++)n[r-e]=t[r];return n}},function(t,e){function n(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}t.exports=n,n.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(t){this.ms=t},n.prototype.setMax=function(t){this.max=t},n.prototype.setJitter=function(t){this.jitter=t}},function(t,e,n){(function(t){(function(e){"use strict";var n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};function r(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}var i,a=(function(t,e){var i,a,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};i=n,a=function(){var e,n;function i(){return e.apply(null,arguments)}function a(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function s(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function c(t){return void 0===t}function u(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function l(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function d(t,e){var n,r=[];for(n=0;n<t.length;++n)r.push(e(t[n],n));return r}function f(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function h(t,e){for(var n in e)f(e,n)&&(t[n]=e[n]);return f(e,"toString")&&(t.toString=e.toString),f(e,"valueOf")&&(t.valueOf=e.valueOf),t}function p(t,e,n,r){return De(t,e,n,r,!0).utc()}function m(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function v(t){if(null==t._isValid){var e=m(t),r=n.call(e.parsedDateParts,function(t){return null!=t}),i=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&r);if(t._strict&&(i=i&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return i;t._isValid=i}return t._isValid}function _(t){var e=p(NaN);return null!=t?h(m(e),t):m(e).userInvalidated=!0,e}n=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,r=0;r<n;r++)if(r in e&&t.call(this,e[r],r,e))return!0;return!1};var g=i.momentProperties=[];function b(t,e){var n,r,i;if(c(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),c(e._i)||(t._i=e._i),c(e._f)||(t._f=e._f),c(e._l)||(t._l=e._l),c(e._strict)||(t._strict=e._strict),c(e._tzm)||(t._tzm=e._tzm),c(e._isUTC)||(t._isUTC=e._isUTC),c(e._offset)||(t._offset=e._offset),c(e._pf)||(t._pf=m(e)),c(e._locale)||(t._locale=e._locale),g.length>0)for(n=0;n<g.length;n++)c(i=e[r=g[n]])||(t[r]=i);return t}var y=!1;function x(t){b(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===y&&(y=!0,i.updateOffset(this),y=!1)}function w(t){return t instanceof x||null!=t&&null!=t._isAMomentObject}function k(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function C(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=k(e)),n}function E(t,e,n){var r,i=Math.min(t.length,e.length),a=Math.abs(t.length-e.length),o=0;for(r=0;r<i;r++)(n&&t[r]!==e[r]||!n&&C(t[r])!==C(e[r]))&&o++;return o+a}function S(t){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function I(t,e){var n=!0;return h(function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,t),n){for(var r,a=[],s=0;s<arguments.length;s++){if(r="","object"===o(arguments[s])){for(var c in r+="\n["+s+"] ",arguments[0])r+=c+": "+arguments[0][c]+", ";r=r.slice(0,-2)}else r=arguments[s];a.push(r)}S(t+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)},e)}var M,T={};function D(t,e){null!=i.deprecationHandler&&i.deprecationHandler(t,e),T[t]||(S(e),T[t]=!0)}function R(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function P(t,e){var n,r=h({},t);for(n in e)f(e,n)&&(s(t[n])&&s(e[n])?(r[n]={},h(r[n],t[n]),h(r[n],e[n])):null!=e[n]?r[n]=e[n]:delete r[n]);for(n in t)f(t,n)&&!f(e,n)&&s(t[n])&&(r[n]=h({},r[n]));return r}function O(t){null!=t&&this.set(t)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,M=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)f(t,e)&&n.push(e);return n};var L={};function A(t,e){var n=t.toLowerCase();L[n]=L[n+"s"]=L[e]=t}function N(t){return"string"==typeof t?L[t]||L[t.toLowerCase()]:void 0}function B(t){var e,n,r={};for(n in t)f(t,n)&&(e=N(n))&&(r[e]=t[n]);return r}var j={};function F(t,e){j[t]=e}function Y(t,e,n){var r=""+Math.abs(t),i=e-r.length;return(t>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var $=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,z=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,V={},H={};function q(t,e,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),t&&(H[t]=i),e&&(H[e[0]]=function(){return Y(i.apply(this,arguments),e[1],e[2])}),n&&(H[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function W(t,e){return t.isValid()?(e=U(e,t.localeData()),V[e]=V[e]||function(t){var e,n,r,i=t.match($);for(e=0,n=i.length;e<n;e++)H[i[e]]?i[e]=H[i[e]]:i[e]=(r=i[e]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(e){var r,a="";for(r=0;r<n;r++)a+=R(i[r])?i[r].call(e,t):i[r];return a}}(e),V[e](t)):t.localeData().invalidDate()}function U(t,e){var n=5;function r(t){return e.longDateFormat(t)||t}for(z.lastIndex=0;n>=0&&z.test(t);)t=t.replace(z,r),z.lastIndex=0,n-=1;return t}var G=/\d/,K=/\d\d/,X=/\d{3}/,J=/\d{4}/,Z=/[+-]?\d{6}/,Q=/\d\d?/,tt=/\d\d\d\d?/,et=/\d\d\d\d\d\d?/,nt=/\d{1,3}/,rt=/\d{1,4}/,it=/[+-]?\d{1,6}/,at=/\d+/,ot=/[+-]?\d+/,st=/Z|[+-]\d\d:?\d\d/gi,ct=/Z|[+-]\d\d(?::?\d\d)?/gi,ut=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,lt={};function dt(t,e,n){lt[t]=R(e)?e:function(t,r){return t&&n?n:e}}function ft(t,e){return f(lt,t)?lt[t](e._strict,e._locale):new RegExp(ht(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,r,i){return e||n||r||i})))}function ht(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var pt={};function mt(t,e){var n,r=e;for("string"==typeof t&&(t=[t]),u(e)&&(r=function(t,n){n[e]=C(t)}),n=0;n<t.length;n++)pt[t[n]]=r}function vt(t,e){mt(t,function(t,n,r,i){r._w=r._w||{},e(t,r._w,r,i)})}function _t(t,e,n){null!=e&&f(pt,t)&&pt[t](e,n._a,n,t)}var gt=0,bt=1,yt=2,xt=3,wt=4,kt=5,Ct=6,Et=7,St=8;function It(t){return Mt(t)?366:365}function Mt(t){return t%4==0&&t%100!=0||t%400==0}q("Y",0,0,function(){var t=this.year();return t<=9999?""+t:"+"+t}),q(0,["YY",2],0,function(){return this.year()%100}),q(0,["YYYY",4],0,"year"),q(0,["YYYYY",5],0,"year"),q(0,["YYYYYY",6,!0],0,"year"),A("year","y"),F("year",1),dt("Y",ot),dt("YY",Q,K),dt("YYYY",rt,J),dt("YYYYY",it,Z),dt("YYYYYY",it,Z),mt(["YYYYY","YYYYYY"],gt),mt("YYYY",function(t,e){e[gt]=2===t.length?i.parseTwoDigitYear(t):C(t)}),mt("YY",function(t,e){e[gt]=i.parseTwoDigitYear(t)}),mt("Y",function(t,e){e[gt]=parseInt(t,10)}),i.parseTwoDigitYear=function(t){return C(t)+(C(t)>68?1900:2e3)};var Tt,Dt=Rt("FullYear",!0);function Rt(t,e){return function(n){return null!=n?(Ot(this,t,n),i.updateOffset(this,e),this):Pt(this,t)}}function Pt(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function Ot(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&Mt(t.year())?t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),Lt(n,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](n))}function Lt(t,e){if(isNaN(t)||isNaN(e))return NaN;var n,r=(e%(n=12)+n)%n;return t+=(e-r)/12,1===r?Mt(t)?29:28:31-r%7%2}Tt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},q("M",["MM",2],"Mo",function(){return this.month()+1}),q("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),q("MMMM",0,0,function(t){return this.localeData().months(this,t)}),A("month","M"),F("month",8),dt("M",Q),dt("MM",Q,K),dt("MMM",function(t,e){return e.monthsShortRegex(t)}),dt("MMMM",function(t,e){return e.monthsRegex(t)}),mt(["M","MM"],function(t,e){e[bt]=C(t)-1}),mt(["MMM","MMMM"],function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[bt]=i:m(n).invalidMonth=t});var At=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Nt="January_February_March_April_May_June_July_August_September_October_November_December".split("_");var Bt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function jt(t,e){var n;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=C(e);else if(!u(e=t.localeData().monthsParse(e)))return t;return n=Math.min(t.date(),Lt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function Ft(t){return null!=t?(jt(this,t),i.updateOffset(this,!0),this):Pt(this,"Month")}var Yt=ut;var $t=ut;function zt(){function t(t,e){return e.length-t.length}var e,n,r=[],i=[],a=[];for(e=0;e<12;e++)n=p([2e3,e]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(r.sort(t),i.sort(t),a.sort(t),e=0;e<12;e++)r[e]=ht(r[e]),i[e]=ht(i[e]);for(e=0;e<24;e++)a[e]=ht(a[e]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Vt(t){var e=new Date(Date.UTC.apply(null,arguments));return t<100&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function Ht(t,e,n){var r=7+e-n;return-((7+Vt(t,0,r).getUTCDay()-e)%7)+r-1}function qt(t,e,n,r,i){var a,o,s=1+7*(e-1)+(7+n-r)%7+Ht(t,r,i);return s<=0?o=It(a=t-1)+s:s>It(t)?(a=t+1,o=s-It(t)):(a=t,o=s),{year:a,dayOfYear:o}}function Wt(t,e,n){var r,i,a=Ht(t.year(),e,n),o=Math.floor((t.dayOfYear()-a-1)/7)+1;return o<1?r=o+Ut(i=t.year()-1,e,n):o>Ut(t.year(),e,n)?(r=o-Ut(t.year(),e,n),i=t.year()+1):(i=t.year(),r=o),{week:r,year:i}}function Ut(t,e,n){var r=Ht(t,e,n),i=Ht(t+1,e,n);return(It(t)-r+i)/7}q("w",["ww",2],"wo","week"),q("W",["WW",2],"Wo","isoWeek"),A("week","w"),A("isoWeek","W"),F("week",5),F("isoWeek",5),dt("w",Q),dt("ww",Q,K),dt("W",Q),dt("WW",Q,K),vt(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=C(t)});q("d",0,"do","day"),q("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),q("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),q("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),q("e",0,0,"weekday"),q("E",0,0,"isoWeekday"),A("day","d"),A("weekday","e"),A("isoWeekday","E"),F("day",11),F("weekday",11),F("isoWeekday",11),dt("d",Q),dt("e",Q),dt("E",Q),dt("dd",function(t,e){return e.weekdaysMinRegex(t)}),dt("ddd",function(t,e){return e.weekdaysShortRegex(t)}),dt("dddd",function(t,e){return e.weekdaysRegex(t)}),vt(["dd","ddd","dddd"],function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);null!=i?e.d=i:m(n).invalidWeekday=t}),vt(["d","e","E"],function(t,e,n,r){e[r]=C(t)});var Gt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Kt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Xt="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var Jt=ut;var Zt=ut;var Qt=ut;function te(){function t(t,e){return e.length-t.length}var e,n,r,i,a,o=[],s=[],c=[],u=[];for(e=0;e<7;e++)n=p([2e3,1]).day(e),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),a=this.weekdays(n,""),o.push(r),s.push(i),c.push(a),u.push(r),u.push(i),u.push(a);for(o.sort(t),s.sort(t),c.sort(t),u.sort(t),e=0;e<7;e++)s[e]=ht(s[e]),c[e]=ht(c[e]),u[e]=ht(u[e]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function ee(){return this.hours()%12||12}function ne(t,e){q(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function re(t,e){return e._meridiemParse}q("H",["HH",2],0,"hour"),q("h",["hh",2],0,ee),q("k",["kk",2],0,function(){return this.hours()||24}),q("hmm",0,0,function(){return""+ee.apply(this)+Y(this.minutes(),2)}),q("hmmss",0,0,function(){return""+ee.apply(this)+Y(this.minutes(),2)+Y(this.seconds(),2)}),q("Hmm",0,0,function(){return""+this.hours()+Y(this.minutes(),2)}),q("Hmmss",0,0,function(){return""+this.hours()+Y(this.minutes(),2)+Y(this.seconds(),2)}),ne("a",!0),ne("A",!1),A("hour","h"),F("hour",13),dt("a",re),dt("A",re),dt("H",Q),dt("h",Q),dt("k",Q),dt("HH",Q,K),dt("hh",Q,K),dt("kk",Q,K),dt("hmm",tt),dt("hmmss",et),dt("Hmm",tt),dt("Hmmss",et),mt(["H","HH"],xt),mt(["k","kk"],function(t,e,n){var r=C(t);e[xt]=24===r?0:r}),mt(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),mt(["h","hh"],function(t,e,n){e[xt]=C(t),m(n).bigHour=!0}),mt("hmm",function(t,e,n){var r=t.length-2;e[xt]=C(t.substr(0,r)),e[wt]=C(t.substr(r)),m(n).bigHour=!0}),mt("hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[xt]=C(t.substr(0,r)),e[wt]=C(t.substr(r,2)),e[kt]=C(t.substr(i)),m(n).bigHour=!0}),mt("Hmm",function(t,e,n){var r=t.length-2;e[xt]=C(t.substr(0,r)),e[wt]=C(t.substr(r))}),mt("Hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[xt]=C(t.substr(0,r)),e[wt]=C(t.substr(r,2)),e[kt]=C(t.substr(i))});var ie,ae=Rt("Hours",!0),oe={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:Nt,monthsShort:Bt,week:{dow:0,doy:6},weekdays:Gt,weekdaysMin:Xt,weekdaysShort:Kt,meridiemParse:/[ap]\.?m?\.?/i},se={},ce={};function ue(t){return t?t.toLowerCase().replace("_","-"):t}function le(e){var n=null;if(!se[e]&&t&&t.exports)try{n=ie._abbr,r("./locale/"+e),de(n)}catch(t){}return se[e]}function de(t,e){var n;return t&&(n=c(e)?he(t):fe(t,e))&&(ie=n),ie._abbr}function fe(t,e){if(null!==e){var n=oe;if(e.abbr=t,null!=se[t])D("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."),n=se[t]._config;else if(null!=e.parentLocale){if(null==se[e.parentLocale])return ce[e.parentLocale]||(ce[e.parentLocale]=[]),ce[e.parentLocale].push({name:t,config:e}),null;n=se[e.parentLocale]._config}return se[t]=new O(P(n,e)),ce[t]&&ce[t].forEach(function(t){fe(t.name,t.config)}),de(t),se[t]}return delete se[t],null}function he(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return ie;if(!a(t)){if(e=le(t))return e;t=[t]}return function(t){for(var e,n,r,i,a=0;a<t.length;){for(e=(i=ue(t[a]).split("-")).length,n=(n=ue(t[a+1]))?n.split("-"):null;e>0;){if(r=le(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&E(i,n,!0)>=e-1)break;e--}a++}return null}(t)}function pe(t){var e,n=t._a;return n&&-2===m(t).overflow&&(e=n[bt]<0||n[bt]>11?bt:n[yt]<1||n[yt]>Lt(n[gt],n[bt])?yt:n[xt]<0||n[xt]>24||24===n[xt]&&(0!==n[wt]||0!==n[kt]||0!==n[Ct])?xt:n[wt]<0||n[wt]>59?wt:n[kt]<0||n[kt]>59?kt:n[Ct]<0||n[Ct]>999?Ct:-1,m(t)._overflowDayOfYear&&(e<gt||e>yt)&&(e=yt),m(t)._overflowWeeks&&-1===e&&(e=Et),m(t)._overflowWeekday&&-1===e&&(e=St),m(t).overflow=e),t}function me(t,e,n){return null!=t?t:null!=e?e:n}function ve(t){var e,n,r,a,o=[];if(!t._d){for(r=function(t){var e=new Date(i.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}(t),t._w&&null==t._a[yt]&&null==t._a[bt]&&function(t){var e,n,r,i,a,o,s,c;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)a=1,o=4,n=me(e.GG,t._a[gt],Wt(Re(),1,4).year),r=me(e.W,1),((i=me(e.E,1))<1||i>7)&&(c=!0);else{a=t._locale._week.dow,o=t._locale._week.doy;var u=Wt(Re(),a,o);n=me(e.gg,t._a[gt],u.year),r=me(e.w,u.week),null!=e.d?((i=e.d)<0||i>6)&&(c=!0):null!=e.e?(i=e.e+a,(e.e<0||e.e>6)&&(c=!0)):i=a}r<1||r>Ut(n,a,o)?m(t)._overflowWeeks=!0:null!=c?m(t)._overflowWeekday=!0:(s=qt(n,r,i,a,o),t._a[gt]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(a=me(t._a[gt],r[gt]),(t._dayOfYear>It(a)||0===t._dayOfYear)&&(m(t)._overflowDayOfYear=!0),n=Vt(a,0,t._dayOfYear),t._a[bt]=n.getUTCMonth(),t._a[yt]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=o[e]=r[e];for(;e<7;e++)t._a[e]=o[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[xt]&&0===t._a[wt]&&0===t._a[kt]&&0===t._a[Ct]&&(t._nextDay=!0,t._a[xt]=0),t._d=(t._useUTC?Vt:function(t,e,n,r,i,a,o){var s=new Date(t,e,n,r,i,a,o);return t<100&&t>=0&&isFinite(s.getFullYear())&&s.setFullYear(t),s}).apply(null,o),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[xt]=24),t._w&&void 0!==t._w.d&&t._w.d!==t._d.getDay()&&(m(t).weekdayMismatch=!0)}}var _e=/^\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)?)?$/,ge=/^\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)?)?$/,be=/Z|[+-]\d\d(?::?\d\d)?/,ye=[["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}/]],xe=[["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/]],we=/^\/?Date\((\-?\d+)/i;function ke(t){var e,n,r,i,a,o,s=t._i,c=_e.exec(s)||ge.exec(s);if(c){for(m(t).iso=!0,e=0,n=ye.length;e<n;e++)if(ye[e][1].exec(c[1])){i=ye[e][0],r=!1!==ye[e][2];break}if(null==i)return void(t._isValid=!1);if(c[3]){for(e=0,n=xe.length;e<n;e++)if(xe[e][1].exec(c[3])){a=(c[2]||" ")+xe[e][0];break}if(null==a)return void(t._isValid=!1)}if(!r&&null!=a)return void(t._isValid=!1);if(c[4]){if(!be.exec(c[4]))return void(t._isValid=!1);o="Z"}t._f=i+(a||"")+(o||""),Me(t)}else t._isValid=!1}var Ce=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function Ee(t,e,n,r,i,a){var o=[function(t){var e=parseInt(t,10);if(e<=49)return 2e3+e;if(e<=999)return 1900+e;return e}(t),Bt.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&o.push(parseInt(a,10)),o}var Se={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ie(t){var e=Ce.exec(t._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim());if(e){var n=Ee(e[4],e[3],e[2],e[5],e[6],e[7]);if(!function(t,e,n){return!t||Kt.indexOf(t)===new Date(e[0],e[1],e[2]).getDay()||(m(n).weekdayMismatch=!0,n._isValid=!1,!1)}(e[1],n,t))return;t._a=n,t._tzm=function(t,e,n){if(t)return Se[t];if(e)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(e[8],e[9],e[10]),t._d=Vt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),m(t).rfc2822=!0}else t._isValid=!1}function Me(t){if(t._f!==i.ISO_8601)if(t._f!==i.RFC_2822){t._a=[],m(t).empty=!0;var e,n,r,a,o,s=""+t._i,c=s.length,u=0;for(r=U(t._f,t._locale).match($)||[],e=0;e<r.length;e++)a=r[e],(n=(s.match(ft(a,t))||[])[0])&&((o=s.substr(0,s.indexOf(n))).length>0&&m(t).unusedInput.push(o),s=s.slice(s.indexOf(n)+n.length),u+=n.length),H[a]?(n?m(t).empty=!1:m(t).unusedTokens.push(a),_t(a,n,t)):t._strict&&!n&&m(t).unusedTokens.push(a);m(t).charsLeftOver=c-u,s.length>0&&m(t).unusedInput.push(s),t._a[xt]<=12&&!0===m(t).bigHour&&t._a[xt]>0&&(m(t).bigHour=void 0),m(t).parsedDateParts=t._a.slice(0),m(t).meridiem=t._meridiem,t._a[xt]=function(t,e,n){var r;if(null==n)return e;return null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?((r=t.isPM(n))&&e<12&&(e+=12),r||12!==e||(e=0),e):e}(t._locale,t._a[xt],t._meridiem),ve(t),pe(t)}else Ie(t);else ke(t)}function Te(t){var e=t._i,n=t._f;return t._locale=t._locale||he(t._l),null===e||void 0===n&&""===e?_({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),w(e)?new x(pe(e)):(l(e)?t._d=e:a(n)?function(t){var e,n,r,i,a;if(0===t._f.length)return m(t).invalidFormat=!0,void(t._d=new Date(NaN));for(i=0;i<t._f.length;i++)a=0,e=b({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[i],Me(e),v(e)&&(a+=m(e).charsLeftOver,a+=10*m(e).unusedTokens.length,m(e).score=a,(null==r||a<r)&&(r=a,n=e));h(t,n||e)}(t):n?Me(t):function(t){var e=t._i;c(e)?t._d=new Date(i.now()):l(e)?t._d=new Date(e.valueOf()):"string"==typeof e?function(t){var e=we.exec(t._i);null===e?(ke(t),!1===t._isValid&&(delete t._isValid,Ie(t),!1===t._isValid&&(delete t._isValid,i.createFromInputFallback(t)))):t._d=new Date(+e[1])}(t):a(e)?(t._a=d(e.slice(0),function(t){return parseInt(t,10)}),ve(t)):s(e)?function(t){if(!t._d){var e=B(t._i);t._a=d([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),ve(t)}}(t):u(e)?t._d=new Date(e):i.createFromInputFallback(t)}(t),v(t)||(t._d=null),t))}function De(t,e,n,r,i){var o,c={};return!0!==n&&!1!==n||(r=n,n=void 0),(s(t)&&function(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}(t)||a(t)&&0===t.length)&&(t=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=i,c._l=n,c._i=t,c._f=e,c._strict=r,(o=new x(pe(Te(c))))._nextDay&&(o.add(1,"d"),o._nextDay=void 0),o}function Re(t,e,n,r){return De(t,e,n,r,!1)}i.createFromInputFallback=I("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),i.ISO_8601=function(){},i.RFC_2822=function(){};var Pe=I("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Re.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:_()}),Oe=I("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Re.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:_()});function Le(t,e){var n,r;if(1===e.length&&a(e[0])&&(e=e[0]),!e.length)return Re();for(n=e[0],r=1;r<e.length;++r)e[r].isValid()&&!e[r][t](n)||(n=e[r]);return n}var Ae=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ne(t){var e=B(t),n=e.year||0,r=e.quarter||0,i=e.month||0,a=e.week||0,o=e.day||0,s=e.hour||0,c=e.minute||0,u=e.second||0,l=e.millisecond||0;this._isValid=function(t){for(var e in t)if(-1===Tt.call(Ae,e)||null!=t[e]&&isNaN(t[e]))return!1;for(var n=!1,r=0;r<Ae.length;++r)if(t[Ae[r]]){if(n)return!1;parseFloat(t[Ae[r]])!==C(t[Ae[r]])&&(n=!0)}return!0}(e),this._milliseconds=+l+1e3*u+6e4*c+1e3*s*60*60,this._days=+o+7*a,this._months=+i+3*r+12*n,this._data={},this._locale=he(),this._bubble()}function Be(t){return t instanceof Ne}function je(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Fe(t,e){q(t,0,0,function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+Y(~~(t/60),2)+e+Y(~~t%60,2)})}Fe("Z",":"),Fe("ZZ",""),dt("Z",ct),dt("ZZ",ct),mt(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=$e(ct,t)});var Ye=/([\+\-]|\d\d)/gi;function $e(t,e){var n=(e||"").match(t);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(Ye)||["-",0,0],i=60*r[1]+C(r[2]);return 0===i?0:"+"===r[0]?i:-i}function ze(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(w(t)||l(t)?t.valueOf():Re(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),i.updateOffset(n,!1),n):Re(t).local()}function Ve(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function He(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}i.updateOffset=function(){};var qe=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,We=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ue(t,e){var n,r,i,a=t,s=null;return Be(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:u(t)?(a={},e?a[e]=t:a.milliseconds=t):(s=qe.exec(t))?(n="-"===s[1]?-1:1,a={y:0,d:C(s[yt])*n,h:C(s[xt])*n,m:C(s[wt])*n,s:C(s[kt])*n,ms:C(je(1e3*s[Ct]))*n}):(s=We.exec(t))?(n="-"===s[1]?-1:(s[1],1),a={y:Ge(s[2],n),M:Ge(s[3],n),w:Ge(s[4],n),d:Ge(s[5],n),h:Ge(s[6],n),m:Ge(s[7],n),s:Ge(s[8],n)}):null==a?a={}:"object"===(void 0===a?"undefined":o(a))&&("from"in a||"to"in a)&&(i=function(t,e){var n;if(!t.isValid()||!e.isValid())return{milliseconds:0,months:0};e=ze(e,t),t.isBefore(e)?n=Ke(t,e):((n=Ke(e,t)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(Re(a.from),Re(a.to)),(a={}).ms=i.milliseconds,a.M=i.months),r=new Ne(a),Be(t)&&f(t,"_locale")&&(r._locale=t._locale),r}function Ge(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Ke(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Xe(t,e){return function(n,r){var i;return null===r||isNaN(+r)||(D(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),Je(this,Ue(n="string"==typeof n?+n:n,r),t),this}}function Je(t,e,n,r){var a=e._milliseconds,o=je(e._days),s=je(e._months);t.isValid()&&(r=null==r||r,s&&jt(t,Pt(t,"Month")+s*n),o&&Ot(t,"Date",Pt(t,"Date")+o*n),a&&t._d.setTime(t._d.valueOf()+a*n),r&&i.updateOffset(t,o||s))}Ue.fn=Ne.prototype,Ue.invalid=function(){return Ue(NaN)};var Ze=Xe(1,"add"),Qe=Xe(-1,"subtract");function tn(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,"months");return-(n+(e-r<0?(e-r)/(r-t.clone().add(n-1,"months")):(e-r)/(t.clone().add(n+1,"months")-r)))||0}function en(t){var e;return void 0===t?this._locale._abbr:(null!=(e=he(t))&&(this._locale=e),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var nn=I("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});function rn(){return this._locale}function an(t,e){q(0,[t,t.length],0,e)}function on(t,e,n,r,i){var a;return null==t?Wt(this,r,i).year:(e>(a=Ut(t,r,i))&&(e=a),function(t,e,n,r,i){var a=qt(t,e,n,r,i),o=Vt(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}.call(this,t,e,n,r,i))}q(0,["gg",2],0,function(){return this.weekYear()%100}),q(0,["GG",2],0,function(){return this.isoWeekYear()%100}),an("gggg","weekYear"),an("ggggg","weekYear"),an("GGGG","isoWeekYear"),an("GGGGG","isoWeekYear"),A("weekYear","gg"),A("isoWeekYear","GG"),F("weekYear",1),F("isoWeekYear",1),dt("G",ot),dt("g",ot),dt("GG",Q,K),dt("gg",Q,K),dt("GGGG",rt,J),dt("gggg",rt,J),dt("GGGGG",it,Z),dt("ggggg",it,Z),vt(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,r){e[r.substr(0,2)]=C(t)}),vt(["gg","GG"],function(t,e,n,r){e[r]=i.parseTwoDigitYear(t)}),q("Q",0,"Qo","quarter"),A("quarter","Q"),F("quarter",7),dt("Q",G),mt("Q",function(t,e){e[bt]=3*(C(t)-1)}),q("D",["DD",2],"Do","date"),A("date","D"),F("date",9),dt("D",Q),dt("DD",Q,K),dt("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),mt(["D","DD"],yt),mt("Do",function(t,e){e[yt]=C(t.match(Q)[0])});var sn=Rt("Date",!0);q("DDD",["DDDD",3],"DDDo","dayOfYear"),A("dayOfYear","DDD"),F("dayOfYear",4),dt("DDD",nt),dt("DDDD",X),mt(["DDD","DDDD"],function(t,e,n){n._dayOfYear=C(t)}),q("m",["mm",2],0,"minute"),A("minute","m"),F("minute",14),dt("m",Q),dt("mm",Q,K),mt(["m","mm"],wt);var cn=Rt("Minutes",!1);q("s",["ss",2],0,"second"),A("second","s"),F("second",15),dt("s",Q),dt("ss",Q,K),mt(["s","ss"],kt);var un,ln=Rt("Seconds",!1);for(q("S",0,0,function(){return~~(this.millisecond()/100)}),q(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),q(0,["SSS",3],0,"millisecond"),q(0,["SSSS",4],0,function(){return 10*this.millisecond()}),q(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),q(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),q(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),q(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),q(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),A("millisecond","ms"),F("millisecond",16),dt("S",nt,G),dt("SS",nt,K),dt("SSS",nt,X),un="SSSS";un.length<=9;un+="S")dt(un,at);function dn(t,e){e[Ct]=C(1e3*("0."+t))}for(un="S";un.length<=9;un+="S")mt(un,dn);var fn=Rt("Milliseconds",!1);q("z",0,0,"zoneAbbr"),q("zz",0,0,"zoneName");var hn=x.prototype;function pn(t){return t}hn.add=Ze,hn.calendar=function(t,e){var n=t||Re(),r=ze(n,this).startOf("day"),a=i.calendarFormat(this,r)||"sameElse",o=e&&(R(e[a])?e[a].call(this,n):e[a]);return this.format(o||this.localeData().calendar(a,this,Re(n)))},hn.clone=function(){return new x(this)},hn.diff=function(t,e,n){var r,i,a;if(!this.isValid())return NaN;if(!(r=ze(t,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),e=N(e)){case"year":a=tn(this,r)/12;break;case"month":a=tn(this,r);break;case"quarter":a=tn(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-i)/864e5;break;case"week":a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:k(a)},hn.endOf=function(t){return void 0===(t=N(t))||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))},hn.format=function(t){t||(t=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var e=W(this,t);return this.localeData().postformat(e)},hn.from=function(t,e){return this.isValid()&&(w(t)&&t.isValid()||Re(t).isValid())?Ue({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},hn.fromNow=function(t){return this.from(Re(),t)},hn.to=function(t,e){return this.isValid()&&(w(t)&&t.isValid()||Re(t).isValid())?Ue({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},hn.toNow=function(t){return this.to(Re(),t)},hn.get=function(t){return R(this[t=N(t)])?this[t]():this},hn.invalidAt=function(){return m(this).overflow},hn.isAfter=function(t,e){var n=w(t)?t:Re(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=N(c(e)?"millisecond":e))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())},hn.isBefore=function(t,e){var n=w(t)?t:Re(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=N(c(e)?"millisecond":e))?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())},hn.isBetween=function(t,e,n,r){return("("===(r=r||"()")[0]?this.isAfter(t,n):!this.isBefore(t,n))&&(")"===r[1]?this.isBefore(e,n):!this.isAfter(e,n))},hn.isSame=function(t,e){var n,r=w(t)?t:Re(t);return!(!this.isValid()||!r.isValid())&&("millisecond"===(e=N(e||"millisecond"))?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))},hn.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},hn.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},hn.isValid=function(){return v(this)},hn.lang=nn,hn.locale=en,hn.localeData=rn,hn.max=Oe,hn.min=Pe,hn.parsingFlags=function(){return h({},m(this))},hn.set=function(t,e){if("object"===(void 0===t?"undefined":o(t)))for(var n=function(t){var e=[];for(var n in t)e.push({unit:n,priority:j[n]});return e.sort(function(t,e){return t.priority-e.priority}),e}(t=B(t)),r=0;r<n.length;r++)this[n[r].unit](t[n[r].unit]);else if(R(this[t=N(t)]))return this[t](e);return this},hn.startOf=function(t){switch(t=N(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this},hn.subtract=Qe,hn.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},hn.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},hn.toDate=function(){return new Date(this.valueOf())},hn.toISOString=function(){if(!this.isValid())return null;var t=this.clone().utc();return t.year()<0||t.year()>9999?W(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):R(Date.prototype.toISOString)?this.toDate().toISOString():W(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},hn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=e+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)},hn.toJSON=function(){return this.isValid()?this.toISOString():null},hn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},hn.unix=function(){return Math.floor(this.valueOf()/1e3)},hn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},hn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},hn.year=Dt,hn.isLeapYear=function(){return Mt(this.year())},hn.weekYear=function(t){return on.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},hn.isoWeekYear=function(t){return on.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},hn.quarter=hn.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},hn.month=Ft,hn.daysInMonth=function(){return Lt(this.year(),this.month())},hn.week=hn.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},hn.isoWeek=hn.isoWeeks=function(t){var e=Wt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},hn.weeksInYear=function(){var t=this.localeData()._week;return Ut(this.year(),t.dow,t.doy)},hn.isoWeeksInYear=function(){return Ut(this.year(),1,4)},hn.date=sn,hn.day=hn.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=function(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}(t,this.localeData()),this.add(t-e,"d")):e},hn.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},hn.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=function(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7},hn.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},hn.hour=hn.hours=ae,hn.minute=hn.minutes=cn,hn.second=hn.seconds=ln,hn.millisecond=hn.milliseconds=fn,hn.utcOffset=function(t,e,n){var r,a=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=$e(ct,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(r=Ve(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),a!==t&&(!e||this._changeInProgress?Je(this,Ue(t-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?a:Ve(this)},hn.utc=function(t){return this.utcOffset(0,t)},hn.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ve(this),"m")),this},hn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=$e(st,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},hn.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?Re(t).utcOffset():0,(this.utcOffset()-t)%60==0)},hn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},hn.isLocal=function(){return!!this.isValid()&&!this._isUTC},hn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},hn.isUtc=He,hn.isUTC=He,hn.zoneAbbr=function(){return this._isUTC?"UTC":""},hn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},hn.dates=I("dates accessor is deprecated. Use date instead.",sn),hn.months=I("months accessor is deprecated. Use month instead",Ft),hn.years=I("years accessor is deprecated. Use year instead",Dt),hn.zone=I("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}),hn.isDSTShifted=I("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!c(this._isDSTShifted))return this._isDSTShifted;var t={};if(b(t,this),(t=Te(t))._a){var e=t._isUTC?p(t._a):Re(t._a);this._isDSTShifted=this.isValid()&&E(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted});var mn=O.prototype;function vn(t,e,n,r){var i=he(),a=p().set(r,e);return i[n](a,t)}function _n(t,e,n){if(u(t)&&(e=t,t=void 0),t=t||"",null!=e)return vn(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=vn(t,r,n,"month");return i}function gn(t,e,n,r){"boolean"==typeof t?(u(e)&&(n=e,e=void 0),e=e||""):(n=e=t,t=!1,u(e)&&(n=e,e=void 0),e=e||"");var i,a=he(),o=t?a._week.dow:0;if(null!=n)return vn(e,(n+o)%7,r,"day");var s=[];for(i=0;i<7;i++)s[i]=vn(e,(i+o)%7,r,"day");return s}mn.calendar=function(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return R(r)?r.call(e,n):r},mn.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])},mn.invalidDate=function(){return this._invalidDate},mn.ordinal=function(t){return this._ordinal.replace("%d",t)},mn.preparse=pn,mn.postformat=pn,mn.relativeTime=function(t,e,n,r){var i=this._relativeTime[n];return R(i)?i(t,e,n,r):i.replace(/%d/i,t)},mn.pastFuture=function(t,e){var n=this._relativeTime[t>0?"future":"past"];return R(n)?n(e):n.replace(/%s/i,e)},mn.set=function(t){var e,n;for(n in t)R(e=t[n])?this[n]=e:this["_"+n]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},mn.months=function(t,e){return t?a(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||At).test(e)?"format":"standalone"][t.month()]:a(this._months)?this._months:this._months.standalone},mn.monthsShort=function(t,e){return t?a(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[At.test(e)?"format":"standalone"][t.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},mn.monthsParse=function(t,e,n){var r,i,a;if(this._monthsParseExact)return function(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=p([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(i=Tt.call(this._shortMonthsParse,o))?i:null:-1!==(i=Tt.call(this._longMonthsParse,o))?i:null:"MMM"===e?-1!==(i=Tt.call(this._shortMonthsParse,o))?i:-1!==(i=Tt.call(this._longMonthsParse,o))?i:null:-1!==(i=Tt.call(this._longMonthsParse,o))?i:-1!==(i=Tt.call(this._shortMonthsParse,o))?i:null}.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=p([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}},mn.monthsRegex=function(t){return this._monthsParseExact?(f(this,"_monthsRegex")||zt.call(this),t?this._monthsStrictRegex:this._monthsRegex):(f(this,"_monthsRegex")||(this._monthsRegex=$t),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},mn.monthsShortRegex=function(t){return this._monthsParseExact?(f(this,"_monthsRegex")||zt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(f(this,"_monthsShortRegex")||(this._monthsShortRegex=Yt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},mn.week=function(t){return Wt(t,this._week.dow,this._week.doy).week},mn.firstDayOfYear=function(){return this._week.doy},mn.firstDayOfWeek=function(){return this._week.dow},mn.weekdays=function(t,e){return t?a(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]:a(this._weekdays)?this._weekdays:this._weekdays.standalone},mn.weekdaysMin=function(t){return t?this._weekdaysMin[t.day()]:this._weekdaysMin},mn.weekdaysShort=function(t){return t?this._weekdaysShort[t.day()]:this._weekdaysShort},mn.weekdaysParse=function(t,e,n){var r,i,a;if(this._weekdaysParseExact)return function(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=p([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(i=Tt.call(this._weekdaysParse,o))?i:null:"ddd"===e?-1!==(i=Tt.call(this._shortWeekdaysParse,o))?i:null:-1!==(i=Tt.call(this._minWeekdaysParse,o))?i:null:"dddd"===e?-1!==(i=Tt.call(this._weekdaysParse,o))?i:-1!==(i=Tt.call(this._shortWeekdaysParse,o))?i:-1!==(i=Tt.call(this._minWeekdaysParse,o))?i:null:"ddd"===e?-1!==(i=Tt.call(this._shortWeekdaysParse,o))?i:-1!==(i=Tt.call(this._weekdaysParse,o))?i:-1!==(i=Tt.call(this._minWeekdaysParse,o))?i:null:-1!==(i=Tt.call(this._minWeekdaysParse,o))?i:-1!==(i=Tt.call(this._weekdaysParse,o))?i:-1!==(i=Tt.call(this._shortWeekdaysParse,o))?i:null}.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=p([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[r].test(t))return r;if(n&&"ddd"===e&&this._shortWeekdaysParse[r].test(t))return r;if(n&&"dd"===e&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}},mn.weekdaysRegex=function(t){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||te.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(f(this,"_weekdaysRegex")||(this._weekdaysRegex=Jt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},mn.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||te.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(f(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Zt),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},mn.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||te.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(f(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Qt),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},mn.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},mn.meridiem=function(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"},de("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===C(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),i.lang=I("moment.lang is deprecated. Use moment.locale instead.",de),i.langData=I("moment.langData is deprecated. Use moment.localeData instead.",he);var bn=Math.abs;function yn(t,e,n,r){var i=Ue(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function xn(t){return t<0?Math.floor(t):Math.ceil(t)}function wn(t){return 4800*t/146097}function kn(t){return 146097*t/4800}function Cn(t){return function(){return this.as(t)}}var En=Cn("ms"),Sn=Cn("s"),In=Cn("m"),Mn=Cn("h"),Tn=Cn("d"),Dn=Cn("w"),Rn=Cn("M"),Pn=Cn("y");function On(t){return function(){return this.isValid()?this._data[t]:NaN}}var Ln=On("milliseconds"),An=On("seconds"),Nn=On("minutes"),Bn=On("hours"),jn=On("days"),Fn=On("months"),Yn=On("years");var $n=Math.round,zn={ss:44,s:45,m:45,h:22,d:26,M:11};var Vn=Math.abs;function Hn(t){return(t>0)-(t<0)||+t}function qn(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n=Vn(this._milliseconds)/1e3,r=Vn(this._days),i=Vn(this._months);e=k((t=k(n/60))/60),n%=60,t%=60;var a=k(i/12),o=i%=12,s=r,c=e,u=t,l=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var f=d<0?"-":"",h=Hn(this._months)!==Hn(d)?"-":"",p=Hn(this._days)!==Hn(d)?"-":"",m=Hn(this._milliseconds)!==Hn(d)?"-":"";return f+"P"+(a?h+a+"Y":"")+(o?h+o+"M":"")+(s?p+s+"D":"")+(c||u||l?"T":"")+(c?m+c+"H":"")+(u?m+u+"M":"")+(l?m+l+"S":"")}var Wn=Ne.prototype;return Wn.isValid=function(){return this._isValid},Wn.abs=function(){var t=this._data;return this._milliseconds=bn(this._milliseconds),this._days=bn(this._days),this._months=bn(this._months),t.milliseconds=bn(t.milliseconds),t.seconds=bn(t.seconds),t.minutes=bn(t.minutes),t.hours=bn(t.hours),t.months=bn(t.months),t.years=bn(t.years),this},Wn.add=function(t,e){return yn(this,t,e,1)},Wn.subtract=function(t,e){return yn(this,t,e,-1)},Wn.as=function(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if("month"===(t=N(t))||"year"===t)return e=this._days+r/864e5,n=this._months+wn(e),"month"===t?n:n/12;switch(e=this._days+Math.round(kn(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 1440*e+r/6e4;case"second":return 86400*e+r/1e3;case"millisecond":return Math.floor(864e5*e)+r;default:throw new Error("Unknown unit "+t)}},Wn.asMilliseconds=En,Wn.asSeconds=Sn,Wn.asMinutes=In,Wn.asHours=Mn,Wn.asDays=Tn,Wn.asWeeks=Dn,Wn.asMonths=Rn,Wn.asYears=Pn,Wn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*C(this._months/12):NaN},Wn._bubble=function(){var t,e,n,r,i,a=this._milliseconds,o=this._days,s=this._months,c=this._data;return a>=0&&o>=0&&s>=0||a<=0&&o<=0&&s<=0||(a+=864e5*xn(kn(s)+o),o=0,s=0),c.milliseconds=a%1e3,t=k(a/1e3),c.seconds=t%60,e=k(t/60),c.minutes=e%60,n=k(e/60),c.hours=n%24,s+=i=k(wn(o+=k(n/24))),o-=xn(kn(i)),r=k(s/12),s%=12,c.days=o,c.months=s,c.years=r,this},Wn.clone=function(){return Ue(this)},Wn.get=function(t){return t=N(t),this.isValid()?this[t+"s"]():NaN},Wn.milliseconds=Ln,Wn.seconds=An,Wn.minutes=Nn,Wn.hours=Bn,Wn.days=jn,Wn.weeks=function(){return k(this.days()/7)},Wn.months=Fn,Wn.years=Yn,Wn.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),n=function(t,e,n){var r=Ue(t).abs(),i=$n(r.as("s")),a=$n(r.as("m")),o=$n(r.as("h")),s=$n(r.as("d")),c=$n(r.as("M")),u=$n(r.as("y")),l=i<=zn.ss&&["s",i]||i<zn.s&&["ss",i]||a<=1&&["m"]||a<zn.m&&["mm",a]||o<=1&&["h"]||o<zn.h&&["hh",o]||s<=1&&["d"]||s<zn.d&&["dd",s]||c<=1&&["M"]||c<zn.M&&["MM",c]||u<=1&&["y"]||["yy",u];return l[2]=e,l[3]=+t>0,l[4]=n,function(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}.apply(null,l)}(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)},Wn.toISOString=qn,Wn.toString=qn,Wn.toJSON=qn,Wn.locale=en,Wn.localeData=rn,Wn.toIsoString=I("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",qn),Wn.lang=nn,q("X",0,0,"unix"),q("x",0,0,"valueOf"),dt("x",ot),dt("X",/[+-]?\d+(\.\d{1,3})?/),mt("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),mt("x",function(t,e,n){n._d=new Date(C(t))}),i.version="2.19.1",e=Re,i.fn=hn,i.min=function(){return Le("isBefore",[].slice.call(arguments,0))},i.max=function(){return Le("isAfter",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=p,i.unix=function(t){return Re(1e3*t)},i.months=function(t,e){return _n(t,e,"months")},i.isDate=l,i.locale=de,i.invalid=_,i.duration=Ue,i.isMoment=w,i.weekdays=function(t,e,n){return gn(t,e,n,"weekdays")},i.parseZone=function(){return Re.apply(null,arguments).parseZone()},i.localeData=he,i.isDuration=Be,i.monthsShort=function(t,e){return _n(t,e,"monthsShort")},i.weekdaysMin=function(t,e,n){return gn(t,e,n,"weekdaysMin")},i.defineLocale=fe,i.updateLocale=function(t,e){if(null!=e){var n,r=oe;null!=se[t]&&(r=se[t]._config),(n=new O(e=P(r,e))).parentLocale=se[t],se[t]=n,de(t)}else null!=se[t]&&(null!=se[t].parentLocale?se[t]=se[t].parentLocale:null!=se[t]&&delete se[t]);return se[t]},i.locales=function(){return M(se)},i.weekdaysShort=function(t,e,n){return gn(t,e,n,"weekdaysShort")},i.normalizeUnits=N,i.relativeTimeRounding=function(t){return void 0===t?$n:"function"==typeof t&&($n=t,!0)},i.relativeTimeThreshold=function(t,e){return void 0!==zn[t]&&(void 0===e?zn[t]:(zn[t]=e,"s"===t&&(zn.ss=e-1),!0))},i.calendarFormat=function(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=hn,i},"object"===o(e)?t.exports=a():i.moment=a()}(i={exports:{}},i.exports),i.exports),o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function s(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var c={install:function(t,e){var n=e&&e.moment?e.moment:a;Object.defineProperties(t.prototype,{$moment:{get:function(){return n}}}),t.moment=n,t.filter("moment",function(){for(var t=arguments,e=arguments.length,r=Array(e),i=0;i<e;i++)r[i]=t[i];var a=(r=Array.prototype.slice.call(r)).shift(),s=void 0;if(s=Array.isArray(a)&&"string"==typeof a[0]?n(a[0],a[1],!0):"number"==typeof a&&a.toString().length<12?n.unix(a):n(a),!a||!s.isValid())return console.warn("Could not build a valid `moment` object from input."),a;function c(){for(var t=arguments,e=arguments.length,r=Array(e),i=0;i<e;i++)r[i]=t[i];var a=(r=Array.prototype.slice.call(r)).shift();switch(a){case"add":for(var u=r.shift().split(",").map(Function.prototype.call,String.prototype.trim),l={},d=0;d<u.length;d++){var f=u[d].split(" ");l[f[1]]=f[0]}s.add(l);break;case"subtract":for(var h=r.shift().split(",").map(Function.prototype.call,String.prototype.trim),p={},m=0;m<h.length;m++){var v=h[m].split(" ");p[v[1]]=v[0]}s.subtract(p);break;case"from":var _="now",g=!1;"now"===r[0]&&r.shift(),n(r[0]).isValid()&&(_=n(r.shift())),!0===r[0]&&(r.shift(),g=!0),s="now"!==_?s.from(_,g):s.fromNow(g);break;case"diff":var b=n(),y="",x=!1;n(r[0]).isValid()?b=n(r.shift()):null!==r[0]&&"now"!==r[0]||r.shift(),r[0]&&(y=r.shift()),!0===r[0]&&(x=r.shift()),s=s.diff(b,y,x);break;case"calendar":var w=n(),k={};n(r[0]).isValid()?w=n(r.shift()):null!==r[0]&&"now"!==r[0]||r.shift(),"object"===o(r[0])&&(k=r.shift()),s=s.calendar(w,k);break;case"utc":s.utc();break;case"timezone":s.tz(r.shift());break;default:var C=a;s=s.format(C)}r.length&&c.apply(c,r)}return c.apply(c,r),s}),t.filter("duration",function(){for(var t=arguments,e=arguments.length,r=Array(e),i=0;i<e;i++)r[i]=t[i];var a=(r=Array.prototype.slice.call(r)).shift(),o=r.shift();function c(t){Array.isArray(t)||(t=[t]);var e=n.duration.apply(n,s(t));return e.isValid()||console.warn("Could not build a valid `duration` object from input."),e}var u=c(a);if("add"===o||"subtract"===o){var l=c(r);u[o](l)}else if(u&&u[o]){var d;u=(d=u)[o].apply(d,s(r))}return u})}},u=c.install;e.default=c,e.install=u,Object.defineProperty(e,"__esModule",{value:!0})})(e)}).call(e,n(20))},function(t,e,n){var r=n(0)(n(1396),n(1397),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={}},function(t,e){t.exports={render:function(){var t=this.$createElement,e=this._self._c||t;return e("v-app",{attrs:{id:"app"}},[e("transition",{attrs:{name:"fade",mode:"out-in"}},[e("router-view")],1)],1)},staticRenderFns:[]}},function(t,e){},function(t,e){}]);

Reference

CWE Id200
WASC Id13
Source ID3
Informational (Low)Timestamp Disclosure - Unix
Description

A timestamp was disclosed by the application/web server - Unix

URLhttps://siscoca.ruralytierras.gob.bo/js/app.js
MethodGET
Evidence344077627
URLhttps://siscoca.ruralytierras.gob.bo/api/reporte/pdf?tipo=infoben&fechaini=2020-07-31&fechafin=2020-07-31
MethodGET
Evidence0000086328
URLhttps://siscoca.ruralytierras.gob.bo/js/app.js
MethodGET
Evidence1518500249
URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta/print/36
MethodGET
Evidence0000181895
URLhttps://siscoca.ruralytierras.gob.bo/api/persona/fill/%7B%22tipo_persona_id%22:1%7D
MethodGET
Evidence1234567890
URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta/print/36
MethodGET
Evidence0000073970
URLhttps://siscoca.ruralytierras.gob.bo/js/app.js
MethodGET
Evidence606105819
URLhttps://siscoca.ruralytierras.gob.bo/api/hoja_ruta/print/31
MethodGET
Evidence0000073992
URLhttps://siscoca.ruralytierras.gob.bo/js/app.js
MethodGET
Evidence1164996542
URLhttps://siscoca.ruralytierras.gob.bo/api/reporte/pdf?tipo=infocom&fechaini=2020-07-31&fechafin=2020-07-31
MethodGET
Evidence0000192631
URLhttps://siscoca.ruralytierras.gob.bo/api/reporte/pdf?tipo=infoemp&fechaini=2020-07-31&fechafin=2020-07-31
MethodGET
Evidence0000000258
URLhttps://siscoca.ruralytierras.gob.bo/js/app.js
MethodGET
Evidence38016083
URLhttps://siscoca.ruralytierras.gob.bo/js/app.js
MethodGET
Evidence168717936
URLhttps://siscoca.ruralytierras.gob.bo/api/reporte/pdf?tipo=infocom&fechaini=2020-07-31&fechafin=2020-07-31
MethodGET
Evidence0000086549
URLhttps://siscoca.ruralytierras.gob.bo/js/app.js
MethodGET
Evidence1396182291
URLhttps://siscoca.ruralytierras.gob.bo/js/app.js
MethodGET
Evidence2053994217
URLhttps://siscoca.ruralytierras.gob.bo/api/incineracion
MethodGET
Evidence77777777
URLhttps://siscoca.ruralytierras.gob.bo/api/poder
MethodGET
Evidence77754322
URLhttps://siscoca.ruralytierras.gob.bo/api/persona/fill/%7B%22tipo_persona_id%22:3%7D
MethodGET
Evidence72556828
URLhttps://siscoca.ruralytierras.gob.bo/js/app.js
MethodGET
Evidence1359893119
Instances463
Solution

Manually confirm that the timestamp data is not sensitive, and that the data cannot be aggregated to disclose exploitable patterns.

Other information

344077627, which evaluates to: 1980-11-26 05:07:07

Reference

https://www.owasp.org/index.php/Top_10_2013-A6-Sensitive_Data_Exposure

http://projects.webappsec.org/w/page/13246936/Information%20Leakage

CWE Id200
WASC Id13
Source ID3
Informational (Low)Timestamp Disclosure - Unix
Description

A timestamp was disclosed by the application/web server - Unix

URLhttps://tracking-protection.cdn.mozilla.net/content-track-digest256/78.0/1594235398
MethodGET
Evidence1594235398
URLhttps://tracking-protection.cdn.mozilla.net/social-tracking-protection-twitter-digest256/1564526481
MethodGET
Evidence1564526481
URLhttps://tracking-protection.cdn.mozilla.net/except-flash-digest256/1494877265
MethodGET
Evidence1494877265
URLhttps://tracking-protection.cdn.mozilla.net/social-tracking-protection-facebook-digest256/1564526481
MethodGET
Evidence1564526481
URLhttps://tracking-protection.cdn.mozilla.net/analytics-track-digest256/1595889526
MethodGET
Evidence1595889526
URLhttps://tracking-protection.cdn.mozilla.net/mozstd-trackwhite-digest256/78.0/1596064216
MethodGET
Evidence1596064216
URLhttps://tracking-protection.cdn.mozilla.net/allow-flashallow-digest256/1490633678
MethodGET
Evidence1490633678
URLhttps://tracking-protection.cdn.mozilla.net/block-flashsubdoc-digest256/1512160865
MethodGET
Evidence1512160865
URLhttps://tracking-protection.cdn.mozilla.net/ads-track-digest256/1595893235
MethodGET
Evidence1595893235
URLhttps://tracking-protection.cdn.mozilla.net/analytics-track-digest256/78.0/1595891357
MethodGET
Evidence1595891357
URLhttps://tracking-protection.cdn.mozilla.net/social-tracking-protection-facebook-digest256/78.0/1591202430
MethodGET
Evidence1591202430
URLhttps://tracking-protection.cdn.mozilla.net/ads-track-digest256/78.0/1595891357
MethodGET
Evidence1595891357
URLhttps://tracking-protection.cdn.mozilla.net/base-fingerprinting-track-digest256/1595893235
MethodGET
Evidence1595893235
URLhttps://tracking-protection.cdn.mozilla.net/base-cryptomining-track-digest256/1559142673
MethodGET
Evidence1559142673
URLhttps://tracking-protection.cdn.mozilla.net/except-flashallow-digest256/1490633678
MethodGET
Evidence1490633678
URLhttps://tracking-protection.cdn.mozilla.net/mozstd-trackwhite-digest256/1596062327
MethodGET
Evidence1596062327
URLhttps://tracking-protection.cdn.mozilla.net/social-tracking-protection-linkedin-digest256/78.0/1591202430
MethodGET
Evidence1591202430
URLhttps://tracking-protection.cdn.mozilla.net/base-cryptomining-track-digest256/78.0/1591202430
MethodGET
Evidence1591202430
URLhttps://tracking-protection.cdn.mozilla.net/base-fingerprinting-track-digest256/78.0/1595891357
MethodGET
Evidence1595891357
URLhttps://tracking-protection.cdn.mozilla.net/google-trackwhite-digest256/1591202430
MethodGET
Evidence1591202430
Instances28
Solution

Manually confirm that the timestamp data is not sensitive, and that the data cannot be aggregated to disclose exploitable patterns.

Other information

1594235398, which evaluates to: 2020-07-08 15:09:58

Reference

https://www.owasp.org/index.php/Top_10_2013-A6-Sensitive_Data_Exposure

http://projects.webappsec.org/w/page/13246936/Information%20Leakage

CWE Id200
WASC Id13
Source ID3
Informational (Low)Timestamp Disclosure - Unix
Description

A timestamp was disclosed by the application/web server - Unix

URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/fxmonitor-breaches/changeset?_expected=1595956649786
MethodGET
Evidence20012235
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/fxmonitor-breaches/changeset?_expected=1595956649786
MethodGET
Evidence19611022
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/fxmonitor-breaches/changeset?_expected=1595956649786
MethodGET
Evidence48881308
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/fxmonitor-breaches/changeset?_expected=1595956649786
MethodGET
Evidence22802117
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/fxmonitor-breaches/changeset?_expected=1595956649786
MethodGET
Evidence20727771
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/fxmonitor-breaches/changeset?_expected=1595956649786
MethodGET
Evidence93338602
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/fxmonitor-breaches/changeset?_expected=1595956649786
MethodGET
Evidence11657763
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/whats-new-panel/changeset?_expected=1593530372996
MethodGET
Evidence345600000
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/fxmonitor-breaches/changeset?_expected=1595956649786
MethodGET
Evidence15025407
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/fxmonitor-breaches/changeset?_expected=1595956649786
MethodGET
Evidence14867999
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/fxmonitor-breaches/changeset?_expected=1595956649786
MethodGET
Evidence17204697
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/fxmonitor-breaches/changeset?_expected=1595956649786
MethodGET
Evidence17551044
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/fxmonitor-breaches/changeset?_expected=1595956649786
MethodGET
Evidence26151608
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/fxmonitor-breaches/changeset?_expected=1595956649786
MethodGET
Evidence23205290
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/fxmonitor-breaches/changeset?_expected=1595956649786
MethodGET
Evidence31977599
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/fxmonitor-breaches/changeset?_expected=1595956649786
MethodGET
Evidence23165793
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/fxmonitor-breaches/changeset?_expected=1595956649786
MethodGET
Evidence268765495
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/fxmonitor-breaches/changeset?_expected=1595956649786
MethodGET
Evidence87758585
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/fxmonitor-breaches/changeset?_expected=1595956649786
MethodGET
Evidence35846544
URLhttps://firefox.settings.services.mozilla.com/v1/buckets/main/collections/fxmonitor-breaches/changeset?_expected=1595956649786
MethodGET
Evidence39721127
Instances94
Solution

Manually confirm that the timestamp data is not sensitive, and that the data cannot be aggregated to disclose exploitable patterns.

Other information

20012235, which evaluates to: 1970-08-20 10:57:15

Reference

https://www.owasp.org/index.php/Top_10_2013-A6-Sensitive_Data_Exposure

http://projects.webappsec.org/w/page/13246936/Information%20Leakage

CWE Id200
WASC Id13
Source ID3
Informational (Low)Timestamp Disclosure - Unix
Description

A timestamp was disclosed by the application/web server - Unix

URLhttps://shavar.services.mozilla.com/downloads?client=navclient-auto-ffox&appver=78.0&pver=2.2
MethodPOST
Evidence1494877265
URLhttps://shavar.services.mozilla.com/downloads?client=navclient-auto-ffox&appver=78.0&pver=2.2
MethodPOST
Evidence1496263270
URLhttps://shavar.services.mozilla.com/downloads?client=navclient-auto-ffox&appver=78.0&pver=2.2
MethodPOST
Evidence1591202430
URLhttps://shavar.services.mozilla.com/downloads?client=navclient-auto-ffox&appver=78.0&pver=2.2
MethodPOST
Evidence1490633678
URLhttps://shavar.services.mozilla.com/downloads?client=navclient-auto-ffox&appver=78.0&pver=2.2
MethodPOST
Evidence1559142673
URLhttps://shavar.services.mozilla.com/downloads?client=navclient-auto-ffox&appver=78.0&pver=2.2
MethodPOST
Evidence1595889526
URLhttps://shavar.services.mozilla.com/downloads?client=navclient-auto-ffox&appver=78.0&pver=2.2
MethodPOST
Evidence1596062327
URLhttps://shavar.services.mozilla.com/downloads?client=navclient-auto-ffox&appver=78.0&pver=2.2
MethodPOST
Evidence1517935265
URLhttps://shavar.services.mozilla.com/downloads?client=navclient-auto-ffox&appver=78.0&pver=2.2
MethodPOST
Evidence1595893235
URLhttps://shavar.services.mozilla.com/downloads?client=navclient-auto-ffox&appver=78.0&pver=2.2
MethodPOST
Evidence1594235398
URLhttps://shavar.services.mozilla.com/downloads?client=navclient-auto-ffox&appver=78.0&pver=2.2
MethodPOST
Evidence1564526481
URLhttps://shavar.services.mozilla.com/downloads?client=navclient-auto-ffox&appver=78.0&pver=2.2
MethodPOST
Evidence1595891357
URLhttps://shavar.services.mozilla.com/downloads?client=navclient-auto-ffox&appver=78.0&pver=2.2
MethodPOST
Evidence1596064216
URLhttps://shavar.services.mozilla.com/downloads?client=navclient-auto-ffox&appver=78.0&pver=2.2
MethodPOST
Evidence1512160865
Instances14
Solution

Manually confirm that the timestamp data is not sensitive, and that the data cannot be aggregated to disclose exploitable patterns.

Other information

1494877265, which evaluates to: 2017-05-15 15:41:05

Reference

https://www.owasp.org/index.php/Top_10_2013-A6-Sensitive_Data_Exposure

http://projects.webappsec.org/w/page/13246936/Information%20Leakage

CWE Id200
WASC Id13
Source ID3