# HG changeset patch # User Michiel Broek # Date 1713019826 -7200 # Node ID 825210ba27076f2b881e0d3e06a1767d7333178b # Parent 6cabc02f4c8db800df81552adae0df633bac7a92 Added websockets to thermferm. Started new www directory for websocket enabled web. The init script now waits until thermferm is completely stopped. diff -r 6cabc02f4c8d -r 825210ba2707 .hgignore --- a/.hgignore Thu Apr 11 15:58:49 2024 +0200 +++ b/.hgignore Sat Apr 13 16:50:26 2024 +0200 @@ -5,15 +5,10 @@ stamp-h autom4te.cache .filelist -rc433/recv -rc433/send -rc433/sniffer thermferm/thermferm -dht11/dht11 -mash/mash -brewco/brewco brewpanel/brewpanel kicad/ThermFerm.pro +www/version.php syntax: glob *.o diff -r 6cabc02f4c8d -r 825210ba2707 Makefile.global.in --- a/Makefile.global.in Thu Apr 11 15:58:49 2024 +0200 +++ b/Makefile.global.in Sat Apr 13 16:50:26 2024 +0200 @@ -11,6 +11,7 @@ DOCDIR = @prefix@/doc VARDIR = @prefix@/var DATADIR = @prefix@/share/@PACKAGE@/ +WWWDIR = /var/www/@PACKAGE@/ INSTALL = @INSTALL@ SHELL = /bin/sh diff -r 6cabc02f4c8d -r 825210ba2707 configure --- a/configure Thu Apr 11 15:58:49 2024 +0200 +++ b/configure Sat Apr 13 16:50:26 2024 +0200 @@ -2033,7 +2033,7 @@ ac_config_headers="$ac_config_headers config.h" -SUBDIRS="thermferm brewpanel tools" +SUBDIRS="thermferm brewpanel tools www" PACKAGE="mbsePi-apps" @@ -3643,6 +3643,67 @@ as_fn_error $? "json-c not found" "$LINENO" 5 fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lws_create_context in -lwebsockets" >&5 +$as_echo_n "checking for lws_create_context in -lwebsockets... " >&6; } +if ${ac_cv_lib_websockets_lws_create_context+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lwebsockets $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char lws_create_context (); +int +main () +{ +return lws_create_context (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_websockets_lws_create_context=yes +else + ac_cv_lib_websockets_lws_create_context=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_websockets_lws_create_context" >&5 +$as_echo "$ac_cv_lib_websockets_lws_create_context" >&6; } +if test "x$ac_cv_lib_websockets_lws_create_context" = xyes; then : + result=yes +else + result=no +fi + +if test "$result" = "yes"; then + LIBS="$LIBS -lwebsockets" + for ac_header in libwebsockets.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "libwebsockets.h" "ac_cv_header_libwebsockets_h" "$ac_includes_default" +if test "x$ac_cv_header_libwebsockets_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBWEBSOCKETS_H 1 +_ACEOF + +fi + +done + +else + as_fn_error $? "libwebsockets not found" "$LINENO" 5 +fi + + # # Additional commandline switches # @@ -3993,7 +4054,7 @@ -ac_config_files="$ac_config_files Makefile.global" +ac_config_files="$ac_config_files Makefile.global www/version.php" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -4686,6 +4747,7 @@ case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "Makefile.global") CONFIG_FILES="$CONFIG_FILES Makefile.global" ;; + "www/version.php") CONFIG_FILES="$CONFIG_FILES www/version.php" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac diff -r 6cabc02f4c8d -r 825210ba2707 configure.ac --- a/configure.ac Thu Apr 11 15:58:49 2024 +0200 +++ b/configure.ac Sat Apr 13 16:50:26 2024 +0200 @@ -2,7 +2,7 @@ AC_INIT(thermferm/thermferm.c) AM_CONFIG_HEADER(config.h) -SUBDIRS="thermferm brewpanel tools" +SUBDIRS="thermferm brewpanel tools www" AC_SUBST(SUBDIRS) dnl General settings @@ -60,6 +60,15 @@ AC_MSG_ERROR(json-c not found) fi +AC_CHECK_LIB(websockets,lws_create_context,result=yes,result=no) +if test "$result" = "yes"; then + LIBS="$LIBS -lwebsockets" + AC_CHECK_HEADERS(libwebsockets.h) +else + AC_MSG_ERROR(libwebsockets not found) +fi + + # # Additional commandline switches # @@ -156,6 +165,7 @@ AC_OUTPUT( Makefile.global + www/version.php ) AC_MSG_RESULT([ diff -r 6cabc02f4c8d -r 825210ba2707 thermferm/Makefile --- a/thermferm/Makefile Thu Apr 11 15:58:49 2024 +0200 +++ b/thermferm/Makefile Sat Apr 13 16:50:26 2024 +0200 @@ -55,21 +55,22 @@ # DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT # Dependencies generated by make depend -mqtt.o: thermferm.h rdconfig.h devices.h xutil.h delay.h mqtt.h -thermferm.o: lock.h rdconfig.h server.h thermferm.h devices.h delay.h simulator.h lcd-pcf8574.h lcd-buffer.h slcd.h panel.h one-wire.h futil.h xutil.h pid.h mqtt.h +delay.o: delay.h thermferm.h +devices.o: thermferm.h delay.h devices.h rc-switch.h panel.h xutil.h +futil.o: thermferm.h futil.h +lcd-buffer.o: thermferm.h lcd-buffer.h lcd-pcf8574.h slcd.h panel.h +lcd-pcf8574.o: thermferm.h lcd-pcf8574.h slcd.h +lock.o: lock.h thermferm.h +mqtt.o: thermferm.h rdconfig.h devices.h xutil.h delay.h mqtt.h websocket.h one-wire.o: thermferm.h statetbl.h one-wire.h devices.h delay.h futil.h xutil.h panel.o: thermferm.h delay.h lcd-pcf8574.h slcd.h panel.h -devices.o: thermferm.h delay.h devices.h rc-switch.h panel.h xutil.h -lcd-buffer.o: thermferm.h lcd-buffer.h lcd-pcf8574.h slcd.h panel.h -lcd-pcf8574.o: thermferm.h lcd-pcf8574.h slcd.h pid.o: thermferm.h pid.h rc-switch.o: thermferm.h xutil.h delay.h rc-switch.h -lock.o: lock.h thermferm.h -futil.o: thermferm.h futil.h -delay.o: delay.h thermferm.h -xutil.o: thermferm.h xutil.h +rdconfig.o: rdconfig.h thermferm.h pid.h futil.h xutil.h server.o: rdconfig.h thermferm.h delay.h devices.h server.h lcd-buffer.h xutil.h mqtt.h simulator.o: thermferm.h delay.h simulator.h -rdconfig.o: rdconfig.h thermferm.h pid.h futil.h xutil.h slcd.o: thermferm.h slcd.h futil.h xutil.h +thermferm.o: lock.h rdconfig.h server.h thermferm.h devices.h delay.h simulator.h lcd-pcf8574.h lcd-buffer.h slcd.h panel.h one-wire.h futil.h xutil.h pid.h mqtt.h statetbl.h +websocket.o: thermferm.h xutil.h websocket.h +xutil.o: thermferm.h xutil.h # End of generated dependencies diff -r 6cabc02f4c8d -r 825210ba2707 thermferm/mqtt.c --- a/thermferm/mqtt.c Thu Apr 11 15:58:49 2024 +0200 +++ b/thermferm/mqtt.c Sat Apr 13 16:50:26 2024 +0200 @@ -28,6 +28,8 @@ #include "xutil.h" #include "delay.h" #include "mqtt.h" +#include "websocket.h" + extern sys_config Config; extern int debug; @@ -1214,6 +1216,19 @@ free(topic); topic = NULL; } + + /* + * Build and send websocket message. + */ + payload = xstrcpy((char *)"{\"fermenter\":"); + payloadu = unit_data(unit, true); + payload = xstrcat(payload, payloadu); + payload = xstrcat(payload, (char *)"}"); + ws_broadcast(payload); + free(payload); + payload = NULL; + free(payloadu); + payloadu = NULL; } @@ -1390,6 +1405,52 @@ } +void node_ws(void) +{ + char *payload = NULL, buf[64]; + struct utsname ubuf; + + payload = xstrcpy((char *)"{\"thermferm\":{"); + + if (uname(&ubuf) == 0) { + payload = xstrcat(payload, (char *)"\"node\":\""); + payload = xstrcat(payload, ubuf.nodename); + payload = xstrcat(payload, (char *)"\",\"os\":\""); + payload = xstrcat(payload, ubuf.sysname); + payload = xstrcat(payload, (char *)"\",\"os_version\":\""); + payload = xstrcat(payload, ubuf.release); + payload = xstrcat(payload, (char *)"\""); + } else { + payload = xstrcat(payload, (char *)"\"node\":\"Unknown\",\"os\":\"Unknown\",\"os_version\":\"Unknown\""); + } + payload = xstrcat(payload, (char *)",\"FW\":\""); + payload = xstrcat(payload, (char *)VERSION); + payload = xstrcat(payload, (char *)"\""); + + if (Config.temp_address || Config.hum_address) { + payload = xstrcat(payload, (char *)",\"THB\":{"); + if (Config.temp_address) { + payload = xstrcat(payload, (char *)"\"temperature\":"); + sprintf(buf, "%.1f", Config.temp_value / 1000.0); + payload = xstrcat(payload, buf); + } + if (Config.temp_address && Config.hum_address) + payload = xstrcat(payload, (char *)","); + if (Config.hum_address) { + payload = xstrcat(payload, (char *)"\"humidity\":"); + sprintf(buf, "%.1f", Config.hum_value / 1000.0); + payload = xstrcat(payload, buf); + } + payload = xstrcat(payload, (char *)"}"); + } + + payload = xstrcat(payload, (char *)"}}"); + ws_broadcast(payload); + free(payload); + payload = NULL; +} + + void publishNData(bool birth, int flag) { @@ -1594,6 +1655,8 @@ free(payload); payload = NULL; } + + node_ws(); } diff -r 6cabc02f4c8d -r 825210ba2707 thermferm/rdconfig.c --- a/thermferm/rdconfig.c Thu Apr 11 15:58:49 2024 +0200 +++ b/thermferm/rdconfig.c Sat Apr 13 16:50:26 2024 +0200 @@ -238,6 +238,7 @@ xmlTextWriterWriteFormatElement(writer, BAD_CAST "MQTT_USER", "%s", Config.mqtt_username); xmlTextWriterWriteFormatElement(writer, BAD_CAST "MQTT_PASS", "%s", Config.mqtt_password); } + xmlTextWriterWriteFormatElement(writer, BAD_CAST "WS_PORT", "%d", Config.websocket_port); /* * Start an element named "LCDS" as child of THERMFERM. @@ -1568,6 +1569,7 @@ Config.mqtt_host = xstrcpy((char *)"localhost"); Config.mqtt_port = 1883; Config.next_unit = 1; + Config.websocket_port = 8020; if ((cur = xmlDocGetRootElement(doc)) == NULL) { syslog(LOG_NOTICE, "XML file %s empty.", mypath); @@ -1635,8 +1637,14 @@ Config.mqtt_password = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); } if ((!xmlStrcmp(cur->name, (const xmlChar *)"UUID"))) { - Config.uuid= (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + Config.uuid = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); } + if ((!xmlStrcmp(cur->name, (const xmlChar *)"WS_PORT"))) { + key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + if (sscanf((const char *)key, "%d", &ival) == 1) + Config.websocket_port = ival; + xmlFree(key); + } if ((!xmlStrcmp(cur->name, (const xmlChar *)"LCDS"))) { parseLCDs(doc, cur); } diff -r 6cabc02f4c8d -r 825210ba2707 thermferm/thermferm.c --- a/thermferm/thermferm.c Thu Apr 11 15:58:49 2024 +0200 +++ b/thermferm/thermferm.c Sat Apr 13 16:50:26 2024 +0200 @@ -37,6 +37,7 @@ #include "pid.h" #include "mqtt.h" #include "statetbl.h" +#include "websocket.h" int my_shutdown = FALSE; @@ -57,6 +58,8 @@ extern int my_panel_shutdown; extern int my_server_state; extern int my_server_shutdown; +extern int my_ws_state; +extern int my_ws_shutdown; extern int my_simulator_state; #ifdef USE_SIMULATOR extern int my_simulator_shutdown; @@ -71,6 +74,7 @@ pthread_t my_devices_thread; pthread_t my_panel_thread; pthread_t my_server_thread; +pthread_t my_ws_thread; #ifdef USE_SIMULATOR pthread_t my_simulator_thread; #endif @@ -1843,7 +1847,9 @@ if (key != KEY_NONE) panel_key_events(key); - mDelay(50); + mDelay(25); + ws_check(); + mDelay(25); SM_PROCEED(CheckRun); SM_END @@ -1879,8 +1885,8 @@ slcdCharDef(slcdHandle, 6, RevHeatONOFF); my_shutdown = my_reboot = FALSE; - my_devices_shutdown = my_panel_shutdown = my_server_shutdown = my_one_wire_shutdown = 0; - my_devices_state = my_panel_state = my_server_state = my_one_wire_state = 0; + my_devices_shutdown = my_panel_shutdown = my_server_shutdown = my_ws_shutdown = my_one_wire_shutdown = 0; + my_devices_state = my_panel_state = my_server_state = my_ws_state = my_one_wire_state = 0; my_simulator_state = 0; #ifdef USE_SIMULATOR my_simulator_shutdown = 0; @@ -1892,7 +1898,18 @@ mqtt_connect(); /* - * First scan the one-wire bus + * Start websockets first. + */ + rc = pthread_create(&my_ws_thread, NULL, my_ws_loop, (void *)t ); + if (rc) { + fprintf(stderr, "my_ws_loop thread didn't start rc=%d\n", rc); + syslog(LOG_NOTICE, "my_ws_loop thread didn't start rc=%d", rc); + } else { + t++; + } + + /* + * Next scan the one-wire bus */ rc = pthread_create(&my_one_wire_thread, NULL, my_one_wire_loop, (void *)t ); if (rc) { @@ -2052,7 +2069,8 @@ while (my_devices_state) { mDelay(50); }; my_one_wire_shutdown = 1; while (my_one_wire_state) { mDelay(50); }; - + my_ws_shutdown = 1; + while (my_ws_state) { mDelay(50); }; mqtt_disconnect(); stopLCD(); diff -r 6cabc02f4c8d -r 825210ba2707 thermferm/thermferm.h --- a/thermferm/thermferm.h Thu Apr 11 15:58:49 2024 +0200 +++ b/thermferm/thermferm.h Sat Apr 13 16:50:26 2024 +0200 @@ -387,6 +387,7 @@ char *mqtt_username; /* MQTT username */ char *mqtt_password; /* MQTT password */ char *uuid; /* System uuid */ + int websocket_port; /* Websocket port */ } sys_config; diff -r 6cabc02f4c8d -r 825210ba2707 thermferm/websocket.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/thermferm/websocket.c Sat Apr 13 16:50:26 2024 +0200 @@ -0,0 +1,246 @@ +/** + * @file websocket.c + * @brief WebSockets interface + * @author Michiel Broek + * + * Copyright (C) 2024 + * + * Michiel Broek + * + * This file is part of the mbsePi-apps + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * bms is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with ThermFerm; see the file COPYING. If not, write to the Free + * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +#include "thermferm.h" +#include "xutil.h" +#include "websocket.h" +#include + + +extern sys_config Config; +extern int debug; + +int my_ws_shutdown = 0; +int my_ws_state = 0; +struct lws_context *context; +int ws_clients = 0; +time_t last_msg = 0; +pthread_mutex_t ws_mutex; + + +/* + * Based on lws-mirror-protocol + */ +#define MAX_MESSAGE_QUEUE 512 + +#define WS_INBUF 2048 + + +/* + * one of these created for each message + */ +struct a_message { + void *payload; /* is malloc'd */ + size_t len; +}; + + +static struct a_message ringbuffer[MAX_MESSAGE_QUEUE]; +static int ringbuffer_head; + + + +static int callback_ws(struct lws *wsi, enum lws_callback_reasons reason, void *user, void *in, size_t len) +{ + struct per_session_data__lws_mirror *pss = (struct per_session_data__lws_mirror *)user; + int n, m; + char buf[WS_INBUF + 1]; + + switch (reason) { + + case LWS_CALLBACK_ESTABLISHED: { + ws_clients++; + pss->ringbuffer_tail = ringbuffer_head; + pss->wsi = wsi; + break; + } + + case LWS_CALLBACK_PROTOCOL_DESTROY: + syslog(LOG_NOTICE, "Websocket: protocol cleaning up"); + for (n = 0; n < sizeof ringbuffer / sizeof ringbuffer[0]; n++) + if (ringbuffer[n].payload) + free(ringbuffer[n].payload); + break; + + case LWS_CALLBACK_SERVER_WRITEABLE: + while (pss->ringbuffer_tail != ringbuffer_head) { + m = ringbuffer[pss->ringbuffer_tail].len; + n = lws_write(wsi, (unsigned char *)ringbuffer[pss->ringbuffer_tail].payload + LWS_PRE, m, LWS_WRITE_TEXT); + if (n < 0) { + syslog(LOG_NOTICE, "ws: ERROR %d writing", n); + return -1; + } + if (n < m) + syslog(LOG_NOTICE, "ws: partial write %d vs %d", n, m); + + if (pss->ringbuffer_tail == (MAX_MESSAGE_QUEUE - 1)) + pss->ringbuffer_tail = 0; + else + pss->ringbuffer_tail++; + + if (((ringbuffer_head - pss->ringbuffer_tail) & (MAX_MESSAGE_QUEUE - 1)) == (MAX_MESSAGE_QUEUE - 15)) + lws_rx_flow_allow_all_protocol(lws_get_context(wsi), lws_get_protocol(wsi)); + + if (lws_send_pipe_choked(wsi)) { + lws_callback_on_writable(wsi); + break; + } + } + break; + + case LWS_CALLBACK_RECEIVE: + + memcpy(buf, in, len); + buf[len] = '\0'; + // syslog(LOG_NOTICE, "ws: reveived %ld bytes %s", len, buf); + /* + * These are send by bmsapp to bmsd. Then bmsd resends these via MQTT. + * Do we want to change that? Or use it for the new web pages. + * {"node":"rpi01","group_id":"fermenters","control":"reboot"} + * {"node":"rpi01","group_id":"fermenters","control":"rebirth"} + */ +// if (strncmp(buf, (char *)"{\"device\":\"fermenters\",", 23) == 0) { +// fermenter_ws_receive(buf); +// } else if (strncmp(buf, (char *)"{\"device\":\"co2meters\",", 22) == 0) { +// co2meter_ws_receive(buf); +// } else if (strncmp(buf, (char *)"{\"device\":\"ispindels\",", 22) == 0) { +// ispindel_ws_receive(buf); +// } else if (strncmp(buf, (char *)"{\"node\":\"", 9) == 0) { +// node_ws_receive(buf); +// } + + break; + + case LWS_CALLBACK_CLOSED: + ws_clients--; + break; + + default: + break; + } + + return 0; +} + + + +static struct lws_protocols protocols[] = { + { "thermferm-protocol", callback_ws, sizeof(struct per_session_data__lws_mirror), WS_INBUF }, + { NULL, NULL, 0, 0 } /* terminator */ +}; + + +/* + * {"node":"host","group":"group","online":1,"lastseen":"datetime","temperature":20.5,"humidity":47,"ip":"ipaddr","rssi":-1} + * {"device":"fermenters","node":"seaport","unit":"unit0","online":1,"mode":"FRIDGE","yeast_lo":12.0,"yeast_hi":24.0,"air":19.875,"beer":19.812,"chiller":1.500,"heater":100,"cooler":0,"fan":100,"light":0,"door":0,"sp_lo":17.0,"sp_hi":17.5,"alarm":0,"stage":"PRIMARY"} + */ +void ws_broadcast(char *msg) +{ + int len, err; + + syslog(LOG_NOTICE, "%s", msg); + err = pthread_mutex_lock(&ws_mutex); + if (err) { + syslog(LOG_NOTICE, "ws_broadcast pthread_mutex_lock error %d", err); + } else { + + len = strlen(msg); + if (ringbuffer[ringbuffer_head].payload) + free(ringbuffer[ringbuffer_head].payload); + + ringbuffer[ringbuffer_head].payload = malloc(LWS_PRE + len); + ringbuffer[ringbuffer_head].len = len; + memcpy((char *)ringbuffer[ringbuffer_head].payload + LWS_PRE, msg, len); + if (ringbuffer_head == (MAX_MESSAGE_QUEUE - 1)) + ringbuffer_head = 0; + else + ringbuffer_head++; + +// syslog(LOG_NOTICE, "ws: broadcast buffer=%d len=%d", ringbuffer_head, len); + + lws_callback_on_writable_all_protocol(context, &protocols[0]); + err = pthread_mutex_unlock(&ws_mutex); + if (err) { + syslog(LOG_NOTICE, "ws_broadcast pthread_mutex_unlock error %d", err); + } + last_msg = time(NULL); + } +} + + + +/* + * Called every 5 seconds. + */ +void ws_check(void) +{ + time_t now = time(NULL); + + if (((int)now - (int)last_msg) > 45) { + ws_broadcast((char *)"{\"ping\":1}"); + } +} + + + +void *my_ws_loop(void *threadid) +{ + struct lws_context_creation_info info; + int n = 0; + + my_ws_state = 1; + memset(&info, 0, sizeof info); /* otherwise uninitialized garbage */ + info.port = Config.websocket_port; + info.protocols = protocols; + info.gid = -1; + info.uid = -1; + info.keepalive_timeout = 900; + info.options = LWS_SERVER_OPTION_VALIDATE_UTF8; + + context = lws_create_context(&info); + + if (context == NULL) { + syslog(LOG_NOTICE, "libwebsocket_create_context() failed"); + my_ws_state = 0; + return (void *)1; + } + syslog(LOG_NOTICE, "Websocket: server started port %d", info.port); + + /* + * Loop forever until external shutdown variable is set. + */ + while (n >= 0 && ! my_ws_shutdown) { + + n = lws_service(context, 50); + } + lws_context_destroy(context); + + my_ws_state = 0; + syslog(LOG_NOTICE, "Websocket: server stopped"); + return (void *)0; +} + + diff -r 6cabc02f4c8d -r 825210ba2707 thermferm/websocket.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/thermferm/websocket.h Sat Apr 13 16:50:26 2024 +0200 @@ -0,0 +1,31 @@ +/** + * @file websocket.h + */ + +#ifndef _WEBSOCKET_H +#define _WEBSOCKET_H + + +struct per_session_data__lws_mirror { + struct lws *wsi; + int ringbuffer_tail; +}; + +/** + * @brief Broadcast messages to all connected websocket clients. + * @param msg The message to send. Messages are placed in a ringbuffer queue. + */ +void ws_broadcast(char *msg); + +/** + * @brief Check if a connection is idle for 45 seconds and if so send a ping like + * message to keep the connection alive. Call this function at regular intervals. + */ +void ws_check(void); + +/** + * @brief The websockets server thread. + */ +void *my_ws_loop(void *); + +#endif diff -r 6cabc02f4c8d -r 825210ba2707 tools/rc.thermferm --- a/tools/rc.thermferm Thu Apr 11 15:58:49 2024 +0200 +++ b/tools/rc.thermferm Sat Apr 13 16:50:26 2024 +0200 @@ -10,6 +10,7 @@ fi PIDFILE=/run/thermferm.pid +STOPTIME=45 case "$1" in start) @@ -26,6 +27,14 @@ echo -n "Stopping Fermentation Controller: " if [ -f ${PIDFILE} ]; then kill $(cat ${PIDFILE}) + tim=0 + while [ true ]; do + [ ! -f "${PIDFILE}" ] && break; + [ $tim -gt $STOPTIME ] && break; + echo -n "." + sleep 1 + tim=$(($tim+1)) + done echo "done." else echo "wasn't running." diff -r 6cabc02f4c8d -r 825210ba2707 www/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/Makefile Sat Apr 13 16:50:26 2024 +0200 @@ -0,0 +1,53 @@ +# Makefile for thermferm +# Copyright (c) 2024 by M. Broek. + +include ../Makefile.global + +SRC = $(wildcard *.php) +SUB = version.php.in images/* css/* jqwidgets/* jqwidgets/styles/* \ + jqwidgets/styles/images/* jqwidgets/globalization/* js/* \ + includes/* +OTHER = Makefile + + + +############################################################################# + +.c.o: + ${CC} ${CFLAGS} ${INCLUDES} ${DEFINES} -c $< + +all: + +clean: + rm -f version.php + +install: + +#${INSTALL} -d -g 314 -o 314 ${PREFIX} ${WWWDIR} ${WWWDIR}/css ${WWWDIR}/fpdf \ +# ${WWWDIR}/fpdf/font ${WWWDIR}/ispindel \ +# ${WWWDIR}/jqwidgets ${WWWDIR}/js ${WWWDIR}/images/ ${WWWDIR}/includes/ +# ${INSTALL} -d -g 314 -o 314 -m 0777 ${WWWDIR}/run +# ${INSTALL} -d -g 314 -o 314 ${WWWDIR}/log +# ${INSTALL} -d -g 314 -o 314 ${WWWDIR}/log/brews +# ${INSTALL} -d -g 314 -o 314 ${WWWDIR}/log/fermentation +# ${INSTALL} -d -g 314 -o 314 ${WWWDIR}/log/co2pressure +# ${INSTALL} -d -g 314 -o 314 ${WWWDIR}/log/ispindel +# ${INSTALL} -g 314 -o 314 -m 0644 ${SRC} ${WWWDIR}/ +# ${INSTALL} -g 314 -o 314 -m 0644 version.php ${WWWDIR}/ +# ${INSTALL} -g 314 -o 314 -m 0644 css/* ${WWWDIR}/css/ +# ${INSTALL} -g 314 -o 314 -m 0644 images/* ${WWWDIR}/images/ +# ${INSTALL} -g 314 -o 314 -m 0644 includes/* ${WWWDIR}/includes/ +# ${INSTALL} -g 314 -o 314 -m 0644 ispindel/* ${WWWDIR}/ispindel/ +# cp -r jqwidgets/* ${WWWDIR}/jqwidgets/ +# chown -R 314:314 ${WWWDIR}/jqwidgets +# cp -r -p fpdf/* ${WWWDIR}/fpdf/ +# chown -R 314:314 ${WWWDIR}/fpdf +# ${INSTALL} -g 314 -o 314 -m 0644 js/* ${WWWDIR}/js/ + +filelist: Makefile + BASE=`pwd`; \ + BASE=`basename $${BASE}`; \ + (for f in ${SRC} ${SUB} ${OTHER} ;do echo ${PACKAGE}-${VERSION}/$${BASE}/$$f; done) >filelist + +depend: + diff -r 6cabc02f4c8d -r 825210ba2707 www/images/database.png Binary file www/images/database.png has changed diff -r 6cabc02f4c8d -r 825210ba2707 www/images/fermenter.png Binary file www/images/fermenter.png has changed diff -r 6cabc02f4c8d -r 825210ba2707 www/images/preferences.png Binary file www/images/preferences.png has changed diff -r 6cabc02f4c8d -r 825210ba2707 www/includes/global.inc.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/includes/global.inc.php Sat Apr 13 16:50:26 2024 +0200 @@ -0,0 +1,121 @@ + + * + * This file is part of mbsePi-apps + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * BrewCloud is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with ThermFerm; see the file COPYING. If not, write to the Free + * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + *****************************************************************************/ + +/* + * Look for the style names in the jqwidgets/styles directory. + */ +$my_style = 'ui-redmond'; +//$my_style = 'ui-mbse'; + +require_once($_SERVER['DOCUMENT_ROOT'].'/version.php'); + + +function page_header($title, $loadjs) { + global $my_style; + global $my_version; +?> + + + + + ThermFerm v<?php echo $my_version;?> - <?php echo $title;?> + + + + + + + + + + + + + + + + +'.PHP_EOL; +?> + + + +
+
+
+ + +
+ +
+ + +
+
+ Bevestig verwijderen +
+
+
+ Klik "OK" om dit record definitief te verwijderen.
+ Druk "Cancel" om te sluiten zonder dit record te verwijderen. +
+
+
+ + +
+
+
+
+ + +
+ + + diff -r 6cabc02f4c8d -r 825210ba2707 www/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/index.php Sat Apr 13 16:50:26 2024 +0200 @@ -0,0 +1,12 @@ + + +
+
+
+ + diff -r 6cabc02f4c8d -r 825210ba2707 www/jqwidgets/globalization/globalize.culture.cs-CZ.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/jqwidgets/globalization/globalize.culture.cs-CZ.js Sat Apr 13 16:50:26 2024 +0200 @@ -0,0 +1,87 @@ +/* tslint:disable */ +/* eslint-disable */ +/* + * Globalize Culture cs-CZ + * + * http://github.com/jquery/globalize + * + * Copyright Software Freedom Conservancy, Inc. + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * This file was generated by the Globalize Culture Generator + * Translation: bugs found in this file need to be fixed in the generator + */ + +(function( window, undefined ) { + +var Globalize; + +if ( typeof require !== "undefined" && + typeof exports !== "undefined" && + typeof module !== "undefined" ) { + // Assume CommonJS + Globalize = require( "globalize" ); +} else { + // Global variable + Globalize = window.Globalize; +} + +Globalize.addCultureInfo( "cs-CZ", "default", { + name: "cs-CZ", + englishName: "Czech (Czech Republic)", + nativeName: "čeština (Česká republika)", + language: "cs", + numberFormat: { + ",": " ", + ".": ",", + "NaN": "Není číslo", + negativeInfinity: "-nekonečno", + positiveInfinity: "+nekonečno", + percent: { + pattern: ["-n%","n%"], + ",": " ", + ".": "," + }, + currency: { + pattern: ["-n $","n $"], + ",": " ", + ".": ",", + symbol: "Kč" + } + }, + calendars: { + standard: { + "/": ".", + firstDay: 1, + days: { + names: ["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"], + namesAbbr: ["ne","po","út","st","čt","pá","so"], + namesShort: ["ne","po","út","st","čt","pá","so"] + }, + months: { + names: ["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec",""], + namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] + }, + monthsGenitive: { + names: ["ledna","února","března","dubna","května","června","července","srpna","září","října","listopadu","prosince",""], + namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] + }, + AM: ["dop.","dop.","DOP."], + PM: ["odp.","odp.","ODP."], + eras: [{"name":"n. l.","start":null,"offset":0}], + patterns: { + d: "d.M.yyyy", + D: "d. MMMM yyyy", + t: "H:mm", + T: "H:mm:ss", + f: "d. MMMM yyyy H:mm", + F: "d. MMMM yyyy H:mm:ss", + M: "dd MMMM", + Y: "MMMM yyyy" + } + } + } +}); + +}( this )); diff -r 6cabc02f4c8d -r 825210ba2707 www/jqwidgets/globalization/globalize.culture.de-DE.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/jqwidgets/globalization/globalize.culture.de-DE.js Sat Apr 13 16:50:26 2024 +0200 @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/* + * Globalize Culture de-DE + * + * http://github.com/jquery/globalize + * + * Copyright Software Freedom Conservancy, Inc. + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * This file was generated by the Globalize Culture Generator + * Translation: bugs found in this file need to be fixed in the generator + */ + +(function( window, undefined ) { + +var Globalize; + +if ( typeof require !== "undefined" && + typeof exports !== "undefined" && + typeof module !== "undefined" ) { + // Assume CommonJS + Globalize = require( "globalize" ); +} else { + // Global variable + Globalize = window.Globalize; +} + +Globalize.addCultureInfo( "de-DE", "default", { + name: "de-DE", + englishName: "German (Germany)", + nativeName: "Deutsch (Deutschland)", + language: "de", + numberFormat: { + ",": ".", + ".": ",", + "NaN": "n. def.", + negativeInfinity: "-unendlich", + positiveInfinity: "+unendlich", + percent: { + pattern: ["-n%","n%"], + ",": ".", + ".": "," + }, + currency: { + pattern: ["-n $","n $"], + ",": ".", + ".": ",", + symbol: "€" + } + }, + calendars: { + standard: { + "/": ".", + firstDay: 1, + days: { + names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"], + namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"], + namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"] + }, + months: { + names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""], + namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""] + }, + AM: null, + PM: null, + eras: [{"name":"n. Chr.","start":null,"offset":0}], + patterns: { + d: "dd.MM.yyyy", + D: "dddd, d. MMMM yyyy", + t: "HH:mm", + T: "HH:mm:ss", + f: "dddd, d. MMMM yyyy HH:mm", + F: "dddd, d. MMMM yyyy HH:mm:ss", + M: "dd MMMM", + Y: "MMMM yyyy" + } + } + } +}); + +}( this )); diff -r 6cabc02f4c8d -r 825210ba2707 www/jqwidgets/globalization/globalize.culture.en-CA.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/jqwidgets/globalization/globalize.culture.en-CA.js Sat Apr 13 16:50:26 2024 +0200 @@ -0,0 +1,51 @@ +/* tslint:disable */ +/* eslint-disable */ +/* + * Globalize Culture en-CA + * + * http://github.com/jquery/globalize + * + * Copyright Software Freedom Conservancy, Inc. + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * This file was generated by the Globalize Culture Generator + * Translation: bugs found in this file need to be fixed in the generator + */ + +(function( window, undefined ) { + +var Globalize; + +if ( typeof require !== "undefined" && + typeof exports !== "undefined" && + typeof module !== "undefined" ) { + // Assume CommonJS + Globalize = require( "globalize" ); +} else { + // Global variable + Globalize = window.Globalize; +} + +Globalize.addCultureInfo( "en-CA", "default", { + name: "en-CA", + englishName: "English (Canada)", + nativeName: "English (Canada)", + numberFormat: { + currency: { + pattern: ["-$n","$n"] + } + }, + calendars: { + standard: { + patterns: { + d: "dd/MM/yyyy", + D: "MMMM-dd-yy", + f: "MMMM-dd-yy h:mm tt", + F: "MMMM-dd-yy h:mm:ss tt" + } + } + } +}); + +}( this )); diff -r 6cabc02f4c8d -r 825210ba2707 www/jqwidgets/globalization/globalize.culture.en-US.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/jqwidgets/globalization/globalize.culture.en-US.js Sat Apr 13 16:50:26 2024 +0200 @@ -0,0 +1,35 @@ +/* tslint:disable */ +/* eslint-disable */ +/* + * Globalize Culture en-US + * + * http://github.com/jquery/globalize + * + * Copyright Software Freedom Conservancy, Inc. + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * This file was generated by the Globalize Culture Generator + * Translation: bugs found in this file need to be fixed in the generator + */ + +(function( window, undefined ) { + +var Globalize; + +if ( typeof require !== "undefined" && + typeof exports !== "undefined" && + typeof module !== "undefined" ) { + // Assume CommonJS + Globalize = require( "globalize" ); +} else { + // Global variable + Globalize = window.Globalize; +} + +Globalize.addCultureInfo( "en-US", "default", { + name: "en-US", + englishName: "English (United States)" +}); + +}( this )); diff -r 6cabc02f4c8d -r 825210ba2707 www/jqwidgets/globalization/globalize.culture.fr-FR.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/jqwidgets/globalization/globalize.culture.fr-FR.js Sat Apr 13 16:50:26 2024 +0200 @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/* + * Globalize Culture fr-FR + * + * http://github.com/jquery/globalize + * + * Copyright Software Freedom Conservancy, Inc. + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * This file was generated by the Globalize Culture Generator + * Translation: bugs found in this file need to be fixed in the generator + */ + +(function( window, undefined ) { + +var Globalize; + +if ( typeof require !== "undefined" && + typeof exports !== "undefined" && + typeof module !== "undefined" ) { + // Assume CommonJS + Globalize = require( "globalize" ); +} else { + // Global variable + Globalize = window.Globalize; +} + +Globalize.addCultureInfo( "fr-FR", "default", { + name: "fr-FR", + englishName: "French (France)", + nativeName: "français (France)", + language: "fr", + numberFormat: { + ",": " ", + ".": ",", + "NaN": "Non Numérique", + negativeInfinity: "-Infini", + positiveInfinity: "+Infini", + percent: { + ",": " ", + ".": "," + }, + currency: { + pattern: ["-n $","n $"], + ",": " ", + ".": ",", + symbol: "€" + } + }, + calendars: { + standard: { + firstDay: 1, + days: { + names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"], + namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."], + namesShort: ["di","lu","ma","me","je","ve","sa"] + }, + months: { + names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""], + namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""] + }, + AM: null, + PM: null, + eras: [{"name":"ap. J.-C.","start":null,"offset":0}], + patterns: { + d: "dd/MM/yyyy", + D: "dddd d MMMM yyyy", + t: "HH:mm", + T: "HH:mm:ss", + f: "dddd d MMMM yyyy HH:mm", + F: "dddd d MMMM yyyy HH:mm:ss", + M: "d MMMM", + Y: "MMMM yyyy" + } + } + } +}); + +}( this )); diff -r 6cabc02f4c8d -r 825210ba2707 www/jqwidgets/globalization/globalize.culture.he-IL.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/jqwidgets/globalization/globalize.culture.he-IL.js Sat Apr 13 16:50:26 2024 +0200 @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/* + * Globalize Culture he-IL + * + * http://github.com/jquery/globalize + * + * Copyright Software Freedom Conservancy, Inc. + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * This file was generated by the Globalize Culture Generator + * Translation: bugs found in this file need to be fixed in the generator + */ + +(function( window, undefined ) { + +var Globalize; + +if ( typeof require !== "undefined" && + typeof exports !== "undefined" && + typeof module !== "undefined" ) { + // Assume CommonJS + Globalize = require( "globalize" ); +} else { + // Global variable + Globalize = window.Globalize; +} + +Globalize.addCultureInfo( "he-IL", "default", { + name: "he-IL", + englishName: "Hebrew (Israel)", + nativeName: "עברית (ישראל)", + language: "he", + isRTL: true, + numberFormat: { + "NaN": "לא מספר", + negativeInfinity: "אינסוף שלילי", + positiveInfinity: "אינסוף חיובי", + percent: { + pattern: ["-n%","n%"] + }, + currency: { + pattern: ["$-n","$ n"], + symbol: "₪" + } + }, + calendars: { + standard: { + days: { + names: ["יום ראשון","יום שני","יום שלישי","יום רביעי","יום חמישי","יום שישי","שבת"], + namesAbbr: ["יום א","יום ב","יום ג","יום ד","יום ה","יום ו","שבת"], + namesShort: ["א","ב","ג","ד","ה","ו","ש"] + }, + months: { + names: ["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר",""], + namesAbbr: ["ינו","פבר","מרץ","אפר","מאי","יונ","יול","אוג","ספט","אוק","נוב","דצמ",""] + }, + eras: [{"name":"לספירה","start":null,"offset":0}], + patterns: { + d: "dd/MM/yyyy", + D: "dddd dd MMMM yyyy", + t: "HH:mm", + T: "HH:mm:ss", + f: "dddd dd MMMM yyyy HH:mm", + F: "dddd dd MMMM yyyy HH:mm:ss", + M: "dd MMMM", + Y: "MMMM yyyy" + } + }, + Hebrew: { + name: "Hebrew", + "/": " ", + days: { + names: ["יום ראשון","יום שני","יום שלישי","יום רביעי","יום חמישי","יום שישי","שבת"], + namesAbbr: ["א","ב","ג","ד","ה","ו","ש"], + namesShort: ["א","ב","ג","ד","ה","ו","ש"] + }, + months: { + names: ["תשרי","חשון","כסלו","טבת","שבט","אדר","אדר ב","ניסן","אייר","סיון","תמוז","אב","אלול"], + namesAbbr: ["תשרי","חשון","כסלו","טבת","שבט","אדר","אדר ב","ניסן","אייר","סיון","תמוז","אב","אלול"] + }, + eras: [{"name":"C.E.","start":null,"offset":0}], + twoDigitYearMax: 5790, + patterns: { + d: "dd MMMM yyyy", + D: "dddd dd MMMM yyyy", + t: "HH:mm", + T: "HH:mm:ss", + f: "dddd dd MMMM yyyy HH:mm", + F: "dddd dd MMMM yyyy HH:mm:ss", + M: "dd MMMM", + Y: "MMMM yyyy" + } + } + } +}); + +}( this )); diff -r 6cabc02f4c8d -r 825210ba2707 www/jqwidgets/globalization/globalize.culture.hr-HR.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/jqwidgets/globalization/globalize.culture.hr-HR.js Sat Apr 13 16:50:26 2024 +0200 @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/* + * Globalize Culture hr-HR + * + * http://github.com/jquery/globalize + * + * Copyright Software Freedom Conservancy, Inc. + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * This file was generated by the Globalize Culture Generator + * Translation: bugs found in this file need to be fixed in the generator + */ + +(function( window, undefined ) { + +var Globalize; + +if ( typeof require !== "undefined" && + typeof exports !== "undefined" && + typeof module !== "undefined" ) { + // Assume CommonJS + Globalize = require( "globalize" ); +} else { + // Global variable + Globalize = window.Globalize; +} + +Globalize.addCultureInfo( "hr-HR", "default", { + name: "hr-HR", + englishName: "Croatian (Croatia)", + nativeName: "hrvatski (Hrvatska)", + language: "hr", + numberFormat: { + pattern: ["- n"], + ",": ".", + ".": ",", + percent: { + pattern: ["-n%","n%"], + ",": ".", + ".": "," + }, + currency: { + pattern: ["-n $","n $"], + ",": ".", + ".": ",", + symbol: "kn" + } + }, + calendars: { + standard: { + "/": ".", + firstDay: 1, + days: { + names: ["nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota"], + namesAbbr: ["ned","pon","uto","sri","čet","pet","sub"], + namesShort: ["ne","po","ut","sr","če","pe","su"] + }, + months: { + names: ["siječanj","veljača","ožujak","travanj","svibanj","lipanj","srpanj","kolovoz","rujan","listopad","studeni","prosinac",""], + namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""] + }, + monthsGenitive: { + names: ["siječnja","veljače","ožujka","travnja","svibnja","lipnja","srpnja","kolovoza","rujna","listopada","studenog","prosinca",""], + namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""] + }, + AM: null, + PM: null, + patterns: { + d: "d.M.yyyy.", + D: "d. MMMM yyyy.", + t: "H:mm", + T: "H:mm:ss", + f: "d. MMMM yyyy. H:mm", + F: "d. MMMM yyyy. H:mm:ss", + M: "d. MMMM" + } + } + } +}); + +}( this )); diff -r 6cabc02f4c8d -r 825210ba2707 www/jqwidgets/globalization/globalize.culture.hu-HU.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/jqwidgets/globalization/globalize.culture.hu-HU.js Sat Apr 13 16:50:26 2024 +0200 @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +/* + * Globalize Culture hu-HU + * + * http://github.com/jquery/globalize + * + * Copyright Software Freedom Conservancy, Inc. + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * This file was generated by the Globalize Culture Generator + * Translation: bugs found in this file need to be fixed in the generator + */ + +(function( window, undefined ) { + +var Globalize; + +if ( typeof require !== "undefined" && + typeof exports !== "undefined" && + typeof module !== "undefined" ) { + // Assume CommonJS + Globalize = require( "globalize" ); +} else { + // Global variable + Globalize = window.Globalize; +} + +Globalize.addCultureInfo( "hu-HU", "default", { + name: "hu-HU", + englishName: "Hungarian (Hungary)", + nativeName: "magyar (Magyarország)", + language: "hu", + numberFormat: { + ",": " ", + ".": ",", + "NaN": "nem szám", + negativeInfinity: "negatív végtelen", + positiveInfinity: "végtelen", + percent: { + ",": " ", + ".": "," + }, + currency: { + pattern: ["-n $","n $"], + ",": " ", + ".": ",", + symbol: "Ft" + } + }, + calendars: { + standard: { + "/": ".", + firstDay: 1, + days: { + names: ["vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"], + namesAbbr: ["V","H","K","Sze","Cs","P","Szo"], + namesShort: ["V","H","K","Sze","Cs","P","Szo"] + }, + months: { + names: ["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december",""], + namesAbbr: ["jan.","febr.","márc.","ápr.","máj.","jún.","júl.","aug.","szept.","okt.","nov.","dec.",""] + }, + AM: ["de.","de.","DE."], + PM: ["du.","du.","DU."], + eras: [{"name":"i.sz.","start":null,"offset":0}], + patterns: { + d: "yyyy.MM.dd.", + D: "yyyy. MMMM d.", + t: "H:mm", + T: "H:mm:ss", + f: "yyyy. MMMM d. H:mm", + F: "yyyy. MMMM d. H:mm:ss", + M: "MMMM d.", + Y: "yyyy. MMMM" + } + } + } +}); + +}( this )); diff -r 6cabc02f4c8d -r 825210ba2707 www/jqwidgets/globalization/globalize.culture.it-IT.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/jqwidgets/globalization/globalize.culture.it-IT.js Sat Apr 13 16:50:26 2024 +0200 @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +/* + * Globalize Culture it-IT + * + * http://github.com/jquery/globalize + * + * Copyright Software Freedom Conservancy, Inc. + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * This file was generated by the Globalize Culture Generator + * Translation: bugs found in this file need to be fixed in the generator + */ + +(function( window, undefined ) { + +var Globalize; + +if ( typeof require !== "undefined" && + typeof exports !== "undefined" && + typeof module !== "undefined" ) { + // Assume CommonJS + Globalize = require( "globalize" ); +} else { + // Global variable + Globalize = window.Globalize; +} + +Globalize.addCultureInfo( "it-IT", "default", { + name: "it-IT", + englishName: "Italian (Italy)", + nativeName: "italiano (Italia)", + language: "it", + numberFormat: { + ",": ".", + ".": ",", + "NaN": "Non un numero reale", + negativeInfinity: "-Infinito", + positiveInfinity: "+Infinito", + percent: { + pattern: ["-n%","n%"], + ",": ".", + ".": "," + }, + currency: { + pattern: ["-$ n","$ n"], + ",": ".", + ".": ",", + symbol: "€" + } + }, + calendars: { + standard: { + firstDay: 1, + days: { + names: ["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"], + namesAbbr: ["dom","lun","mar","mer","gio","ven","sab"], + namesShort: ["do","lu","ma","me","gi","ve","sa"] + }, + months: { + names: ["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre",""], + namesAbbr: ["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic",""] + }, + AM: null, + PM: null, + eras: [{"name":"d.C.","start":null,"offset":0}], + patterns: { + d: "dd/MM/yyyy", + D: "dddd d MMMM yyyy", + t: "HH:mm", + T: "HH:mm:ss", + f: "dddd d MMMM yyyy HH:mm", + F: "dddd d MMMM yyyy HH:mm:ss", + M: "dd MMMM", + Y: "MMMM yyyy" + } + } + } +}); + +}( this )); \ No newline at end of file diff -r 6cabc02f4c8d -r 825210ba2707 www/jqwidgets/globalization/globalize.culture.ja-JP.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/jqwidgets/globalization/globalize.culture.ja-JP.js Sat Apr 13 16:50:26 2024 +0200 @@ -0,0 +1,102 @@ +/* tslint:disable */ +/* eslint-disable */ +/* + * Globalize Culture ja-JP + * + * http://github.com/jquery/globalize + * + * Copyright Software Freedom Conservancy, Inc. + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * This file was generated by the Globalize Culture Generator + * Translation: bugs found in this file need to be fixed in the generator + */ + +(function( window, undefined ) { + +var Globalize; + +if ( typeof require !== "undefined" && + typeof exports !== "undefined" && + typeof module !== "undefined" ) { + // Assume CommonJS + Globalize = require( "globalize" ); +} else { + // Global variable + Globalize = window.Globalize; +} + +Globalize.addCultureInfo( "ja-JP", "default", { + name: "ja-JP", + englishName: "Japanese (Japan)", + nativeName: "日本語 (日本)", + language: "ja", + numberFormat: { + "NaN": "NaN (非数値)", + negativeInfinity: "-∞", + positiveInfinity: "+∞", + percent: { + pattern: ["-n%","n%"] + }, + currency: { + pattern: ["-$n","$n"], + decimals: 0, + symbol: "¥" + } + }, + calendars: { + standard: { + days: { + names: ["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"], + namesAbbr: ["日","月","火","水","木","金","土"], + namesShort: ["日","月","火","水","木","金","土"] + }, + months: { + names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""], + namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] + }, + AM: ["午前","午前","午前"], + PM: ["午後","午後","午後"], + eras: [{"name":"西暦","start":null,"offset":0}], + patterns: { + d: "yyyy/MM/dd", + D: "yyyy'年'M'月'd'日'", + t: "H:mm", + T: "H:mm:ss", + f: "yyyy'年'M'月'd'日' H:mm", + F: "yyyy'年'M'月'd'日' H:mm:ss", + M: "M'月'd'日'", + Y: "yyyy'年'M'月'" + } + }, + Japanese: { + name: "Japanese", + days: { + names: ["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"], + namesAbbr: ["日","月","火","水","木","金","土"], + namesShort: ["日","月","火","水","木","金","土"] + }, + months: { + names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""], + namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""] + }, + AM: ["午前","午前","午前"], + PM: ["午後","午後","午後"], + eras: [{"name":"平成","start":null,"offset":1867},{"name":"昭和","start":-1812153600000,"offset":1911},{"name":"大正","start":-1357603200000,"offset":1925},{"name":"明治","start":60022080000,"offset":1988}], + twoDigitYearMax: 99, + patterns: { + d: "gg y/M/d", + D: "gg y'年'M'月'd'日'", + t: "H:mm", + T: "H:mm:ss", + f: "gg y'年'M'月'd'日' H:mm", + F: "gg y'年'M'月'd'日' H:mm:ss", + M: "M'月'd'日'", + Y: "gg y'年'M'月'" + } + } + } +}); + +}( this )); diff -r 6cabc02f4c8d -r 825210ba2707 www/jqwidgets/globalization/globalize.culture.lt.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/jqwidgets/globalization/globalize.culture.lt.js Sat Apr 13 16:50:26 2024 +0200 @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +/* + * Globalize Culture lt + * + * http://github.com/jquery/globalize + * + * Copyright Software Freedom Conservancy, Inc. + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * This file was generated by the Globalize Culture Generator + * Translation: bugs found in this file need to be fixed in the generator + */ + +(function( window, undefined ) { + +var Globalize; + +if ( typeof require !== "undefined" && + typeof exports !== "undefined" && + typeof module !== "undefined" ) { + // Assume CommonJS + Globalize = require( "globalize" ); +} else { + // Global variable + Globalize = window.Globalize; +} + +Globalize.addCultureInfo( "lt", "default", { + name: "lt", + englishName: "Lithuanian", + nativeName: "lietuvių", + language: "lt", + numberFormat: { + ",": ".", + ".": ",", + negativeInfinity: "-begalybė", + positiveInfinity: "begalybė", + percent: { + pattern: ["-n%","n%"], + ",": ".", + ".": "," + }, + currency: { + pattern: ["-n $","n $"], + ",": ".", + ".": ",", + symbol: "Lt" + } + }, + calendars: { + standard: { + "/": ".", + firstDay: 1, + days: { + names: ["sekmadienis","pirmadienis","antradienis","trečiadienis","ketvirtadienis","penktadienis","šeštadienis"], + namesAbbr: ["Sk","Pr","An","Tr","Kt","Pn","Št"], + namesShort: ["S","P","A","T","K","Pn","Š"] + }, + months: { + names: ["sausis","vasaris","kovas","balandis","gegužė","birželis","liepa","rugpjūtis","rugsėjis","spalis","lapkritis","gruodis",""], + namesAbbr: ["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spl","Lap","Grd",""] + }, + monthsGenitive: { + names: ["sausio","vasario","kovo","balandžio","gegužės","birželio","liepos","rugpjūčio","rugsėjo","spalio","lapkričio","gruodžio",""], + namesAbbr: ["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spl","Lap","Grd",""] + }, + AM: null, + PM: null, + patterns: { + d: "yyyy.MM.dd", + D: "yyyy 'm.' MMMM d 'd.'", + t: "HH:mm", + T: "HH:mm:ss", + f: "yyyy 'm.' MMMM d 'd.' HH:mm", + F: "yyyy 'm.' MMMM d 'd.' HH:mm:ss", + M: "MMMM d 'd.'", + Y: "yyyy 'm.' MMMM" + } + } + } +}); + +}( this )); diff -r 6cabc02f4c8d -r 825210ba2707 www/jqwidgets/globalization/globalize.culture.ru-RU.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/jqwidgets/globalization/globalize.culture.ru-RU.js Sat Apr 13 16:50:26 2024 +0200 @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/* + * Globalize Culture ru-RU + * + * http://github.com/jquery/globalize + * + * Copyright Software Freedom Conservancy, Inc. + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * This file was generated by the Globalize Culture Generator + * Translation: bugs found in this file need to be fixed in the generator + */ + +(function( window, undefined ) { + +var Globalize; + +if ( typeof require !== "undefined" && + typeof exports !== "undefined" && + typeof module !== "undefined" ) { + // Assume CommonJS + Globalize = require( "globalize" ); +} else { + // Global variable + Globalize = window.Globalize; +} + +Globalize.addCultureInfo( "ru-RU", "default", { + name: "ru-RU", + englishName: "Russian (Russia)", + nativeName: "русский (Россия)", + language: "ru", + numberFormat: { + ",": " ", + ".": ",", + negativeInfinity: "-бесконечность", + positiveInfinity: "бесконечность", + percent: { + pattern: ["-n%","n%"], + ",": " ", + ".": "," + }, + currency: { + pattern: ["-n$","n$"], + ",": " ", + ".": ",", + symbol: "р." + } + }, + calendars: { + standard: { + "/": ".", + firstDay: 1, + days: { + names: ["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"], + namesAbbr: ["Вс","Пн","Вт","Ср","Чт","Пт","Сб"], + namesShort: ["Вс","Пн","Вт","Ср","Чт","Пт","Сб"] + }, + months: { + names: ["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь",""], + namesAbbr: ["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек",""] + }, + monthsGenitive: { + names: ["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря",""], + namesAbbr: ["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек",""] + }, + AM: null, + PM: null, + patterns: { + d: "dd.MM.yyyy", + D: "d MMMM yyyy 'г.'", + t: "H:mm", + T: "H:mm:ss", + f: "d MMMM yyyy 'г.' H:mm", + F: "d MMMM yyyy 'г.' H:mm:ss", + Y: "MMMM yyyy" + } + } + } +}); + +}( this )); diff -r 6cabc02f4c8d -r 825210ba2707 www/jqwidgets/globalization/globalize.culture.sa-IN.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/jqwidgets/globalization/globalize.culture.sa-IN.js Sat Apr 13 16:50:26 2024 +0200 @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/* + * Globalize Culture sa-IN + * + * http://github.com/jquery/globalize + * + * Copyright Software Freedom Conservancy, Inc. + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * This file was generated by the Globalize Culture Generator + * Translation: bugs found in this file need to be fixed in the generator + */ + +(function( window, undefined ) { + +var Globalize; + +if ( typeof require !== "undefined" && + typeof exports !== "undefined" && + typeof module !== "undefined" ) { + // Assume CommonJS + Globalize = require( "globalize" ); +} else { + // Global variable + Globalize = window.Globalize; +} + +Globalize.addCultureInfo( "sa-IN", "default", { + name: "sa-IN", + englishName: "Sanskrit (India)", + nativeName: "संस्कृत (भारतम्)", + language: "sa", + numberFormat: { + groupSizes: [3,2], + percent: { + groupSizes: [3,2] + }, + currency: { + pattern: ["$ -n","$ n"], + groupSizes: [3,2], + symbol: "रु" + } + }, + calendars: { + standard: { + "/": "-", + days: { + names: ["रविवासरः","सोमवासरः","मङ्गलवासरः","बुधवासरः","गुरुवासरः","शुक्रवासरः","शनिवासरः"], + namesAbbr: ["रविवासरः","सोमवासरः","मङ्गलवासरः","बुधवासरः","गुरुवासरः","शुक्रवासरः","शनिवासरः"], + namesShort: ["र","स","म","ब","ग","श","श"] + }, + months: { + names: ["जनवरी","फरवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्तूबर","नवम्बर","दिसम्बर",""], + namesAbbr: ["जनवरी","फरवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्तूबर","नवम्बर","दिसम्बर",""] + }, + AM: ["पूर्वाह्न","पूर्वाह्न","पूर्वाह्न"], + PM: ["अपराह्न","अपराह्न","अपराह्न"], + patterns: { + d: "dd-MM-yyyy", + D: "dd MMMM yyyy dddd", + t: "HH:mm", + T: "HH:mm:ss", + f: "dd MMMM yyyy dddd HH:mm", + F: "dd MMMM yyyy dddd HH:mm:ss", + M: "dd MMMM" + } + } + } +}); + +}( this )); diff -r 6cabc02f4c8d -r 825210ba2707 www/jqwidgets/globalization/globalize.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/jqwidgets/globalization/globalize.js Sat Apr 13 16:50:26 2024 +0200 @@ -0,0 +1,1607 @@ +/* tslint:disable */ +/* eslint-disable */ +/*! + * Globalize + * + * http://github.com/jquery/globalize + * + * Copyright Software Freedom Conservancy, Inc. + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + */ + +(function( window, undefined ) { +if (document.Globalize) { + return; +} + +var Globalize, + // private variables + regexHex, + regexInfinity, + regexParseFloat, + regexTrim, + // private JavaScript utility functions + arrayIndexOf, + endsWith, + extend, + isArray, + isFunction, + isObject, + startsWith, + trim, + truncate, + zeroPad, + // private Globalization utility functions + appendPreOrPostMatch, + expandFormat, + formatDate, + formatNumber, + getTokenRegExp, + getEra, + getEraYear, + parseExact, + parseNegativePattern; + +// Global variable (Globalize) or CommonJS module (globalize) +Globalize = function( cultureSelector ) { + return new Globalize.prototype.init( cultureSelector ); +}; + +if ( typeof require !== "undefined" && + typeof exports !== "undefined" && + typeof module !== "undefined" ) { + // Assume CommonJS + module.exports = Globalize; +} else { + // Export as global variable + window.Globalize = Globalize; +} + +Globalize.cultures = {}; + +Globalize.prototype = { + constructor: Globalize, + init: function( cultureSelector ) { + this.cultures = Globalize.cultures; + this.cultureSelector = cultureSelector; + + return this; + } +}; +Globalize.prototype.init.prototype = Globalize.prototype; + +// 1. When defining a culture, all fields are required except the ones stated as optional. +// 2. Each culture should have a ".calendars" object with at least one calendar named "standard" +// which serves as the default calendar in use by that culture. +// 3. Each culture should have a ".calendar" object which is the current calendar being used, +// it may be dynamically changed at any time to one of the calendars in ".calendars". +Globalize.cultures[ "default" ] = { + // A unique name for the culture in the form - + name: "en", + // the name of the culture in the english language + englishName: "English", + // the name of the culture in its own language + nativeName: "English", + // whether the culture uses right-to-left text + isRTL: false, + // "language" is used for so-called "specific" cultures. + // For example, the culture "es-CL" means "Spanish, in Chili". + // It represents the Spanish-speaking culture as it is in Chili, + // which might have different formatting rules or even translations + // than Spanish in Spain. A "neutral" culture is one that is not + // specific to a region. For example, the culture "es" is the generic + // Spanish culture, which may be a more generalized version of the language + // that may or may not be what a specific culture expects. + // For a specific culture like "es-CL", the "language" field refers to the + // neutral, generic culture information for the language it is using. + // This is not always a simple matter of the string before the dash. + // For example, the "zh-Hans" culture is netural (Simplified Chinese). + // And the "zh-SG" culture is Simplified Chinese in Singapore, whose lanugage + // field is "zh-CHS", not "zh". + // This field should be used to navigate from a specific culture to it's + // more general, neutral culture. If a culture is already as general as it + // can get, the language may refer to itself. + language: "en", + // numberFormat defines general number formatting rules, like the digits in + // each grouping, the group separator, and how negative numbers are displayed. + numberFormat: { + // [negativePattern] + // Note, numberFormat.pattern has no "positivePattern" unlike percent and currency, + // but is still defined as an array for consistency with them. + // negativePattern: one of "(n)|-n|- n|n-|n -" + pattern: [ "-n" ], + // number of decimal places normally shown + decimals: 2, + // string that separates number groups, as in 1,000,000 + ",": ",", + // string that separates a number from the fractional portion, as in 1.99 + ".": ".", + // array of numbers indicating the size of each number group. + // TODO: more detailed description and example + groupSizes: [ 3 ], + // symbol used for positive numbers + "+": "+", + // symbol used for negative numbers + "-": "-", + // symbol used for NaN (Not-A-Number) + "NaN": "NaN", + // symbol used for Negative Infinity + negativeInfinity: "-Infinity", + // symbol used for Positive Infinity + positiveInfinity: "Infinity", + percent: { + // [negativePattern, positivePattern] + // negativePattern: one of "-n %|-n%|-%n|%-n|%n-|n-%|n%-|-% n|n %-|% n-|% -n|n- %" + // positivePattern: one of "n %|n%|%n|% n" + pattern: [ "-n %", "n %" ], + // number of decimal places normally shown + decimals: 2, + // array of numbers indicating the size of each number group. + // TODO: more detailed description and example + groupSizes: [ 3 ], + // string that separates number groups, as in 1,000,000 + ",": ",", + // string that separates a number from the fractional portion, as in 1.99 + ".": ".", + // symbol used to represent a percentage + symbol: "%" + }, + currency: { + // [negativePattern, positivePattern] + // negativePattern: one of "($n)|-$n|$-n|$n-|(n$)|-n$|n-$|n$-|-n $|-$ n|n $-|$ n-|$ -n|n- $|($ n)|(n $)" + // positivePattern: one of "$n|n$|$ n|n $" + pattern: [ "($n)", "$n" ], + // number of decimal places normally shown + decimals: 2, + // array of numbers indicating the size of each number group. + // TODO: more detailed description and example + groupSizes: [ 3 ], + // string that separates number groups, as in 1,000,000 + ",": ",", + // string that separates a number from the fractional portion, as in 1.99 + ".": ".", + // symbol used to represent currency + symbol: "$" + } + }, + // calendars defines all the possible calendars used by this culture. + // There should be at least one defined with name "standard", and is the default + // calendar used by the culture. + // A calendar contains information about how dates are formatted, information about + // the calendar's eras, a standard set of the date formats, + // translations for day and month names, and if the calendar is not based on the Gregorian + // calendar, conversion functions to and from the Gregorian calendar. + calendars: { + standard: { + // name that identifies the type of calendar this is + name: "Gregorian_USEnglish", + // separator of parts of a date (e.g. "/" in 11/05/1955) + "/": "/", + // separator of parts of a time (e.g. ":" in 05:44 PM) + ":": ":", + // the first day of the week (0 = Sunday, 1 = Monday, etc) + firstDay: 0, + days: { + // full day names + names: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], + // abbreviated day names + namesAbbr: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], + // shortest day names + namesShort: [ "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" ] + }, + months: { + // full month names (13 months for lunar calendards -- 13th month should be "" if not lunar) + names: [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", "" ], + // abbreviated month names + namesAbbr: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "" ] + }, + // AM and PM designators in one of these forms: + // The usual view, and the upper and lower case versions + // [ standard, lowercase, uppercase ] + // The culture does not use AM or PM (likely all standard date formats use 24 hour time) + // null + AM: [ "AM", "am", "AM" ], + PM: [ "PM", "pm", "PM" ], + eras: [ + // eras in reverse chronological order. + // name: the name of the era in this culture (e.g. A.D., C.E.) + // start: when the era starts in ticks (gregorian, gmt), null if it is the earliest supported era. + // offset: offset in years from gregorian calendar + { + "name": "A.D.", + "start": null, + "offset": 0 + } + ], + // when a two digit year is given, it will never be parsed as a four digit + // year greater than this year (in the appropriate era for the culture) + // Set it as a full year (e.g. 2029) or use an offset format starting from + // the current year: "+19" would correspond to 2029 if the current year 2010. + twoDigitYearMax: 2029, + // set of predefined date and time patterns used by the culture + // these represent the format someone in this culture would expect + // to see given the portions of the date that are shown. + patterns: { + // short date pattern + d: "M/d/yyyy", + // long date pattern + D: "dddd, MMMM dd, yyyy", + // short time pattern + t: "h:mm tt", + // long time pattern + T: "h:mm:ss tt", + // long date, short time pattern + f: "dddd, MMMM dd, yyyy h:mm tt", + // long date, long time pattern + F: "dddd, MMMM dd, yyyy h:mm:ss tt", + // month/day pattern + M: "MMMM dd", + // month/year pattern + Y: "yyyy MMMM", + // S is a sortable format that does not vary by culture + S: "yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss" + } + // optional fields for each calendar: + /* + monthsGenitive: + Same as months but used when the day preceeds the month. + Omit if the culture has no genitive distinction in month names. + For an explaination of genitive months, see http://blogs.msdn.com/michkap/archive/2004/12/25/332259.aspx + convert: + Allows for the support of non-gregorian based calendars. This convert object is used to + to convert a date to and from a gregorian calendar date to handle parsing and formatting. + The two functions: + fromGregorian( date ) + Given the date as a parameter, return an array with parts [ year, month, day ] + corresponding to the non-gregorian based year, month, and day for the calendar. + toGregorian( year, month, day ) + Given the non-gregorian year, month, and day, return a new Date() object + set to the corresponding date in the gregorian calendar. + */ + } + }, + // For localized strings + messages: {} +}; + +Globalize.cultures[ "default" ].calendar = Globalize.cultures[ "default" ].calendars.standard; + +Globalize.cultures.en = Globalize.cultures[ "default" ]; + +Globalize.cultureSelector = "en"; + +// +// private variables +// + +regexHex = /^0x[a-f0-9]+$/i; +regexInfinity = /^[+\-]?infinity$/i; +regexParseFloat = /^[+\-]?\d*\.?\d*(e[+\-]?\d+)?$/; +regexTrim = /^\s+|\s+$/g; + +// +// private JavaScript utility functions +// + +arrayIndexOf = function( array, item ) { + if ( array.indexOf ) { + return array.indexOf( item ); + } + for ( var i = 0, length = array.length; i < length; i++ ) { + if ( array[i] === item ) { + return i; + } + } + return -1; +}; + +endsWith = function( value, pattern ) { + return value.substr( value.length - pattern.length ) === pattern; +}; + +extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !isFunction(target) ) { + target = {}; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( isObject(copy) || (copyIsArray = isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && isArray(src) ? src : []; + + } else { + clone = src && isObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +isArray = Array.isArray || function( obj ) { + return Object.prototype.toString.call( obj ) === "[object Array]"; +}; + +isFunction = function( obj ) { + return Object.prototype.toString.call( obj ) === "[object Function]"; +}; + +isObject = function( obj ) { + return Object.prototype.toString.call( obj ) === "[object Object]"; +}; + +startsWith = function( value, pattern ) { + return value.indexOf( pattern ) === 0; +}; + +trim = function( value ) { + return ( value + "" ).replace( regexTrim, "" ); +}; + +truncate = function( value ) { + if ( isNaN( value ) ) { + return NaN; + } + return Math[ value < 0 ? "ceil" : "floor" ]( value ); +}; + +zeroPad = function( str, count, left ) { + var l; + for ( l = str.length; l < count; l += 1 ) { + str = ( left ? ("0" + str) : (str + "0") ); + } + return str; +}; + +// +// private Globalization utility functions +// + +appendPreOrPostMatch = function( preMatch, strings ) { + // appends pre- and post- token match strings while removing escaped characters. + // Returns a single quote count which is used to determine if the token occurs + // in a string literal. + var quoteCount = 0, + escaped = false; + for ( var i = 0, il = preMatch.length; i < il; i++ ) { + var c = preMatch.charAt( i ); + switch ( c ) { + case "\'": + if ( escaped ) { + strings.push( "\'" ); + } + else { + quoteCount++; + } + escaped = false; + break; + case "\\": + if ( escaped ) { + strings.push( "\\" ); + } + escaped = !escaped; + break; + default: + strings.push( c ); + escaped = false; + break; + } + } + return quoteCount; +}; + +expandFormat = function( cal, format ) { + // expands unspecified or single character date formats into the full pattern. + format = format || "F"; + var pattern, + patterns = cal.patterns, + len = format.length; + if ( len === 1 ) { + pattern = patterns[ format ]; + if ( !pattern ) { + throw "Invalid date format string \'" + format + "\'."; + } + format = pattern; + } + else if ( len === 2 && format.charAt(0) === "%" ) { + // %X escape format -- intended as a custom format string that is only one character, not a built-in format. + format = format.charAt( 1 ); + } + return format; +}; + +formatDate = function( value, format, culture ) { + var cal = culture.calendar, + convert = cal.convert, + ret; + + if ( !format || !format.length || format === "i" ) { + if ( culture && culture.name.length ) { + if ( convert ) { + // non-gregorian calendar, so we cannot use built-in toLocaleString() + ret = formatDate( value, cal.patterns.F, culture ); + } + else { + var eraDate = new Date( value.getTime() ), + era = getEra( value, cal.eras ); + eraDate.setFullYear( getEraYear(value, cal, era) ); + ret = eraDate.toLocaleString(); + } + } + else { + ret = value.toString(); + } + return ret; + } + + var eras = cal.eras, + sortable = format === "s"; + format = expandFormat( cal, format ); + + // Start with an empty string + ret = []; + var hour, + zeros = [ "0", "00", "000" ], + foundDay, + checkedDay, + dayPartRegExp = /([^d]|^)(d|dd)([^d]|$)/g, + quoteCount = 0, + tokenRegExp = getTokenRegExp(), + converted; + + //function padZeros( num, c ) { + // var r, s = num + ""; + // if ( c > 1 && s.length < c ) { + // r = ( zeros[c - 2] + s); + // return r.substr( r.length - c, c ); + // } + // else { + // r = s; + // } + // return r; + //} + + function padZeros(num, c) { + if (num < 0) { + return "-" + padZeros(-num, c); + } + var r, s = num + ""; + if (c > 1 && s.length < c) { + r = (zeros[c - 2] + s); + return r.substr(r.length - c, c); + } + else { + r = s; + } + return r; + } + + function hasDay() { + if ( foundDay || checkedDay ) { + return foundDay; + } + foundDay = dayPartRegExp.test( format ); + checkedDay = true; + return foundDay; + } + + function getPart( date, part ) { + if ( converted ) { + return converted[ part ]; + } + switch ( part ) { + case 0: + return date.getFullYear(); + case 1: + return date.getMonth(); + case 2: + return date.getDate(); + default: + throw "Invalid part value " + part; + } + } + + if ( !sortable && convert ) { + converted = convert.fromGregorian( value ); + } + + for ( ; ; ) { + // Save the current index + var index = tokenRegExp.lastIndex, + // Look for the next pattern + ar = tokenRegExp.exec( format ); + + // Append the text before the pattern (or the end of the string if not found) + var preMatch = format.slice( index, ar ? ar.index : format.length ); + quoteCount += appendPreOrPostMatch( preMatch, ret ); + + if ( !ar ) { + break; + } + + // do not replace any matches that occur inside a string literal. + if ( quoteCount % 2 ) { + ret.push( ar[0] ); + continue; + } + + var current = ar[ 0 ], + clength = current.length; + + switch ( current ) { + case "ddd": + //Day of the week, as a three-letter abbreviation + case "dddd": + // Day of the week, using the full name + var names = ( clength === 3 ) ? cal.days.namesAbbr : cal.days.names; + ret.push( names[value.getDay()] ); + break; + case "d": + // Day of month, without leading zero for single-digit days + case "dd": + // Day of month, with leading zero for single-digit days + foundDay = true; + ret.push( + padZeros( getPart(value, 2), clength ) + ); + break; + case "MMM": + // Month, as a three-letter abbreviation + case "MMMM": + // Month, using the full name + var part = getPart( value, 1 ); + ret.push( + ( cal.monthsGenitive && hasDay() ) ? + ( cal.monthsGenitive[ clength === 3 ? "namesAbbr" : "names" ][ part ] ) : + ( cal.months[ clength === 3 ? "namesAbbr" : "names" ][ part ] ) + ); + break; + case "M": + // Month, as digits, with no leading zero for single-digit months + case "MM": + // Month, as digits, with leading zero for single-digit months + ret.push( + padZeros( getPart(value, 1) + 1, clength ) + ); + break; + case "y": + // Year, as two digits, but with no leading zero for years less than 10 + case "yy": + // Year, as two digits, with leading zero for years less than 10 + case "yyyy": + // Year represented by four full digits + part = converted ? converted[ 0 ] : getEraYear( value, cal, getEra(value, eras), sortable ); + if ( clength < 4 ) { + part = part % 100; + } + ret.push( + padZeros( part, clength ) + ); + break; + case "h": + // Hours with no leading zero for single-digit hours, using 12-hour clock + case "hh": + // Hours with leading zero for single-digit hours, using 12-hour clock + hour = value.getHours() % 12; + if ( hour === 0 ) hour = 12; + ret.push( + padZeros( hour, clength ) + ); + break; + case "H": + // Hours with no leading zero for single-digit hours, using 24-hour clock + case "HH": + // Hours with leading zero for single-digit hours, using 24-hour clock + ret.push( + padZeros( value.getHours(), clength ) + ); + break; + case "m": + // Minutes with no leading zero for single-digit minutes + case "mm": + // Minutes with leading zero for single-digit minutes + ret.push( + padZeros( value.getMinutes(), clength ) + ); + break; + case "s": + // Seconds with no leading zero for single-digit seconds + case "ss": + // Seconds with leading zero for single-digit seconds + ret.push( + padZeros( value.getSeconds(), clength ) + ); + break; + case "t": + // One character am/pm indicator ("a" or "p") + case "tt": + // Multicharacter am/pm indicator + part = value.getHours() < 12 ? ( cal.AM ? cal.AM[0] : " " ) : ( cal.PM ? cal.PM[0] : " " ); + ret.push( clength === 1 ? part.charAt(0) : part ); + break; + case "f": + // Deciseconds + case "ff": + // Centiseconds + case "fff": + // Milliseconds + ret.push( + padZeros( value.getMilliseconds(), 3 ).substr( 0, clength ) + ); + break; + case "z": + // Time zone offset, no leading zero + case "zz": + // Time zone offset with leading zero + hour = value.getTimezoneOffset() / 60; + ret.push( + ( hour <= 0 ? "+" : "-" ) + padZeros( Math.floor(Math.abs(hour)), clength ) + ); + break; + case "zzz": + // Time zone offset with leading zero + hour = value.getTimezoneOffset() / 60; + ret.push( + ( hour <= 0 ? "+" : "-" ) + padZeros( Math.floor(Math.abs(hour)), 2 ) + + // Hard coded ":" separator, rather than using cal.TimeSeparator + // Repeated here for consistency, plus ":" was already assumed in date parsing. + ":" + padZeros( Math.abs(value.getTimezoneOffset() % 60), 2 ) + ); + break; + case "g": + case "gg": + if ( cal.eras ) { + ret.push( + cal.eras[ getEra(value, eras) ].name + ); + } + break; + case "/": + ret.push( cal["/"] ); + break; + default: + throw "Invalid date format pattern \'" + current + "\'."; + } + } + return ret.join( "" ); +}; + +// formatNumber +(function() { + var expandNumber; + + expandNumber = function( number, precision, formatInfo ) { + var groupSizes = formatInfo.groupSizes, + curSize = groupSizes[ 0 ], + curGroupIndex = 1, + factor = Math.pow( 10, precision ), + rounded = Math.round( number * factor ) / factor; + + if ( !isFinite(rounded) ) { + rounded = number; + } + number = rounded; + + var numberString = number+"", + right = "", + split = numberString.split( /e/i ), + exponent = split.length > 1 ? parseInt( split[1], 10 ) : 0; + numberString = split[ 0 ]; + split = numberString.split( "." ); + numberString = split[ 0 ]; + right = split.length > 1 ? split[ 1 ] : ""; + + var l; + if ( exponent > 0 ) { + right = zeroPad( right, exponent, false ); + numberString += right.slice( 0, exponent ); + right = right.substr( exponent ); + } + else if ( exponent < 0 ) { + exponent = -exponent; + numberString = zeroPad( numberString, exponent + 1, true ); + right = numberString.slice( -exponent, numberString.length ) + right; + numberString = numberString.slice( 0, -exponent ); + } + + if ( precision > 0 ) { + right = formatInfo[ "." ] + + ( (right.length > precision) ? right.slice(0, precision) : zeroPad(right, precision) ); + } + else { + right = ""; + } + + var stringIndex = numberString.length - 1, + sep = formatInfo[ "," ], + ret = ""; + + while ( stringIndex >= 0 ) { + if ( curSize === 0 || curSize > stringIndex ) { + return numberString.slice( 0, stringIndex + 1 ) + ( ret.length ? (sep + ret + right) : right ); + } + ret = numberString.slice( stringIndex - curSize + 1, stringIndex + 1 ) + ( ret.length ? (sep + ret) : "" ); + + stringIndex -= curSize; + + if ( curGroupIndex < groupSizes.length ) { + curSize = groupSizes[ curGroupIndex ]; + curGroupIndex++; + } + } + + return numberString.slice( 0, stringIndex + 1 ) + sep + ret + right; + }; + + formatNumber = function( value, format, culture ) { + if ( !isFinite(value) ) { + if ( value === Infinity ) { + return culture.numberFormat.positiveInfinity; + } + if ( value === -Infinity ) { + return culture.numberFormat.negativeInfinity; + } + return culture.numberFormat.NaN; + } + if ( !format || format === "i" ) { + return culture.name.length ? value.toLocaleString() : value.toString(); + } + format = format || "D"; + + var nf = culture.numberFormat, + number = Math.abs( value ), + precision = -1, + pattern; + if ( format.length > 1 ) precision = parseInt( format.slice(1), 10 ); + + var current = format.charAt( 0 ).toUpperCase(), + formatInfo; + + switch ( current ) { + case "D": + pattern = "n"; + number = truncate( number ); + if ( precision !== -1 ) { + number = zeroPad( "" + number, precision, true ); + } + if ( value < 0 ) number = "-" + number; + break; + case "N": + formatInfo = nf; + /* falls through */ + case "C": + formatInfo = formatInfo || nf.currency; + /* falls through */ + case "P": + formatInfo = formatInfo || nf.percent; + pattern = value < 0 ? formatInfo.pattern[ 0 ] : ( formatInfo.pattern[1] || "n" ); + if ( precision === -1 ) precision = formatInfo.decimals; + number = expandNumber( number * (current === "P" ? 100 : 1), precision, formatInfo ); + break; + default: + throw "Bad number format specifier: " + current; + } + + var patternParts = /n|\$|-|%/g, + ret = ""; + for ( ; ; ) { + var index = patternParts.lastIndex, + ar = patternParts.exec( pattern ); + + ret += pattern.slice( index, ar ? ar.index : pattern.length ); + + if ( !ar ) { + break; + } + + switch ( ar[0] ) { + case "n": + ret += number; + break; + case "$": + ret += nf.currency.symbol; + break; + case "-": + // don't make 0 negative + if ( /[1-9]/.test(number) ) { + ret += nf[ "-" ]; + } + break; + case "%": + ret += nf.percent.symbol; + break; + } + } + + return ret; + }; + +}()); + +getTokenRegExp = function() { + // regular expression for matching date and time tokens in format strings. + return (/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g); +}; + +getEra = function( date, eras ) { + if ( !eras ) return 0; + var start, ticks = date.getTime(); + for ( var i = 0, l = eras.length; i < l; i++ ) { + start = eras[ i ].start; + if ( start === null || ticks >= start ) { + return i; + } + } + return 0; +}; + +getEraYear = function( date, cal, era, sortable ) { + var year = date.getFullYear(); + if ( !sortable && cal.eras ) { + // convert normal gregorian year to era-shifted gregorian + // year by subtracting the era offset + year -= cal.eras[ era ].offset; + } + return year; +}; + +// parseExact +(function() { + var expandYear, + getDayIndex, + getMonthIndex, + getParseRegExp, + outOfRange, + toUpper, + toUpperArray; + + expandYear = function( cal, year ) { + // expands 2-digit year into 4 digits. + if ( year < 100 ) { + var now = new Date(), + era = getEra( now ), + curr = getEraYear( now, cal, era ), + twoDigitYearMax = cal.twoDigitYearMax; + twoDigitYearMax = typeof twoDigitYearMax === "string" ? new Date().getFullYear() % 100 + parseInt( twoDigitYearMax, 10 ) : twoDigitYearMax; + year += curr - ( curr % 100 ); + if ( year > twoDigitYearMax ) { + year -= 100; + } + } + return year; + }; + + getDayIndex = function ( cal, value, abbr ) { + var ret, + days = cal.days, + upperDays = cal._upperDays; + if ( !upperDays ) { + cal._upperDays = upperDays = [ + toUpperArray( days.names ), + toUpperArray( days.namesAbbr ), + toUpperArray( days.namesShort ) + ]; + } + value = toUpper( value ); + if ( abbr ) { + ret = arrayIndexOf( upperDays[1], value ); + if ( ret === -1 ) { + ret = arrayIndexOf( upperDays[2], value ); + } + } + else { + ret = arrayIndexOf( upperDays[0], value ); + } + return ret; + }; + + getMonthIndex = function( cal, value, abbr ) { + var months = cal.months, + monthsGen = cal.monthsGenitive || cal.months, + upperMonths = cal._upperMonths, + upperMonthsGen = cal._upperMonthsGen; + if ( !upperMonths ) { + cal._upperMonths = upperMonths = [ + toUpperArray( months.names ), + toUpperArray( months.namesAbbr ) + ]; + cal._upperMonthsGen = upperMonthsGen = [ + toUpperArray( monthsGen.names ), + toUpperArray( monthsGen.namesAbbr ) + ]; + } + value = toUpper( value ); + var i = arrayIndexOf( abbr ? upperMonths[1] : upperMonths[0], value ); + if ( i < 0 ) { + i = arrayIndexOf( abbr ? upperMonthsGen[1] : upperMonthsGen[0], value ); + } + return i; + }; + + getParseRegExp = function( cal, format ) { + // converts a format string into a regular expression with groups that + // can be used to extract date fields from a date string. + // check for a cached parse regex. + var re = cal._parseRegExp; + if ( !re ) { + cal._parseRegExp = re = {}; + } + else { + var reFormat = re[ format ]; + if ( reFormat ) { + return reFormat; + } + } + + // expand single digit formats, then escape regular expression characters. + var expFormat = expandFormat( cal, format ).replace( /([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g, "\\\\$1" ), + regexp = [ "^" ], + groups = [], + index = 0, + quoteCount = 0, + tokenRegExp = getTokenRegExp(), + match; + + // iterate through each date token found. + while ( (match = tokenRegExp.exec(expFormat)) !== null ) { + var preMatch = expFormat.slice( index, match.index ); + index = tokenRegExp.lastIndex; + + // don't replace any matches that occur inside a string literal. + quoteCount += appendPreOrPostMatch( preMatch, regexp ); + if ( quoteCount % 2 ) { + regexp.push( match[0] ); + continue; + } + + // add a regex group for the token. + var m = match[ 0 ], + len = m.length, + add; + switch ( m ) { + case "dddd": case "ddd": + case "MMMM": case "MMM": + case "gg": case "g": + add = "(\\D+)"; + break; + case "tt": case "t": + add = "(\\D*)"; + break; + case "yyyy": + case "fff": + case "ff": + case "f": + add = "(\\d{" + len + "})"; + break; + case "dd": case "d": + case "MM": case "M": + case "yy": case "y": + case "HH": case "H": + case "hh": case "h": + case "mm": case "m": + case "ss": case "s": + add = "(\\d\\d?)"; + break; + case "zzz": + add = "([+-]?\\d\\d?:\\d{2})"; + break; + case "zz": case "z": + add = "([+-]?\\d\\d?)"; + break; + case "/": + add = "(\\/)"; + break; + default: + throw "Invalid date format pattern \'" + m + "\'."; + } + if ( add ) { + regexp.push( add ); + } + groups.push( match[0] ); + } + appendPreOrPostMatch( expFormat.slice(index), regexp ); + regexp.push( "$" ); + + // allow whitespace to differ when matching formats. + var regexpStr = regexp.join( "" ).replace( /\s+/g, "\\s+" ), + parseRegExp = { "regExp": regexpStr, "groups": groups }; + + // cache the regex for this format. + return re[ format ] = parseRegExp; + }; + + outOfRange = function( value, low, high ) { + return value < low || value > high; + }; + + toUpper = function( value ) { + // "he-IL" has non-breaking space in weekday names. + return value.split( "\u00A0" ).join( " " ).toUpperCase(); + }; + + toUpperArray = function( arr ) { + var results = []; + for ( var i = 0, l = arr.length; i < l; i++ ) { + results[ i ] = toUpper( arr[i] ); + } + return results; + }; + + parseExact = function( value, format, culture ) { + // try to parse the date string by matching against the format string + // while using the specified culture for date field names. + value = trim( value ); + var cal = culture.calendar, + // convert date formats into regular expressions with groupings. + // use the regexp to determine the input format and extract the date fields. + parseInfo = getParseRegExp( cal, format ), + match = new RegExp( parseInfo.regExp ).exec( value ); + if ( match === null ) { + return null; + } + // found a date format that matches the input. + var groups = parseInfo.groups, + era = null, year = null, month = null, date = null, weekDay = null, + hour = 0, hourOffset, min = 0, sec = 0, msec = 0, tzMinOffset = null, + pmHour = false; + // iterate the format groups to extract and set the date fields. + for ( var j = 0, jl = groups.length; j < jl; j++ ) { + var matchGroup = match[ j + 1 ]; + if ( matchGroup ) { + var current = groups[ j ], + clength = current.length, + matchInt = parseInt( matchGroup, 10 ); + switch ( current ) { + case "dd": case "d": + // Day of month. + date = matchInt; + // check that date is generally in valid range, also checking overflow below. + if ( outOfRange(date, 1, 31) ) return null; + break; + case "MMM": case "MMMM": + month = getMonthIndex( cal, matchGroup, clength === 3 ); + if ( outOfRange(month, 0, 11) ) return null; + break; + case "M": case "MM": + // Month. + month = matchInt - 1; + if ( outOfRange(month, 0, 11) ) return null; + break; + case "y": case "yy": + case "yyyy": + year = clength < 4 ? expandYear( cal, matchInt ) : matchInt; + if ( outOfRange(year, 0, 9999) ) return null; + break; + case "h": case "hh": + // Hours (12-hour clock). + hour = matchInt; + if ( hour === 12 ) hour = 0; + if ( outOfRange(hour, 0, 11) ) return null; + break; + case "H": case "HH": + // Hours (24-hour clock). + hour = matchInt; + if ( outOfRange(hour, 0, 23) ) return null; + break; + case "m": case "mm": + // Minutes. + min = matchInt; + if ( outOfRange(min, 0, 59) ) return null; + break; + case "s": case "ss": + // Seconds. + sec = matchInt; + if ( outOfRange(sec, 0, 59) ) return null; + break; + case "tt": case "t": + // AM/PM designator. + // see if it is standard, upper, or lower case PM. If not, ensure it is at least one of + // the AM tokens. If not, fail the parse for this format. + pmHour = cal.PM && ( matchGroup === cal.PM[0] || matchGroup === cal.PM[1] || matchGroup === cal.PM[2] ); + if ( + !pmHour && ( + !cal.AM || ( matchGroup !== cal.AM[0] && matchGroup !== cal.AM[1] && matchGroup !== cal.AM[2] ) + ) + ) return null; + break; + case "f": + // Deciseconds. + case "ff": + // Centiseconds. + case "fff": + // Milliseconds. + msec = matchInt * Math.pow( 10, 3 - clength ); + if ( outOfRange(msec, 0, 999) ) return null; + break; + case "ddd": + // Day of week. + case "dddd": + // Day of week. + weekDay = getDayIndex( cal, matchGroup, clength === 3 ); + if ( outOfRange(weekDay, 0, 6) ) return null; + break; + case "zzz": + // Time zone offset in +/- hours:min. + var offsets = matchGroup.split( /:/ ); + if ( offsets.length !== 2 ) return null; + hourOffset = parseInt( offsets[0], 10 ); + if ( outOfRange(hourOffset, -12, 13) ) return null; + var minOffset = parseInt( offsets[1], 10 ); + if ( outOfRange(minOffset, 0, 59) ) return null; + tzMinOffset = ( hourOffset * 60 ) + ( startsWith(matchGroup, "-") ? -minOffset : minOffset ); + break; + case "z": case "zz": + // Time zone offset in +/- hours. + hourOffset = matchInt; + if ( outOfRange(hourOffset, -12, 13) ) return null; + tzMinOffset = hourOffset * 60; + break; + case "g": case "gg": + var eraName = matchGroup; + if ( !eraName || !cal.eras ) return null; + eraName = trim( eraName.toLowerCase() ); + for ( var i = 0, l = cal.eras.length; i < l; i++ ) { + if ( eraName === cal.eras[i].name.toLowerCase() ) { + era = i; + break; + } + } + // could not find an era with that name + if ( era === null ) return null; + break; + } + } + } + var result = new Date(), defaultYear, convert = cal.convert; + defaultYear = convert ? convert.fromGregorian( result )[ 0 ] : result.getFullYear(); + if ( year === null ) { + year = defaultYear; + } + else if ( cal.eras ) { + // year must be shifted to normal gregorian year + // but not if year was not specified, its already normal gregorian + // per the main if clause above. + year += cal.eras[( era || 0 )].offset; + } + // set default day and month to 1 and January, so if unspecified, these are the defaults + // instead of the current day/month. + if ( month === null ) { + month = 0; + } + if ( date === null ) { + date = 1; + } + // now have year, month, and date, but in the culture's calendar. + // convert to gregorian if necessary + if ( convert ) { + result = convert.toGregorian( year, month, date ); + // conversion failed, must be an invalid match + if ( result === null ) return null; + } + else { + // have to set year, month and date together to avoid overflow based on current date. + result.setFullYear( year, month, date ); + // check to see if date overflowed for specified month (only checked 1-31 above). + if ( result.getDate() !== date ) return null; + // invalid day of week. + if ( weekDay !== null && result.getDay() !== weekDay ) { + return null; + } + } + // if pm designator token was found make sure the hours fit the 24-hour clock. + if ( pmHour && hour < 12 ) { + hour += 12; + } + result.setHours( hour, min, sec, msec ); + if ( tzMinOffset !== null ) { + // adjust timezone to utc before applying local offset. + var adjustedMin = result.getMinutes() - ( tzMinOffset + result.getTimezoneOffset() ); + // Safari limits hours and minutes to the range of -127 to 127. We need to use setHours + // to ensure both these fields will not exceed this range. adjustedMin will range + // somewhere between -1440 and 1500, so we only need to split this into hours. + result.setHours( result.getHours() + parseInt(adjustedMin / 60, 10), adjustedMin % 60 ); + } + return result; + }; +}()); + +parseNegativePattern = function( value, nf, negativePattern ) { + var neg = nf[ "-" ], + pos = nf[ "+" ], + ret; + switch ( negativePattern ) { + case "n -": + neg = " " + neg; + pos = " " + pos; + /* falls through */ + case "n-": + if ( endsWith(value, neg) ) { + ret = [ "-", value.substr(0, value.length - neg.length) ]; + } + else if ( endsWith(value, pos) ) { + ret = [ "+", value.substr(0, value.length - pos.length) ]; + } + break; + case "- n": + neg += " "; + pos += " "; + /* falls through */ + case "-n": + if ( startsWith(value, neg) ) { + ret = [ "-", value.substr(neg.length) ]; + } + else if ( startsWith(value, pos) ) { + ret = [ "+", value.substr(pos.length) ]; + } + break; + case "(n)": + if ( startsWith(value, "(") && endsWith(value, ")") ) { + ret = [ "-", value.substr(1, value.length - 2) ]; + } + break; + } + return ret || [ "", value ]; +}; + +// +// public instance functions +// + +Globalize.prototype.findClosestCulture = function( cultureSelector ) { + return Globalize.findClosestCulture.call( this, cultureSelector ); +}; + +Globalize.prototype.format = function( value, format, cultureSelector ) { + return Globalize.format.call( this, value, format, cultureSelector ); +}; + +Globalize.prototype.localize = function( key, cultureSelector ) { + return Globalize.localize.call( this, key, cultureSelector ); +}; + +Globalize.prototype.parseInt = function( value, radix, cultureSelector ) { + return Globalize.parseInt.call( this, value, radix, cultureSelector ); +}; + +Globalize.prototype.parseFloat = function( value, radix, cultureSelector ) { + return Globalize.parseFloat.call( this, value, radix, cultureSelector ); +}; + +Globalize.prototype.culture = function( cultureSelector ) { + return Globalize.culture.call( this, cultureSelector ); +}; + +// +// public singleton functions +// + +Globalize.addCultureInfo = function( cultureName, baseCultureName, info ) { + + var base = {}, + isNew = false; + + if ( typeof cultureName !== "string" ) { + // cultureName argument is optional string. If not specified, assume info is first + // and only argument. Specified info deep-extends current culture. + info = cultureName; + cultureName = this.culture().name; + base = this.cultures[ cultureName ]; + } else if ( typeof baseCultureName !== "string" ) { + // baseCultureName argument is optional string. If not specified, assume info is second + // argument. Specified info deep-extends specified culture. + // If specified culture does not exist, create by deep-extending default + info = baseCultureName; + isNew = ( this.cultures[ cultureName ] == null ); + base = this.cultures[ cultureName ] || this.cultures[ "default" ]; + } else { + // cultureName and baseCultureName specified. Assume a new culture is being created + // by deep-extending an specified base culture + isNew = true; + base = this.cultures[ baseCultureName ]; + } + + this.cultures[ cultureName ] = extend(true, {}, + base, + info + ); + // Make the standard calendar the current culture if it's a new culture + if ( isNew ) { + this.cultures[ cultureName ].calendar = this.cultures[ cultureName ].calendars.standard; + } +}; + +Globalize.findClosestCulture = function( name ) { + var match; + if ( !name ) { + return this.findClosestCulture( this.cultureSelector ) || this.cultures[ "default" ]; + } + if ( typeof name === "string" ) { + name = name.split( "," ); + } + if ( isArray(name) ) { + var lang, + cultures = this.cultures, + list = name, + i, l = list.length, + prioritized = []; + for ( i = 0; i < l; i++ ) { + name = trim( list[i] ); + var pri, parts = name.split( ";" ); + lang = trim( parts[0] ); + if ( parts.length === 1 ) { + pri = 1; + } + else { + name = trim( parts[1] ); + if ( name.indexOf("q=") === 0 ) { + name = name.substr( 2 ); + pri = parseFloat( name ); + pri = isNaN( pri ) ? 0 : pri; + } + else { + pri = 1; + } + } + prioritized.push({ lang: lang, pri: pri }); + } + prioritized.sort(function( a, b ) { + if ( a.pri < b.pri ) { + return 1; + } else if ( a.pri > b.pri ) { + return -1; + } + return 0; + }); + // exact match + for ( i = 0; i < l; i++ ) { + lang = prioritized[ i ].lang; + match = cultures[ lang ]; + if ( match ) { + return match; + } + } + + // neutral language match + for ( i = 0; i < l; i++ ) { + lang = prioritized[ i ].lang; + do { + var index = lang.lastIndexOf( "-" ); + if ( index === -1 ) { + break; + } + // strip off the last part. e.g. en-US => en + lang = lang.substr( 0, index ); + match = cultures[ lang ]; + if ( match ) { + return match; + } + } + while ( 1 ); + } + + // last resort: match first culture using that language + for ( i = 0; i < l; i++ ) { + lang = prioritized[ i ].lang; + for ( var cultureKey in cultures ) { + var culture = cultures[ cultureKey ]; + if ( culture.language == lang ) { + return culture; + } + } + } + } + else if ( typeof name === "object" ) { + return name; + } + return match || null; +}; + +Globalize.format = function( value, format, cultureSelector ) { + var culture = this.findClosestCulture( cultureSelector ); + if ( value instanceof Date ) { + value = formatDate( value, format, culture ); + } + else if ( typeof value === "number" ) { + value = formatNumber( value, format, culture ); + } + return value; +}; + +Globalize.localize = function( key, cultureSelector ) { + return this.findClosestCulture( cultureSelector ).messages[ key ] || + this.cultures[ "default" ].messages[ key ]; +}; + +Globalize.parseDate = function( value, formats, culture ) { + culture = this.findClosestCulture( culture ); + + var date, prop, patterns; + if ( formats ) { + if ( typeof formats === "string" ) { + formats = [ formats ]; + } + if ( formats.length ) { + for ( var i = 0, l = formats.length; i < l; i++ ) { + var format = formats[ i ]; + if ( format ) { + date = parseExact( value, format, culture ); + if ( date ) { + break; + } + } + } + } + } else { + patterns = culture.calendar.patterns; + for ( prop in patterns ) { + date = parseExact( value, patterns[prop], culture ); + if ( date ) { + break; + } + } + } + + return date || null; +}; + +Globalize.parseInt = function( value, radix, cultureSelector ) { + return truncate( Globalize.parseFloat(value, radix, cultureSelector) ); +}; + +Globalize.parseFloat = function( value, radix, cultureSelector ) { + // radix argument is optional + if ( typeof radix !== "number" ) { + cultureSelector = radix; + radix = 10; + } + + var culture = this.findClosestCulture( cultureSelector ); + var ret = NaN, + nf = culture.numberFormat; + + if ( value.indexOf(culture.numberFormat.currency.symbol) > -1 ) { + // remove currency symbol + value = value.replace( culture.numberFormat.currency.symbol, "" ); + // replace decimal seperator + value = value.replace( culture.numberFormat.currency["."], culture.numberFormat["."] ); + } + + //Remove percentage character from number string before parsing + if ( value.indexOf(culture.numberFormat.percent.symbol) > -1){ + value = value.replace( culture.numberFormat.percent.symbol, "" ); + } + + // remove spaces: leading, trailing and between - and number. Used for negative currency pt-BR + value = value.replace( / /g, "" ); + + // allow infinity or hexidecimal + if ( regexInfinity.test(value) ) { + ret = parseFloat( value ); + } + else if ( !radix && regexHex.test(value) ) { + ret = parseInt( value, 16 ); + } + else { + + // determine sign and number + var signInfo = parseNegativePattern( value, nf, nf.pattern[0] ), + sign = signInfo[ 0 ], + num = signInfo[ 1 ]; + + // #44 - try parsing as "(n)" + if ( sign === "" && nf.pattern[0] !== "(n)" ) { + signInfo = parseNegativePattern( value, nf, "(n)" ); + sign = signInfo[ 0 ]; + num = signInfo[ 1 ]; + } + + // try parsing as "-n" + if ( sign === "" && nf.pattern[0] !== "-n" ) { + signInfo = parseNegativePattern( value, nf, "-n" ); + sign = signInfo[ 0 ]; + num = signInfo[ 1 ]; + } + + sign = sign || "+"; + + // determine exponent and number + var exponent, + intAndFraction, + exponentPos = num.indexOf( "e" ); + if ( exponentPos < 0 ) exponentPos = num.indexOf( "E" ); + if ( exponentPos < 0 ) { + intAndFraction = num; + exponent = null; + } + else { + intAndFraction = num.substr( 0, exponentPos ); + exponent = num.substr( exponentPos + 1 ); + } + // determine decimal position + var integer, + fraction, + decSep = nf[ "." ], + decimalPos = intAndFraction.indexOf( decSep ); + if ( decimalPos < 0 ) { + integer = intAndFraction; + fraction = null; + } + else { + integer = intAndFraction.substr( 0, decimalPos ); + fraction = intAndFraction.substr( decimalPos + decSep.length ); + } + // handle groups (e.g. 1,000,000) + var groupSep = nf[ "," ]; + integer = integer.split( groupSep ).join( "" ); + var altGroupSep = groupSep.replace( /\u00A0/g, " " ); + if ( groupSep !== altGroupSep ) { + integer = integer.split( altGroupSep ).join( "" ); + } + // build a natively parsable number string + var p = sign + integer; + if ( fraction !== null ) { + p += "." + fraction; + } + if ( exponent !== null ) { + // exponent itself may have a number patternd + var expSignInfo = parseNegativePattern( exponent, nf, "-n" ); + p += "e" + ( expSignInfo[0] || "+" ) + expSignInfo[ 1 ]; + } + if ( regexParseFloat.test(p) ) { + ret = parseFloat( p ); + } + } + return ret; +}; + +Globalize.culture = function( cultureSelector ) { + // setter + if ( typeof cultureSelector !== "undefined" ) { + this.cultureSelector = cultureSelector; + } + // getter + return this.findClosestCulture( cultureSelector ) || this.cultures[ "default" ]; +}; + +document.Globalize = Globalize; +}(this)); \ No newline at end of file diff -r 6cabc02f4c8d -r 825210ba2707 www/jqwidgets/jqx-all.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/jqwidgets/jqx-all.js Sat Apr 13 16:50:26 2024 +0200 @@ -0,0 +1,202 @@ +/* +jQWidgets v12.0.1 (2021-Mar) +Copyright (c) 2011-2021 jQWidgets. +License: https://jqwidgets.com/license/ +*/ +/* eslint-disable */ + +var oldBrowser=document.all&&!document.addEventListener;if(!oldBrowser){(function(bd,G){var q,an,ak=bd.document,bo=bd.location,bt=bd.navigator,ax=bd.JQXLite,X=bd.$,aR=Array.prototype.push,aD=Array.prototype.slice,aA=Array.prototype.indexOf,y=Object.prototype.toString,b=Object.prototype.hasOwnProperty,aw=String.prototype.trim,C=function(bu,bv){return new C.fn.init(bu,bv,q)},aE=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,at=/\S/,a8=/\s+/,S=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,aF=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,e=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,j=/^[\],:{}\s]*$/,t=/(?:^|:|,)(?:\s*\[)+/g,a5=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,K=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,au=/^-ms-/,aS=/-([\da-z])/gi,m=function(bu,bv){return(bv+"").toUpperCase()},a4=function(){if(ak.addEventListener){ak.removeEventListener("DOMContentLoaded",a4,false);C.ready()}else{if(ak.readyState==="complete"){ak.detachEvent("onreadystatechange",a4);C.ready()}}},a0={};C.fn=C.prototype={constructor:C,init:function(bu,bx,by){var bw,bz,bv,bA;if(!bu){return this}if(bu.nodeType){this.context=this[0]=bu;this.length=1;return this}if(typeof bu==="string"){if(bu.charAt(0)==="<"&&bu.charAt(bu.length-1)===">"&&bu.length>=3){bw=[null,bu,null]}else{bw=aF.exec(bu)}if(bw&&(bw[1]||!bx)){if(bw[1]){bx=bx instanceof C?bx[0]:bx;bA=(bx&&bx.nodeType?bx.ownerDocument||bx:ak);bu=C.parseHTML(bw[1],bA,true);if(e.test(bw[1])&&C.isPlainObject(bx)){this.attr.call(bu,bx,true)}return C.merge(this,bu)}else{bz=ak.getElementById(bw[2]);if(bz&&bz.parentNode){if(bz.id!==bw[2]){return by.find(bu)}this.length=1;this[0]=bz}this.context=ak;this.selector=bu;return this}}else{if(!bx||bx.jqx){return(bx||by).find(bu)}else{return this.constructor(bx).find(bu)}}}else{if(C.isFunction(bu)){return by.ready(bu)}}if(bu.selector!==G){this.selector=bu.selector;this.context=bu.context}return C.makeArray(bu,this)},selector:"",jqx:"4.5.0",length:0,size:function(){return this.length},toArray:function(){return aD.call(this)},get:function(bu){return bu==null?this.toArray():(bu<0?this[this.length+bu]:this[bu])},pushStack:function(bv,bx,bu){var bw=C.merge(this.constructor(),bv);bw.prevObject=this;bw.context=this.context;if(bx==="find"){bw.selector=this.selector+(this.selector?" ":"")+bu}else{if(bx){bw.selector=this.selector+"."+bx+"("+bu+")"}}return bw},each:function(bv,bu){return C.each(this,bv,bu)},ready:function(bu){C.ready.promise().done(bu);return this},eq:function(bu){bu=+bu;return bu===-1?this.slice(bu):this.slice(bu,bu+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(aD.apply(this,arguments),"slice",aD.call(arguments).join(","))},map:function(bu){return this.pushStack(C.map(this,function(bw,bv){return bu.call(bw,bv,bw)}))},end:function(){return this.prevObject||this.constructor(null)},push:aR,sort:[].sort,splice:[].splice};C.fn.init.prototype=C.fn;C.extend=C.fn.extend=function(){var bD,bw,bu,bv,bA,bB,bz=arguments[0]||{},by=1,bx=arguments.length,bC=false;if(typeof bz==="boolean"){bC=bz;bz=arguments[1]||{};by=2}if(typeof bz!=="object"&&!C.isFunction(bz)){bz={}}if(bx===by){bz=this;--by}for(;by0){return}an.resolveWith(ak,[C]);if(C.fn.trigger){C(ak).trigger("ready").off("ready")}},isFunction:function(bu){return C.type(bu)==="function"},isArray:Array.isArray||function(bu){return C.type(bu)==="array"},isWindow:function(bu){return bu!=null&&bu==bu.window},isNumeric:function(bu){return !isNaN(parseFloat(bu))&&isFinite(bu)},type:function(bu){return bu==null?String(bu):a0[y.call(bu)]||"object"},isPlainObject:function(bw){if(!bw||C.type(bw)!=="object"||bw.nodeType||C.isWindow(bw)){return false}try{if(bw.constructor&&!b.call(bw,"constructor")&&!b.call(bw.constructor.prototype,"isPrototypeOf")){return false}}catch(bv){return false}var bu;for(bu in bw){}return bu===G||b.call(bw,bu)},isEmptyObject:function(bv){var bu;for(bu in bv){return false}return true},error:function(bu){throw new Error(bu)},parseHTML:function(bx,bw,bu){var bv;if(!bx||typeof bx!=="string"){return null}if(typeof bw==="boolean"){bu=bw;bw=0}bw=bw||ak;if((bv=e.exec(bx))){return[bw.createElement(bv[1])]}bv=C.buildFragment([bx],bw,bu?null:[]);return C.merge([],(bv.cacheable?C.clone(bv.fragment):bv.fragment).childNodes)},parseJSON:function(bu){if(!bu||typeof bu!=="string"){return null}bu=C.trim(bu);if(bd.JSON&&bd.JSON.parse){return bd.JSON.parse(bu)}if(j.test(bu.replace(a5,"@").replace(K,"]").replace(t,""))){return(new Function("return "+bu))()}C.error("Invalid JSON: "+bu)},parseXML:function(bw){var bu,bv;if(!bw||typeof bw!=="string"){return null}try{if(bd.DOMParser){bv=new DOMParser();bu=bv.parseFromString(bw,"text/xml")}else{bu=new ActiveXObject("Microsoft.XMLDOM");bu.async="false";bu.loadXML(bw)}}catch(bx){bu=G}if(!bu||!bu.documentElement||bu.getElementsByTagName("parsererror").length){C.error("Invalid XML: "+bw)}return bu},noop:function(){},globalEval:function(bu){if(bu&&at.test(bu)){(bd.execScript||function(bv){bd["eval"].call(bd,bv)})(bu)}},camelCase:function(bu){return bu.replace(au,"ms-").replace(aS,m)},nodeName:function(bv,bu){return bv.nodeName&&bv.nodeName.toLowerCase()===bu.toLowerCase()},each:function(bz,bA,bw){var bv,bx=0,by=bz.length,bu=by===G||C.isFunction(bz);if(bw){if(bu){for(bv in bz){if(bA.apply(bz[bv],bw)===false){break}}}else{for(;bx0&&bu[0]&&bu[bv-1])||bv===0||C.isArray(bu));if(bx){for(;bw-1){bB.splice(bG,1);if(by){if(bG<=bz){bz--}if(bG<=bA){bA--}}}})}return this},has:function(bF){return C.inArray(bF,bB)>-1},empty:function(){bB=[];return this},disable:function(){bB=bC=bx=G;return this},disabled:function(){return !bB},lock:function(){bC=G;if(!bx){bD.disable()}return this},locked:function(){return !bC},fireWith:function(bG,bF){bF=bF||[];bF=[bG,bF.slice?bF.slice():bF];if(bB&&(!bu||bC)){if(by){bC.push(bF)}else{bv(bF)}}return this},fire:function(){bD.fireWith(this,arguments);return this},fired:function(){return !!bu}};return bD};C.extend({Deferred:function(bw){var bv=[["resolve","done",C.Callbacks("once memory"),"resolved"],["reject","fail",C.Callbacks("once memory"),"rejected"],["notify","progress",C.Callbacks("memory")]],bx="pending",by={state:function(){return bx},always:function(){bu.done(arguments).fail(arguments);return this},then:function(){var bz=arguments;return C.Deferred(function(bA){C.each(bv,function(bC,bB){var bE=bB[0],bD=bz[bC];bu[bB[1]](C.isFunction(bD)?function(){var bF=bD.apply(this,arguments);if(bF&&C.isFunction(bF.promise)){bF.promise().done(bA.resolve).fail(bA.reject).progress(bA.notify)}else{bA[bE+"With"](this===bu?bA:this,[bF])}}:bA[bE])});bz=null}).promise()},promise:function(bz){return bz!=null?C.extend(bz,by):by}},bu={};by.pipe=by.then;C.each(bv,function(bA,bz){var bC=bz[2],bB=bz[3];by[bz[1]]=bC.add;if(bB){bC.add(function(){bx=bB},bv[bA^1][2].disable,bv[2][2].lock)}bu[bz[0]]=bC.fire;bu[bz[0]+"With"]=bC.fireWith});by.promise(bu);if(bw){bw.call(bu,bu)}return bu},when:function(by){var bw=0,bA=aD.call(arguments),bu=bA.length,bv=bu!==1||(by&&C.isFunction(by.promise))?bu:0,bD=bv===1?by:C.Deferred(),bx=function(bF,bG,bE){return function(bH){bG[bF]=this;bE[bF]=arguments.length>1?aD.call(arguments):bH;if(bE===bC){bD.notifyWith(bG,bE)}else{if(!(--bv)){bD.resolveWith(bG,bE)}}}},bC,bz,bB;if(bu>1){bC=new Array(bu);bz=new Array(bu);bB=new Array(bu);for(;bw
a";bF=bv.getElementsByTagName("*");bD=bv.getElementsByTagName("a")[0];if(!bF||!bD||!bF.length){return{}}bE=ak.createElement("select");bx=bE.appendChild(ak.createElement("option"));bC=bv.getElementsByTagName("input")[0];bD.style.cssText="top:1px;float:left;opacity:.5";bG={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bD.getAttribute("style")),hrefNormalized:(bD.getAttribute("href")==="/a"),opacity:/^0.5/.test(bD.style.opacity),cssFloat:!!bD.style.cssFloat,checkOn:(bC.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!ak.createElement("form").enctype,html5Clone:ak.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",boxModel:(ak.compatMode==="CSS1Compat"),submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true,boxSizingReliable:true,pixelPosition:false};bC.checked=true;bG.noCloneChecked=bC.cloneNode(true).checked;bE.disabled=true;bG.optDisabled=!bx.disabled;try{delete bv.test}catch(bA){bG.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",bu=function(){bG.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick");bv.detachEvent("onclick",bu)}bC=ak.createElement("input");bC.value="t";bC.setAttribute("type","radio");bG.radioValue=bC.value==="t";bC.setAttribute("checked","checked");bC.setAttribute("name","t");bv.appendChild(bC);bB=ak.createDocumentFragment();bB.appendChild(bv.lastChild);bG.checkClone=bB.cloneNode(true).cloneNode(true).lastChild.checked;bG.appendChecked=bC.checked;bB.removeChild(bC);bB.appendChild(bv);if(bv.attachEvent){for(by in {submit:true,change:true,focusin:true}){bz="on"+by;bw=(bz in bv);if(!bw){bv.setAttribute(bz,"return;");bw=(typeof bv[bz]==="function")}bG[by+"Bubbles"]=bw}}C(function(){var bI,bM,bK,bL,bJ="padding:0;margin:0;border:0;display:block;overflow:hidden;",bH=ak.getElementsByTagName("body")[0];if(!bH){return}bI=ak.createElement("div");bI.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px";bH.insertBefore(bI,bH.firstChild);bM=ak.createElement("div");bI.appendChild(bM);bM.innerHTML="
t
";bK=bM.getElementsByTagName("td");bK[0].style.cssText="padding:0;margin:0;border:0;display:none";bw=(bK[0].offsetHeight===0);bK[0].style.display="";bK[1].style.display="none";bG.reliableHiddenOffsets=bw&&(bK[0].offsetHeight===0);bM.innerHTML="";bM.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";bG.boxSizing=(bM.offsetWidth===4);bG.doesNotIncludeMarginInBodyOffset=(bH.offsetTop!==1);if(bd.getComputedStyle){bG.pixelPosition=(bd.getComputedStyle(bM,null)||{}).top!=="1%";bG.boxSizingReliable=(bd.getComputedStyle(bM,null)||{width:"4px"}).width==="4px";bL=ak.createElement("div");bL.style.cssText=bM.style.cssText=bJ;bL.style.marginRight=bL.style.width="0";bM.style.width="1px";bM.appendChild(bL);bG.reliableMarginRight=!parseFloat((bd.getComputedStyle(bL,null)||{}).marginRight)}if(typeof bM.style.zoom!=="undefined"){bM.innerHTML="";bM.style.cssText=bJ+"width:1px;padding:1px;display:inline;zoom:1";bG.inlineBlockNeedsLayout=(bM.offsetWidth===3);bM.style.display="block";bM.style.overflow="visible";bM.innerHTML="
";bM.firstChild.style.width="5px";bG.shrinkWrapBlocks=(bM.offsetWidth!==3);bI.style.zoom=1}bH.removeChild(bI);bI=bM=bK=bL=null});bB.removeChild(bv);bF=bD=bE=bx=bC=bB=bv=null;return bG})();var aK=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,aq=/([A-Z])/g;C.extend({cache:{},deletedIds:[],uuid:0,expando:"JQXLite"+(C.fn.jqx+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(bu){bu=bu.nodeType?C.cache[bu[C.expando]]:bu[C.expando];return !!bu&&!M(bu)},data:function(bx,bv,bz,by){if(!C.acceptData(bx)){return}var bA,bC,bD=C.expando,bB=typeof bv==="string",bE=bx.nodeType,bu=bE?C.cache:bx,bw=bE?bx[bD]:bx[bD]&&bD;if((!bw||!bu[bw]||(!by&&!bu[bw].data))&&bB&&bz===G){return}if(!bw){if(bE){bx[bD]=bw=C.deletedIds.pop()||C.guid++}else{bw=bD}}if(!bu[bw]){bu[bw]={};if(!bE){bu[bw].toJSON=C.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){bu[bw]=C.extend(bu[bw],bv)}else{bu[bw].data=C.extend(bu[bw].data,bv)}}bA=bu[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==G){bA[C.camelCase(bv)]=bz}if(bB){bC=bA[bv];if(bC==null){bC=bA[C.camelCase(bv)]}}else{bC=bA}return bC},removeData:function(bx,bv,by){if(!C.acceptData(bx)){return}var bB,bA,bz,bC=bx.nodeType,bu=bC?C.cache:bx,bw=bC?bx[C.expando]:C.expando;if(!bu[bw]){return}if(bv){bB=by?bu[bw]:bu[bw].data;if(bB){if(!C.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=C.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA1,null,false)},removeData:function(bu){return this.each(function(){C.removeData(this,bu)})}});function a9(bw,bv,bx){if(bx===G&&bw.nodeType===1){var bu="data-"+bv.replace(aq,"-$1").toLowerCase();bx=bw.getAttribute(bu);if(typeof bx==="string"){try{bx=bx==="true"?true:bx==="false"?false:bx==="null"?null:+bx+""===bx?+bx:aK.test(bx)?C.parseJSON(bx):bx}catch(by){}C.data(bw,bv,bx)}else{bx=G}}return bx}function M(bv){var bu;for(bu in bv){if(bu==="data"&&C.isEmptyObject(bv[bu])){continue}if(bu!=="toJSON"){return false}}return true}C.extend({queue:function(bw,bv,bx){var bu;if(bw){bv=(bv||"fx")+"queue";bu=C._data(bw,bv);if(bx){if(!bu||C.isArray(bx)){bu=C._data(bw,bv,C.makeArray(bx))}else{bu.push(bx)}}return bu||[]}},dequeue:function(bz,by){by=by||"fx";var bv=C.queue(bz,by),bA=bv.length,bx=bv.shift(),bu=C._queueHooks(bz,by),bw=function(){C.dequeue(bz,by)};if(bx==="inprogress"){bx=bv.shift();bA--}if(bx){if(by==="fx"){bv.unshift("inprogress")}delete bu.stop;bx.call(bz,bw,bu)}if(!bA&&bu){bu.empty.fire()}},_queueHooks:function(bw,bv){var bu=bv+"queueHooks";return C._data(bw,bu)||C._data(bw,bu,{empty:C.Callbacks("once memory").add(function(){C.removeData(bw,bv+"queue",true);C.removeData(bw,bu,true)})})}});C.fn.extend({queue:function(bu,bv){var bw=2;if(typeof bu!=="string"){bv=bu;bu="fx";bw--}if(arguments.length1)},removeAttr:function(bu){return this.each(function(){C.removeAttr(this,bu)})},prop:function(bu,bv){return C.access(this,C.prop,bu,bv,arguments.length>1)},removeProp:function(bu){bu=C.propFix[bu]||bu;return this.each(function(){try{this[bu]=G;delete this[bu]}catch(bv){}})},addClass:function(by){var bA,bw,bv,bx,bz,bB,bu;if(C.isFunction(by)){return this.each(function(bC){C(this).addClass(by.call(this,bC,this.className))})}if(by&&typeof by==="string"){bA=by.split(a8);for(bw=0,bv=this.length;bw=0){by=by.replace(" "+bx[bB]+" "," ")}}bz.className=bA?C.trim(by):""}}}return this},toggleClass:function(bx,bv){var bw=typeof bx,bu=typeof bv==="boolean";if(C.isFunction(bx)){return this.each(function(by){C(this).toggleClass(bx.call(this,by,this.className,bv),bv)})}return this.each(function(){if(bw==="string"){var bA,bz=0,by=C(this),bB=bv,bC=bx.split(a8);while((bA=bC[bz++])){bB=bu?bB:!by.hasClass(bA);by[bB?"addClass":"removeClass"](bA)}}else{if(bw==="undefined"||bw==="boolean"){if(this.className){C._data(this,"__className__",this.className)}this.className=this.className||bx===false?"":C._data(this,"__className__")||""}}})},hasClass:function(bu){var bx=" "+bu+" ",bw=0,bv=this.length;for(;bw=0){return true}}return false},val:function(bx){var bu,bv,by,bw=this[0];if(!arguments.length){if(bw){bu=C.valHooks[bw.type]||C.valHooks[bw.nodeName.toLowerCase()];if(bu&&"get" in bu&&(bv=bu.get(bw,"value"))!==G){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aP,""):bv==null?"":bv}return}by=C.isFunction(bx);return this.each(function(bA){var bB,bz=C(this);if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(C.isArray(bB)){bB=C.map(bB,function(bC){return bC==null?"":bC+""})}}}bu=C.valHooks[this.type]||C.valHooks[this.nodeName.toLowerCase()];if(!bu||!("set" in bu)||bu.set(this,bB,"value")===G){this.value=bB}})}});C.extend({valHooks:{option:{get:function(bu){var bv=bu.attributes.value;return !bv||bv.specified?bu.value:bu.text}},select:{get:function(bu){var bA,bw,bC=bu.options,by=bu.selectedIndex,bx=bu.type==="select-one"||by<0,bB=bx?null:[],bz=bx?by+1:bC.length,bv=by<0?bz:bx?by:0;for(;bv=0});if(!bu.length){bv.selectedIndex=-1}return bu}}},attrFn:{},attr:function(bA,bx,bB,bz){var bw,bu,by,bv=bA.nodeType;if(!bA||bv===3||bv===8||bv===2){return}if(bz&&C.isFunction(C.fn[bx])){return C(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return C.prop(bA,bx,bB)}by=bv!==1||!C.isXMLDoc(bA);if(by){bx=bx.toLowerCase();bu=C.attrHooks[bx]||(ae.test(bx)?aT:bh)}if(bB!==G){if(bB===null){C.removeAttr(bA,bx);return}else{if(bu&&"set" in bu&&by&&(bw=bu.set(bA,bB,bx))!==G){return bw}else{bA.setAttribute(bx,bB+"");return bB}}}else{if(bu&&"get" in bu&&by&&(bw=bu.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?G:bw}}},removeAttr:function(bx,bz){var by,bA,bv,bu,bw=0;if(bz&&bx.nodeType===1){bA=bz.split(a8);for(;bw=0){bG=bG.slice(0,-1);bx=true}if(bG.indexOf(".")>=0){bw=bG.split(".");bG=bw.shift();bw.sort()}if((!bA||C.event.customEvent[bG])&&!C.event.global[bG]){return}bv=typeof bv==="object"?bv[C.expando]?bv:new C.Event(bG,bv):new C.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bx;bv.namespace=bw.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bw.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){bu=C.cache;for(bD in bu){if(bu[bD].events&&bu[bD].events[bG]){C.event.trigger(bv,bC,bu[bD].handle.elem,true)}}return}bv.result=G;if(!bv.target){bv.target=bA}bC=bC!=null?C.makeArray(bC):[];bC.unshift(bv);bF=C.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bC)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!C.isWindow(bA)){bI=bF.delegateType||bG;bH=N.test(bI+bG)?bA:bA.parentNode;for(bz=bA;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz===(bA.ownerDocument||ak)){bB.push([bz.defaultView||bz.parentWindow||bd,bI])}}for(bD=0;bD=0:C.find(bx,this,null,[bK]).length}if(bD[bx]){bC.push(bI)}}if(bC.length){bH.push({elem:bK,matches:bC})}}}}if(by.length>bz){bH.push({elem:this,matches:by.slice(bz)})}for(bB=0;bB0?this.on(bu,null,bx,bw):this.trigger(bu)};if(aH.test(bu)){C.event.fixHooks[bu]=C.event.keyHooks}if(bi.test(bu)){C.event.fixHooks[bu]=C.event.mouseHooks}}); +/*! + * Sizzle CSS Selector Engine + * Copyright 2012 JQXLite Foundation and other contributors + * Released under the MIT license + * http://sizzlejs.com/ + */ +(function(cn,bM){var cs,bF,cg,bv,bR,b5,bI,bL,bH,ce,bE=true,bZ="undefined",cu=("sizcache"+Math.random()).replace(".",""),bz=String,bD=cn.document,bG=bD.documentElement,bW=0,bK=0,b9=[].pop,cr=[].push,bQ=[].slice,bT=[].indexOf||function(cE){var cD=0,cC=this.length;for(;cDcg.cacheLength){delete cC[cD.shift()]}return(cC[cE+" "]=cF)},cC)},cp=cA(),cq=cA(),bS=cA(),b3="[\\x20\\t\\r\\n\\f]",bP="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",bN=bP.replace("w","w#"),cz="([*^$|!~]?=)",ck="\\["+b3+"*("+bP+")"+b3+"*(?:"+cz+b3+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+bN+")|)|)"+b3+"*\\]",cB=":("+bP+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+ck+")|[^:]|\\\\.)*|.*))\\)|)",b4=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+b3+"*((?:-\\d)?\\d*)"+b3+"*\\)|)(?=[^-]|$)",co=new RegExp("^"+b3+"+|((?:^|[^\\\\])(?:\\\\.)*)"+b3+"+$","g"),bA=new RegExp("^"+b3+"*,"+b3+"*"),cc=new RegExp("^"+b3+"*([\\x20\\t\\r\\n\\f>+~])"+b3+"*"),ch=new RegExp(cB),cj=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,b8=/^:not/,cm=/[\x20\t\r\n\f]*[+~]/,cv=/:not\($/,bX=/h\d/i,ci=/input|select|textarea|button/i,bY=/\\(?!\\)/g,cb={ID:new RegExp("^#("+bP+")"),CLASS:new RegExp("^\\.("+bP+")"),NAME:new RegExp("^\\[name=['\"]?("+bP+")['\"]?\\]"),TAG:new RegExp("^("+bP.replace("w","w*")+")"),ATTR:new RegExp("^"+ck),PSEUDO:new RegExp("^"+cB),POS:new RegExp(b4,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+b3+"*(even|odd|(([+-]|)(\\d*)n|)"+b3+"*(?:([+-]|)"+b3+"*(\\d+)|))"+b3+"*\\)|)","i"),needsContext:new RegExp("^"+b3+"*[>+~]|"+b4,"i")},cf=function(cC){var cE=bD.createElement("div");try{return cC(cE)}catch(cD){return false}finally{cE=null}},bC=cf(function(cC){cC.appendChild(bD.createComment(""));return !cC.getElementsByTagName("*").length}),b7=cf(function(cC){cC.innerHTML="";return cC.firstChild&&typeof cC.firstChild.getAttribute!==bZ&&cC.firstChild.getAttribute("href")==="#"}),bV=cf(function(cD){cD.innerHTML="";var cC=typeof cD.lastChild.getAttribute("multiple");return cC!=="boolean"&&cC!=="string"}),b6=cf(function(cC){cC.innerHTML="";if(!cC.getElementsByClassName||!cC.getElementsByClassName("e").length){return false}cC.lastChild.className="e";return cC.getElementsByClassName("e").length===2}),bu=cf(function(cD){cD.id=cu+0;cD.innerHTML="
";bG.insertBefore(cD,bG.firstChild);var cC=bD.getElementsByName&&bD.getElementsByName(cu).length===2+bD.getElementsByName(cu+0).length;bF=!bD.getElementById(cu);bG.removeChild(cD);return cC});try{bQ.call(bG.childNodes,0)[0].nodeType}catch(cy){bQ=function(cD){var cE,cC=[];for(;(cE=this[cD]);cD++){cC.push(cE)}return cC}}function cl(cF,cC,cH,cK){cH=cH||[];cC=cC||bD;var cI,cD,cJ,cE,cG=cC.nodeType;if(!cF||typeof cF!=="string"){return cH}if(cG!==1&&cG!==9){return[]}cJ=bR(cC);if(!cJ&&!cK){if((cI=cj.exec(cF))){if((cE=cI[1])){if(cG===9){cD=cC.getElementById(cE);if(cD&&cD.parentNode){if(cD.id===cE){cH.push(cD);return cH}}else{return cH}}else{if(cC.ownerDocument&&(cD=cC.ownerDocument.getElementById(cE))&&b5(cC,cD)&&cD.id===cE){cH.push(cD);return cH}}}else{if(cI[2]){cr.apply(cH,bQ.call(cC.getElementsByTagName(cF),0));return cH}else{if((cE=cI[3])&&b6&&cC.getElementsByClassName){cr.apply(cH,bQ.call(cC.getElementsByClassName(cE),0));return cH}}}}}return ct(cF.replace(co,"$1"),cC,cH,cK,cJ)}cl.matches=function(cD,cC){return cl(cD,null,null,cC)};cl.matchesSelector=function(cC,cD){return cl(cD,null,null,[cC]).length>0};function cd(cC){return function(cE){var cD=cE.nodeName.toLowerCase();return cD==="input"&&cE.type===cC}}function by(cC){return function(cE){var cD=cE.nodeName.toLowerCase();return(cD==="input"||cD==="button")&&cE.type===cC}}function ca(cC){return cw(function(cD){cD=+cD;return cw(function(cE,cI){var cG,cF=cC([],cE.length,cD),cH=cF.length;while(cH--){if(cE[(cG=cF[cH])]){cE[cG]=!(cI[cG]=cE[cG])}}})})}bv=cl.getText=function(cG){var cF,cD="",cE=0,cC=cG.nodeType;if(cC){if(cC===1||cC===9||cC===11){if(typeof cG.textContent==="string"){return cG.textContent}else{for(cG=cG.firstChild;cG;cG=cG.nextSibling){cD+=bv(cG)}}}else{if(cC===3||cC===4){return cG.nodeValue}}}else{for(;(cF=cG[cE]);cE++){cD+=bv(cF)}}return cD};bR=cl.isXML=function(cC){var cD=cC&&(cC.ownerDocument||cC).documentElement;return cD?cD.nodeName!=="HTML":false};b5=cl.contains=bG.contains?function(cD,cC){var cF=cD.nodeType===9?cD.documentElement:cD,cE=cC&&cC.parentNode;return cD===cE||!!(cE&&cE.nodeType===1&&cF.contains&&cF.contains(cE))}:bG.compareDocumentPosition?function(cD,cC){return cC&&!!(cD.compareDocumentPosition(cC)&16)}:function(cD,cC){while((cC=cC.parentNode)){if(cC===cD){return true}}return false};cl.attr=function(cE,cD){var cF,cC=bR(cE);if(!cC){cD=cD.toLowerCase()}if((cF=cg.attrHandle[cD])){return cF(cE)}if(cC||bV){return cE.getAttribute(cD)}cF=cE.getAttributeNode(cD);return cF?typeof cE[cD]==="boolean"?cE[cD]?cD:null:cF.specified?cF.value:null:null};cg=cl.selectors={cacheLength:50,createPseudo:cw,match:cb,attrHandle:b7?{}:{href:function(cC){return cC.getAttribute("href",2)},type:function(cC){return cC.getAttribute("type")}},find:{ID:bF?function(cF,cE,cD){if(typeof cE.getElementById!==bZ&&!cD){var cC=cE.getElementById(cF);return cC&&cC.parentNode?[cC]:[]}}:function(cF,cE,cD){if(typeof cE.getElementById!==bZ&&!cD){var cC=cE.getElementById(cF);return cC?cC.id===cF||typeof cC.getAttributeNode!==bZ&&cC.getAttributeNode("id").value===cF?[cC]:bM:[]}},TAG:bC?function(cC,cD){if(typeof cD.getElementsByTagName!==bZ){return cD.getElementsByTagName(cC)}}:function(cC,cG){var cF=cG.getElementsByTagName(cC);if(cC==="*"){var cH,cE=[],cD=0;for(;(cH=cF[cD]);cD++){if(cH.nodeType===1){cE.push(cH)}}return cE}return cF},NAME:bu&&function(cC,cD){if(typeof cD.getElementsByName!==bZ){return cD.getElementsByName(name)}},CLASS:b6&&function(cE,cD,cC){if(typeof cD.getElementsByClassName!==bZ&&!cC){return cD.getElementsByClassName(cE)}}},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(cC){cC[1]=cC[1].replace(bY,"");cC[3]=(cC[4]||cC[5]||"").replace(bY,"");if(cC[2]==="~="){cC[3]=" "+cC[3]+" "}return cC.slice(0,4)},CHILD:function(cC){cC[1]=cC[1].toLowerCase();if(cC[1]==="nth"){if(!cC[2]){cl.error(cC[0])}cC[3]=+(cC[3]?cC[4]+(cC[5]||1):2*(cC[2]==="even"||cC[2]==="odd"));cC[4]=+((cC[6]+cC[7])||cC[2]==="odd")}else{if(cC[2]){cl.error(cC[0])}}return cC},PSEUDO:function(cD){var cE,cC;if(cb.CHILD.test(cD[0])){return null}if(cD[3]){cD[2]=cD[3]}else{if((cE=cD[4])){if(ch.test(cE)&&(cC=bw(cE,true))&&(cC=cE.indexOf(")",cE.length-cC)-cE.length)){cE=cE.slice(0,cC);cD[0]=cD[0].slice(0,cC)}cD[2]=cE}}return cD.slice(0,3)}},filter:{ID:bF?function(cC){cC=cC.replace(bY,"");return function(cD){return cD.getAttribute("id")===cC}}:function(cC){cC=cC.replace(bY,"");return function(cE){var cD=typeof cE.getAttributeNode!==bZ&&cE.getAttributeNode("id");return cD&&cD.value===cC}},TAG:function(cC){if(cC==="*"){return function(){return true}}cC=cC.replace(bY,"").toLowerCase();return function(cD){return cD.nodeName&&cD.nodeName.toLowerCase()===cC}},CLASS:function(cC){var cD=cp[cu][cC+" "];return cD||(cD=new RegExp("(^|"+b3+")"+cC+"("+b3+"|$)"))&&cp(cC,function(cE){return cD.test(cE.className||(typeof cE.getAttribute!==bZ&&cE.getAttribute("class"))||"")})},ATTR:function(cE,cD,cC){return function(cH,cG){var cF=cl.attr(cH,cE);if(cF==null){return cD==="!="}if(!cD){return true}cF+="";return cD==="="?cF===cC:cD==="!="?cF!==cC:cD==="^="?cC&&cF.indexOf(cC)===0:cD==="*="?cC&&cF.indexOf(cC)>-1:cD==="$="?cC&&cF.substr(cF.length-cC.length)===cC:cD==="~="?(" "+cF+" ").indexOf(cC)>-1:cD==="|="?cF===cC||cF.substr(0,cC.length+1)===cC+"-":false}},CHILD:function(cC,cE,cF,cD){if(cC==="nth"){return function(cI){var cH,cJ,cG=cI.parentNode;if(cF===1&&cD===0){return true}if(cG){cJ=0;for(cH=cG.firstChild;cH;cH=cH.nextSibling){if(cH.nodeType===1){cJ++;if(cI===cH){break}}}}cJ-=cD;return cJ===cF||(cJ%cF===0&&cJ/cF>=0)}}return function(cH){var cG=cH;switch(cC){case"only":case"first":while((cG=cG.previousSibling)){if(cG.nodeType===1){return false}}if(cC==="first"){return true}cG=cH;case"last":while((cG=cG.nextSibling)){if(cG.nodeType===1){return false}}return true}}},PSEUDO:function(cF,cE){var cC,cD=cg.pseudos[cF]||cg.setFilters[cF.toLowerCase()]||cl.error("unsupported pseudo: "+cF);if(cD[cu]){return cD(cE)}if(cD.length>1){cC=[cF,cF,"",cE];return cg.setFilters.hasOwnProperty(cF.toLowerCase())?cw(function(cI,cK){var cH,cG=cD(cI,cE),cJ=cG.length;while(cJ--){cH=bT.call(cI,cG[cJ]);cI[cH]=!(cK[cH]=cG[cJ])}}):function(cG){return cD(cG,0,cC)}}return cD}},pseudos:{not:cw(function(cC){var cD=[],cE=[],cF=bI(cC.replace(co,"$1"));return cF[cu]?cw(function(cH,cM,cK,cI){var cL,cG=cF(cH,null,cI,[]),cJ=cH.length;while(cJ--){if((cL=cG[cJ])){cH[cJ]=!(cM[cJ]=cL)}}}):function(cI,cH,cG){cD[0]=cI;cF(cD,null,cG,cE);return !cE.pop()}}),has:cw(function(cC){return function(cD){return cl(cC,cD).length>0}}),contains:cw(function(cC){return function(cD){return(cD.textContent||cD.innerText||bv(cD)).indexOf(cC)>-1}}),enabled:function(cC){return cC.disabled===false},disabled:function(cC){return cC.disabled===true},checked:function(cC){var cD=cC.nodeName.toLowerCase();return(cD==="input"&&!!cC.checked)||(cD==="option"&&!!cC.selected)},selected:function(cC){if(cC.parentNode){cC.parentNode.selectedIndex}return cC.selected===true},parent:function(cC){return !cg.pseudos.empty(cC)},empty:function(cD){var cC;cD=cD.firstChild;while(cD){if(cD.nodeName>"@"||(cC=cD.nodeType)===3||cC===4){return false}cD=cD.nextSibling}return true},header:function(cC){return bX.test(cC.nodeName)},text:function(cE){var cD,cC;return cE.nodeName.toLowerCase()==="input"&&(cD=cE.type)==="text"&&((cC=cE.getAttribute("type"))==null||cC.toLowerCase()===cD)},radio:cd("radio"),checkbox:cd("checkbox"),file:cd("file"),password:cd("password"),image:cd("image"),submit:by("submit"),reset:by("reset"),button:function(cD){var cC=cD.nodeName.toLowerCase();return cC==="input"&&cD.type==="button"||cC==="button"},input:function(cC){return ci.test(cC.nodeName)},focus:function(cC){var cD=cC.ownerDocument;return cC===cD.activeElement&&(!cD.hasFocus||cD.hasFocus())&&!!(cC.type||cC.href||~cC.tabIndex)},active:function(cC){return cC===cC.ownerDocument.activeElement},first:ca(function(){return[0]}),last:ca(function(cC,cD){return[cD-1]}),eq:ca(function(cC,cE,cD){return[cD<0?cD+cE:cD]}),even:ca(function(cC,cE){for(var cD=0;cD=0;){cC.push(cD)}return cC}),gt:ca(function(cC,cF,cE){for(var cD=cE<0?cE+cF:cE;++cD1?function(cG,cF,cD){var cE=cC.length;while(cE--){if(!cC[cE](cG,cF,cD)){return false}}return true}:cC[0]}function b0(cC,cD,cE,cF,cI){var cG,cL=[],cH=0,cJ=cC.length,cK=cD!=null;for(;cH-1){cS[cU]=!(cP[cU]=cM)}}}}else{cO=b0(cO===cP?cO.splice(cJ,cO.length):cO);if(cH){cH(null,cP,cO,cR)}else{cr.apply(cP,cO)}}})}function b2(cI){var cD,cG,cE,cH=cI.length,cL=cg.relative[cI[0].type],cM=cL||cg.relative[" "],cF=cL?1:0,cJ=b1(function(cN){return cN===cD},cM,true),cK=b1(function(cN){return bT.call(cD,cN)>-1},cM,true),cC=[function(cP,cO,cN){return(!cL&&(cN||cO!==ce))||((cD=cO).nodeType?cJ(cP,cO,cN):cK(cP,cO,cN))}];for(;cF1&&bJ(cC),cF>1&&cI.slice(0,cF-1).join("").replace(co,"$1"),cG,cF0,cG=cF.length>0,cD=function(cQ,cK,cP,cO,cW){var cL,cM,cR,cV=[],cU=0,cN="0",cH=cQ&&[],cS=cW!=null,cT=ce,cJ=cQ||cG&&cg.find.TAG("*",cW&&cK.parentNode||cK),cI=(bW+=cT==null?1:Math.E);if(cS){ce=cK!==bD&&cK;cs=cD.el}for(;(cL=cJ[cN])!=null;cN++){if(cG&&cL){for(cM=0;(cR=cF[cM]);cM++){if(cR(cL,cK,cP)){cO.push(cL);break}}if(cS){bW=cI;cs=++cD.el}}if(cC){if((cL=!cR&&cL)){cU--}if(cQ){cH.push(cL)}}}cU+=cN;if(cC&&cN!==cU){for(cM=0;(cR=cE[cM]);cM++){cR(cH,cV,cK,cP)}if(cQ){if(cU>0){while(cN--){if(!(cH[cN]||cV[cN])){cV[cN]=b9.call(cO)}}}cV=b0(cV)}cr.apply(cO,cV);if(cS&&!cQ&&cV.length>0&&(cU+cE.length)>1){cl.uniqueSort(cO)}}if(cS){bW=cI;ce=cT}return cH};cD.el=0;return cC?cw(cD):cD}bI=cl.compile=function(cC,cH){var cE,cD=[],cG=[],cF=bS[cu][cC+" "];if(!cF){if(!cH){cH=bw(cC)}cE=cH.length;while(cE--){cF=b2(cH[cE]);if(cF[cu]){cD.push(cF)}else{cG.push(cF)}}cF=bS(cC,bB(cG,cD))}return cF};function bU(cD,cG,cF){var cE=0,cC=cG.length;for(;cE2&&(cD=cN[0]).type==="ID"&&cC.nodeType===9&&!cJ&&cg.relative[cN[1].type]){cC=cg.find.ID(cD.matches[0].replace(bY,""),cC,cJ)[0];if(!cC){return cG}cE=cE.slice(cN.shift().length)}for(cH=cb.POS.test(cE)?-1:cN.length-1;cH>=0;cH--){cD=cN[cH];if(cg.relative[(cM=cD.type)]){break}if((cL=cg.find[cM])){if((cK=cL(cD.matches[0].replace(bY,""),cm.test(cN[0].type)&&cC.parentNode||cC,cJ))){cN.splice(cH,1);cE=cK.length&&cN.join("");if(!cE){cr.apply(cG,bQ.call(cK,0));return cG}break}}}}}bI(cE,cI)(cK,cC,cJ,cG,cm.test(cE));return cG}if(bD.querySelectorAll){(function(){var cH,cI=ct,cG=/'|\\/g,cE=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,cD=[":focus"],cC=[":active"],cF=bG.matchesSelector||bG.mozMatchesSelector||bG.webkitMatchesSelector||bG.oMatchesSelector||bG.msMatchesSelector;cf(function(cJ){cJ.innerHTML="";if(!cJ.querySelectorAll("[selected]").length){cD.push("\\["+b3+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)")}if(!cJ.querySelectorAll(":checked").length){cD.push(":checked")}});cf(function(cJ){cJ.innerHTML="

";if(cJ.querySelectorAll("[test^='']").length){cD.push("[*^$]="+b3+"*(?:\"\"|'')")}cJ.innerHTML="";if(!cJ.querySelectorAll(":enabled").length){cD.push(":enabled",":disabled")}});cD=new RegExp(cD.join("|"));ct=function(cP,cK,cR,cU,cT){if(!cU&&!cT&&!cD.test(cP)){var cN,cS,cM=true,cJ=cu,cL=cK,cQ=cK.nodeType===9&&cP;if(cK.nodeType===1&&cK.nodeName.toLowerCase()!=="object"){cN=bw(cP);if((cM=cK.getAttribute("id"))){cJ=cM.replace(cG,"\\$&")}else{cK.setAttribute("id",cJ)}cJ="[id='"+cJ+"'] ";cS=cN.length;while(cS--){cN[cS]=cJ+cN[cS].join("")}cL=cm.test(cP)&&cK.parentNode||cK;cQ=cN.join(",")}if(cQ){try{cr.apply(cR,bQ.call(cL.querySelectorAll(cQ),0));return cR}catch(cO){}finally{if(!cM){cK.removeAttribute("id")}}}}return cI(cP,cK,cR,cU,cT)};if(cF){cf(function(cK){cH=cF.call(cK,"div");try{cF.call(cK,"[test!='']:sizzle");cC.push("!=",cB)}catch(cJ){}});cC=new RegExp(cC.join("|"));cl.matchesSelector=function(cK,cM){cM=cM.replace(cE,"='$1']");if(!bR(cK)&&!cC.test(cM)&&!cD.test(cM)){try{var cJ=cF.call(cK,cM);if(cJ||cH||cK.document&&cK.document.nodeType!==11){return cJ}}catch(cL){}}return cl(cM,null,null,[cK]).length>0}}})()}cg.pseudos.nth=cg.pseudos.eq;function bO(){}cg.filters=bO.prototype=cg.pseudos;cg.setFilters=new bO();cl.attr=C.attr;C.find=cl;C.expr=cl.selectors;C.expr[":"]=C.expr.pseudos;C.unique=cl.uniqueSort;C.text=cl.getText;C.isXMLDoc=cl.isXML;C.contains=cl.contains})(bd);var U=/Until$/,ag=/^(?:parents|prev(?:Until|All))/,bq=/^.[^:#\[\.,]*$/,aQ=C.expr.match.needsContext,ao={children:true,contents:true,next:true,prev:true};C.fn.extend({find:function(bu){var by,bv,bA,bB,bz,bx,bw=this;if(typeof bu!=="string"){return C(bu).filter(function(){for(by=0,bv=bw.length;by0){for(bB=bA;bB=0:C.filter(bu,this).length>0:this.filter(bu).length>0)},closest:function(by,bx){var bz,bw=0,bu=this.length,bv=[],bA=aQ.test(by)||typeof by!=="string"?C(by,bx||this.context):0;for(;bw-1:C.find.matchesSelector(bz,by)){bv.push(bz);break}bz=bz.parentNode}}bv=bv.length>1?C.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(bu){if(!bu){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof bu==="string"){return C.inArray(this[0],C(bu))}return C.inArray(bu.jqx?bu[0]:bu,this)},add:function(bu,bv){var bx=typeof bu==="string"?C(bu,bv):C.makeArray(bu&&bu.nodeType?[bu]:bu),bw=C.merge(this.get(),bx);return this.pushStack(x(bx[0])||x(bw[0])?bw:C.unique(bw))},addBack:function(bu){return this.add(bu==null?this.prevObject:this.prevObject.filter(bu))}});C.fn.andSelf=C.fn.addBack;function x(bu){return !bu||!bu.parentNode||bu.parentNode.nodeType===11}function aB(bv,bu){do{bv=bv[bu]}while(bv&&bv.nodeType!==1);return bv}C.each({parent:function(bv){var bu=bv.parentNode;return bu&&bu.nodeType!==11?bu:null},parents:function(bu){return C.dir(bu,"parentNode")},parentsUntil:function(bv,bu,bw){return C.dir(bv,"parentNode",bw)},next:function(bu){return aB(bu,"nextSibling")},prev:function(bu){return aB(bu,"previousSibling")},nextAll:function(bu){return C.dir(bu,"nextSibling")},prevAll:function(bu){return C.dir(bu,"previousSibling")},nextUntil:function(bv,bu,bw){return C.dir(bv,"nextSibling",bw)},prevUntil:function(bv,bu,bw){return C.dir(bv,"previousSibling",bw)},siblings:function(bu){return C.sibling((bu.parentNode||{}).firstChild,bu)},children:function(bu){return C.sibling(bu.firstChild)},contents:function(bu){return C.nodeName(bu,"iframe")?bu.contentDocument||bu.contentWindow.document:C.merge([],bu.childNodes)}},function(bu,bv){C.fn[bu]=function(by,bw){var bx=C.map(this,bv,by);if(!U.test(bu)){bw=by}if(bw&&typeof bw==="string"){bx=C.filter(bw,bx)}bx=this.length>1&&!ao[bu]?C.unique(bx):bx;if(this.length>1&&ag.test(bu)){bx=bx.reverse()}return this.pushStack(bx,bu,aD.call(arguments).join(","))}});C.extend({filter:function(bw,bu,bv){if(bv){bw=":not("+bw+")"}return bu.length===1?C.find.matchesSelector(bu[0],bw)?[bu[0]]:[]:C.find.matches(bw,bu)},dir:function(bw,bv,by){var bu=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===G||bx.nodeType!==1||!C(bx).is(by))){if(bx.nodeType===1){bu.push(bx)}bx=bx[bv]}return bu},sibling:function(bw,bv){var bu=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){bu.push(bw)}}return bu}});function az(bx,bw,bu){bw=bw||0;if(C.isFunction(bw)){return C.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===bu})}else{if(bw.nodeType){return C.grep(bx,function(bz,by){return(bz===bw)===bu})}else{if(typeof bw==="string"){var bv=C.grep(bx,function(by){return by.nodeType===1});if(bq.test(bw)){return C.filter(bw,bv,!bu)}else{bw=C.filter(bw,bv)}}}}return C.grep(bx,function(bz,by){return(C.inArray(bz,bw)>=0)===bu})}function a(bu){var bw=aJ.split("|"),bv=bu.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aJ="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",aa=/ JQXLite\d+="(?:null|\d+)"/g,ah=/^\s+/,L=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,c=/<([\w:]+)/,v=/]","i"),R=/^(?:checkbox|radio)$/,o=/checked\s*(?:[^=]|=\s*.checked.)/i,bp=/\/(java|ecma)script/i,aG=/^\s*\s*$/g,am={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},T=a(ak),bg=T.appendChild(ak.createElement("div"));am.optgroup=am.option;am.tbody=am.tfoot=am.colgroup=am.caption=am.thead;am.th=am.td;if(!C.support.htmlSerialize){am._default=[1,"X
","
"]}C.fn.extend({text:function(bu){return C.access(this,function(bv){return bv===G?C.text(this):this.empty().append((this[0]&&this[0].ownerDocument||ak).createTextNode(bv))},null,bu,arguments.length)},wrapAll:function(bu){if(C.isFunction(bu)){return this.each(function(bw){C(this).wrapAll(bu.call(this,bw))})}if(this[0]){var bv=C(bu,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(bu){if(C.isFunction(bu)){return this.each(function(bv){C(this).wrapInner(bu.call(this,bv))})}return this.each(function(){var bv=C(this),bw=bv.contents();if(bw.length){bw.wrapAll(bu)}else{bv.append(bu)}})},wrap:function(bu){var bv=C.isFunction(bu);return this.each(function(bw){C(this).wrapAll(bv?bu.call(this,bw):bu)})},unwrap:function(){return this.parent().each(function(){if(!C.nodeName(this,"body")){C(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(bu){if(this.nodeType===1||this.nodeType===11){this.appendChild(bu)}})},prepend:function(){return this.domManip(arguments,true,function(bu){if(this.nodeType===1||this.nodeType===11){this.insertBefore(bu,this.firstChild)}})},before:function(){if(!x(this[0])){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}if(arguments.length){var bu=C.clean(arguments);return this.pushStack(C.merge(bu,this),"before",this.selector)}},after:function(){if(!x(this[0])){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}if(arguments.length){var bu=C.clean(arguments);return this.pushStack(C.merge(this,bu),"after",this.selector)}},remove:function(bu,bx){var bw,bv=0;for(;(bw=this[bv])!=null;bv++){if(!bu||C.filter(bu,[bw]).length){if(!bx&&bw.nodeType===1){C.cleanData(bw.getElementsByTagName("*"));C.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){var bv,bu=0;for(;(bv=this[bu])!=null;bu++){if(bv.nodeType===1){C.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,bu){bv=bv==null?false:bv;bu=bu==null?bv:bu;return this.map(function(){return C.clone(this,bv,bu)})},html:function(bu){return C.access(this,function(by){var bx=this[0]||{},bw=0,bv=this.length;if(by===G){return bx.nodeType===1?bx.innerHTML.replace(aa,""):G}if(typeof by==="string"&&!W.test(by)&&(C.support.htmlSerialize||!ac.test(by))&&(C.support.leadingWhitespace||!ah.test(by))&&!am[(c.exec(by)||["",""])[1].toLowerCase()]){by=by.replace(L,"<$1>");try{for(;bw1&&typeof bB==="string"&&o.test(bB)){return this.each(function(){C(this).domManip(bA,bE,bD)})}if(C.isFunction(bB)){return this.each(function(bG){var bF=C(this);bA[0]=bB.call(this,bG,bE?bF.html():G);bF.domManip(bA,bE,bD)})}if(this[0]){bw=C.buildFragment(bA,this,bv);bz=bw.fragment;by=bz.firstChild;if(bz.childNodes.length===1){bz=by}if(by){bE=bE&&C.nodeName(by,"tr");for(bC=bw.cacheable||bu-1;bx0?this.clone(true):this).get();C(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,bu,bC.selector)}}});function bk(bu){if(typeof bu.getElementsByTagName!=="undefined"){return bu.getElementsByTagName("*")}else{if(typeof bu.querySelectorAll!=="undefined"){return bu.querySelectorAll("*")}else{return[]}}}function al(bu){if(R.test(bu.type)){bu.defaultChecked=bu.checked}}C.extend({clone:function(by,bA,bw){var bu,bv,bx,bz;if(C.support.html5Clone||C.isXMLDoc(by)||!ac.test("<"+by.nodeName+">")){bz=by.cloneNode(true)}else{bg.innerHTML=by.outerHTML;bg.removeChild(bz=bg.firstChild)}if((!C.support.noCloneEvent||!C.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!C.isXMLDoc(by)){ab(by,bz);bu=bk(by);bv=bk(bz);for(bx=0;bu[bx];++bx){if(bv[bx]){ab(bu[bx],bv[bx])}}}if(bA){r(by,bz);if(bw){bu=bk(by);bv=bk(bz);for(bx=0;bu[bx];++bx){r(bu[bx],bv[bx])}}}bu=bv=null;return bz},clean:function(bH,bw,bu,bx){var bE,bD,bG,bL,bA,bK,bB,by,bv,bF,bJ,bC,bz=bw===ak&&T,bI=[];if(!bw||typeof bw.createDocumentFragment==="undefined"){bw=ak}for(bE=0;(bG=bH[bE])!=null;bE++){if(typeof bG==="number"){bG+=""}if(!bG){continue}if(typeof bG==="string"){if(!P.test(bG)){bG=bw.createTextNode(bG)}else{bz=bz||a(bw);bB=bw.createElement("div");bz.appendChild(bB);bG=bG.replace(L,"<$1>");bL=(c.exec(bG)||["",""])[1].toLowerCase();bA=am[bL]||am._default;bK=bA[0];bB.innerHTML=bA[1]+bG+bA[2];while(bK--){bB=bB.lastChild}if(!C.support.tbody){by=v.test(bG);bv=bL==="table"&&!by?bB.firstChild&&bB.firstChild.childNodes:bA[1]===""&&!by?bB.childNodes:[];for(bD=bv.length-1;bD>=0;--bD){if(C.nodeName(bv[bD],"tbody")&&!bv[bD].childNodes.length){bv[bD].parentNode.removeChild(bv[bD])}}}if(!C.support.leadingWhitespace&&ah.test(bG)){bB.insertBefore(bw.createTextNode(ah.exec(bG)[0]),bB.firstChild)}bG=bB.childNodes;bB.parentNode.removeChild(bB)}}if(bG.nodeType){bI.push(bG)}else{C.merge(bI,bG)}}if(bB){bG=bB=bz=null}if(!C.support.appendChecked){for(bE=0;(bG=bI[bE])!=null;bE++){if(C.nodeName(bG,"input")){al(bG)}else{if(typeof bG.getElementsByTagName!=="undefined"){C.grep(bG.getElementsByTagName("input"),al)}}}}if(bu){bJ=function(bM){if(!bM.type||bp.test(bM.type)){return bx?bx.push(bM.parentNode?bM.parentNode.removeChild(bM):bM):bu.appendChild(bM)}};for(bE=0;(bG=bI[bE])!=null;bE++){if(!(C.nodeName(bG,"script")&&bJ(bG))){bu.appendChild(bG);if(typeof bG.getElementsByTagName!=="undefined"){bC=C.grep(C.merge([],bG.getElementsByTagName("script")),bJ);bI.splice.apply(bI,[bE+1,0].concat(bC));bE+=bC.length}}}}return bI},cleanData:function(bv,bD){var by,bw,bx,bC,bz=0,bE=C.expando,bu=C.cache,bA=C.support.deleteExpando,bB=C.event.special;for(;(bx=bv[bz])!=null;bz++){if(bD||C.acceptData(bx)){bw=bx[bE];by=bw&&bu[bw];if(by){if(by.events){for(bC in by.events){if(bB[bC]){C.event.remove(bx,bC)}else{C.removeEvent(bx,bC,by.handle)}}}if(bu[bw]){delete bu[bw];if(bA){delete bx[bE]}else{if(bx.removeAttribute){bx.removeAttribute(bE)}else{bx[bE]=null}}C.deletedIds.push(bw)}}}}}});(function(){var bu,bv;C.uaMatch=function(bx){bx=bx.toLowerCase();var bw=/(chrome)[ \/]([\w.]+)/.exec(bx)||/(webkit)[ \/]([\w.]+)/.exec(bx)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(bx)||/(msie) ([\w.]+)/.exec(bx)||bx.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(bx)||[];return{browser:bw[1]||"",version:bw[2]||"0"}};bu=C.uaMatch(bt.userAgent);bv={};if(bu.browser){bv[bu.browser]=true;bv.version=bu.version}if(bv.chrome){bv.webkit=true}else{if(bv.webkit){bv.safari=true}}C.browser=bv;C.sub=function(){function bx(bz,bA){return new bx.fn.init(bz,bA)}C.extend(true,bx,this);bx.superclass=this;bx.fn=bx.prototype=this();bx.fn.constructor=bx;bx.sub=this.sub;bx.fn.init=function by(bz,bA){if(bA&&bA instanceof C&&!(bA instanceof bx)){bA=bx(bA)}return C.fn.init.call(this,bz,bA,bw)};bx.fn.init.prototype=bx.fn;var bw=bx(ak);return bx}})();var Q,bc,l,ad=/alpha\([^)]*\)/i,aj=/opacity=([^)]*)/,w=/^(top|right|bottom|left)$/,ai=/^(none|table(?!-c[ea]).+)/,av=/^margin/,i=new RegExp("^("+aE+")(.*)$","i"),aV=new RegExp("^("+aE+")(?!px)[a-z%]+$","i"),E=new RegExp("^([-+])=("+aE+")","i"),J={BODY:"block"},ba={position:"absolute",visibility:"hidden",display:"block"},aL={letterSpacing:0,fontWeight:400},D=["Top","Right","Bottom","Left"],O=["Webkit","O","Moz","ms"],be=C.fn.toggle;function a2(bx,bv){if(bv in bx){return bv}var by=bv.charAt(0).toUpperCase()+bv.slice(1),bu=bv,bw=O.length;while(bw--){bv=O[bw]+by;if(bv in bx){return bv}}return bu}function ap(bv,bu){bv=bu||bv;return C.css(bv,"display")==="none"||!C.contains(bv.ownerDocument,bv)}function bb(bz,bu){var by,bA,bv=[],bw=0,bx=bz.length;for(;bw1)},show:function(){return bb(this,true)},hide:function(){return bb(this)},toggle:function(bw,bv){var bu=typeof bw==="boolean";if(C.isFunction(bw)&&C.isFunction(bv)){return be.apply(this,arguments)}return this.each(function(){if(bu?bw:ap(this)){C(this).show()}else{C(this).hide()}})}});C.extend({cssHooks:{opacity:{get:function(bw,bv){if(bv){var bu=Q(bw,"opacity");return bu===""?"1":bu}}}},cssNumber:{fillOpacity:true,fontWeight:true,lineHeight:true,opacity:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":C.support.cssFloat?"cssFloat":"styleFloat"},style:function(bw,bv,bC,bx){if(!bw||bw.nodeType===3||bw.nodeType===8||!bw.style){return}var bA,bB,bD,by=C.camelCase(bv),bu=bw.style;bv=C.cssProps[by]||(C.cssProps[by]=a2(bu,by));bD=C.cssHooks[bv]||C.cssHooks[by];if(bC!==G){bB=typeof bC;if(bB==="string"&&(bA=E.exec(bC))){bC=(bA[1]+1)*bA[2]+parseFloat(C.css(bw,bv));bB="number"}if(bC==null||bB==="number"&&isNaN(bC)){return}if(bB==="number"&&!C.cssNumber[by]){bC+="px"}if(!bD||!("set" in bD)||(bC=bD.set(bw,bC,bx))!==G){try{bu[bv]=bC}catch(bz){}}}else{if(bD&&"get" in bD&&(bA=bD.get(bw,false,bx))!==G){return bA}return bu[bv]}},css:function(bA,by,bz,bv){var bB,bx,bu,bw=C.camelCase(by);by=C.cssProps[bw]||(C.cssProps[bw]=a2(bA.style,bw));bu=C.cssHooks[by]||C.cssHooks[bw];if(bu&&"get" in bu){bB=bu.get(bA,true,bv)}if(bB===G){bB=Q(bA,by)}if(bB==="normal"&&by in aL){bB=aL[by]}if(bz||bv!==G){bx=parseFloat(bB);return bz||C.isNumeric(bx)?bx||0:bB}return bB},swap:function(by,bx,bz){var bw,bv,bu={};for(bv in bx){bu[bv]=by.style[bv];by.style[bv]=bx[bv]}bw=bz.call(by);for(bv in bx){by.style[bv]=bu[bv]}return bw}});if(bd.getComputedStyle){Q=function(bB,bv){var bu,by,bx,bA,bz=bd.getComputedStyle(bB,null),bw=bB.style;if(bz){bu=bz.getPropertyValue(bv)||bz[bv];if(bu===""&&!C.contains(bB.ownerDocument,bB)){bu=C.style(bB,bv)}if(aV.test(bu)&&av.test(bv)){by=bw.width;bx=bw.minWidth;bA=bw.maxWidth;bw.minWidth=bw.maxWidth=bw.width=bu;bu=bz.width;bw.width=by;bw.minWidth=bx;bw.maxWidth=bA}}return bu}}else{if(ak.documentElement.currentStyle){Q=function(by,bw){var bz,bu,bv=by.currentStyle&&by.currentStyle[bw],bx=by.style;if(bv==null&&bx&&bx[bw]){bv=bx[bw]}if(aV.test(bv)&&!w.test(bw)){bz=bx.left;bu=by.runtimeStyle&&by.runtimeStyle.left;if(bu){by.runtimeStyle.left=by.currentStyle.left}bx.left=bw==="fontSize"?"1em":bv;bv=bx.pixelLeft+"px";bx.left=bz;if(bu){by.runtimeStyle.left=bu}}return bv===""?"auto":bv}}}function aO(bu,bw,bx){var bv=i.exec(bw);return bv?Math.max(0,bv[1]-(bx||0))+(bv[2]||"px"):bw}function aZ(bx,bv,bu,bz){var bw=bu===(bz?"border":"content")?4:bv==="width"?1:0,by=0;for(;bw<4;bw+=2){if(bu==="margin"){by+=C.css(bx,bu+D[bw],true)}if(bz){if(bu==="content"){by-=parseFloat(Q(bx,"padding"+D[bw]))||0}if(bu!=="margin"){by-=parseFloat(Q(bx,"border"+D[bw]+"Width"))||0}}else{by+=parseFloat(Q(bx,"padding"+D[bw]))||0;if(bu!=="padding"){by+=parseFloat(Q(bx,"border"+D[bw]+"Width"))||0}}}return by}function Y(bx,bv,bu){var by=bv==="width"?bx.offsetWidth:bx.offsetHeight,bw=true,bz=C.support.boxSizing&&C.css(bx,"boxSizing")==="border-box";if(by<=0||by==null){by=Q(bx,bv);if(by<0||by==null){by=bx.style[bv]}if(aV.test(by)){return by}bw=bz&&(C.support.boxSizingReliable||by===bx.style[bv]);by=parseFloat(by)||0}return(by+aZ(bx,bv,bu||(bz?"border":"content"),bw))+"px"}function aN(bw){if(J[bw]){return J[bw]}var bu=C("<"+bw+">").appendTo(ak.body),bv=bu.css("display");bu.remove();if(bv==="none"||bv===""){bc=ak.body.appendChild(bc||C.extend(ak.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!l||!bc.createElement){l=(bc.contentWindow||bc.contentDocument).document;l.write("");l.close()}bu=l.body.appendChild(l.createElement(bw));bv=Q(bu,"display");ak.body.removeChild(bc)}J[bw]=bv;return bv}C.each(["height","width"],function(bv,bu){C.cssHooks[bu]={get:function(by,bx,bw){if(bx){if(by.offsetWidth===0&&ai.test(Q(by,"display"))){return C.swap(by,ba,function(){return Y(by,bu,bw)})}else{return Y(by,bu,bw)}}},set:function(bx,by,bw){return aO(bx,by,bw?aZ(bx,bu,bw,C.support.boxSizing&&C.css(bx,"boxSizing")==="border-box"):0)}}});if(!C.support.opacity){C.cssHooks.opacity={get:function(bv,bu){return aj.test((bu&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(0.01*parseFloat(RegExp.$1))+"":bu?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,bu=C.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&C.trim(bw.replace(ad,""))===""&&bx.removeAttribute){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ad.test(bw)?bw.replace(ad,bu):bw+" "+bu}}}C(function(){if(!C.support.reliableMarginRight){C.cssHooks.marginRight={get:function(bv,bu){return C.swap(bv,{display:"inline-block"},function(){if(bu){return Q(bv,"marginRight")}})}}}if(!C.support.pixelPosition&&C.fn.position){C.each(["top","left"],function(bu,bv){C.cssHooks[bv]={get:function(by,bx){if(bx){var bw=Q(by,bv);return aV.test(bw)?C(by).position()[bv]+"px":bw}}}})}});if(C.expr&&C.expr.filters){C.expr.filters.hidden=function(bu){return(bu.offsetWidth===0&&bu.offsetHeight===0)||(!C.support.reliableHiddenOffsets&&((bu.style&&bu.style.display)||Q(bu,"display"))==="none")};C.expr.filters.visible=function(bu){return !C.expr.filters.hidden(bu)}}C.each({margin:"",padding:"",border:"Width"},function(bu,bv){C.cssHooks[bu+bv]={expand:function(by){var bx,bz=typeof by==="string"?by.split(" "):[by],bw={};for(bx=0;bx<4;bx++){bw[bu+D[bx]+bv]=bz[bx]||bz[bx-2]||bz[0]}return bw}};if(!av.test(bu)){C.cssHooks[bu+bv].set=aO}});var g=/%20/g,af=/\[\]$/,br=/\r?\n/g,aU=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,p=/^(?:select|textarea)/i;C.fn.extend({serialize:function(){return C.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?C.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||p.test(this.nodeName)||aU.test(this.type))}).map(function(bu,bv){var bw=C(this).val();return bw==null?null:C.isArray(bw)?C.map(bw,function(by,bx){return{name:bv.name,value:by.replace(br,"\r\n")}}):{name:bv.name,value:bw.replace(br,"\r\n")}}).get()}});C.param=function(bu,bw){var bx,bv=[],by=function(bz,bA){bA=C.isFunction(bA)?bA():(bA==null?"":bA);bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===G){bw=C.ajaxSettings&&C.ajaxSettings.traditional}if(C.isArray(bu)||(bu.jqx&&!C.isPlainObject(bu))){C.each(bu,function(){by(this.name,this.value)})}else{for(bx in bu){s(bx,bu[bx],bw,by)}}return bv.join("&").replace(g,"+")};function s(bw,by,bv,bx){var bu;if(C.isArray(by)){C.each(by,function(bA,bz){if(bv||af.test(bw)){bx(bw,bz)}else{s(bw+"["+(typeof bz==="object"?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&C.type(by)==="object"){for(bu in by){s(bw+"["+bu+"]",by[bu],bv,bx)}}else{bx(bw,by)}}}if(C.support.ajax){C.ajaxTransport(function(bu){if(!bu.crossDomain||C.support.cors){var bv;return{send:function(bB,bw){var bz,by,bA=bu.xhr();if(bu.username){bA.open(bu.type,bu.url,bu.async,bu.username,bu.password)}else{bA.open(bu.type,bu.url,bu.async)}if(bu.xhrFields){for(by in bu.xhrFields){bA[by]=bu.xhrFields[by]}}if(bu.mimeType&&bA.overrideMimeType){bA.overrideMimeType(bu.mimeType)}if(!bu.crossDomain&&!bB["X-Requested-With"]){bB["X-Requested-With"]="XMLHttpRequest"}try{for(by in bB){bA.setRequestHeader(by,bB[by])}}catch(bx){}bA.send((bu.hasContent&&bu.data)||null);bv=function(bK,bE){var bF,bD,bC,bI,bH;try{if(bv&&(bE||bA.readyState===4)){bv=G;if(bz){bA.onreadystatechange=C.noop;if(xhrOnUnloadAbort){delete xhrCallbacks[bz]}}if(bE){if(bA.readyState!==4){bA.abort()}}else{bF=bA.status;bC=bA.getAllResponseHeaders();bI={};bH=bA.responseXML;if(bH&&bH.documentElement){bI.xml=bH}try{bI.text=bA.responseText}catch(bJ){}try{bD=bA.statusText}catch(bJ){bD=""}if(!bF&&bu.isLocal&&!bu.crossDomain){bF=bI.text?200:404}else{if(bF===1223){bF=204}}}}}catch(bG){if(!bE){bw(-1,bG)}}if(bI){bw(bF,bD,bI,bC)}};if(!bu.async){bv()}else{if(bA.readyState===4){setTimeout(bv,0)}else{bz=++xhrId;if(xhrOnUnloadAbort){if(!xhrCallbacks){xhrCallbacks={};C(bd).unload(xhrOnUnloadAbort)}xhrCallbacks[bz]=bv}bA.onreadystatechange=bv}}},abort:function(){if(bv){bv(0,1)}}}}})}var a6,a1,ar=/^(?:toggle|show|hide)$/,aM=new RegExp("^(?:([-+])=|)("+aE+")([a-z%]*)$","i"),a7=/queueHooks$/,k=[bm],H={"*":[function(bu,bB){var bx,bC,bD=this.createTween(bu,bB),by=aM.exec(bB),bz=bD.cur(),bv=+bz||0,bw=1,bA=20;if(by){bx=+by[2];bC=by[3]||(C.cssNumber[bu]?"":"px");if(bC!=="px"&&bv){bv=C.css(bD.elem,bu,true)||bx||1;do{bw=bw||".5";bv=bv/bw;C.style(bD.elem,bu,bv+bC)}while(bw!==(bw=bD.cur()/bz)&&bw!==1&&--bA)}bD.unit=bC;bD.start=bv;bD.end=by[1]?bv+(by[1]+1)*bx:bx}return bD}]};function bl(){setTimeout(function(){a6=G},0);return(a6=C.now())}function Z(bv,bu){C.each(bu,function(bA,by){var bz=(H[bA]||[]).concat(H["*"]),bw=0,bx=bz.length;for(;bw-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(bu)||0;by=parseFloat(bE)||0}if(C.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};C.fn.extend({isRendered:function(){var bv=this;var bu=this[0];if(bu.parentNode==null||(bu.offsetWidth===0||bu.offsetHeight===0)){return false}return true},getSizeFromStyle:function(){var by=this;var bx=null;var bu=null;var bw=this[0];var bv;if(bw.style.width){bx=bw.style.width}if(bw.style.height){bu=bw.style.height}if(bd.getComputedStyle){bv=getComputedStyle(bw,null)}else{bv=bw.currentStyle}if(bv){if(bv.width){bx=bv.width}if(bv.height){bu=bv.height}}if(bx==="0px"){bx=0}if(bu==="0px"){bu=0}if(bx===null){bx=0}if(bu===null){bu=0}return{width:bx,height:bu}},initAnimate:function(){},sizeStyleChanged:function(bx){var bw=this;var by;var bu=function(bz){var bA=by;if(bz&&bz[0]&&bz[0].attributeName==="style"&&bz[0].type==="attributes"){if(bA.element.offsetWidth!==bA.offsetWidth||bA.element.offsetHeight!==bA.offsetHeight){bA.offsetWidth=bA.element.offsetWidth;bA.offsetHeight=bA.element.offsetHeight;if(bw.isRendered()){bA.callback()}}}};by={element:bw[0],offsetWidth:bw[0].offsetWidth,offsetHeight:bw[0].offsetHeight,callback:bx};try{if(!bw.elementStyleObserver){bw.elementStyleObserver=new MutationObserver(bu);bw.elementStyleObserver.observe(bw[0],{attributes:true,childList:false,characterData:false})}}catch(bv){}},position:function(){if(!this[0]){return}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),bu=V.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(C.css(bw,"marginTop"))||0;bx.left-=parseFloat(C.css(bw,"marginLeft"))||0;bu.top+=parseFloat(C.css(bv[0],"borderTopWidth"))||0;bu.left+=parseFloat(C.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-bu.top,left:bx.left-bu.left}},offsetParent:function(){return this.map(function(){var bu=this.offsetParent||ak.body;while(bu&&(!V.test(bu.nodeName)&&C.css(bu,"position")==="static")){bu=bu.offsetParent}return bu||ak.body})}});C.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(bw,bv){var bu=/Y/.test(bv);C.fn[bw]=function(bx){return C.access(this,function(by,bB,bA){var bz=aC(by);if(bA===G){return bz?(bv in bz)?bz[bv]:bz.document.documentElement[bB]:by[bB]}if(bz){bz.scrollTo(!bu?bA:C(bz).scrollLeft(),bu?bA:C(bz).scrollTop())}else{by[bB]=bA}},bw,bx,arguments.length,null)}});function aC(bu){return C.isWindow(bu)?bu:bu.nodeType===9?bu.defaultView||bu.parentWindow:false}C.each({Height:"height",Width:"width"},function(bu,bv){C.each({padding:"inner"+bu,content:bv,"":"outer"+bu},function(bw,bx){C.fn[bx]=function(bB,bA){var bz=arguments.length&&(bw||typeof bB!=="boolean"),by=bw||(bB===true||bA===true?"margin":"border");return C.access(this,function(bD,bC,bE){var bF;if(C.isWindow(bD)){return bD.document.documentElement["client"+bu]}if(bD.nodeType===9){bF=bD.documentElement;return Math.max(bD.body["scroll"+bu],bF["scroll"+bu],bD.body["offset"+bu],bF["offset"+bu],bF["client"+bu])}return bE===G?C.css(bD,bC,bE,by):C.style(bD,bC,bE,by)},bv,bz?bB:G,bz,null)}})});bd.JQXLite=bd.jqxHelper=C;if(typeof define==="function"&&define.amd&&define.amd.JQXLite){define("jqx",[],function(){return C})}})(window)}(function(a){if(a.jqxCore){a.$$=a.minQuery=a.JQXLite;if(!a.$){a.$=a.minQuery}return}if(a.jQuery){a.minQuery=a.JQXLite=a.jQuery;return}if(!a.$){a.$=a.minQuery=a.JQXLite}else{a.minQuery=a.JQXLite=a.$}})(window);JQXLite.generateID=function(){var a=function(){return(((1+Math.random())*65536)|0).toString(16).substring(1)};var b="";do{b="jqx"+a()+a()+a()}while($("#"+b).length>0);return b};var jqxBaseFramework=window.jqxBaseFramework=window.minQuery||window.jQuery;(function(b){b.jqx=b.jqx||{};window.jqx=b.jqx;var a={createInstance:function(c,e,g){if(e=="jqxDataAdapter"){var f=g[0];var d=g[1]||{};return new b.jqx.dataAdapter(f,d)}b(c)[e](g||{});return b(c)[e]("getInstance")}};window.jqwidgets=a;b.jqx.define=function(c,d,e){c[d]=function(){if(this.baseType){this.base=new c[this.baseType]();this.base.defineInstance()}this.defineInstance();this.metaInfo()};c[d].prototype.defineInstance=function(){};c[d].prototype.metaInfo=function(){};c[d].prototype.base=null;c[d].prototype.baseType=undefined;if(e&&c[e]){c[d].prototype.baseType=e}};b.jqx.invoke=function(f,e){if(e.length==0){return}var g=typeof(e)==Array||e.length>0?e[0]:e;var d=typeof(e)==Array||e.length>1?Array.prototype.slice.call(e,1):b({}).toArray();while(f[g]==undefined&&f.base!=null){if(f[g]!=undefined&&b.isFunction(f[g])){return f[g].apply(f,d)}if(typeof g=="string"){var c=g.toLowerCase();if(f[c]!=undefined&&b.isFunction(f[c])){return f[c].apply(f,d)}}f=f.base}if(f[g]!=undefined&&b.isFunction(f[g])){return f[g].apply(f,d)}if(typeof g=="string"){var c=g.toLowerCase();if(f[c]!=undefined&&b.isFunction(f[c])){return f[c].apply(f,d)}}return};b.jqx.getByPriority=function(c){var e=undefined;for(var d=0;d0?e[0]:e;var d=typeof(e)==Array||e.length>1?Array.prototype.slice.call(e,1):{};while(f[g]==undefined&&f.base!=null){if(f[g]&&b.isFunction(f[g])){return true}if(typeof g=="string"){var c=g.toLowerCase();if(f[c]&&b.isFunction(f[c])){return true}}f=f.base}if(f[g]&&b.isFunction(f[g])){return true}if(typeof g=="string"){var c=g.toLowerCase();if(f[c]&&b.isFunction(f[c])){return true}}return false};b.jqx.isPropertySetter=function(d,c){if(c.length==1&&typeof(c[0])=="object"){return true}if(c.length==2&&typeof(c[0])=="string"&&!b.jqx.hasFunction(d,c)){return true}return false};b.jqx.validatePropertySetter=function(g,e,c){if(!b.jqx.propertySetterValidation){return true}if(e.length==1&&typeof(e[0])=="object"){for(var f in e[0]){var h=g;while(!h.hasOwnProperty(f)&&h.base){h=h.base}if(!h||!h.hasOwnProperty(f)){if(!c){var d=h.hasOwnProperty(f.toString().toLowerCase());if(!d){throw"Invalid property: "+f}else{return true}}return false}}return true}if(e.length!=2){if(!c){throw"Invalid property: "+e.length>=0?e[0]:""}return false}while(!g.hasOwnProperty(e[0])&&g.base){g=g.base}if(!g||!g.hasOwnProperty(e[0])){if(!c){throw"Invalid property: "+e[0]}return false}return true};if(!Object.keys){Object.keys=(function(){var e=Object.prototype.hasOwnProperty,f=!({toString:null}).propertyIsEnumerable("toString"),d=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],c=d.length;return function(j){if(typeof j!=="object"&&(typeof j!=="function"||j===null)){throw new TypeError("Object.keys called on non-object")}var g=[],k,h;for(k in j){if(e.call(j,k)){g.push(k)}}if(f){for(h=0;h1){var g=!f.base?f.element:f.base.element;var c=b.data(g,f.widgetName).initArgs;if(c&&JSON&&JSON.stringify&&i[0]&&c[0]){try{if(JSON.stringify(i[0])==JSON.stringify(c[0])){var h=true;b.each(i[0],function(l,m){if(f[l]!=m){h=false;return false}});if(h){return}}}catch(e){}}f.batchUpdate=i[0];var j={};var k={};b.each(i[0],function(l,m){var n=f;while(!n.hasOwnProperty(l)&&n.base!=null){n=n.base}if(n.hasOwnProperty(l)){if(f[l]!=m){j[l]=f[l];k[l]=m;d++}}else{if(n.hasOwnProperty(l.toLowerCase())){if(f[l.toLowerCase()]!=m){j[l.toLowerCase()]=f[l.toLowerCase()];k[l.toLowerCase()]=m;d++}}}});if(d<2){f.batchUpdate=null}}b.each(i[0],function(l,m){var n=f;while(!n.hasOwnProperty(l)&&n.base!=null){n=n.base}if(n.hasOwnProperty(l)){b.jqx.setvalueraiseevent(n,l,m)}else{if(n.hasOwnProperty(l.toLowerCase())){b.jqx.setvalueraiseevent(n,l.toLowerCase(),m)}else{if(b.jqx.propertySetterValidation){throw"jqxCore: invalid property '"+l+"'"}}}});if(f.batchUpdate!=null){f.batchUpdate=null;if(f.propertiesChangedHandler&&d>1){f.propertiesChangedHandler(f,j,k)}}}else{if(i.length==2){while(!f.hasOwnProperty(i[0])&&f.base){f=f.base}if(f.hasOwnProperty(i[0])){b.jqx.setvalueraiseevent(f,i[0],i[1])}else{if(f.hasOwnProperty(i[0].toLowerCase())){b.jqx.setvalueraiseevent(f,i[0].toLowerCase(),i[1])}else{if(b.jqx.propertySetterValidation){throw"jqxCore: invalid property '"+i[0]+"'"}}}}}};b.jqx.setvalueraiseevent=function(d,e,f){var c=d[e];d[e]=f;if(!d.isInitialized){return}if(d.propertyChangedHandler!=undefined){d.propertyChangedHandler(d,e,c,f)}if(d.propertyChangeMap!=undefined&&d.propertyChangeMap[e]!=undefined){d.propertyChangeMap[e](d,e,c,f)}};b.jqx.get=function(f,e){if(e==undefined||e==null){return undefined}if(f.propertyMap){var d=f.propertyMap(e);if(d!=null){return d}}if(f.hasOwnProperty(e)){return f[e]}if(f.hasOwnProperty(e.toLowerCase())){return f[e.toLowerCase()]}var c=undefined;if(typeof(e)==Array){if(e.length!=1){return undefined}c=e[0]}else{if(typeof(e)=="string"){c=e}}while(!f.hasOwnProperty(c)&&f.base){f=f.base}if(f){return f[c]}return undefined};b.jqx.serialize=function(f){var c="";if(b.isArray(f)){c="[";for(var e=0;e0){c+=", "}c+=b.jqx.serialize(f[e])}c+="]"}else{if(typeof(f)=="object"){c="{";var d=0;for(var e in f){if(d++>0){c+=", "}c+=e+": "+b.jqx.serialize(f[e])}c+="}"}else{c=f.toString()}}return c};b.jqx.propertySetterValidation=true;b.jqx.jqxWidgetProxy=function(h,d,c){var e=b(d);var g=b.data(d,h);if(g==undefined){return undefined}var f=g.instance;if(b.jqx.hasFunction(f,c)){return b.jqx.invoke(f,c)}if(b.jqx.isPropertySetter(f,c)){if(b.jqx.validatePropertySetter(f,c)){b.jqx.set(f,c);return undefined}}else{if(typeof(c)=="object"&&c.length==0){return}else{if(typeof(c)=="object"&&c.length==1&&b.jqx.hasProperty(f,c[0])){return b.jqx.get(f,c[0])}else{if(typeof(c)=="string"&&b.jqx.hasProperty(f,c[0])){return b.jqx.get(f,c)}}}}throw"jqxCore: Invalid parameter '"+b.jqx.serialize(c)+"' does not exist."};b.jqx.applyWidget=function(d,f,l,m){var h=false;try{h=window.MSApp!=undefined}catch(g){}var n=b(d);if(!m){m=new b.jqx["_"+f]()}else{m.host=n;m.element=d}if(d.id==""){d.id=b.jqx.utilities.createId()}var k={host:n,element:d,instance:m,initArgs:l};m.widgetName=f;b.data(d,f,k);b.data(d,"jqxWidget",k.instance);var j=new Array();var m=k.instance;while(m){m.isInitialized=false;j.push(m);m=m.base}j.reverse();j[0].theme=b.jqx.theme||"";b.jqx.jqxWidgetProxy(f,d,l);for(var c in j){m=j[c];if(c==0){m.host=n;m.element=d;m.WinJS=h}if(m!=undefined){if(m.definedInstance){m.definedInstance()}if(m.createInstance!=null){if(h){MSApp.execUnsafeLocalFunction(function(){m.createInstance(l)})}else{m.createInstance(l)}}}}for(var c in j){if(j[c]!=undefined){j[c].isInitialized=true}}if(h){MSApp.execUnsafeLocalFunction(function(){k.instance.refresh(true)})}else{k.instance.refresh(true)}};b.jqx.jqxWidget=function(c,d,g){var j=false;try{var l=Array.prototype.slice.call(g,0)}catch(i){var l=""}try{j=window.MSApp!=undefined}catch(i){}var h=c;var m="";if(d){m="_"+d}b.jqx.define(b.jqx,"_"+h,m);var k=new Array();if(!window[h]){var f=function(n){if(n==null){return""}var e=b.type(n);switch(e){case"string":case"number":case"date":case"boolean":case"bool":if(n===null){return""}return n.toString()}var o="";b.each(n,function(q,r){var t=r;if(q>0){o+=", "}o+="[";var p=0;if(b.type(t)=="object"){for(var s in t){if(p>0){o+=", "}o+="{"+s+":"+t[s]+"}";p++}}else{if(p>0){o+=", "}o+="{"+q+":"+t+"}";p++}o+="]"});return o};a[h]=window[h]=function(e,s){var n=[];if(!s){s={}}n.push(s);var o=e;if(b.type(o)==="object"&&e[0]){o=e[0].id;if(o===""){o=e[0].id=b.jqx.utilities.createId()}}else{if(b.type(e)==="object"&&e&&e.nodeName){o=e.id;if(o===""){o=e.id=b.jqx.utilities.createId()}}}if(window.jqxWidgets&&window.jqxWidgets[o]){if(s){b.each(window.jqxWidgets[o],function(t){var u=b(this.element).data();if(u&&u.jqxWidget){b(this.element)[h](s)}})}if(window.jqxWidgets[o].length==1){var q=b(window.jqxWidgets[o][0].widgetInstance.element).data();if(q&&q.jqxWidget){return window.jqxWidgets[o][0]}}var q=b(window.jqxWidgets[o][0].widgetInstance.element).data();if(q&&q.jqxWidget){return window.jqxWidgets[o]}}var p=b(e);if(p.length===0){p=b("
");if(h==="jqxInput"||h==="jqxPasswordInput"||h==="jqxMaskedInput"){p=b("")}if(h==="jqxTextArea"){p=b("")}if(h==="jqxButton"||h==="jqxRepeatButton"||h==="jqxToggleButton"){p=b("
","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};if(typeof s==="string"&&!r.test(s)&&(b.support.htmlSerialize||!k.test(s))&&(b.support.leadingWhitespace||!q.test(s))&&!t[(p.exec(s)||["",""])[1].toLowerCase()]){s=s.replace(h,"<$1>");try{for(;m=0&&d.indexOf(".net4.0c")>=0){e.browser="msie";e.version="11";c[1]="msie"}if(d.indexOf("edge")>=0){e.browser="msie";e.version="12";c[1]="msie"}e[c[1]]=c[1];return e}});b.jqx.browser=b.jqx.utilities.getBrowser();b.jqx.isHidden=function(d){if(!d||!d[0]){return false}var c=d[0].offsetWidth,e=d[0].offsetHeight;if(c===0||e===0){return true}else{return false}};b.jqx.ariaEnabled=true;b.jqx.aria=function(d,f,e){if(!b.jqx.ariaEnabled){return}if(f==undefined){b.each(d.aria,function(h,i){var k=!d.base?d.host.attr(h):d.base.host.attr(h);if(k!=undefined&&!b.isFunction(k)){var j=k;switch(i.type){case"number":j=new Number(k);if(isNaN(j)){j=k}break;case"boolean":j=k=="true"?true:false;break;case"date":j=new Date(k);if(j=="Invalid Date"||isNaN(j)){j=k}break}d[i.name]=j}else{var k=d[i.name];if(b.isFunction(k)){k=d[i.name]()}if(k==undefined){k=""}try{!d.base?d.host.attr(h,k.toString()):d.base.host.attr(h,k.toString())}catch(g){}}})}else{try{if(d.host){if(!d.base){if(d.host){if(d.element.setAttribute){d.element.setAttribute(f,e.toString())}else{d.host.attr(f,e.toString())}}else{d.attr(f,e.toString())}}else{if(d.base.host){d.base.host.attr(f,e.toString())}else{d.attr(f,e.toString())}}}else{if(d.setAttribute){d.setAttribute(f,e.toString())}}}catch(c){}}};if(!Array.prototype.indexOf){Array.prototype.indexOf=function(d){var c=this.length;var e=Number(arguments[1])||0;e=(e<0)?Math.ceil(e):Math.floor(e);if(e<0){e+=c}for(;e1){}if(d.indexOf("Android")!=-1){return true}if(d.indexOf("IEMobile")!=-1){return true}if(d.indexOf("Windows Phone")!=-1){return true}if(d.indexOf("WPDesktop")!=-1){return true}if(d.indexOf("ZuneWP7")!=-1){return true}if(d.indexOf("BlackBerry")!=-1&&d.indexOf("Mobile Safari")!=-1){return true}if(d.indexOf("ipod")!=-1){return true}if(d.indexOf("nokia")!=-1||d.indexOf("Nokia")!=-1){return true}if(d.indexOf("Chrome/17")!=-1){return false}if(d.indexOf("CrOS")!=-1){return false}if(d.indexOf("Opera")!=-1&&d.indexOf("Mobi")==-1&&d.indexOf("Mini")==-1&&d.indexOf("Platform: Win")!=-1){return false}if(d.indexOf("HybridDeviceTouch")!=-1){return true}if(d.indexOf("HybridDeviceMouse")!=-1){return false}if(d.indexOf("Opera")!=-1&&d.indexOf("Mobi")!=-1&&d.indexOf("Opera Mobi")!=-1){return true}if(d.indexOf("Mozilla/5.0 (X11; Linux x86_64)")!=-1){return false}var f={ios:"i(?:Pad|Phone|Pod)(?:.*)CPU(?: iPhone)? OS ",android:"(Android |HTC_|Silk/)",blackberry:"BlackBerry(?:.*)Version/",rimTablet:"RIM Tablet OS ",webos:"(?:webOS|hpwOS)/",bada:"Bada/"};try{if(this.touchDevice!=undefined){return this.touchDevice}this.touchDevice=false;for(var h in f){if(f.hasOwnProperty(h)){var k=f[h];var g=d.match(new RegExp("(?:"+k+")([^\\s;]+)"));if(g){if(h.toString()=="blackberry"){this.touchDevice=false;return false}this.touchDevice=true;return true}}}var j=navigator.userAgent;if(navigator.platform.toLowerCase().indexOf("win")!=-1){if(j.indexOf("Windows Phone")>=0||j.indexOf("WPDesktop")>=0||j.indexOf("IEMobile")>=0||j.indexOf("ZuneWP7")>=0){this.touchDevice=true;return true}else{if(j.indexOf("Touch")>=0){var c=("MSPointerDown" in window)||("pointerdown" in window);if(c){this.touchDevice=true;return true}if(j.indexOf("ARM")>=0){this.touchDevice=true;return true}this.touchDevice=false;return false}}}if(navigator.platform.toLowerCase().indexOf("win")!=-1){this.touchDevice=false;return false}if(("ontouchstart" in window)||window.DocumentTouch&&document instanceof DocumentTouch){this.touchDevice=true}return this.touchDevice}catch(l){this.touchDevice=false;return false}},getLeftPos:function(c){var d=c.offsetLeft;while((c=c.offsetParent)!=null){if(c.tagName!="HTML"){d+=c.offsetLeft;if(document.all){d+=c.clientLeft}}}return d},getTopPos:function(d){var f=d.offsetTop;var c=b(d).coord();while((d=d.offsetParent)!=null){if(d.tagName!="HTML"){f+=(d.offsetTop-d.scrollTop);if(document.all){f+=d.clientTop}}}var e=navigator.userAgent.toLowerCase();var g=(e.indexOf("windows phone")!=-1||e.indexOf("WPDesktop")!=-1||e.indexOf("ZuneWP7")!=-1||e.indexOf("msie 9")!=-1||e.indexOf("msie 11")!=-1||e.indexOf("msie 10")!=-1)&&e.indexOf("touch")!=-1;if(g){return c.top}if(this.isSafariMobileBrowser()){if(this.isSafari4MobileBrowser()&&this.isIPadSafariMobileBrowser()){return f}if(e.indexOf("version/7")!=-1){return c.top}if(e.indexOf("version/6")!=-1||e.indexOf("version/5")!=-1){f=f+b(window).scrollTop()}if(/(Android.*Chrome\/[.0-9]* (!?Mobile))/.exec(navigator.userAgent)){return f+b(window).scrollTop()}if(/(Android.*Chrome\/[.0-9]* Mobile)/.exec(navigator.userAgent)){return f+b(window).scrollTop()}return c.top}return f},isChromeMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("android")!=-1;return c},isOperaMiniMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("opera mini")!=-1||d.indexOf("opera mobi")!=-1;return c},isOperaMiniBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("opera mini")!=-1;return c},isNewSafariMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("ipad")!=-1||d.indexOf("iphone")!=-1||d.indexOf("ipod")!=-1;c=c&&(d.indexOf("version/5")!=-1);return c},isSafari4MobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("ipad")!=-1||d.indexOf("iphone")!=-1||d.indexOf("ipod")!=-1;c=c&&(d.indexOf("version/4")!=-1);return c},isWindowsPhone:function(){var d=navigator.userAgent.toLowerCase();var c=(d.indexOf("windows phone")!=-1||d.indexOf("WPDesktop")!=-1||d.indexOf("ZuneWP7")!=-1||d.indexOf("msie 9")!=-1||d.indexOf("msie 11")!=-1||d.indexOf("msie 10")!=-1&&d.indexOf("touch")!=-1);return c},isSafariMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();if(/(Android.*Chrome\/[.0-9]* (!?Mobile))/.exec(navigator.userAgent)){return true}if(/(Android.*Chrome\/[.0-9]* Mobile)/.exec(navigator.userAgent)){return true}var c=d.indexOf("ipad")!=-1||d.indexOf("iphone")!=-1||d.indexOf("ipod")!=-1||d.indexOf("mobile safari")!=-1;return c},isIPadSafariMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("ipad")!=-1;return c},isMobileBrowser:function(){var d=navigator.userAgent.toLowerCase();var c=d.indexOf("ipad")!=-1||d.indexOf("iphone")!=-1||d.indexOf("android")!=-1;return c},getTouches:function(c){if(c.originalEvent){if(c.originalEvent.touches&&c.originalEvent.touches.length){return c.originalEvent.touches}else{if(c.originalEvent.changedTouches&&c.originalEvent.changedTouches.length){return c.originalEvent.changedTouches}}}if(!c.touches){c.touches=new Array();c.touches[0]=c.originalEvent!=undefined?c.originalEvent:c;if(c.originalEvent!=undefined&&c.pageX){c.touches[0]=c}if(c.type=="mousemove"){c.touches[0]=c}}return c.touches},getTouchEventName:function(c){if(this.isWindowsPhone()){var d=navigator.userAgent.toLowerCase();if(d.indexOf("windows phone 7")!=-1){if(c.toLowerCase().indexOf("start")!=-1){return"MSPointerDown"}if(c.toLowerCase().indexOf("move")!=-1){return"MSPointerMove"}if(c.toLowerCase().indexOf("end")!=-1){return"MSPointerUp"}}if(c.toLowerCase().indexOf("start")!=-1){return"pointerdown"}if(c.toLowerCase().indexOf("move")!=-1){return"pointermove"}if(c.toLowerCase().indexOf("end")!=-1){return"pointerup"}}else{return c}},dispatchMouseEvent:function(c,g,f){if(this.simulatetouches){return}var d=document.createEvent("MouseEvent");d.initMouseEvent(c,true,true,g.view,1,g.screenX,g.screenY,g.clientX,g.clientY,false,false,false,false,0,null);if(f!=null){f.dispatchEvent(d)}},getRootNode:function(c){while(c.nodeType!==1){c=c.parentNode}return c},setTouchScroll:function(c,d){if(!this.enableScrolling){this.enableScrolling=[]}this.enableScrolling[d]=c},touchScroll:function(B,M,Z,H,x,n){if(B==null){return}var G=this;var f=0;var r=0;var g=0;var i=0;var t=0;var j=0;if(!this.scrolling){this.scrolling=[]}this.scrolling[H]=false;var k=false;var p=b(B);var R=["select","input","textarea"];var X=0;var J=0;if(!this.enableScrolling){this.enableScrolling=[]}this.enableScrolling[H]=true;var H=H;var w=this.getTouchEventName("touchstart")+".touchScroll";var D=this.getTouchEventName("touchend")+".touchScroll";var ab=this.getTouchEventName("touchmove")+".touchScroll";var l,W,z,ah,V,Y,aj,Q,aa,d,F,ad,af,O,e,v,u,S,c,E,ag,o;Q=M;var aj=0;var aa=0;var h=0;var T=0;var ai=0;var Y=x.jqxScrollBar("max");var o=325;function A(am){if(am.targetTouches&&(am.targetTouches.length>=1)){return am.targetTouches[0].clientY}else{if(am.originalEvent&&am.originalEvent.clientY!==undefined){return am.originalEvent.clientY}else{var al=G.getTouches(am);return al[0].clientY}}}function ae(am){if(am.targetTouches&&(am.targetTouches.length>=1)){return am.targetTouches[0].clientX}else{if(am.originalEvent&&am.originalEvent.clientX!==undefined){return am.originalEvent.clientX}else{var al=G.getTouches(am);return al[0].clientX}}}var I=function(){var ap,am,aq,ao;ap=Date.now();am=ap-v;v=ap;aq=aa-e;var an=h-ah;e=aa;ah=h;F=true;ao=1000*aq/(1+am);var al=1000*an/(1+am);af=0.8*ao+0.2*af;O=0.8*al+0.2*O};var C=false;var X=function(am){if(!G.enableScrolling[H]){return true}if(b.inArray(am.target.tagName.toLowerCase(),R)!==-1){return}aa=n.jqxScrollBar("value");h=x.jqxScrollBar("value");var an=G.getTouches(am);var ao=an[0];if(an.length==1){G.dispatchMouseEvent("mousedown",ao,G.getRootNode(ao.target))}Y=x.jqxScrollBar("max");Q=n.jqxScrollBar("max");function al(ap){C=false;F=true;d=A(ap);ag=ae(ap);af=S=O=0;e=aa;ah=h;v=Date.now();clearInterval(u);u=setInterval(I,100);T=aa;ai=h;if(aa>0&&aaQ)?Q:(amQ)?"max":(amY)?Y:(amY)?"max":(am0.5||am<-0.5){ac(c+am);requestAnimationFrame(U)}else{ac(c)}}}function N(){var al,am;if(S){al=Date.now()-v;am=-S*Math.exp(-al/o);if(am>0.5||am<-0.5){m(E+am);requestAnimationFrame(N)}else{m(E)}}}var y=function(al){if(!G.enableScrolling[H]){return true}if(!G.scrolling[H]){return true}if(C){al.preventDefault();al.stopPropagation()}var aq=G.getTouches(al);if(aq.length>1){return true}var am=aq[0].pageY;var ao=aq[0].pageX;if(G.simulatetouches){if(aq[0]._pageY!=undefined){am=aq[0]._pageY;ao=aq[0]._pageX}}var au=am-r;var av=ao-t;J=am;var at=ao;g=au-f;j=av-i;k=true;f=au;i=av;var an=x!=null?x[0].style.visibility!="hidden":true;var ar=n!=null?n[0].style.visibility!="hidden":true;function ap(ay){var aA,az,ax;if(F){aA=A(ay);ax=ae(ay);az=d-aA;V=ag-ax;var aw="value";if(az>2||az<-2){d=aA;aw=ac(aa+az,ay);I();if(aw=="min"&&T===0){return true}if(aw=="max"&&T===Q){return true}if(!ar){return true}ay.preventDefault();ay.stopPropagation();C=true;return false}else{if(V>2||V<-2){ag=ax;aw=m(h+V,ay);I();if(aw=="min"&&ai===0){return true}if(aw=="max"&&ai===Y){return true}if(!an){return true}C=true;ay.preventDefault();ay.stopPropagation();return false}}ay.preventDefault()}}if(an||ar){if((an)||(ar)){ap(al)}}};if(p.on){p.on(ab,y)}else{p.bind(ab,y)}var s=function(am){if(!G.enableScrolling[H]){return true}var an=G.getTouches(am)[0];if(!G.scrolling[H]){return true}F=false;clearInterval(u);if(af>10||af<-10){S=0.8*af;c=Math.round(aa+S);v=Date.now();requestAnimationFrame(U)}else{if(O>10||O<-10){S=0.8*O;E=Math.round(h+S);v=Date.now();requestAnimationFrame(N)}else{}}G.scrolling[H]=false;if(k){G.dispatchMouseEvent("mouseup",an,am.target)}else{var an=G.getTouches(am)[0],al=G.getRootNode(an.target);G.dispatchMouseEvent("mouseup",an,al);G.dispatchMouseEvent("click",an,al);return true}};if(this.simulatetouches){var q=b(window).on!=undefined||b(window).bind;var P=function(al){try{s(al)}catch(am){}G.scrolling[H]=false};b(window).on!=undefined?b(document).on("mouseup.touchScroll",P):b(document).bind("mouseup.touchScroll",P);if(window.frameElement){if(window.top!=null){var L=function(al){try{s(al)}catch(am){}G.scrolling[H]=false};if(window.top.document){b(window.top.document).on?b(window.top.document).on("mouseup",L):b(window.top.document).bind("mouseup",L)}}}var ak=b(document).on!=undefined||b(document).bind;var K=function(al){if(!G.scrolling[H]){return true}G.scrolling[H]=false;var an=G.getTouches(al)[0],am=G.getRootNode(an.target);G.dispatchMouseEvent("mouseup",an,am);G.dispatchMouseEvent("click",an,am)};b(document).on!=undefined?b(document).on("touchend",K):b(document).bind("touchend",K)}if(p.on){p.on("dragstart",function(al){al.preventDefault()});p.on("selectstart",function(al){al.preventDefault()})}p.on?p.on(D+" touchcancel.touchScroll",s):p.bind(D+" touchcancel.touchScroll",s)}});b.jqx.cookie=b.jqx.cookie||{};b.extend(b.jqx.cookie,{cookie:function(f,g,d){if(arguments.length>1&&String(g)!=="[object Object]"){d=b.extend({},d);if(g===null||g===undefined){d.expires=-1}if(typeof d.expires==="number"){var i=d.expires,e=d.expires=new Date();e.setDate(e.getDate()+i)}g=String(g);return(document.cookie=[encodeURIComponent(f),"=",d.raw?g:encodeURIComponent(g),d.expires?"; expires="+d.expires.toUTCString():"",d.path?"; path="+d.path:"",d.domain?"; domain="+d.domain:"",d.secure?"; secure":""].join(""))}d=g||{};var c,h=d.raw?function(j){return j}:decodeURIComponent;return(c=new RegExp("(?:^|; )"+encodeURIComponent(f)+"=([^;]*)").exec(document.cookie))?h(c[1]):null}});b.jqx.string=b.jqx.string||{};b.extend(b.jqx.string,{replace:function(g,e,f){if(e===f){return this}var c=g;var d=c.indexOf(e);while(d!=-1){c=c.replace(e,f);d=c.indexOf(e)}return c},contains:function(c,d){if(c==null||d==null){return false}return c.indexOf(d)!=-1},containsIgnoreCase:function(c,d){if(c==null||d==null){return false}return c.toString().toUpperCase().indexOf(d.toString().toUpperCase())!=-1},equals:function(c,d){if(c==null||d==null){return false}c=this.normalize(c);if(d.length==c.length){return c.slice(0,d.length)==d}return false},equalsIgnoreCase:function(c,d){if(c==null||d==null){return false}c=this.normalize(c);if(d.length==c.length){return c.toUpperCase().slice(0,d.length)==d.toUpperCase()}return false},startsWith:function(c,d){if(c==null||d==null){return false}return c.slice(0,d.length)==d},startsWithIgnoreCase:function(c,d){if(c==null||d==null){return false}return c.toUpperCase().slice(0,d.length)==d.toUpperCase()},normalize:function(c){if(c.charCodeAt(c.length-1)==65279){c=c.substring(0,c.length-1)}return c},endsWith:function(c,d){if(c==null||d==null){return false}c=this.normalize(c);return c.slice(-d.length)==d},endsWithIgnoreCase:function(c,d){if(c==null||d==null){return false}c=this.normalize(c);return c.toUpperCase().slice(-d.length)==d.toUpperCase()}});b.extend(b.easing,{easeOutBack:function(f,g,e,j,i,h){if(h==undefined){h=1.70158}return j*((g=g/i-1)*g*((h+1)*g+h)+1)+e},easeInQuad:function(f,g,e,i,h){return i*(g/=h)*g+e},easeInOutCirc:function(f,g,e,i,h){if((g/=h/2)<1){return -i/2*(Math.sqrt(1-g*g)-1)+e}return i/2*(Math.sqrt(1-(g-=2)*g)+1)+e},easeInOutSine:function(f,g,e,i,h){return -i/2*(Math.cos(Math.PI*g/h)-1)+e},easeInCubic:function(f,g,e,i,h){return i*(g/=h)*g*g+e},easeOutCubic:function(f,g,e,i,h){return i*((g=g/h-1)*g*g+1)+e},easeInOutCubic:function(f,g,e,i,h){if((g/=h/2)<1){return i/2*g*g*g+e}return i/2*((g-=2)*g*g+2)+e},easeInSine:function(f,g,e,i,h){return -i*Math.cos(g/h*(Math.PI/2))+i+e},easeOutSine:function(f,g,e,i,h){return i*Math.sin(g/h*(Math.PI/2))+e},easeInOutSine:function(f,g,e,i,h){return -i/2*(Math.cos(Math.PI*g/h)-1)+e}})})(jqxBaseFramework);(function(b){if(b.event&&b.event.special){b.extend(b.event.special,{close:{noBubble:true},open:{noBubble:true},cellclick:{noBubble:true},rowclick:{noBubble:true},tabclick:{noBubble:true},selected:{noBubble:true},expanded:{noBubble:true},collapsed:{noBubble:true},valuechanged:{noBubble:true},expandedItem:{noBubble:true},collapsedItem:{noBubble:true},expandingItem:{noBubble:true},collapsingItem:{noBubble:true}})}if(b.fn.extend){b.fn.extend({ischildof:function(g){if(!b(this).parents){var c=g.element.contains(this.element);return c}var e=b(this).parents().get();for(var d=0;d=0){var c=b(this).find(".jqx-widget").data().jqxWidget;if(c&&c.val){return c.val()}}return a.call(this)}else{if(b(this).hasClass("jqx-widget")){var c=b(this).data().jqxWidget;if(c&&c.val){if(arguments.length!=2){return c.val(d)}else{return c.val(d,arguments[1])}}}if(this[0]&&this[0].tagName.toLowerCase().indexOf("angular")>=0){var c=b(this).find(".jqx-widget").data().jqxWidget;if(c&&c.val){if(arguments.length!=2){return c.val(d)}else{return c.val(d,arguments[1])}}}return a.call(this,d)}};if(b.fn.modal&&b.fn.modal.Constructor){b.fn.modal.Constructor.prototype.enforceFocus=function(){b(document).off("focusin.bs.modal").on("focusin.bs.modal",b.proxy(function(c){if(this.$element[0]!==c.target&&!this.$element.has(c.target).length){if(b(c.target).parents().hasClass("jqx-popup")){return true}this.$element.trigger("focus")}},this))}}b.fn.coord=function(n){var e,j,i={top:0,left:0},f=this[0],l=f&&f.ownerDocument;if(!l){return}e=l.documentElement;if(!b.contains(e,f)){return i}if(typeof f.getBoundingClientRect!==undefined){i=f.getBoundingClientRect()}var d=function(o){return b.isWindow(o)?o:o.nodeType===9?o.defaultView||o.parentWindow:false};j=d(l);var h=0;var c=0;var g=navigator.userAgent.toLowerCase();var m=g.indexOf("ipad")!=-1||g.indexOf("iphone")!=-1;if(m){h=2}if(true==n){if(document.body.style.position!="static"&&document.body.style.position!=""){var k=b(document.body).coord();h=-k.left;c=-k.top}}return{top:c+i.top+(j.pageYOffset||e.scrollTop)-(e.clientTop||0),left:h+i.left+(j.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}};b.jqx.ripplers=[];b.jqx.ripple=function(f,e,o){if(!e){e=f}var h=b(f);var j=false;h.append("");var p=h.find(".ink");var c=false;for(var g=0;g")}var r=d.find(".ink");r.removeClass("animate");if(!r.height()&&!r.width()){var s=Math.max(d.outerWidth(),d.outerHeight());r.css({height:s,width:s})}if(o==="checkbox"||o==="radiobutton"){if(o==="checkbox"){if(e.jqxCheckBox("disabled")){return}}if(o==="radiobutton"){if(e.jqxRadioButton("disabled")){return}}var q=d.width()/2-r.width()/2;var t=d.height()/2-r.height()/2;r.css({top:t+"px",left:q+"px"}).addClass("animate");r.on("animationend",function(){if(b.jqx.ripple.mouseCaptured){r.removeClass("animate");r.addClass("active");f.addClass("active")}});return}var q=i.pageX-d.offset().left-r.width()/2;var t=i.pageY-d.offset().top-r.height()/2;r.css({top:t+"px",left:q+"px"}).addClass("animate")})})}})(jqxBaseFramework); + +(function(i){if(!Array.prototype.find){Object.defineProperty(Array.prototype,"find",{value:function(H){if(this==null){throw TypeError('"this" is null or not defined')}var L=Object(this);var e=L.length>>>0;if(typeof H!=="function"){throw TypeError("predicate must be a function")}var I=arguments[1];var J=0;while(J>>0;if(typeof N!=="function"){throw TypeError()}var P=arguments[1],O;for(O=0;O=0){if(NK.length){I.push.apply(I,new Array(N-K.length))}}}else{throw new RangeError("Invalid array length")}return M}});i.jqx.observableArray.prototype.fromArray=function(O,N){var M=new i.jqx.observableArray(O,N);return M};i.jqx.observableArray.prototype.clone=function(){var M=new i.jqx.observableArray(K,J);M.observing=I.observing;M.changes=I.changes;M.notifier=I.notifier;return M};I.remove=function(N){if(N<0||N>=I.length){throw new Error("Invalid index : "+N)}if(I.hasOwnProperty(N)){var M=I[N];I[N]=undefined;K[N]=undefined;if(typeof H==="function"){H({object:I,type:"delete",index:N,name:"index",newValue:undefined,oldValue:M})}return true}return false};I.concat=function(N,P){var M=K.concat(N);var O=new i.jqx.observableArray(M,P);return O};Object.getOwnPropertyNames(Array.prototype).forEach(function(M){if(!(M in I)){var N=function(){var Q=I.observing;I.observing=false;var P=K[M];var O=P.apply(K,arguments);I.observing=Q;return O};Object.defineProperty(I,M,{configurable:false,enumerable:true,writeable:false,value:N})}});I.set=function(N,P){if(i.type(N)=="string"&&N.split(".").length>1){var M=N.split(".");var Q=I;for(var O=0;O=I.length){throw new Error("Invalid Index: "+N)}}if(O=I.length){I.push(P)}else{I[N]=P}return true};I.get=function(M){return I[M]};if(e instanceof Array){I.push.apply(I,e)}H=function(){if(!I.observing){return}if(arguments&&arguments[0]){I.changes.push(arguments[0])}if(J){J.apply(I,arguments)}if(I.notifier){I.notifier.apply(I,arguments)}};return I};i.jqx.formatDate=function(H,J,I){var e=i.jqx.dataFormat.formatdate(H,J,I);return e};i.jqx.formatNumber=function(H,J,I){var e=i.jqx.dataFormat.formatnumber(H,J,I);return e};i.jqx.dataAdapter=function(J,e){if(J!=undefined){if(J.dataFields!==undefined){J.datafields=J.dataFields}if(J.dataType!==undefined){J.datatype=J.dataType}if(J.localData!==undefined){J.localdata=J.localData}if(J.sortColumn!==undefined){J.sortcolumn=J.sortColumn}if(J.sortDirection!==undefined){J.sortdirection=J.sortDirection}if(J.sortColumns!==undefined){J.sortcolumns=J.sortColumns}if(J.sortDirections!==undefined){J.sortdirections=J.sortDirections}if(J.sortOrder!==undefined){J.sortdirection=J.sortOrder}if(J.formatData!==undefined){J.formatdata=J.formatData}if(J.processData!==undefined){J.processdata=J.processData}if(J.pageSize!==undefined){J.pagesize=J.pageSize}if(J.pageNum!==undefined){J.pagenum=J.pageNum}if(J.updateRow!==undefined){J.updaterow=J.updateRow}if(J.addRow!==undefined){J.addrow=J.addRow}if(J.deleteRow!==undefined){J.deleterow=J.deleteRow}if(J.contentType!==undefined){J.contenttype=J.contentType}if(J.totalRecords!=undefined){J.totalrecords=J.totalRecords}if(J.loadError!=undefined){J.loadError=J.loadError}if(J.sortComparer!=undefined){J.sortcomparer=J.sortComparer}}this._source=J;this._options=e||{};if(J.beforeLoadComplete!=undefined){this._options.beforeLoadComplete=this._source.beforeLoadComplete}if(J.downloadComplete!=undefined){this._options.downloadComplete=this._source.downloadComplete}if(J.loadComplete!=undefined){this._options.loadComplete=this._source.loadComplete}if(J.autoBind!=undefined){this._options.downloadComplete=this._source.autoBind}if(J.formatData!=undefined){this._options.formatData=this._source.formatData}if(J.loadError!=undefined){this._options.loadError=this._source.loadError}if(J.beforeSend!=undefined){this._options.beforeSend=this._source.beforeSend}if(J.contentType!=undefined){this._options.contentType=this._source.contentType}if(J.async!=undefined){this._options.async=this._source.async}if(J.loadServerData!=undefined){this._options.loadServerData=this._source.loadServerData}if(J.uniqueDataFields!=undefined){this._options.uniqueDataFields=this._source.uniqueDataFields}this.records=new Array();this._downloadComplete=new Array();this._bindingUpdate=new Array();if(J!=undefined&&J.localdata!=null&&typeof J.localdata=="function"){var I=J.localdata();if(I!=null){J._localdata=J.localdata;var H=this;if(J._localdata.subscribe){H._oldlocaldata=[];J._localdata.subscribe(function(K){var L=function(M){if(i.isArray(M)){return i.makeArray(L(i(M)))}return i.extend(true,{},M)};if(H.suspendKO==false||H.suspendKO==undefined||H._oldlocaldata.length==0){H._oldlocaldata=L(K)}},J._localdata,"beforeChange");J._localdata.subscribe(function(L){if(H.suspendKO==false||H.suspendKO==undefined){var K="";H._oldrecords=H.records;if(H._oldlocaldata.length==0){J.localdata=J._localdata()}if(H._oldlocaldata.length==0){K="change"}else{if(L){if(H._oldlocaldata.length==L.length){K="update"}if(H._oldlocaldata.length>L.length){K="remove"}if(H._oldlocaldata.length0){this.callBindingUpdate("update");this._changedrecords=[]}else{this.dataBind(null,"")}}},formatDate:function(H,J,I){var e=i.jqx.dataFormat.formatdate(H,J,I);return e},formatNumber:function(H,J,I){var e=i.jqx.dataFormat.formatnumber(H,J,I);return e},dataBind:function(R,aa){if(this.isUpdating==true){return}var W=this._source;if(!W){return}if(W.generatedfields){W.datafields=null;W.generatedfields=null}i.jqx.dataFormat.datescache=new Array();if(W.dataFields!=null){W.datafields=W.dataFields}if(W.recordstartindex==undefined){W.recordstartindex=0}if(W.recordendindex==undefined){W.recordendindex=0}if(W.loadallrecords==undefined){W.loadallrecords=true}if(W.root==undefined){W.root=""}if(W.record==undefined){W.record=""}if(W.sort!=undefined){this.sort=W.sort}if(W.filter!=undefined){this.filter=W.filter}else{this.filter=null}if(W.sortcolumn!=undefined){this.sortcolumn=W.sortcolumn}if(W.sortdirection!=undefined){this.sortdirection=W.sortdirection}if(W.sortcolumns!=undefined){this.sortcolumns=W.sortcolumns}if(W.sortdirections!=undefined){this.sortdirections=W.sortdirections}if(W.sortcomparer!=undefined){this.sortcomparer=W.sortcomparer}this.records=new Array();var K=this._options||{};this.virtualmode=K.virtualmode!=undefined?K.virtualmode:false;this.totalrecords=K.totalrecords!=undefined?K.totalrecords:0;this.pageable=K.pageable!=undefined?K.pageable:false;this.pagesize=K.pagesize!=undefined?K.pagesize:0;this.pagenum=K.pagenum!=undefined?K.pagenum:0;this.cachedrecords=K.cachedrecords!=undefined?K.cachedrecords:new Array();this.originaldata=new Array();this.recordids=new Array();this.updaterow=K.updaterow!=undefined?K.updaterow:null;this.addrow=K.addrow!=undefined?K.addrow:null;this.deleterow=K.deleterow!=undefined?K.deleterow:null;this.cache=K.cache!=undefined?K.cache:false;this.unboundmode=false;if(W.formatdata!=undefined){K.formatData=W.formatdata}if(W.data!=undefined){if(K.data==undefined){K.data={}}i.extend(K.data,W.data)}if(W.mapChar!=undefined){W.mapchar=W.mapChar}if(W.mapchar!=undefined){this.mapChar=W.mapchar?W.mapchar:">"}else{this.mapChar=K.mapChar?K.mapChar:">"}if(K.unboundmode||W.unboundmode){this.unboundmode=K.unboundmode||W.unboundmode}if(W.cache!=undefined){this.cache=W.cache}if(this.koSubscriptions){for(var ac=0;ac0){for(var Z=0;Z0){var an=ao;for(var ak=0;ak0){var aG=false;var aB=false;for(var ax=0;ax=0)){aG=true;at=aw.map;aE=aw.type;aC=aw.name;aB=true;var aF=an[ay];if(at!=null){var ar=at.split(ah.mapChar);if(ar.length>0){var az=an;for(var au=0;au0){var az=an;for(var au=0;au0){var aj=this;var am=H(aj,ad);am.uid=ak;ah.records[ah.records.length]=am}else{this.uid=ak;ah.records[ah.records.length]=this}})}else{if(ad==0){var V=0;var T=new Array();i.each(W.localdata,function(al,an){var aj=new Object(this);if(typeof an==="string"){ah.records=W.localdata;return false}else{var ak=ah.getid(W.id,aj,al);if(typeof(ak)==="object"){ak=al}aj.uid=ak;if(al==0){for(var ao in this){V++;var ap=i.type(this[ao]);T.push({name:ao,type:ap})}ad=V;W.datafields=T;W.generatedfields=T}if(ad>0){var am=H(aj,ad);am.uid=ak;ah.records[ah.records.length]=am}else{ah.records[ah.records.length]=aj}}})}else{i.each(W.localdata,function(al){var aj=this;var am=H(aj,ad);var ak=ah.getid(W.id,am,al);if(typeof(ak)==="object"){ak=al}var aj=new Object(am);aj.uid=ak;ah.records[ah.records.length]=aj})}}}this.originaldata=W.localdata;this.cachedrecords=this.records;this.addForeignValues(W);if(K.uniqueDataFields){var S=this.getUniqueRecords(this.records,K.uniqueDataFields);this.records=S;this.cachedrecords=S}if(K.beforeLoadComplete){var ae=K.beforeLoadComplete(ah.records,this.originaldata);if(ae!=undefined){ah.records=ae;ah.cachedrecords=ae}}if(K.autoSort&&K.autoSortField){var O=Object.prototype.toString;Object.prototype.toString=(typeof field=="function")?field:function(){return this[K.autoSortField]};ah.records.sort(function(ak,aj){if(ak===undefined){ak=null}if(aj===undefined){aj=null}if(ak===null&&aj===null){return 0}if(ak===null&&aj!==null){return 1}if(ak!==null&&aj===null){return -1}ak=ak.toString();aj=aj.toString();if(ak===null&&aj===null){return 0}if(ak===null&&aj!==null){return 1}if(ak!==null&&aj===null){return -1}if(i.jqx.dataFormat.isNumber(ak)&&i.jqx.dataFormat.isNumber(aj)){if(akaj){return 1}return 0}else{if(i.jqx.dataFormat.isDate(ak)&&i.jqx.dataFormat.isDate(aj)){if(akaj){return 1}return 0}else{if(!i.jqx.dataFormat.isNumber(ak)&&!i.jqx.dataFormat.isNumber(aj)){ak=String(ak).toLowerCase();aj=String(aj).toLowerCase()}}}try{if(akaj){return 1}}catch(al){var am=al}return 0});Object.prototype.toString=O}ah.loadedData=W.localdata;ah.buildHierarchy();if(i.isFunction(K.loadComplete)){K.loadComplete(W.localdata,ah.records)}break;case"json":case"jsonp":case"xml":case"xhtml":case"script":case"text":case"ics":if(W.localdata!=null&&!W.url){if(i.isFunction(W.beforeprocessing)){W.beforeprocessing(W.localdata)}if(W.datatype==="xml"){ah.loadxml(W.localdata,W.localdata,W)}else{if(Q==="text"){ah.loadtext(W.localdata,W)}else{if(Q==="ics"){ah.loadics(W.localdata,W)}else{ah.loadjson(W.localdata,W.localdata,W)}}}ah.addForeignValues(W);if(K.uniqueDataFields){var S=ah.getUniqueRecords(ah.records,K.uniqueDataFields);ah.records=S;ah.cachedrecords=S}if(K.beforeLoadComplete){var ae=K.beforeLoadComplete(ah.records,this.originaldata);if(ae!=undefined){ah.records=ae;ah.cachedrecords=ae}}ah.loadedData=W.localdata;ah.buildHierarchy.call(ah);if(i.isFunction(K.loadComplete)){K.loadComplete(W.localdata,ah.records)}ah.callBindingUpdate(aa);return}var af=K.data!=undefined?K.data:{};if(W.processdata){W.processdata(af)}if(i.isFunction(K.processData)){K.processData(af)}if(i.isFunction(K.formatData)){var e=K.formatData(af);if(e!=undefined){af=e}}var ab="application/x-www-form-urlencoded";if(K.contentType){ab=K.contentType}var J="GET";if(W.type){J=W.type}if(K.type){J=K.type}var X=Q;if(Q=="ics"){X="text"}if(W.url&&W.url.length>0){if(i.isFunction(K.loadServerData)){ah._requestData(af,W,K)}else{this.xhr=i.jqx.data.ajax({dataType:X,cache:this.cache,type:J,url:W.url,async:N,timeout:W.timeout,contentType:ab,data:af,success:function(am,aj,ap){if(i.isFunction(W.beforeprocessing)){var ao=W.beforeprocessing(am,aj,ap);if(ao!=undefined){am=ao}}if(i.isFunction(K.downloadComplete)){var ao=K.downloadComplete(am,aj,ap);if(ao!=undefined){am=ao}}if(am==null){ah.records=new Array();ah.cachedrecords=new Array();ah.originaldata=new Array();ah.callDownloadComplete();if(i.isFunction(K.loadComplete)){K.loadComplete(new Array())}return}var ak=am;if(am.records){ak=am.records}if(am.totalrecords!=undefined){W.totalrecords=am.totalrecords}else{if(am.totalRecords!=undefined){W.totalrecords=am.totalRecords}}if(W.datatype==="xml"){ah.loadxml(null,ak,W)}else{if(Q==="text"){ah.loadtext(ak,W)}else{if(Q==="ics"){ah.loadics(ak,W)}else{ah.loadjson(null,ak,W)}}}ah.addForeignValues(W);if(K.uniqueDataFields){var al=ah.getUniqueRecords(ah.records,K.uniqueDataFields);ah.records=al;ah.cachedrecords=al}if(K.beforeLoadComplete){var an=K.beforeLoadComplete(ah.records,am);if(an!=undefined){ah.records=an;ah.cachedrecords=an}}ah.loadedData=am;ah.buildHierarchy.call(ah);ah.callDownloadComplete();if(i.isFunction(K.loadComplete)){K.loadComplete(am,aj,ap,ah.records)}},error:function(al,aj,ak){if(i.isFunction(W.loaderror)){W.loaderror(al,aj,ak)}if(i.isFunction(K.loadError)){K.loadError(al,aj,ak)}al=null;ah.callDownloadComplete()},beforeSend:function(ak,aj){if(i.isFunction(K.beforeSend)){K.beforeSend(ak,aj)}if(i.isFunction(W.beforesend)){W.beforesend(ak,aj)}}})}}else{ah.buildHierarchy(new Array());ah.callDownloadComplete();if(i.isFunction(K.loadComplete)){if(!ai){var ai={}}K.loadComplete(ai)}}break}this.callBindingUpdate(aa)},buildHierarchy:function(K){var e=this._source;var P=new Array();if(!e.datafields){return}if(e.hierarchy&&!e.hierarchy.reservedNames){e.hierarchy.reservedNames={leaf:"leaf",parent:"parent",expanded:"expanded",checked:"checked",selected:"selected",level:"level",icon:"icon",data:"data"}}else{if(e.hierarchy){var O=e.hierarchy.reservedNames;if(!O.leaf){O.leaf="leaf"}if(!O.parent){O.parent="parent"}if(!O.expanded){O.expanded="expanded"}if(!O.checked){O.checked="checked"}if(!O.selected){O.selected="selected"}if(!O.level){O.level="level"}if(!O.data){O.data="data"}}}if(!e.hierarchy){return}var N=this;var O=e.hierarchy.reservedNames;if(e.hierarchy.root){if(e.dataType=="xml"){var P=this.getRecordsHierarchy("uid","parentuid","records",null,K);this.hierarchy=P;return P}else{this.hierarchy=this.records;var R=e.hierarchy.root;for(var L=0;L1){var W=S;for(var V=0;V0){var K=function(O){if(O){for(var P=0;P=0&&(this._source.hierarchy||I)){var L=(J._source&&J._source.hierarchy)?J._source.hierarchy.reservedNames:null;if(L==null){L=N()}H[L.level]=0;if(e=="last"){this.hierarchy.push(H)}else{if(typeof e==="number"&&isFinite(e)){this.hierarchy.splice(e,0,H)}else{this.hierarchy.splice(0,0,H)}}}else{if(e=="last"){this.records.push(H)}else{if(typeof e==="number"&&isFinite(e)){this.records.splice(e,0,H)}else{this.records.splice(0,0,H)}}}return true}}return false},deleteRecord:function(H){var J=this;if(this.hierarchy.length>0){var K=function(L){if(L){for(var O=0;OQ.totalrecords){M=Q.totalrecords}}else{if(Q.virtualmode){K=H.recordstartindex;M=H.recordendindex;if(M>Q.totalrecords){M=Q.totalrecords}}else{K=0;M=Q.records.length}}for(var O=K;O0){V(af+1,ae)}else{if(!P){ac[ad].leaf=true}else{ac[ad][P.leaf]=true}}}else{if(!P){ac[ad].leaf=true}else{ac[ad][P.leaf]=true}}}};V(0,e)}return e},bindBindingUpdate:function(H,e){this._bindingUpdate[this._bindingUpdate.length]={id:H,func:e}},unbindBindingUpdate:function(H){for(var e=0;e0){return e}else{if(N.map){try{var e=i(H).attr(N.map);if(e!=null&&e.toString().length>0){return e}else{if(i(N.map,H).length>0){return i(N.map,H).text()}else{if(i(N.name,H).length>0){return i(N.name,H).text()}}}}catch(J){return K}}}return}}if(i(N,H).length>0){return i(N,H).text()}if(N){if(N.toString().length>0){var e=i(H).attr(N);if(e!=null&&e.toString().length>0){return i.trim(e).split(" ").join("").replace(/([ #;?%&,.+*~\':"!^$[\]()=>|\/\\@])/g,"")}else{var I=N.split(this.mapChar);if(I.length>1){var M=H;for(var L=0;L1){var ab=af;for(var R=0;R0){var ab=af;for(var R=0;R0){var aa=I;for(var R=0;R0){var am=an;for(var ai=0;ai0){X=ah[0]}}}else{var ae=Q.map.substring(0,M-1);var O=Q.map.indexOf("]");var R=Q.map.substring(M+1,O);X=i(ae,I).attr(R);if(X==undefined){X=i(I).attr(R)}if(X==undefined){X=""}}if(X==""){X=i(I).attr(Q.map);if(X==undefined){X=""}}}}if(X==""){X=i(Q.name,I);if(X.length==1){X=X.text()}else{var ah=new Array();for(var ac=0;ac0){X=ah[0]}}if(X==""){X=i(I).attr(Q.name);if(X==undefined){X=""}}if(X==""){if(I.nodeName&&I.nodeName==Q.name&&I.firstChild){X=i(I.firstChild).text()}}}var W=X;X=this.getvaluebytype(X,Q);if(Q.displayname!=undefined){L[Q.displayname]=X}else{L[Q.name]=X}}if(V.recordendindex<=0||Y0){var ai=this.getid(V.id,i(I).parents(V.hierarchy.record+":first"));N.parentuid=ai}else{N.parentuid=null}}}this.records=ab;this.cachedrecords=this.records},loadics:function(N,H){if(N==null){return}var S=H.rowDelimiter||this.rowDelimiter||"\n";var R=N.split(S);var K=R.length;var Q=N.split("\r");if(K==1&&Q.length>1){R=Q;K=R.length}this.records=new Array();this.originaldata=new Array();var L=this.records;this.recordids=new Array();var I=0;var P=function(V){var T=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z)?$/;var U=T.exec(V);if(!U){throw new Error("Invalid UNTIL value: "+V)}return new Date(Date.UTC(U[1],U[2]-1,U[3],U[5]||0,U[6]||0,U[7]||0))};for(var M=0;M=0){e.SUMMARY=O.substring(O.indexOf("SUMMARY")+8);continue}if(O.indexOf("LOCATION")>=0){e.LOCATION=O.substring(O.indexOf("LOCATION")+9);continue}if(O.indexOf("DESCRIPTION")>=0){e.DESCRIPTION=O.substring(O.indexOf("DESCRIPTION")+12);continue}if(O.indexOf("RRULE")>=0){e.RRULE=O.substring(O.indexOf("RRULE")+6);continue}if(O.indexOf("EXDATE")>=0){var J=O.substring(O.indexOf("EXDATE")+7);e.EXDATE=J;continue}if(O.indexOf("DTEND")>=0){e.DTEND=P(O.substring(O.indexOf("DTEND")+6));continue}if(O.indexOf("DTSTART")>=0){e.DTSTART=P(O.substring(O.indexOf("DTSTART")+8));continue}if(O.indexOf("UID")>=0){e.uid=e.UID=O.substring(O.indexOf("UID")+4);continue}if(O.indexOf("STATUS")>=0){e.STATUS=O.substring(O.indexOf("STATUS")+7);continue}if(O=="END:VEVENT"){L.push(e);continue}}this.records=L;this.cachedrecords=this.records},loadtext:function(Y,P){if(Y==null){return}var e=P.rowDelimiter||this.rowDelimiter||"\n";var L=Y.split(e);var J=L.length;var X=Y.split("\r");if(J==1&&X.length>1){L=X;J=L.length}this.totalrecords=this.virtualmode?(P.totalrecords||J):J;this.records=new Array();this.originaldata=new Array();var U=this.records;var R=!this.pageable?P.recordstartindex:this.pagesize*this.pagenum;this.recordids=new Array();if(P.loadallrecords){R=0;J=this.totalrecords}var N=0;if(this.virtualmode){R=!this.pageable?P.recordstartindex:this.pagesize*this.pagenum;N=R;R=0;J=this.totalrecords}var V=P.datafields.length;var O=P.columnDelimiter||this.columnDelimiter;if(!O){O=(P.datatype==="tab"||P.datatype==="tsv")?"\t":","}for(var T=R;T=H.length){continue}var M=P.datafields[S];var Q=H[S];if(M.map&&i.isFunction(M.map)){Q=M.map(I)}if(M.type){Q=this.getvaluebytype(Q,M)}var Z=M.map||M.name||S.toString();K[Z]=Q;if(P.id!=null){if(P.id===M.name){W=Q;this.recordids[W]=I}}}if(W==null){W=T}U[N+T]=i.extend({},K);U[N+T].uid=W;this.originaldata[N+T]=i.extend({},U[T])}}this.records=U;this.cachedrecords=this.records},getvaluebytype:function(L,H){var J=L;if(L==null){return L}if(i.isArray(L)&&H.type!="array"){for(var I=0;I=L){return J}}return 0},toUpper:function(e){return e.split("\u00A0").join(" ").toUpperCase()},toUpperArray:function(e){var J=[];for(var I=0,H=e.length;I'+e+""}return''+e+""},formatemail:function(e){return''+e+""},formatNumber:function(e,I,H){return this.formatnumber(e,I,H)},formatnumber:function(T,S,O){if(O==undefined||O==null||O==""){O=this.defaultcalendar()}if(S===""||S===null){return T}if(!this.isNumber(T)){T*=1}var P;if(S.length>1){P=parseInt(S.slice(1),10)}var V={};var Q=S.charAt(0).toUpperCase();V.thousandsSeparator=O.thousandsseparator;V.decimalSeparator=O.decimalseparator;switch(Q){case"D":case"d":case"F":case"f":V.decimalPlaces=P;break;case"N":case"n":V.decimalPlaces=0;break;case"C":case"c":V.decimalPlaces=P;if(O.currencysymbolposition=="before"){V.prefix=O.currencysymbol}else{V.suffix=O.currencysymbol}break;case"P":case"p":V.suffix=O.percentsymbol;V.decimalPlaces=P;break;default:throw"Bad number format specifier: "+Q}if(this.isNumber(T)){var K=(T<0);var I=T+"";var R=(V.decimalSeparator)?V.decimalSeparator:".";var e;if(this.isNumber(V.decimalPlaces)){var L=V.decimalPlaces;var N=Math.pow(10,L);I=(T*N).toFixed(0)/N+"";e=I.lastIndexOf(".");if(L>0){if(e<0){I+=R;e=I.length-1}else{if(R!=="."){I=I.replace(".",R)}}while((I.length-1-e)0&&L==undefined){if(R!=="."){I=I.replace(".",R)}}}if(V.thousandsSeparator){var U=V.thousandsSeparator;e=I.lastIndexOf(R);e=(e>-1)?e:I.length;var J=I.substring(e);var H=-1;for(var M=e;M>0;M--){H++;if((H%3===0)&&(M!==e)&&(!K||(M>1))){J=U+J}J=I.charAt(M-1)+J}I=J}I=(V.prefix)?V.prefix+I:I;I=(V.suffix)?I+V.suffix:I;return I}else{return T}},tryparsedate:function(ak,al){if(al==undefined||al==null){al=this.defaultcalendar()}var P=this;if(ak==""){return null}if(ak!=null&&!ak.substring){ak=ak.toString()}if(ak!=null&&ak.substring(0,6)=="/Date("){var au=/^\/Date\((-?\d+)(\+|-)?(\d+)?\)\/$/;var ar=new Date(+ak.replace(/\/Date\((\d+)\)\//,"$1"));if(ar=="Invalid Date"){var an=ak.match(/^\/Date\((\d+)([-+]\d\d)(\d\d)\)\/$/);var ar=null;if(an){ar=new Date(1*an[1]+3600000*an[2]+60000*an[3])}}if(ar==null||ar=="Invalid Date"||isNaN(ar)){var Q=au.exec(ak);if(Q){var T=new Date(parseInt(Q[1]));if(Q[2]){var Z=parseInt(Q[3]);if(Q[2]==="-"){Z=-Z}var V=T.getUTCMinutes();T.setUTCMinutes(V-Z)}if(!isNaN(T.valueOf())){return T}}}return ar}var N=al.patterns;for(var S in N){ar=P.parsedate(ak,N[S],al);if(ar){if(S=="ISO"){var ac=P.parsedate(ak,N.ISO2,al);if(ac){return ac}}return ar}}if(ak!=null){var ac=null;var L=[":","/","-"];var ap=true;for(var O=0;O=0){I=ak.substring(ak.indexOf(":")-2);I=ag.trim(I);Y=ak.substring(0,ak.indexOf(":")-2)}else{if(ak.toUpperCase().indexOf("AM")>=0){I=ak.substring(ak.toUpperCase().indexOf("AM")-2);I=ag.trim(I);Y=ak.substring(0,ak.toUpperCase().indexOf("AM")-2)}else{if(ak.toUpperCase().indexOf("PM")>=0){I=ak.substring(ak.toUpperCase().indexOf("PM")-2);I=ag.trim(I);Y=ak.substring(0,ak.toUpperCase().indexOf("PM")-2)}}}var e=new Date();var aj=false;if(Y){for(var aq=0;aq=0){L=Y.split(am[aq]);break}}var H=new Array();var W=new Array();var ae=new Array();var R=null;var aw=null;for(var aq=0;aq2){aw=aq;break}}}for(var aq=0;aq0){e=ao[0];aj=true}}if(I){var ah=I.indexOf(":")>=0?I.split(":"):I;var K=ag.parsedate(I,"h:mm tt",al)||ag.parsedate(I,"h:mm:ss tt",al)||ag.parsedate(I,"HH:mm:ss.fff",al)||ag.parsedate(I,"HH:mm:ss.ff",al)||ag.parsedate(I,"HH:mm:ss.tttt",al)||ag.parsedate(I,"HH:mm:ss",al)||ag.parsedate(I,"HH:mm",al)||ag.parsedate(I,"HH",al);var X=0,J=0,aa=0,ab=0;if(K&&K.getTime()!=NaN){X=K.getHours();J=K.getMinutes();aa=K.getSeconds();ab=K.getMilliseconds()}else{if(ah.length==1){X=parseInt(ah[0])}if(ah.length==2){X=parseInt(ah[0]);J=parseInt(ah[1])}if(ah.length==3){X=parseInt(ah[0]);J=parseInt(ah[1]);if(ah[2].indexOf(".")>=0){aa=parseInt(ah[2].toString().split(".")[0]);ab=parseInt(ah[2].toString().split(".")[1])}else{aa=parseInt(ah[2])}}if(ah.length==4){X=parseInt(ah[0]);J=parseInt(ah[1]);aa=parseInt(ah[2]);ab=parseInt(ah[3])}}if(e&&!isNaN(X)&&!isNaN(J)&&!isNaN(aa)&&!isNaN(ab)){e.setHours(X,J,aa,ab);aj=true}}if(aj){return e}}return null},getparseregexp:function(e,R){var T=e._parseRegExp;if(!T){e._parseRegExp=T={}}else{var K=T[R];if(K){return K}}var Q=this.expandFormat(e,R).replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1"),O=["^"],H=[],N=0,J=0,W=this.getTokenRegExp(),L;while((L=W.exec(Q))!==null){var V=Q.slice(N,L.index);N=W.lastIndex;J+=this.appendPreOrPostMatch(V,O);if(J%2){O.push(L[0]);continue}var I=L[0],M=I.length,S;switch(I){case"dddd":case"ddd":case"MMMM":case"MMM":case"gg":case"g":S="(\\D+)";break;case"tt":case"t":S="(\\D*)";break;case"yyyy":case"fff":case"ff":case"f":S="(\\d{"+M+"})";break;case"dd":case"d":case"MM":case"M":case"yy":case"y":case"HH":case"H":case"hh":case"h":case"mm":case"m":case"ss":case"s":S="(\\d\\d?)";break;case"zzz":S="([+-]?\\d\\d?:\\d{2})";break;case"zz":case"z":S="([+-]?\\d\\d?)";break;case"/":S="(\\"+e["/"]+")";break;default:throw"Invalid date format pattern '"+I+"'.";break}if(S){O.push(S)}H.push(L[0])}this.appendPreOrPostMatch(Q.slice(N),O);O.push("$");var U=O.join("").replace(/\s+/g,"\\s+"),P={regExp:U,groups:H};return T[R]=P},outOfRange:function(I,e,H){return IH},expandYear:function(L,J){var H=new Date(),e=this.getEra(H);if(J<100){var I=L.twoDigitYearMax;I=typeof I==="string"?new Date().getFullYear()%100+parseInt(I,10):I;var K=this.getEraYear(H,L,e);J+=K-(K%100);if(J>I){J-=100}}return J},parsedate:function(ab,ai,W){if(W==undefined||W==null){W=this.defaultcalendar()}ab=this.trim(ab);var T=W,an=this.getparseregexp(T,ai),N=new RegExp(an.regExp).exec(ab);if(N===null){return null}var aj=an.groups,Z=null,R=null,am=null,al=null,S=null,L=0,ae,ad=0,ak=0,e=0,I=null,U=false;for(var af=0,ah=aj.length;af1&&ah.length)<[^<]*)*<\/script>/gi,d=/([?&])_=[^&]*/,h=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,t=/\s+/,F=i.fn.load,G={},C={},q=["*/"]+["*"];try{E=location.href}catch(A){E=document.createElement("a");E.href="";E=E.href}l=h.exec(E.toLowerCase())||[];function r(e){return function(K,M){if(typeof K!=="string"){M=K;K="*"}var H,N,O,J=K.toLowerCase().split(t),I=0,L=J.length;if(i.isFunction(M)){for(;I0?4:0;if(al){aj=B(Q,W,al)}if(ak>=200&&ak<300||ak===304){if(Q.ifModified){an=W.getResponseHeader("Last-Modified");if(an){i.lastModified[P]=an}an=W.getResponseHeader("Etag");if(an){i.etag[P]=an}}if(ak===304){ah="notmodified";e=true}else{e=c(Q,aj);ah=e.state;ao=e.data;am=e.error;e=!am}}else{am=ah;if(!ah||ak){ah="error";if(ak<0){ak=0}}}W.status=ak;W.statusText=(ag||ah)+"";if(e){ae.resolveWith(af,[ao,ah,W])}else{ae.rejectWith(af,[W,ah,am])}W.statusCode(N);N=undefined;if(I){T.trigger("ajax"+(e?"Success":"Error"),[W,Q,e?ao:am])}aa.fireWith(af,[W,ah]);if(I){T.trigger("ajaxComplete",[W,Q]);if(!(--i.active)){i.event.trigger("ajaxStop")}}}ae.promise(W);W.success=W.done;W.error=W.fail;W.complete=aa.add;W.statusCode=function(ag){if(ag){var e;if(L<2){for(e in ag){N[e]=[N[e],ag[e]]}}else{e=ag[W.status];W.always(e)}}return this};Q.url=((M||Q.url)+"").replace(p,"").replace(o,l[1]+"//");Q.dataTypes=i.trim(Q.dataType||"*").toLowerCase().split(t);if(Q.crossDomain==null){V=h.exec(Q.url.toLowerCase());Q.crossDomain=!!(V&&(V[1]!==l[1]||V[2]!==l[2]||(V[3]||(V[1]==="http:"?80:443))!=(l[3]||(l[1]==="http:"?80:443))))}if(Q.data&&Q.processData&&typeof Q.data!=="string"){Q.data=i.param(Q.data,Q.traditional)}v(G,Q,J,W);if(L===2){return W}I=Q.global;Q.type=Q.type.toUpperCase();Q.hasContent=!j.test(Q.type);if(I&&i.active++===0){i.event.trigger("ajaxStart")}if(!Q.hasContent){if(Q.data){Q.url+=(k.test(Q.url)?"&":"?")+Q.data;delete Q.data}P=Q.url;if(Q.cache===false){var H=(new Date()).getTime(),ac=Q.url.replace(d,"$1_="+H);Q.url=ac+((ac===Q.url)?(k.test(Q.url)?"&":"?")+"_="+H:"")}}if(Q.data&&Q.hasContent&&Q.contentType!==false||J.contentType){W.setRequestHeader("Content-Type",Q.contentType)}if(Q.ifModified){P=P||Q.url;if(i.lastModified[P]){W.setRequestHeader("If-Modified-Since",i.lastModified[P])}if(i.etag[P]){W.setRequestHeader("If-None-Match",i.etag[P])}}W.setRequestHeader("Accept",Q.dataTypes[0]&&Q.accepts[Q.dataTypes[0]]?Q.accepts[Q.dataTypes[0]]+(Q.dataTypes[0]!=="*"?", "+q+"; q=0.01":""):Q.accepts["*"]);for(X in Q.headers){W.setRequestHeader(X,Q.headers[X])}if(Q.beforeSend&&(Q.beforeSend.call(af,W,Q)===false||L===2)){return W.abort()}O="abort";for(X in {success:1,error:1,complete:1}){W[X](Q[X])}Y=v(C,Q,J,W);if(!Y){S(-1,"No Transport")}else{W.readyState=1;if(I){T.trigger("ajaxSend",[W,Q])}if(Q.async&&Q.timeout>0){R=setTimeout(function(){W.abort("timeout")},Q.timeout)}try{L=1;Y.send(U,S)}catch(Z){if(L<2){S(-1,Z)}else{throw Z}}}return W},active:0,lastModified:{},etag:{}});function B(P,O,L){var K,M,J,e,H=P.contents,N=P.dataTypes,I=P.responseFields;for(M in I){if(M in L){O[I[M]]=L[M]}}while(N[0]==="*"){N.shift();if(K===undefined){K=P.mimeType||O.getResponseHeader("content-type")}}if(K){for(M in H){if(H[M]&&H[M].test(K)){N.unshift(M);break}}}if(N[0] in L){J=N[0]}else{for(M in L){if(!N[0]||P.converters[M+" "+N[0]]){J=M;break}if(!e){e=M}}J=J||e}if(J){if(J!==N[0]){N.unshift(J)}return L[J]}}function c(R,J){var P,H,N,L,O=R.dataTypes.slice(),I=O[0],Q={},K=0;if(R.dataFilter){J=R.dataFilter(J,R.dataType)}if(O[1]){for(P in R.converters){Q[P.toLowerCase()]=R.converters[P]}}for(;(N=O[++K]);){if(N!=="*"){if(I!=="*"&&I!==N){P=Q[I+" "+N]||Q["* "+N];if(!P){for(H in Q){L=H.split(" ");if(L[1]===N){P=Q[I+" "+L[0]]||Q["* "+L[0]];if(P){if(P===true){P=Q[H]}else{if(Q[H]!==true){N=L[0];O.splice(K--,0,N)}}break}}}}if(P!==true){if(P&&R["throws"]){J=P(J)}else{try{J=P(J)}catch(M){return{state:"parsererror",error:P?M:"No conversion from "+I+" to "+N}}}}}I=N}}return{state:"success",data:J}}var y=[],n=/\?/,D=/(=)\?(?=&|$)|\?\?/,z=(new Date()).getTime();i.jqx.data.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=y.pop()||(i.expando+"_"+(z++));this[e]=true;return e}});i.jqx.data.ajaxPrefilter("json jsonp",function(Q,L,P){var O,e,N,J=Q.data,H=Q.url,I=Q.jsonp!==false,M=I&&D.test(H),K=I&&!M&&typeof J==="string"&&!(Q.contentType||"").indexOf("application/x-www-form-urlencoded")&&D.test(J);if(Q.dataTypes[0]==="jsonp"||M||K){O=Q.jsonpCallback=i.isFunction(Q.jsonpCallback)?Q.jsonpCallback():Q.jsonpCallback;e=window[O];if(M){Q.url=H.replace(D,"$1"+O)}else{if(K){Q.data=J.replace(D,"$1"+O)}else{if(I){Q.url+=(n.test(H)?"&":"?")+Q.jsonp+"="+O}}}Q.converters["script json"]=function(){if(!N){i.error(O+" was not called")}return N[0]};Q.dataTypes[0]="json";window[O]=function(){N=arguments};P.always(function(){window[O]=e;if(Q[O]){Q.jsonpCallback=L.jsonpCallback;y.push(O)}if(N&&i.isFunction(e)){e(N[0])}N=e=undefined});return"script"}});i.jqx.data.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){i.globalEval(e);return e}}});i.jqx.data.ajaxPrefilter("script",function(e){if(e.cache===undefined){e.cache=false}if(e.crossDomain){e.type="GET";e.global=false}});i.jqx.data.ajaxTransport("script",function(I){if(I.crossDomain){var e,H=document.head||document.getElementsByTagName("head")[0]||document.documentElement;return{send:function(J,K){e=document.createElement("script");e.async="async";if(I.scriptCharset){e.charset=I.scriptCharset}e.src=I.url;e.onload=e.onreadystatechange=function(M,L){if(L||!e.readyState||/loaded|complete/.test(e.readyState)){e.onload=e.onreadystatechange=null;if(H&&e.parentNode){H.removeChild(e)}e=undefined;if(!L){K(200,"success")}}};H.insertBefore(e,H.firstChild)},abort:function(){if(e){e.onload(0,1)}}}}});var w,x=window.ActiveXObject?function(){for(var e in w){w[e](0,1)}}:false,m=0;function g(){try{return new window.XMLHttpRequest()}catch(H){}}function s(){try{return new window.ActiveXObject("Microsoft.XMLHTTP")}catch(H){}}i.jqx.data.ajaxSettings.xhr=window.ActiveXObject?function(){return !this.isLocal&&g()||s()}:g;(function(e){i.extend(i.support,{ajax:!!e,cors:!!e&&("withCredentials" in e)})})(i.jqx.data.ajaxSettings.xhr());if(!i.support){i.support={ajax:true}}if(i.support.ajax){i.jqx.data.ajaxTransport(function(e){if(!e.crossDomain||i.support.cors){var H;return{send:function(N,I){var L,K,M=e.xhr();if(e.username){M.open(e.type,e.url,e.async,e.username,e.password)}else{M.open(e.type,e.url,e.async)}if(e.xhrFields){for(K in e.xhrFields){M[K]=e.xhrFields[K]}}if(e.mimeType&&M.overrideMimeType){M.overrideMimeType(e.mimeType)}if(!e.crossDomain&&!N["X-Requested-With"]){N["X-Requested-With"]="XMLHttpRequest"}try{for(K in N){M.setRequestHeader(K,N[K])}}catch(J){}M.send((e.hasContent&&e.data)||null);H=function(W,Q){var R,P,O,U,T;try{if(H&&(Q||M.readyState===4)){H=undefined;if(L){M.onreadystatechange=function(){};if(x){delete w[L]}}if(Q){if(M.readyState!==4){M.abort()}}else{R=M.status;O=M.getAllResponseHeaders();U={};T=M.responseXML;if(T&&T.documentElement){U.xml=T}try{U.text=M.responseText}catch(V){}try{P=M.statusText}catch(V){P=""}if(!R&&e.isLocal&&!e.crossDomain){R=U.text?200:404}else{if(R===1223){R=204}}}}}catch(S){if(!Q){I(-1,S)}}if(U){I(R,P,U,O)}};if(!e.async){H()}else{if(M.readyState===4){setTimeout(H,0)}else{L=++m;if(x){if(!w){w={};i(window).unload(x)}w[L]=H}M.onreadystatechange=H}}},abort:function(){if(H){H(0,1)}}}}})}i.jqx.filter=function(){this.operator="and";var M=0;var J=1;var P=["EMPTY","NOT_EMPTY","CONTAINS","CONTAINS_CASE_SENSITIVE","DOES_NOT_CONTAIN","DOES_NOT_CONTAIN_CASE_SENSITIVE","STARTS_WITH","STARTS_WITH_CASE_SENSITIVE","ENDS_WITH","ENDS_WITH_CASE_SENSITIVE","EQUAL","EQUAL_CASE_SENSITIVE","NULL","NOT_NULL"];var R=["EQUAL","NOT_EQUAL","LESS_THAN","LESS_THAN_OR_EQUAL","GREATER_THAN","GREATER_THAN_OR_EQUAL","NULL","NOT_NULL"];var S=["EQUAL","NOT_EQUAL","LESS_THAN","LESS_THAN_OR_EQUAL","GREATER_THAN","GREATER_THAN_OR_EQUAL","NULL","NOT_NULL"];var L=["EQUAL","NOT_EQUAL"];var K=new Array();var Q=new Array();this.evaluate=function(X){var V=true;for(var W=0;WK.length){return null}return Q[U]};this.setoperatorat=function(V,U){if(V==undefined||V==null){return null}if(V<0||V>K.length){return null}Q[U]=U};this.getfilterat=function(U){if(U==undefined||U==null){return null}if(U<0||U>K.length){return null}return K[U]};this.setfilterat=function(U,V){if(U==undefined||U==null){return null}if(U<0||U>K.length){return null}V.key=O();K[U]=V};this.clear=function(){K=new Array();Q=new Array()};var T=function(V,U){this.filtervalue=V;this.comparisonoperator=U;this.type="stringfilter";this.evaluate=function(af){var ae=this.filtervalue;var al=this.comparisonoperator;if(af==null||af==undefined||af==""){if(al=="NULL"){return true}if(al=="NOT_NULL"){return false}if(al=="EQUAL"&&af==ae){return true}if(al=="NOT_EQUAL"&&af!=ae){return true}if(al!="EMPTY"){return false}else{if(af==""){return true}}}var an="";try{an=af.toString()}catch(ag){return true}var am=function(ap,ao){switch(al){case"EQUAL":return i.jqx.string.equalsIgnoreCase(ap,ao);case"EQUAL_CASE_SENSITIVE":return i.jqx.string.equals(ap,ao);case"NOT_EQUAL":return !i.jqx.string.equalsIgnoreCase(ap,ao);case"NOT_EQUAL_CASE_SENSITIVE":return !i.jqx.string.equals(ap,ao);case"CONTAINS":return i.jqx.string.containsIgnoreCase(ap,ao);case"CONTAINS_CASE_SENSITIVE":return i.jqx.string.contains(ap,ao);case"DOES_NOT_CONTAIN":return !i.jqx.string.containsIgnoreCase(ap,ao);case"DOES_NOT_CONTAIN_CASE_SENSITIVE":return !i.jqx.string.contains(ap,ao);case"EMPTY":return ap=="";case"NOT_EMPTY":return ap!="";case"NOT_NULL":return ap!=null;case"STARTS_WITH":return i.jqx.string.startsWithIgnoreCase(ap,ao);case"ENDS_WITH":return i.jqx.string.endsWithIgnoreCase(ap,ao);case"ENDS_WITH_CASE_SENSITIVE":return i.jqx.string.endsWith(ap,ao);case"STARTS_WITH_CASE_SENSITIVE":return i.jqx.string.startsWith(ap,ao);default:return false}};var Z=new Array();if(ae&&ae.indexO&&al!=="NOT_EQUAL"){if(ae.indexOf("|")>=0||ae.indexOf(" AND ")>=0||ae.indexOf(" OR ")>=0||ae.indexOf(" and ")>=0||ae.indexOf(" or ")>=0){var aa=am(an,ae);if(aa){return aa}var ab=ae.indexOf(" AND ")>=0?ae.split(" AND "):new Array();var Y=ae.indexOf(" OR ")>=0?ae.split(" OR "):new Array();var X=ae.indexOf(" and ")>=0?ae.split(" and "):new Array();var ac=ae.indexOf(" or ")>=0?ae.split(" or "):new Array();var W=ae.indexOf("|")>=0?ae.split("|"):new Array();if(W.length>0){for(var ak=0;ak=0?ae.split(" "):new Array();if(aj.length>0){for(var ak=0;ak0){for(var ak=0;ak=0){Z.push(ab[ak])}}}if(Y.length>0){for(var ak=0;ak=0){Z.push(Y[ak])}}}var ai=undefined;for(var ah=0;ahao;case"GREATER_THAN_OR_EQUAL":return ap>=ao;case"LESS_THAN":return ap=0||af.indexOf(" AND ")>=0||af.indexOf(" OR ")>=0||af.indexOf(" and ")>=0||af.indexOf(" or ")>=0)){var ab=am(an,af);if(ab){return ab}af=af.toString();var ac=af.indexOf(" AND ")>=0?af.split(" AND "):new Array();var Z=af.indexOf(" OR ")>=0?af.split(" OR "):new Array();var Y=af.indexOf(" and ")>=0?af.split(" and "):new Array();var ad=af.indexOf(" or ")>=0?af.split(" or "):new Array();ac=ac.concat(Y);Z=Z.concat(ad);var X=af.indexOf("|")>=0?af.split("|"):new Array();if(X.length>0){for(var ak=0;ak0){for(var ak=0;ak=0){aa.push(ac[ak])}}}if(Z.length>0){for(var ak=0;ak=0){aa.push(Z[ak])}}}var aj=undefined;for(var ai=0;ai=0){var W=ag.toString().split("..");if(W.length==2){ab=an>=W[0]&&an<=W[1]}}else{var ab=am(an,ag)}var ae=ai=0){aa=af.toString().split("..");if(aa.length==2){return an>=aa[0]&&an<=aa[1]}}return am(an,af)}};var H=function(X,V,W,ab){this.filtervalue=X;this.type="datefilter";var Z=this;if(W!=undefined&&ab!=undefined){var Y=i.jqx.dataFormat.parsedate(X,W,ab);if(Y!=null){this.filterdate=Y}else{var U=i.jqx.dataFormat.tryparsedate(X,ab);if(U!=null){this.filterdate=U}}}else{var aa=new Date(X);if(aa.toString()=="NaN"||aa.toString()=="Invalid Date"){this.filterdate=i.jqx.dataFormat.tryparsedate(X)}else{this.filterdate=aa}}if(!this.filterdate){var aa=new Date(X);if(aa.toString()=="NaN"||aa.toString()=="Invalid Date"){this.filterdate=i.jqx.dataFormat.tryparsedate(X)}else{this.filterdate=aa}}this.comparisonoperator=V;this.evaluate=function(ao){var an=this.filtervalue;var aw=this.comparisonoperator;if(ao==null||ao==undefined||ao==""){if(aw=="NOT_NULL"){return false}if(aw=="NULL"){return true}else{switch(aw){case"EQUAL":return ao==an;case"NOT_EQUAL":return ao!=an}return false}}else{if(aw=="NULL"){return false}if(aw=="NOT_NULL"){return true}}var ay=new Date();ay.setFullYear(1900,0,1);ay.setHours(12,0,0,0);try{var av=new Date(ao);if(av.toString()=="NaN"||av.toString()=="Invalid Date"){ao=i.jqx.dataFormat.tryparsedate(ao)}else{ao=av}ay=ao;var at=false;if(W!=undefined&&ab!=undefined){if(W.indexOf("t")>=0||W.indexOf("T")>=0||W.indexOf(":")>=0||W.indexOf("f")>=0){at=true;if(an&&an.toString().indexOf(":")==-1){var aj=i.jqx.dataFormat.tryparsedate(an.toString()+":00",ab);if(aj!=null){Z.filterdate=aj}}}}if(W!=undefined){if(W.indexOf("hh")>=0||W.indexOf("t")>=0){at=true}}if(!at){ay.setHours(0);ay.setMinutes(0);ay.setSeconds(0)}}catch(ap){if(ao.toString()!=""){return false}}if(Z.filterdate!=null){an=Z.filterdate}else{if(an&&an.indexOf){if(an.indexOf(":")!=-1||!isNaN(parseInt(an))){var ai=new Date(ay);ai.setHours(12,0,0,0);var ah=an.split(":");for(var au=0;auaz;case"GREATER_THAN_OR_EQUAL":return aA>=az;case"LESS_THAN":return aA=0||an.indexOf(" AND ")>=0||an.indexOf(" OR ")>=0||an.indexOf(" and ")>=0||an.indexOf(" or ")>=0){var aj=ax(ay,an);if(aj){return aj}var ak=an.indexOf(" AND ")>=0?an.split(" AND "):new Array();var af=an.indexOf(" OR ")>=0?an.split(" OR "):new Array();var ae=an.indexOf(" and ")>=0?an.split(" and "):new Array();var al=an.indexOf(" or ")>=0?an.split(" or "):new Array();ak=ak.concat(ae);af=af.concat(al);var ad=an.indexOf("|")>=0?an.split("|"):new Array();if(ad.length>0){for(var au=0;au0){for(var au=0;au=0){ag.push(ak[au])}}}if(af.length>0){for(var au=0;au=0){ag.push(af[au])}}}var ar=undefined;for(var aq=0;aq=0){var ac=ao.toString().split("..");if(ac.length==2){aj=ay>=ac[0]&&ay<=ac[1]}}else{var aj=ax(ay,ao)}var am=aq=0){ag=an.toString().split("..");if(ag.length==2){return ay>=ag[0]&&ay<=ag[1]}}return ax(ay,an)}};var e=function(V,U,W){this.filtervalue=V;this.comparisonoperator=U;this.evaluate=function(Y,X){return W(this.filtervalue,Y,this.comparisonoperator)}}}})(jqxBaseFramework); + +(function(f){f.jqx.timeSpan=function(){var q={ticksPerMillisecond:10000,millisecondsPerTick:1/10000,ticksPerSecond:1000*10000,secondsPerTick:1/(1000*10000),ticksPerMinute:1000*10000*60,minutesPerTick:1/(1000*10000*60),ticksPerHour:1000*10000*3600,hoursPerTick:1/(1000*10000*3600),ticksPerDay:1000*10000*3600*24,daysPerTick:1/(1000*10000*3600*24),millisPerSecond:1000,millisPerMinute:1000*60,millisPerHour:1000*60*60,millisPerDay:1000*60*60*24,_ticks:0};f.extend(true,this,q);var r=this;r.ticks=function(){return r._ticks};r.days=function(){return parseInt(r._ticks/r.ticksPerDay)};r.timeToMS=function(v,z,x,w){var y=v*3600+z*60+x+w/1000;return parseInt(y*r.ticksPerSecond)};r.hours=function(){return parseInt(r._ticks/r.ticksPerHour)%24};r.milliseconds=function(){return parseInt(r._ticks/r.ticksPerMillisecond)%1000};r.minutes=function(){return parseInt(r._ticks/r.ticksPerMinute)%60};r.seconds=function(){return parseInt(r._ticks/r.ticksPerSecond)%60};r.totalDays=function(){return parseInt(r._ticks*r.daysPerTick)};r.totalHours=function(){return parseInt(r._ticks*r.hoursPerTick)};r.totalMilliseconds=function(){var v=r._ticks*r.millisecondsPerTick;return parseInt(v)};r.totalMinutes=function(){return parseInt(r._ticks*r.minutesPerTick)};r.totalSeconds=function(){return parseInt(r._ticks*r.secondsPerTick)};if(arguments.length===1){r._ticks=arguments[0]}else{if(arguments.length===3){r._ticks=r.timeToMS(arguments[0],arguments[1],arguments[2])}else{if(arguments.length===4){var u=arguments[0];var n=arguments[1];var p=arguments[2];var t=arguments[3];var o=0;var s=(u*3600*24+n*3600+p*60+t)*1000+o;r._ticks=s*r.ticksPerMillisecond}else{if(arguments.length===5){var u=arguments[0];var n=arguments[1];var p=arguments[2];var t=arguments[3];var o=arguments[4];var s=(u*3600*24+n*3600+p*60+t)*1000+o;r._ticks=s*r.ticksPerMillisecond}}}}r.add=function(w){var v=r._ticks+w._ticks;var x=new f.jqx.timeSpan(v);return x};r.substract=function(w){var v=r._ticks-w._ticks;return new f.jqx.timeSpan(v)};r.duration=function(){if(r._ticks>=0){return new f.jqx.timeSpan(r._ticks)}else{return new f.jqx.timeSpan(-r._ticks)}};r.equals=function(v){return r._ticks==v._ticks};r.valueOf=function(){return r._ticks};r.compare=function(w,v){if(w._ticks>v._ticks){return 1}if(w._ticks=0?0.5:-0.5);return new f.jqx.timeSpan(v*r.ticksPerMillisecond)};r.fromDays=function(v){return r.interval(v,r.millisPerDay)};r.fromHours=function(v){return r.interval(v,r.millisPerHour)};r.fromMilliseconds=function(v){return r.interval(v,1)};r.fromMinutes=function(v){return r.interval(v,r.millisPerMinute)};r.fromSeconds=function(v){return r.interval(v,r.millisPerSecond)};r.fromTicks=function(v){return new f.jqx.timeSpan(v)};return r};var g=[{id:"Local",offset:0,offsetHours:0,displayName:"",supportsDaylightSavingTime:false},{id:"Dateline Standard Time",offset:-720,offsetHours:-12,displayName:"(UTC-12:00) International Date Line West",supportsDaylightSavingTime:false},{id:"UTC-11",offset:-660,offsetHours:-11,displayName:"(UTC-11:00) Coordinated Universal Time-11",supportsDaylightSavingTime:false},{id:"Hawaiteratoran Standard Time",offset:-600,offsetHours:-10,displayName:"(UTC-10:00) Hawaiterator",supportsDaylightSavingTime:false},{id:"Alaskan Standard Time",offset:-540,offsetHours:-9,displayName:"(UTC-09:00) Alaska",supportsDaylightSavingTime:true},{id:"Pacific Standard Time (Mexico)",offset:-480,offsetHours:-8,displayName:"(UTC-08:00) Baja California",supportsDaylightSavingTime:true},{id:"Pacific Standard Time",offset:-480,offsetHours:-8,displayName:"(UTC-08:00) Pacific Time (US & Canada)",supportsDaylightSavingTime:true},{id:"US Mountain Standard Time",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Arizona",supportsDaylightSavingTime:false},{id:"Mountain Standard Time (Mexico)",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Chihuahua, La Paz, Mazatlan",supportsDaylightSavingTime:true},{id:"Mountain Standard Time",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Mountain Time (US & Canada)",supportsDaylightSavingTime:true},{id:"Central Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Central Time (US & Canada)",supportsDaylightSavingTime:true},{id:"Central America Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Central America",supportsDaylightSavingTime:false},{id:"Canada Central Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Saskatchewan",supportsDaylightSavingTime:false},{id:"Central Standard Time (Mexico)",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Guadalajara, Mexico City, Monterrey",supportsDaylightSavingTime:true},{id:"SA Pacific Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Bogota, Lima, Quito, Rio Branco",supportsDaylightSavingTime:false},{id:"Eastern Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Eastern Time (US & Canada)",supportsDaylightSavingTime:true},{id:"US Eastern Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Indiana (East)",supportsDaylightSavingTime:true},{id:"Venezuela Standard Time",offset:-270,offsetHours:-4.5,displayName:"(UTC-04:30) Caracas",supportsDaylightSavingTime:false},{id:"Atlantic Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Atlantic Time (Canada)",supportsDaylightSavingTime:true},{id:"Paraguay Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Asuncion",supportsDaylightSavingTime:true},{id:"Central Brazilian Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Cuiaba",supportsDaylightSavingTime:true},{id:"Pacific SA Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Santiago",supportsDaylightSavingTime:true},{id:"SA Western Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan",supportsDaylightSavingTime:false},{id:"Newfoundland Standard Time",offset:-210,offsetHours:-3.5,displayName:"(UTC-03:30) Newfoundland",supportsDaylightSavingTime:true},{id:"SA Eastern Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Cayenne, Fortaleza",supportsDaylightSavingTime:false},{id:"Argentina Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Buenos Aires",supportsDaylightSavingTime:true},{id:"E. South America Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Brasilia",supportsDaylightSavingTime:true},{id:"Bahia Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Salvador",supportsDaylightSavingTime:true},{id:"Montevideo Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Montevideo",supportsDaylightSavingTime:true},{id:"Greenland Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Greenland",supportsDaylightSavingTime:true},{id:"UTC-02",offset:-120,offsetHours:-2,displayName:"(UTC-02:00) Coordinated Universal Time-02",supportsDaylightSavingTime:false},{id:"Mid-Atlantic Standard Time",offset:-120,offsetHours:-2,displayName:"(UTC-02:00) Mid-Atlantic - Old",supportsDaylightSavingTime:true},{id:"Azores Standard Time",offset:-60,offsetHours:-1,displayName:"(UTC-01:00) Azores",supportsDaylightSavingTime:true},{id:"Cape Verde Standard Time",offset:-60,offsetHours:-1,displayName:"(UTC-01:00) Cape Verde Is.",supportsDaylightSavingTime:false},{id:"Morocco Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Casablanca",supportsDaylightSavingTime:true},{id:"UTC",offset:0,offsetHours:0,displayName:"(UTC) Coordinated Universal Time",supportsDaylightSavingTime:false},{id:"GMT Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Dublin, Edinburgh, Lisbon, London",supportsDaylightSavingTime:true},{id:"Greenwich Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Monrovia, Reykjavik",supportsDaylightSavingTime:false},{id:"Central European Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb",supportsDaylightSavingTime:true},{id:"Namibia Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Windhoek",supportsDaylightSavingTime:true},{id:"W. Central Africa Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) West Central Africa",supportsDaylightSavingTime:false},{id:"W. Europe Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna",supportsDaylightSavingTime:true},{id:"Central Europe Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague",supportsDaylightSavingTime:true},{id:"Romance Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Brussels, Copenhagen, Madrid, Paris",supportsDaylightSavingTime:true},{id:"FLE Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius",supportsDaylightSavingTime:true},{id:"South Africa Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Harare, Pretoria",supportsDaylightSavingTime:false},{id:"Turkey Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Istanbul",supportsDaylightSavingTime:true},{id:"GTB Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Athens, Bucharest",supportsDaylightSavingTime:true},{id:"Libya Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Tripoli",supportsDaylightSavingTime:true},{id:"E. Europe Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) E. Europe",supportsDaylightSavingTime:true},{id:"Jordan Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Amman",supportsDaylightSavingTime:true},{id:"Middle East Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Beirut",supportsDaylightSavingTime:true},{id:"Egypt Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Cairo",supportsDaylightSavingTime:true},{id:"Syria Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Damascus",supportsDaylightSavingTime:true},{id:"Israel Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Jerusalem",supportsDaylightSavingTime:true},{id:"Arab Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Kuwait, Riyadh",supportsDaylightSavingTime:false},{id:"E. Africa Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Nairobi",supportsDaylightSavingTime:false},{id:"Arabic Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Baghdad",supportsDaylightSavingTime:true},{id:"Kaliningrad Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Kaliningrad, Minsk",supportsDaylightSavingTime:true},{id:"Iran Standard Time",offset:210,offsetHours:3.5,displayName:"(UTC+03:30) Tehran",supportsDaylightSavingTime:true},{id:"Mauritius Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Port Louis",supportsDaylightSavingTime:true},{id:"Georgian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Tbilisi",supportsDaylightSavingTime:false},{id:"Caucasus Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Yerevan",supportsDaylightSavingTime:true},{id:"Arabian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Abu Dhabi, Muscat",supportsDaylightSavingTime:false},{id:"Azerbaijan Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Baku",supportsDaylightSavingTime:true},{id:"Russian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Moscow, St. Petersburg, Volgograd",supportsDaylightSavingTime:true},{id:"Afghanistan Standard Time",offset:270,offsetHours:4.5,displayName:"(UTC+04:30) Kabul",supportsDaylightSavingTime:false},{id:"Pakistan Standard Time",offset:300,offsetHours:5,displayName:"(UTC+05:00) Islamabad, Karachi",supportsDaylightSavingTime:true},{id:"West Asia Standard Time",offset:300,offsetHours:5,displayName:"(UTC+05:00) Ashgabat, Tashkent",supportsDaylightSavingTime:false},{id:"India Standard Time",offset:330,offsetHours:5.5,displayName:"(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi",supportsDaylightSavingTime:false},{id:"Sri Lanka Standard Time",offset:330,offsetHours:5.5,displayName:"(UTC+05:30) Sri Jayawardenepura",supportsDaylightSavingTime:false},{id:"Nepal Standard Time",offset:345,offsetHours:5.75,displayName:"(UTC+05:45) Kathmandu",supportsDaylightSavingTime:false},{id:"Central Asia Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Astana",supportsDaylightSavingTime:false},{id:"Bangladesh Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Dhaka",supportsDaylightSavingTime:true},{id:"Ekaterinburg Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Ekaterinburg",supportsDaylightSavingTime:true},{id:"Myanmar Standard Time",offset:390,offsetHours:6.5,displayName:"(UTC+06:30) Yangon (Rangoon)",supportsDaylightSavingTime:false},{id:"SE Asia Standard Time",offset:420,offsetHours:7,displayName:"(UTC+07:00) Bangkok, Hanoi, Jakarta",supportsDaylightSavingTime:false},{id:"N. Central Asia Standard Time",offset:420,offsetHours:7,displayName:"(UTC+07:00) Novosibirsk",supportsDaylightSavingTime:true},{id:"Ulaanbaatar Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Ulaanbaatar",supportsDaylightSavingTime:false},{id:"China Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi",supportsDaylightSavingTime:false},{id:"Singapore Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Kuala Lumpur, Singapore",supportsDaylightSavingTime:false},{id:"North Asia Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Krasnoyarsk",supportsDaylightSavingTime:true},{id:"Taipei Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Taipei",supportsDaylightSavingTime:false},{id:"W. Australia Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Perth",supportsDaylightSavingTime:true},{id:"Korea Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Seoul",supportsDaylightSavingTime:false},{id:"North Asia East Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Irkutsk",supportsDaylightSavingTime:true},{id:"Tokyo Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Osaka, Sapporo, Tokyo",supportsDaylightSavingTime:false},{id:"AUS Central Standard Time",offset:570,offsetHours:9.5,displayName:"(UTC+09:30) Darwin",supportsDaylightSavingTime:false},{id:"Cen. Australia Standard Time",offset:570,offsetHours:9.5,displayName:"(UTC+09:30) Adelaide",supportsDaylightSavingTime:true},{id:"West Pacific Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Guam, Port Moresby",supportsDaylightSavingTime:false},{id:"Tasmania Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Hobart",supportsDaylightSavingTime:true},{id:"E. Australia Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Brisbane",supportsDaylightSavingTime:false},{id:"AUS Eastern Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Canberra, Melbourne, Sydney",supportsDaylightSavingTime:true},{id:"Yakutsk Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Yakutsk",supportsDaylightSavingTime:true},{id:"Vladivostok Standard Time",offset:660,offsetHours:11,displayName:"(UTC+11:00) Vladivostok",supportsDaylightSavingTime:true},{id:"Central Pacific Standard Time",offset:660,offsetHours:11,displayName:"(UTC+11:00) Solomon Is., New Caledonia",supportsDaylightSavingTime:false},{id:"Magadan Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Magadan",supportsDaylightSavingTime:true},{id:"Kamchatka Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Petropavlovsk-Kamchatsky - Old",supportsDaylightSavingTime:true},{id:"Fiji Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Fiji",supportsDaylightSavingTime:true},{id:"New Zealand Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Auckland, Wellington",supportsDaylightSavingTime:true},{id:"UTC+12",offset:720,offsetHours:12,displayName:"(UTC+12:00) Coordinated Universal Time+12",supportsDaylightSavingTime:false},{id:"Tonga Standard Time",offset:780,offsetHours:13,displayName:"(UTC+13:00) Nuku'alofa",supportsDaylightSavingTime:false},{id:"Samoa Standard Time",offset:780,offsetHours:13,displayName:"(UTC+13:00) Samoa",supportsDaylightSavingTime:true}];var a=[0,31,59,90,120,151,181,212,243,273,304,334,365];var m=[0,31,60,91,121,152,182,213,244,274,305,335,366];var j=365*4+1;var c=(365*4+1)*25-1;var h=((365*4+1)*25-1)*4+1;var d=(((365*4+1)*25-1)*4+1)*4;var b=(((365*4+1)*25-1)*4+1)*4+((365*4+1)*25-1)*3-367;var l=(((365*4+1)*25-1)*4+1)*25-366;var k=0;var i=((((365*4+1)*25-1)*4+1)*25-366)*(1000*10000*3600*24)-1;var e=((((365*4+1)*25-1)*4+1)*25-366)*(1000*60*60*24);f.jqx.date=function(){var r=this;r.ticksPerMillisecond=10000;r.millisecondsPerTick=1/10000;r.ticksPerSecond=1000*10000;r.secondsPerTick=1/(1000*10000);r.ticksPerMinute=1000*10000*60;r.minutesPerTick=1/(1000*10000*60);r.ticksPerHour=1000*10000*3600;r.hoursPerTick=1/(1000*10000*3600);r.ticksPerDay=1000*10000*3600*24;r.daysPerTick=1/(1000*10000*3600*24);r.millisPerSecond=1000;r.millisPerMinute=1000*60;r.millisPerHour=1000*60*60;r.millisPerDay=1000*60*60*24;r.daysPerYear=365;r.daysPer4Years=j;r.daysPer100Years=c;r.daysPer400Years=h;r.daysTo1601=d;r.daysTo1899=b;r.daysTo10000=l;r.minTicks=0;r.maxTicks=i;r.maxMillis=e;r.datePartYear=0;r.datePartDayOfYear=1;r.datePartMonth=2;r.datePartDay=3;r.daysToMonth365=a;r.daysToMonth366=m;r.minValue=new Date(0);r.maxValue=new Date(((((365*4+1)*25-1)*4+1)*25-366)*(1000*10000*3600*24)-1);r.ticksMask=4611686018427388000;r.flagsMask=13835058055282164000;r.localMask=9223372036854776000;r.ticksCeiling=4611686018427388000;r.kindUnspecified=0;r.kindUtc=4611686018427388000;r.kindLocal=9223372036854776000;r.kindLocalAmbiguousDst=13835058055282164000;r.kindShift=62;r.regexTrim=/^\s+|\s+$/g;r.regexInfinity=/^[+-]?infinity$/i;r.regexHex=/^0x[a-f0-9]+$/i;r.regexParseFloat=/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/;r.calendar={"/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss",ISO:"yyyy-MM-dd hh:mm:ss",ISO2:"yyyy-MM-dd HH:mm:ss",d1:"dd.MM.yyyy",d2:"dd-MM-yyyy",zone1:"yyyy-MM-ddTHH:mm:ss-HH:mm",zone2:"yyyy-MM-ddTHH:mm:ss+HH:mm",custom:"yyyy-MM-ddTHH:mm:ss.fff",custom2:"yyyy-MM-dd HH:mm:ss.fff"},percentsymbol:"%",currencysymbol:"$",currencysymbolposition:"before",decimalseparator:".",thousandsseparator:","};r.dateData=0;r.timeZone=null;r.timeZones=g;r.internalMS=function(){return r.dateData};r.getDatePart=function(y){var x=r.internalMS();var z=parseInt(x/r.millisPerDay);var G=parseInt(z/r.daysPer400Years);z-=G*r.daysPer400Years;var B=parseInt(z/r.daysPer100Years);if(B==4){B=3}z-=B*r.daysPer100Years;var D=parseInt(z/r.daysPer4Years);z-=D*r.daysPer4Years;var E=parseInt(z/r.daysPerYear);if(E==4){E=3}if(y==r.datePartYear){return parseInt(G*400+B*100+D*4+E+1)}z-=E*r.daysPerYear;if(y==r.datePartDayOfYear){return parseInt(z+1)}var C=E==3&&(D!=24||B==3);var F=C?r.daysToMonth366:r.daysToMonth365;var A=z>>5+1;while(z>=F[A]){A++}if(y==r.datePartMonth){return parseInt(A)}return parseInt(z-F[A-1]+1)};r.dayOfWeek=function(){var y=r.dateData;var x=parseInt(y/r.millisPerDay+1)%7;return x},r.dayOfYear=function(){return r.getDatePart(r.datePartDayOfYear)};r.weekOfYear=function(y){var F=r.toDate();var D=y||r.calendar.firstDay;var A=new Date(F.getFullYear(),0,1);var E=A.getDay()-D;E=(E>=0?E:E+7);var z=Math.floor((F.getTime()-A.getTime()-(F.getTimezoneOffset()-A.getTimezoneOffset())*60000)/86400000)+1;var B;if(E<4){B=Math.floor((z+E-1)/7)+1;if(B>52){var C=new Date(F.getFullYear()+1,0,1);var x=C.getDay()-D;x=x>=0?x:x+7;B=x<4?1:53}}else{B=Math.floor((z+E-1)/7)}return B};r.subtract=function(x){return new f.jqx.timeSpan(r.dateData*r.ticksPerMillisecond-x.dateData*r.ticksPerMillisecond)};r.dateToMS=function(z,A,x){if(z>=1&&z<=9999&&A>=1&&A<=12){z=parseInt(z);var D=r.isLeapYear(z)?r.daysToMonth366:r.daysToMonth365;if(x>=1&&x<=D[A]-D[A-1]){var C=z-1;var B=C*365+parseInt(C/4)-parseInt(C/100)+parseInt(C/400)+D[A-1]+x-1;return B*r.millisPerDay}}};r.isLeapYear=function(x){if(x<1||x>9999){throw new Error("Year out of Range")}return x%4==0&&(x%100!=0||x%400==0)};r.timeToMS=function(x,B,z,y){if(x>=0&&x<24&&B>=0&&B<60&&z>=0&&z<60){var A=parseInt(x*3600+B*60+z);if(y>0&&y<1000){return(A*r.millisPerSecond)+y}return A*r.millisPerSecond}};r.daysInMonth=function(x,y){if(y<1||y>12){throw new Error("Month out of Range")}var z=r.isLeapYear(x)?r.daysToMonth366:r.daysToMonth365;return z[y]-z[y-1]};r.arrayIndexOf=function(A,z){if(A.indexOf){return A.indexOf(z)}for(var x=0,y=A.length;x=C){return A}}return 0};r.toUpper=function(x){return x.split("\u00A0").join(" ").toUpperCase()};r.toUpperArray=function(x){var A=[];for(var z=0,y=x.length;z=0){A=ad.substring(ad.indexOf(":")-2);A=r.trim(A);R=ad.substring(0,ad.indexOf(":")-2)}else{if(ad.toUpperCase().indexOf("AM")>=0){A=ad.substring(ad.toUpperCase().indexOf("AM")-2);A=r.trim(A);R=ad.substring(0,ad.toUpperCase().indexOf("AM")-2)}else{if(ad.toUpperCase().indexOf("PM")>=0){A=ad.substring(ad.toUpperCase().indexOf("PM")-2);A=r.trim(A);R=ad.substring(0,ad.toUpperCase().indexOf("PM")-2)}}}var x=new Date();var ac=false;if(R){for(var ak=0;ak=0){D=R.split(af[ak]);break}}var z=new Array();var P=new Array();var Y=new Array();var K=null;var aq=null;for(var ak=0;ak2){K=ak;break}}}for(var ak=0;ak2){aq=ak;break}}}for(var ak=0;ak0){x=ah[0];ac=true}}if(A){var aa=A.indexOf(":")>=0?A.split(":"):A;var C=r.parseDate(A,"h:mm tt",ae)||r.parseDate(A,"HH:mm:ss.fff",ae)||r.parseDate(A,"HH:mm:ss.ff",ae)||r.parseDate(A,"h:mm:ss tt",ae)||r.parseDate(A,"HH:mm:ss.tttt",ae)||r.parseDate(A,"HH:mm:ss",ae)||r.parseDate(A,"HH:mm",ae)||r.parseDate(A,"HH",ae);var Q=0,B=0,T=0,V=0;if(C&&C.getTime()!=NaN){Q=C.getHours();B=C.getMinutes();T=C.getSeconds();V=C.getMilliseconds()}else{if(aa.length==1){Q=parseInt(aa[0])}if(aa.length==2){Q=parseInt(aa[0]);B=parseInt(aa[1])}if(aa.length==3){Q=parseInt(aa[0]);B=parseInt(aa[1]);if(aa[2].indexOf(".")>=0){T=parseInt(aa[2].toString().split(".")[0]);V=parseInt(aa[2].toString().split(".")[1])}else{T=parseInt(aa[2])}}if(aa.length==4){Q=parseInt(aa[0]);B=parseInt(aa[1]);T=parseInt(aa[2]);V=parseInt(aa[3])}}if(x&&!isNaN(Q)&&!isNaN(B)&&!isNaN(T)&&!isNaN(V)){x.setHours(Q,B,T,V);ac=true}}if(ac){return x}}if(ad!=null){var W=null;var D=[":","/","-"];var ai=true;for(var H=0;Hy};r.expandYear=function(C,A){var y=new Date(),x=r.getEra(y);if(A<100){var z=C.twoDigitYearMax;z=typeof z==="string"?new Date().getFullYear()%100+parseInt(z,10):z;var B=r.getEraYear(y,C,x);A+=B-(B%100);if(A>z){A-=100}}return A};r.parseDate=function(S,Z,N){if(N==undefined||N==null){N=r.calendar}S=r.trim(S);var K=N,ae=r.getParseRegExp(K,Z),E=new RegExp(ae.regExp).exec(S);if(E===null){return null}var aa=ae.groups,Q=null,I=null,ad=null,ac=null,J=null,C=0,V,U=0,ab=0,x=0,z=null,L=false;for(var W=0,Y=aa.length;W1&&Z.length=r.maxMillis){throw new Error("Out of Range")}if(y===false){r.dateData=(z+A);return r}var x=new f.jqx.date(z+A);x.timeZone=r.timeZone;return x};r.addDays=function(y,x){return r.add(y,r.millisPerDay,x)};r.clone=function(){var x=new f.jqx.date(r.dateData);x.timeZone=r.timeZone;return x};r.clearTime=function(){var A=r.month();var z=r.year();var y=r.day();var x=new f.jqx.date(z,A,y,0,0,0,0);x.timeZone=r.timeZone;return x};r.addHours=function(y,x){return r.add(y,r.millisPerHour,x)};r.addMilliseconds=function(y,x){return r.add(y,1,x)};r.addMinutes=function(y,x){return r.add(y,r.millisPerMinute,x)};r.addMonths=function(z,B){if(z<-120000||z>120000){throw new Error("Invalid Months Value")}var F=parseInt(r.getDatePart(r.datePartYear));var x=parseInt(r.getDatePart(r.datePartMonth));var D=parseInt(r.getDatePart(r.datePartDay));var C=x-1+z;if(C>=0){x=C%12+1;F=F+C/12}else{x=12+(C+1)%12;F=F+(C-11)/12}F=parseInt(F);if(F<1||F>9999){throw new Error("Year out of range")}var E=r.daysInMonth(F,x);if(D>E){D=E}if(B===false){r.dateData=(r.dateToMS(F,x,D)+r.internalMS()%r.millisPerDay);return r}var A=new f.jqx.date((r.dateToMS(F,x,D)+r.internalMS()%r.millisPerDay));A.timeZone=r.timeZone;return A};r.addSeconds=function(y,x){return r.add(y,r.millisPerSecond,x)};r.addYears=function(y,x){return r.addMonths(y*12,x)};r.getTimeZoneOffset=function(){var y=new Date();var x=new Date(y.getFullYear(),0,1);var z=new Date(y.getFullYear(),6,1);var A=y.getTimezoneOffset()2){if(f.type(arguments[0])==="string"){var o=r.tryparseDate(arguments[0],arguments[2],arguments[1]);r.dateData=r.dateToMS(o.getFullYear(),o.getMonth()+1,o.getDate())+r.timeToMS(o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds())}else{var t=arguments[0];var s=arguments[1];var u=arguments[2];var q=arguments[3];var p=arguments[4];var n=arguments[5];var w=arguments[6];if(q===undefined){q=0}if(p===undefined){p=0}if(n===undefined){n=0}if(w===undefined){w=0}s--;var o=new Date(t,s,u,q,p,n,w);if(t<1970){o.setFullYear(t)}r.dateData=r.dateToMS(o.getFullYear(),o.getMonth()+1,o.getDate())+r.timeToMS(o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds())}}}}}return r}})(jqxBaseFramework);if(!Array.prototype.filter){Array.prototype.filter=function(b){if(this===void 0||this===null){throw new TypeError()}var f=Object(this);var a=f.length>>>0;if(typeof b!=="function"){throw new TypeError()}var e=[];var d=arguments[1];for(var c=0;c=this.swipeMin&&!this._swipeEvent&&!this._swipeLocked){this._swipeEvent=this._getSwipeEvent(d,c)}if(Math.abs(d)<=this.swipeMax){f.stopImmediatePropagation();return false}return true},_getSwipeEvent:function(e,d){var c;if(e<0){c={eventId:3+d,data:{target:this.host}}}else{c={eventId:4+d,data:{target:this.host}}}return c},_resetSwipe:function(){if(this._swipeEvent&&!this._swipeLocked){this._raiseEvent(2,this._swipeEvent.data);this._raiseEvent(this._swipeEvent.eventId,this._swipeEvent.data)}clearTimeout(this._swipeTimeout);this._mouseDown=false},_resetTap:function(){clearTimeout(this._tapHoldTimeout);if(!this._tapHoldFired&&!this._mouseMoved){this._raiseEvent(0,{target:this.host})}},_initTap:function(d){var c=this;this._mouseMoved=false;this._tapHoldFired=false;this._tapHoldTimeout=setTimeout(function(){if(!c._mouseMoved){c._raiseEvent(1,{target:this.host});c._tapHoldFired=true}},this.tapHoldDelay)},_initSwipe:function(d){var c=this;this._mouseDown=true;this._maxSwipeVerticalDistance=0;this._maxSwipeHorizontalDistance=0;this._startX=this._getCoordinates(d).x;this._startY=this._getCoordinates(d).y;this._swipeLocked=false;this._swipeEvent=null;this._swipeTimeout=setTimeout(function(){c._swipeLocked=true},this.swipeDelay)},_rotationListeners:function(){var c=this;this._previousOrientation=window.orientation;this._previousWidth=screen.width;if(this.orientationChangeEnabled){if(window.addEventListener){window.addEventListener("resize",this._rotateHandler,false);window.addEventListener("orientationchange",this._rotateHandler,false)}this._rotateInterval=setInterval(function(){c._checkOrientation()},this._rotationInterval)}},_checkOrientation:function(){var c="vertical";if(window.orientation!==this._previousOrientation||this._previousWidth!==screen.width){if(window.orientation===90||screen.width>screen.height){c="horizontal"}this._raiseEvent(7,{orientation:c})}this._previousOrientation=window.orientation;this._previousWidth=screen.width},_raiseEvent:function(d,c){var e=b.Event(this._events[d]);e.args=c;return this.host.trigger(e)},_getCoordinates:function(d){var f=b.jqx.position(d);f.x=f.left;f.y=f.top;return f},propertyChangedHandler:function(c,d,f,e){if(d==="orientationChangeEnabled"){this.refresh()}else{return}},isTouchDevice:function(){return this._isTouchDevice}})}(jqxBaseFramework)); + +(function(b){var a=(function(){var c={},u,q,j,l,g,h,o,p;function d(C,B,x,A,y,v,w){var z=this;if(!z){z=window.jqx}z.hierarchy=y;z.exportFormat=v;z.filename=w;C.beginFile(w);n(C);k(C);C.endFile(w);return C.getFile()}function n(z){var x=true;b.each(q,function(){if(this.hidden){x=false;return false}});z.beginHeader(x);var w=0;for(var v in q){if(q[v].columnsDataFields){v=q[v].columnsDataFields[w].displayfield}var y=m(v,q[v]);z.appendHeaderCell(q[v],v,y,x,w);w++}z.endHeader(x)}function k(y){var x=this;if(!x){x=window.jqx}y.beginBody();if(x.hierarchy){var w=function(A){for(var z=0;zA.level&&w.index-10){return v[0].style}return null}function t(){if(!g){g=new Array();b.each(j,function(v,w){g[g.length]={name:v,style:w}})}return g}function s(A,z){var B=q[z];if(B){if(B.customCellStyles){var x=B.customCellStyles[A];if(x){return j[x]}}if(B.cellStyle){if(B.cellAltStyle){var w=A%2;if(w==0){return j[B.cellStyle]}return j[B.cellAltStyle]}return j[B.cellStyle]}else{var v=t();if(v.length>0){var w=A%(v.length-1);var y=v[w+1].style;return y}}}return null}function r(y,w,x){var v=document.createElement("input");v.name=w;v.value=y;v.type="hidden";x.appendChild(v);return v}function f(x,v,w){var y=document.createElement("textarea");y.name=v;y.value=x;w.appendChild(y);return y}function i(w,z,y,v,A){var x=document.createElement("form");r(w,"filename",x);r(z,"format",x);f(y,"content",x);if(v==undefined||v==""){if(window&&window.location.toString().indexOf("jqwidgets.com")>=0){v="https://jqwidgets.com/export_server/dataexport.php"}else{v="http://jquerygrid.net/export_server/dataexport.php"}}x.action=v;x.method="post";if(A){x.acceptCharset=A}document.body.appendChild(x);return x}l=function(A,y,x,w,z,v){if(!(this instanceof a)){return new a(A,y,x,z,v)}u=A;q=y;j=x;this.exportTo=function(K,H,G,B){K=K.toString().toLowerCase();var D=c[K];if(typeof D==="undefined"){throw"You can't export to "+K+" format."}if(K==="pdf"&&B==undefined){var M=this.exportTo(K,H,K,"pdf");if(!b.jqx.pdfExport){b.jqx.pdfExport={orientation:"portrait",paperSize:"a4"}}var L=new pdfDataExport(b.jqx.pdfExport.orientation,"pt",b.jqx.pdfExport.paperSize);L.cellInitialize();var J=b(M).find("th");var I=b(M).find("tr");var N=0;L.setFontSize(13*72/96);var F=595;switch(b.jqx.pdfExport.paperSize){case"legal":var F=612;if(b.jqx.pdfExport.orientation!=="portrait"){F=1008}break;case"letter":var F=612;if(b.jqx.pdfExport.orientation!=="portrait"){F=792}break;case"a3":var F=841;if(b.jqx.pdfExport.orientation!=="portrait"){F=1190}break;case"a4":var F=595;if(b.jqx.pdfExport.orientation!=="portrait"){F=842}break;case"a5":var F=420;if(b.jqx.pdfExport.orientation!=="portrait"){F=595}break}F-=20;var E=0;var C=[];b.each(J,function(O){var P=parseInt(this.style.width);if(isNaN(P)){P=25}var Q=P*72/96;C[O]=Q;E+=Q});if(J.length===0){b.each(I[0].cells,function(O){var P=parseInt(this.style.width);if(isNaN(P)){P=F/I[0].cells.length}var Q=P*72/96;C[O]=Q;E+=Q})}if(E>F){b.each(C,function(O){C[O]=(C[O]/E)*100;C[O]=C[O]*F/100})}b.each(J,function(P){var T=C[P];var S=25*72/96;var R=L.getTextDimensions(b(this).html());var Q=b(this).html();if(R.w+3>T){var O=L.splitTextToSize(Q,T-3);var U=O[0];if(U.length>3){Q=U.substring(0,U.length-3)+"..."}else{Q=U.substring(0,1)+"..."}var O=L.splitTextToSize(Q,T-3);var U=O[0];if(U!=Q){Q=U}}L.cell(10,10,T,S,Q,N)});N++;b.each(I,function(V){if(V===0){return true}var P=b(this).children();var Q=P.length>J.length&&J.length>0;if(Q){var Y=P.length-J.length;var Z="";var X=C[0];var U=25*72/96;for(var R=0;R<=Y;R++){var O=P[R].innerHTML;if(O==="+"||O==="-"){O=O+" "}if(O===" "){O=" "}Z+=O}var T=L.getTextDimensions(Z);if(T.w+3>X){var W=L.splitTextToSize(Z,X-3);var S=W[0];if(S.length>3){Z=S.substring(0,S.length-3)+"..."}else{Z=S.substring(0,1)+"..."}var W=L.splitTextToSize(Z,X-3);var S=W[0];if(S!=Z){Z=S}}L.cell(10,10,X,U,Z,N);for(var R=Y+1;RX){var W=L.splitTextToSize(Z,X-3);var S=W[0];if(S.length>3){Z=S.substring(0,S.length-3)+"..."}else{Z=S.substring(0,1)+"..."}var W=L.splitTextToSize(Z,X-3);var S=W[0];if(S!=Z){Z=S}}L.cell(10,10,X,U,Z,N)}N++;return true}b.each(P,function(ab){var af=C[ab];var ae=25*72/96;var ad=b(this).html();var ac=L.getTextDimensions(b(this).html());if(ac.w+3>af){var aa=L.splitTextToSize(ad,af-3);var ag=aa[0];if(ag.length>3){ad=ag.substring(0,ag.length-3)+"..."}else{ad=ag.substring(0,1)+"..."}var aa=L.splitTextToSize(ad,af-3);var ag=aa[0];if(ag!=ad){ad=ag}}L.cell(10,10,af,ae,ad,N)});N++});if(b.jqx.browser.msie&&b.jqx.browser.version<10){throw new Error("PDF export requires a browser with HTML5 support");return}return L}return d(D,u,q,j,H,G,B)};this.exportToFile=function(L,B,O,F,I){if(L==="pdf"){var N=this.exportTo(L,I,L,B);if(!b.jqx.pdfExport){b.jqx.pdfExport={orientation:"portrait",paperSize:"a4"}}var M=new pdfDataExport(b.jqx.pdfExport.orientation,"pt",b.jqx.pdfExport.paperSize);if(F=="utf-8"||F=="UTF-8"){M.setFont("courier","normal")}M.cellInitialize();var K=b(N).find("th");var J=b(N).find("tr");var P=0;M.setFontSize(13*72/96);var G=595;switch(b.jqx.pdfExport.paperSize){case"legal":var G=612;if(b.jqx.pdfExport.orientation!=="portrait"){G=1008}break;case"letter":var G=612;if(b.jqx.pdfExport.orientation!=="portrait"){G=792}break;case"a3":var G=841;if(b.jqx.pdfExport.orientation!=="portrait"){G=1190}break;case"a4":var G=595;if(b.jqx.pdfExport.orientation!=="portrait"){G=842}break;case"a5":var G=420;if(b.jqx.pdfExport.orientation!=="portrait"){G=595}break}G-=20;var E=0;var C=[];b.each(K,function(Q){var R=parseInt(this.style.width);if(isNaN(R)){R=25}var S=R*72/96;C[Q]=S;E+=S});if(K.length===0){b.each(J[0].cells,function(Q){var R=parseInt(this.style.width);if(isNaN(R)){R=G/J[0].cells.length}var S=R*72/96;C[Q]=S;E+=S})}if(E>G){b.each(C,function(Q){C[Q]=(C[Q]/E)*100;C[Q]=C[Q]*G/100})}b.each(K,function(R){var V=C[R];var U=25*72/96;var T=M.getTextDimensions(b(this).html());var S=b(this).html();if(T.w+3>V){var Q=M.splitTextToSize(S,V-3);var W=Q[0];if(W.length>3){S=W.substring(0,W.length-3)+"..."}else{S=W.substring(0,1)+"..."}var Q=M.splitTextToSize(S,V-3);var W=Q[0];if(W!=S){S=W}}M.cell(10,10,V,U,S,P)});P++;b.each(J,function(X){if(X===0){return true}var R=b(this).children();var S=R.length>K.length&&K.length>0;if(S){var aa=R.length-K.length;var ab="";var Z=C[0];var W=25*72/96;for(var T=0;T<=aa;T++){var Q=R[T].innerHTML;if(Q==="+"||Q==="-"){Q=Q+" "}if(Q===" "){Q=" "}ab+=Q}var V=M.getTextDimensions(ab);if(V.w+3>Z){var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U.length>3){ab=U.substring(0,U.length-3)+"..."}else{ab=U.substring(0,1)+"..."}var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U!=ab){ab=U}}M.cell(10,10,Z,W,ab,P);for(var T=aa+1;TZ){var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U.length>3){ab=U.substring(0,U.length-3)+"..."}else{ab=U.substring(0,1)+"..."}var Y=M.splitTextToSize(ab,Z-3);var U=Y[0];if(U!=ab){ab=U}}M.cell(10,10,Z,W,ab,P)}P++;return true}b.each(R,function(ad){var ah=C[ad];var ag=25*72/96;var af=b(this).html();if(af===" "){af=" "}var ae=M.getTextDimensions(b(this).html());if(ae.w+3>ah){var ac=M.splitTextToSize(af,ah-3);var ai=ac[0];if(ai.length>3){af=ai.substring(0,ai.length-3)+"..."}else{af=ai.substring(0,1)+"..."}var ac=M.splitTextToSize(af,ah-3);var ai=ac[0];if(ai!=af){af=ai}}M.cell(10,10,ah,ag,af,P)});P++});if(b.jqx.browser.msie&&b.jqx.browser.version<10){throw new Error("PDF export requires a browser with HTML5 support");return}M.save(B+".pdf");return}var H=this.exportTo(L,I,L,B),D=i(B,L,H,O,F);D.submit();document.body.removeChild(D)};this.exportToLocalFile=function(F,C,D,B){var E=this.exportTo(F,D,B);document.location.href="data:application/octet-stream;filename="+C+","+encodeURIComponent(E)}};l.extend=function(v,w){if(w instanceof b.jqx.dataAdapter.DataExportModuleBase){c[v]=w}else{throw"The module "+v+" is not instance of DataExportModuleBase."}};return l}());b.jqx.dataAdapter.ArrayExporter=a})(jqxBaseFramework);(function(b){var a=function(){this.formatData=function(f,e,c,h){if(e==="date"){var d="";if(typeof f==="string"){d=b.jqx.dataFormat.tryparsedate(f);f=d}if(f===""||f===null){return""}d=b.jqx.dataFormat.formatdate(f,c,h);if((d&&d.toString()=="NaN")||d==null){return""}f=d}else{if(e==="number"||e==="float"||e==="int"||e=="integer"){if(f===""||f===null){return""}if(!isNaN(new Number(f))){var g=b.jqx.dataFormat.formatnumber(f,c,h);if(g.toString()=="NaN"){return""}else{f=g}}}else{f=f}}if(f===null){return""}return f};this.getFormat=function(f){var c=f?f.formatString:"";var e=f?f.localization:"";var d="string";d=f?f.type:"string";if(d=="number"||d=="float"){if(!c){c="f2"}}if(d=="int"||d=="integer"){if(!c){c="n0"}}if(d=="date"){if(!c){c="d"}}return{type:d,formatString:c,localization:e}};this.beginFile=function(){throw"Not implemented!"};this.beginHeader=function(){throw"Not implemented!"};this.appendHeaderCell=function(){throw"Not implemented!"};this.endHeader=function(){throw"Not implemented!"};this.beginBody=function(){throw"Not implemented!"};this.beginRow=function(){throw"Not implemented!"};this.beginRows=function(){throw"Not implemented!"};this.endRows=function(){throw"Not implemented!"};this.appendBodyCell=function(){throw"Not implemented!"};this.endRow=function(){throw"Not implemented!"};this.endBody=function(){throw"Not implemented!"};this.endFile=function(){throw"Not implemented!"};this.getFile=function(){throw"Not implemented!"}};b.jqx.dataAdapter.DataExportModuleBase=a})(jqxBaseFramework);(function(d){var c=function(j){var e,h,g;var l=0;var i=this;this.beginFile=function(){e=""};this.beginHeader=function(){};this.appendHeaderCell=function(q,r,p,m,n){if(p){if(p.level!=undefined){if(n0)||(l==0&&g)){e+="\n"}l++};this.appendBodyCell=function(q,m,p,r,n){if(p){if(p.maxLevel!=undefined){if(n===p.maxLevel){k(q,m);for(var o=0;o'}else{g='\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t'}};this.beginHeader=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t"}};this.appendHeaderCell=function(m,n,l,k){h=k;if(!k){return}if(i){g+='\n\t\t\t\t"}else{if(l.disabled){return}if(l.merge){if(m.width){g+="\n\t\t\t\t"}else{g+="\n\t\t\t\t"}}else{if(m.width){g+='\n\t\t\t\t"}else{g+='\n\t\t\t\t"}}}};this.endHeader=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t"}};this.beginBody=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t"}j=0};this.beginRow=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t\t"}j++};this.appendBodyCell=function(l,n,k){var m=this.getFormat(n);if(l===""){l=" "}if(i){if(j==1&&!h){g+='\n\t\t\t\t\t"}else{g+='\n\t\t\t\t\t"}}else{if(k.merge){if(j==1&&!h){g+="\n\t\t\t\t\t"}else{g+="\n\t\t\t\t\t"}}else{if(j==1&&!h){g+='\n\t\t\t\t\t"}else{g+='\n\t\t\t\t\t"}}}};this.endRow=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t\t"}};this.endBody=function(){if(i){g+="\n\t"}else{g+="\n\t\t\t"}};this.endFile=function(k){if(i||k==undefined){g+="\n
'+m.text+"'+m.text+"'+m.text+"'+m.text+"'+m.text+"
'+this.formatData(l,m.type,m.formatString,m.localization)+"'+this.formatData(l,m.type,m.formatString,m.localization)+"'+this.formatData(l,m.type,m.formatString,m.localization)+"'+this.formatData(l,m.type,m.formatString,m.localization)+"'+this.formatData(l,m.type,m.formatString,m.localization)+"'+this.formatData(l,m.type,m.formatString,m.localization)+"
"}else{g+="\n\t\t\n\t\n\n"}};this.getFile=function(){return g};function f(m){var k="";for(var l in m){if(m.hasOwnProperty(l)){if(i&&l=="font-size"){m[l]="100%"}k+=l+":"+m[l]+";"}}return k}};a.prototype=new d.jqx.dataAdapter.DataExportModuleBase();var e=function(){};e.prototype=new a();var c=function(){};c.prototype=new a();var b=new c();d.jqx.dataAdapter.ArrayExporter.extend("html",new e());d.jqx.dataAdapter.ArrayExporter.extend("pdf",b)})(jqxBaseFramework);(function(b){var a=function(){var h,l,d,i,c,j,m={style:"",stylesMap:{font:{color:"Color","font-family":"FontName","font-style":"Italic","font-weight":"Bold"},interior:{"background-color":"Color",background:"Color"},alignment:{left:"Left",center:"Center",right:"Right"}},startStyle:function(p){this.style+='\n\t\t"},toString:function(){var p=this.style;this.style="";return p}};this.beginFile=function(){c={};j=0;h='\n\t \n\t \n\t \n\t12.00 \n\t \n\t \n\t8130 \n\t15135 \n\t120 \n\t45 \n\tFalse \n\tFalse \n\t \n\t'};this.beginHeader=function(){l='\n\t\n\t\t';d=[];i=[]};this.appendHeaderCell=function(r,s,q){var p=r.width!=undefined?r.width:r.text.length*10;l+='\n\t\t\t';d.push(r);i.push(q)};this.endHeader=function(p){if(p){this.beginRow();for(var q=0;q";return}l+="\n\t\t\t"};this.beginRows=function(p){l+="\n\t\t\t\t"};this.appendBodyCell=function(r,p,q,s){g.call(this,r,p,q,s)};this.endRow=function(q){if(q!=undefined){l+="\n\t\t\t";for(var p=0;p";return}l+="\n\t\t\t"};this.endRows=function(q){if(q!=undefined){l+="\n\t\t\t";for(var p=0;p";return}};this.endBody=function(){l+="\n\t\t
"};this.endFile=function(){l+="\n\t
\n
";h+="\n\t"};this.getFile=function(){return h+l};function g(t,w,s,v){var r="String";var u=this.getFormat(w);if(t!=null&&t.toString().substring(0,3)=="_AG"){t=t.toString().substring(3);r="String"}else{if(u.type=="date"){var q=t;t=this.formatData(t,u.type,u.formatString,u.localization);if(t===null||t===""){t="";r="String"}else{t=q.toISOString();r="DateTime"}}if(u.type=="string"){if(t===null||t===undefined){t=""}else{if(t.toString().indexOf("&")>=0){t=t.toString().replace(/&/g,"&")}if(t.toString().indexOf(">")>=0){t=t.toString().replace(/>/g,">")}if(t.toString().indexOf("<")>=0){t=t.toString().replace(/=0){t=t.toString().replace(/"/g,""")}if(t.toString().indexOf("'")>=0){t=t.toString().replace(/'/g,"'")}}}if(s.dataType=="number"||s.dataType=="float"||s.dataType=="int"||s.dataType=="integer"){r="Number";t=parseFloat(t);if(t===null||isNaN(t)||t===""){t="";r="String"}if(t&&r!="String"&&t!=""){if(w&&w.formatString&&w.formatString.indexOf("p")>=0){t=t/100}}s.currencysymbol=w.localization.currencysymbol}}var p=f(s);if(s.merge){l+='\n\t\t\t\t'+t+""}else{l+='\n\t\t\t\t'+t+""}}function n(){j+=1;return"xls-style-"+j}function k(q){for(var p in c){if(o(q,c[p])&&o(c[p],q)){return p}}return undefined}function o(t,q){var s=true;for(var r in t){if(t[r]!==q[r]){s=false}}return s}function e(q,p){m.startStyle(q);m.buildAlignment(p);m.buildBorder(p);m.buildFont(p);m.buildInterior(p);m.buildFormat(p);m.closeStyle();h+=m.toString()}function f(p){if(!p){return""}var q=k(p);if(typeof q==="undefined"){q=n();c[q]=p;e(q,p)}return q}};a.prototype=new b.jqx.dataAdapter.DataExportModuleBase();b.jqx.dataAdapter.ArrayExporter.extend("xls",new a())})(jqxBaseFramework);(function(b){var a=function(){var e,c,d;this.beginFile=function(){e='';e+="\n"};this.beginHeader=function(){c=[]};this.appendHeaderCell=function(f,g){c.push(g)};this.endHeader=function(){};this.beginBody=function(g,f){};this.beginRow=function(h){var g=this;if(!g){g=window.jqx}if(h!=undefined){if(g.hierarchy){e+="\n\t";for(var f=0;f";d=0;return}}e+="\n\t";d=0};this.beginRows=function(g){if(g!=undefined){e+="\n\t\t";for(var f=0;f";d=0;return}e+="\n\t\t"};this.appendBodyCell=function(h,n,f,o,j,m){var k=this;if(!k){k=window.jqx}var l=this.getFormat(n);h=this.formatData(h,l.type,l.formatString,l.localization);if(l.type=="string"){if(h.toString().indexOf("&")>=0){h=h.toString().replace(/&/g,"&")}if(h.toString().indexOf(">")>=0){h=h.toString().replace(/>/g,">")}if(h.toString().indexOf("<")>=0){h=h.toString().replace(/=0){h=h.toString().replace(/"/g,""")}if(h.toString().indexOf("'")>=0){h=h.toString().replace(/'/g,"'")}}if(o.level!=undefined){if(k.hierarchy){e+="\n\t\t";for(var g=0;g"+h+""}else{e+="<"+m+">"+h+""}}else{if(m!=undefined){e+="\n\t\t<"+m+">"+h+""}else{e+="\n\t\t<"+c[d]+">"+h+""}}}else{e+="\n\t\t<"+c[d]+">"+h+""}d++};this.endRow=function(h){var g=this;if(!g){g=window.jqx}if(h!=undefined){if(g.hierarchy){e+="\n\t";for(var f=0;f";d=0;return}}e+="\n\t";d=0};this.endRows=function(g){if(g!=undefined){e+="\n\t\t";for(var f=0;f";d=0;return}e+="\n\t\t"};this.endBody=function(){};this.endFile=function(){e+="\n
"};this.getFile=function(){return e}};a.prototype=new b.jqx.dataAdapter.DataExportModuleBase();b.jqx.dataAdapter.ArrayExporter.extend("xml",new a())})(jqxBaseFramework);(function(d){var j=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,l={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function a(n){return'"'+n.replace(j,function(o){var p=l[o];return typeof p==="string"?p:"\\u"+("0000"+o.charCodeAt(0).toString(16)).slice(-4)})+'"'}function b(o){return o<10?"0"+o:o}function e(o){var n;if(isFinite(o.valueOf())){n=o.getUTCFullYear()+"-"+b(o.getUTCMonth()+1)+"-"+b(o.getUTCDate())+"T"+b(o.getUTCHours())+":"+b(o.getUTCMinutes())+":"+b(o.getUTCSeconds())+'Z"'}else{n="null"}return n}function g(q){var n=q.length,o=[],p;for(p=0;p>18&63;p=t>>12&63;o=t>>6&63;n=t&63;j[u++]=s[q]+s[p]+s[o]+s[n]}while(l>16&255;e=q>>8&255;d=q&255;if(n===64){j[r++]=String.fromCharCode(f)}else{if(m===64){j[r++]=String.fromCharCode(f,e)}else{j[r++]=String.fromCharCode(f,e,d)}}}while(k>");ab("endobj");aA=f[aB].join("\n");w();if(av){k=[];for(ax=0;ax>8)&255,(ay>>16)&255,(ay>>24)&255])];aA="";for(ax in k){if(k.hasOwnProperty(ax)){aA+=String.fromCharCode.apply(null,k[ax])}}ab("<>")}else{ab("<>")}K(aA);ab("endobj")}D[1]=F;ab("1 0 obj");ab("<>");ab("endobj")},X=function(i){i.objectNumber=w();ab("<>");ab("endobj")},J=function(){var i;for(i in ai){if(ai.hasOwnProperty(i)){X(ai[i])}}},L=function(){G.publish("putXobjectDict")},x=function(){ab("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]");ab("/Font <<");var i;for(i in ai){if(ai.hasOwnProperty(i)){ab("/"+i+" "+ai[i].objectNumber+" 0 R")}}ab(">>");ab("/XObject <<");L();ab(">>")},h=function(){J();G.publish("putResources");D[2]=F;ab("2 0 obj");ab("<<");x();ab(">>");ab("endobj");G.publish("postPutResources")},m=function(aw,k,ax){var i;if(Q[k]===i){Q[k]={}}Q[k][ax]=aw},au={},u=function(i,ax,az,aw){var ay="F"+(c(ai)+1).toString(10),k=ai[ay]={id:ay,PostScriptName:i,fontName:ax,fontStyle:az,encoding:aw,metadata:{}};m(ay,ax,az);G.publish("addFont",k);return ay},e=function(){var k="helvetica",aG="times",aI="courier",aF="normal",aE="bold",aD="italic",aH="bolditalic",ax="StandardEncoding",aA=[["Helvetica",k,aF],["Helvetica-Bold",k,aE],["Helvetica-Oblique",k,aD],["Helvetica-BoldOblique",k,aH],["Courier",aI,aF],["Courier-Bold",aI,aE],["Courier-Oblique",aI,aD],["Courier-BoldOblique",aI,aH],["Times-Roman",aG,aF],["Times-Bold",aG,aE],["Times-Italic",aG,aD],["Times-BoldItalic",aG,aH]],aC,ay,aB,az;for(aC=0,ay=aA.length;aC>8){aF=true}}aG=aw.join("")}}aC=aG.length;while(aF===az&&aC!==0){if(aG.charCodeAt(aC-1)>>8){aF=true}aC--}if(!aF){return aG}else{aw=ax.noBOM?[]:[254,255];for(aC=0,aA=aG.length;aC>8;if(aB>>8){throw new Error("Character at position "+aC.toString(10)+" of string '"+aG+"' exceeds 16bits. Cannot be encoded into UCS-2 BE")}aw.push(aB);aw.push(k-(aB<<8))}return String.fromCharCode.apply(az,aw)}},Z=function(k,i){return s(k,i).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Y=function(){ab("/Producer (pdfDataExport "+ao+")");if(O.title){ab("/Title ("+Z(O.title)+")")}if(O.subject){ab("/Subject ("+Z(O.subject)+")")}if(O.author){ab("/Author ("+Z(O.author)+")")}if(O.keywords){ab("/Keywords ("+Z(O.keywords)+")")}if(O.creator){ab("/Creator ("+Z(O.creator)+")")}var i=new Date();ab("/CreationDate (D:"+[i.getFullYear(),A(i.getMonth()+1),A(i.getDate()),A(i.getHours()),A(i.getMinutes()),A(i.getSeconds())].join("")+")")},W=function(){ab("/Type /Catalog");ab("/Pages 1 0 R");ab("/OpenAction [3 0 R /FitH null]");ab("/PageLayout /OneColumn");G.publish("putCatalog")},l=function(){ab("/Size "+(n+1));ab("/Root "+n+" 0 R");ab("/Info "+(n-1)+" 0 R")},ar=function(){g++;v=true;f[g]=[]},ah=function(){ar();ab(p(z*ak)+" w");ab(H);if(R!==0){ab(R.toString(10)+" J")}if(T!==0){ab(T.toString(10)+" j")}G.publish("addPage",{pageNumber:g})},y=function(aw,ay){var i,k;if(aw===k){aw=ai[d].fontName}if(ay===k){ay=ai[d].fontStyle}try{i=Q[aw][ay]}catch(ax){i=k}if(!i){throw new Error("Unable to look up font label for font '"+aw+"', '"+ay+"'. Refer to getFontList() for available fonts.")}return i},q=function(){v=false;t=[];D=[];ab("%PDF-"+U);aa();h();w();ab("<<");Y();ab(">>");ab("endobj");w();ab("<<");W();ab(">>");ab("endobj");var aw=F,k;ab("xref");ab("0 "+(n+1));ab("0000000000 65535 f ");for(k=1;k<=n;k++){ab(r(D[k])+" 00000 n ")}ab("trailer");ab("<<");l();ab(">>");ab("startxref");ab(aw);ab("%%EOF");v=true;return t.join("\n")},ac=function(i){var k="S";if(i==="F"){k="f"}else{if(i==="FD"||i==="DF"){k="B"}}return k},I=function(az,aw){var ay,aB,aA,aC,ax,k;switch(az){case ay:return q();case"save":if(navigator.getUserMedia){if(window.URL===undefined){return P.output("dataurlnewwindow")}else{if(window.URL.createObjectURL===undefined){return P.output("dataurlnewwindow")}}}aB=q();aA=aB.length;aC=new Uint8Array(new ArrayBuffer(aA));for(ax=0;axB){af=C;C=B;B=af}}else{if(E==="l"||E==="landscape"){E="l";if(B>C){af=C;C=B;B=af}}else{throw ("Invalid orientation: "+E)}}P.internal={pdfEscape:Z,getStyle:ac,getFont:function(){return ai[y.apply(P,arguments)]},getFontSize:function(){return aj},btoa:btoa,write:function(i,ax,aw,k){ab(arguments.length===1?i:Array.prototype.join.call(arguments," "))},getCoordinateString:function(i){return p(i*ak)},getVerticalCoordinateString:function(i){return p((B-i)*ak)},collections:{},newObject:w,putStream:K,events:G,scaleFactor:ak,pageSize:{width:C,height:B},output:function(k,i){return I(k,i)}};P.addPage=function(){ah();return this};var ag=["","0","00","000","0000"];var j=function(aA,aw){var ax=["FEFF"];for(var az=0,k=aA.length,ay;az Tj\nT* <")}else{throw new Error('Type of text must be string or Array. "'+aF+'" is not recognized.')}}ab("BT\n/"+d+" "+aj+" Tf\n"+aj+" TL\n"+ad+"\n"+p(aE*ak)+" "+p((B-aC)*ak)+" Td\n<"+aB+"> Tj\nET");return this};P.text=function(aF,aE,aC,aw){var ax,aA,az,aD,k,aB,ay;if(typeof aF==="number"){aA=aC;az=aF;aD=aE;aF=aA;aE=az;aC=aD}if(typeof aF==="string"&&aF.match(/[\n\r]/)){aF=aF.split(/\r\n|\r|\n/g)}if(typeof aw==="undefined"){aw={noBOM:true,autoencode:true}}else{if(aw.noBOM===ax){aw.noBOM=true}if(aw.autoencode===ax){aw.autoencode=true}}if(typeof aF==="string"){aB=Z(aF,aw)}else{if(aF instanceof Array){k=aF.concat();for(ay=k.length-1;ay!==-1;ay--){k[ay]=Z(k[ay],aw)}aB=k.join(") Tj\nT* (")}else{throw new Error('Type of text must be string or Array. "'+aF+'" is not recognized.')}}ab("BT\n/"+d+" "+aj+" Tf\n"+aj+" TL\n"+ad+"\n"+p(aE*ak)+" "+p((B-aC)*ak)+" Td\n("+aB+") Tj\nET");return this};P.line=function(k,ax,i,aw){ab(p(k*ak)+" "+p((B-ax)*ak)+" m "+p(i*ak)+" "+p((B-aw)*ak)+" l S");return this};P.lines=function(k,aF,aE,aO,aK){var ay,aM,aC,aD,aB,aA,aI,aG,aN,aL,az,aJ,ax,aH,aw;if(typeof k==="number"){aM=aE;aC=k;aD=aF;k=aM;aF=aC;aE=aD}aK=ac(aK);aO=aO===ay?[1,1]:aO;ab(o(aF*ak)+" "+o((B-aE)*ak)+" m ");aB=aO[0];aA=aO[1];aG=k.length;aH=aF;aw=aE;for(aI=0;aI=this.internal.pageSize.height&&f===1&&!e){this.cellAddPage();if(this.printHeaders&&this.tableHeaderRow){this.printHeaderRow(u);this.lnMod+=1;u+=1}if(l()===0){j(Math.round((this.internal.pageSize.height-(s*2))/s))}}else{if(e&&k().ln!==u&&g()===l()){this.cellAddPage();if(this.printHeaders&&this.tableHeaderRow){this.printHeaderRow(u);this.lnMod+=1;u+=1}}}var B=k(),r=this.getTextDimensions(p),t=1;if(B.x!==undefined&&B.ln===u){z=B.x+B.w}if(B.y!==undefined&&B.y===v){v=B.y}if(B.h!==undefined&&B.h===s){s=B.h}if(B.ln!==undefined&&B.ln===u){u=B.ln;t=0}if(e){v=s*(g()+t)}else{v=(v+(s*Math.abs(l()*f-u-l())))}this.rect(z,v,A,s);var q=/[а-яА-ЯЁё]/.test(p);if(q){this.text16(p,z+3,v+s-3)}else{this.text(p,z+3,v+s-3)}n(g()+t);d(z,v,A,s,u);return this};i.getKeys=(typeof Object.keys==="function")?function(p){if(!p){return[]}return Object.keys(p)}:function(p){var q=[],r;for(r in p){if(p.hasOwnProperty(r)){q.push(r)}}return q};i.arrayMax=function(u,t){var p=u[0],q,s,r;for(q=0,s=u.length;qp){p=r}}}return p};i.table=function(J,r,I){var v=[],p=[],D,z,B,x,E,y,G={},A={},u,s,H=[],C,F=[],t,q,w;this.lnMod=0;if(I){z=I.autoSize||false;B=this.printHeaders=I.printHeaders||true;x=I.autoStretch||true}if(!J){throw"No data for PDF table"}if(r===undefined||(r===null)){v=this.getKeys(J[0])}else{if(r[0]&&(typeof r[0]!=="string")){for(E=0,y=r.length;Ej){q.push(g.slice(o,m));p=0;o=m}p+=n[m];m++}if(o!==m){q.push(g.slice(o,m))}return q};var f=function(s,k,v){if(!v){v={}}var t=b(" ",v)[0];var r=s.split(" ");var w=[],x=[w],h=v.textIndent||0,u=0,p=0,g,q;var o,m,n;for(o=0,m=r.length;ok){if(p>k){n=d(g,q,k-(h+u),k);w.push(n.shift());w=[n.pop()];while(n.length){x.push([n.shift()])}p=e(q.slice(g.length-w[0].length))}else{w=[g]}x.push(w);h=p;u=t}else{w.push(g);h+=u+p;u=t}}var j=[];for(o=0,m=x.length;o>")}if("trns" in g&&g.trns.constructor==Array){var k="";for(var j=0;j>");l(g.data);h("endobj")},e=function(){var g=this.internal.collections[d+"images"];for(var h in g){b.call(this,g[h])}},a=function(){var g=this.internal.collections[d+"images"],h=this.internal.write,k;for(var j in g){k=g[j];h("/I"+k.i,k.n,"0","R")}};c.addImage=function(g,s,q,p,t,l){if(typeof g==="object"&&g.nodeType===1){var j=document.createElement("canvas");j.width=g.clientWidth;j.height=g.clientHeight;var u=j.getContext("2d");if(!u){throw ("addImage requires canvas to be supported by browser.")}u.drawImage(g,0,0,j.width,j.height);g=j.toDataURL("image/jpeg");s="JPEG"}if(s.toUpperCase()!=="JPEG"){throw new Error("addImage currently only supports format 'JPEG', not '"+s+"'")}var i,n=this.internal.collections[d+"images"],m=this.internal.getCoordinateString,o=this.internal.getVerticalCoordinateString;if(g.substring(0,23)==="data:image/jpeg;base64,"){g=atob(g.replace("data:image/jpeg;base64,",""))}if(n){i=Object.keys?Object.keys(n).length:(function(w){var h=0;for(var v in w){if(w.hasOwnProperty(v)){h++}}return h})(n)}else{i=0;this.internal.collections[d+"images"]=n={};this.internal.events.subscribe("putResources",e);this.internal.events.subscribe("putXobjectDict",a)}var r=f(g);var k={w:r[0],h:r[1],cs:"DeviceRGB",bpc:8,f:"DCTDecode",i:i,data:g};n[i]=k;if(!t&&!l){t=-96;l=-96}if(t<0){t=(-1)*k.w*72/t/this.internal.scaleFactor}if(l<0){l=(-1)*k.h*72/l/this.internal.scaleFactor}if(t===0){t=l*k.w/k.h}if(l===0){l=t*k.h/k.w}this.internal.write("q",m(t),"0 0",m(l),m(q),o(p+l),"cm /I"+k.i,"Do Q");return this}})(pdfDataExport.API);(function(a){var e=function(q){var w="0123456789abcdef",o="klmnopqrstuvwxyz",h={};for(var r=0;r")[0],g="download" in n,j=function(t){var s=r.createEvent("MouseEvents");s.initMouseEvent("click",true,false,h,0,0,0,0,0,false,false,false,false,0,null);return t.dispatchEvent(s)},o=h.webkitRequestFileSystem,p=h.requestFileSystem||o||h.mozRequestFileSystem,m=function(s){(h.setImmediate||h.setTimeout)(function(){throw s},0)},c="application/octet-stream",k=0,b=[],i=function(){var t=b.length;while(t--){var s=b[t];if(typeof s==="string"){e.revokeObjectURL(s)}else{s.remove()}}b.length=0},q=function(t,s,w){s=[].concat(s);var v=s.length;while(v--){var x=t["on"+s[v]];if(typeof x==="function"){try{x.call(t,w||t)}catch(u){m(u)}}}},f=function(t,u){var v=this,B=t.type,E=false,x,w,s=function(){var F=l().createObjectURL(t);b.push(F);return F},A=function(){q(v,"writestart progress write writeend".split(" "))},D=function(){if(E||!x){x=s(t)}if(w){w.location.href=x}v.readyState=v.DONE;A()},z=function(F){return function(){if(v.readyState!==v.DONE){return F.apply(this,arguments)}}},y={create:true,exclusive:false},C;v.readyState=v.INIT;if(!u){u="download"}if(g){x=s(t);n.href=x;n.download=u;if(j(n)){v.readyState=v.DONE;A();return}}if(h.chrome&&B&&B!==c){C=t.slice||t.webkitSlice;t=C.call(t,0,t.size,c);E=true}if(o&&u!=="download"){u+=".download"}if(B===c||o){w=h}else{w=h.open()}if(!p){D();return}k+=t.size;p(h.TEMPORARY,k,z(function(F){F.root.getDirectory("saved",y,z(function(G){var H=function(){G.getFile(u,y,z(function(I){I.createWriter(z(function(J){J.onwriteend=function(K){w.location.href=I.toURL();b.push(I);v.readyState=v.DONE;q(v,"writeend",K)};J.onerror=function(){var K=J.error;if(K.code!==K.ABORT_ERR){D()}};"writestart progress write abort".split(" ").forEach(function(K){J["on"+K]=v["on"+K]});J.write(t);v.abort=function(){J.abort();v.readyState=v.DONE};v.readyState=v.WRITING}),D)}),D)};G.getFile(u,{create:false},z(function(I){I.remove();H()}),z(function(I){if(I.code===I.NOT_FOUND_ERR){H()}else{D()}}))}),D)}),D)},d=f.prototype,a=function(s,t){return new f(s,t)};d.abort=function(){var s=this;s.readyState=s.DONE;q(s,"abort")};d.readyState=d.INIT=0;d.WRITING=1;d.DONE=2;d.error=d.onwritestart=d.onprogress=d.onwrite=d.onabort=d.onerror=d.onwriteend=null;if(h.addEventListener){h.addEventListener("unload",i,false)}return a}(self));(function(a){var b="pdfDataExport IE Below 9 Shim plugin";a.output=function(e,d){return this.internal.output(e,d);var c="Output.pdf";switch(e){case"datauristring":case"dataurlstring":case"datauri":case"dataurl":case"dataurlnewwindow":if(console){console.log(b+": Data URIs are not supported on IE6-9.")}break;case"save":c=d;break}}})(pdfDataExport.API); + +(function($){$.jqx.jqxWidget("jqxBarGauge","",{});$.extend($.jqx._jqxBarGauge.prototype,{defineInstance:function(){var settings={animationDuration:300,backgroundColor:"#e0e0e0",barSpacing:4,baseValue:null,colorScheme:"scheme01",customColorScheme:null,endAngle:-45,disabled:false,formatFunction:null,geometry:{startAngle:225,endAngle:-45},height:400,labels:null,min:0,max:100,rendered:null,relativeInnerRadius:0.3,startAngle:225,title:null,tooltip:null,values:[],width:400,useGradient:true,_intervalArray:[],_drawnValues:[],_drawnSlices:[],_titleTemplate:{text:"",font:{color:"#232323",family:"'Segoe UI', 'Helvetica Neue', 'Trebuchet MS', Verdana",opacity:1,size:28,weight:100},horizontalAlignment:"center",verticalAlignment:"top",placeholderSize:null,margin:{bottom:0,left:0,right:0,top:0},subtitle:{text:"",font:{color:"#232323",family:"'Segoe UI', 'Helvetica Neue', 'Trebuchet MS', Verdana",opacity:1,size:16,weight:100}}},_labelTemplate:{connectorColor:null,connectorWidth:1,formatFunction:function(value){return value},font:{color:null,family:"'Segoe UI', 'Helvetica Neue', 'Trebuchet MS', Verdana",size:16,weight:400},indent:20,precision:2,visible:true},_tooltipTemplate:{classname:"",formatFunction:function(value){return value},visible:false,precision:0},_colorSchemes:[{name:"scheme01",colors:["#307DD7","#AA4643","#89A54E","#71588F","#4198AF"]},{name:"scheme02",colors:["#7FD13B","#EA157A","#FEB80A","#00ADDC","#738AC8"]},{name:"scheme03",colors:["#E8601A","#FF9639","#F5BD6A","#599994","#115D6E"]},{name:"scheme04",colors:["#D02841","#FF7C41","#FFC051","#5B5F4D","#364651"]},{name:"scheme05",colors:["#25A0DA","#309B46","#8EBC00","#FF7515","#FFAE00"]},{name:"scheme06",colors:["#0A3A4A","#196674","#33A6B2","#9AC836","#D0E64B"]},{name:"scheme07",colors:["#CC6B32","#FFAB48","#FFE7AD","#A7C9AE","#888A63"]},{name:"scheme08",colors:["#3F3943","#01A2A6","#29D9C2","#BDF271","#FFFFA6"]},{name:"scheme09",colors:["#1B2B32","#37646F","#A3ABAF","#E1E7E8","#B22E2F"]},{name:"scheme10",colors:["#5A4B53","#9C3C58","#DE2B5B","#D86A41","#D2A825"]},{name:"scheme11",colors:["#993144","#FFA257","#CCA56A","#ADA072","#949681"]},{name:"scheme12",colors:["#105B63","#EEEAC5","#FFD34E","#DB9E36","#BD4932"]},{name:"scheme13",colors:["#BBEBBC","#F0EE94","#F5C465","#FA7642","#FF1E54"]},{name:"scheme14",colors:["#60573E","#F2EEAC","#BFA575","#A63841","#BFB8A3"]},{name:"scheme15",colors:["#444546","#FFBB6E","#F28D00","#D94F00","#7F203B"]},{name:"scheme16",colors:["#583C39","#674E49","#948658","#F0E99A","#564E49"]},{name:"scheme17",colors:["#142D58","#447F6E","#E1B65B","#C8782A","#9E3E17"]},{name:"scheme18",colors:["#4D2B1F","#635D61","#7992A2","#97BFD5","#BFDCF5"]},{name:"scheme19",colors:["#844341","#D5CC92","#BBA146","#897B26","#55591C"]},{name:"scheme20",colors:["#56626B","#6C9380","#C0CA55","#F07C6C","#AD5472"]},{name:"scheme21",colors:["#96003A","#FF7347","#FFBC7B","#FF4154","#642223"]},{name:"scheme22",colors:["#5D7359","#E0D697","#D6AA5C","#8C5430","#661C0E"]},{name:"scheme23",colors:["#16193B","#35478C","#4E7AC7","#7FB2F0","#ADD5F7"]},{name:"scheme24",colors:["#7B1A25","#BF5322","#9DA860","#CEA457","#B67818"]},{name:"scheme25",colors:["#0081DA","#3AAFFF","#99C900","#FFEB3D","#309B46"]},{name:"scheme26",colors:["#0069A5","#0098EE","#7BD2F6","#FFB800","#FF6800"]},{name:"scheme27",colors:["#FF6800","#A0A700","#FF8D00","#678900","#0069A5"]}],_colors:["#307DD7","#AA4643","#89A54E","#71588F","#4198AF"],_colorNames:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},_dimensions:{},_ie:$.jqx.browser.msie,_oldIEbrowser:($.jqx.browser.msie&&$.jqx.browser.version<=8),_ie8:($.jqx.browser.msie&&$.jqx.browser.version==8),_ie7:($.jqx.browser.msie&&$.jqx.browser.version<8),_centerX:null,_centerY:null,_coordinatePlane:null,_geometry:{startAngle:-45,baseAngle:-45,fix:0,endAngle:225},_userValues:[],_valuesToDegrees:[],_oldValues:[],_oldValuesToDegrees:[],_temporaryValuesToDegrees:[],_temporaryValues:[],_temporaryOldAngle:[],_valuesLength:0,_oldValuesLength:0,_alignmentIE:null,_title:{},_backgroundColor:"#e0e0e0",_label:{},_tooltip:{},_renderedValues:0,_barWidth:35,_barStartAt:30,_barGaugeSlices:[],_barGaugeBackgroundSlices:[],_barGaugeSlicesStrokeWidth:0,_barGaugeLabelLines:[],_barGaugeLabelText:[],_barGaugeTitle:null,_barGaugeSubTitle:null,_barGaugeTooltip:$("
"),_measuredText:$("
"),_measuredTextId:"",renderer:null,_barGaugeRadius:null,_barGaugeFigureRadius:null,_labelPositioningRadius:null,_placeholderSize:50,_rendering:false,_titleLines:0,_subTitleLines:0,_initialized:false,_events:["initialized","valueChanged","tooltipOpen","tooltipClose","drawStart","drawEnd"]};if(this===$.jqx._jqxBarGauge.prototype){return settings}$.extend(true,this,settings);return settings},createInstance:function(){var that=this;that._createBarGauge()},_createBarGauge:function(){var that=this;that._getLiquidDimensions();that._addIEPolyfills();that._barGaugeTooltip.css({display:"none"});$(that.host).empty();that._attachCustomColors();that.geometry.startAngle=that.startAngle;that.geometry.endAngle=that.endAngle;that._validateGeometry();that._validateTitle();that._validateLabel();that._validateValues();that._validateTooltip();that._validateAnimationDuration();that._transformValuesToAngles();that._getColorScheme();if((that.animationDuration===0)||(that._ie8)||(that._ie7)){that._drawStaticBarGauge()}else{that._drawDynamicBarGauge()}that._raiseEvent("4");that._createTooltip();that._addCSS();if(that._ie){that._removeBarGaugeTitle();that._removeBarGaugeSubTitle();that._drawBarGaugeTitle()}that._addEventHandlers()},_initRenderer:function(host){if(!$.jqx.createRenderer){throw"jqxBarGauge: Please include a reference to jqxdraw.js"}return $.jqx.createRenderer(this,host)},_validateValues:function(){var that=this;var valuesLength,maxBarSpacing;if(that._userValues.length===0){that._userValues=that.values.slice()}if(that._oldValues.length===0){that._oldValues=that.values.slice()}that._valuesLength=that.values.length;for(var i=0;ithat.max){that.values[i]=that.max}}that._drawnValues[i]=false;that._drawnSlices[i]=false}if((that.baseValue<=that.startValue)||(that.baseValue===null)){that.baseValue=that.min}else{if(that.baseValue>that.max){that.baseValue=that.max}}if(that.relativeInnerRadius>=1){that.relativeInnerRadius=0.99}else{if(that.relativeInnerRadius<0){that.relativeInnerRadius=0}}that._calculateBarGaugeRadius();valuesLength=that._valuesLength||1;maxBarSpacing=that._barGaugeRadius*(1-that.relativeInnerRadius)/valuesLength-0.01;if(that.barSpacing>maxBarSpacing){that.barSpacing=maxBarSpacing}that._backgroundColor=that._validateColor(that.backgroundColor,that._backgroundColor)},_attachCustomColors:function(){var that=this;var colorSchemesLength=that._colorSchemes.length;var colorSchemeInSchemes=false;if((that.customColorScheme!==null)&&(that.customColorScheme.colors!==null)&&(that.customColorScheme.name!==null)){for(var i=0;ilongestValueLength){longestValue=that.values[i];longestValueLength=longestValue.toString().length}}longestValue=that._calculatePrecision(that._label.precision,longestValue);if((that._label.formatFunction!==undefined)&&(that._label.formatFunction!==null)&&(typeof that._label.formatFunction==="function")){longestValue=that._label.formatFunction(longestValue)}longestValue=longestValue.toUpperCase();return longestValue},_validateGeometry:function(){var that=this;var startAngle=parseFloat(that.geometry.startAngle);var endAngle=parseFloat(that.geometry.endAngle);if(Math.abs(startAngle)>=360){startAngle=startAngle%360}if(startAngle<0){startAngle=360+startAngle}if(Math.abs(endAngle)>=360){endAngle=endAngle%360}if(endAngle<0){endAngle=360+endAngle}that.geometry.startAngle=startAngle;that.geometry.endAngle=endAngle},_validateColor:function(color,defaultColor){var that=this;var validatedColor;if((color===undefined)||(color===null)){validatedColor=defaultColor}else{if(/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(color)){validatedColor=color}else{if(/(^[0-9A-F]{6}$)|(^[0-9A-F]{3}$)/i.test(color)){validatedColor="#"+color}else{if(typeof that._colorNames[color.toLowerCase()]!=="undefined"){validatedColor=that._colorNames[color.toLowerCase()]}else{validatedColor="transparent"}}}}return validatedColor},_validateTooltip:function(){var that=this;if((that.tooltip===undefined)||(that.tooltip===null)||(typeof that.tooltip!=="object")){that._tooltip=that._tooltipTemplate}else{that._tooltip.visible=(that.tooltip.visible===false)?false:(that.tooltip.visible||that._tooltipTemplate.visible);that._tooltip.classname=that.tooltip.classname||that._tooltipTemplate.classname;if(typeof that.tooltip.formatFunction==="function"){that._tooltip.formatFunction=that.tooltip.formatFunction}else{that._tooltip.formatFunction=that._tooltipTemplate.formatFunction}if(that.tooltip.precision===null||that.tooltip.precision===undefined){that._tooltip.precision=that._tooltipTemplate.precision}else{if(parseInt(that.tooltip.precision,10)<=0){that._tooltip.precision=0}else{that._tooltip.precision=parseInt(that.tooltip.precision,10)}}}},_validateTitle:function(){var that=this;that._title=that._titleTemplate;that._measuredTextId=that.element.id+"measuredText";if(typeof that.title==="string"){that._title.text=that.title}else{if(typeof that.title==="number"){that._title.text=String(that.title)}else{if((typeof that.title==="object")&&(that.title!==undefined)&&(that.title!==null)){that._title.text=that.title.text||that._titleTemplate.text;that._title.horizontalAlignment=that.title.horizontalAlignment||that._titleTemplate.horizontalAlignment;that._title.verticalAlignment=that.title.verticalAlignment||that._titleTemplate.verticalAlignment}}}if((that.title===undefined)||(that.title===null)||(that.title.font===undefined)||(that.title.font===null)){that._title.font=that._titleTemplate.font}else{that._title.font.family=that.title.font.family||that._titleTemplate.font.family;that._title.font.opacity=that.title.font.opacity||that._titleTemplate.font.opacity;that._title.font.size=that.title.font.size||that._titleTemplate.font.size;that._title.font.weight=that.title.font.weight||that._titleTemplate.font.weight;if((that._ie7||that._ie8)&&(that._title.font.weight>100)){that._title.font.weight="bold"}that._title.font.color=that._validateColor(that.title.font.color,that._titleTemplate.font.color)}if((that.title===undefined)||(that.title===null)||(that.title.margin===undefined)||(that.title.margin===null)){that._title.margin=that._titleTemplate.margin}else{if(typeof that.title.margin!=="object"){var margin=parseInt(that.title.margin,10);that._title.margin.top=margin;that._title.margin.right=margin;that._title.margin.bottom=margin;that._title.margin.left=margin}else{that._title.margin.top=that.title.margin.top===0?0:(that.title.margin.top||that._titleTemplate.margin.top);that._title.margin.right=that.title.margin.right===0?0:(that.title.margin.right||that._titleTemplate.margin.right);that._title.margin.bottom=that.title.margin.bottom===0?0:(that.title.margin.bottom||that._titleTemplate.margin.bottom);that._title.margin.left=that.title.margin.left===0?0:(that.title.margin.left||that._titleTemplate.margin.left)}}if((that.title===undefined)||(that.title===null)||(that.title.subtitle===undefined)||(that.title.subtitle===null)){that._title.subtitle.text=that._titleTemplate.subtitle.text;that._title.subtitle.font=that._titleTemplate.subtitle.font}else{if(typeof that.title.subtitle!=="object"){that._title.subtitle.text=String(that.title.subtitle);that._title.subtitle.font=that._titleTemplate.subtitle.font}else{if((typeof that.title.subtitle.font==="undefined")||(that.title.subtitle.font===null)){that._title.subtitle.text=String(that.title.subtitle.text);that._title.subtitle.font=that._titleTemplate.subtitle.font}else{that._title.subtitle.text=String(that.title.subtitle.text);that._title.subtitle.font.color=that.title.subtitle.font.color||that._titleTemplate.subtitle.font.color;that._title.subtitle.font.family=that.title.subtitle.font.family||that._titleTemplate.subtitle.font.family;that._title.subtitle.font.opacity=that.title.subtitle.font.opacity||that._titleTemplate.subtitle.font.opacity;that._title.subtitle.font.size=that.title.subtitle.font.size||that._titleTemplate.subtitle.font.size;that._title.subtitle.font.weight=that.title.subtitle.font.weight||that._titleTemplate.subtitle.font.weight;if((that._ie7||that._ie8)&&(that._title.subtitle.font.weight>100)){that._title.subtitle.font.weight="bold"}}}}var calculatedPlaceholderSize;if(that._title.text===""){calculatedPlaceholderSize=0}else{if((that._title.subtitle.text==="")||(that._title.subtitle.text===undefined)||(that._title.subtitle.text===null)){that._titleLines=that._title.text.match(/
/g)!==null?(that._title.text.match(/
/g).length+1):1;calculatedPlaceholderSize=that._title.font.size*that._titleLines+that._title.margin.top+that._title.margin.bottom}else{that._titleLines=that._title.text.match(/
/g)!==null?(that._title.text.match(/
/g).length+1):1;that._subTitleLines=that._title.subtitle.text.match(/
/g)!==null?(that._title.text.match(/
/g).length+1):1;calculatedPlaceholderSize=that._title.font.size*that._titleLines+that._title.subtitle.font.size*that._subTitleLines+that._title.margin.top+that._title.margin.bottom}}if((that.title===undefined)||(that.title===null)||(that.title.placeholderSize===null)||(that.title.placeholderSize===undefined)){that._title.placeholderSize=calculatedPlaceholderSize||that.height*0.05}else{that._title.placeholderSize=that.title.placeholderSize}},_validateLabel:function(){var that=this;if((that.labels===null)||(that.labels===undefined)||(typeof that.labels!=="object")){that._label=that._labelTemplate}else{that._label.connectorColor=that._validateColor(that.labels.connectorColor,that._labelTemplate.connectorColor);that._label.connectorWidth=that.labels.connectorWidth||that._labelTemplate.connectorWidth;that._label.formatFunction=that.labels.formatFunction||that._labelTemplate.formatFunction;if((that.labels.precision===undefined)||(that.labels.precision===null)||(typeof that.labels.precision!=="number")){that._label.precision=that._labelTemplate.precision}else{that._label.precision=that.labels.precision}if(that._label.precision>15){that._label.precision=15}else{if(that._label.precision<0){that._label.precision=0}}if((that.labels.visible===undefined)||(that.labels.visible===null)){that._label.visible=that._labelTemplate.visible}else{if(that.labels.visible===false){that._label.visible=false}else{that._label.visible=true}}if(((typeof that.labels.indent!=="number")&&(typeof that.labels.indent!=="string"))||(that.labels.indent<=0)){that._label.indent=0}else{if(((typeof that.labels.indent!=="number")&&(typeof that.labels.indent!=="string"))||(that.labels.indent<=0)){that._label.indent=0}else{that._label.indent=that.labels.indent}}if((that.labels.font===null)||(that.labels.font===undefined)||(typeof that.labels.font!=="object")){that._label.font=that._labelTemplate.font}else{that._label.font={};that._label.font.color=that._validateColor(that.labels.font.color,that._labelTemplate.font.color);that._label.font.family=that.labels.font.family||that._labelTemplate.font.family;that._label.font.size=that.labels.font.size||that._labelTemplate.font.size;that._label.font.weight=that.labels.font.weight||that._labelTemplate.font.weight;if((that._ie7||that._ie8)&&(that._label.font.weight>100)){that._label.font.weight="bold"}}}},_validateAnimationDuration:function(){var that=this;var animationDurationToInt=parseInt(that.animationDuration,10);var animationDuration=animationDurationToInt>0?animationDurationToInt:0;if(that._oldIEbrowser){that.animationDuration=0}else{that.animationDuration=animationDuration}},_transformValuesToAngles:function(){var that=this;var barGaugeAngle,longestValue,textSize,barGaugeFigureRadius;that._placeholderSize=that._title.placeholderSize||that._placeholderSize;if(that.geometry.endAngle360){that._geometry.startAngle=that._geometry.startAngle+(barGaugeAngle-360)}if((that.baseValue!==undefined)&&(that.baseValue!==null)&&(that.baseValue>=that.min)&&(that.baseValue<=that.max)){that._geometry.baseAngle=((that.baseValue-that.min)*(that._geometry.endAngle-that._geometry.startAngle)/(that.max-that.min))+that._geometry.startAngle;that._geometry.fix=that.geometry.startAngle+that.geometry.endAngle-180}longestValue=that._getLongestValue();textSize=that._measureText(longestValue,that._label.font.size,that._label.font.family,that._label.font.weight);barGaugeFigureRadius=that._barGaugeRadius-that._label.indent*1.2-textSize.height*1.2;if((barGaugeFigureRadius+textSize.width+that._label.indent*1.2)>that.width/2){barGaugeFigureRadius=that._barGaugeRadius-that._label.indent*1.2-textSize.width}if(that._label.visible===false){barGaugeFigureRadius=that._barGaugeRadius}barGaugeFigureRadius=barGaugeFigureRadius*0.98;if(barGaugeFigureRadius<0){barGaugeFigureRadius=0}that._barGaugeFigureRadius=barGaugeFigureRadius;that._barWidth=barGaugeFigureRadius*(1-that.relativeInnerRadius)/that._valuesLength-that.barSpacing;that._barStartAt=barGaugeFigureRadius*that.relativeInnerRadius;that._labelPositioningRadius=that._barStartAt+that._valuesLength*(that._barWidth+that.barSpacing)-that.barSpacing+that._label.indent;for(var i=0;ithat.width/2){barGaugeFigureRadius=that._barGaugeRadius-that._label.indent*1.2-textSize.width}if(that._label.visible===false){barGaugeFigureRadius=that._barGaugeRadius}barGaugeFigureRadius=barGaugeFigureRadius*0.98;if(barGaugeFigureRadius<0){barGaugeFigureRadius=0}that._barWidth=barGaugeFigureRadius*(1-that.relativeInnerRadius)/that._valuesLength-that.barSpacing;that._barStartAt=barGaugeFigureRadius*that.relativeInnerRadius;that._labelPositioningRadius=that._barStartAt+that._valuesLength*(that._barWidth+that.barSpacing)-that.barSpacing+that._label.indent},_drawEmptyBarGauge:function(){var that=this;var emptyBarGaugeRadius,backgroundSliceId;var gaugeLayerStart=that._barStartAt;var gaugeLayerEnd=gaugeLayerStart+that._barWidth;if(that._title.text===""){emptyBarGaugeRadius=that._barGaugeRadius}else{emptyBarGaugeRadius=that._barGaugeFigureRadius}gaugeLayerStart=that.relativeInnerRadius*emptyBarGaugeRadius;gaugeLayerEnd=emptyBarGaugeRadius;that._barGaugeBackgroundSlices[0]=that.renderer.pieslice(that._centerX,that._centerY,gaugeLayerStart,gaugeLayerEnd,that._geometry.startAngle,that._geometry.endAngle,0,{fill:that._backgroundColor,stroke:that._backgroundColor,"stroke-width":that._barGaugeSlicesStrokeWidth});backgroundSliceId=that.element.id+"BackgroundSlice0";that.renderer.attr(that._barGaugeBackgroundSlices[0],{id:backgroundSliceId});that.renderer.attr(that._barGaugeBackgroundSlices[0],{"class":"jqx-bar-gauge-background-slice"});that._rendered();that._oldValuesLength=0;that._oldValues.length=0},_drawBarGaugeLayout:function(){var that=this;var backgroundSliceId;var gaugeLayerStart=that._barStartAt;var gaugeLayerEnd=gaugeLayerStart+that._barWidth;that._barGaugeSlicesStrokeWidth=0;that._centerX=that.width/2;if(that._title.text===""){that._centerY=that.height/2}else{if(that._title.verticalAlignment==="top"){that._centerY=(that.height+that._title.placeholderSize)/2}else{that._centerY=(that.height-that._title.placeholderSize)/2}}if(that._valuesLength>0){for(var i=0;ithat._geometry.baseAngle){that._barGaugeSlices[i]=that.renderer.pieslice(that._centerX,that._centerY,gaugeLayerStart,gaugeLayerEnd,(180-that._geometry.baseAngle+that._geometry.fix),change,0,{fill:drawColor,stroke:drawColor,"stroke-width":that._barGaugeSlicesStrokeWidth})}else{that._barGaugeSlices[i]=that.renderer.pieslice(that._centerX,that._centerY,gaugeLayerStart,gaugeLayerEnd,change,(180-that._geometry.baseAngle+that._geometry.fix),0,{fill:drawColor,stroke:drawColor,"stroke-width":that._barGaugeSlicesStrokeWidth})}sliceId=that.element.id+"Slice"+i;that.renderer.attr(that._barGaugeSlices[i],{id:sliceId});that.renderer.attr(that._barGaugeSlices[i],{"class":"jqx-bar-gauge-slice"});that._drawnSlices[i]=true;if(that._label.visible===true){that._drawLabelsLine(gaugeLayerStart,change,i);that._drawLabelsText(change,i)}that._rendered()}else{if(that.useGradient){var stops=[[0,1.4],[100,1]];drawColor=that.renderer._toLinearGradient(drawColor,true,stops)}that._barGaugeSlices[i]=that.renderer.pieslice(that._centerX,that._centerY,gaugeLayerStart,gaugeLayerEnd,change+0.01,change,0,{fill:drawColor,stroke:drawColor,"stroke-width":that._barGaugeSlicesStrokeWidth});sliceId=that.element.id+"Slice"+i;that.renderer.attr(that._barGaugeSlices[i],{id:sliceId});that.renderer.attr(that._barGaugeSlices[i],{"class":"jqx-bar-gauge-slice"});that._drawnSlices[i]=true}that.renderer.attr(that._barGaugeSlices[i],{id:that.element.id+"Slice"+i});that.renderer.attr(that._barGaugeSlices[i],{"class":"jqx-bar-gauge-slice"});gaugeLayerStart=gaugeLayerEnd+that.barSpacing;gaugeLayerEnd=gaugeLayerStart+that._barWidth}that._oldValues=baseValues;that._temporaryValues=baseValues.slice(0);that._oldValuesToDegrees.length=0;for(var i=0;i=that.baseValue){if(that.values[i]>that._oldValues[i]){condition="(oldAngle < newAngle)";that._renderElement(gaugeLayerStart,gaugeLayerEnd,1,condition,i,true);rendering=true}else{if(that.values[i] newAngle)";that._renderElement(gaugeLayerStart,gaugeLayerEnd,-1,condition,i,false);rendering=true}}}else{if(that.values[i]>that._oldValues[i]){condition="(oldAngle < newAngle)";that._renderElement(gaugeLayerStart,gaugeLayerEnd,1,condition,i,true);rendering=true}else{if(that.values[i] newAngle)";that._renderElement(gaugeLayerStart,gaugeLayerEnd,-1,condition,i,false);rendering=true}}}gaugeLayerStart=gaugeLayerEnd+that.barSpacing;gaugeLayerEnd=gaugeLayerStart+that._barWidth}}if(!rendering){that._rendered()}},clearIntervals:function(){var that=this;var intervalsArrayLength=that._intervalArray.length;for(var i=0;inewAngle){newCondition=true}var updateLabels=function(){that._removeLabels(valueIndex);var degrees=[];for(var m=0;m=270){koefY=-(270-angle)/180}else{if(angle<=90){koefY=(90+angle)/180}else{koefY=(270-angle)/180}}if(angle<=180){koefX=angle/180}else{koefX=(360-angle)/180}offset.y=koefY*fontSize;offset.x=koefX*textWidth;return offset},_drawCoordinatePlane:function(){var that=this;var startY,endY;if(that._title.verticalAlignment==="top"){startY=that._title.placeholderSize;endY=that.height}else{startY=0;endY=that.height-that._title.placeholderSize}if(that._coordinatePlane!==null){$("#"+that.element.id+" .jqx-bar-gauge-coordinate-plane").remove()}that._coordinatePlane={};that._coordinatePlane.x=that.renderer.line(0,that._centerY,that.width,that._centerY,{fill:"gray",stroke:"gray","stroke-width":1,"stroke-opacity":0.1});that._coordinatePlane.y=that.renderer.line(that._centerX,startY,that._centerX,endY,{fill:"gray",stroke:"gray","stroke-width":1,"stroke-opacity":0.1});that.renderer.attr(that._coordinatePlane.x,{"class":"jqx-bar-gauge-coordinate-plane"});that.renderer.attr(that._coordinatePlane.y,{"class":"jqx-bar-gauge-coordinate-plane"})},_getColorScheme:function(){var that=this;var newColorSchemeIndex,i;var colorSchemesLength=that._colorSchemes.length;var totalColors=that.values.length||1;var colorSchemesCombinations=Math.floor(totalColors/that._colorSchemes[0].colors.length);var colorSchemeIndex=0;for(i=0;i0){for(i=0;i360){angle=angle%360}}angleInRad=(360-angle)*Math.PI/180;radiusXY2=radiusXY1+that._barWidth+(that._valuesLength-valueIndex-1)*(that._barWidth+that.barSpacing)+that._label.indent;x1=that._centerX+radiusXY1*Math.cos(angleInRad);y1=that._centerY+radiusXY1*Math.sin(angleInRad);x2=that._centerX+radiusXY2*Math.cos(angleInRad);y2=that._centerY+radiusXY2*Math.sin(angleInRad);color=that._label.connectorColor||that._colors[valueIndex];if(that.formatFunction){color=that.formatFunction(that.values[valueIndex],valueIndex,color)}if(that._ie7||that._ie8){x1=parseInt(x1,10);y1=parseInt(y1,10);x2=parseInt(x2,10);y2=parseInt(y2,10)}if(that._label.visible===true&&that.disabled===false){that._barGaugeLabelLines[valueIndex]=that.renderer.line(x1,y1,x2,y2,{fill:color,stroke:color,"stroke-width":that._label.connectorWidth})}labelLineId=that.element.id+"LabelLine"+valueIndex;that.renderer.attr(that._barGaugeLabelLines[valueIndex],{id:labelLineId});that.renderer.attr(that._barGaugeLabelLines[valueIndex],{"class":"jqx-bar-gauge-label-line"})},_drawLabelsText:function(angle,valueIndex,text){var that=this;var textSize,angleInRadians,xText,yText,offset,labelId;var color=that._label.font.color||that._colors[valueIndex];if(that.formatFunction){color=that.formatFunction(that.values[valueIndex],valueIndex,color)}var value=that._calculatePrecision(that._label.precision,that.values[valueIndex]);if(text!==undefined){value=new Number(text).toFixed(that._label.precision);value=that._calculatePrecision(that._label.precision,value)}if((that._label.formatFunction!==undefined)&&(that._label.formatFunction!==null)&&(typeof that._label.formatFunction==="function")){value=that._label.formatFunction(value,valueIndex)}if(!that._cachedMeasurements){that._cachedMeasurements=[]}if(!that._cachedMeasurements[value.length]){textSize=that._measureText(value,that._label.font.size,that._label.font.family,that._label.font.weight);that._cachedMeasurements[value.length]=textSize}else{textSize=that._cachedMeasurements[value.length]}if(angle<0){angle=360+angle}else{if(angle>360){angle=angle%360}}angleInRadians=(360-angle)*Math.PI/180;xText=that._centerX+(that._labelPositioningRadius+textSize.height*0.3)*Math.cos(angleInRadians);yText=that._centerY+(that._labelPositioningRadius+textSize.height*0.3)*Math.sin(angleInRadians);offset=that._calculateLabelOffset(angle,textSize.height,textSize.width);if(that._label.visible===true&&that.disabled===false){that._barGaugeLabelText[valueIndex]=that.renderer.text(value,xText-offset.x,(yText-offset.y),undefined,undefined,0,{"class":"jqx-bargauge-label",fill:color,"font-size":that._label.font.size+"px","font-family":that._label.font.family,"font-weight":that._label.font.weight},false,"left","top","lefttop")}labelId=that.element.id+"Label"+valueIndex;that.renderer.attr(that._barGaugeLabelText[valueIndex],{id:labelId});that.renderer.attr(that._barGaugeLabelText[valueIndex],{"class":"jqx-bar-gauge-label-text"});if((that._ie7)||(that._ie8)){$("#"+labelId+" .jqx-bargauge-label").css({color:color,"white-space":"nowrap","font-size":that._label.font.size+"px","font-family":that._label.font.family,"font-weight":that._label.font.weight})}},_calculatePrecision:function(precisionBase,value){var precision;precision=precisionBase+Math.abs(value).toString().split(".")[0].length;precision=(precision>15)?15:precision;value=parseFloat(value).toPrecision(precision);return value},_createTooltip:function(){var that=this;var tooltipId=that.element.id+"tooltip";that._barGaugeTooltip.attr("id",tooltipId);$(that._barGaugeTooltip).addClass(that.toThemeProperty("jqx-bar-gauge-tooltip"));if(that._tooltip.classname.length>0){$(that._barGaugeTooltip).addClass(that.toThemeProperty(that._tooltip.classname))}$(document.body).append(that._barGaugeTooltip);if((that._tooltip.visible===true)&&(that.disabled===false)&&(that._valuesLength>0)){that._addTooltipHandlers()}},_refreshTooltipHandlers:function(){var that=this;if(that._tooltip.visible===true&&that.disabled===false){that._removeTooltipHandlers();that._addTooltipHandlers()}},_addTooltipHandlers:function(){var that=this;var id,tooltipText;that.addHandler($("#"+that.element.id+" .jqx-bar-gauge-slice"),"mouseenter",function(){if((that._tooltip.visible===true)&&(that._valuesLength>0)){id=that.renderer.getAttr(this,"id").substr(that.element.id.length+5);tooltipText=that._calculatePrecision(that._tooltip.precision,that.values[id]);that._barGaugeTooltip.css({display:"block",color:that._colors[id],"border-color":that._colors[id]});if((that._tooltip.formatFunction!==undefined)&&(that._tooltip.formatFunction!==null)&&(typeof that._tooltip.formatFunction==="function")){tooltipText=that._tooltip.formatFunction(tooltipText,parseInt(id))}that._barGaugeTooltip.html(tooltipText);that._raiseEvent("2",{layer:id})}});that.addHandler($("#"+that.element.id+" .jqx-bar-gauge-slice"),"mouseleave",function(){that._barGaugeTooltip.css({display:"none"});that._raiseEvent("3",{layer:id})});that.addHandler($("#"+that.element.id+" .jqx-bar-gauge-slice"),"mouseup",function(){that._barGaugeTooltip.css({display:"none"})});if($("#"+that.element.id+" .jqx-bar-gauge-slice").length>0){that.addHandler($("#"+that.element.id+" .jqx-bar-gauge-slice"),"mousemove",function(){if((that._tooltip.visible===true)&&(that._valuesLength>0)){id=that.renderer.getAttr(this,"id").substr(that.element.id.length+5);tooltipText=that._calculatePrecision(that._tooltip.precision,that.values[id]);that._barGaugeTooltip.css({display:"block",color:that._colors[id],"border-color":that._colors[id]});if((that._tooltip.formatFunction!==undefined)&&(that._tooltip.formatFunction!==null)&&(typeof that._tooltip.formatFunction==="function")){tooltipText=that._tooltip.formatFunction(tooltipText,parseInt(id))}that._barGaugeTooltip.html(tooltipText)}})}that.addHandler($(that.host),"mousemove",function(event){that._barGaugeTooltip.css({top:(event.pageY-10)+"px",left:(event.pageX+15)+"px"})})},_removeTooltipHandlers:function(){var that=this;if(that._barGaugeSlices.length>0){that.removeHandler($(that._barGaugeSlices),"mouseenter");that.removeHandler($(that._barGaugeSlices),"mouseleave");that.removeHandler($(that._barGaugeSlices),"mouseup");that.removeHandler($(that._barGaugeSlices),"mousemove");that.removeHandler($("#"+that.element.id+" .jqx-bar-gauge-slice"),"mouseenter mouseleave mouseup mousemove")}that.removeHandler($(that.host),"mousemove")},_drawBarGaugeTitle:function(){var that=this;that._alignmentIE=that._alignmentIE||that._title.horizontalAlignment;var drawn=0;var coefY=0;var titleParts,subTitleParts,titleTextSize,subTitleTextSize,subTitleText,titleText,subTitleId,titleId,i;if(that._ie7||that._ie8){that._title.horizontalAlignment="left"}if(that._titleLines>1){titleParts=that._title.text.split("
");for(i=0;ithat.width){titleText=titleText.slice(0,-1);titleParts[i]=titleText+"...";titleTextSize=that._measureText(titleParts[i]+"_",that._title.font.size,that._title.font.family,that._title.font.weight)}}that._title.text=titleParts.join("
")}else{titleTextSize=that._measureText(that._title.text+"_",that._title.font.size,that._title.font.family,that._title.font.weight);titleText=that._title.text;while(titleTextSize.width>that.width){titleText=titleText.slice(0,-1);that._title.text=titleText+"...";titleTextSize=that._measureText(that._title.text+"_",that._title.font.size,that._title.font.family,that._title.font.weight)}}if(that._title.verticalAlignment==="bottom"){coefY=that.height-that._title.placeholderSize}if((that.title!==null)&&(that.title!==undefined)&&(that._title.text!=="")){that._barGaugeTitle=that.renderer.text(that._title.text,that._title.margin.left,(coefY+that._title.margin.top),(that.width-that._title.margin.right),0,undefined,{fill:that._title.font.color,"fill-opacity":that._title.font.opacity,"font-size":that._title.font.size,"font-family":that._title.font.family,"font-weight":that._title.font.weight},false,that._title.horizontalAlignment,that._title.verticalAlignment,"centertop");titleId=that.element.id+"Title";that.renderer.attr(that._barGaugeTitle,{id:titleId});that.renderer.attr(that._barGaugeTitle,{"class":"jqx-bar-gauge-title"});if((that._ie7)||(that._ie8)){$("#"+titleId+" textbox").css({width:that.width+"px !important","padding-left":"10px",position:"relative"});var titleLeftMargin=0;if(titleTextSize.width1){subTitleParts=that._title.subtitle.text.split("
");for(i=0;ithat.width){subTitleText=subTitleText.slice(0,-1);subTitleParts[i]=subTitleText+"...";subTitleTextSize=that._measureText(subTitleParts[i]+"_",that._title.subtitle.font.size,that._title.subtitle.font.family,that._title.subtitle.font.weight)}}that._title.subtitle.text=subTitleParts.join("
")}else{subTitleTextSize=that._measureText(that._title.subtitle.text+"_",that._title.subtitle.font.size,that._title.subtitle.font.family,that._title.subtitle.font.weight);subTitleText=that._title.subtitle.text;while(subTitleTextSize.width>that.width){subTitleText=subTitleText.slice(0,-1);that._title.subtitle.text=subTitleText+"...";subTitleTextSize=that._measureText(that._title.subtitle.text+"_",that._title.subtitle.font.size,that._title.subtitle.font.family,that._title.subtitle.font.weight)}}that._barGaugeSubTitle=that.renderer.text(that._title.subtitle.text,that._title.margin.left,(coefY+that._title.font.size*that._titleLines+that._title.margin.top),that.width-that._title.margin.right,0,undefined,{fill:that._title.subtitle.font.color,"fill-opacity":that._title.subtitle.font.opacity,"font-size":that._title.subtitle.font.size,"font-family":that._title.subtitle.font.family,"font-weight":that._title.subtitle.font.weight,"margin-top":that._title.margin.top},false,that._title.horizontalAlignment,that._title.verticalAlignment,"centertop");subTitleId=that.element.id+"SubTitle";that.renderer.attr(that._barGaugeSubTitle,{id:subTitleId});that.renderer.attr(that._barGaugeSubTitle,{"class":"jqx-bar-gauge-subtitle"});if((that._ie7)||(that._ie8)){var subTitleLeftMargin=0;if(subTitleTextSize.width(that.height-that._title.placeholderSize)){that._barGaugeRadius=(that.height-that._title.placeholderSize)/2}else{that._barGaugeRadius=that.width/2}},_addCSS:function(){var that=this;$(that.host).addClass(that.toThemeProperty("jqx-widget"));$(that.host).addClass(that.toThemeProperty("jqx-bar-gauge"));$(that.host).addClass(that.toThemeProperty("jqx-widget-content"));if(that.disabled){$(that.host).addClass(that.toThemeProperty("jqx-fill-state-disabled"))}},_rendered:function(){var that=this;if((that._rendering===true)){if((that.rendered!==null)&&(typeof that.rendered==="function")){that.rendered()}that._rendering=false;that.clearIntervals();that._temporaryOldAngle.length=0;that._temporaryValuesToDegrees.length=0;that._temporaryValues.length=0;that._raiseEvent("0");that._raiseEvent("5")}},_render:function(){var that=this;that._removeAllGraphicElements();if(that.values.length>0){if((that.animationDuration===0)||(that._ie8)||(that._ie7)){that._drawStaticBarGauge()}else{that._drawDynamicBarGauge()}}else{that._getLiquidDimensions();that.host.width(that.width);that.host.height(that.height);that._validateValues();that._transformValuesToAngles();that._drawStaticBarGauge()}},render:function(){var that=this;that.clearIntervals();that._getLiquidDimensions();that.host.width(that.width);that.host.height(that.height);that._validateValues();that._transformValuesToAngles();that._getColorScheme();if(that._rendering!==true){that._render()}else{that._staticRefresh();that._render()}},refresh:function(initialRefresh){var that=this;if(initialRefresh!==true){that.render()}},_removeAllGraphicElements:function(){var that=this;that._removeLabels();that._removeBarGaugeSlices();that._removeBarGaugeTitle();that._removeBarGaugeSubTitle()},_drawStaticBarGauge:function(){var that=this;that._rendering=true;that._drawBarGaugeTitle();that._drawBarGaugeLayout();if(!that.disabled){that._getLiquidDimensions();that.host.width(that.width);that.host.height(that.height);that._validateValues();that._measureRadius();that._drawStaticBarGaugeElementsWithBase();that._rendered()}else{that._rendered()}},_drawDynamicBarGauge:function(){var that=this;that._drawBarGaugeTitle();that._drawBarGaugeLayout();if(!that.disabled){that._drawBarGaugeElementsWithBase()}else{that._rendered()}},val:function(newValues){var that=this;if((newValues!==null)&&(newValues!==undefined)&&(typeof newValues==="object")&&(Object.keys(newValues).length>0)){that._raiseEvent("4","api");if(newValues.length!=that.values.length){that.values=newValues;that.render()}else{that._redrawWithNewValuesArray(newValues,that.values)}}else{if((newValues!==null)&&(newValues!==undefined)&&(typeof newValues==="object")&&(newValues.length===0)){that._raiseEvent("4");that._removeLabels();that._removeBarGaugeSlices();that._transformValuesToAngles();that._drawEmptyBarGauge();that._removeLabels();that.values.length=0;that._refreshTooltipHandlers()}}return that.values},_redrawWithNewValuesArray:function(newValues,oldValues){var that=this;var val,i;if(that._rendering===false){that._userValues=newValues.slice();if(!!oldValues){that._oldValues=oldValues.slice()}else{that._oldValues=that.values.slice()}that._oldValuesToDegrees=that._valuesToDegrees.slice();that._oldValuesLength=that._valuesLength;if(Object.keys(newValues).length>1){that.values=newValues.slice()}else{if((newValues[0]===null)||(newValues[0]===undefined)){that.values=[]}else{that.values=[];that.values[0]=parseFloat(newValues)}}that._lastChange=new Date()}else{if(that._rendering===true){that._userValues=newValues.slice();that._oldValues.length=0;that._oldValuesToDegrees.length=0;for(i=0;i1){that.values=newValues.slice()}else{if((newValues[0]===null)||(newValues[0]===undefined)){that.values=[]}else{that.values=[];that.values[0]=parseFloat(newValues)}}}else{if((newValues===null)||(newValues===undefined)){that.values=[]}else{if((typeof newValues==="string")||(typeof newValues==="number")){that.values=[];that.values[0]=parseFloat(newValues)}else{return that.values}}}}that._valuesLength=that.values.length;that._getColorScheme();if(that._valuesLength>that._oldValuesLength){for(var v=that._oldValuesLength;vthat.max){that.values[i]=that.max}}var res=that.values[i];if(res==0){res=0.03}val=((res-that.min)/(that.max-that.min))*(that._geometry.endAngle-that._geometry.startAngle)+that._geometry.startAngle;that._valuesToDegrees[i]=val%360}that._renderElements();that._refreshTooltipHandlers();that._raiseEvent("1")},_staticRefresh:function(){var that=this;var animationDuration=that.animationDuration;if(typeof that.width==="string"&&that.width.indexOf("%")!==-1){that._dimensions.width=that.width}if(typeof that.height==="string"&&that.height.indexOf("%")!==-1){that._dimensions.height=that.height}that._getLiquidDimensions();that.host.width(that.width);that.host.height(that.height);$("#"+that.element.id+" .chartContainer").width(that.width);$("#"+that.element.id+" .chartContainer").height(that.height);that._removeBarGaugeTitle();that._removeBarGaugeSubTitle();that._validateGeometry();that._validateTitle();that._validateLabel();that._validateValues();that._validateTooltip();that._measureRadius();that.animationDuration=0;that._render();that.animationDuration=animationDuration},propertyChangedHandler:function(object,key,oldvalue,value){var that=object;var animationDuration,i;that._cachedMeasurements=[];if(object.isInitialized===undefined||object.isInitialized===null||object.isInitialized===false){return}if(!that.ie7&&object.batchUpdate&&object.batchUpdate.width&&object.batchUpdate.height&&Object.keys(object.batchUpdate).length===2){return}if((value!==oldvalue)||(key==="colorScheme"||key==="tooltip")){animationDuration=that.animationDuration;that._titleTemplate=that._title;that._labelTemplate=that._label;that._tooltipTemplate=that._tooltip;switch(key){case"width":case"height":that._staticRefresh();break;case"values":that.values=oldvalue;that.val(value);break;case"animationDuration":break;case"disabled":if(that.disabled){$(that.host).addClass(that.toThemeProperty("jqx-fill-state-disabled"))}else{$(that.host).removeClass(that.toThemeProperty("jqx-fill-state-disabled"))}that._render();break;case"geometry":case"min":case"baseValue":case"max":case"barSpacing":case"startAngle":case"endAngle":case"relativeInnerRadius":that.geometry.startAngle=that.startAngle;that.geometry.endAngle=that.endAngle;that.values=that._userValues.slice();that._validateValues();that._transformValuesToAngles();that._render();break;case"tooltip":that._validateTooltip();break;case"rendered":break;case"backgroundColor":that._backgroundColor=that._validateColor(that.backgroundColor,that._backgroundColor);if(that._ie7||that._ie8){for(i=0;i=0){isPercentage=true}if(that._dimensions.height&&that._dimensions.height.toString().indexOf("%")>=0){isPercentage=true}if(isPercentage){that._staticRefresh()}})},_removeEventHandlers:function(){var that=this;that.removeHandler($(that.host),"drawStart");that.removeHandler($(that.host),"drawEnd");that.removeHandler($(window),"resize.jqxBarGauge"+that.host[0].id)},_refreshEventHandlers:function(){var that=this;that._removeEventHandlers();that._addEventHandlers()},_raiseEvent:function(eventId,data){var that=this;var event=$.Event(that._events[eventId]);event.args=data;return that.host.trigger(event)},_getEvent:function(event){var that=this;if(that._isTouchDevice){return that._touchEvents[event]}else{return event}}})})(jqxBaseFramework); + +(function(a){a.jqx.jqxWidget("jqxBulletChart","",{});a.extend(a.jqx._jqxBulletChart.prototype,{defineInstance:function(){var b={width:500,height:100,barSize:"50%",ranges:[{startValue:0,endValue:50,color:"#000000",opacity:0.7},{startValue:50,endValue:80,color:"#000000",opacity:0.5},{startValue:80,endValue:100,color:"#000000",opacity:0.3}],pointer:{value:65,label:"Value",size:"25%",color:""},target:{value:85,label:"Target",size:4,color:""},ticks:{position:"far",interval:20,size:10},title:"Title",description:"Description",orientation:"horizontal",labelsFormat:null,labelsFormatFunction:null,animationDuration:400,showTooltip:true,tooltipFormatFunction:null,disabled:false,rtl:false,events:["change"]};if(this===a.jqx._jqxBulletChart.prototype){return b}a.extend(true,this,b);return b},createInstance:function(b){if(!a.jqx.dataAdapter){throw new Error("jqxBulletChart: Missing reference to the following module: 'jqxdata.js'.")}this._setDefaultValues();this.render();var c=this;a.jqx.utilities.resize(this.host,function(){if(c._timer){clearTimeout(c._timer)}c._timer=setTimeout(function(){var d=c.animationDuration;c.animationDuration=0;c.render();setTimeout(function(){c.animationDuration=d},0)},10)},false,true)},render:function(){if(this.host.children().length>0){this._removeHandlers();if(this.showTooltip==true){this.host.jqxTooltip("destroy")}this.host.empty()}this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-bulletchart"));this.host.width(this.width);this.host.height(this.height);var n=this.host.width();var d=this.host.height();var l;var j=this.rtl?"rtl":"ltr";if(this.orientation=="horizontal"){l=a("
"+this.title+"
"+this.description+"
")}else{if(this.orientation=="vertical"){l=a("
"+this.title+"
"+this.description+"
")}}this.host.append(l);var k=l.outerWidth();var g=l.outerHeight();l.remove();var e,h,i,b,o,m,f,c;if(this.orientation=="horizontal"){e="jqx-bulletchart-title-container-horizontal";h="jqx-bulletchart-chart-container-horizontal";i=this._checkPercentage(this.barSize,this.host);b=k;o=this.barSize;m=0;f=n-b;c=o;if(this.width&&this.width.toString().indexOf("%")>=0){var f=parseFloat(parseFloat(f*100)/n).toString()+"%";var b=parseFloat(parseFloat(b*100)/n).toString()+"%";this._percentageWidth=true}}else{if(this.orientation=="vertical"){e="jqx-bulletchart-title-container-vertical";h="jqx-bulletchart-chart-container-vertical";i=0;b="100%";o=g;m=this._checkPercentage(this.barSize,this.host);f=this.barSize;c=d-o}}if(this.rtl==false||(this.rtl==true&&this.orientation=="vertical")){this.host.append("
")}this.host.append("
");if(this.rtl==true&&this.orientation=="horizontal"){this.host.append("
")}this._titleContainer=a("#"+this.element.id+"titleContainer");this._chartContainer=a("#"+this.element.id+"ChartContainer");this._titleContainer.css({width:b,height:o});this._chartContainer.css({width:f,height:c});this._min=this.ranges[0].startValue;this._max=this.ranges[this.ranges.length-1].endValue;this._interval=this._max-this._min;this._valueToPixelsHorizontal=this._chartContainer.width()/this._interval;this._valueToPixelsVertical=this._chartContainer.height()/this._interval;this._checkValues();this._appendRanges();this._appendPointerAndTarget();this._appendTitleAndDescription();if(this.ticks.position!="none"){this._appendTicksAndLabels()}if(this.disabled==true){this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"))}if(this.showTooltip==true){if(this.host.jqxTooltip!=undefined){this._initializeTooltip();this.host.data().jqxWidget=this}else{throw new Error("jqxBulletChart: Missing reference to the following module: 'jqxtooltip.js'.")}}this._updateValue(this.pointer.value,0,true)},refresh:function(b){if(!b){this.render()}},val:function(b){if(arguments.length==0||(b!=null&&typeof(b)=="object")){return this.pointer.value}else{if(b>this._max){b=this._max}else{if(bthis._max){this.pointer.value=this._max}else{if(this.pointer.valuethis._max){this.target.value=this._max}else{if(this.target.value"}else{if(this.orientation=="vertical"){var b=(f.startValue-this._min)*this._valueToPixelsVertical;var k=(f.endValue-f.startValue)*this._valueToPixelsVertical;l="
"}}e+=l}this._chartContainer.append(e)},_appendPointerAndTarget:function(){var o="";var m=this.element.id+"Pointer";var f=this.element.id+"Target";var l=this.pointer.size;var k=this.target.value;var e=this.target.size;var j=k>0?0:parseInt(e);var p=this.pointer.color.length>0?"":this.toThemeProperty("jqx-fill-state-pressed");var g=this.target.color.length>0?"":this.toThemeProperty("jqx-fill-state-pressed");if(this.orientation=="horizontal"){var c=this._normaliseValue(l);var n=this._checkPercentage(l,this._chartContainer);var d=this.rtl?"right":"left";var t=(k-this._min)*this._valueToPixelsHorizontal-j;var u=t+parseInt(e)-this._chartContainer.width();if(t<0){t=0}else{if(u>0){t-=u}}var i=this._normaliseValue(e);o+="
";o+="
"}else{if(this.orientation=="vertical"){var r=this._chartContainer.width();var q=this._normaliseValue(l);var s=this._checkPercentage(l,this._chartContainer);var b=(k-this._min)*this._valueToPixelsVertical-j;var u=b+parseInt(e)-this._chartContainer.height();if(b<0){b=0}else{if(u>0){b-=u}}var h=this._normaliseValue(e);o+="
";o+="
"}}this._chartContainer.append(o)},_updatePointer:function(c,i){var h=a("#"+this.element.id+"Pointer");if(c.value>this._max){this.pointer.value=this._max}else{if(c.valuethis._max){this.target.value=this._max}else{if(b.value0?0:k;if(this.orientation=="horizontal"){var i=this.rtl?"right":"left";var j=(h-this._min)*this._valueToPixelsHorizontal-c;var g=j+k-this._chartContainer.width();if(j<0){j=0}else{if(g>0){j-=g}}if(this.rtl==false){e.css("left",j)}else{e.css("right",j)}e.width(k)}else{if(this.orientation=="vertical"){var f=(h-this._min)*this._valueToPixelsVertical-c;var g=f+k-this._chartContainer.height();if(f<0){f=0}else{if(g>0){f-=g}}e.css({bottom:f,height:k})}}if(this.showTooltip==true){this._updateTooltip()}}if(b.label!=d.label){if(this.showTooltip==true){this._updateTooltip()}}if(b.color!=d.color){if(b.color==""){e.css("background-color","");e.addClass(this.toThemeProperty("jqx-fill-state-pressed"))}else{e.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));e.css("background-color",b.color)}}},_appendTitleAndDescription:function(){var d;if(this.orientation=="horizontal"){if(this.rtl==true){d=this.toThemeProperty("jqx-bulletchart-title-description-rtl")}else{d=this.toThemeProperty("jqx-bulletchart-title-description-ltr")}}else{d=this.toThemeProperty("jqx-bulletchart-title-description-vertical")}var g=this.rtl?"rtl":"ltr";var b="
"+this.title+"
"+this.description+"
";var e=a("
"+b+"
");this._titleContainer.append(e);var h=e.children();var c=a(h[0]).height()+a(h[1]).height();e.remove();var f;if(this.orientation=="horizontal"){if(this.rtl==false){f=this.toThemeProperty("jqx-bulletchart-title-inner-container")+" "+this.toThemeProperty("jqx-bulletchart-title-inner-container-ltr")}else{f=this.toThemeProperty("jqx-bulletchart-title-inner-container")+" "+this.toThemeProperty("jqx-bulletchart-title-inner-container-rtl")}}else{f=""}this._titleContainer.append("
"+b+"
")},_appendTicksAndLabels:function(){var o=a("
");this._chartContainer.append(o);var j="";var e=this._min<0?true:false;var b=this.ticks.size;if(this.orientation=="horizontal"){var k=this._titleContainer.width();var r=this._chartContainer.offset().top-this.host.offset().top;if(this.ticks.position=="both"||this.ticks.position=="far"){var l=this._chartContainer.height()+r}for(var h=0;h<=this._interval;h+=this.ticks.interval){var c=h*this._valueToPixelsHorizontal+k;if(h+this.ticks.interval>this._interval){c-=1}if(e){var d=(h+this._min)==0?true:false;if(d){j+="
";e=false}}var n=this._labelValue(h);o.html(n);var p=c-o.width()/2;var m=this.rtl?"right":"left";if(this.ticks.position=="both"||this.ticks.position=="far"){j+="
";j+="
"+n+"
"}if(this.ticks.position=="both"||this.ticks.position=="near"){j+="
";j+="
"+n+"
"}}}else{if(this.orientation=="vertical"){var g=this._chartContainer.offset().left-this.host.offset().left;if(this.ticks.position=="both"||this.ticks.position=="far"){var q=this._chartContainer.width()}for(var h=0;h<=this._interval;h+=this.ticks.interval){var f=h*this._valueToPixelsVertical;if(h+this.ticks.interval>this._interval){f-=1}if(e){var d=(h+this._min)==0?true:false;if(d){j+="
";e=false}}if(this.ticks.position=="both"||this.ticks.position=="near"){j+="
";var n=this._labelValue(h,"near");o.html(n);var p=o.height()/2-1;j+="
"+n+"
"}if(this.ticks.position=="both"||this.ticks.position=="far"){j+="
";var n=this._labelValue(h,"far");o.html(n);var p=o.height()/2-1;j+="
"+n+"
"}}}}this.host.append(j);o.remove()},_labelValue:function(d,b){var e=d+this._min;var c;if(this.labelsFormatFunction){c=this.labelsFormatFunction(e,b)}else{c=a.jqx.dataFormat.formatnumber(e,this.labelsFormat)}return c},_initializeTooltip:function(){var c=this;var d=this._tooltipContent();this.host.jqxTooltip({theme:this.theme,position:"mouse",content:d,trigger:"none",autoHide:false,rtl:this.rtl});this.host.jqxTooltip("getInstance").val=a.proxy(this.val,this);var b=a("#"+this.element.id+"Pointer, #"+this.element.id+"Target");this.addHandler(b,"mouseenter.bulletchart"+this.element.id,function(e){if(c.disabled==false){c.host.jqxTooltip("open",e.pageX,e.pageY);if(e.target.id==c.element.id+"Pointer"&&c.pointer.color==""||e.target.id==c.element.id+"Target"&&c.target.color==""){a(e.target).removeClass(c.toThemeProperty("jqx-fill-state-pressed"));a(e.target).addClass(c.toThemeProperty("jqx-fill-state-hover"))}}});this.addHandler(b,"mouseleave.bulletchart"+this.element.id,function(e){if(c.disabled==false){c.host.jqxTooltip("close");if(e.target.id==c.element.id+"Pointer"&&c.pointer.color==""||e.target.id==c.element.id+"Target"&&c.target.color==""){a(e.target).removeClass(c.toThemeProperty("jqx-fill-state-hover"));a(e.target).addClass(c.toThemeProperty("jqx-fill-state-pressed"))}}})},_updateTooltip:function(){this.host.jqxTooltip({content:this._tooltipContent()})},_tooltipContent:function(){var c;if(this.tooltipFormatFunction){c=this.tooltipFormatFunction(this.pointer.value,this.target.value)}else{var b=a.jqx.dataFormat.formatnumber(this.pointer.value,this.labelsFormat);var d=a.jqx.dataFormat.formatnumber(this.target.value,this.labelsFormat);c="
"+this.pointer.label+": "+b+"
"+this.target.label+": "+d+"
"}return c},_updateValue:function(m,d,k){var j=this;var c=a("#"+this.element.id+"Pointer");var g,h,l,n;var f=function(p,r,q){if(j._min>=0){if(p=="vertical"){c.css("bottom",0)}else{if(j.rtl==true&&p=="horizontal"){c.css("right",0)}}g=(m-j._min)*r}else{if(m>=0){if(p=="horizontal"){if(j.rtl==true){h="right";l="left"}else{h="left"}}else{if(p=="vertical"){h="bottom";l="top"}}var o=-j._min*r}else{if(p=="horizontal"){if(j.rtl==true){h="left"}else{h="right";l="left"}}else{if(p=="vertical"){h="top"}}var o=q+j._min*r}c.css(h,o);if(l){c.css(l,"")}if(m*d<0){if(p=="horizontal"){c.width(0)}else{if(p=="vertical"){c.height(0)}}}g=Math.abs(m*r)}return g};var i=function(){if(!k){j._raiseEvent("0")}};if(this.orientation=="horizontal"){var e=f("horizontal",this._valueToPixelsHorizontal,this._chartContainer.width());setTimeout(function(){c.animate({width:e},j.animationDuration,i)},0)}else{if(this.orientation=="vertical"){var b=f("vertical",this._valueToPixelsVertical,this._chartContainer.height());setTimeout(function(){c.animate({height:b},j.animationDuration,i)},0)}}},_checkPercentage:function(f,d){var c=-1;if(f.indexOf){c=f.indexOf("%")}var g=function(h){if(!f.indexOf||f.indexOf("px")==-1){return h}else{return parseFloat(h.slice(0,f.indexOf("px")))}};var e=function(h){return parseFloat(h.slice(0,c))};if(c==-1){var b;if(this.orientation=="horizontal"){b=d.height()}else{if(this.orientation=="vertical"){b=d.width()}}return((b-g(f))/2)+"px"}else{return((100-e(f))/2)+"%"}},_normaliseValue:function(b){if(!b.indexOf||(b.indexOf("px")==-1&&b.indexOf("%")==-1)){return b+"px"}else{return b}}})})(jqxBaseFramework); + +(function(a){a.jqx.jqxWidget("jqxButtonGroup","",{});a.extend(a.jqx._jqxButtonGroup.prototype,{defineInstance:function(){var b={mode:"default",roundedCorners:true,disabled:false,enableHover:false,orientation:"horizontal",width:null,height:null,_eventsMap:{mousedown:a.jqx.mobile.getTouchEventName("touchstart"),mouseup:a.jqx.mobile.getTouchEventName("touchend")},_events:["selected","unselected","buttonclick"],_buttonId:{},_selected:null,_pressed:null,rtl:false,template:"",_baseId:"group_button",aria:{"aria-disabled":{name:"disabled",type:"boolean"}}};if(this===a.jqx._jqxButtonGroup.prototype){return b}a.extend(true,this,b);return b},createInstance:function(b){var c=this;c._isTouchDevice=a.jqx.mobile.isTouchDevice();a.jqx.aria(c);c._baseId=c._baseId+c.element.id;c.addHandler(c.host,"selectstart",function(d){if(!c.disabled){d.preventDefault()}})},refresh:function(){var b=this;if(b.width){if(b.width.toString()&&b.width.toString().indexOf("%")>=0){b.element.style.width=b.width}else{b.host.width(b.width)}}if(b.height){b.host.height(b.height)}b._refreshButtons()},render:function(){this.refresh()},resize:function(){this.refresh()},_getEvent:function(c){var b=this;if(b._isTouchDevice){var d=b._eventsMap[c]||c;d+="."+b.element.id;return d}c+="."+b.element.id;return c},_refreshButtons:function(){var f=this;if(f.lastElement){f.lastElement.remove()}f.lastElement=a("
");var c=f.host.children(),e=c.length,g;switch(f.mode){case"radio":f.host.attr("role","radiogroup");break;case"checkbox":case"default":f.host.attr("role","group");break}var d=new Number(100/e).toFixed(2);for(var b=0;b");return b},_removeStyles:function(b){var c=this;var d=c.toThemeProperty;c.host.removeClass("jqx-widget");c.host.removeClass("jqx-rc-all");b.removeClass(d.call(this,"jqx-fill-state-normal"));b.removeClass(d.call(this,"jqx-group-button-normal"));b.removeClass(d.call(this,"jqx-rc-tl"));b.removeClass(d.call(this,"jqx-rc-bl"));b.removeClass(d.call(this,"jqx-rc-tr"));b.removeClass(d.call(this,"jqx-rc-br"));b.css("margin-left",0)},_addStyles:function(c,b,e){var d=this;var f=this.toThemeProperty;d.host.addClass(f.call(this,"jqx-widget"));d.host.addClass(f.call(this,"jqx-rc-all"));d.host.addClass(f.call(this,"jqx-buttongroup"));c.addClass(f.call(this,"jqx-button"));c.addClass(f.call(this,"jqx-group-button-normal"));c.addClass(f.call(this,"jqx-fill-state-normal"));if(d.template){c.addClass(f.call(this,"jqx-"+d.template))}if(d.roundedCorners){if(b===0){d._addRoundedCorners(c,true)}else{if(b===e-1){d._addRoundedCorners(c,false)}}}if(d.orientation==="horizontal"){c.css("margin-left",-parseInt(c.css("border-left-width"),10))}else{c.css("margin-top",-parseInt(c.css("border-left-width"),10))}},_addRoundedCorners:function(b,d){var c=this;var e=c.toThemeProperty;if(c.orientation==="horizontal"){if(d){b.addClass(e.call(this,"jqx-rc-tl"));b.addClass(e.call(this,"jqx-rc-bl"))}else{b.addClass(e.call(this,"jqx-rc-tr"));b.addClass(e.call(this,"jqx-rc-br"))}}else{if(d){b.addClass(e.call(this,"jqx-rc-tl"));b.addClass(e.call(this,"jqx-rc-tr"))}else{b.addClass(e.call(this,"jqx-rc-bl"));b.addClass(e.call(this,"jqx-rc-br"))}}},_centerContent:function(c,b){c.css({"margin-top":(b.height()-c.height())/2,"margin-left":(b.width()-c.width())/2});return c},_renderFromButton:function(b){var c=b.val();if(c===""){c=b.html()}var e;var d=b[0].id;b.wrap("
");e=b.parent();e.attr("style",b.attr("style"));b.remove();a.jqx.utilities.html(e,c);e[0].id=d;return e},_performLayout:function(b){if(this.orientation==="horizontal"){if(this.rtl){b.css("float","right")}else{b.css("float","left")}}else{b.css("float","none")}this._centerContent(a(b.children()),b)},_mouseEnterHandler:function(d){var b=d.data.self,c=a(d.currentTarget);if(b._isDisabled(c)||!b.enableHover){return}var f=b.toThemeProperty;c.addClass(f.call(b,"jqx-group-button-hover"));c.addClass(f.call(b,"jqx-fill-state-hover"))},_mouseLeaveHandler:function(d){var b=d.data.self,c=a(d.currentTarget);if(b._isDisabled(c)||!b.enableHover){return}var f=b.toThemeProperty;c.removeClass(f.call(b,"jqx-group-button-hover"));c.removeClass(f.call(b,"jqx-fill-state-hover"))},_mouseDownHandler:function(d){var b=d.data.self,c=a(d.currentTarget);if(b._isDisabled(c)){return}b._pressed=c;var f=b.toThemeProperty;c.addClass(f.call(b,"jqx-group-button-pressed"));c.addClass(f.call(b,"jqx-fill-state-pressed"))},_mouseUpHandler:function(d){var b=d.data.self,c=a(d.currentTarget);if(b._isDisabled(c)){return}b._handleSelection(c);b._pressed=null;c=b._buttonId[c[0].id];b._raiseEvent(2,{index:c.num,button:c.btn})},_isDisabled:function(b){if(!b||!b[0]){return false}return this._buttonId[b[0].id].disabled},_documentUpHandler:function(d){var b=d.data.self,c=b._pressed;if(c&&!b._buttonId[c[0].id].selected){c.removeClass(b.toThemeProperty("jqx-fill-state-pressed"));b._pressed=null}},_addButtonListeners:function(c){var e=this;var b=e.addHandler;var d=e._getEvent;b(c,d.call(e,"mouseenter"),e._mouseEnterHandler,{self:e});b(c,d.call(e,"mouseleave"),e._mouseLeaveHandler,{self:e});b(c,d.call(e,"mousedown"),e._mouseDownHandler,{self:e});b(c,d.call(e,"mouseup"),e._mouseUpHandler,{self:e});b(a(document),d.call(e,"mouseup"),e._documentUpHandler,{self:e})},_removeButtonListeners:function(c){var e=this;var b=e.removeHandler;var d=e._getEvent;b(c,d.call(e,"mouseenter"),e._mouseEnterHandler);b(c,d.call(e,"mouseleave"),e._mouseLeaveHandler);b(c,d.call(e,"mousedown"),e._mouseDownHandler);b(c,d.call(e,"mouseup"),e._mouseUpHandler);b(a(document),d.call(e,"mouseup"),e._documentUpHandler)},_handleSelection:function(b){var c=this;if(c.mode==="radio"){c._handleRadio(b)}else{if(c.mode==="checkbox"){c._handleCheckbox(b)}else{c._handleDefault(b)}}},_handleRadio:function(b){var d=this;var c=d._getSelectedButton();if(c&&c.btn[0].id!==b[0].id){d._unselectButton(c.btn,true)}for(var e in d._buttonId){d._buttonId[e].selected=true;d._unselectButton(d._buttonId[e].btn,false)}d._selectButton(b,true)},_handleCheckbox:function(c){var d=this;var b=d._buttonId[c[0].id];if(b.selected){d._unselectButton(b.btn,true)}else{d._selectButton(c,true)}},_handleDefault:function(b){var c=this;c._selectButton(b,false);for(var d in c._buttonId){c._buttonId[d].selected=true;c._unselectButton(c._buttonId[d].btn,false)}},_getSelectedButton:function(){var b=this;for(var c in b._buttonId){if(b._buttonId[c].selected){return b._buttonId[c]}}return null},_getSelectedButtons:function(){var c=this;var b=[];for(var d in c._buttonId){if(c._buttonId[d].selected){b.push(c._buttonId[d].num)}}return b},_getButtonByIndex:function(b){var c=this;var e;for(var d in c._buttonId){if(c._buttonId[d].num===b){return c._buttonId[d]}}return null},_selectButton:function(c,e){var d=this;var b=d._buttonId[c[0].id];if(b.selected){return}var f=d.toThemeProperty;b.btn.addClass(f.call(this,"jqx-group-button-pressed"));b.btn.addClass(f.call(this,"jqx-fill-state-pressed"));b.selected=true;if(e){d._raiseEvent(0,{index:b.num,button:b.btn})}a.jqx.aria(b.btn,"aria-checked",true)},_unselectButton:function(c,e){var d=this;var b=d._buttonId[c[0].id];if(!b.selected){return}var f=d.toThemeProperty;b.btn.removeClass(f.call(this,"jqx-group-button-pressed"));b.btn.removeClass(f.call(this,"jqx-fill-state-pressed"));b.selected=false;if(e){d._raiseEvent(1,{index:b.num,button:b.btn})}a.jqx.aria(b.btn,"aria-checked",false)},setSelection:function(b){var d=this;if(b===-1){d.clearSelection();return}if(d.mode==="checkbox"){if(typeof b==="number"){d._setSelection(b)}else{for(var c=0;c=0)||e.value!=null){e.refresh();e._addImage("jqxButton");e.buttonObj=new a(e.element)}if(!e._ariaDisabled){e.element.setAttribute("role","button")}if(e.type!==""){e.element.setAttribute("type",e.type)}if(!e.overrideTheme){e.buttonObj.addClass(e.toThemeProperty(a.jqx.cssroundedcorners(e.roundedCorners)));if(e.enableDefault){e.buttonObj.addClass(e.toThemeProperty("jqx-button"))}e.buttonObj.addClass(e.toThemeProperty("jqx-widget"))}e.isTouchDevice=a.jqx.mobile.isTouchDevice();if(!e._ariaDisabled){a.jqx.aria(this)}if(e.cursor!="arrow"){if(!e.disabled){e.element.style.cursor=e.cursor}else{e.element.style.cursor="arrow"}}var g="mouseenter mouseleave mousedown focus blur";if(e._scrollAreaButton){var g="mousedown"}if(e.isTouchDevice){e.addHandler(e.host,a.jqx.mobile.getTouchEventName("touchstart"),function(h){e.isPressed=true;e.refresh()});e.addHandler(a(document),a.jqx.mobile.getTouchEventName("touchend")+"."+e.element.id,function(h){e.isPressed=false;e.refresh()})}e.addHandler(e.host,g,function(h){switch(h.type){case"mouseenter":if(!e.isTouchDevice){if(!e.disabled&&e.enableHover){e.isMouseOver=true;e.refresh()}}break;case"mouseleave":if(!e.isTouchDevice){if(!e.disabled&&e.enableHover){e.isMouseOver=false;e.refresh()}}break;case"mousedown":if(!e.disabled){e.isPressed=true;e.refresh()}break;case"focus":if(!e.disabled){e.isFocused=true;e.refresh()}break;case"blur":if(!e.disabled){e.isFocused=false;e.refresh()}break}});e.mouseupfunc=function(h){if(!e.disabled){if(e.isPressed||e.isMouseOver){e.isPressed=false;e.refresh()}}};e.addHandler(document,"mouseup.button"+e.element.id,e.mouseupfunc);try{if(document.referrer!=""||window.frameElement){if(window.top!=null&&window.top!=window.that){var f="";if(window.parent&&document.referrer){f=document.referrer}if(f.indexOf(document.location.host)!=-1){if(window.top.document){window.top.document.addEventListener("mouseup",e._topDocumentMouseupHandler)}}}}}catch(c){}e.propertyChangeMap.roundedCorners=function(h,j,i,k){h.buttonObj.removeClass(h.toThemeProperty(a.jqx.cssroundedcorners(i)));h.buttonObj.addClass(h.toThemeProperty(a.jqx.cssroundedcorners(k)))};e.propertyChangeMap.disabled=function(h,j,i,k){if(i!=k){h.refresh();h.element.setAttribute("disabled",k);h.element.disabled=k;if(!k){h.element.style.cursor=h.cursor}else{h.element.style.cursor="default"}a.jqx.aria(h,"aria-disabled",h.disabled)}};e.propertyChangeMap.rtl=function(h,j,i,k){if(i!=k){h.refresh()}};e.propertyChangeMap.template=function(h,j,i,k){if(i!=k){h.buttonObj.removeClass(h.toThemeProperty("jqx-"+i));h.refresh()}};e.propertyChangeMap.theme=function(h,j,i,k){h.buttonObj.removeClass(h.element);if(i){h.buttonObj.removeClass("jqx-button-"+i);h.buttonObj.removeClass("jqx-widget-"+i);h.buttonObj.removeClass("jqx-fill-state-normal-"+i);h.buttonObj.removeClass(h.toThemeProperty(a.jqx.cssroundedcorners(h.roundedCorners))+"-"+i)}if(h.enableDefault){h.buttonObj.addClass(h.toThemeProperty("jqx-button"))}h.buttonObj.addClass(h.toThemeProperty("jqx-widget"));if(!h.overrideTheme){h.buttonObj.addClass(h.toThemeProperty(a.jqx.cssroundedcorners(h.roundedCorners)))}h._oldCSSCurrent=null;h.refresh()};if(e.disabled){e.element.disabled=true;e.element.setAttribute("disabled","true")}},resize:function(c,b){this.width=c;this.height=b;this._setSize()},val:function(d){var c=this;var b=c.host.find("input");if(b.length>0){if(arguments.length==0||typeof(d)=="object"){return b.val()}b.val(d);c.refresh();return b.val()}if(arguments.length==0||typeof(d)=="object"){if(c.element.nodeName.toLowerCase()=="button"){return a(c.element).text()}return c.element.value}if(arguments.length>0&&c._text){c._text.innerHTML=arguments[0];c.refresh();return}else{if(arguments.length>0&&c.element.nodeName==="DIV"){c.element.innerHTML=arguments[0];c.refresh()}}c.element.value=arguments[0];if(c.element.nodeName.toLowerCase()=="button"){a(c.element).html(arguments[0])}c.refresh()},_setSize:function(){var d=this;var b=d.height;var c=d.width;if(b){if(!isNaN(b)){b=b+"px"}d.element.style.height=b}if(c){if(!isNaN(c)){c=c+"px"}d.element.style.width=c}},_removeHandlers:function(){var b=this;b.removeHandler(b.host,"selectstart");b.removeHandler(b.host,"click");b.removeHandler(b.host,"focus");b.removeHandler(b.host,"blur");b.removeHandler(b.host,"mouseenter");b.removeHandler(b.host,"mouseleave");b.removeHandler(b.host,"mousedown");b.removeHandler(a(document),"mouseup.button"+b.element.id,b.mouseupfunc);if(b.isTouchDevice){b.removeHandler(b.host,a.jqx.mobile.getTouchEventName("touchstart"));b.removeHandler(a(document),a.jqx.mobile.getTouchEventName("touchend")+"."+b.element.id)}b.mouseupfunc=null;delete b.mouseupfunc},focus:function(){this.host.focus()},destroy:function(){var b=this;b._removeHandlers();var c=a.data(b.element,"jqxButton");if(c){delete c.instance}b.host.removeClass();b.host.removeData();b.host.remove();delete b.set;delete b.get;delete b.call;delete b.element;delete b.host},render:function(){this.refresh()},propertiesChangedHandler:function(d,b,c){if(c&&c.width&&c.height&&Object.keys(c).length==2){d._setSize();d.refresh()}},propertyChangedHandler:function(b,c,e,d){if(this.isInitialized==undefined||this.isInitialized==false){return}if(d==e){return}if(b.batchUpdate&&b.batchUpdate.width&&b.batchUpdate.height&&Object.keys(b.batchUpdate).length==2){return}if(c==="type"){b.element.setAttribute("type",d)}if(c=="textImageRelation"||c=="textPosition"||c=="imgPosition"){if(b._img){b._positionTextAndImage()}else{b._addImage("jqxButton")}}if(c=="imgSrc"||c=="imgWidth"||c=="imgHeight"){b._addImage("jqxButton")}if(c==="value"){b.val(d)}if(c=="width"||c=="height"){b._setSize();b.refresh()}},refresh:function(){var c=this;if(c.overrideTheme){return}var e=c.toThemeProperty("jqx-fill-state-focus");var i=c.toThemeProperty("jqx-fill-state-disabled");var b=c.toThemeProperty("jqx-fill-state-normal");if(!c.enableDefault){b=""}var h=c.toThemeProperty("jqx-fill-state-hover");var f=c.toThemeProperty("jqx-fill-state-pressed");var g=c.toThemeProperty("jqx-fill-state-pressed");if(!c.enablePressed){f=""}var d="";if(!c.host){return}c.element.disabled=c.disabled;if(c.disabled){if(c._oldCSSCurrent){c.buttonObj.removeClass(c._oldCSSCurrent)}d=b+" "+i;if(c.template!=="default"&&c.template!==""){d+=" jqx-"+c.template;if(c.theme!=""){d+=" jqx-"+c.template+"-"+c.theme}}c.buttonObj.addClass(d);c._oldCSSCurrent=d;return}else{if(c.isMouseOver&&!c.isTouchDevice){if(c.isPressed){d=g}else{d=h}}else{if(c.isPressed){d=f}else{d=b}}}if(c.isFocused){d+=" "+e}if(c.template!=="default"&&c.template!==""){d+=" jqx-"+c.template;if(c.theme!=""){d+=" jqx-"+c.template+"-"+c.theme}}if(d!=c._oldCSSCurrent){if(c._oldCSSCurrent){c.buttonObj.removeClass(c._oldCSSCurrent)}c.buttonObj.addClass(d);c._oldCSSCurrent=d}if(c.rtl){c.buttonObj.addClass(c.toThemeProperty("jqx-rtl"));c.element.style.direction="rtl"}if(c.isMaterialized()){c.host.addClass("buttonRipple")}}});a.jqx.jqxWidget("jqxLinkButton","",{});a.extend(a.jqx._jqxLinkButton.prototype,{defineInstance:function(){this.disabled=false;this.height=null;this.width=null;this.rtl=false;this.href=null},createInstance:function(c){var f=this;this.host.onselectstart=function(){return false};this.host.attr("role","button");var b=this.height||this.element.offsetHeight;var d=this.width||this.element.offsetWidth;this.href=this.element.getAttribute("href");this.target=this.element.getAttribute("target");this.content=this.host.text();this.element.innerHTML="";var g=document.createElement("input");g.type="button";g.className="jqx-wrapper "+this.toThemeProperty("jqx-reset");this._setSize(g,d,b);g.value=this.content;var e=new a(this.element);e.addClass(this.toThemeProperty("jqx-link"));this.element.style.color="inherit";this.element.appendChild(g);this._setSize(g,d,b);var h=c==undefined?{}:c[0]||{};a(g).jqxButton(h);this.wrapElement=g;if(this.disabled){this.element.disabled=true}this.propertyChangeMap.disabled=function(i,k,j,l){i.element.disabled=l;i.wrapElement.jqxButton({disabled:l})};this.addHandler(a(g),"click",function(i){if(!this.disabled){f.onclick(i)}return false})},_setSize:function(c,d,b){var e=this;if(b){if(!isNaN(b)){b=b+"px"}c.style.height=b}if(d){if(!isNaN(d)){d=d+"px"}c.style.width=d}},onclick:function(b){if(this.target!=null){window.open(this.href,this.target)}else{window.location=this.href}}});a.jqx.jqxWidget("jqxRepeatButton","jqxButton",{});a.extend(a.jqx._jqxRepeatButton.prototype,{defineInstance:function(){this.delay=50},createInstance:function(d){var e=this;var c=a.jqx.mobile.isTouchDevice();var b=!c?"mouseup."+this.base.element.id:"touchend."+this.base.element.id;var f=!c?"mousedown."+this.base.element.id:"touchstart."+this.base.element.id;this.addHandler(a(document),b,function(g){if(e.timeout!=null){clearTimeout(e.timeout);e.timeout=null;e.refresh()}if(e.timer!=undefined){clearInterval(e.timer);e.timer=null;e.refresh()}});this.addHandler(this.base.host,f,function(g){if(e.timer!=null){clearInterval(e.timer)}e.timeout=setTimeout(function(){clearInterval(e.timer);e.timer=setInterval(function(h){e.ontimer(h)},e.delay)},150)});this.mousemovefunc=function(g){if(!c){if(g.which==0){if(e.timer!=null){clearInterval(e.timer);e.timer=null}}}};this.addHandler(this.base.host,"mousemove",this.mousemovefunc)},destroy:function(){var c=a.jqx.mobile.isTouchDevice();var b=!c?"mouseup."+this.base.element.id:"touchend."+this.base.element.id;var e=!c?"mousedown."+this.base.element.id:"touchstart."+this.base.element.id;this.removeHandler(this.base.host,"mousemove",this.mousemovefunc);this.removeHandler(this.base.host,e);this.removeHandler(a(document),b);this.timer=null;delete this.mousemovefunc;delete this.timer;var d=a.data(this.base.element,"jqxRepeatButton");if(d){delete d.instance}a(this.base.element).removeData();this.base.destroy();delete this.base},stop:function(){clearInterval(this.timer);this.timer=null},ontimer:function(b){var b=new a.Event("click");if(this.base!=null&&this.base.host!=null){this.base.host.trigger(b)}}});a.jqx.jqxWidget("jqxToggleButton","jqxButton",{});a.extend(a.jqx._jqxToggleButton.prototype,{defineInstance:function(){this.toggled=false;this.uiToggle=true;this.aria={"aria-checked":{name:"toggled",type:"boolean"},"aria-disabled":{name:"disabled",type:"boolean"}}},createInstance:function(b){var c=this;c.base.overrideTheme=true;c.isTouchDevice=a.jqx.mobile.isTouchDevice();a.jqx.aria(this);c.propertyChangeMap.roundedCorners=function(d,f,e,g){d.base.buttonObj.removeClass(d.toThemeProperty(a.jqx.cssroundedcorners(e)));d.base.buttonObj.addClass(d.toThemeProperty(a.jqx.cssroundedcorners(g)))};c.propertyChangeMap.toggled=function(d,f,e,g){d.refresh()};c.propertyChangeMap.disabled=function(d,f,e,g){d.base.disabled=g;d.refresh()};c.addHandler(c.base.host,"click",function(d){if(!c.base.disabled&&c.uiToggle){c.toggle()}});if(!c.isTouchDevice){c.addHandler(c.base.host,"mouseenter",function(d){if(!c.base.disabled){c.refresh()}});c.addHandler(c.base.host,"mouseleave",function(d){if(!c.base.disabled){c.refresh()}})}c.addHandler(c.base.host,"mousedown",function(d){if(!c.base.disabled){c.refresh()}});c.addHandler(a(document),"mouseup.togglebutton"+c.base.element.id,function(d){if(!c.base.disabled){c.refresh()}})},destroy:function(){this._removeHandlers();this.base.destroy()},_removeHandlers:function(){this.removeHandler(this.base.host,"click");this.removeHandler(this.base.host,"mouseenter");this.removeHandler(this.base.host,"mouseleave");this.removeHandler(this.base.host,"mousedown");this.removeHandler(a(document),"mouseup.togglebutton"+this.base.element.id)},toggle:function(){this.toggled=!this.toggled;this.refresh();a.jqx.aria(this,"aria-checked",this.toggled)},unCheck:function(){this.toggled=false;this.refresh()},check:function(){this.toggled=true;this.refresh()},refresh:function(){var c=this;var h=c.base.toThemeProperty("jqx-fill-state-disabled");var b=c.base.toThemeProperty("jqx-fill-state-normal");if(!c.base.enableDefault){b=""}var g=c.base.toThemeProperty("jqx-fill-state-hover");var e=c.base.toThemeProperty("jqx-fill-state-pressed");var f=c.base.toThemeProperty("jqx-fill-state-pressed");var d="";c.base.element.disabled=c.base.disabled;if(c.base.disabled){d=b+" "+h;c.base.buttonObj.addClass(d);return}else{if(c.base.isMouseOver&&!c.isTouchDevice){if(c.base.isPressed||c.toggled){d=f}else{d=g}}else{if(c.base.isPressed||c.toggled){d=e}else{d=b}}}if(c.base.template!=="default"&&c.base.template!==""){d+=" jqx-"+c.base.template;if(c.base.theme!=""){d+=" jqx-"+c.template+"-"+c.base.theme}}if(c.base.buttonObj.hasClass(h)&&h!=d){c.base.buttonObj.removeClass(h)}if(c.base.buttonObj.hasClass(b)&&b!=d){c.base.buttonObj.removeClass(b)}if(c.base.buttonObj.hasClass(g)&&g!=d){c.base.buttonObj.removeClass(g)}if(c.base.buttonObj.hasClass(e)&&e!=d){c.base.buttonObj.removeClass(e)}if(c.base.buttonObj.hasClass(f)&&f!=d){c.base.buttonObj.removeClass(f)}if(!c.base.buttonObj.hasClass(d)){c.base.buttonObj.addClass(d)}},_topDocumentMouseupHandler:function(c){var b=this;b.isPressed=false;b.refresh()}})})(jqxBaseFramework); + +(function(a){a.jqx.jqxWidget("jqxCalendar","",{});a.extend(a.jqx._jqxCalendar.prototype,{defineInstance:function(){var b={disabled:false,restrictedDates:new Array(),multipleMonthRows:1,multipleMonthColumns:1,minDate:a.jqx._jqxDateTimeInput.getDateTime(new Date()),maxDate:a.jqx._jqxDateTimeInput.getDateTime(new Date()),min:new Date(1900,0,1),max:new Date(2100,0,1),navigationDelay:400,stepMonths:1,width:null,height:null,value:a.jqx._jqxDateTimeInput.getDateTime(new Date()),firstDayOfWeek:0,showWeekNumbers:false,showDayNames:true,enableWeekend:false,enableOtherMonthDays:true,showOtherMonthDays:true,rowHeaderWidth:25,columnHeaderHeight:25,titleHeight:30,dayNameFormat:"firstTwoLetters",monthNameFormat:"default",titleFormat:["MMMM yyyy","yyyy","yyyy","yyyy"],enableViews:true,readOnly:false,culture:"default",enableFastNavigation:true,enableHover:true,enableAutoNavigation:true,enableTooltips:false,backText:"Back",forwardText:"Forward",specialDates:new Array(),keyboardNavigation:true,selectionMode:"default",selectableDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],todayString:"Today",clearString:"Clear",showFooter:false,selection:{from:null,to:null},canRender:true,_checkForHiddenParent:true,height:null,rtl:false,view:"month",views:["month","year","decade"],changing:null,change:null,localization:{backString:"Back",forwardString:"Forward",todayString:"Today",clearString:"Clear",calendar:{name:"Gregorian_USEnglish","/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss",ISO:"yyyy-MM-dd hh:mm:ss"}}},events:["backButtonClick","nextButtonClick","valuechanged","cellMouseDown","cellMouseUp","cellSelected","cellUnselected","change","viewChange"]};if(this===a.jqx._jqxCalendar.prototype){return b}a.extend(true,this,b);this.minDate._setYear(1900);this.minDate._setMonth(1);this.minDate._setDay(1);this.minDate._setHours(0);this.minDate._setMinutes(0);this.minDate._setSeconds(0);this.minDate._setMilliseconds(0);this.maxDate._setYear(2100);this.maxDate._setMonth(1);this.maxDate._setDay(1);this.maxDate._setHours(0);this.maxDate._setMinutes(0);this.maxDate._setSeconds(0);this.maxDate._setMilliseconds(0);this.value._setHours(0);this.value._setMinutes(0);this.value._setSeconds(0);this.value._setMilliseconds(0);return b},_createFromInput:function(d){var g=this;if(g.element.nodeName.toLowerCase()=="input"){g.field=g.element;if(g.field.className){g._className=g.field.className}var f={title:g.field.title};if(g.field.value){f.value=g.field.value}if(g.field.checked){f.checked=true}if(g.field.id.length){f.id=g.field.id.replace(/[^\w]/g,"_")+"_"+d}else{f.id=a.jqx.utilities.createId()+"_"+d}if(g.field.getAttribute("min")){var e=new Date(g.field.getAttribute("min"));if(e!="Invalid Date"){g.min=e}}if(g.field.getAttribute("max")){var c=new Date(g.field.getAttribute("max"));if(c!="Invalid Date"){g.max=c}}var i=a("
",f);i[0].style.cssText=g.field.style.cssText;if(!g.width){g.width=a(g.field).width()}if(!g.height){g.height=a(g.field).outerHeight()}a(g.field).hide().after(i);var h=g.host.data();g.host=i;g.host.data(h);g.element=i[0];g.element.id=g.field.id;g.field.id=f.id;if(g._className){g.host.addClass(g._className);a(g.field).removeClass(g._className)}if(g.field.tabIndex){var b=g.field.tabIndex;g.field.tabIndex=-1;g.element.tabIndex=b}}},createInstance:function(k){var j=this;j._createFromInput("jqxCalendar");if(j.isMaterialized()){var m=window.getComputedStyle(this.element);var i=m.getPropertyValue("--jqx-calendar-title-height");var c=m.getPropertyValue("--jqx-calendar-column-header-height");if(i){this.titleHeight=parseInt(i)}if(c){this.columnHeaderHeight=parseInt(c)}setTimeout(function(){j.refreshControl()},200)}this.setCalendarSize();if(this.element.id===""){this.element.id=a.jqx.utilities.createId()}if(a.type(this.value)=="date"){this.value=a.jqx._jqxDateTimeInput.getDateTime(this.value)}this.element.innerHTML="";this.host.attr("data-role","calendar");var b=this.element.id;var l=this;this.propertyChangeMap.width=function(n,p,o,q){l.setCalendarSize()};this.propertyChangeMap.height=function(n,p,o,q){l.setCalendarSize()};if(a.global){a.global.preferCulture(this.culture)}if(this.culture!="default"){if(a.global){a.global.preferCulture(this.culture);this.localization.calendar=a.global.culture.calendar}else{if(window.Globalize){var e=window.Globalize.culture(this.culture);this.localization.calendar=e.calendar}}this.firstDayOfWeek=this.localization.calendar.firstDay}if(this.localization.backString!="Back"){this.backText=this.localization.backString}if(this.localization.forwardString!="Forward"){this.forwardText=this.localization.forwardString}if(this.localization.todayString!="Today"&&this.localization.todayString){this.todayString=this.localization.todayString}if(this.localization.clearString!="Clear"&&this.localization.clearString){this.clearString=this.localization.clearString}if(this.localization.calendar&&this.localization.calendar.firstDay!=undefined&&this.culture!="default"){this.firstDayOfWeek=this.localization.calendar.firstDay}this.setMaxDate(this.max,false);this.setMinDate(this.min,false);if(!this.host.attr("tabIndex")){this.host.attr("tabIndex",0)}this.host.css("outline","none");this.host.addClass(this.toThemeProperty("jqx-calendar"));this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-widget-content"));this.host.addClass(this.toThemeProperty("jqx-rc-all"));this._addInput();if(this.views.indexOf("month")==-1){this.view="year"}if(this.views.indexOf("year")==-1&&this.views.indexOf("month")==-1){this.view="decade"}this.addHandler(this.host,"keydown",function(o){var n=true;if(l.keyboardNavigation){if(l._handleKey!=undefined){n=l._handleKey(o);if(!n){if(o.stopPropagation){o.stopPropagation()}if(o.preventDefault){o.preventDefault()}}}}return n});var f=false;var h=this;var g=false;if(l.width!=null&&l.width.toString().indexOf("%")!=-1){g=true}if(l.height!=null&&l.height.toString().indexOf("%")!=-1){g=true}a.jqx.utilities.resize(this.host,function(){var n=h.host.find("#View"+l.element.id);if(!f){f=true;h.render()}else{h.refreshTitle(n)}if(g){if(l.refreshTimer){clearTimeout(l.refreshTimer)}l.refreshTimer=setTimeout(function(){l.refreshControl()},1)}},false,this._checkForHiddenParent);var d="View";this.propertyChangeMap.disabled=function(n,p,o,q){if(q){n.host.addClass(l.toThemeProperty("jqx-fill-state-disabled"))}else{n.host.removeClass(l.toThemeProperty("jqx-fill-state-disabled"))}l.refreshControl()}},_addInput:function(){var b=this.host.attr("name");this.input=a("");this.host.append(this.input);if(b){this.input.attr("name",b)}this.input.val(this.getDate().toString())},setCalendarSize:function(){if(this.width!=null&&this.width.toString().indexOf("px")!=-1){this.host.width(this.width)}else{if(this.width!=undefined&&!isNaN(this.width)){this.host.width(this.width)}}if(this.width!=null&&this.width.toString().indexOf("%")!=-1){this.host.css("width",this.width)}if(this.height!=null&&this.height.toString().indexOf("px")!=-1){this.host.height(this.height)}else{if(this.height!=undefined&&!isNaN(this.height)){this.host.height(this.height)}}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){this.host.css("height",this.height)}},_getYearAndMonthPart:function(c){if(!c){return new Date(1900,0,1)}var b=new Date(c.getFullYear(),c.getMonth(),1);return b},_handleKey:function(p){if(this.readOnly){return true}var A=p.keyCode;var y=this;var b=this._getSelectedDate();if(b==undefined){if(this.view=="month"&&(A==37||A==38||A==39||A==40)){this.selectedDate=new Date(this.value.year,this.value.month-1,1);this._selectDate(this.selectedDate,"key");b=this.selectedDate}else{return true}}if(p.altKey){return true}if(this._animating){return false}if(this.view!="month"&&A==13){var d=this._getSelectedCell();this._setDateAndSwitchViews(d,p,"keyboard")}if(this.view=="year"){var w=b.getMonth();var j=this._getYearAndMonthPart(this.getMinDate());var m=this._getYearAndMonthPart(this.getMaxDate());switch(A){case 37:if(w==0){var h=new Date(b.getFullYear()-1,11,1);if(h>=j){this.selectedDate=h;this.navigateBackward()}else{if(this.selectedDate!=j){this.selectedDate=j;this.navigateBackward()}}}else{var h=new Date(b.getFullYear(),w-1,1);if(h>=j){this._selectDate(h,"key")}}return false;case 38:var h=new Date(b.getFullYear(),w-4,1);if(hm){h=m}if(w+4>11){this.selectedDate=h;this.navigateForward()}else{this._selectDate(h,"key")}return false;case 39:if(w==11){var h=new Date(b.getFullYear()+1,0,1);if(h<=m){this.selectedDate=h;this.navigateForward()}else{if(this.selectedDate!=m){this.selectedDate=m;this.navigateForward()}}}else{var h=new Date(b.getFullYear(),w+1,1);if(h<=m){this._selectDate(h,"key")}}return false}return true}if(this.view=="decade"){var o=this._renderStartDate.getFullYear();var k=this._renderEndDate.getFullYear();var n=b.getFullYear();var v=this.getMinDate().getFullYear();var c=this.getMaxDate().getFullYear();switch(A){case 37:if(n-1>=v){if(n<=o){this.selectedDate=new Date(n-1,b.getMonth(),1);this.navigateBackward()}else{this._selectDate(new Date(n-1,b.getMonth(),1),"key")}}return false;case 38:var x=n-4;if(n-4c){x=c}if(x>k){this.selectedDate=new Date(x,b.getMonth(),1);this.navigateForward()}else{this._selectDate(new Date(x,b.getMonth(),1),"key")}return false;case 39:if(n+1<=c){if(n==k){this.selectedDate=new Date(n+1,b.getMonth(),1);this.navigateForward()}else{this._selectDate(new Date(n+1,b.getMonth(),1),"key")}}return false}return true}var u=new a.jqx._jqxDateTimeInput.getDateTime(b);var f=this.getViewStart();var e=this.getViewEnd();var t=u;var s=a.data(this.element,"View"+this.element.id);if(s==undefined||s==null){return true}if(A==36){u._setDay(1);if(this._isDisabled(u.dateTime)){return false}this._selectDate(u.dateTime,"key");return false}if(A==35){var r=this.value._daysInMonth(this.value.year,this.value.month);u._setDay(r);if(this._isDisabled(u.dateTime)){return false}this._selectDate(u.dateTime,"key");return false}var g=1;if(p.ctrlKey){g=12}if(A==34){var z=this.navigateForward(g);if(z){u._addMonths(g);if(this._isDisabled(u.dateTime)){return false}this._selectDate(u.dateTime,"key")}return false}if(A==33){var z=this.navigateBackward(g);if(z){u._addMonths(-g);if(this._isDisabled(u.dateTime)){return false}this._selectDate(u.dateTime,"key")}return false}if(A==38){u._addDays(-7);if(u.dateTimethis.getMaxDate()){return false}if(u.dateTime>e){var z=this.navigateForward();if(!z){return false}}if(this._isDisabled(u.dateTime)){return false}this._selectDate(u.dateTime,"key");for(var q=0;q=u.dateTime){this.value.day=l.getDate();this.navigateForward();this._selectDate(u.dateTime,"key");break}}return false}}if(A==37){u._addDays(-1);if(u.dateTimethis.getMaxDate()){return false}if(this._isDisabled(u.dateTime)){return false}this.navigateBackward();this._selectDate(u.dateTime,"key");break}}return false}else{if(A==39){u._addDays(1);if(u.dateTime>this.getMaxDate()){return false}if(u.dateTime>e){var z=this.navigateForward();if(!z){return false}}if(this._isDisabled(u.dateTime)){return false}this._selectDate(u.dateTime,"key");for(var q=0;q=u.dateTime){if(u.dateTimethis.getMaxDate()){return false}this.navigateForward();this._selectDate(u.dateTime,"key");break}}return false}}return true},render:function(){if(!this.canRender){return}this.host.children().remove();var c=this._renderSingleCalendar("View"+this.element.id);var b=this;this.host.append(c)},addSpecialDate:function(b,c,d){if(this.multipleMonthRows==1&&this.multipleMonthColumns==1){var e=this.specialDates.length;this.specialDates[e]={Date:b,Class:c,Tooltip:d};this.refreshControl()}},refresh:function(c){var b=this;this.render();setTimeout(function(){b.refreshControl()})},invalidate:function(){this.refreshControl()},refreshControl:function(){if(this.multipleMonthRows==1&&this.multipleMonthColumns==1){this.refreshSingleCalendar("View"+this.element.id,null)}},getViewStart:function(){var c=this.getVisibleDate();var b=this.getFirstDayOfWeek(c);return b.dateTime},getViewEnd:function(){var c=this.getViewStart();var b=new a.jqx._jqxDateTimeInput.getDateTime(c);b._addDays(41);return b.dateTime},refreshSingleCalendar:function(e,l){if(!this.canRender){return}var j=this.host.find("#"+e);var f=this.getVisibleDate();var c=this.getFirstDayOfWeek(f);this.refreshCalendarCells(j,c,e);this.refreshTitle(j);this.refreshRowHeader(j,e);if(this.selectedDate!=undefined){this._selectDate(this.selectedDate)}var b=parseInt(this.month.css("padding-top"));var g=this.host.height()-2*b;var k=g-this.titleHeight-this.columnHeaderHeight;if(!this.showDayNames){k=this.month.height()-this.titleHeight}if(this.showFooter){k-=20}var d=j.find("#cellsTable"+e);var i=j.find("#calendarRowHeader"+e);d.height(k);i.height(k)},refreshRowHeader:function(s,m){if(!this.showWeekNumbers){return}var c=this.getVisibleDate();var h=this.getFirstDayOfWeek(c);var n=h.dayOfWeek;var t=this.getWeekOfYear(h);var f=new a.jqx._jqxDateTimeInput.getDateTime(new Date(h.dateTime));f._addDays(5);f.dayOfWeek=f.dateTime.getDay();var k=this.getWeekOfYear(f);var e=this.rowHeader.find("table");e.width(this.rowHeaderWidth);var g=h;var q=new Array();for(var p=0;p<6;p++){var o=t.toString();var b=new a.jqx._jqxCalendar.cell(g.dateTime);var l=p+1+this.element.id;var j=a(e[0].rows[p].cells[0]);b.element=j;b.row=p;b.column=0;var d=j.find("#headerCellContent"+l);d.addClass(this.toThemeProperty("jqx-calendar-row-cell"));d[0].innerHTML=t;q[p]=b;g=new a.jqx._jqxDateTimeInput.getDateTime(new Date(g._addWeeks(1)));t=this.getWeekOfYear(g)}var r=a.data(this.element,s[0].id);r.rowCells=q;this._refreshOtherMonthRows(r,m)},_refreshOtherMonthRows:function(f,e){if(this.showOtherMonthDays){return}this._displayLastRow(true,e);this._displayFirstRow(true,e);var d=false;var g=false;for(var c=0;c=f.cells.length-7){g=true}}}if(!d){this._displayFirstRow(false,e)}if(!g){this._displayLastRow(false,e)}},_displayLastRow:function(b,c){var g=this.host.find("#"+c);var f=g.find("#calendarRowHeader"+g[0].id).find("table");var d=null;if(this.showWeekNumbers){if(f[0].cells){var d=a(f[0].rows[5])}}var e=a(g.find("#cellTable"+g[0].id)[0].rows[5]);if(b){if(this.showWeekNumbers&&d){d.css("display","table-row")}e.css("display","table-row")}else{if(this.showWeekNumbers&&d){d.css("display","none")}e.css("display","none")}},_displayFirstRow:function(b,c){var e=this.host.find("#"+c);var d=e.find("#calendarRowHeader"+e[0].id).find("table");var f=null;if(this.showWeekNumbers){if(d[0].cells){var f=a(d[0].rows[0])}}var g=a(e.find("#cellTable"+e[0].id)[0].rows[0]);if(b){if(this.showWeekNumbers&&f){f.css("display","table-row")}g.css("display","table-row")}else{if(this.showWeekNumbers&&f){f.css("display","none")}g.css("display","none")}},_renderSingleCalendar:function(q,l){if(!this.canRender){return}var n=this.host.find("#"+q.toString());if(n!=null){n.remove()}var v=a("
");var b=this.getVisibleDate();var m=this.getFirstDayOfWeek(b);var e=new a.jqx._jqxDateTimeInput.getDateTime(m.dateTime);e._addMonths(1);var u=a.jqx._jqxCalendar.monthView(m,e,null,null,null,v);if(l==undefined||l==null){this.host.append(v);v[0].style.width="100%";v[0].style.height="100%"}else{l.append(v)}a.data(this.element,q,u);var t=parseInt(v.css("padding-top"));var s=this.host.height()-2*t;var r=s-this.titleHeight-this.columnHeaderHeight;if(!this.showDayNames){r=s-this.titleHeight}if(this.showFooter){r-=20}if(this.rowHeaderWidth<0){this.rowHeaderWidth=0}if(this.columnHeaderHeight<0){this.columnHeaderHeight=0}if(this.titleHeight<0){this.titleHeight=0}var g=this.rowHeaderWidth;var k=this.columnHeaderHeight;if(!this.showWeekNumbers){g=0}if(!this.showDayNames){k=0}var x="
";var c="
";var p="";v[0].innerHTML=x+c+p;this.header=v.find("#calendarHeader");this.header[0].id="calendarHeader"+q;this.header.addClass(this.toThemeProperty("calendar-header"));this.columnHeader=v.find("#calendarColumnHeader");this.columnHeader[0].id="calendarColumnHeader"+q;this.table=v.find("#cellsTable");this.table[0].id="cellsTable"+q;this.rowHeader=v.find("#calendarRowHeader");this.rowHeader[0].id="calendarRowHeader"+q;this.selectCell=v.find("#selectCell");this.selectCell[0].id="selectCell"+q;this.title=v.find("#calendarTitle");this.title[0].id="calendarTitle"+q;this.leftButton=v.find("#leftNavigationArrow");this.leftButton[0].id="leftNavigationArrow"+q;this.titleHeader=v.find("#calendarTitleHeader");this.titleHeader[0].id="calendarTitleHeader"+q;this.rightButton=v.find("#rightNavigationArrow");this.rightButton[0].id="rightNavigationArrow"+q;this.footer=v.find("#calendarFooter");this._footer=v.find("#footer");this._footer[0].id="footer"+q;this.footer[0].id="calendarFooter"+q;this.todayButton=v.find("#todayButton");this.todayButton[0].id="todayButton"+q;this.doneButton=v.find("#doneButton");this.doneButton[0].id="doneButton"+q;this.title.addClass(this.toThemeProperty("jqx-calendar-title-container"));var d=20;if(this.showFooter){this._footer.css("display","block")}v.find("tr").addClass(this.toThemeProperty("jqx-reset"));v.addClass(this.toThemeProperty("jqx-widget-content"));v.addClass(this.toThemeProperty("jqx-calendar-month-container"));this.month=v;this.selectCell.addClass(this.toThemeProperty("jqx-reset"));this.selectCell.addClass(this.toThemeProperty("jqx-calendar-top-left-header"));if(this.showWeekNumbers){this._renderRowHeader(v)}else{this.table[0].colSpan=3;this.columnHeader[0].colSpan=3;this.rowHeader.css("display","none");this.selectCell.css("display","none")}if(this.showFooter){this.footer.height(20);var j=a(""+this.todayString+"");j.appendTo(this.todayButton);var i=a(""+this.clearString+"");i.appendTo(this.doneButton);i.addClass(this.toThemeProperty("jqx-calendar-footer"));j.addClass(this.toThemeProperty("jqx-calendar-footer"));var o=this;var f="mousedown";if(a.jqx.mobile.isTouchDevice()){f=a.jqx.mobile.getTouchEventName("touchstart")}this.addHandler(j,f,function(){if(o.today){o.today()}else{o.setDate(new Date(),"mouse")}return false});this.addHandler(i,f,function(){if(o.clear){o.clear()}else{o.setDate(null,"mouse")}return false})}if(this.view!="month"){this.header.hide()}if(this.showDayNames&&this.view=="month"){this.renderColumnHeader(v)}this.oldView=this.view;this.renderCalendarCells(v,m,q);if(l==undefined||l==null){this.renderTitle(v)}this._refreshOtherMonthRows(u,q);v.find("tbody").css({border:"none",background:"transparent"});if(this.selectedDate!=undefined){this._selectDate(this.selectedDate)}var w=this;this.addHandler(this.host,"focus",function(){w.focus()});return v},_getTitleFormat:function(){switch(this.view){case"month":return this.titleFormat[0];case"year":return this.titleFormat[1];case"decade":return this.titleFormat[2];case"centuries":return this.titleFormat[3]}},renderTitle:function(t){var k=a("
");var l=a("
");var o=this.title;o.addClass(this.toThemeProperty("jqx-reset"));o.addClass(this.toThemeProperty("jqx-widget-header"));o.addClass(this.toThemeProperty("jqx-calendar-title-header"));var e=o.find("td");if(a.jqx.browser.msie&&a.jqx.browser.version<8){if(e.css("background-color")!="transparent"){var g=o.css("background-color");e.css("background-color",g)}if(e.css("background-image")!="transparent"){var d=o.css("background-image");var p=o.css("background-repeat");var c=o.css("background-position");e.css("background-image",d);e.css("background-repeat",p);e.css("background-position","left center scroll")}}else{e.css("background-color","transparent")}if(this.disabled){o.addClass(this.toThemeProperty("jqx-calendar-title-header-disabled"))}k.addClass(this.toThemeProperty("jqx-calendar-title-navigation"));k.addClass(this.toThemeProperty("jqx-icon-arrow-left"));k.appendTo(this.leftButton);var m=this.leftButton;l.addClass(this.toThemeProperty("jqx-calendar-title-navigation"));l.addClass(this.toThemeProperty("jqx-icon-arrow-right"));l.appendTo(this.rightButton);var b=this.rightButton;if(this.enableTooltips){if(a(m).jqxTooltip){a(m).jqxTooltip({name:this.element.id,position:"mouse",theme:this.theme,content:this.backText});a(b).jqxTooltip({name:this.element.id,position:"mouse",theme:this.theme,content:this.forwardText})}}var n=this.titleHeader;var v=this._format(this.value.dateTime,this._getTitleFormat(),this.culture);if(this.view=="decade"){var q=this._format(this._renderStartDate,this._getTitleFormat(),this.culture);var j=this._format(this._renderEndDate,this._getTitleFormat(),this.culture);v=q+" - "+j}else{if(this.view=="centuries"){var q=this._format(this._renderCenturyStartDate,this._getTitleFormat(),this.culture);var j=this._format(this._renderCenturyEndDate,this._getTitleFormat(),this.culture);v=q+" - "+j}}var f=a("
"+v+"
");n.append(f);f.addClass(this.toThemeProperty("jqx-calendar-title-content"));var s=parseInt(k.width());var i=t.width()-2*s;var r=n.find(".jqx-calendar-title-content").width(i);a.data(k,"navigateLeft",this);a.data(l,"navigateRight",this);var h=a.jqx.mobile.isTouchDevice();if(!this.disabled){var u=this;this.addHandler(n,"mousedown",function(A){if(u.enableViews){if(!u._viewAnimating&&!u._animating){var x=u.view;u.oldView=x;switch(u.view){case"month":u.view="year";break;case"year":u.view="decade";break}if(u.views.indexOf("year")==-1&&u.view=="year"){u.view="decade"}if(u.views.indexOf("decade")==-1&&u.view=="decade"){u.view=x}if(x!=u.view){var z="View"+u.element.id;var B=u.host.find("#"+z);var y=u.getVisibleDate();var w=u.getFirstDayOfWeek(y);u.renderCalendarCells(B,w,z,true);u.refreshTitle(B);u._raiseEvent("8")}}return false}});this.addHandler(k,"mousedown",function(x){if(!u._animating){a.data(k,"navigateLeftRepeat",true);var w=a.data(k,"navigateLeft");if(w.enableFastNavigation&&!h){w.startRepeat(w,k,true,u.navigationDelay+200)}w.navigateBackward(u.stepMonths,"arrow");x.stopPropagation();x.preventDefault();return w._raiseEvent(0,x)}else{return false}});this.addHandler(k,"mouseup",function(w){a.data(k,"navigateLeftRepeat",false)});this.addHandler(k,"mouseleave",function(w){a.data(k,"navigateLeftRepeat",false)});this.addHandler(l,"mousedown",function(x){if(!u._animating){a.data(l,"navigateRightRepeat",true);var w=a.data(l,"navigateRight");if(w.enableFastNavigation&&!h){w.startRepeat(w,l,false,u.navigationDelay+200)}w.navigateForward(u.stepMonths,"arrow");x.stopPropagation();x.preventDefault();return w._raiseEvent(1,x)}else{return false}});this.addHandler(l,"mouseup",function(w){a.data(l,"navigateRightRepeat",false)});this.addHandler(l,"mouseleave",function(w){a.data(l,"navigateRightRepeat",false)})}},refreshTitle:function(f){var g=this._format(this.value.dateTime,this._getTitleFormat(),this.culture);if(this.view=="decade"){var d=this._format(this._renderStartDate,this._getTitleFormat(),this.culture);var b=this._format(this._renderEndDate,this._getTitleFormat(),this.culture);g=d+" - "+b}else{if(this.view=="centuries"){var d=this._format(this._renderCenturyStartDate,this._getTitleFormat(),this.culture);var b=this._format(this._renderCenturyEndDate,this._getTitleFormat(),this.culture);g=d+" - "+b}}var e=this.titleHeader;if(this.titleHeader){var c=e.find(".jqx-calendar-title-content");var h=a("
"+g+"
");e.append(h);h.addClass(this.toThemeProperty("jqx-calendar-title-content"));if(c!=null){c.remove()}}},startRepeat:function(d,b,f,e){var c=window.setTimeout(function(){var g=a.data(b,"navigateLeftRepeat");if(!f){g=a.data(b,"navigateRightRepeat")}if(g){if(e<25){e=25}if(f){d.navigateBackward(1,"arrow");d.startRepeat(d,b,true,e)}else{d.navigateForward(1,"arrow");c=d.startRepeat(d,b,false,e)}}else{window.clearTimeout(c);return}},e)},navigateForward:function(h,g){if(h==undefined||h==null){h=this.stepMonths}var f=this.value.year;if(this.view=="decade"){f=this._renderStartDate.getFullYear()+12;if(this._renderEndDate.getFullYear()>=this.getMaxDate().getFullYear()){return}}else{if(this.view=="year"){f=this.value.year+1}else{if(this.view=="centuries"){f=this.value.year+100}}}if(this.view!="month"){var b=this.getMaxDate().getFullYear();if(bb){f=b}if(this.value.year==f){if(this.view==="decade"){if(this.value.year>this._renderEndDate.getFullYear()){this.value.year=f;this.value.month=1;this.value.day=1}else{return}}else{return}}this.value.year=f;this.value.month=1;this.value.day=1}var c=this.value.day;var i=this.value.month;if(i+h<=12){var e=this.value._daysInMonth(this.value.year,this.value.month+h);if(c>e){c=e}}if(this.view=="month"){var d=new Date(this.value.year,this.value.month-1+h,c);if(g=="arrow"&&this.selectableDays.length==7&&this.selectionMode!="range"){this.selectedDate=new Date(this.value.year,this.value.month-1+h,1)}}else{var d=new Date(this.value.year,this.value.month-1,c)}return this.navigateTo(d)},navigateBackward:function(g,f){if(g==undefined||g==null){g=this.stepMonths}var e=this.value.year;if(this.view=="decade"){e=this._renderStartDate.getFullYear()-12}else{if(this.view=="year"){e=this.value.year-1}else{if(this.view=="centuries"){e=this.value.year-100}}}if(this.view!="month"){var i=this.getMinDate().getFullYear();if(e=1){var d=this.value._daysInMonth(this.value.year,this.value.month-g);if(b>d){b=d}}if(this.view=="month"){var c=new Date(this.value.year,this.value.month-1-g,b);if(f=="arrow"&&this.selectableDays.length==7&&this.selectionMode!="range"){this.selectedDate=new Date(this.value.year,this.value.month-1-g,1)}}else{var c=new Date(this.value.year,this.value.month-1,b)}return this.navigateTo(c)},_isRestrictedRange:function(d,c){if(d>c){return true}var b=d;while(b.valueOf()<=c.valueOf()){if(this._isRestrictedDate(b)){return true}b.setDate(b.getDate()+1)}return false},_hasUnrestrictedRanges:function(d,c){if(d>c){return false}var b=d;while(b.valueOf()<=c.valueOf()){if(!this._isRestrictedDate(b)){return true}b.setDate(b.getDate()+1)}return false},_getNextUnrestrictedDay:function(d,c){if(d>c){return null}var b=d;while(b.valueOf()<=c.valueOf()){if(!this._isRestrictedDate(b)){return b}b.setDate(b.getDate()+1)}return null},_isRestrictedDate:function(d){var c=this;if(!a.isArray(c.restrictedDates)){return false}for(var g=0;g=f.valueOf()&&d.valueOf()<=e.valueOf()){return true}}else{if(b.getMonth()==d.getMonth()&&b.getDate()==d.getDate()&&b.getFullYear()==d.getFullYear()){return true}}}return false},_isDisabled:function(d){var e=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var b=d.getDay();var c=e[b];if(this.selectableDays.indexOf(c)==-1){return true}if(this._isRestrictedDate(d)){return true}return false},refreshCalendarCells:function(x,f,m){if(this.view=="year"||this.view=="decade"||this.view=="centuries"){this.refreshViews(x,f,m);return}var s=this.table;var q=s.find("#cellTable"+m.toString());var e=f;var c=new Array();var n=0;var u=new a.jqx._jqxDateTimeInput.getDateTime(new Date());for(var p=0;p<6;p++){for(var o=0;o<7;o++){var d=p+1;var h=o;if(this.rtl){h=6-h}var t=h+1;var l="#cell"+d+t+this.element.id;var w=new Date(e.dateTime.getFullYear(),e.dateTime.getMonth(),e.dateTime.getDate());var b=new a.jqx._jqxCalendar.cell(w);var g=a(q[0].rows[p].cells[t-1]);g[0].id=l.substring(1);b.element=g;b.row=p;b.column=o;b.isVisible=true;b.isOtherMonth=false;b.isToday=false;b.isWeekend=false;b.isHighlighted=false;b.isSelected=false;if(e.month!=this.value.month){b.isOtherMonth=true;b.isVisible=this.showOtherMonthDays}if(this._isRestrictedDate(w)){b.isRestricted=true;b.isDisabled=true}if(!b.isDisabled){if(wthis.getMaxDate()||this._isDisabled(w)){b.isDisabled=true}}if(e.month==u.month&&e.day==u.day&&e.year==u.year){b.isToday=true}if(e.isWeekend()){b.isWeekend=true}a.data(this.element,"cellContent"+l.substring(1),b);a.data(this.element,l.substring(1),b);c[n]=b;n++;a.jqx.utilities.html(g,e.day);this._applyCellStyle(b,g,g);e=new a.jqx._jqxDateTimeInput.getDateTime(new Date(e._addDays(1)))}}var v=a.data(this.element,x[0].id);if(v!=undefined&&v!=null){v.cells=c}this.renderedCells=c;this._refreshOtherMonthRows(v,m)},_getDecadeAndCenturiesData:function(){var k=new Array();var p=new Array();var c=this.getMaxDate().getFullYear()-this.getMinDate().getFullYear();if(c<12){c=12}var f=this.getMinDate();var b=this.getMaxDate();var l=this.value.dateTime.getFullYear();if(this.view=="decade"){if(l+12>b.getFullYear()){l=b.getFullYear()-11}if(l=f.getFullYear()&&n.getFullYear()<=b.getFullYear()){k.push("-"+n.getFullYear()+"-"+(n.getFullYear()+9));p.push(n);if(e==0){this._renderCenturyStartDate=n}this._renderCenturyEndDate=new Date(n.getFullYear()+9,0,1)}}break}}}}return{years:k,dates:p}},refreshViews:function(A,m,s){var B=this;var c=new Array();var w=A.find("#cellTable"+s.toString());var D=this._getDecadeAndCenturiesData();var l=D.years;var C=D.dates;var t=0;var f=this.getMinDate();var n=this.getMaxDate();for(var v=0;v<3;v++){for(var u=0;u<4;u++){var d=v+1;var q=u;if(this.rtl){q=3-q}var x=q+1;var z=new Date(this.value.dateTime);z.setDate(1);z.setMonth(v*4+q);var b=new a.jqx._jqxCalendar.cell(z);var e=w[0].rows["row"+(1+v)+this.element.id];var o=a(e.cells[u]);b.isSelected=false;b.isVisible=true;b.element=o;b.row=v;b.column=u;b.index=c.length;var p="";if(this.view=="year"){var h=this.localization.calendar.months.names;var g=h[v*4+q];switch(this.monthNameFormat){case"default":g=this.localization.calendar.months.namesAbbr[v*4+q];break;case"shortest":g=this.localization.calendar.months.namesShort[v*4+q];break;case"firstTwoLetters":g=g.substring(0,2);break;case"firstLetter":g=g.substring(0,1);break}p=g}else{if(this.view=="decade"||this.view=="centuries"){p=l[v*4+q];if(undefined==p){p="2013"}b.setDate(C[v*4+q])}}var z=b.getDate();if(this.view=="year"){if(z.getMonth()==this.getDate().getMonth()&&z.getFullYear()==this.getDate().getFullYear()){b.isSelected=true}}else{if(z.getFullYear()==this.getDate().getFullYear()){b.isSelected=true}}if(this.view=="year"){if(this._getYearAndMonthPart(z)this._getYearAndMonthPart(n)){b.isDisabled=true}}else{if(z.getFullYear()n.getFullYear()){b.isDisabled=true}}a.jqx.utilities.html(o,p);c[t]=b;t++}}var y=a.data(this.element,A[0].id);if(y!=undefined&&y!=null){y.cells=c}this.renderedCells=c;this._applyCellStyles()},_createViewClone:function(){var b=this.host.find(".jqx-calendar-month");var c=b.clone();c.css("position","absolute");c.css("top",b.position().top);c.width(this.month.width());return c},_addCellsTable:function(h,g){var e=this;var c=this.showFooter?20:0;if(this.view!="month"){g.height(this.month.height()-this.titleHeight)}else{g.height(this.month.height()-this.titleHeight-this.columnHeaderHeight-c)}this._viewAnimating=true;var b=this.host.find(".jqx-calendar-month-container");b.css("position","relative");var d=this.host.find(".jqx-calendar-month");var f=this._createViewClone();b.append(f);if(this.view!="month"){this.header.fadeOut(0);if(this.showWeekNumbers){this.rowHeader.fadeOut(0)}if(this.showFooter){this._footer.fadeOut(0)}}else{this.header.fadeIn(this.navigationDelay+200);if(this.showWeekNumbers){this.rowHeader.fadeIn(this.navigationDelay+200)}if(this.showFooter){this._footer.fadeIn(this.navigationDelay+200)}}h.children().remove();h.append(g);this._animateViews(f,g,function(){if(!e.selectedDate&&e.selectionMode!="range"){e.selectedDate=e.renderedCells[0].getDate()}try{e.renderedCells[0].element.focus();setTimeout(function(){e.renderedCells[0].element.focus()},10)}catch(i){}e._viewAnimating=false});g.addClass(this.toThemeProperty("jqx-calendar-view"))},_animateViews:function(c,b,e){var d=this;d._viewAnimating=true;if(d.oldView==d.view){c.remove();b.fadeOut(0);b.fadeIn(0);e();return}c.fadeOut(this.navigationDelay+100,function(){c.remove()});b.fadeOut(0);b.fadeIn(this.navigationDelay+200,function(){e()})},focus:function(){if(this.disabled){return}try{if(this.renderedCells&&this.renderedCells.length>0){var d=this;var c=false;if(!d.selectedDate&&d.selectionMode!="range"){this.setDate(new Date(),"mouse")}this.element.focus()}}catch(b){}},renderViews:function(E,n,v){var F=this;var e=new Array();var z=a("
");var q=this.host.find(".jqx-calendar-month-container");q.css("position","relative");var A=E.find("#cellsTable"+E[0].id);A[0].style.borderColor="transparent";var I=this._getDecadeAndCenturiesData();var m=I.years;var H=I.dates;var w=0;var g=this.getMinDate();var o=this.getMaxDate();var t=new Date(this.value.dateTime);t.setDate(1);for(var y=0;y<3;y++){for(var x=0;x<4;x++){var d=y+1;var u=x;if(this.rtl){u=3-u}var B=u+1;var f=z[0].rows["row"+(1+y)+this.element.id];var D=new Date(t);D.setMonth(y*4+u);var c=new a.jqx._jqxCalendar.cell(D);var p=a(f.cells[x]);c.isVisible=true;c.element=p;c.row=y;c.column=x;c.index=e.length;c.isSelected=false;var s="";if(this.view=="year"){if(D.getMonth()==this.getDate().getMonth()&&D.getFullYear()==this.getDate().getFullYear()){c.isSelected=true}var l=this.localization.calendar.months.names;var h=l[y*4+u];switch(this.monthNameFormat){case"default":h=this.localization.calendar.months.namesAbbr[y*4+u];break;case"shortest":h=this.localization.calendar.months.namesShort[y*4+u];break;case"firstTwoLetters":h=h.substring(0,2);break;case"firstLetter":h=h.substring(0,1);break}s=h}else{if(this.view=="decade"||this.view=="centuries"){s=m[y*4+u];c.setDate(H[y*4+u]);if(c.getDate().getFullYear()==this.getDate().getFullYear()){c.isSelected=true}if(undefined==s){s="2013"}}}var D=c.getDate();if(this.view=="year"){var b=new Date(D);b.setDate(1);b.setHours(0,0,0,0);b.setMonth(D.getMonth()+1);b=new Date(b.valueOf()-1);if(this._getYearAndMonthPart(D)this._getYearAndMonthPart(o)||!this._hasUnrestrictedRanges(D,b)){c.isDisabled=true}}else{var G=new Date(D);G.setMonth(0);G.setDate(1);G.setHours(0,0,0,0);G.setFullYear(D.getFullYear()+1);G=new Date(G.valueOf()-1);if(D.getFullYear()o.getFullYear()||!this._hasUnrestrictedRanges(D,G)){c.isDisabled=true}}a.jqx.utilities.html(p,s);e[w]=c;w++}}a.each(e,function(){var j=this.element;var i=this;if(!F.disabled){F.addHandler(j,"mousedown",function(k){F._setDateAndSwitchViews(i,k,"mouse")});F.addHandler(j,"mouseover",function(r){var k=F.renderedCells[i.index];if(F.view!="centuries"&&k.element.html().toLowerCase().indexOf("span")!=-1){return}k.isHighlighted=true;F._applyCellStyle(k,k.element,k.element)});F.addHandler(j,"mouseout",function(r){var k=F.renderedCells[i.index];if(F.view!="centuries"&&k.element.html().toLowerCase().indexOf("span")!=-1){return}k.isHighlighted=false;F._applyCellStyle(k,k.element,k.element)})}});var C=a.data(this.element,E[0].id);if(C!=undefined&&C!=null){C.cells=e}this.renderedCells=e;this._addCellsTable(A,z);this._applyCellStyles()},_setDateAndSwitchViews:function(m,d,j){if(!this._viewAnimating&&!this._animating){var g=this.getDate();var e=this.renderedCells[m.index].getDate();var k=this.value.dateTime.getDate();var l=new Date(e);if(this.views.indexOf("month")!=-1){l.setDate(k)}else{l.setDate(1);e.setDate(1)}if(l.getMonth()==e.getMonth()){e=l}var i=this.getMinDate();var c=this.getMaxDate();if(this.view=="year"){if(this._getYearAndMonthPart(e)this._getYearAndMonthPart(c)){return}}else{if(e.getFullYear()c.getFullYear()){return}}if(this.selectionMode!="range"){this._selectDate(e,j)}this.oldView=this.view;switch(this.view){case"year":this.view="month";break;case"decade":this.view="year";break}if(this.views.indexOf("month")==-1){this.view="year"}if(this.views.indexOf("year")==-1){this.view="decade"}if(this.view=="year"){if(this._getYearAndMonthPart(e)this._getYearAndMonthPart(c)){e=c}}else{if(e.getFullYear()c.getFullYear()){e=c}}if(this.changing&&(this.selectedDate&&(this.selectedDate.getFullYear()!=e.getFullYear()||this.selectedDate.getMonth()!=e.getMonth()||this.selectedDate.getDate()!=e.getDate()))){e=this.selectedDate}this.value._setYear(e.getFullYear());this.value._setDay(e.getDate());this.value._setMonth(e.getMonth()+1);this.value._setDay(e.getDate());var h=this.getVisibleDate();var b=this.getFirstDayOfWeek(h);var f="View"+this.element.id;this.renderCalendarCells(this.month,b,f,true);this.refreshTitle(this.month);if(this.showWeekNumbers){this.refreshRowHeader(this.month,f)}if(this.views.length==3){if(this.view=="month"){if(this.selectionMode!="range"){this._selectDate(this.selectedDate,"view")}else{var n=this;a.each(this.renderedCells,function(r){var o=this;var t=o.getDate();var p=a(o.element);var q=p;if(p.length==0){return false}var s=function(v){if(v==null){return new Date()}var u=new Date();u.setHours(0,0,0,0);u.setFullYear(v.getFullYear(),v.getMonth(),v.getDate());return u};if(!o.isOtherMonth&&s(t).toString()==s(e).toString()){n.value._setMonth(e.getMonth()+1);n.value._setDay(e.getDate());n.value._setYear(e.getFullYear())}o.isSelected=false;o.isDisabled=false;if(s(t)t){o.isDisabled=true}if(n._isDisabled(t)){o.isDisabled=true}if(!o.isDisabled){if(s(t)>=s(n.selection.from)&&s(t)<=s(n.selection.to)){o.isSelected=true}}});this._applyCellStyles()}}}if(this.view!="month"){if(this.oldView=="year"||(this.views.indexOf("year")==-1&&this.view=="decade")){if(j!="keyboard"){this._raiseEvent("3")}this._raiseEvent("5",{selectionType:"mouse"})}}this._raiseEvent("8")}},renderCalendarCells:function(D,m,s,q){if(this.view=="year"||this.view=="decade"||this.view=="centuries"){this.renderViews(D,m,s);return}var x=a("
");var y=this.table;y[0].style.borderColor="transparent";if(q==undefined){var g=y.find("#cellTable"+s.toString());if(g!=null){g.remove()}y.append(x)}var l=m;var b=this.showDayNames?1:0;var f=this.showWeekNumbers?1:0;var d=new Array();var t=0;var v=(D.width()-this.rowHeaderWidth-2)/7;if(!this.showWeekNumbers){v=(D.width()-2)/7}v=parseInt(v);var A=new a.jqx._jqxDateTimeInput.getDateTime(new Date());for(var w=0;w<6;w++){for(var u=0;u<7;u++){var e=w+1;var o=u;if(this.rtl){o=6-o}var z=o+1;var p="#cell"+e+z+this.element.id;var C=new Date(l.dateTime.getFullYear(),l.dateTime.getMonth(),l.dateTime.getDate());var c=new a.jqx._jqxCalendar.cell(C);var n=a(x[0].rows[w].cells[z-1]);n[0].id=p.substring(1);c.isVisible=true;c.isDisabled=false;if(l.month!=this.value.month){c.isOtherMonth=true;c.isVisible=this.showOtherMonthDays}if(this._isRestrictedDate(C)){c.isRestricted=true;c.isDisabled=true}if(!c.isDisabled){if(Cthis.getMaxDate()||this._isDisabled(C)){c.isDisabled=true}}if(l.month==A.month&&l.day==A.day&&l.year==A.year){c.isToday=true}if(l.isWeekend()){c.isWeekend=true}c.element=n;c.row=b;c.column=f;a.jqx.utilities.html(n,l.day);l=new a.jqx._jqxDateTimeInput.getDateTime(new Date(l._addDays(1)));a.data(this.element,"cellContent"+p.substring(1),c);a.data(this.element,""+p.substring(1),c);var E=this;if(E.isMaterialized()){a(n).addClass("ripple");a.jqx.ripple(a(n))}this.addHandler(n,"mousedown",function(I){if(!E.readOnly&&!E.disabled){var H=a(I.target);var j=a.data(E.element,H[0].id);var i=E._raiseEvent(3,I);if(j!=null&&j!=undefined){var r=j.getDate();if(E.getMinDate()<=r&&r<=E.getMaxDate()){if(!j.isDisabled){if(j.isOtherMonth&&E.enableAutoNavigation){if(j.row<2){E.navigateBackward()}else{E.navigateForward()}E._selectDate(j.getDate(),"mouse",I.shiftKey)}else{var F=new Date(E.getDate());E._selectDate(j.getDate(),"mouse",I.shiftKey);E.value._setYear(r.getFullYear());E.value._setDay(1);E.value._setMonth(r.getMonth()+1);E.value._setDay(r.getDate());var G=E.host.find(".jqx-calendar-month");G.stop();G.css("margin-left","0px");var k=E.getDate();E._raiseEvent("2");if(j.isOtherMonth){E._raiseEvent("5",{selectionType:"mouse"})}}}}}return false}});if(!E.disabled){var h=function(F,j){if(!E.readOnly){var r=a(F.target);var i=a.data(E.element,r[0].id);if(i!=null&&i!=undefined){var k=i.getDate();if(E.getMinDate()<=k&&k<=E.getMaxDate()){i.isHighlighted=j;E._applyCellStyle(i,i.element,r)}}}};this.addHandler(n,"mouseenter",function(i){h(i,true);return false});this.addHandler(n,"mouseleave",function(i){h(i,false);return false})}f++;d[t]=c;t++}f=0;b++}var B=a.data(this.element,D[0].id);if(B!=undefined&&B!=null){B.cells=d}this.renderedCells=d;if(q!=undefined){this._addCellsTable(y,x)}this._applyCellStyles();this._refreshOtherMonthRows(B,s)},setMaxDate:function(b,c){if(b!=null&&typeof(b)=="string"){b=new Date(b);if(b=="Invalid Date"){return}}this.maxDate=a.jqx._jqxDateTimeInput.getDateTime(b);if(c!==false){this.render()}},getMaxDate:function(){if(this.maxDate!=null&&this.maxDate!=undefined){return this.maxDate.dateTime}return null},setMinDate:function(b,c){if(b!=null&&typeof(b)=="string"){b=new Date(b);if(b=="Invalid Date"){return}}this.minDate=a.jqx._jqxDateTimeInput.getDateTime(b);if(c!==false){this.render()}},getMinDate:function(){if(this.minDate!=null&&this.minDate!=undefined){return this.minDate.dateTime}return null},navigateTo:function(g,i){if(this.view=="month"){var h=this.getMinDate();var d=new Date(this.getMaxDate().getFullYear(),this.getMaxDate().getMonth()+1,this.getMaxDate().getDate());if((gthis._getYearAndMonthPart(d))){return false}}else{if(g&&(g.getFullYear()this.getMaxDate().getFullYear())){return false}}if(g==null){return false}if(i==undefined){var j=this;if(this._animating){return}this._animating=true;var e=this.host.find(".jqx-calendar-month-container");var k=a("
");k[0].style.width="100%";k[0].style.height="100%";k[0].style.overflow="hidden";k[0].style.position="relative";k[0].style.left="0px";k[0].style.top="-100%";e.append(k);if(this._viewClone){this._viewClone.stop();this._viewClone.remove()}if(this._newViewClone){this._newViewClone.stop();this._newViewClone.remove()}var m=this.host.find(".jqx-calendar-month");m.stop();m.css("margin-left","0px");var b=m.clone();this._viewClone=b;var l=new Date(this.value.dateTime);this.value._setYear(g.getFullYear());this.value._setDay(g.getDate());this.value._setMonth(g.getMonth()+1);var c=parseInt(this.month.css("padding-top"));j.refreshControl();k.css("overflow","hidden");e.css("position","relative");e.css("overflow","hidden");b.css("position","absolute");b.css("top",m.position().top-c);k.append(b);if(a.jqx.browser.msie&&a.jqx.browser.version<8){this.month.css("position","relative");this.month.css("overflow","hidden");this.table.css("position","relative");this.table.css("overflow","hidden")}var f=-this.month.width();if(go){w.isDisabled=true}if(k._isRestrictedDate(o)){w.isDisabled=true;w.isRestricted=true}if(!w.isDisabled&&k._isDisabled(o)){w.isDisabled=true}k._applyCellStyle(w,v,l);return true}if(r==0){if(g!="none"){if(k._clicks==undefined){k._clicks=0}k._clicks++;if(c){k._clicks++}if(k._clicks==1){k.selection={from:d,to:d}}else{var u=k.selection.from;var q=u<=d?u:d;var t=u<=d?d:u;if(q){var m=new Date(q.getFullYear(),q.getMonth(),q.getDate())}if(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59)}k.selection={from:m,to:n};k._clicks=0}}else{if(k.selection==null||k.selection.from==null){k.selection={from:d,to:d};if(k._clicks==undefined){k._clicks=0}k._clicks++;if(k._clicks==2){k._clicks=0}}}}var p=function(y){if(y==null){return new Date()}var x=new Date();x.setHours(0,0,0,0);x.setFullYear(y.getFullYear(),y.getMonth(),y.getDate());return x};if(!w.isOtherMonth&&p(o).toString()==p(d).toString()){k.value._setMonth(d.getMonth()+1);k.value._setDay(d.getDate());k.value._setYear(d.getFullYear());k._raiseEvent("2");k._raiseEvent("5",{selectionType:g})}w.isSelected=false;w.isDisabled=h;if(p(o)o){w.isDisabled=true}if(k._isRestrictedDate(o)){w.isRestricted=true;w.isDisabled=true}if(!w.isDisabled&&k._isDisabled(o)){w.isDisabled=true}if(!w.isDisabled){if(p(o)>=p(k.selection.from)&&p(o)<=p(k.selection.to)){w.isSelected=true}}else{if(!k.allowRestrictedDaysInRange&&p(o)>=p(k.selection.from)&&k.selection.to==k.selection.from){h=true}}}}}k._applyCellStyle(w,v,l)});if(k.selectionMode=="range"&&k._clicks==0){k._raiseEvent(7,{selectionType:g});return}else{if(k.selectionMode=="range"){return}}if(e!=d){k._raiseEvent(7,{selectionType:g});if(this.change){this.change(d)}}},_getSelectedDate:function(){var d=a.data(this.element,"View"+this.element.id);if(d==undefined||d==null){return}if(this.view!="month"){return this.selectedDate}for(var c=0;c0&&g.html().toLowerCase().indexOf("span")!=-1){g.css("cursor","default")}}}g.removeAttr("aria-selected");if(c.isSelected&&c.isVisible){b+=" "+this.toThemeProperty("jqx-calendar-cell-selected");b+=" "+this.toThemeProperty("jqx-fill-state-pressed");g.attr("aria-selected",true);this.host.removeAttr("aria-activedescendant").attr("aria-activedescendant",g[0].id);var f=c.getDate();if(this._isDisabled(f)){b+=" "+this.toThemeProperty("jqx-calendar-cell-selected-invalid")}}if(c.isHighlighted&&c.isVisible&&this.enableHover){if(!c.isDisabled){b+=" "+this.toThemeProperty("jqx-calendar-cell-hover");b+=" "+this.toThemeProperty("jqx-fill-state-hover")}}b+=" "+this.toThemeProperty("jqx-calendar-cell-"+this.view);if(c.isToday&&c.isVisible){b+=" "+this.toThemeProperty("jqx-calendar-cell-today")}g[0].className=b;if(this.specialDates.length>0){var h=this;a.each(this.specialDates,function(){if(this.Class!=undefined&&this.Class!=null&&this.Class!=""){g.removeClass(this.Class)}else{g.removeClass(e.toThemeProperty("jqx-calendar-cell-specialDate"))}var i=c.getDate();if(i.getFullYear()==this.Date.getFullYear()&&i.getMonth()==this.Date.getMonth()&&i.getDate()==this.Date.getDate()){if(c.tooltip==null&&this.Tooltip!=null){c.tooltip=this.Tooltip;if(a(g).jqxTooltip){var j=this.Class;a(g).jqxTooltip({value:{cell:c,specialDate:this.Date},name:h.element.id,content:this.Tooltip,position:"mouse",theme:h.theme,opening:function(k){if(g.hasClass(e.toThemeProperty("jqx-calendar-cell-specialDate"))){return true}if(g.hasClass(j)){return true}return false}})}}g.removeClass(e.toThemeProperty("jqx-calendar-cell-othermonth"));g.removeClass(e.toThemeProperty("jqx-calendar-cell-weekend"));if(this.Class==undefined||this.Class==""){g.addClass(e.toThemeProperty("jqx-calendar-cell-specialDate"));return false}else{g.addClass(this.Class);return false}}})}},_applyCellStyles:function(){var f=a.data(this.element,"View"+this.element.id);if(f==undefined||f==null){return}for(var e=0;e=0?i:i+7);var c=Math.floor((j.getTime()-e.getTime()-(j.getTimezoneOffset()-e.getTimezoneOffset())*60000)/86400000)+1;var f;if(i<4){f=Math.floor((c+i-1)/7)+1;if(f>52){var g=new Date(j.getFullYear()+1,0,1);var b=g.getDay()-h;b=b>=0?b:b+7;f=b<4?1:53}}else{f=Math.floor((c+i-1)/7)}return f},renderColumnHeader:function(w){if(!this.showDayNames){return}var t=a("
");t.find("table").addClass(this.toThemeProperty("jqx-reset"));t.find("tr").addClass(this.toThemeProperty("jqx-reset"));t.find("td").css({background:"transparent",padding:1,margin:0,border:"none"});t.addClass(this.toThemeProperty("jqx-reset"));t.addClass(this.toThemeProperty("jqx-widget-content"));t.addClass(this.toThemeProperty("jqx-calendar-column-header"));this.columnHeader.append(t);var d=this.getVisibleDate();var h=this.getFirstDayOfWeek(d);var m=h.dayOfWeek;var x=this.getWeekOfYear(h);var q=this.firstDayOfWeek;var v=this.localization.calendar.days.names;var n=new Array();var g=h;var o=(w.width()-this.rowHeaderWidth-2)/7;if(!this.showWeekNumbers){o=(w.width()-2)/7}for(var s=0;s<7;s++){var f=v[q];if(this.rtl){f=v[6-q]}switch(this.dayNameFormat){case"default":f=this.localization.calendar.days.namesAbbr[q];if(this.rtl){f=this.localization.calendar.days.namesAbbr[6-q]}break;case"shortest":f=this.localization.calendar.days.namesShort[q];if(this.rtl){f=this.localization.calendar.days.namesShort[6-q]}break;case"firstTwoLetters":f=f.substring(0,2);break;case"firstLetter":f=f.substring(0,1);break}var b=new a.jqx._jqxCalendar.cell(g.dateTime);var k=s+1;var l=k+this.element.id;var j=a(t[0].rows[0].cells[s]);var p=s;if(this.enableTooltips){if(a(j).jqxTooltip){a(j).jqxTooltip({name:this.element.id,content:v[q],theme:this.theme,position:"mouse"})}}if(q>=6){q=0}else{q++}s=p;b.element=j;b.row=0;b.column=s+1;var e=this._textwidth(f);var c="
"+f+"
";j.append(c);j.find("#columnCell"+l).addClass(this.toThemeProperty("jqx-calendar-column-cell"));j.width(o);if(this.disabled){j.find("#columnCell"+l).addClass(this.toThemeProperty("jqx-calendar-column-cell-disabled"))}if(e>0&&o>0){while(e>j.width()){if(f.length==0){break}f=f.substring(0,f.length-1);a.jqx.utilities.html(j.find("#columnCell"+l),f);e=this._textwidth(f)}}n[s]=b;g=new a.jqx._jqxDateTimeInput.getDateTime(new Date(g._addDays(1)))}if(parseInt(this.columnHeader.width())>parseInt(this.month.width())){this.columnHeader.width(this.month.width())}var u=a.data(this.element,w[0].id);u.columnCells=n},_format:function(d,e,b){var f=false;try{if(window.Globalize!=undefined){f=true}else{if(document.Globalize){window.Globalize=document.Globalize;f=true}}}catch(c){if(document.Globalize){window.Globalize=document.Globalize;f=true}}if(document.Globalize){window.Globalize=document.Globalize;f=true}if(a.global){a.global.culture.calendar=this.localization.calendar;return a.global.format(d,e,this.culture)}else{if(f){try{if(window.Globalize.cultures[this.culture]){window.Globalize.cultures[this.culture].calendar=this.localization.calendar;return window.Globalize.format(d,e,this.culture)}else{return window.Globalize.format(d,e,this.culture)}}catch(c){return window.Globalize.format(d,e)}}else{if(a.jqx.dataFormat){return a.jqx.dataFormat.formatdate(d,e,this.localization.calendar)}}}},_textwidth:function(d){var c=a(""+d+"");c.addClass(this.toThemeProperty("jqx-calendar-column-cell"));a(this.host).append(c);var b=c.width();c.remove();return b},_textheight:function(d){var c=a(""+d+"");a(this.host).append(c);var b=c.height();c.remove();return b},_renderRowHeader:function(k){var g=this.getVisibleDate();var c=this.getFirstDayOfWeek(g);var f=c.dayOfWeek;var s=this.getWeekOfYear(c);var o=new a.jqx._jqxDateTimeInput.getDateTime(new Date(c.dateTime));o._addDays(5);o.dayOfWeek=o.dateTime.getDay();var m=this.getWeekOfYear(o);if(53==s&&o.dateTime.getMonth()==0){s=1}var l=a("
");l.find("table").addClass(this.toThemeProperty("jqx-reset"));l.find("td").addClass(this.toThemeProperty("jqx-reset"));l.find("tr").addClass(this.toThemeProperty("jqx-reset"));l.addClass(this.toThemeProperty("jqx-calendar-row-header"));l.width(this.rowHeaderWidth);this.rowHeader.append(l);var d=c;var r=new Array();for(var h=0;h<6;h++){var e=s.toString();var q=new a.jqx._jqxCalendar.cell(d.dateTime);var j=h+1+this.element.id;var p=a(l[0].rows[h].cells[0]);q.element=p;q.row=h;q.column=0;var b="
"+e+"
";p.append(b);p.find("#headerCellContent"+j).addClass(this.toThemeProperty("jqx-calendar-row-cell"));r[h]=q;d=new a.jqx._jqxDateTimeInput.getDateTime(new Date(d._addWeeks(1)));s=this.getWeekOfYear(d)}var n=a.data(this.element,k[0].id);n.rowCells=r},getFirstDayOfWeek:function(e){var d=e;if(this.firstDayOfWeek<0||this.firstDayOfWeek>6){this.firstDayOfWeek=6}var c=d.dayOfWeek-this.firstDayOfWeek;if(c<=0){c+=7}var b=a.jqx._jqxDateTimeInput.getDateTime(d._addDays(-c));return b},getVisibleDate:function(){var c=new a.jqx._jqxDateTimeInput.getDateTime(new Date(this.value.dateTime));if(cthis.maxDate){this.visibleDate=this.maxDate}c.dateTime.setHours(0);var d=c.day;var b=a.jqx._jqxDateTimeInput.getDateTime(c._addDays(-d+1));c=b;return c},destroy:function(b){a.jqx.utilities.resize(this.host,null,true);this.host.removeClass();if(b!=false){this.host.remove()}},_raiseEvent:function(d,i){if(i==undefined){i={owner:null}}var h=this.events[d];var g=i?i:{};g.owner=this;var c=new a.Event(h);c.owner=this;c.args=g;if(d==0||d==1||d==2||d==3||d==4||d==5||d==6||d==7||d==8){c.args.date=c.args.selectedDate=this.getDate();c.args.range=this.getRange();var e=this.getViewStart();var f=this.getViewEnd();c.args.view={from:e,to:f}}if(d==7){var b=g.selectionType;if(!b){b=null}if(b=="key"){b="keyboard"}if(b=="none"){b=null}g.type=b}var j=this.host.trigger(c);if(d==0||d==1){j=false}return j},propertyMap:function(b){if(b=="value"){if(this.selectionMode!="range"){return this.getDate()}else{return this.getRange()}}return null},_setSize:function(){var d=this.host.find("#View"+this.element.id);if(d.length>0){this.setCalendarSize();d[0].style.height="100%";d[0].style.width="100%";var c=this.month.height()-this.titleHeight-this.columnHeaderHeight;var b="View"+this.element.id;d.find("#cellsTable"+b).height(c);d.find("#calendarRowHeader"+b).height(c);this.refreshControl()}},resize:function(){this._setSize()},clear:function(){if(this.selectionMode=="range"){this._clicks=1;this.setRange(null,null);this._raiseEvent(7)}else{this.setDate(null,"mouse")}this._clicks=0;this.selection={from:null,to:null}},today:function(){if(this.selectionMode=="range"){this.setRange(new Date(),new Date())}else{this.setDate(new Date(),"mouse")}},propertiesChangedHandler:function(b,c,d){if(d.width&&d.height&&Object.keys(d).length==2){b._setSize()}},propertyChangedHandler:function(d,e,g,f){if(this.isInitialized==undefined||this.isInitialized==false){return}if(d.batchUpdate&&d.batchUpdate.width&&d.batchUpdate.height&&Object.keys(d.batchUpdate).length==2){return}if(e=="enableHover"){return}if(e=="keyboardNavigation"){return}if(e=="localization"){if(this.localization){if(this.localization.backString){this.backText=this.localization.backString}if(this.localization.forwardString){this.forwardText=this.localization.forwardString}if(this.localization.todayString){this.todayString=this.localization.todayString}if(this.localization.clearString){this.clearString=this.localization.clearString}this.firstDayOfWeek=this.localization.calendar.firstDay}}if(e=="culture"){try{if(a.global){a.global.preferCulture(d.culture);d.localization.calendar=a.global.culture.calendar}else{if(window.Globalize){var b=window.Globalize.culture(d.culture);d.localization.calendar=b.calendar}}if(d.localization.calendar&&d.localization.calendar.firstDay!=undefined&&d.culture!="default"){d.firstDayOfWeek=d.localization.calendar.firstDay}}catch(c){}}if(e=="views"){if(d.views.indexOf("month")==-1){d.view="year"}if(d.views.indexOf("year")==-1&&d.views.indexOf("month")==-1){d.view="decade"}d.render();return}if(e=="showFooter"){d.render()}if(e=="width"||e=="height"){d._setSize();return}else{if(e=="theme"){a.jqx.utilities.setTheme(g,f,d.host)}else{if(e=="rowHeaderWidth"||e=="showWeekNumbers"){d.render()}else{d.view="month";d.render();d.refreshControl()}}}if(e==="firstDayOfWeek"){d.refreshControl()}}})})(jqxBaseFramework);(function(a){a.jqx._jqxCalendar.cell=function(c){var b={dateTime:new a.jqx._jqxDateTimeInput.getDateTime(c),_date:c,getDate:function(){return this._date},setDate:function(d){this.dateTime=new a.jqx._jqxDateTimeInput.getDateTime(d);this._date=d},isToday:false,isWeekend:false,isOtherMonth:false,isVisible:true,isSelected:false,isHighlighted:false,element:null,row:-1,column:-1,tooltip:null};return b};a.jqx._jqxCalendar.monthView=function(c,h,d,b,f,e){var g={start:c,end:h,cells:d,rowCells:b,columnCells:f,element:e};return g}})(jqxBaseFramework); + +(function(a){a.jqx.jqxWidget("jqxChart","",{});a.extend(a.jqx._jqxChart.prototype,{defineInstance:function(){a.extend(true,this,this._defaultSettings);this._createColorsCache();return this._defaultSettings},_defaultSettings:{title:"Title",description:"Description",source:[],seriesGroups:[],categoryAxis:null,xAxis:{},valueAxis:null,renderEngine:"",enableAnimations:true,enableAxisTextAnimation:false,backgroundImage:"",background:"#FFFFFF",padding:{left:5,top:5,right:5,bottom:5},backgroundColor:"#FFFFFF",showBorderLine:true,borderLineWidth:1,borderLineColor:null,borderColor:null,titlePadding:{left:5,top:5,right:5,bottom:10},showLegend:true,legendLayout:null,enabled:true,colorScheme:"scheme01",animationDuration:500,showToolTips:true,showToolTipsOnAllSeries:false,toolTipShowDelay:300,toolTipDelay:500,toolTipHideDelay:4000,toolTipMoveDuration:300,toolTipFormatFunction:null,toolTipAlignment:"dataPoint",localization:null,columnSeriesOverlap:false,rtl:false,legendPosition:null,greyScale:false,axisPadding:5,enableCrosshairs:false,crosshairsColor:"#BCBCBC",crosshairsDashStyle:"2,2",crosshairsLineWidth:1,enableEvents:true,_itemsToggleState:[],_isToggleRefresh:false,_isSelectorRefresh:false,_sliders:[],_selectorRange:[],_rangeSelectorInstances:{},_resizeState:{},renderer:null,_isRangeSelectorInstance:false,drawBefore:null,draw:null,_renderData:{},enableSampling:true},_defaultLineColor:"#BCBCBC",_touchEvents:{mousedown:a.jqx.mobile.getTouchEventName("touchstart"),click:a.jqx.mobile.getTouchEventName("touchstart"),mouseup:a.jqx.mobile.getTouchEventName("touchend"),mousemove:a.jqx.mobile.getTouchEventName("touchmove"),mouseenter:"mouseenter",mouseleave:"mouseleave"},_getEvent:function(b){if(this._isTouchDevice){return this._touchEvents[b]}else{return b}},destroy:function(){this.host.remove()},_jqxPlot:null,createInstance:function(d){if(!a.jqx.dataAdapter){throw"jqxdata.js is not loaded"}var c=this;c._refreshOnDownloadComlete();c._isTouchDevice=a.jqx.mobile.isTouchDevice();if(!c._jqxPlot){c._jqxPlot=new jqxPlot()}c.addHandler(c.host,c._getEvent("mousemove"),function(g){if(c.enabled==false){return}if(!c._isRangeSelectorInstance){c.host.css("cursor","default")}var f=g.pageX||g.clientX||g.screenX;var j=g.pageY||g.clientY||g.screenY;var i=c.host.offset();if(c._isTouchDevice){var h=a.jqx.position(g);f=h.left;j=h.top}f-=i.left;j-=i.top;c.onmousemove(f,j)});c.addHandler(c.host,c._getEvent("mouseleave"),function(h){if(c.enabled==false){return}var f=c._mouseX;var i=c._mouseY;var g=c._plotRect;if(g&&f>=g.x&&f<=g.x+g.width&&i>=g.y&&i<=g.y+g.height){return}c._cancelTooltipTimer();c._hideToolTip(0);c._unselect()});c.addHandler(c.host,"click",function(g){if(c.enabled==false){return}var f=g.pageX||g.clientX||g.screenX;var j=g.pageY||g.clientY||g.screenY;var i=c.host.offset();if(c._isTouchDevice){var h=a.jqx.position(g);f=h.left;j=h.top}f-=i.left;j-=i.top;c._mouseX=f;c._mouseY=j;if(!isNaN(c._lastClickTs)){if((new Date()).valueOf()-c._lastClickTs<100){return}}this._hostClickTimer=setTimeout(function(){if(!c._isTouchDevice){c._cancelTooltipTimer();c._hideToolTip();c._unselect()}if(c._pointMarker&&c._pointMarker.element){var l=c.seriesGroups[c._pointMarker.gidx];var k=l.series[c._pointMarker.sidx];g.stopImmediatePropagation();c._raiseItemEvent("click",l,k,c._pointMarker.iidx)}},100)});var e=c.element.style;if(e){var b=false;if(e.width!=null){b|=e.width.toString().indexOf("%")!=-1}if(e.height!=null){b|=e.height.toString().indexOf("%")!=-1}if(b){a.jqx.utilities.resize(this.host,function(){if(c.timer){clearTimeout(c.timer)}var f=1;c.timer=setTimeout(function(){var g=c.enableAnimations;c.enableAnimations=false;c.refresh();c.enableAnimations=g},f)},false,true)}}},_refreshOnDownloadComlete:function(){var d=this;var e=this.source;if(e instanceof a.jqx.dataAdapter){var f=e._options;if(f==undefined||(f!=undefined&&!f.autoBind)){e.autoSync=false;e.dataBind()}var c=this.element.id;if(e.records.length==0){var b=function(){if(d.ready){d.ready()}d.refresh()};e.unbindDownloadComplete(c);e.bindDownloadComplete(c,b)}else{if(d.ready){d.ready()}}e.unbindBindingUpdate(c);e.bindBindingUpdate(c,function(){if(d._supressBindingRefresh){return}d.refresh()})}},propertyChangedHandler:function(b,c,e,d){if(this.isInitialized==undefined||this.isInitialized==false){return}if(c=="source"){this._refreshOnDownloadComlete()}this.refresh()},_initRenderer:function(b){if(!a.jqx.createRenderer){throw"Please include jqxdraw.js"}return a.jqx.createRenderer(this,b)},_internalRefresh:function(){var b=this;if(a.jqx.isHidden(b.host)){return}b._stopAnimations();if(!b.renderer||(!b._isToggleRefresh&&!b._isUpdate)){b._hideToolTip(0);b._isVML=false;b.host.empty();b._measureDiv=undefined;b._initRenderer(b.host)}var d=b.renderer;if(!d){return}var c=d.getRect();b._render({x:1,y:1,width:c.width,height:c.height});this._raiseEvent("refreshBegin",{instance:this});if(d instanceof a.jqx.HTML5Renderer){d.refresh()}b._isUpdate=false;this._raiseEvent("refreshEnd",{instance:this})},saveAsPNG:function(d,b,c){return this._saveAsImage("png",d,b,c)},saveAsJPEG:function(d,b,c){return this._saveAsImage("jpeg",d,b,c)},saveAsPDF:function(d,b,c){return this._saveAsImage("pdf",d,b,c)},_saveAsImage:function(e,h,b,c){var g=false;for(var d=0;d10){o=1}I.attr(ai,{"stroke-width":o,stroke:F})}else{if(a.jqx.browser.msie&&a.jqx.browser.version<9){I.attr(ai,{"stroke-width":1,stroke:m.backgroundColor||"white"})}}if(a.isFunction(m.drawBefore)){m.drawBefore(I,C)}var V={x:Y.left,y:Y.top,width:C.width-Y.left-Y.right,height:C.height-Y.top-Y.bottom};m._paddedRect=V;var e=m.titlePadding||{left:2,top:2,right:2,bottom:2};var l;if(m.title&&m.title.length>0){var S=m.toThemeProperty("jqx-chart-title-text",null);l=I.measureText(m.title,0,{"class":S});I.text(m.title,V.x+e.left,V.y+e.top,V.width-(e.left+e.right),l.height,0,{"class":S},true,"center","center");V.y+=l.height;V.height-=l.height}if(m.description&&m.description.length>0){var T=m.toThemeProperty("jqx-chart-title-description",null);l=I.measureText(m.description,0,{"class":T});I.text(m.description,V.x+e.left,V.y+e.top,V.width-(e.left+e.right),l.height,0,{"class":T},true,"center","center");V.y+=l.height;V.height-=l.height}if(m.title||m.description){V.y+=(e.bottom+e.top);V.height-=(e.bottom+e.top)}var b={x:V.x,y:V.y,width:V.width,height:V.height};m._plotRect=b;m._buildStats(b);var H=m._isPieOnlySeries();var s=m.seriesGroups;var E;var D={xAxis:{},valueAxis:{}};for(var Z=0;Z0){D.xAxis[ae]|=1}}}else{R=m._renderValueAxis(Z,f,true,b).width;if((D.valueAxis[O]&1)==1){R=0}else{if(R>0){D.valueAxis[O]|=1}}}}if(Q!="left"&&m.rtl==true){Q="right"}if(Q!="right"){Q="left"}if(r[Q+"Count"]>0&&r[Q]>0&&R>0){r[Q]+=U}p.push({width:R,position:Q,xRel:r[Q]});r[Q]+=R;r[Q+"Count"]++}var u=Math.max(1,Math.max(C.width,C.height));var ac={top:0,bottom:0,topCount:0,bottomCount:0};var W=[];for(Z=0;Z0){D.valueAxis[O]|=2}}}else{ab=m._renderXAxis(Z,{x:0,y:0,width:u,height:0},true).height;if((D.xAxis[ae]&2)==2){ab=0}else{if(ab>0){D.xAxis[ae]|=2}}}}if(Q!="top"){Q="bottom"}if(ac[Q+"Count"]>0&&ac[Q]>0&&ab>0){ac[Q]+=U}W.push({height:ab,position:Q,yRel:ac[Q]});ac[Q]+=ab;ac[Q+"Count"]++}m._createAnimationGroup("series");var t=(m.showLegend!=false);var B=!t?{width:0,height:0}:m._renderLegend(m.legendLayout?m._rect:V,true);if(this.legendLayout&&(!isNaN(this.legendLayout.left)||!isNaN(this.legendLayout.top))){B={width:0,height:0}}if(V.heightA.x+A.width){R=A.x+A.width-P}if(N+ab>A.y+A.height){ab=A.y+A.height-N}m._renderLegend({x:P,y:N,width:R,height:ab})}m._hasHorizontalLines=false;if(!H){for(Z=0;Z=2*N){I.x+=N;I.width-=2*N}if(I.height>=2*N){I.y+=N;I.height-=2*N}var E={width:I.width,height:0};var G=0,F=0;var p=20;var m=0;var f=10;var Q=10;var w=0;for(var P=0;Pp){p=j.height}if(j.width>w){w=j.width}if(v){if(P!=0){F+=p}if(F>I.height){F=0;G+=w+2*Q+f;w=j.width;E.width=G+w}}else{if(G!=0){G+=Q}if(G+2*f+j.width>I.width&&j.widthI.width){K=true;var s=I.width;var T=A;var X=T.split(/\s+/);var o=[];var q="";for(var M=0;M0)?" ":"")+X[M];var B=l.renderer.measureText(k,0,{"class":J});if(B.width>s&&k.length>0&&q.length>0){o.push({text:q});q=X[M]}else{q=k}if(M+1==X.length){o.push({text:q})}}j.width=0;var c=0;for(var H=0;H0)?" ":"")+X[M];var B=l.renderer.measureText(k,0,{"class":J});if(B.width>s&&k.length>0&&q.length>0){o.push({text:q,dy:d});d+=B.height;q=X[M]}else{q=k}if(M+1==X.length){o.push({text:q,dy:d})}}for(var H=0;H1){j=l.left*(e+1)}if(m.length==1){j*=2}f=this._valuesToOffsets(m,d,t,n,l,false,j);if(!g){var o=(l.left+l.right)*s/e;if(d.flip){f.unshift(f[0]+o)}else{f.push(f[f.length-1]+o)}}}else{var j=l.left;if(m.length==1){j*=2}f=this._valuesToOffsets(m,d,t,n,l,g,j)}var q=this._arraysToObjectsArray([m,f],["value","offset"]);if(d[u]&&d[u].custom){var h=this._objectsArraysToArray(d[u].custom,"value");var c=this._objectsArraysToArray(d[u].custom,"offset");var b=this._valuesToOffsets(h,d,t,n,l,g,l.left);for(var p=0;pd){o=f._elementRenderInfo[d].xAxis}var q=[];var I;if(O.labels.formatFunction){I=O.labels.formatFunction}var v;if(O.labels.formatSettings){v=a.extend({},O.labels.formatSettings)}if(r.type=="date"){if(r.dateFormat&&!I){if(v){v.dateFormat=v.dateFormat||r.dateFormat}else{v={dateFormat:r.dateFormat}}}else{if(!I&&(!v||(v&&!v.dateFormat))){I=this._getDefaultDTFormatFn(r.baseUnit||"day")}}}for(var N=0;N=S.filterRange.min&&T<=S.filterRange.max){w=S.useIndeces?(S.min+T).toString():(L==undefined?"":L.toString())}}var b={key:L,text:w,targetX:H,x:H};if(o&&o.itemOffsets[L]){b.x=o.itemOffsets[L].x;b.y=o.itemOffsets[L].y}q.push(b)}var C=f._getAnimProps(d);var u=C.enabled&&q.length<500?C.duration:0;if(f.enableAxisTextAnimation==false){u=0}var z={items:q,renderData:k};var e=f._renderAxis(W,D,O,{x:y.x,y:y.y,width:y.width,height:y.height},c,F,false,true,z,Q,u);if(W){e.width+=E}else{e.height+=E}return e},_animateAxisText:function(f,h){var c=f.items;var d=f.textSettings;for(var e=0;en){var m=o;o=n;n=m}var u=a.jqx._rnd(Math.abs(o-n)/(Math.PI*2),0.001,true);var r=Math.PI*2*g*u;var h=this._calcGroupOffsets(f,b).xoffsets;if(!h){return}var k=!(Math.abs(Math.abs(n-o)-Math.PI*2)>0.00001);if(j.spider){var e=this._getXAxisStats(f,this._getXAxis(f),r);var s=e.interval;if(isNaN(s)||s==0){s=1}var d=(e.max-e.min)/s+(k?1:0);d=Math.round(d);if(d>2){var c=Math.cos(Math.abs(n-o)/2/d);c=a.jqx._rnd(c,0.01);if(c==0){c=1}var t=g/c;if(t>g&&i){g=t}}}g=a.jqx._ptrnd(g);return{x:q,y:p,r:g,adjR:this._get([t,g]),itemWidth:h.itemWidth,rangeLength:h.rangeLength,valuesOnTicks:i,startAngle:o,endAngle:n,isClosedCircle:k,axisSize:r}},_toPolarCoord:function(j,f,h,e){var c=Math.abs(j.startAngle-j.endAngle)/(Math.PI*2);var b=(h-f.x)*2*Math.PI*c/Math.max(1,f.width)+j.startAngle;var d=((f.height+f.y)-e)*j.r/Math.max(1,f.height);var i=j.x+d*Math.cos(b);var g=j.y+d*Math.sin(b);return{x:a.jqx._ptrnd(i),y:a.jqx._ptrnd(g)}},_renderSpiderAxis:function(z,k){var ao=this;var g=ao._getXAxis(z);var aA=this._getAxisSettings(g);if(!g||!aA.visible){return}var W=ao.seriesGroups[z];var R=ao._getPolarAxisCoords(z,k);if(!R){return}var L=a.jqx._ptrnd(R.x);var K=a.jqx._ptrnd(R.y);var t=R.adjR;var X=R.startAngle;var V=R.endAngle;if(t<1){return}var av=a.jqx._rnd(Math.abs(X-V)/(Math.PI*2),0.001,true);var h=Math.PI*2*t*av;var c=R.isClosedCircle;var w=this._renderData[z].xoffsets;if(!w.rangeLength){return}var S=w.axisStats.interval;if(isNaN(S)||S<1){S=1}var ar=W.orientation=="horizontal";var Z=(ar&&g.position=="right")||(!ar&&g.position=="top");while(ao._renderData.lengthz){s=ao._elementRenderInfo[z].xAxis}var aq=[];var af=this._getDataLen(z);for(var Q=0;Q=af){continue}H=ao._getDataValue(ax,g.dataField);if(H==undefined){H=""}}var ap=ao._formatValue(H,y.formatSettings,y.formatFunction,z,undefined,ax);if(ap==undefined||ap.toString()==""){ap=ae.useIndeces?(ae.min+Q).toString():(H==undefined?"":H.toString())}var d={key:H,text:ap,targetX:F,x:F};if(s&&s.itemOffsets[H]){d.x=s.itemOffsets[H].x;d.y=s.itemOffsets[H].y}aq.push(d)}var az={items:aq,renderData:at};var l={stroke:e.color,fill:"none","stroke-width":e.width,"stroke-dasharray":e.dashStyle||""};if(!W.spider){if(av==1){ad.circle(L,K,t,l)}else{var E=-X/Math.PI*180;var aE=-V/Math.PI*180;this.renderer.pieslice(L,K,0,t,Math.min(E,aE),Math.max(E,aE),undefined,l)}}var M=aq.length;var m=2*Math.PI/(M);var al=X;var f,C;if(e.visible&&ay){if(!G&&!c){e.offsets.unshift({offset:-u.right})}for(var Q=0;Q0.01){continue}var q=a.jqx._ptrnd(L+t*Math.cos(B));var p=a.jqx._ptrnd(K+t*Math.sin(B));ad.line(L,K,q,p,l)}}if(T.visible&&ay){var P=5;var o={stroke:T.color,fill:"none","stroke-width":T.width,"stroke-dasharray":T.dashStyle||""};if(!G&&!c){T.offsets.unshift({offset:-u.right})}for(var Q=0;Q0.01){continue}var ab={x:L+t*Math.cos(B),y:K+t*Math.sin(B)};var aa={x:L+(t+P)*Math.cos(B),y:K+(t+P)*Math.sin(B)};ad.line(a.jqx._ptrnd(ab.x),a.jqx._ptrnd(ab.y),a.jqx._ptrnd(aa.x),a.jqx._ptrnd(aa.y),o)}}var an=[];if(W.spider){var v=[];if(g.type=="date"){v=this._generateDTOffsets(aC,r,h,u,S,S,g.baseUnit,true,0,false,ai)}else{v=this._getOffsets("",g,h,ae,aA,u,true,S)}if(!G&&!c){v.unshift({offset:-u.right})}for(var Q=0;Q0.01){continue}an.push(B)}at.offsetAngles=an}var Y=ao._renderSpiderValueAxis(z,k,(G?R.adjR:R.r),an);if(!Y){Y=[]}if(W.spider){if(!G){for(var Q=0;Q0?q.height+3*R:2*R;M+=o-(V?o:o/4)}else{M+=V?o:o/4}M+=P.top}else{N+=P.left+R+(q.width>0?q.width+R:0)+(D?z.width-q.width:0);M+=u}var T=0;var K=0;var r=C.items;l.itemOffsets={};if(this._isToggleRefresh||!this._isUpdate){d=0}var k=false;var j=0;for(var S=0;SK){K=f.width}if(f.height>T){T=f.height}j+=H?T:K;if(!U){if((H&&L>z.height+2)||(!H&&L>z.width+2)){continue}var J=H?N+(D?(q.width==0?o:o-R):0):N+L;var I=H?M+L:M;l.itemOffsets[r[S].key]={x:J,y:I};if(!k){if(!isNaN(r[S].x)||!isNaN(r[S].y)&&d){k=true}}r[S].targetX=J;r[S].targetY=I;r[S].width=!H?b:z.width-P.left-P.right-2*R-o-((q.width>0)?q.width+R:0);r[S].height=H?b:z.height-P.top-P.bottom-2*R-o-((q.height>0)?q.height+R:0);r[S].visible=true}}l.avgWidth=r.length==0?0:j/r.length;if(!U){var s={items:r,textSettings:n};if(isNaN(d)||!k){d=0}this._animateAxisText(s,d==0?1:0);if(d!=0){var g=this;this._enqueueAnimation("series",undefined,undefined,d,function(i,h,w){g._animateAxisText(h,w)},s)}}G.width+=2*R+o+q.width+K+(H&&q.width>0?R:0);G.height+=2*R+o+q.height+T+(!H&&q.height>0?R:0);if(!H){G.height+=P.top+P.bottom}else{G.width+=P.left+P.right}var B={};if(!U&&Q.line.visible){var O={stroke:Q.line.color,"stroke-width":Q.line.width,"stroke-dasharray":Q.line.dashStyle||""};if(H){var J=z.x+z.width+(D?P.left:-P.right);J=a.jqx._ptrnd(J);this.renderer.line(J,z.y,J,z.y+z.height,O)}else{var I=a.jqx._ptrnd(z.y+(D?z.height-P.bottom:P.top));this.renderer.line(a.jqx._ptrnd(z.x),I,a.jqx._ptrnd(z.x+z.width+1),I,O)}}G.width=a.jqx._rup(G.width);G.height=a.jqx._rup(G.height);return G},_drawPlotAreaLines:function(j,z,f){var E=this.seriesGroups[j];var c=E.orientation!="horizontal";if(!this._renderData||this._renderData.length<=j){return}var J=z?"valueAxis":"xAxis";var v=this._renderData[j][J];if(!v){return}var n=this._renderData.axisDrawState;if(!n){n=this._renderData.axisDrawState={}}var A="",h;if(z){A="valueAxis_"+((E.valueAxis)?j:"")+(c?"swap":"");h=this._getValueAxis(j)}else{A="xAxis_"+((E.xAxis||E.categoryAxis)?j:"")+(c?"swap":"");h=this._getXAxis(j)}if(n[A]){n=n[A]}else{n=n[A]={}}if(!z){c=!c}var H=v.settings;if(!H){return}if(H.customDraw){return}var G=H.gridLines,q=H.tickMarks,u=H.padding;var e=v.rect;var l=this._plotRect;if(!G||!q){return}var p=0.5;var d={};var b={stroke:G.color,"stroke-width":G.width,"stroke-dasharray":G.dashStyle||""};var D=z?e.y+e.height:e.x;var o=G.offsets;if(z&&!h.flip){o=a.extend([],o);o=o.reverse()}if(o&&o.length>0){var k=NaN;var C=o.length;for(var B=0;Be.y+e.height){F=e.y+e.height}}else{F=a.jqx._ptrnd(e.x+o[B].offset);if(F>e.x+e.width+p){F=a.jqx._ptrnd(e.x+e.width)}}if(isNaN(F)){continue}if(!isNaN(k)&&Math.abs(F-k)<2){continue}k=F;if(f.gridLines&&G.visible!=false&&n.gridLines!=true){if(c){this.renderer.line(a.jqx._ptrnd(l.x),F,a.jqx._ptrnd(l.x+l.width),F,b)}else{this.renderer.line(F,a.jqx._ptrnd(l.y),F,a.jqx._ptrnd(l.y+l.height),b)}}d[F]=true;if(f.alternatingBackground&&(G.alternatingBackgroundColor||G.alternatingBackgroundColor2)&&n.alternatingBackground!=true){var m=((B%2)==0)?G.alternatingBackgroundColor2:G.alternatingBackgroundColor;if(B>0&&m){var I;if(c){I=this.renderer.rect(a.jqx._ptrnd(l.x),D,a.jqx._ptrnd(l.width-1),F-D,b)}else{I=this.renderer.rect(D,a.jqx._ptrnd(l.y),F-D,a.jqx._ptrnd(l.height),b)}this.renderer.attr(I,{"stroke-width":0,fill:m,opacity:G.alternatingBackgroundOpacity||1})}}D=F}}var b={stroke:q.color,"stroke-width":q.width,"stroke-dasharray":q.dashStyle||""};if(f.tickMarks&&q.visible&&n.tickMarks!=true){var t=q.size;var o=q.offsets;var k=NaN;for(var B=0;Be.y+e.height){F=e.y+e.height}}else{F=a.jqx._ptrnd(e.x+o[B].offset);if(F>e.x+e.width+p){F=a.jqx._ptrnd(e.x+e.width)}}if(isNaN(F)){continue}if(!isNaN(k)&&Math.abs(F-k)<2){continue}if(d[F-1]){F--}else{if(d[F+1]){F++}}if(c){if(F>e.y+e.height+p){break}}else{if(F>e.x+e.width+p){break}}k=F;var w=!v.isMirror?-t:t;if(c){var s=e.x+e.width+(h.position=="right"?u.left:-u.right);if(!z){s=e.x+(v.isMirror?u.left:-u.right+e.width)}this.renderer.line(s,F,s+w,F,b)}else{var r=e.y+(v.isMirror?e.height:0);r+=v.isMirror?-u.bottom:u.top;r=a.jqx._ptrnd(r);this.renderer.line(F,r,F,r-w,b)}}}n.tickMarks=n.tickMarks||f.tickMarks;n.gridLines=n.gridLines||f.gridLines;n.alternatingBackground=n.alternatingBackground||f.alternatingBackground},_calcValueAxisItems:function(j,d,l){var n=this._stats.seriesGroups[j];if(!n||!n.isValid){return false}var w=this.seriesGroups[j];var b=w.orientation=="horizontal";var f=this._getValueAxis(j);var m=f.valuesOnTicks!=false;var e=f.dataField;var o=n.intervals;var s=d/o;var u=n.min;var r=n.mu;var c=f.logarithmicScale==true;var k=f.logarithmicScaleBase||10;var h=w.type.indexOf("stacked")!=-1&&w.type.indexOf("100")!=-1;if(c){r=!isNaN(f.unitInterval)?f.unitInterval:1}if(!m){o=Math.max(o-1,1)}while(this._renderData.length"9"){h=d.length-(e+1);if(h>=0){return Math.min(h,c)}}}if(h>0){k*=Math.pow(10,h)}while(Math.round(k)!=k&&hf){n=this._elementRenderInfo[f].valueAxis}for(var J=0;Jb){var f=[];var k=Math.round(c/b);for(var h=0;hs){return f}if(p==s){if(v){f.push({offset:b?x/2:n.left,value:p})}else{if(b){f.push({offset:x/2,value:p})}}return f}var j=x-n.left-n.right;var w=p;var k=n.left;var e=k;c=Math.max(c,1);var m=c;var d=Math.min(1,c);if(c>1&&o!="millisecond"){c=1}while(a.jqx._ptrnd(e)<=a.jqx._ptrnd(n.left+j+(b?0:n.right))){f.push({offset:e,value:w});var z=new Date(w.valueOf());if(o=="millisecond"){z.setMilliseconds(w.getMilliseconds()+c)}else{if(o=="second"){z.setSeconds(w.getSeconds()+c)}else{if(o=="minute"){z.setMinutes(w.getMinutes()+c)}else{if(o=="hour"){var l=z.valueOf();z.setHours(w.getHours()+c);if(l==z.valueOf()){z.setHours(w.getHours()+c+1)}}else{if(o=="day"){z.setDate(w.getDate()+c)}else{if(o=="month"){z.setMonth(w.getMonth()+c)}else{if(o=="year"){z.setFullYear(w.getFullYear()+c)}}}}}}}w=z;e=k+(w.valueOf()-p.valueOf())*d/(s.valueOf()-p.valueOf())*j}if(g){for(var r=0;r1&&o!="millisecond"){var q=[];for(var r=0;r1){var q=[];q.push({offset:0,value:undefined});for(var r=1;r1){q.push({offset:q[t-1].offset+(q[t-1].offset-q[t-2].offset)})}else{q.push({offset:x,value:undefined})}f=q}if(y>c){var q=[];var h=Math.round(y/m);for(var r=0;rq.max.valueOf())){continue}}var W=n.minValue;var C=n.maxValue;if(n.baselineValue){if(isNaN(W)){W=r}else{W=Math.min(r,W)}if(isNaN(C)){C=r}else{C=Math.max(r,C)}}var u=0,w=0;for(var k=0;A.series&&kC)&&((isNaN(n.maxValue))?true:P<=n.maxValue)){C=P}if((isNaN(W)||y=n.minValue)){W=y}if(!isNaN(F)&&E&&!Q){if(F>r){u+=F}else{if(FM||isNaN(M)){M=C}if(Wd||isNaN(d)){d=u}if(w0){O.gmax=Math.max(O.gmax,O.gbase+O.gsumP)}}x.context=O}this._mergeCommonValueAxisStats();for(var T=0;Tf.gmax){f.gmax=d.gmax}if(isNaN(f.gsumP)||d.gsumP>f.gsumP){f.gsumP=d.gsumP}if(isNaN(f.gsumN)||d.gsumN0){f.gmin=Math.min(f.gmin,f.gbase+f.gsumN)}if(f.gsumP>0){f.gmax=Math.max(f.gmax,f.gbase+f.gsumP)}}for(var e=0;et){r/=j;b--;i++}c=Math.pow(j,b)}else{if(l&&!e){f=Math.max(f,y)}q=a.jqx._rnd(a.jqx.log(f,j),1,true);f=Math.pow(j,q);b=a.jqx._rnd(a.jqx.log(c,j),1,false);c=Math.pow(j,b)}s=j}if(cy){y=f}var v=c;var o=f;if(!d){if(0!=Math.abs(o-v)%s){v=a.jqx._rnd(c,s,false);o=a.jqx._rnd(f,s,true)}}if(h&&o>100){o=100}if(h&&!d){o=(o>0)?100:0;v=(v<0)?-100:0;s=w.unitInterval;if(isNaN(s)||s<=0||s>=100){s=10}if((100%s)!=0){for(;s>=1;s--){if((100%s)==0){break}}}}if(isNaN(o)||isNaN(v)||isNaN(s)){return{}}if(isNaN(i)){i=parseInt(((o-v)/(s==0?1:s)).toFixed())}if(d&&!h){i=q-b;k=Math.pow(j,i)}if(i<1){return{}}var m={min:v,max:o,logarithmic:d,logBase:j,base:d?v:x,minPow:b,maxPow:q,sumP:y,sumN:z,mu:s,maxRange:k,intervals:i,hasStackValueReversal:n};return m},_getDataLen:function(c){var b=this.source;if(c!=undefined&&c!=-1&&this.seriesGroups[c].source){b=this.seriesGroups[c].source}if(b instanceof a.jqx.dataAdapter){b=b.records}if(b){return b.length}return 0},_getDataValue:function(b,e,d){var c=this.source;if(d!=undefined&&d!=-1){c=this.seriesGroups[d].source||c}if(c instanceof a.jqx.dataAdapter){c=c.records}if(!c||b<0||b>c.length-1){return undefined}if(a.isFunction(e)){return e(b,c)}return(e&&e!="")?c[b][e]:c[b]},_getDataValueAsNumber:function(b,e,c){var d=this._getDataValue(b,e,c);if(this._isDate(d)){return d.valueOf()}if(typeof(d)!="number"){d=parseFloat(d)}if(typeof(d)!="number"){d=undefined}return d},_isPieGroup:function(b){var c=this.seriesGroups[b];if(!c||!c.type){return false}return c.type.indexOf("pie")!=-1||c.type.indexOf("donut")!=-1},_renderPieSeries:function(e,c){var f=this._getDataLen(e);var g=this.seriesGroups[e];var m=this._calcGroupOffsets(e,c).offsets;for(var p=0;p360){t=0}var x=this._get([k.maxAngle,k.endAngle]);if(isNaN(x)||x<0||x>360){x=360}var o={rect:c,minAngle:t,maxAngle:x,groupIndex:e,serieIndex:p,settings:v,items:[]};for(var u=0;uo.groupIndex&&this._elementRenderInfo[o.groupIndex].series&&this._elementRenderInfo[o.groupIndex].series.length>o.serieIndex){j=this._elementRenderInfo[o.groupIndex].series[o.serieIndex]}var f=360*c;var u=this.seriesGroups[o.groupIndex];var n=this._getLabelsSettings(o.groupIndex,o.serieIndex,NaN);var m=n.visible;var b=[];for(var t=0;tx){p=x}x=e;if(t==b.length-1&&e!=b[0].from){e=o.maxAngle+b[0].from}}var r=this.renderer.pieSlicePath(w.x,w.y,w.innerRadius,w.outerRadius,p,e,w.centerOffset);this.renderer.attr(q.element,{d:r});var h=this._getColors(o.groupIndex,o.serieIndex,w.itemIndex,"radialGradient",w.outerRadius);var v=o.settings;q.colors=h;q.settings=v;this.renderer.attr(q.element,{fill:h.fillColor,stroke:h.lineColor,"stroke-width":v.stroke,"fill-opacity":v.opacity,"stroke-opacity":v.opacity,"stroke-dasharray":"none"||v.dashStyle});var k=u.series[o.serieIndex];if(m){this._showPieLabel(o.groupIndex,o.serieIndex,w.itemIndex,n)}if(c==1){this._installHandlers(q.element,"pieslice",o.groupIndex,o.serieIndex,w.itemIndex)}}},_showPieLabel:function(e,f,A,p,h){var k=this._renderData[e].offsets[f][A];if(k.elementInfo.labelElement){this.renderer.removeElement(k.elementInfo.labelElement)}if(!p){p=this._getLabelsSettings(e,f,NaN)}if(!p.visible){return}var B=k.fromAngle,D=k.toAngle;var l=Math.abs(B-D);var q=l>180?1:0;if(l>360){B=0;D=360}var r=B*Math.PI*2/360;var i=D*Math.PI*2/360;var j=l/2+B;j=j%360;var C=j*Math.PI*2/360;var v;if(p.autoRotate==true){v=j<90||j>270?360-j:180-j}var u=p.linesEnabled;var o=this._showLabel(e,f,A,{x:0,y:0,width:0,height:0},"center","center",true,false,false,v);var d=p.radius||k.outerRadius+Math.max(o.width,o.height);if(this._isPercent(d)){d=parseFloat(d)/100*Math.min(this._plotRect.width,this._plotRect.height)/2}d+=k.centerOffset;if(isNaN(h)){h=0}d+=h;var x=this.seriesGroups[e];var n=x.series[f];var z=a.jqx.getNum([n.offsetX,x.offsetX,this._plotRect.width/2]);var y=a.jqx.getNum([n.offsetY,x.offsetY,this._plotRect.height/2]);var c=this._plotRect.x+z;var b=this._plotRect.y+y;var w=this._adjustTextBoxPosition(c,b,o,d,j,k.outerRadius>d,p.linesAngles!=false,p.autoRotate==true);var m={};k.elementInfo.labelElement=this._showLabel(e,f,A,{x:w.x,y:w.y,width:o.width,height:o.height},"left","top",false,false,false,v,m);if(d>k.outerRadius+5&&u!=false){var t={lineColor:k.elementInfo.colors.lineColor,stroke:k.elementInfo.settings.stroke,opacity:k.elementInfo.settings.opacity,dashStyle:k.elementInfo.settings.dashStyle};k.elementInfo.labelArrowPath=this._updateLebelArrowPath(k.elementInfo.labelArrowPath,c,b,d,k.outerRadius+h,C,p.linesAngles!=false,t,m)}},_updateLebelArrowPath:function(d,j,f,h,l,g,o,e,r){var c=a.jqx._ptrnd(j+(h-0)*Math.cos(g));var n=a.jqx._ptrnd(f-(h-0)*Math.sin(g));var b=a.jqx._ptrnd(j+(l+2)*Math.cos(g));var m=a.jqx._ptrnd(f-(l+2)*Math.sin(g));var p=[];p.push({x:r.x+r.width/2,y:r.y});p.push({x:r.x+r.width/2,y:r.y+r.height});p.push({x:r.x,y:r.y+r.height/2});p.push({x:r.x+r.width,y:r.y+r.height/2});if(!o){p.push({x:r.x,y:r.y});p.push({x:r.x+r.width,y:r.y});p.push({x:r.x+r.width,y:r.y+r.height});p.push({x:r.x,y:r.y+r.height})}p=p.sort(function(s,i){return a.jqx._ptdist(s.x,s.y,j,f)-a.jqx._ptdist(i.x,i.y,j,f)});p=p.sort(function(s,i){return(Math.abs(s.x-j)+Math.abs(s.y-f))-(Math.abs(i.x-j)+Math.abs(i.y-f))});for(var k=0;k=t&&u=Math.PI-t&&u=Math.PI+t&&u<2*Math.PI-t){m=p/2*Math.sin(d)}else{if(u>=2*Math.PI-t&&u<2*Math.PI){m=l/2*Math.cos(d)}}}}}g+=Math.abs(m)+3;var k=a.jqx._ptrnd(f+g*Math.cos(d));var j=a.jqx._ptrnd(e-g*Math.sin(d));k-=n.width/2;j-=n.height/2;return{x:k,y:j}}if(!c){if(!i){if(s>=0&&s<45||s>=315&&s<360){j-=n.height/2}else{if(s>=45&&s<135){j-=n.height;k-=n.width/2}else{if(s>=135&&s<225){j-=n.height/2;k-=n.width}else{if(s>=225&&s<315){k-=n.width/2}}}}}else{if(s>=90&&s<270){j-=n.height/2;k-=n.width}else{j-=n.height/2}}}else{k-=n.width/2;j-=n.height/2}return{x:k,y:j}},_isColumnType:function(b){return(b.indexOf("column")!=-1||b.indexOf("waterfall")!=-1)},_getColumnGroupsCount:function(c){var e=0;c=c||"vertical";var f=this.seriesGroups;for(var d=0;dO){var G=h;h=O;O=G}if(t.spider){var E=r.xAxis.offsetAngles;var F="";var K=[p,q];var z=E;if(d.isClosedCircle){z=a.extend([],E);z.push(z[0])}for(var J in K){for(var L=0;L1){M=1}this.renderer.attr(H,{fill:W,"fill-opacity":M,stroke:R,"stroke-opacity":M,"stroke-width":u,"stroke-dasharray":c.dashStyle})}},_getColumnGroupWidth:function(m,h,o){var e=this.seriesGroups[m];var l=e.type.indexOf("stacked")!=-1;var d=l?1:e.series.length;var k=this._getColumnGroupsCount(e.orientation);if(isNaN(k)||0==k){k=1}var n=h.rangeLength>=1?h.itemWidth:o*0.9;var c=e.columnsMinWidth;if(isNaN(c)){c=1}if(!isNaN(e.columnsMaxWidth)){c=Math.min(e.columnsMaxWidth,c)}if(c>n&&h.length>0){n=Math.max(n,o*0.9/h.length)}var i=c;if(!l){var f=e.seriesGapPercent;if(isNaN(f)||f<0){f=10}f/=100;var b=c;b*=(1+f);i+=e.series.length*b}var j=Math.max(n/k,i);return{requiredWidth:i,availableWidth:n,targetWidth:j}},_getColumnSerieWidthAndOffset:function(d,e){var m=this.seriesGroups[d];var u=m.series[e];var c=m.orientation=="horizontal";var b=this._plotRect;if(c){b={x:b.y,y:b.x,width:b.height,height:b.width}}var v=this._calcGroupOffsets(d,b);if(!v||v.xoffsets.length==0){return}var l=true;var w=this._getColumnGroupsCount(m.orientation);if(m.type=="candlestick"||m.type=="ohlc"){w=1}var q=this._getColumnGroupIndex(d);var r=this._getColumnGroupWidth(d,v.xoffsets,c?b.height:b.width);var h=0;var f=r.targetWidth;if(this.columnSeriesOverlap==true||(Math.round(f)>Math.round(r.availableWidth/w))){w=1;q=0}if(l){h-=(f*w)/2}h+=f*q;var B=m.columnsGapPercent;if(B<=0){B=0}if(isNaN(B)||B>=100){B=25}B/=100;var k=f*B;if(k+r.requiredWidth>r.targetWidth){k=Math.max(0,r.targetWidth-r.requiredWidth)}if(Math.round(f)>Math.round(r.availableWidth)){k=0}f-=k;h+=k/2;var x=m.seriesGapPercent;if(isNaN(x)||x<0){x=10}var n=m.type.indexOf("stacked")!=-1;var t=f;if(!n){t/=m.series.length}var y=this._get([m.seriesGap,(f*x/100)/(m.series.length-1)]);if(m.polar==true||m.spider==true||n||m.series.length<=1){y=0}var o=y*(m.series.length-1);if(m.series.length>1&&o>f-m.series.length*1){o=f-m.series.length*1;y=o/Math.max(1,(m.series.length-1))}var g=t-(o/m.series.length);var A=0;var i=m.columnsMaxWidth;if(!isNaN(i)){if(g>i){A=g-i;g=i}}var z=A/2;var j=0;if(!n){var C=(f-(g*m.series.length)-o)/2;var p=Math.max(0,e);j=C+g*e+p*y}else{j=A/2}return{width:g,offset:h+j}},_renderColumnSeries:function(f,c){var j=this.seriesGroups[f];if(!j.series||j.series.length==0){return}var h=this._getDataLen(f);var e=j.orientation=="horizontal";var y=c;if(e){y={x:c.y,y:c.x,width:c.height,height:c.width}}var p=this._calcGroupOffsets(f,y);if(!p||p.xoffsets.length==0){return}var m;if(j.polar==true||j.spider==true){m=this._getPolarAxisCoords(f,y)}var r={groupIndex:f,rect:c,vertical:!e,seriesCtx:[],renderData:p,polarAxisCoords:m};r.columnGroupWidth=this._getColumnGroupWidth(f,p.xoffsets,e?y.height:y.width);var g=this._getGroupGradientType(f);for(var t=0;te){d=e}if(isNaN(d)){return NaN}return d},_getColumnVOffsets:function(n,j,e,B,u,c){var p=this.seriesGroups[j];var F=this._getPercent(p.columnsTopWidthPercent,100,0,100);var v=this._getPercent(p.columnsBottomWidthPercent,100,0,100);if(F==0&&v==0){v=100}var H=this._getPercent(p.columnsNeckHeightPercent,NaN,0,100)/100;var C=this._getPercent(p.columnsNeckWidthPercent,100,0,100)/100;var r=[];var G=NaN;for(var q=0;qj&&b[j].series.length>k){var D=n.xoffsets.xvalues[B];g=b[j].series[k][D];if(g&&!isNaN(g.from)&&!isNaN(g.to)){o=g.from+(o-g.from)*c;N=g.to+(N-g.to)*c;x=g.xoffset+(x-g.xoffset)*c}}if(!g){N=o+(N-o)*(u?1:c)}if(isNaN(o)){o=isNaN(G)?n.baseOffset:G}if(!isNaN(N)&&u){G=N}else{G=o}if(isNaN(N)){N=o}var A={from:o,to:N,xOffset:x};if(F!=100||v!=100){A.funnel=true;A.toWidthPercent=F;A.fromWidthPercent=v}r.push(A)}if(u&&r.length>1&&!(this._elementRenderInfo&&this._elementRenderInfo.length>j)){var l=0,m=0,I=-Infinity,w=Infinity,J=Infinity,z=-Infinity;for(var K=0;K=r[K].from){m+=r[K].to-r[K].from;J=Math.min(J,r[K].from);z=Math.max(z,r[K].to)}else{l+=r[K].from-r[K].to;I=Math.max(I,r[K].from);w=Math.min(w,r[K].to)}}}var M=l;var t=m;l*=c;m*=c;var d=0,f=0;for(var K=0;K=r[K].from){var y=r[K].to-r[K].from;if(y+f>m){y=Math.max(0,m-f);r[K].to=r[K].from+y}if(F!=100||v!=100){r[K].funnel=true;if(!isNaN(H)&&t*H>=f){r[K].fromWidthPercent=C*100}else{r[K].fromWidthPercent=(Math.abs(r[K].from-J)/t)*(F-v)+v}if(!isNaN(H)&&t*H>=(0+(f+y))){r[K].toWidthPercent=C*100}else{r[K].toWidthPercent=(Math.abs(r[K].to-J)/t)*(F-v)+v}}f+=y}else{var y=r[K].from-r[K].to;if(y+d>l){y=Math.max(0,l-d);r[K].to=r[K].from-y}if(F!=100||v!=100){r[K].funnel=true;if(!isNaN(H)&&M*H>=d){r[K].fromWidthPercent=C*100}else{r[K].fromWidthPercent=(Math.abs(r[K].from-I)/M)*(F-v)+v}if(!isNaN(H)&&M*H>=(0+(d+y))){r[K].toWidthPercent=C*100}else{r[K].toWidthPercent=(Math.abs(r[K].to-I)/M)*(F-v)+v}}d+=y}}}return r},_columnAsPieSlice:function(d,k,m,o){var e=this._toPolarCoord(m,k,o.x,o.y);var f=this._toPolarCoord(m,k,o.x,o.y+o.height);var l=a.jqx._ptdist(m.x,m.y,f.x,f.y);var i=a.jqx._ptdist(m.x,m.y,e.x,e.y);var c=k.width;var n=Math.abs(m.startAngle-m.endAngle)*180/Math.PI;var b=-((o.x-k.x)*n)/c;var h=-((o.x+o.width-k.x)*n)/c;var j=m.startAngle;j=360*j/(Math.PI*2);b-=j;h-=j;if(d){if(d.element!=undefined){var g=this.renderer.pieSlicePath(m.x,m.y,l,i,h,b,0);g+=" Z";this.renderer.attr(d.element,{d:g})}else{d.element=this.renderer.pieslice(m.x,m.y,l,i,h,b,0)}}return{fromAngle:h,toAngle:b,innerRadius:l,outerRadius:i}},_setRenderInfo:function(e,b,d,c){this._renderData[e].offsets[b][d].elementInfo=c},_getRenderInfo:function(d,b,c){return this._renderData[d].offsets[b][c].elementInfo||{}},_animColumns:function(ai,d){var p=this;var q=ai.groupIndex;var A=this.seriesGroups[q];var v=ai.renderData;var aa=A.type.indexOf("waterfall")!=-1;var G=this._getXAxis(q);var I=A.type.indexOf("stacked")!=-1;var e=ai.polarAxisCoords;var z=this._getGroupGradientType(q);var s=ai.columnGroupWidth.targetWidth;var y=-1;for(var ab=0;abah.xAdjust){aj=ah.xAdjust}if(isNaN(t)||t=1){C=0.25}var f=C*r;var Z=ai.renderData.xoffsets;var S=-1;var O={};var R=A.skipOverlappingPoints==true;for(var ad=Z.first;ad<=Z.last;ad++){var V=Z.data[ad];if(isNaN(V)){continue}if(S!=-1&&Math.abs(V-S)<(r-1+f)&&R){continue}else{S=V}var F=this._getColumnVOffsets(v,q,ai.seriesCtx,ad,I,d);var L=false;if(aa){for(var B=0;B1||T<0){T=1}}var X=A.columnsBottomWidthPercent/100;if(isNaN(X)){X=1}else{if(X>1||X<0){X=1}}var o=ai.vertical?Q.width:Q.height;ag.x=ag.x-o/2+o/2*T;if(L){var b=o*T/2;af.x=af.x+o/2-(G.flip?-b:b)}else{var b=o*X/2;af.x=af.x+o/2-(G.flip?-b:b)}if(!ai.vertical){this._swapXY([ag]);this._swapXY([af])}this.renderer.line(ag.x,ag.y,af.x,af.y,{stroke:M.color,"stroke-width":ae.stroke,"stroke-opacity":ae.opacity,"fill-opacity":ae.opacity,"stroke-dasharray":ae.dashStyle})}}}if(d==1&&n!=0){O[I?-1:B]={y:ak,x:(ai.vertical?Q.x+Q.width:Q.y+Q.height),color:W.lineColor}}}if(e){var U=this._toPolarCoord(e,ai.rect,Q.x+Q.width/2,Q.y);var o=this._showLabel(q,m,ad,Q,undefined,undefined,true);var J=H.outerRadius+10;var D=this._adjustTextBoxPosition(e.x,e.y,o,J,(H.fromAngle+H.toAngle)/2,true,false,false);P=this._showLabel(q,m,ad,{x:D.x,y:D.y},undefined,undefined,false,false,false)}else{P=this._showLabel(q,m,ad,Q,undefined,undefined,false,false,k)}c={element:u,labelElement:P};p._setRenderInfo(q,m,ad,c);if(d==1){this._installHandlers(u,"column",q,m,ad)}}}},_getTrapezoidPath:function(g,h,f){var l="";var b=g.fromWidthPercent/100;var c=g.toWidthPercent/100;if(!h){var e=g.width;g.width=g.height;g.height=e;e=g.x;g.x=g.y;g.y=e}var j=g.x+g.width/2;var k=[{x:j-g.width*(!f?b:c)/2,y:g.y+g.height},{x:j-g.width*(!f?c:b)/2,y:g.y},{x:j+g.width*(!f?c:b)/2,y:g.y},{x:j+g.width*(!f?b:c)/2,y:g.y+g.height}];if(!h){this._swapXY(k)}l+="M "+a.jqx._ptrnd(k[0].x)+","+a.jqx._ptrnd(k[0].y);for(var d=1;dw.offset){c=w.offset}if(isNaN(r)||rn){break}E=l;var D=t.items[A]=t.items[A]||{};for(var z in q){var F=t.self._getDataValueAsNumber(A,g.series[t.seriesIndex]["dataField"+q[z]],t.groupIndex);if(isNaN(F)){break}var k=t.renderData.offsets[t.seriesIndex][A][q[z]];if(isNaN(k)){break}D[q[z]]=k}l+=t.inverse?t.rect.y:t.rect.x;if(t.polarAxisCoords){var s=this._toPolarCoord(t.polarAxisCoords,this._plotRect,l,k);l=s.x;k=s.y}l=a.jqx._ptrnd(l);for(var f in q){D[f]=a.jqx._ptrnd(D[f])}var h=t.colors;if(!h){h=t.self._getColors(t.groupIndex,t.seriesIndex,A,t.gradientType)}if(!t.isOHLC){var u=D.lineElement;if(!u){u=t.inverse?this.renderer.line(D.Low,l,D.High,l):this.renderer.line(l,D.Low,l,D.High);this.renderer.attr(u,{fill:h.fillColor,"fill-opacity":t["fill-opacity"],"stroke-opacity":t["fill-opacity"],stroke:h.lineColor,"stroke-width":t["stroke-width"],"stroke-dasharray":t["stroke-dasharray"]});D.lineElement=u}var p=D.stickElement;l-=e/2;if(!p){var d=h.fillColor;if(D.Close<=D.Open&&h.fillColorAlt){d=h.fillColorAlt}p=t.inverse?this.renderer.rect(Math.min(D.Open,D.Close),l,Math.abs(D.Close-D.Open),e):this.renderer.rect(l,Math.min(D.Open,D.Close),e,Math.abs(D.Close-D.Open));this.renderer.attr(p,{fill:d,"fill-opacity":t["fill-opacity"],"stroke-opacity":t["fill-opacity"],stroke:h.lineColor,"stroke-width":t["stroke-width"],"stroke-dasharray":t["stroke-dasharray"]});D.stickElement=p}if(b==1){this._installHandlers(p,"column",t.groupIndex,t.seriesIndex,A)}}else{var o="M"+l+","+D.Low+" L"+l+","+D.High+" M"+(l-e/2)+","+D.Open+" L"+l+","+D.Open+" M"+(l+e/2)+","+D.Close+" L"+l+","+D.Close;if(t.inverse){o="M"+D.Low+","+l+" L"+D.High+","+l+" M"+D.Open+","+(l-e/2)+" L"+D.Open+","+l+" M"+D.Close+","+l+" L"+D.Close+","+(l+e/2)}var u=D.lineElement;if(!u){u=this.renderer.path(o,{});this.renderer.attr(u,{fill:h.fillColor,"fill-opacity":t["fill-opacity"],"stroke-opacity":t["fill-opacity"],stroke:h.lineColor,"stroke-width":t["stroke-width"],"stroke-dasharray":t["stroke-dasharray"]});D.lineElement=u}if(b==1){this._installHandlers(u,"column",t.groupIndex,t.seriesIndex,A)}}}},_renderScatterSeries:function(e,D,F){var u=this.seriesGroups[e];if(!u.series||u.series.length==0){return}var f=u.type.indexOf("bubble")!=-1;var v=u.orientation=="horizontal";var m=D;if(v){m={x:D.y,y:D.x,width:D.height,height:D.width}}var n=this._calcGroupOffsets(e,m);if(!n||n.xoffsets.length==0){return}var N=m.width;var c;if(u.polar||u.spider){c=this._getPolarAxisCoords(e,m);N=2*c.r}var V=this._alignValuesWithTicks(e);var t=this._getGroupGradientType(e);if(!F){F="to"}for(var g=0;gz){z=C}}}}var j=K.minRadius||K.minSymbolSize;if(isNaN(j)){j=N/50}var E=K.maxRadius||K.maxSymbolSize;if(isNaN(E)){E=N/25}if(j>E){E=j}var M=K.radius;if(isNaN(M)&&!isNaN(K.symbolSize)){M=(K.symbolType=="circle")?K.symbolSize/2:K.symbolSize}else{M=5}var G=this._getAnimProps(e,g);var B=G.enabled&&!this._isToggleRefresh&&n.xoffsets.length<5000?G.duration:0;var w={groupIndex:e,seriesIndex:g,symbolType:K.symbolType,symbolSize:K.symbolSize,"fill-opacity":T.opacity,"stroke-opacity":T.opacity,"stroke-width":T.stroke,"stroke-width-symbol":T.strokeSymbol,"stroke-dasharray":T.dashStyle,items:[],polarAxisCoords:c};var o=undefined;for(var S=n.xoffsets.first;S<=n.xoffsets.last;S++){var C=this._getDataValueAsNumber(S,A,e);if(typeof(C)!="number"){continue}var J=n.xoffsets.data[S];var H=n.xoffsets.xvalues[S];var I=n.offsets[g][S][F];if(Im.y+m.height){continue}if(isNaN(J)||isNaN(I)){continue}if(v){var Q=J;J=I;I=Q+D.y}else{J+=D.x}if(!l&&o&&this.enableSampling&&a.jqx._ptdist(o.x,o.y,J,I)<1){continue}o={x:J,y:I};var O=M;if(f){var p=this._getDataValueAsNumber(S,(K.radiusDataField||K.sizeDataField),e);if(typeof(p)!="number"){continue}O=j+(E-j)*(p-U)/Math.max(1,z-U);if(isNaN(O)){O=j}}n.offsets[g][S].radius=O;var k=NaN,P=NaN;var q=0;var b=this._elementRenderInfo;if(H!=undefined&&b&&b.length>e&&b[e].series.length>g){var d=b[e].series[g][H];if(d&&!isNaN(d.to)){k=d.to;P=d.xoffset;q=M;if(v){var Q=P;P=k;k=Q+D.y}else{P+=D.x}if(f){q=j+(E-j)*(d.valueRadius-U)/Math.max(1,z-U);if(isNaN(q)){q=j}}}}if(l){L=this._getColors(e,g,S,t)}w.items.push({from:q,to:O,itemIndex:S,fill:L.fillColor,stroke:L.lineColor,x:J,y:I,xFrom:P,yFrom:k})}this._animR(w,0);var h=this;var R;this._enqueueAnimation("series",undefined,undefined,B,function(s,i,r){h._animR(i,r)},w)}},_animR:function(o,g){var j=o.items;var p=o.symbolType||"circle";var c=o.symbolSize;for(var e=0;e=1){this._installHandlers(d,"circle",o.groupIndex,o.seriesIndex,n.itemIndex)}this._setRenderInfo(o.groupIndex,o.seriesIndex,j[e].itemIndex,{element:d,labelElement:h})}},_showMultiSeriesToolTip:function(n,l,e){var s=this;var w='
';var h="";for(var B=0;B"}w+=b+"

";h=b}for(var v=0;v"+o+"
\n"}}var z=this._get([s.toolTipClass,this.toThemeProperty("jqx-chart-tooltip-text",null)]);var C=this._get([s.toolTipBackground,"#FFFFFF"]);var D=this._get([s.toolTipLineColor,s._defaultLineColor]);var m=this._get([s.toolTipOpacity,1]);w+="
";var u=this.getItemCoord(s._ttEl.gidx,s._ttEl.sidx,s._ttEl.iidx);s._createTooltip(u,s.seriesGroups[s._ttEl.gidx],w,{css:z,fill:C,stroke:D,fillOpacity:m,symbolSize:3})},_showToolTip:function(K,I,n,e,b){var h=this;var w=h._getXAxis(n);var l=h._getValueAxis(n);if(h._ttEl&&n==h._ttEl.gidx&&e==h._ttEl.sidx&&b==h._ttEl.iidx){return}var s=h.seriesGroups[n];var g=s.series[e];var G=h.enableCrosshairs;if(h._pointMarker){K=parseInt(h._pointMarker.x+5);I=parseInt(h._pointMarker.y-5)}else{G=false}var X=G&&h.showToolTips==false;K=a.jqx._ptrnd(K);I=a.jqx._ptrnd(I);var m=h._ttEl==undefined;if(s.showToolTips==false||g.showToolTips==false){return}if(!h._ttEl){h._ttEl={}}h._ttEl.sidx=e;h._ttEl.gidx=n;h._ttEl.iidx=b;var f=0;for(var T=0;T1){h._showMultiSeriesToolTip(K,I,b);return}var z=h._get([g.toolTipFormatSettings,s.toolTipFormatSettings,l.toolTipFormatSettings,h.toolTipFormatSettings]);var F=h._get([g.toolTipFormatFunction,s.toolTipFormatFunction,l.toolTipFormatFunction,h.toolTipFormatFunction]);var O=h._getColors(n,e,b);var d=h._getDataValue(b,w.dataField,n);if(w.dataField==undefined||w.dataField==""){d=b}if(w.type=="date"){d=h._castAsDate(d,(z?z.dateFormat:undefined)||w.dateFormat)}var C="";if(a.isFunction(F)){var M={};var v=0;for(var k in g){if(k.indexOf("dataField")==0){M[k.substring(9,k.length).toLowerCase()]=h._getDataValue(b,g[k],n);v++}}if(v==0){M=h._getDataValue(b,undefined,n)}else{if(v==1){M=M[""]}}C=F(M,b,g,s,d,w)}else{C=h._getFormattedValue(n,e,b,z,F);var L=this._getAxisSettings(w);var P=L.toolTipFormatSettings;var U=L.toolTipFormatFunction;if(!U&&!P&&w.type=="date"){U=this._getDefaultDTFormatFn(w.baseUnit||"day")}var o=h._formatValue(d,P,U,n,e,b);if(!h._isPieGroup(n)){var N=(w.displayText||w.dataField||"");if(N.length>0){C=N+": "+o+"
"+C}else{C=o+"
"+C}}else{d=h._getDataValue(b,g.displayText||g.dataField,n);o=h._formatValue(d,P,U,n,e,b);C=o+": "+C}}var D=h.renderer.getRect();if(G){var J=a.jqx._ptrnd(h._pointMarker.x);var H=a.jqx._ptrnd(h._pointMarker.y);var B=h.crosshairsColor||h._defaultLineColor;if(s.polar||s.spider){var E=this._getPolarAxisCoords(n,this._plotRect);var c=a.jqx._ptdist(J,H,E.x,E.y);if(c>E.r){return}var A=Math.atan2(H-E.y,J-E.x);var p=Math.cos(A)*E.r+E.x;var W=Math.sin(A)*E.r+E.y;if(h._ttEl.vLine){h.renderer.attr(h._ttEl.vLine,{x1:E.x,y1:E.y,x2:p,y2:W})}else{h._ttEl.vLine=h.renderer.line(E.x,E.y,p,W,{stroke:B,"stroke-width":h.crosshairsLineWidth||1,"stroke-dasharray":h.crosshairsDashStyle||""})}}else{if(h._ttEl.vLine&&h._ttEl.hLine){h.renderer.attr(h._ttEl.vLine,{x1:J,x2:J});h.renderer.attr(h._ttEl.hLine,{y1:H,y2:H})}else{h._ttEl.vLine=h.renderer.line(J,h._plotRect.y,J,h._plotRect.y+h._plotRect.height,{stroke:B,"stroke-width":h.crosshairsLineWidth||1,"stroke-dasharray":h.crosshairsDashStyle||""});h._ttEl.hLine=h.renderer.line(h._plotRect.x,H,h._plotRect.x+h._plotRect.width,H,{stroke:B,"stroke-width":h.crosshairsLineWidth||1,"stroke-dasharray":h.crosshairsDashStyle||""})}}}if(!X&&h.showToolTips!=false){var Q=this._get([g.toolTipClass,s.toolTipClass,h.toolTipClass,this.toThemeProperty("jqx-chart-tooltip-text",null)]);var u=this._get([g.toolTipBackground,s.toolTipBackground,h.toolTipBackground,"#FFFFFF"]);var r=this._get([g.toolTipLineColor,s.toolTipLineColor,h.toolTipLineColor,O.lineColor]);var R=this._get([g.toolTipOpacity,s.toolTipOpacity,h.toolTipOpacity,1]);var q=this.getItemCoord(n,e,b);var V=0;if(h._pointMarker&&h._pointMarker.element){V=g.symbolSizeSelected;if(isNaN(V)){V=g.symbolSize}if(isNaN(V)||V>50||V<0){V=s.symbolSize}if(isNaN(V)||V>50||V<0){V=8}}h._createTooltip(q,s,C,{css:Q,fill:u,stroke:r,fillOpacity:R,symbolSize:V})}},_fitTooltip:function(c,h,j,k,e){var d={};var b=2+e/2;var f=7;if(h.x-j.width-f-b>c.x&&h.y+h.height/2-j.height/2>c.y&&h.y+h.height/2+j.height/2c.y&&h.y+h.height/2+j.height/2c.y&&h.x+h.width/2-j.width/2>c.x&&h.x+h.width/2+j.width/2c.x&&h.x+h.width/2+j.width/2h.height||((k.type.indexOf("stackedcolumn")!=-1||k.type.indexOf("stackedwaterfall")!=-1)&&k.orientation!="horizontal")){if(d.left){return d.left}if(d.right){return d.right}}else{if(d.top){return d.top}if(d.bottom){return d.bottom}}for(var g in d){if(d[g]){return d[g]}}return{arrowLocation:""}},_createTooltip:function(G,l,A,B){var u=this;var z=l.type;var E=false;var F=u._ttEl.box;if(!F){E=true;F=u._ttEl.box=document.createElement("div");var f=10000000;F.style.position="absolute";F.style.cursor="default";a(b).css({"z-index":f,"box-sizing":"content-box"});a(F).css({"z-index":f});a(document.body).append(F);var b=document.createElement("div");b.id="arrowOuterDiv";b.style.width="0px";b.style.height="0px";b.style.position="absolute";a(b).css({"z-index":f+1,"box-sizing":"content-box"});var h=document.createElement("div");h.id="arrowInnerDiv";h.style.width="0px";h.style.height="0px";h.style.position="absolute";var w=document.createElement("div");w.id="contentDiv";w.style.position="absolute";a(w).css({"box-sizing":"content-box",outline:"none",border:"1px solid transparent",padding:"3px","text-align":"center","vertical-align":"middle",margin:"0 0 0 0",cursor:"default"});a(w).addClass("jqx-rc-all");a(w).appendTo(a(F));a(b).appendTo(a(F));a(h).appendTo(a(F));a(h).css({"z-index":f+2,"box-sizing":"content-box"})}if(!A||A.length==0){a(F).fadeTo(0,0);return}w=a(F).find("#contentDiv")[0];b=a(F).find("#arrowOuterDiv")[0];h=a(F).find("#arrowInnerDiv")[0];h.style.opacity=b.style.opacity=B.fillOpacity;w.style.backgroundColor=B.fill;w.style.borderColor=B.stroke;w.style.opacity=B.fillOpacity;var p=""+A+"";a(w).html(p);var t=this._measureHtml(p,"jqx-rc-all jqx-button");var c=u._plotRect;if(t.width>c.width||t.height>c.height){return}var r={width:t.width,height:t.height};var j="";var D=5;var s=7;var v=u._isColumnType(z);var o=Math.max(G.x,c.x);var m=Math.max(G.y,c.y);if(u.toolTipAlignment=="dataPoint"){if(z.indexOf("pie")!=-1||z.indexOf("donut")!=-1){var n=(G.fromAngle+G.toAngle)/2;n=n*(Math.PI/180);var g=(!isNaN(G.innerRadius)&&G.innerRadius>0)?(G.innerRadius+G.outerRadius)/2:G.outerRadius*0.75;o=G.x=G.center.x+Math.cos(n)*g;m=G.y=G.center.y-Math.sin(n)*g;G.width=G.height=1}else{if(v&&(l.polar||l.spider)){G.width=G.height=1}}var C=this._fitTooltip(this._plotRect,G,r,l,B.symbolSize);if(C.arrowLocation!=""){j=C.arrowLocation;o=C.x;m=C.y;r.width=C.width;r.height=C.height}}else{j=""}if(j=="top"||j=="bottom"){r.height+=s;o-=s/2;if(j=="bottom"){m-=s}}else{if(j=="left"||j=="right"){r.width+=s;m-=s/2;if(j=="right"){o-=s}}}if(o+r.width>c.x+c.width){j="";o=c.x+c.width-r.width}if(m+r.height>c.y+c.height){j="";m=c.y+c.height-r.height}var i={x:0,y:0},e={x:0,y:0};a(w).css({width:t.width,height:t.height,left:0,top:0});b.style["margin-top"]=b.style["margin-left"]=0;h.style["margin-top"]=h.style["margin-left"]=0;w.style["margin-top"]=w.style["margin-left"]=0;var k=s+"px solid";var d=s+"px solid transparent";switch(j){case"left":i={x:0,y:(t.height-s)/2};e={x:s,y:0};w.style["margin-left"]=s+"px";b.style["margin-left"]=0+"px";b.style["margin-top"]=i.y+"px";b.style["border-left"]="";b.style["border-right"]=k+" "+B.stroke;b.style["border-top"]=d;b.style["border-bottom"]=d;h.style["margin-left"]=1+"px";h.style["margin-top"]=i.y+"px";h.style["border-left"]="";h.style["border-right"]=k+" "+B.fill;h.style["border-top"]=d;h.style["border-bottom"]=d;break;case"right":i={x:r.width-s,y:(t.height-s)/2};e={x:0,y:0};b.style["margin-left"]=i.x+"px";b.style["margin-top"]=i.y+"px";b.style["border-left"]=k+" "+B.stroke;b.style["border-right"]="";b.style["border-top"]=d;b.style["border-bottom"]=d;h.style["margin-left"]=i.x-1+"px";h.style["margin-top"]=i.y+"px";h.style["border-left"]=k+" "+B.fill;h.style["border-right"]="";h.style["border-top"]=d;h.style["border-bottom"]=d;break;case"top":i={x:r.width/2-s/2,y:0};e={x:0,y:s};w.style["margin-top"]=e.y+"px";b.style["margin-left"]=i.x+"px";b.style["border-top"]="";b.style["border-bottom"]=k+" "+B.stroke;b.style["border-left"]=d;b.style["border-right"]=d;h.style["margin-left"]=i.x+"px";h.style["margin-top"]=1+"px";h.style["border-top"]="";h.style["border-bottom"]=k+" "+B.fill;h.style["border-left"]=d;h.style["border-right"]=d;break;case"bottom":i={x:r.width/2-s/2,y:r.height-s};e={x:0,y:0};b.style["margin-left"]=i.x+"px";b.style["margin-top"]=i.y+"px";b.style["border-top"]=k+" "+B.stroke;b.style["border-bottom"]="";b.style["border-left"]=d;b.style["border-right"]=d;h.style["margin-left"]=i.x+"px";h.style["margin-top"]=i.y-1+"px";h.style["border-top"]=k+" "+B.fill;h.style["border-bottom"]="";h.style["border-left"]=d;h.style["border-right"]=d;break}if(j==""){a(b).hide();a(h).hide()}else{a(b).show();a(h).show()}a(F).css({width:r.width+"px",height:r.height+"px"});var q=u.host.coord();if(E){a(F).fadeOut(0,0);F.style.left=o+q.left+"px";F.style.top=m+q.top+"px"}a(F).clearQueue();a(F).animate({left:o+q.left,top:m+q.top,opacity:1},u.toolTipMoveDuration,"easeInOutCirc");a(F).fadeTo(400,1)},_measureHtml:function(c,b){var e=this._measureDiv;if(!e){this._measureDiv=e=document.createElement("div");e.style.position="absolute";e.style.cursor="default";e.style.overflow="hidden";e.style.display="none";a(e).addClass(b);this.host.append(e)}a(e).html(c);var d={width:a(e).width()+2,height:a(e).height()+2};if(a.jqx.browser&&a.jqx.browser.mozilla){d.height+=3}return d},_hideToolTip:function(b){if(!this._ttEl){return}if(this._ttEl.box){if(b==0){a(this._ttEl.box).hide()}else{a(this._ttEl.box).fadeOut()}}this._hideCrosshairs();this._ttEl.gidx=undefined},_hideCrosshairs:function(){if(!this._ttEl){return}if(this._ttEl.vLine){this.renderer.removeElement(this._ttEl.vLine);this._ttEl.vLine=undefined}if(this._ttEl.hLine){this.renderer.removeElement(this._ttEl.hLine);this._ttEl.hLine=undefined}},_get:function(b){return a.jqx.getByPriority(b)},_getAxisSettings:function(f){if(!f){return{}}var l=this;var k=f.gridLines||{};var n={visible:this._get([k.visible,f.showGridLines,true]),color:l._get([k.color,f.gridLinesColor,l._defaultLineColor]),unitInterval:l._get([k.unitInterval,k.interval,f.gridLinesInterval]),step:l._get([k.step,f.gridLinesStep]),dashStyle:l._get([k.dashStyle,f.gridLinesDashStyle]),width:l._get([k.lineWidth,1]),offsets:[],alternatingBackgroundColor:f.alternatingBackgroundColor,alternatingBackgroundColor2:f.alternatingBackgroundColor2,alternatingBackgroundOpacity:f.alternatingBackgroundOpacity};var d=f.tickMarks||{};var h={visible:this._get([d.visible,f.showTickMarks,true]),color:l._get([d.color,f.tickMarksColor,l._defaultLineColor]),unitInterval:l._get([d.unitInterval,d.interval,f.tickMarksInterval]),step:l._get([d.step,f.tickMarksStep]),dashStyle:l._get([d.dashStyle,f.tickMarksDashStyle]),width:l._get([d.lineWidth,1]),size:l._get([d.size,4]),offsets:[]};var e=f.title||{};var c={visible:l._get([e.visible,true]),text:l._get([f.description,e.text]),style:l._get([f.descriptionClass,e["class"],l.toThemeProperty("jqx-chart-axis-description",null)]),halign:l._get([f.horizontalDescriptionAlignment,e.horizontalAlignment,"center"]),valign:l._get([f.verticalDescriptionAlignment,e.verticalAlignment,"center"]),angle:0,rotationPoint:l._get([e.rotationPoint,"centercenter"]),offset:l._get([e.offset,{x:0,y:0}])};var i=f.line||{};var b={visible:l._get([i.visible,true]),color:l._get([i.color,n.color,l._defaultLineColor]),dashStyle:l._get([i.dashStyle,n.dashStyle,""]),width:l._get([i.lineWidth,1]),angle:l._get([i.angle,NaN])};var j=f.padding||{};j={left:j.left||0,right:j.right||0,top:j.top||0,bottom:j.bottom||0};var g=this._getAxisLabelsSettings(f);var m={visible:this._get([f.visible,f.showValueAxis,f.showXAxis,f.showCategoryAxis,true]),customDraw:this._get([f.customDraw,false]),gridLines:n,tickMarks:h,line:b,title:c,labels:g,padding:j,toolTipFormatFunction:this._get([f.toolTipFormatFunction,f.formatFunction,g.formatFunction]),toolTipFormatSettings:this._get([f.toolTipFormatSettings,f.formatSettings,g.formatSettings])};return m},_getAxisLabelsSettings:function(d){var b=this;var e=d.labels||{};var c={visible:b._get([d.showLabels,e.visible,true]),unitInterval:b._get([e.unitInterval,e.interval,d.labelsInterval]),step:b._get([e.step,d.labelsStep]),angle:b._get([d.textRotationAngle,e.angle,0]),style:b._get([d["class"],e["class"],b.toThemeProperty("jqx-chart-axis-text",null)]),halign:b._get([d.horizontalTextAlignment,e.horizontalAlignment,"center"]),valign:b._get([d.verticalTextAlignment,e.verticalAlignment,"center"]),textRotationPoint:b._get([d.textRotationPoint,e.rotationPoint,"auto"]),textOffset:b._get([d.textOffset,e.offset,{x:0,y:0}]),autoRotate:b._get([d.labelsAutoRotate,e.autoRotate,false]),formatSettings:b._get([d.formatSettings,e.formatSettings,undefined]),formatFunction:b._get([d.formatFunction,e.formatFunction,undefined])};return c},_getLabelsSettings:function(p,l,h,t){var j=this.seriesGroups[p];var r=j.series[l];var m=isNaN(h)?undefined:this._getDataValue(h,r.dataField,p);var k=t||["Visible","Offset","Angle","HorizontalAlignment","VerticalAlignment","Class","BackgroundColor","BorderColor","BorderOpacity","Padding","Opacity","BackgroundOpacity","LinesAngles","LinesEnabled","AutoRotate","Radius"];var q={};for(var f=0;f0){if(t==""||t=="center"){p+=(s-C.width)/2}else{if(t=="right"){p+=(s-C.width)}}}if(H>0){if(i==""||i=="center"){n+=(H-C.height)/2}else{if(i=="bottom"){n+=(H-C.height)}}}p+=b.x+G.x;n+=b.y+G.y;var o=this._plotRect;if(p<=o.x){p=o.x+2}if(n<=o.y){n=o.y+2}var l={width:Math.max(C.width,1),height:Math.max(C.height,1)};if(n+l.height>=o.y+o.height){n=o.y+o.height-(q?(l.height+q.height)/2:l.height)-2}if(p+l.width>=o.x+o.width){p=o.x+o.width-l.width-2}var d;var A=I.backgroundColor;var D=I.borderColor;var z=I.padding;if(A||D){d=this.renderer.beginGroup();var b=this.renderer.rect(p-z.left,n-z.top,C.width+z.left+z.right,C.height+z.bottom+z.bottom,{fill:A||"transparent","fill-opacity":I.backgroundOpacity||1,stroke:D||"transparent","stroke-opacity":I.borderOpacity,"stroke-width":1})}var u=this.renderer.text(v,p,n,C.width,C.height,g,{"class":I["class"],opacity:I.opacity||1},false,"center","center");if(B){B.x=p-z.left;B.y=n-z.top;B.width=C.width+z.left+z.right;B.height=C.height+z.bottom+z.bottom}if(this._isVML){this.renderer.removeElement(u);this.renderer.getContainer()[0].appendChild(u)}if(d){this.renderer.endGroup()}return d||u},_getAnimProps:function(j,f){var e=this.seriesGroups[j];var c=!isNaN(f)?e.series[f]:undefined;var b=this.enableAnimations==true;if(e.enableAnimations){b=e.enableAnimations==true}if(c&&c.enableAnimations){b=c.enableAnimations==true}var i=this.animationDuration;if(isNaN(i)){i=1000}var d=e.animationDuration;if(!isNaN(d)){i=d}if(c){var h=c.animationDuration;if(!isNaN(h)){i=h}}if(i>5000){i=1000}return{enabled:b,duration:i}},_isColorTransition:function(f,d,e,g){if(g-1=0;n--){var g=this._getSerieSettings(k,n);var ah={groupIndex:k,rect:y,serieIndex:n,swapXY:aj,isArea:s,isSpline:ae,isRange:O,isPolar:af,settings:g,segments:[],pointsLength:0};var j=this._isSerieVisible(k,n);if(!j){this._linesRenderInfo[k][n]=ah;continue}var J=H.series[n];if(J.customDraw){continue}var w=a.isFunction(J.colorFunction);var U=C.xoffsets.first;var G=U;var N=this._getColors(k,n,NaN,this._getGroupGradientType(k));var ab=false;var u;do{var W=[];var T=[];var r=[];var P=-1;var p=0,o=0;var R=NaN;var E=NaN;var ai=NaN;if(C.xoffsets.length<1){continue}var S=this._getAnimProps(k,n);var L=S.enabled&&!this._isToggleRefresh&&C.xoffsets.length<10000&&this._isVML!=true?S.duration:0;var v=U;u=false;var d=this._getColors(k,n,U,this._getGroupGradientType(k));var D=undefined;for(var ad=U;ad<=C.xoffsets.last;ad++){U=ad;var X=C.xoffsets.data[ad];var V=C.xoffsets.xvalues[ad];if(isNaN(X)){continue}X=Math.max(X,1);p=X;o=C.offsets[n][ad].to;if(!w&&D&&this.enableSampling&&a.jqx._ptdist(D.x,D.y,p,o)<1){continue}D={x:p,y:o};var aa=C.offsets[n][ad].from;if(isNaN(o)||isNaN(aa)){if(J.emptyPointsDisplay=="connect"){continue}else{if(J.emptyPointsDisplay=="zero"){if(isNaN(o)){o=C.baseOffset}if(isNaN(aa)){aa=C.baseOffset}}else{u=true;break}}}if(w&&this._isColorTransition(k,n,C,U)){if(W.length>1){U--;break}}var c=this._elementRenderInfo;if(c&&c.length>k&&c[k].series.length>n){var f=c[k].series[n][V];var ai=a.jqx._ptrnd(f?f.to:undefined);var I=a.jqx._ptrnd(y.x+(f?f.xoffset:undefined));r.push(aj?{y:I,x:ai,index:ad}:{x:I,y:ai,index:ad})}G=ad;if(g.stroke<2){if(o-y.y<=1){o=y.y+1}if(aa-y.y<=1){aa=y.y+1}if(y.y+y.height-o<=1){o=y.y+y.height-1}if(y.y+y.height-aa<=1){aa=y.y+y.height-1}}if(!s&&e){if(o<=y.y){o=y.y+1}if(o>=y.y+y.height){o=y.y+y.height-1}if(aa<=y.y){aa=y.y+1}if(aa>=y.y+y.height){aa=y.y+y.height-1}}X=Math.max(X,1);p=X+y.x;if(H.skipOverlappingPoints==true&&!isNaN(R)&&Math.abs(R-p)<=1){continue}if(t&&!isNaN(R)&&!isNaN(E)){if(E!=o){W.push(aj?{y:p,x:a.jqx._ptrnd(E)}:{x:p,y:a.jqx._ptrnd(E)})}}W.push(aj?{y:p,x:a.jqx._ptrnd(o),index:ad}:{x:p,y:a.jqx._ptrnd(o),index:ad});T.push(aj?{y:p,x:a.jqx._ptrnd(aa),index:ad}:{x:p,y:a.jqx._ptrnd(aa),index:ad});R=p;E=o;if(isNaN(ai)){ai=o}}if(W.length==0){U++;continue}var F=W[W.length-1].index;if(w){N=this._getColors(k,n,F,this._getGroupGradientType(k))}var l=y.x+C.xoffsets.data[v];var Z=y.x+C.xoffsets.data[G];if(s&&H.alignEndPointsWithIntervals==true){var A=B?-1:1;if(l>y.x){l=y.x}if(ZB.x+B.width||t.yB.y+B.height){continue}if(v!="none"){var n=this._getColors(f,g,u.pointsArray[z].index,this._getGroupGradientType(f));var e=this._drawSymbol(v,t.x,t.y,n.fillColorSymbol,A.opacity,n.lineColorSymbol,A.opacity,A.strokeSymbol,undefined,C);u.symbolElements.push(e)}if(p){var k=(z>0?r[z-1]:r[z]).split(",");k={x:parseFloat(k[0]),y:parseFloat(k[1])};var m=(z0){s+=" "}var k=o[u].y;var l=o[u].x;var b=!z?k:f;var d=l;if(n&&n.length>u){b=n[u].y;d=n[u].x;if(isNaN(b)||isNaN(d)){b=k;d=l}}j=d;if(t<=o.length&&u>0&&u==t){d=o[u-1].x;b=o[u-1].y}if(c){l=a.jqx._ptrnd((l-b)*(z?e:1)+b);k=a.jqx._ptrnd(k)}else{l=a.jqx._ptrnd((l-d)*e+d);k=a.jqx._ptrnd((k-b)*e+b)}if(m){var q=this._toPolarCoord(m,this._plotRect,l,k);l=q.x;k=q.y}s+=l+","+k}return s},_buildLineCmd:function(k,o,g,s,e,m,d,r,c,j,f,b){var p=k;var l=b?d+","+g:g+","+d;var h=b?d+","+s:s+","+d;if(r&&!c&&!o){p=l+" "+k+" "+h}if(f){p=this._getBezierPoints(p)}var n=p.split(" ");if(n.length==0){return""}if(n.length==1){var q=n[0].split(",");return"M "+n[0]+" L"+(parseFloat(q[0])+1)+","+(parseFloat(q[1])+1)}var i=n[0].replace("M","");if(r&&!c){if(!o){p="M "+l+" L "+i+" "+p}else{p="M "+i+" L "+i+(f?"":(" L "+i+" "))+p}}else{if(!f){p="M "+i+" L "+i+" "+p}}if((c&&j)||o){p+=" Z"}return p},_getSerieSettings:function(i,c){var h=this.seriesGroups[i];var g=h.type.indexOf("area")!=-1;var f=h.type.indexOf("line")!=-1;var d=h.series[c];var k=d.dashStyle||h.dashStyle||"";var e=d.opacity||h.opacity;if(isNaN(e)||e<0||e>1){e=1}var j=d.lineWidth;if(isNaN(j)&&j!="auto"){j=h.lineWidth}if(j=="auto"||isNaN(j)||j<0||j>15){if(g){j=2}else{if(f){j=3}else{j=1}}}var b=d.lineWidthSymbol;if(isNaN(b)){b=1}return{stroke:j,strokeSymbol:b,opacity:e,dashStyle:k}},_getColors:function(u,p,d,e,b){var k=this.seriesGroups[u];var o=k.series[p];var c=this._get([o.useGradientColors,k.useGradientColors,k.useGradient,true]);var l=this._getSeriesColors(u,p,d);if(!l.fillColor){l.fillColor=r;l.fillColorSelected=a.jqx.adjustColor(r,1.1);l.fillColorAlt=a.jqx.adjustColor(r,4);l.fillColorAltSelected=a.jqx.adjustColor(r,3);l.lineColor=l.symbolColor=a.jqx.adjustColor(r,0.9);l.lineColorSelected=l.symbolColorSelected=a.jqx.adjustColor(r,0.9)}var h=[[0,1.4],[100,1]];var f=[[0,1],[25,1.1],[50,1.4],[100,1]];var n=[[0,1.3],[90,1.2],[100,1]];var j=NaN;if(!isNaN(b)){j=b==2?h:f}if(c){var q={};for(var s in l){q[s]=l[s]}l=q;if(e=="verticalLinearGradient"||e=="horizontalLinearGradient"){var g=e=="verticalLinearGradient"?j||h:j||f;var m=["fillColor","fillColorSelected","fillColorAlt","fillColorAltSelected"];for(var v in m){var r=l[m[v]];if(r){l[m[v]]=this.renderer._toLinearGradient(r,e=="verticalLinearGradient",g)}}}else{if(e=="radialGradient"){var t;var j=h;if((k.type=="pie"||k.type=="donut"||k.polar)&&d!=undefined&&this._renderData[u]&&this._renderData[u].offsets[p]){t=this._renderData[u].offsets[p][d];j=n}l.fillColor=this.renderer._toRadialGradient(l.fillColor,j,t);l.fillColorSelected=this.renderer._toRadialGradient(l.fillColorSelected,j,t)}}}return l},_installHandlers:function(c,f,i,h,d){if(!this.enableEvents){return false}var j=this;var e=this.seriesGroups[i];var k=this.seriesGroups[i].series[h];var b=e.type.indexOf("line")!=-1||e.type.indexOf("area")!=-1;if(!b&&!(e.enableSelection==false||k.enableSelection==false)){this.renderer.addHandler(c,"mousemove",function(m){var l=j._selected;if(l&&l.isLineType&&l.linesUnselectMode=="click"&&!(l.group==i&&l.series==h)){return}var g=m.pageX||m.clientX||m.screenX;var o=m.pageY||m.clientY||m.screenY;var n=j.host.offset();g-=n.left;o-=n.top;if(j._mouseX==g&&j._mouseY==o){return}if(j._ttEl){if(j._ttEl.gidx==i&&j._ttEl.sidx==h&&j._ttEl.iidx==d){return}}j._startTooltipTimer(i,h,d)})}if(!(e.enableSelection==false||k.enableSelection==false)){this.renderer.addHandler(c,"mouseover",function(l){var g=j._selected;if(g&&g.isLineType&&g.linesUnselectMode=="click"&&!(g.group==i&&g.series==h)){return}j._select(c,f,i,h,d,d)})}this.renderer.addHandler(c,"click",function(g){clearTimeout(j._hostClickTimer);j._lastClickTs=(new Date()).valueOf();if(b&&(f!="symbol"&&f!="pointMarker")){return}if(j._isColumnType(e.type)){j._unselect()}if(isNaN(d)){return}g.stopImmediatePropagation();j._raiseItemEvent("click",e,k,d)})},_getHorizontalOffset:function(A,s,k,j){var c=this._plotRect;var h=this._getDataLen(A);if(h==0){return{index:undefined,value:k}}var p=this._calcGroupOffsets(A,this._plotRect);if(p.xoffsets.length==0){return{index:undefined,value:undefined}}var n=k;var m=j;var w=this.seriesGroups[A];var l;if(w.polar||w.spider){l=this._getPolarAxisCoords(A,c)}var e=this._getXAxis(A).flip==true;var b,o,v,f;for(var t=p.xoffsets.first;t<=p.xoffsets.last;t++){var u=p.xoffsets.data[t];var d=p.offsets[s][t].to;var q=0;if(l){var r=this._toPolarCoord(l,c,u+c.x,d);u=r.x;d=r.y;q=a.jqx._ptdist(n,m,u,d)}else{if(w.orientation=="horizontal"){u+=c.y;var z=d;d=u;u=z;q=a.jqx._ptdist(n,m,u,d)}else{u+=c.x;q=Math.abs(n-u)}}if(isNaN(b)||b>q){b=q;o=t;v=u;f=d}}return{index:o,value:p.xoffsets.data[o],polarAxisCoords:l,x:v,y:f}},onmousemove:function(k,j){if(this._mouseX==k&&this._mouseY==j){return}this._mouseX=k;this._mouseY=j;if(!this._selected){return}var B=this._selected.group;var q=this._selected.series;var v=this.seriesGroups[B];var n=v.series[q];var b=this._plotRect;if(this.renderer){b=this.renderer.getRect();b.x+=5;b.y+=5;b.width-=10;b.height-=10}if(kb.x+b.width||jb.y+b.height){this._hideToolTip();this._unselect();return}var e=v.orientation=="horizontal";var b=this._plotRect;if(v.type.indexOf("line")!=-1||v.type.indexOf("area")!=-1){var f=this._getHorizontalOffset(B,this._selected.series,k,j);var u=f.index;if(u==undefined){return}if(this._selected.item!=u){var p=this._linesRenderInfo[B][q].segments;var r=0;while(u>p[r].lastItemIndex){r++;if(r>=p.length){return}}var c=p[r].pathElement;var C=p[r].lastItemIndex;this._unselect(false);this._select(c,"path",B,q,u,C)}var m=this._getSymbol(this._selected.group,this._selected.series);if(m=="none"){m="circle"}var o=this._calcGroupOffsets(B,b);var d=o.offsets[this._selected.series][u].to;var t=d;if(v.type.indexOf("range")!=-1){t=o.offsets[this._selected.series][u].from}var l=e?k:j;if(!isNaN(t)&&Math.abs(l-t)50||A<0){A=v.symbolSize}if(isNaN(A)||A>50||A<0){A=8}if(this.showToolTips||this.enableCrosshairs){this._pointMarker={type:m,x:k,y:j,gidx:B,sidx:q,iidx:u};this._pointMarker.element=this._drawSymbol(m,k,j,h.fillColorSymbolSelected,w.opacity,h.lineColorSymbolSelected,w.opacity,w.strokeSymbol,w.dashStyle,A);this._installHandlers(this._pointMarker.element,"pointMarker",B,q,u)}this._startTooltipTimer(B,this._selected.series,u)}},_drawSymbol:function(i,l,j,c,m,k,f,g,b,o){var e;var h=o||6;var d=h/2;switch(i){case"none":return undefined;case"circle":e=this.renderer.circle(l,j,h/2);break;case"square":h=h-1;d=h/2;e=this.renderer.rect(l-d,j-d,h,h);break;case"diamond":var n="M "+(l-d)+","+(j)+" L"+(l)+","+(j-d)+" L"+(l+d)+","+(j)+" L"+(l)+","+(j+d)+" Z";e=this.renderer.path(n);break;case"triangle_up":case"triangle":var n="M "+(l-d)+","+(j+d)+" L "+(l+d)+","+(j+d)+" L "+(l)+","+(j-d)+" Z";e=this.renderer.path(n);break;case"triangle_down":var n="M "+(l-d)+","+(j-d)+" L "+(l)+","+(j+d)+" L "+(l+d)+","+(j-d)+" Z";e=this.renderer.path(n);break;case"triangle_left":var n="M "+(l-d)+","+(j)+" L "+(l+d)+","+(j+d)+" L "+(l+d)+","+(j-d)+" Z";e=this.renderer.path(n);break;case"triangle_right":var n="M "+(l-d)+","+(j-d)+" L "+(l-d)+","+(j+d)+" L "+(l+d)+","+(j)+" Z";e=this.renderer.path(n);break;default:e=this.renderer.circle(l,j,h)}this.renderer.attr(e,{fill:c,"fill-opacity":m,stroke:k,"stroke-width":g,"stroke-opacity":f,"stroke-dasharray":b||""});if(i!="circle"){this.renderer.attr(e,{r:h/2});if(i!="square"){this.renderer.attr(e,{x:l,y:j})}}return e},_getSymbol:function(f,b){var c=["circle","square","diamond","triangle_up","triangle_down","triangle_left","triangle_right"];var e=this.seriesGroups[f];var d=e.series[b];var h;if(d.symbolType!=undefined){h=d.symbolType}if(h==undefined){h=e.symbolType}if(h=="default"){return c[b%c.length]}else{if(h!=undefined){return h}}return"none"},_startTooltipTimer:function(k,j,d,i,h,b,f){this._cancelTooltipTimer();var l=this;var e=l.seriesGroups[k];var c=this.toolTipShowDelay||this.toolTipDelay;if(isNaN(c)||c>10000||c<0){c=500}if(this._ttEl||(true==this.enableCrosshairs&&false==this.showToolTips)){c=0}if(!isNaN(b)){c=b}clearTimeout(this._tttimerHide);if(isNaN(i)){i=l._mouseX}if(isNaN(h)){h=l._mouseY-3}if(c==0){l._showToolTip(i,h,k,j,d)}this._tttimer=setTimeout(function(){if(c!=0){l._showToolTip(i,h,k,j,d)}var g=l.toolTipHideDelay;if(!isNaN(f)){g=f}if(isNaN(g)){g=4000}l._tttimerHide=setTimeout(function(){l._hideToolTip();l._unselect()},g)},c)},_cancelTooltipTimer:function(){clearTimeout(this._tttimer)},_getGroupGradientType:function(c){var b=this.seriesGroups[c];if(b.type.indexOf("area")!=-1){return b.orientation=="horizontal"?"horizontalLinearGradient":"verticalLinearGradient"}else{if(this._isColumnType(b.type)||b.type.indexOf("candle")!=-1){if(b.polar){return"radialGradient"}return b.orientation=="horizontal"?"verticalLinearGradient":"horizontalLinearGradient"}else{if(b.type.indexOf("scatter")!=-1||b.type.indexOf("bubble")!=-1||this._isPieGroup(c)){return"radialGradient"}}}return undefined},_select:function(h,l,o,n,i,m){if(this._selected){if((this._selected.item!=i||this._selected.series!=n||this._selected.group!=o)){this._unselect()}else{return}}var k=this.seriesGroups[o];var p=k.series[n];if(k.enableSelection==false||p.enableSelection==false){return}var f=k.type.indexOf("line")!=-1&&k.type.indexOf("area")==-1;this._selected={element:h,type:l,group:o,series:n,item:i,iidxBase:m,isLineType:f,linesUnselectMode:p.linesUnselectMode||k.linesUnselectMode};var b=this._getColors(o,n,m||i,this._getGroupGradientType(o));var c=b.fillColorSelected;if(f){c="none"}var e=this._getSerieSettings(o,n);var d=(l=="symbol")?b.lineColorSymbolSelected:b.lineColorSelected;c=(l=="symbol")?b.fillColorSymbolSelected:c;var j=(l=="symbol")?1:e.stroke;if(this.renderer.getAttr(h,"fill")==b.fillColorAlt){c=b.fillColorAltSelected}this.renderer.attr(h,{stroke:d,fill:c,"stroke-width":j});if(k.type.indexOf("pie")!=-1||k.type.indexOf("donut")!=-1){this._applyPieSelect()}this._raiseItemEvent("mouseover",k,p,i)},_applyPieSelect:function(){var c=this;c._createAnimationGroup("animPieSlice");var e=this._selected;if(!e){return}var f=this.getItemCoord(e.group,e.series,e.item);if(!f){return}var d=this._getRenderInfo(e.group,e.series,e.item);var b={element:d,coord:f};this._enqueueAnimation("animPieSlice",undefined,undefined,300,function(i,g,j){var l=g.coord;var h=l.selectedRadiusChange*j;var k=c.renderer.pieSlicePath(l.center.x,l.center.y,l.innerRadius==0?0:(l.innerRadius+h),l.outerRadius+h,l.fromAngle,l.toAngle,l.centerOffset);c.renderer.attr(g.element.element,{d:k});c._showPieLabel(e.group,e.series,e.item,undefined,h)},b);c._startAnimation("animPieSlice")},_applyPieUnselect:function(){this._stopAnimations();var b=this._selected;if(!b){return}var d=this.getItemCoord(b.group,b.series,b.item);if(!d||!d.center){return}var c=this.renderer.pieSlicePath(d.center.x,d.center.y,d.innerRadius,d.outerRadius,d.fromAngle,d.toAngle,d.centerOffset);this.renderer.attr(b.element,{d:c});this._showPieLabel(b.group,b.series,b.item,undefined,0)},_unselect:function(){var o=this;if(o._selected){var n=o._selected.group;var m=o._selected.series;var f=o._selected.item;var k=o._selected.iidxBase;var j=o._selected.type;var i=o.seriesGroups[n];var p=i.series[m];var e=i.type.indexOf("line")!=-1&&i.type.indexOf("area")==-1;var b=o._getColors(n,m,k||f,o._getGroupGradientType(n));var c=b.fillColor;if(e){c="none"}var d=o._getSerieSettings(n,m);var l=(j=="symbol")?b.lineColorSymbol:b.lineColor;c=(j=="symbol")?b.fillColorSymbol:c;if(this.renderer.getAttr(o._selected.element,"fill")==b.fillColorAltSelected){c=b.fillColorAlt}var h=(j=="symbol")?1:d.stroke;o.renderer.attr(o._selected.element,{stroke:l,fill:c,"stroke-width":h});if(i.type.indexOf("pie")!=-1||i.type.indexOf("donut")!=-1){this._applyPieUnselect()}o._selected=undefined;if(!isNaN(f)){o._raiseItemEvent("mouseout",i,p,f)}}if(o._pointMarker){if(o._pointMarker.element){o.renderer.removeElement(o._pointMarker.element);o._pointMarker.element=undefined}o._pointMarker=undefined;o._hideCrosshairs()}},_raiseItemEvent:function(f,g,e,c){var d=e[f]||g[f];var h=0;for(;h=1){c*=10}else{c/=10}for(var e=1;eMath.abs(g[e]*c-k)){l=e}else{break}}}while(l==g.length-1);return g[l]*c},_renderDataClone:function(){if(!this._renderData||this._isToggleRefresh){return}var d=this._elementRenderInfo=[];if(this._isSelectorRefresh){return}for(var h=0;h=this._renderData.length){return}var e=this.seriesGroups[d];var c=this._renderData[d].xAxis;if(!c){return}if(e.xAxis==undefined){for(var b=0;b<=d;b++){if(this.seriesGroups[b].xAxis==undefined){break}}c=this._renderData[b].xAxis}return c},getXAxisDataPointOffset:function(j,l){var k=this.seriesGroups[l];if(isNaN(j)){return NaN}var m=this._getXAxisRenderData(l);if(!m){return NaN}var f=m.data.axisStats;var i=f.min.valueOf();var b=f.max.valueOf();var g=b-i;if(g==0){g=1}if(j.valueOf()>b||j.valueOf()ag.max){r=ag.max}if(r=r)?ah:ad}else{I=W[ac]}}var af=M*(I-r);if(J){af=M*(I-ap)}if(E&&ao){if(!am[ac]){am[ac]=true;af=M*(I-r)}else{af=M*I}}if(O){while(m.length<=ac){m.push({p:{value:0,height:0},n:{value:0,height:0}})}var A=(J||J)?ap:r;var aa=I>A?m[ac].p:m[ac].n;aa.value+=I;if(d){I=aa.value/(ag.psums[ac]+ag.nsums[ac])*100;af=(a.jqx.log(I,N)-ag.minPow)*M}else{af=a.jqx.log(aa.value,N)-a.jqx.log(A,N);af*=M}af-=aa.height;aa.height+=af}var R=ai;if(J){var t=0;if(O){t=(a.jqx.log(ap,N)-a.jqx.log(r,N))*M}else{t=(ap-r)*M}R+=z?t:-t}if(E){if(d&&!O){var w=(ag.psums[ac]-ag.nsums[ac]);if(I>r){af=(ag.psums[ac]/w)*c;if(ag.psums[ac]!=0){af*=I/ag.psums[ac]}}else{af=(ag.nsums[ac]/w)*c;if(ag.nsums[ac]!=0){af*=I/ag.nsums[ac]}}}if(ao){if(isNaN(H[ac])){H[ac]=R}R=H[ac]}}if(isNaN(S[ac])){S[ac]=0}var ae=S[ac];af=Math.abs(af);var V=af;if(af>=1){var L=this._isVML?Math.round(af):a.jqx._ptrnd(af)-1;if(Math.abs(af-L)>0.5){af=Math.round(af)}else{af=L}}ae+=af-V;if(!E){ae=0}if(Math.abs(ae)>0.5){if(ae>0){af-=1;ae-=1}else{af+=1;ae+=1}}S[ac]=ae;if(ab==x.series.length-1&&d){var v=0;for(var X=0;X0.5){af=a.jqx._ptrnd(af+c-v)}else{var X=ab-1;while(X>=0){var F=Math.abs(T[X][ac].to-T[X][ac].from);if(F>1){if(T[X][ac].from>T[X][ac].to){T[X][ac].from+=c-v}break}X--}}}}if(z){af*=-1}var Q=II}var n=isNaN(ap)?I:{from:ap,to:I};if(Q){if(ao){H[ac]+=af}T[ab][ac]={from:R,to:R+af,value:n,valueRadius:e}}else{if(ao){H[ac]-=af}T[ab][ac]={from:R,to:R-af,value:n,valueRadius:e}}}}var u=this._renderData[l];u.baseOffset=ai;u.gbase=r;u.logBase=O?N:NaN;u.scale=M;u.offsets=!Z?T:this._applyWaterfall(T,s,l,ai,r,O?N:NaN,M,z,E);u.xoffsets=this._calculateXOffsets(l,K.width);return this._renderData[l]},_isPercent:function(b){return(typeof(b)==="string"&&b.length>0&&b.indexOf("%")==b.length-1)},_calcPieSeriesGroupOffsets:function(e,b){var z=this;var m=this._getDataLen(e);var n=this.seriesGroups[e];var A=this._renderData[e]={};var G=A.offsets=[];for(var C=0;C360){E=0}var M=this._get([t.maxAngle,t.endAngle]);if(isNaN(M)||M<0||M>360){M=360}var f=M-E;var o=t.initialAngle||0;if(oM){o=M}var c=t.centerOffset||0;var K=a.jqx.getNum([t.offsetX,n.offsetX,b.width/2]);var J=a.jqx.getNum([t.offsetY,n.offsetY,b.height/2]);var w=Math.min(b.width,b.height)/2;var v=o;var g=t.radius;if(z._isPercent(g)){g=parseFloat(g)/100*w}if(isNaN(g)){g=w*0.4}var l=t.innerRadius;if(z._isPercent(l)){l=parseFloat(l)/100*w}if(isNaN(l)||l>=g){l=0}var d=t.selectedRadiusChange;if(z._isPercent(d)){d=parseFloat(d)/100*(g-l)}if(isNaN(d)){d=0.1*(g-l)}G.push([]);var h=0;var j=0;for(var F=0;F0){h+=L}else{j+=L}}var r=h-j;if(r==0){r=1}for(var F=0;Fd){break}var c=this._estAxisInterval(k,p,q,d,o[l].key,g);var e=this._getDTIntCnt(k,p,c,o[l].key);if(b==-1||b=r){r=z}}if(d&&((!c&&e==m)||(c&&B==m))){l=false}if(l){f=0;r=Math.max(0,m-1)}if(isNaN(A)){A=f}if(isNaN(E)){E=r}if(c){if(!this._isDate(A)){A=this._isDate(E)?E:new Date()}if(!this._isDate(E)){E=this._isDate(A)?A:new Date()}}else{if(isNaN(A)){A=0}if(isNaN(E)){E=l?Math.max(0,m-1):A}}if(f==undefined){f=A}if(r==undefined){r=E}var t=o.rangeSelector;if(t){var u=t.minValue||A;if(u&&c){u=this._castAsDate(u,t.dateFormat||o.dateFormat)}var y=t.maxValue||E;if(y&&c){y=this._castAsDate(y,t.dateFormat||o.rangeSelector)}if(Ay){A=u}if(E>y){E=y}}var G=o.unitInterval;var x,H;if(c){x=o.baseUnit;if(!x){x=this._getBestDTUnit(A,E,h,F)}H=x=="hour"||x=="minute"||x=="second"||x=="millisecond"}var v=o.logarithmicScale==true;var g=o.logarithmicScaleBase;if(isNaN(g)||g<=1){g=10}var G=o.unitInterval;if(v){G=1}else{if(isNaN(G)||G<=0){G=this._estAxisInterval(A,E,h,F,x)}}var C={min:A,max:E};var n=this.seriesGroups[h];if(v){if(!A){A=1;if(E&&A>E){A=E}}if(!E){E=A}C={min:A,max:E};var b=a.jqx._rnd(a.jqx.log(A,g),1,false);var w=a.jqx._rnd(a.jqx.log(E,g),1,true);E=Math.pow(g,w);A=Math.pow(g,b)}else{if(!c&&(n.polar||n.spider)){A=a.jqx._rnd(A,G,false);E=a.jqx._rnd(E,G,true)}}return{min:A,max:E,logAxis:{enabled:v,base:g,minPow:b,maxPow:w},dsRange:{min:f,max:r},filterRange:C,useIndeces:l,isDateTime:c,isTimeUnit:H,dateTimeUnit:x,interval:G}},_getDefaultDTFormatFn:function(d){var b=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var c;if(d=="year"||d=="month"||d=="day"){c=function(e){return e.getDate()+"-"+b[e.getMonth()]+"-"+e.getFullYear()}}else{c=function(e){return e.getDate()+"-"+b[e.getMonth()]+"-"+e.getFullYear()+"
"+e.getHours()+":"+e.getMinutes()+":"+e.getSeconds()}}return c},_getDTIntCnt:function(e,b,c,h){var d=0;var f=new Date(e);var g=new Date(b);g=g.valueOf();if(c<=0){return 1}while(f.valueOf()0)?c:50);if(this._renderData&&this._renderData.length>m&&this._renderData[m].xAxis&&!isNaN(this._renderData[m].xAxis.avgWidth)){var o=Math.max(1,this._renderData[m].xAxis.avgWidth);if(o!=0&&isNaN(c)){f=0.9*b/o}}if(f<=1){return Math.abs(h-e)}var n=0;while(true){var l=g>=d.length?Math.pow(10,3+g-d.length):d[g];if(this._isDate(e)&&this._isDate(h)){n=this._getDTIntCnt(e,h,l,j)}else{n=(h-e)/l}if(n<=f){break}g++}var k=this.seriesGroups[m];if(k.spider||k.polar){if(2*l>h-e){l=h-e}}return l},_getPaddingSize:function(m,e,f,c,o,g,p){var h=m.min;var k=m.max;if(m.logAxis.enabled){h=m.logAxis.minPow;k=m.logAxis.maxPow}var b=m.interval;var d=m.dateTimeUnit;if(o){var l=(c/Math.max(1,k-h+b))*b;if(g){return{left:0,right:l}}else{if(f){return{left:0,right:0}}return{left:l/2,right:l/2}}}if(f&&!p){return{left:0,right:0}}if(this._isDate(h)&&this._isDate(k)){var n=this._getDTIntCnt(h,k,Math.min(b,k-h),d);var i=c/Math.max(2,n);return{left:i/2,right:i/2}}var n=Math.max(1,k-h);if(n==1){var j=c/4;return{left:j,right:j}}var i=c/(n+1);return{left:i/2,right:i/2}},_calculateXOffsets:function(f,E){var D=this.seriesGroups[f];var o=this._getXAxis(f);var w=[];var m=[];var n=this._getDataLen(f);var d=this._getXAxisStats(f,o,E);var v=d.min;var B=d.max;var b=d.isDateTime;var G=d.isTimeUnit;var C=this._hasColumnSeries();var c=D.polar||D.spider;var y=this._get([D.startAngle,D.minAngle,0]);var t=this._get([D.endAngle,D.maxAngle,360]);var q=c&&!(Math.abs(Math.abs(t-y)-360)>0.0001);var l=this._alignValuesWithTicks(f);var s=this._getPaddingSize(d,o,l,E,c,q,C);var I=B-v;var A=d.filterRange;if(I==0){I=1}var H=E-s.left-s.right;if(c&&l&&!q){s.left=s.right=0}var j=-1,p=-1;for(var z=0;zA.max){w.push(NaN);m.push(undefined);continue}r=s.left+(z-v)/I*H;if(d.logAxis.enabled==true){var e=d.logAxis.base;r=this._jqxPlot.scale(u,{min:v.valueOf(),max:B.valueOf(),type:"logarithmic",base:e},{min:0,max:H,flip:false})}w.push(a.jqx._ptrnd(r));m.push(u);if(j==-1){j=z}if(p==-1||pA.max){w.push(NaN);m.push(undefined);continue}var r=0;if(d.logAxis.enabled==true){var e=d.logAxis.base;r=this._jqxPlot.scale(u,{min:v.valueOf(),max:B.valueOf(),type:"logarithmic",base:e},{min:0,max:H,flip:false})}else{if(!b||(b&&G)){var F=u-v;r=(u-v)*H/I}else{r=(u.valueOf()-v.valueOf())/(B.valueOf()-v.valueOf())*H}}r=a.jqx._ptrnd(s.left+r);w.push(r);m.push(u);if(j==-1){j=z}if(p==-1||ph.colors.length){m-=h.colors.length;if(++f>=this.colorSchemes.length){f=0}h=this.colorSchemes[f]}d=h.colors[m%h.colors.length]}}}return d},_createColorsCache:function(){this._colorsCache={get:function(b){if(this._store[b]){return this._store[b]}},set:function(c,b){if(this._size<10000){this._store[c]=b;this._size++}},clear:function(){this._store={};this._size=0},_size:0,_store:{}}},_getSeriesColorsInternal:function(m,d,b){var f=this.seriesGroups[m];var o=f.series[d];if(!a.isFunction(o.colorFunction)&&f.type!="pie"&&f.type!="donut"){b=NaN}var h=m+"_"+d+"_"+(isNaN(b)?"NaN":b);if(this._colorsCache.get(h)){return this._colorsCache.get(h)}var c={lineColor:"#222222",lineColorSelected:"#151515",lineColorSymbol:"#222222",lineColorSymbolSelected:"#151515",fillColor:"#222222",fillColorSelected:"#333333",fillColorSymbol:"#222222",fillColorSymbolSelected:"#333333",fillColorAlt:"#222222",fillColorAltSelected:"#333333"};var i;if(a.isFunction(o.colorFunction)){var j=!isNaN(b)?this._getDataValue(b,o.dataField,m):NaN;if(f.type.indexOf("range")!=-1&&!isNaN(b)){var e=this._getDataValue(b,o.dataFieldFrom,m);var l=this._getDataValue(b,o.dataFieldTo,m);j={from:e,to:l}}i=o.colorFunction(j,b,o,f);if(typeof(i)=="object"){for(var k in i){c[k]=i[k]}}else{c.fillColor=i}}else{for(var k in c){if(o[k]){c[k]=o[k]}}if(!o.fillColor&&!o.color){c.fillColor=this._getColorFromScheme(m,d,b)}else{o.fillColor=o.fillColor||o.color}}var n={fillColor:{baseColor:"fillColor",adjust:1},fillColorSelected:{baseColor:"fillColor",adjust:1.1},fillColorSymbol:{baseColor:"fillColor",adjust:1},fillColorSymbolSelected:{baseColor:"fillColorSymbol",adjust:2},fillColorAlt:{baseColor:"fillColor",adjust:4},fillColorAltSelected:{baseColor:"fillColor",adjust:3},lineColor:{baseColor:"fillColor",adjust:0.95},lineColorSelected:{baseColor:"lineColor",adjust:0.95},lineColorSymbol:{baseColor:"lineColor",adjust:1},lineColorSymbolSelected:{baseColor:"lineColorSelected",adjust:1}};for(var k in c){if(typeof(i)!="object"||!i[k]){if(o[k]){c[k]=o[k]}}}for(var k in c){if(typeof(i)!="object"||!i[k]){if(!o[k]){c[k]=a.jqx.adjustColor(c[n[k].baseColor],n[k].adjust)}}}this._colorsCache.set(h,c);return c},_getItemColorFromScheme:function(d,f,k,h){if(d==undefined||d==""){d=this.colorSchemes[0].name}for(var g=0;g0){var u=0;for(var b in o){if(u>0&&m!=""){m+="
"}var r="dataField"+(b.length>0?b.substring(0,1).toUpperCase()+b.substring(1):"");var q="displayText"+(b.length>0?b.substring(0,1).toUpperCase()+b.substring(1):"");var v=n[q]||n[r];var c=o[b];if(undefined!=c){c=this._formatValue(c,j,k,f,h,y)}else{continue}if(l===true){m+=c}else{m+=v+": "+c}u++}}else{if(undefined!=o){m=this._formatValue(o,j,k,f,h,y)}}return m||""},_isNumberAsString:function(d){if(typeof(d)!="string"){return false}d=a.trim(d);for(var b=0;b="0"&&c<="9")||c==","||c=="."){continue}if(c=="-"&&b==0){continue}if((c=="("&&b==0)||(c==")"&&b==d.length-1)){continue}return false}return true},_castAsDate:function(f,c){if(f instanceof Date&&!isNaN(f)){return f}if(typeof(f)=="string"){var b;if(c){b=a.jqx.dataFormat.parsedate(f,c);if(this._isDate(b)){return b}}if(this._autoDateFormats){for(var e=0;e0){if(b<0){d+=q;b=d.length-1}else{if(q!=="."){d=d.replace(".",q)}}while((d.length-1-b)-1)?b:d.length;var f=d.substring(b);var c=0;for(var j=b;j>0;j--,c++){if((c%3===0)&&(j!==b)&&(!g||(j>1)||(g&&l))){f=o+f}f=d.charAt(j-1)+f}d=f;if(g&&l){d="("+d+")"}return m+d+p},_defaultNumberFormat:{prefix:"",sufix:"",decimalSeparator:".",thousandsSeparator:",",decimalPlaces:2,negativeWithBrackets:false},_calculateControlPoints:function(g,f){var e=g[f],m=g[f+1],d=g[f+2],j=g[f+3],c=g[f+4],i=g[f+5];var l=0.4;var o=Math.sqrt(Math.pow(d-e,2)+Math.pow(j-m,2));var b=Math.sqrt(Math.pow(c-d,2)+Math.pow(i-j,2));var h=(o+b);if(h==0){h=1}var n=l*o/h;var k=l-n;return[d+n*(e-c),j+n*(m-i),d-k*(e-c),j-k*(m-i)]},_getBezierPoints:function(d){var c="";var h=[],e=[];var g=d.split(" ");for(var f=0;f=4&&(Math.abs(h[b-2]-h[b-4])<3||Math.abs(h[b-1]-h[b-3])<3||this._isVML)){c+=" L"+a.jqx._ptrnd(h[b-2])+","+a.jqx._ptrnd(h[b-1])+" "}else{if(b>=5){c+=" Q"+a.jqx._ptrnd(e[b*2-10])+","+a.jqx._ptrnd(e[b*2-9])+" "+a.jqx._ptrnd(h[b-2])+","+a.jqx._ptrnd(h[b-1])+" "}}return c},_animTickInt:50,_createAnimationGroup:function(b){if(!this._animGroups){this._animGroups={}}this._animGroups[b]={animations:[],startTick:NaN}},_startAnimation:function(c){var e=new Date();var b=e.getTime();this._animGroups[c].startTick=b;this._runAnimation();this._enableAnimTimer()},_enqueueAnimation:function(e,d,c,g,f,b,h){if(g<0){g=0}if(h==undefined){h="easeInOutSine"}this._animGroups[e].animations.push({key:d,properties:c,duration:g,fn:f,context:b,easing:h})},_stopAnimations:function(){clearTimeout(this._animtimer);this._animtimer=undefined;this._animGroups=undefined},_enableAnimTimer:function(){if(!this._animtimer){var b=this;this._animtimer=setTimeout(function(){b._runAnimation()},this._animTickInt)}},_runAnimation:function(q){if(this._animGroups){var t=new Date();var h=t.getTime();var o={};for(var l in this._animGroups){var s=this._animGroups[l].animations;var m=this._animGroups[l].startTick;var g=0;for(var n=0;ng){g=u.duration}var r=u.duration>0?b/u.duration:1;var k=r;if(u.easing&&u.duration!=0){k=a.easing[u.easing](r,b,0,1,u.duration)}if(r>1){r=1;k=1}if(u.fn){u.fn(u.key,u.context,k);continue}var f={};for(var l=0;lh){o[l]=({startTick:m,animations:s})}}this._animGroups=o;if(this.renderer instanceof a.jqx.HTML5Renderer){this.renderer.refresh()}}this._animtimer=null;for(var l in this._animGroups){this._enableAnimTimer();break}},_fixCoords:function(d,e){var b=this.seriesGroups[e].orientation=="horizontal";if(!b){return d}var c=d.x;d.x=d.y;d.y=c+this._plotRect.y-this._plotRect.x;var c=d.width;d.width=d.height;d.height=c;return d},getItemCoord:function(d,f,A){var n=this;if(n._isPieGroup(d)&&(!n._isSerieVisible(d,f,A)||!n._renderData||n._renderData.length<=d)){return{x:NaN,y:NaN}}if(!n._isSerieVisible(d,f)||!n._renderData||n._renderData.length<=d){return{x:NaN,y:NaN}}var u=n.seriesGroups[d];var l=u.series[f];var q=n._getItemCoord(d,f,A);if(n._isPieGroup(d)){if(isNaN(q.x)||isNaN(q.y)||isNaN(q.fromAngle)||isNaN(q.toAngle)){return{x:NaN,y:NaN}}var k=this._plotRect;var r=q.fromAngle*(Math.PI/180);var h=q.toAngle*(Math.PI/180);var v=k.x+q.center.x+Math.cos(r)*q.outerRadius;var t=k.x+q.center.x+Math.cos(h)*q.outerRadius;var c=k.y+q.center.y-Math.sin(r)*q.outerRadius;var b=k.y+q.center.y-Math.sin(h)*q.outerRadius;var j=Math.min(v,t);var o=Math.abs(t-v);var i=Math.min(c,b);var m=Math.abs(b-c);q={x:j,y:i,width:o,height:m,center:q.center,centerOffset:q.centerOffset,innerRadius:q.innerRadius,outerRadius:q.outerRadius,selectedRadiusChange:q.selectedRadiusChange,fromAngle:q.fromAngle,toAngle:q.toAngle};return q}if(u.type.indexOf("column")!=-1||u.type.indexOf("waterfall")!=-1){var B=this._getColumnSerieWidthAndOffset(d,f);q.height=Math.abs(q.y.to-q.y.from);q.y=Math.min(q.y.to,q.y.from);q.x+=B.offset;q.width=B.width}else{if(u.type.indexOf("ohlc")!=-1||u.type.indexOf("candlestick")!=-1){var B=this._getColumnSerieWidthAndOffset(d,f);var i=q.y;var z=Math.min(i.Open,i.Close,i.Low,i.High);var w=Math.max(i.Open,i.Close,i.Low,i.High);q.height=Math.abs(w-z);q.y=z;q.x+=B.offset;q.width=B.width}else{if(u.type.indexOf("line")!=-1||u.type.indexOf("area")!=-1){q.width=q.height=0;q.y=q.y.to}else{if(u.type.indexOf("bubble")!=-1||u.type.indexOf("scatter")!=-1){q.center={x:q.x,y:q.y.to};var e=q.y.radius;if(l.symbolType!="circle"&&l.symbolType!=undefined){e/=2}q.y=q.y.to;q.radius=e;q.width=2*e;q.height=2*e}}}}q=this._fixCoords(q,d);if(u.polar||u.spider){var p=this._toPolarCoord(this._renderData[d].polarCoords,this._plotRect,q.x,q.y);q.x=p.x;q.y=p.y;if(q.center){q.center=this._toPolarCoord(this._renderData[d].polarCoords,this._plotRect,q.center.x,q.center.y)}}if(u.type.indexOf("bubble")!=-1||u.type.indexOf("scatter")!=-1){q.x-=e;q.y-=e}return q},_getItemCoord:function(o,j,b){var e=this.seriesGroups[o],l,k;if(!e||!this._renderData){return{x:NaN,y:NaN}}var f=e.series[j];if(!f){return{x:NaN,y:NaN}}var h=this._plotRect;if(this._isPieGroup(o)){var m=this._renderData[o].offsets[j][b];if(!m){return{x:NaN,y:NaN}}var c=(m.fromAngle+m.toAngle)/2*(Math.PI/180);l=h.x+m.x+Math.cos(c)*m.outerRadius;k=h.y+m.y-Math.sin(c)*m.outerRadius;return{x:l,y:k,center:{x:m.x,y:m.y},centerOffset:m.centerOffset,innerRadius:m.innerRadius,outerRadius:m.outerRadius,selectedRadiusChange:m.selectedRadiusChange,fromAngle:m.fromAngle,toAngle:m.toAngle}}else{l=h.x+this._renderData[o].xoffsets.data[b];k=this._renderData[o].offsets[j][b];if(isNaN(l)||!k){return{x:NaN,y:NaN}}}var n={};for(var d in k){n[d]=k[d]}return{x:l,y:n}},getXAxisValue:function(g,r){var q=this.seriesGroups[r];if(!q){return undefined}var c=this._getXAxis(r);var n=this._plotRect;var b=0;var m=NaN;var e=this._renderData[0].xoffsets.axisStats;var f=0,l=0;if(q.polar||q.spider){if(isNaN(g.x)||isNaN(g.y)){return NaN}var h=this._getPolarAxisCoords(r,n);var k=a.jqx._ptdist(g.x,g.y,h.x,h.y);if(k>h.r){return NaN}var i=Math.atan2(h.y-g.y,g.x-h.x);i=Math.PI/2-i;if(i<0){i=2*Math.PI+i}m=i*h.r;var j=h.startAngle+Math.PI/2;var d=h.endAngle+Math.PI/2;f=j*h.r;l=d*h.r;b=(d-j)*h.r;var o=this._getPaddingSize(e,c,c.valuesOnTicks,b,true,h.isClosedCircle,this._hasColumnSeries());if(h.isClosedCircle){b-=(o.left+o.right);l-=(o.left+o.right)}else{if(!c.valuesOnTicks){f+=o.left;l-=o.right}}}else{if(q.orientation!="horizontal"){if(gn.x+n.width){return NaN}m=g-n.x;b=n.width}else{if(gn.y+n.height){return NaN}m=g-n.y;b=n.height}if(this._renderData[r]&&this._renderData[r].xoffsets){var o=this._renderData[r].xoffsets.padding;b-=(o.left+o.right);m-=o.left}l=b}var p=this._jqxPlot.scale(m,{min:f,max:l},{min:e.min.valueOf(),max:e.max.valueOf(),type:e.logAxis.enabled?"logarithmic":"linear",base:e.logAxis.base,flip:c.flip});return p},getValueAxisValue:function(c,j){var i=this.seriesGroups[j];if(!i){return undefined}var k=this._getValueAxis(j);var g=this._plotRect;var b=0;var f=NaN;if(i.polar||i.spider){if(isNaN(c.x)||isNaN(c.y)){return NaN}var e=this._getPolarAxisCoords(j,g);f=a.jqx._ptdist(c.x,c.y,e.x,e.y);b=e.r;f=b-f}else{if(i.orientation=="horizontal"){if(cg.x+g.width){return NaN}f=c-g.x;b=g.width}else{if(cg.y+g.height){return NaN}f=c-g.y;b=g.height}}var d=this._stats.seriesGroups[j];var h=this._jqxPlot.scale(f,{min:0,max:b},{min:d.min.valueOf(),max:d.max.valueOf(),type:d.logarithmic?"logarithmic":"linear",base:d.logBase,flip:!k.flip});return h},_detectDateFormat:function(g,c){var h={en_US_d:"M/d/yyyy",en_US_D:"dddd, MMMM dd, yyyy",en_US_t:"h:mm tt",en_US_T:"h:mm:ss tt",en_US_f:"dddd, MMMM dd, yyyy h:mm tt",en_US_F:"dddd, MMMM dd, yyyy h:mm:ss tt",en_US_M:"MMMM dd",en_US_Y:"yyyy MMMM",en_US_S:"yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss",en_CA_d:"dd/MM/yyyy",en_CA_D:"MMMM-dd-yy",en_CA_f:"MMMM-dd-yy h:mm tt",en_CA_F:"MMMM-dd-yy h:mm:ss tt",ISO:"yyyy-MM-dd hh:mm:ss",ISO2:"yyyy-MM-dd HH:mm:ss",d1:"dd.MM.yyyy",d2:"dd-MM-yyyy",zone1:"yyyy-MM-ddTHH:mm:ss-HH:mm",zone2:"yyyy-MM-ddTHH:mm:ss+HH:mm",custom:"yyyy-MM-ddTHH:mm:ss.fff",custom2:"yyyy-MM-dd HH:mm:ss.fff",de_DE_d:"dd.MM.yyyy",de_DE_D:"dddd, d. MMMM yyyy",de_DE_t:"HH:mm",de_DE_T:"HH:mm:ss",de_DE_f:"dddd, d. MMMM yyyy HH:mm",de_DE_F:"dddd, d. MMMM yyyy HH:mm:ss",de_DE_M:"dd MMMM",de_DE_Y:"MMMM yyyy",fr_FR_d:"dd/MM/yyyy",fr_FR_D:"dddd d MMMM yyyy",fr_FR_t:"HH:mm",fr_FR_T:"HH:mm:ss",fr_FR_f:"dddd d MMMM yyyy HH:mm",fr_FR_F:"dddd d MMMM yyyy HH:mm:ss",fr_FR_M:"d MMMM",fr_FR_Y:"MMMM yyyy",it_IT_d:"dd/MM/yyyy",it_IT_D:"dddd d MMMM yyyy",it_IT_t:"HH:mm",it_IT_T:"HH:mm:ss",it_IT_f:"dddd d MMMM yyyy HH:mm",it_IT_F:"dddd d MMMM yyyy HH:mm:ss",it_IT_M:"dd MMMM",it_IT_Y:"MMMM yyyy",ru_RU_d:"dd.MM.yyyy",ru_RU_D:"d MMMM yyyy '?.'",ru_RU_t:"H:mm",ru_RU_T:"H:mm:ss",ru_RU_f:"d MMMM yyyy '?.' H:mm",ru_RU_F:"d MMMM yyyy '?.' H:mm:ss",ru_RU_Y:"MMMM yyyy",cs_CZ_d:"d.M.yyyy",cs_CZ_D:"d. MMMM yyyy",cs_CZ_t:"H:mm",cs_CZ_T:"H:mm:ss",cs_CZ_f:"d. MMMM yyyy H:mm",cs_CZ_F:"d. MMMM yyyy H:mm:ss",cs_CZ_M:"dd MMMM",cs_CZ_Y:"MMMM yyyy",he_IL_d:"dd MMMM yyyy",he_IL_D:"dddd dd MMMM yyyy",he_IL_t:"HH:mm",he_IL_T:"HH:mm:ss",he_IL_f:"dddd dd MMMM yyyy HH:mm",he_IL_F:"dddd dd MMMM yyyy HH:mm:ss",he_IL_M:"dd MMMM",he_IL_Y:"MMMM yyyy",hr_HR_d:"d.M.yyyy.",hr_HR_D:"d. MMMM yyyy.",hr_HR_t:"H:mm",hr_HR_T:"H:mm:ss",hr_HR_f:"d. MMMM yyyy. H:mm",hr_HR_F:"d. MMMM yyyy. H:mm:ss",hr_HR_M:"d. MMMM",hu_HU_d:"yyyy.MM.dd.",hu_HU_D:"yyyy. MMMM d.",hu_HU_t:"H:mm",hu_HU_T:"H:mm:ss",hu_HU_f:"yyyy. MMMM d. H:mm",hu_HU_F:"yyyy. MMMM d. H:mm:ss",hu_HU_M:"MMMM d.",hu_HU_Y:"yyyy. MMMM",jp_JP_d:"gg y/M/d",jp_JP_D:"gg y'?'M'?'d'?'",jp_JP_t:"H:mm",jp_JP_T:"H:mm:ss",jp_JP_f:"gg y'?'M'?'d'?' H:mm",jp_JP_F:"gg y'?'M'?'d'?' H:mm:ss",jp_JP_M:"M'?'d'?'",jp_JP_Y:"gg y'?'M'?'",lt_LT_d:"yyyy.MM.dd",lt_LT_D:"yyyy 'm.' MMMM d 'd.'",lt_LT_t:"HH:mm",lt_LT_T:"HH:mm:ss",lt_LT_f:"yyyy 'm.' MMMM d 'd.' HH:mm",lt_LT_F:"yyyy 'm.' MMMM d 'd.' HH:mm:ss",lt_LT_M:"MMMM d 'd.'",lt_LT_Y:"yyyy 'm.' MMMM",sa_IN_d:"dd-MM-yyyy",sa_IN_D:"dd MMMM yyyy dddd",sa_IN_t:"HH:mm",sa_IN_T:"HH:mm:ss",sa_IN_f:"dd MMMM yyyy dddd HH:mm",sa_IN_F:"dd MMMM yyyy dddd HH:mm:ss",sa_IN_M:"dd MMMM",basic_y:"yyyy",basic_ym:"yyyy-MM",basic_d:"yyyy-MM-dd",basic_dhm:"yyyy-MM-dd hh:mm",basic_bhms:"yyyy-MM-dd hh:mm:ss",basic2_ym:"MM-yyyy",basic2_d:"MM-dd-yyyy",basic2_dhm:"MM-dd-yyyy hh:mm",basic2_dhms:"MM-dd-yyyy hh:mm:ss",basic3_ym:"yyyy/MM",basic3_d:"yyyy/MM/dd",basic3_dhm:"yyyy/MM/dd hh:mm",basic3_bhms:"yyyy/MM/dd hh:mm:ss",basic4_ym:"MM/yyyy",basic4_d:"MM/dd/yyyy",basic4_dhm:"MM/dd/yyyy hh:mm",basic4_dhms:"MM/dd/yyyy hh:mm:ss"};if(c){h=a.extend({},h,c)}var f=[];if(!a.isArray(g)){f.push(g)}else{f=g}for(var d in h){h[d]={format:h[d],count:0}}for(var e=0;eb.count){b.key=d;b.count=h[d].count}}return b.key?h[b.key].format:""},_testXAxisDateFormat:function(j){var l=this;var d=l._getXAxis(j);var c=l._getDataLen(j);var e={};if(l.localization&&l.localization.patterns){for(var k in l.localization.patterns){e["local_"+k]=l.localization.patterns[k]}}var g=[];for(var f=0;f
");i.css({background:g,opacity:b,left:c.x,top:c.y,width:c.width,height:c.height});i.appendTo(t);while(this._sliders.length";var p="
";var h="
";this._sliders[d]={element:i,host:t,_sliderInitialAbsoluteRect:{x:i.coord().left,y:i.coord().top,width:c.width,height:c.height},_hostInitialAbsolutePos:{x:t.coord().left,y:t.coord().top},getRect:function(){return{x:this.host.coord().left-this._hostInitialAbsolutePos.x+this._sliderInitialAbsoluteRect.x,y:this.host.coord().top-this._hostInitialAbsolutePos.y+this._sliderInitialAbsoluteRect.y,width:this._sliderInitialAbsoluteRect.width,height:this._sliderInitialAbsoluteRect.height}},rect:c,left:a(n),right:a(n),leftTop:a(p),rightTop:a(p),leftBorder:a(p),leftBar:a(h),rightBorder:a(p),rightBar:a(h)};this._sliders[d].left.appendTo(t);this._sliders[d].right.appendTo(t);this._sliders[d].leftTop.appendTo(t);this._sliders[d].rightTop.appendTo(t);this._sliders[d].leftBorder.appendTo(t);this._sliders[d].rightBorder.appendTo(t);this._sliders[d].leftBar.appendTo(t);this._sliders[d].rightBar.appendTo(t);var k=this._renderData[d].xAxis;var s=k.data.axisStats;var j=s.min.valueOf();var q=s.max.valueOf();var o=this._valueToOffset(d,j);var e=this._valueToOffset(d,q);if(o>e){var r=e;e=o;o=r}if(this.seriesGroups[d].orientation!="horizontal"){i.css({left:Math.round(c.x+o),top:c.y,width:Math.round(e-o),height:c.height})}else{i.css({top:Math.round(c.y+o),left:c.x,height:Math.round(e-o),width:c.width})}this._setSliderPositions(d,o,e)},_setSliderPositions:function(e,r,h){var t=this.seriesGroups[e];var d=this._getXAxis(e);var o=d.rangeSelector;var b=t.orientation=="horizontal";if(d.rangeSelector.renderTo){b=false}var j=d.position;if(o.renderTo&&o.position){j=o.position}var l=(b&&j=="right")||(!b&&j=="top");var n=this._sliders[e];var q=b?"top":"left";var f=b?"left":"top";var i=b?"height":"width";var p=b?"width":"height";var k=b?"y":"x";var m=b?"x":"y";var c=n.rect;n.startOffset=r;n.endOffset=h;n.left.css(q,c[k]);n.left.css(f,c[m]);n.left.css(i,r);n.left.css(p,c[p]);n.right.css(q,c[k]+h);n.right.css(f,c[m]);n.right.css(i,c[i]-h+1);n.right.css(p,c[p]);n.leftTop.css(q,c[k]);n.leftTop.css(f,c[m]+(((b&&j=="right")||(!b&&j!="top"))?0:c[p]));n.leftTop.css(i,r);n.leftTop.css(p,1);n.rightTop.css(q,c[k]+h);n.rightTop.css(f,c[m]+(((b&&j=="right")||(!b&&j!="top"))?0:c[p]));n.rightTop.css(i,c[i]-h+1);n.rightTop.css(p,1);n.leftBorder.css(q,c[k]+r);n.leftBorder.css(f,c[m]);n.leftBorder.css(i,1);n.leftBorder.css(p,c[p]);var s=c[p]/4;if(s>20){s=20}if(s<3){s=3}n.leftBar.css(q,c[k]+r-3);n.leftBar.css(f,c[m]+c[p]/2-s/2);n.leftBar.css(i,5);n.leftBar.css(p,s);n.rightBorder.css(q,c[k]+h);n.rightBorder.css(f,c[m]);n.rightBorder.css(i,1);n.rightBorder.css(p,c[p]);n.rightBar.css(q,c[k]+h-3);n.rightBar.css(f,c[m]+c[p]/2-s/2);n.rightBar.css(i,5);n.rightBar.css(p,s)},_resizeState:{},_onSliderMouseDown:function(d){d.stopImmediatePropagation();d.stopPropagation();var b=d.data.self;var c=b._sliders[d.data.groupIndex];if(!c){return}if(b._resizeState.state==undefined){b._testAndSetReadyResize(d)}if(b._resizeState.state!="ready"){return}a.jqx._rangeSelectorTarget=b;b._resizeState.state="resizing"},_valueToOffset:function(m,k){var l=this.seriesGroups[m];var d=this._sliders[m];var c=d.host.jqxChart("getInstance");var n=c._renderData[0].xAxis;var g=n.data.axisStats;var j=g.min.valueOf();var b=g.max.valueOf();var h=b-j;if(h==0){h=1}var e=this._getXAxis(m);var f=l.orientation=="horizontal"?"height":"width";var i=(k.valueOf()-j)/h;return d.getRect()[f]*(e.flip?(1-i):i)},_offsetToValue:function(o,f){var d=this._sliders[o];var n=this.seriesGroups[o];var e=this._getXAxis(o);var g=n.orientation=="horizontal"?"height":"width";var i=d.getRect()[g];if(i==0){i=1}var j=f/i;var c=d.host.jqxChart("getInstance");var m=c._renderData[0].xAxis;var h=m.data.axisStats;var k=h.min.valueOf();var b=h.max.valueOf();var l=f/i*(b-k)+k;if(e.flip==true){l=b-f/i*(b-k)}if(this._isDate(h.min)||this._isDate(h.max)){l=new Date(l)}else{if(e.dataField==undefined||h.useIndeces){l=Math.round(l)}if(lh.max){l=h.max}}return l},_onSliderMouseUp:function(r){var m=a.jqx._rangeSelectorTarget;if(!m){return}var g=r.data.groupIndex;var b=r.data.swapXY;var o=m._sliders[g];if(!o){return}if(m._resizeState.state!="resizing"){return}r.stopImmediatePropagation();r.stopPropagation();m._resizeState={};m.host.css("cursor","default");var j=!b?"left":"top";var c=!b?"width":"height";var q=!b?"x":"y";var p=o.element.coord()[j];var e=p+(!b?o.element.width():o.element.height());var d=o.getRect();var k=m._offsetToValue(g,p-d[q]);var t=m._offsetToValue(g,e-d[q]);var l=o.host.jqxChart("getInstance");var n=l._renderData[0].xAxis;var v=n.data.axisStats;if(!v.isTimeUnit&&(t.valueOf()-k.valueOf())>86400000){k.setHours(0,0,0,0);t.setDate(t.getDate()+1);t.setHours(0,0,0,0)}var f=m._getXAxis(g);if(f.flip){var u=k;k=t;t=u}for(var s=0;s=l&&r[m]+n<=l+f[e]){var j=parseInt(h.css(m));var c=Math.max(2,(d?h.height():h.width())-n);h.css(e,c);h.css(m,j+n)}}else{if(o._resizeState.side=="right"){var b=d?h.height():h.width();var n=Math.round(w[m]-r[m]-b);var l=f[s];if(r[m]+b+n>=l&&r[m]+n+b<=l+f[e]){var c=Math.max(2,b+n);h.css(e,c)}}else{if(o._resizeState.side=="move"){var b=d?h.height():h.width();var j=parseInt(h.css(m));var n=Math.round(w[m]-o._resizeState.startPos);if(r[m]+n>=f[s]&&r[m]+n+b<=f[s]+f[e]){o._resizeState.startPos=w[m];h.css(m,j+n)}}}}var u=parseInt(h.css(m))-q.rect[s];var k=u+(d?h.height():h.width());o._setSliderPositions(i,u,k)}else{o._testAndSetReadyResize(t)}},_testAndSetReadyResize:function(b){var q=b.data.self;var k=b.data.renderTo;var o=b.data.groupIndex;var c=q._sliders[o];var g=b.data.swapXY;var m=c.getRect();var e=c.element;var f=a.jqx.position(b);var h=e.coord();var j=g?"left":"top";var p=!g?"left":"top";var i=g?"width":"height";var l=!g?"width":"height";var d=!g?"x":"y";var n=q._isTouchDevice?30:5;if(f[j]>=h[j]&&f[j]<=h[j]+m[i]){if(Math.abs(f[p]-h[p])<=n){k.css("cursor",g?"row-resize":"col-resize");q._resizeState={state:"ready",side:"left"}}else{if(Math.abs(f[p]-h[p]-(!g?e.width():e.height()))<=n){k.css("cursor",g?"row-resize":"col-resize");q._resizeState={state:"ready",side:"right"}}else{if(f[p]+n>h[p]&&f[p]-n",l);if(h){b.append(e);var i=a(""+a(e).text()+"");i.appendTo(a(document.body));k+=i.width();i.remove()}b[0].style.cssText=j.field.style.cssText;if(!j.width){j.width=a(j.field).width()+k+10}if(!j.height){j.height=a(j.field).outerHeight()+10}a(j.field).hide().after(b);var g=j.host.data();j.host=b;j.host.data(g);j.element=b[0];j.element.id=j.field.id;j.field.id=l.id;if(j._className){j.host.addClass(j._className);a(j.field).removeClass(j._className)}if(j.field.tabIndex){var d=j.field.tabIndex;j.field.tabIndex=-1;j.element.tabIndex=d}}},_addInput:function(){if(this.hasInput){if(this.input){this.input.remove()}var b=this.host.attr("name");this.input=a("");this.host.append(this.input);if(b){this.input.attr("name",b)}this.input.val(this.checked);this.host.attr("role","checkbox");a.jqx.aria(this)}},render:function(){this.init=true;var d=this;this.setSize();this.propertyChangeMap.width=function(h,j,i,k){d.setSize()};this.propertyChangeMap.height=function(h,j,i,k){d.setSize()};this._removeHandlers();if(!this.width){this.host.css("overflow-x","visible")}if(!this.height){this.host.css("overflow-y","visible")}if(this.checkbox){this.checkbox.remove();this.checkbox=null}if(this.checkMark){this.checkMark.remove();this.checkMark=null}if(this.box){this.box.remove();this.box=null}if(this.clear){this.clear.remove();this.clear=null}if(this.boxSize==null){this.boxSize=16}var g=parseInt(this.boxSize)+"px";var f="16px";var e=Math.floor((parseInt(this.boxSize)-16)/2);var b=e;e+="px";b+="px";if(parseInt(this.boxSize)!=16){this.checkbox=a('
')}else{this.checkbox=a('
')}this.host.prepend(this.checkbox);if(!this.disabledContainer){if(!this.host.attr("tabIndex")){this.host.attr("tabIndex",0)}this.clear=a('
');this.host.append(this.clear)}this.checkMark=a(this.checkbox[0].firstChild.firstChild);this.box=this.checkbox;this.box.addClass(this.toThemeProperty("jqx-checkbox-default")+" "+this.toThemeProperty("jqx-fill-state-normal")+" "+this.toThemeProperty("jqx-rc-all"));if(this.disabled){this.disable()}if(!this.disabledContainer){this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-checkbox"))}if(this.locked&&!this.disabledContainer){this.host.css("cursor","auto")}var c=this.element.getAttribute("checked");if(c=="checked"||c=="true"||c==true){this.checked=true}this._addInput();this._render();this._addHandlers();this.init=false;this._centerBox();if(this.isMaterialized()){a(this.checkbox).addClass("ripple");a.jqx.ripple(a(this.checkbox),this.host,"checkbox")}},_centerBox:function(){if(this.height&&this.height.toString().indexOf("%")==-1&&this.box){var b=parseInt(this.height);this.host.css("line-height",b+"px");var c=b-parseInt(this.boxSize)-1;c/=2;this.box.css("margin-top",parseInt(c))}},refresh:function(b){if(!b){this.setSize();this._render()}},resize:function(c,b){this.width=c;this.height=b;this.refresh()},setSize:function(){if(this.width!=null&&this.width.toString().indexOf("px")!=-1){this.host.width(this.width)}else{if(this.width!=undefined&&!isNaN(this.width)){this.host.width(this.width)}else{if(this.width!=null&&this.width.toString().indexOf("%")!=-1){this.element.style.width=this.width}}}if(this.height!=null&&this.height.toString().indexOf("px")!=-1){this.host.height(this.height)}else{if(this.height!=undefined&&!isNaN(this.height)){this.host.height(this.height)}else{if(this.height!=null&&this.height.toString().indexOf("%")!=-1){this.element.style.height=this.height}}}this._centerBox()},_addHandlers:function(){var d=this;var c=a.jqx.mobile.isTouchDevice();var b="mousedown";if(c){b=a.jqx.mobile.getTouchEventName("touchend")}this.addHandler(this.box,b,function(e){if(!d.disabled&&!d.enableContainerClick&&!d.locked){d.changeType="mouse";d.toggle();if(d.updated){e.owner=d;d.updated(e,d.checked,d.oldChecked)}if(e.preventDefault){e.preventDefault()}return false}});if(!this.disabledContainer){this.addHandler(this.host,"keydown",function(e){if(!d.disabled&&!d.locked&&d.keyboardCheck){if(e.keyCode==32){if(!d._canFocus){return true}d.changeType="keyboard";d.toggle();if(d.updated){e.owner=d;d.updated(e,d.checked,d.oldChecked)}if(e.preventDefault){e.preventDefault()}return false}}});this.addHandler(this.host,b,function(e){if(!d.disabled&&d.enableContainerClick&&!d.locked){d.clickTime=new Date();d.changeType="mouse";d.toggle();if(e.preventDefault){e.preventDefault()}if(d._canFocus){d.focus()}return false}});this.addHandler(this.host,"selectstart",function(e){if(!d.disabled&&d.enableContainerClick){if(e.preventDefault){e.preventDefault()}return false}});this.addHandler(this.host,"mouseup",function(e){if(!d.disabled&&d.enableContainerClick){if(e.preventDefault){e.preventDefault()}}});this.addHandler(this.host,"focus",function(e){if(!d.disabled&&!d.locked){if(!d._canFocus){return true}if(d.enableHover){d.box.addClass(d.toThemeProperty("jqx-checkbox-hover"))}d.box.addClass(d.toThemeProperty("jqx-fill-state-focus"));if(e.preventDefault){e.preventDefault()}a(d.checkbox).removeClass("active");if(!d.clickTime||(d.clickTime&&(new Date()-d.clickTime>300))){a(d.checkbox).addClass("active")}d.hovered=true;return false}});this.addHandler(this.host,"blur",function(e){a(d.checkbox).removeClass("active");if(!d.disabled&&!d.locked){if(!d._canFocus){return true}if(d.enableHover){d.box.removeClass(d.toThemeProperty("jqx-checkbox-hover"))}d.box.removeClass(d.toThemeProperty("jqx-fill-state-focus"));if(e.preventDefault){e.preventDefault()}d.hovered=false;return false}});this.addHandler(this.host,"mouseenter",function(e){if(d.locked){d.host.css("cursor","arrow")}if(d.enableHover){if(!d.disabled&&d.enableContainerClick&&!d.locked){d.box.addClass(d.toThemeProperty("jqx-checkbox-hover"));d.box.addClass(d.toThemeProperty("jqx-fill-state-hover"));if(e.preventDefault){e.preventDefault()}d.hovered=true;return false}}});this.addHandler(this.host,"mouseleave",function(e){if(d.enableHover){if(!d.disabled&&d.enableContainerClick&&!d.locked){d.box.removeClass(d.toThemeProperty("jqx-checkbox-hover"));d.box.removeClass(d.toThemeProperty("jqx-fill-state-hover"));if(e.preventDefault){e.preventDefault()}d.hovered=false;return false}}});this.addHandler(this.box,"mouseenter",function(){if(d.locked){return}if(!d.disabled&&!d.enableContainerClick){d.box.addClass(d.toThemeProperty("jqx-checkbox-hover"));d.box.addClass(d.toThemeProperty("jqx-fill-state-hover"))}});this.addHandler(this.box,"mouseleave",function(){if(!d.disabled&&!d.enableContainerClick){d.box.removeClass(d.toThemeProperty("jqx-checkbox-hover"));d.box.removeClass(d.toThemeProperty("jqx-fill-state-hover"))}})}},focus:function(){try{this.host.focus()}catch(b){}},_removeHandlers:function(){var c=a.jqx.mobile.isTouchDevice();var b="mousedown";if(c){b="touchend"}if(this.box){this.removeHandler(this.box,b);this.removeHandler(this.box,"mouseenter");this.removeHandler(this.box,"mouseleave")}this.removeHandler(this.host,b);this.removeHandler(this.host,"mouseup");this.removeHandler(this.host,"selectstart");this.removeHandler(this.host,"mouseenter");this.removeHandler(this.host,"mouseleave");this.removeHandler(this.host,"keydown");this.removeHandler(this.host,"blur");this.removeHandler(this.host,"focus")},_render:function(){if(!this.disabled){if(this.enableContainerClick){this.host.css("cursor","pointer")}else{if(!this.init){this.host.css("cursor","auto")}}}else{this.disable()}if(this.rtl){this.box.addClass(this.toThemeProperty("jqx-checkbox-rtl"));this.host.addClass(this.toThemeProperty("jqx-rtl"))}this.updateStates();this.host.attr("checked",this.checked)},_setState:function(c,b){if(this.checked!=c){this.checked=c;if(this.checked){this.checkMark[0].className=this.toThemeProperty("jqx-checkbox-check-checked")}else{if(this.checked==null){this.checkMark[0].className=this.toThemeProperty("jqx-checkbox-check-indeterminate")}else{this.checkMark[0].className=""}}}if(b===false||b===true){this.locked=b}if(c){this.element.setAttribute("checked",true)}else{this.element.removeAttribute("checked")}},val:function(b){if(arguments.length==0||(b!=null&&typeof(b)=="object")){return this.checked}if(typeof b=="string"){if(b=="true"){this.check()}if(b=="false"){this.uncheck()}if(b==""){this.indeterminate()}}else{if(b==true){this.check()}if(b==false){this.uncheck()}if(b==null){this.indeterminate()}}return this.checked},check:function(){this.checked=true;var c=this;this.checkMark.removeClass();this.element.setAttribute("checked",true);if(a.jqx.browser.msie||this.animationShowDelay==0){this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-checked"))}else{this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-checked"));this.checkMark.css("opacity",0);this.checkMark.stop().animate({opacity:1},this.animationShowDelay,function(){})}if(this.groupName!=null&&this.groupName.length>0){var d=a.find(this.toThemeProperty(".jqx-checkbox",true));a.each(d,function(){var e=a(this).jqxCheckBox("groupName");if(e==c.groupName&&this!=c.element){a(this).jqxCheckBox("uncheck")}})}var b=this.changeType;this._raiseEvent("0",{checked:true});this.changeType=b;this._raiseEvent("3",{checked:true});if(this.input!=undefined){this.input.val(this.checked);a.jqx.aria(this,"aria-checked",this.checked);this.host.attr("checked",this.checked)}},uncheck:function(){this.checked=false;var c=this;this.element.removeAttribute("checked");if(a.jqx.browser.msie||this.animationHideDelay==0){if(c.checkMark[0].className!=""){c.checkMark[0].className=""}}else{this.checkMark.css("opacity",1);this.checkMark.stop().animate({opacity:0},this.animationHideDelay,function(){if(c.checkMark[0].className!=""){c.checkMark[0].className=""}})}var b=this.changeType;this._raiseEvent("1");this.changeType=b;this._raiseEvent("3",{checked:false});if(this.input!=undefined){this.input.val(this.checked);a.jqx.aria(this,"aria-checked",this.checked);this.host.attr("checked",this.checked)}},indeterminate:function(){this.checked=null;this.checkMark.removeClass();if(a.jqx.browser.msie||this.animationShowDelay==0){this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-indeterminate"))}else{this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-indeterminate"));this.checkMark.css("opacity",0);this.checkMark.stop().animate({opacity:1},this.animationShowDelay,function(){})}var b=this.changeType;this._raiseEvent("2");this._raiseEvent("3",{checked:null});if(this.input!=undefined){this.input.val(this.checked);a.jqx.aria(this,"aria-checked","undefined");this.host.attr("checked","undefined")}},toggle:function(){if(this.disabled){return}if(this.locked){return}if(this.groupName!=null&&this.groupName.length>0){if(this.checked!=true){this.checked=true;this.updateStates()}return}this.oldChecked=this.checked;if(this.checked==true){this.checked=this.hasThreeStates?null:false}else{this.checked=this.checked!=null}this.updateStates();if(this.input!=undefined){this.input.val(this.checked)}},updateStates:function(){if(this.checked){this.check()}else{if(this.checked==false){this.uncheck()}else{if(this.checked==null){this.indeterminate()}}}},disable:function(){this.disabled=true;if(this.checked==true){this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-disabled"))}else{if(this.checked==null){this.checkMark.addClass(this.toThemeProperty("jqx-checkbox-check-indeterminate-disabled"))}}this.box.addClass(this.toThemeProperty("jqx-checkbox-disabled-box"));this.host.addClass(this.toThemeProperty("jqx-checkbox-disabled"));this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"));this.box.addClass(this.toThemeProperty("jqx-checkbox-disabled"));a.jqx.aria(this,"aria-disabled",this.disabled)},enable:function(){if(this.checked==true){this.checkMark.removeClass(this.toThemeProperty("jqx-checkbox-check-disabled"))}else{if(this.checked==null){this.checkMark.removeClass(this.toThemeProperty("jqx-checkbox-check-indeterminate-disabled"))}}this.box.removeClass(this.toThemeProperty("jqx-checkbox-disabled-box"));this.host.removeClass(this.toThemeProperty("jqx-checkbox-disabled"));this.host.removeClass(this.toThemeProperty("jqx-fill-state-disabled"));this.box.removeClass(this.toThemeProperty("jqx-checkbox-disabled"));this.disabled=false;a.jqx.aria(this,"aria-disabled",this.disabled)},destroy:function(){this.host.remove()},_raiseEvent:function(g,e){if(this.init){return}var c=this.events[g];var f=new a.Event(c);f.owner=this;if(!e){e={}}e.type=this.changeType;this.changeType=null;f.args=e;try{var b=this.host.trigger(f)}catch(d){}return b},propertiesChangedHandler:function(b,c,d){if(d.width&&d.height&&Object.keys(d).length==2){b.setSize()}},propertyChangedHandler:function(b,c,e,d){if(this.isInitialized==undefined||this.isInitialized==false){return}if(b.batchUpdate&&b.batchUpdate.width&&b.batchUpdate.height&&Object.keys(b.batchUpdate).length==2){return}if(c=="enableContainerClick"&&!b.disabled&&!b.locked){if(d){b.host.css("cursor","pointer")}else{b.host.css("cursor","auto")}}if(c=="rtl"){if(d){b.box.addClass(b.toThemeProperty("jqx-checkbox-rtl"));b.host.addClass(b.toThemeProperty("jqx-rtl"))}else{b.box.removeClass(b.toThemeProperty("jqx-checkbox-rtl"));b.host.removeClass(b.toThemeProperty("jqx-rtl"))}}if(c=="boxSize"){b.render()}if(c=="theme"){a.jqx.utilities.setTheme(e,d,b.host)}if(c=="checked"){if(d!=e){switch(d){case true:b.check();break;case false:b.uncheck();break;case null:b.indeterminate();break}}}if(c=="disabled"){if(d!=e){if(d){b.disable()}else{b.enable()}}}}})})(jqxBaseFramework); + +(function(a){a.jqx.jqxWidget("jqxColorPicker","",{});a.extend(a.jqx._jqxColorPicker.prototype,{defineInstance:function(){var b={disabled:false,height:null,width:null,color:new a.jqx.color({hex:"ff0000"}),redString:"R:",greenString:"G:",blueString:"B:",showTransparent:false,colorMode:"saturation",_delayLoading:false,events:["colorchange"]};if(this===a.jqx._jqxColorPicker.prototype){return b}a.extend(true,this,b);return b},_createFromInput:function(c){var e=this;if(e.element.nodeName.toLowerCase()=="input"){e.field=e.element;if(e.field.className){e._className=e.field.className}var d={title:e.field.title};if(e.field.getAttribute("value")){var g=e.field.getAttribute("value");e.color=new a.jqx.color({hex:g})}if(e.field.id.length){d.id=e.field.id.replace(/[^\w]/g,"_")+"_"+c}else{d.id=a.jqx.utilities.createId()+"_"+c}var h=a("
",d);h[0].style.cssText=e.field.style.cssText;if(!e.width){e.width=a(e.field).width()}if(!e.height){e.height=a(e.field).outerHeight()}a(e.field).hide().after(h);var f=e.host.data();e.host=h;e.host.data(f);e.element=h[0];e.element.id=e.field.id;e.field.id=d.id;if(e._className){e.host.addClass(e._className);a(e.field).removeClass(e._className)}if(e.field.tabIndex){var b=e.field.tabIndex;e.field.tabIndex=-1;e.element.tabIndex=b}}},createInstance:function(c){this._createFromInput("jqxColorPicker");this.render();var b=this;a.jqx.utilities.resize(this.host,function(){b._setSize();b.refresh()},false,!this._delayLoading)},render:function(){this.element.innerHTML="";var b=this;this._isTouchDevice=a.jqx.mobile.isTouchDevice();if(typeof this.color=="string"){this.color=new a.jqx.color({hex:this.color})}this._setSize();this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-reset"));this.host.addClass(this.toThemeProperty("jqx-color-picker"));this.container=a("
");this.container.appendTo(this.host);this.colorMap=a("
");this.colorMap.appendTo(this.container);this.colorBar=a("
");this.colorBar.appendTo(this.container);this.colorPanel=a("
");this.colorPanel.appendTo(this.container);this.hexPanel=a("
");this.hexPanel.appendTo(this.colorPanel);this.hexPanel.append('#');this.hex=a("");this.hex.addClass(this.toThemeProperty("jqx-input"));this.hex.addClass(this.toThemeProperty("jqx-widget-content"));this.hex.appendTo(this.hexPanel);this.colorPanel.append('
');this.rgb=a("
");this.rgb.appendTo(this.colorPanel);this.red=a("");this.red.addClass(this.toThemeProperty("jqx-input"));this.red.addClass(this.toThemeProperty("jqx-widget-content"));this.rgb.append(''+this.redString+"");this.red.appendTo(this.rgb);this.green=a("");this.green.addClass(this.toThemeProperty("jqx-input"));this.green.addClass(this.toThemeProperty("jqx-widget-content"));this.rgb.append(''+this.greenString+"");this.green.appendTo(this.rgb);this.colorPanel.addClass(this.toThemeProperty("jqx-color-picker-map-overlay"));this._mapImageOverlayURL=this._getImageUrl(this.colorPanel);this.colorPanel.removeClass(this.toThemeProperty("jqx-color-picker-map-overlay"));this.blue=a("");this.blue.addClass(this.toThemeProperty("jqx-input"));this.blue.addClass(this.toThemeProperty("jqx-widget-content"));this.rgb.append(''+this.blueString+"");this.blue.appendTo(this.rgb);this.preview=a("
");this.preview.addClass(this.toThemeProperty("jqx-widget-content"));this.preview.appendTo(this.colorPanel);this.colorBarPointer=a("
");this.colorBarPointer.addClass(this.toThemeProperty("jqx-color-picker-bar-pointer"));this.colorMapPointer=a("
");this.colorMapPointer.addClass(this.toThemeProperty("jqx-color-picker-pointer"));this.transparent=a("");if(this.disabled){this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"));this.element.disabled=true}this._addHandlers()},val:function(b){if(arguments.length==0){return"#"+this.color.hex}this.setColor(b);return this.color.hex},_setPositionFromValue:function(){var d=this;var c=d.color.h;var i=100-d.color.v;var b=d.colorMap.height();var e=d.colorMap.width();var h=c*e/360;var g=i*b/100;if(this.colorMode=="saturation"){var f=100-d.color.s;f=f*b/100;d._saturation=100-d.color.s;d.colorMapPointer.css("margin-left",h-8);d.colorMapPointer.css("margin-top",g-8);d.colorBarPointer.css("margin-top",f-8);d.colorMapImageOverlay.css("opacity",(100-d.color.s)/100)}else{var c=d.color.s;var h=c*e/100;var g=i*b/100;var f=360-d.color.h;f=f*b/360;d._hue=d.color.h;d.colorMapPointer.css("margin-left",h-8);d.colorMapPointer.css("margin-top",g-8);d.colorBarPointer.css("margin-top",f-8)}},updateRGB:function(){var b=this;b.color.setRgb(b.red.val(),b.green.val(),b.blue.val());b._updateUI();b._raiseEvent("0",{color:b.color});b.color.transparent=false},_setPosition:function(f,c,h){var e=parseInt(f.pageX);var g=parseInt(c.offset().left);var b=parseInt(f.pageY);var d=parseInt(c.offset().top);if(this._isTouchDevice){var i=a.jqx.position(f);e=i.left;b=i.top}if(h[0].className.indexOf("jqx-color-picker-bar")==-1){h.css("margin-left",e-8-g)}if(b>=d&&b<=d+c.height()){h.css("margin-top",b-8-d)}},_handleKeyInput:function(c,d,b){if(c.disabled){return}if(!c._validateKey(d)){return d}b.val(c._setValueInRange(b.val(),0,255));this.updateRGB();this._setPositionFromValue()},_addHandlers:function(){var d=this;this.addHandler(this.colorMapPointer,"dragStart",function(j){j.preventDefault();return false});this.addHandler(this.colorBarPointer,"dragStart",function(j){j.preventDefault();return false});this.addHandler(this.transparent,"click",function(j){d._raiseEvent("0",{color:"transparent"});j.preventDefault();d.color.transparent=true});this.addHandler(this.host,"selectionstart",function(j){j.preventDefault();return false});this.addHandler(this.blue,"keyup blur",function(j){d._handleKeyInput(d,j,d.blue)});this.addHandler(this.green,"keyup blur",function(j){d._handleKeyInput(d,j,d.green)});this.addHandler(this.red,"keyup blur",function(j){d._handleKeyInput(d,j,d.red)});this.addHandler(this.hex,"keyup blur",function(j){if(d.disabled){return}if(!d._validateKey(j)){return j}if(d.hex.val().toString().length==6){d.hex.val(d.color.validateHex(d.hex.val()));d.color.setHex(d.hex.val());d._updateUI();d._setPositionFromValue();d._raiseEvent("0",{color:d.color})}});this.addHandler(this.colorMap,"dragstart",function(j){j.preventDefault();return false});var f=function(k){d._setPosition(k,d.colorMap,d.colorMapPointer);if(d.colorMode=="saturation"){var j=d._valuesFromMouse(k,d.colorMap,360,100);if(j.x>360){j.x=360}d.color.setHsv(j.x,d._saturation!=null?100-d._saturation:100,100-j.y)}else{var j=d._valuesFromMouse(k,d.colorMap,100,100);if(j.x>100){j.x=100}d.color.setHsv(d._hue!=null?d._hue:360,j.x,100-j.y)}d._updateUI();d._raiseEvent("0",{color:d.color});d.color.transparent=false};var c="mousedown.picker"+this.element.id;if(this._isTouchDevice){c=a.jqx.mobile.getTouchEventName("touchstart")+".picker"+this.element.id}this.addHandler(this.colorMap,c,function(j){if(d.disabled){return}d.beginDrag=true;f(j)});var b="mousemove.picker"+this.element.id;if(this._isTouchDevice){b=a.jqx.mobile.getTouchEventName("touchmove")+".picker"+this.element.id}this.addHandler(a(document),b,function(j){if(d.disabled){return}if(d.beginDrag==true){f(j);if(d._isTouchDevice){j.preventDefault()}}});if(!this._isTouchDevice){this.addHandler(this.colorBar,"dragstart",function(j){j.preventDefault();return false})}var e=function(k){d._setPosition(k,d.colorBar,d.colorBarPointer);if(d.colorMode=="saturation"){var j=d._valuesFromMouse(k,d.colorBar,100,100);d.color.s=j.y;d._saturation=j.y;d.colorMapImageOverlay.css("opacity",(d.color.s)/100);d.color.setHsv(d.color.h,100-d.color.s,d.color.v)}else{var j=d._valuesFromMouse(k,d.colorBar,100,360);d.color.h=360-j.y;d._hue=d.color.h;d.color.setHsv(d.color.h,d.color.s,d.color.v)}d._updateUI();d._raiseEvent("0",{color:d.color});d.color.transparent=false};var h="mousemove.colorBar"+this.element.id;var g="mousedown.colorBar"+this.element.id;var i="mouseup.colorBar"+this.element.id;if(this._isTouchDevice){h=a.jqx.mobile.getTouchEventName("touchmove")+".colorBar"+this.element.id;g=a.jqx.mobile.getTouchEventName("touchstart")+".colorBar"+this.element.id;i=a.jqx.mobile.getTouchEventName("touchend")+".colorBar"+this.element.id}this.addHandler(this.colorBar,g,function(j){if(d.disabled){return}d.beginDragBar=true;e(j)});this.addHandler(a(document),h,function(j){if(d.disabled){return}if(d.beginDragBar==true){e(j);if(d._isTouchDevice){j.preventDefault()}}});this.addHandler(a(document),i,function(j){if(d.disabled){return}d.beginDrag=false;d.beginDragBar=false})},_removeHandlers:function(){this.removeHandler(this.transparent,"click");this.removeHandler(this.host,"selectionstart");this.removeHandler(this.blue,"keyup blur");this.removeHandler(this.green,"keyup blur");this.removeHandler(this.red,"keyup blur");this.removeHandler(this.hex,"keyup blur");this.removeHandler(this.colorMap,"dragstart");this.removeHandler(this.colorBar,"dragstart");this.removeHandler(this.colorMapPointer,"dragStart");this.removeHandler(this.colorBarPointer,"dragStart");var g=this.element.id;var e="mousemove.colorBar"+g;var d="mousedown.colorBar"+g;var f="mouseup.colorBar"+g;var c="mousedown.picker"+g;var b="mousemove.picker"+g;if(this._isTouchDevice){e=a.jqx.mobile.getTouchEventName("touchmove")+".colorBar"+g;d=a.jqx.mobile.getTouchEventName("touchstart")+".colorBar"+g;f=a.jqx.mobile.getTouchEventName("touchend")+".colorBar"+g;c=a.jqx.mobile.getTouchEventName("touchstart")+".picker"+g;b=a.jqx.mobile.getTouchEventName("touchmove")+".picker"+g}this.removeHandler(this.colorMap,c);this.removeHandler(this.colorMap,b);this.removeHandler(this.colorBar,d);this.removeHandler(this.colorBar,e);this.removeHandler(a(document),b);this.removeHandler(a(document),e);this.removeHandler(a(document),f)},_raiseEvent:function(g,c){if(c==undefined){c={owner:null}}var d=this.events[g];var e=c?c:{};e.owner=this;var f=new a.Event(d);f.owner=this;f.args=e;var b=this.host.trigger(f);return b},setColor:function(b){if(!b){return}if(b=="transparent"){this.color.transparent=true;this.color.hex="000";this.color.r=0;this.color.g=0;this.color.b=0}else{if(b.r){this.color=new a.jqx.color({rgb:b})}else{if(b.substring(0,1)=="#"){this.color=new a.jqx.color({hex:b.substring(1)})}else{this.color=new a.jqx.color({hex:b})}}}this._updateUI();this._setPositionFromValue();this._raiseEvent("0",{color:this.color})},getColor:function(){return this.color},resize:function(c,b){this.width=c;this.height=b;this._setSize();this.refresh()},propertyChangedHandler:function(b,c,e,d){if(b.isInitialized==undefined||b.isInitialized==false){return}if(c=="colorMode"){b.refresh()}if(c=="color"){b._updateUI();b._setPositionFromValue();b._raiseEvent("0",{color:d})}if(c=="width"||c=="height"){b._setSize();b.refresh()}if(c=="showTransparent"){b.refresh()}if(c=="disabled"){this.element.disabled=d;if(d){b.host.addClass(b.toThemeProperty("jqx-fill-state-disabled"))}else{b.host.removeClass(b.toThemeProperty("jqx-fill-state-disabled"))}}},_valuesFromMouse:function(j,g,c,b){var k=0;var i=0;var f=g.offset();var p=g.height();var d=g.width();var n=j.pageX;var m=j.pageY;if(this._isTouchDevice){var l=a.jqx.position(j);n=l.left;m=l.top}if(nf.left+d){k=d}else{k=n-f.left+1}}if(mf.top+p){i=p}else{i=m-f.top+1}}var h=parseInt(k/d*c);var o=parseInt(i/p*b);return{x:h,y:o}},_validateKey:function(b){if(b.keyCode==9||b.keyCode==16||b.keyCode==38||b.keyCode==29||b.keyCode==40||b.keyCode==17||b.keyCode==37||(b.ctrlKey&&(b.keyCode=="c".charCodeAt()||b.keyCode=="v".charCodeAt()))||(b.ctrlKey&&(b.keyCode=="C".charCodeAt()||b.keyCode=="V".charCodeAt()))){return false}if(b.ctrlKey||b.shiftKey){return false}return true},_setValueInRange:function(d,c,b){if(d==""||isNaN(d)){return c}d=parseInt(d);if(d>b){return b}if(d0){this.blue.width(f/3);this.green.width(f/3);this.red.width(f/3);return}},_getColorPointer:function(){var b=a("
");b.addClass(this.toThemeProperty("jqx-color-picker-pointer"));return b},_getImageUrl:function(c){var b=c.css("backgroundImage");b=b.replace('url("',"");b=b.replace('")',"");b=b.replace("url(","");b=b.replace(")","");return b},refresh:function(){if(this._delayLoading){return}this._saturation=null;this._hue=null;this.colorMap.removeClass();this.colorBar.removeClass();this.colorMap.addClass(this.toThemeProperty("jqx-disableselect"));this.colorBar.addClass(this.toThemeProperty("jqx-disableselect"));this.colorPanel.addClass(this.toThemeProperty("jqx-color-picker-panel"));this.colorBar.css("background-image","");this.colorMap.css("background-image","");if(this.colorMode=="saturation"){this.colorMap.addClass(this.toThemeProperty("jqx-color-picker-map"));this.colorBar.addClass(this.toThemeProperty("jqx-color-picker-bar"))}else{this.colorMap.addClass(this.toThemeProperty("jqx-color-picker-map-hue"));this.colorBar.addClass(this.toThemeProperty("jqx-color-picker-bar-hue"))}this._barImageURL=this._getImageUrl(this.colorBar);this._mapImageURL=this._getImageUrl(this.colorMap);this._arrange();this.colorBar.children().remove();this.colorBarImageContainer=a("
");this.colorBarImageContainer.width(this.colorBar.width());this.colorBarImageContainer.height(this.colorBar.height());this.colorBarImageContainer.appendTo(this.colorBar);this.colorBarImage=a("");this.colorBarImage.appendTo(this.colorBarImageContainer);this.colorBarImage.attr("src",this._barImageURL);this.colorBar.css("background-image","none");this.colorBarImage.attr("width",this.colorBar.width());this.colorBarImage.attr("height",this.colorBar.height());this.colorBarPointer.appendTo(this.colorBar);this.colorMap.children().remove();this.colorMapImage=a("");this.colorMapImage.appendTo(this.colorMap);this.colorMapImage.attr("src",this._mapImageURL);this.colorMap.css("background-image","none");this.colorMapImage.attr("width",this.colorMap.width());this.colorMapImage.attr("height",this.colorMap.height());this.colorMapImageOverlay=a("");this.colorMapImageOverlay.prependTo(this.colorMap);this.colorMapImageOverlay.attr("src",this._mapImageOverlayURL);this.colorMapImageOverlay.attr("width",this.colorMap.width());this.colorMapImageOverlay.attr("height",this.colorMap.height());this.colorMapImageOverlay.css("opacity",0);this.colorMapPointer.appendTo(this.colorMap);if(this.showTransparent){this.transparent.appendTo(this.colorPanel)}this._updateUI();this._setPositionFromValue()}});a.jqx.color=function(d){var b={r:0,g:0,b:0,h:0,s:0,v:0,hex:"",hexToRgb:function(i){i=this.validateHex(i);var h="00",f="00",e="00";if(i.length==6){h=i.substring(0,2);f=i.substring(2,4);e=i.substring(4,6)}else{if(i.length>4){h=i.substring(4,i.length);i=i.substring(0,4)}if(i.length>2){f=i.substring(2,i.length);i=i.substring(0,2)}if(i.length>0){e=i.substring(0,i.length)}}return{r:this.hexToInt(h),g:this.hexToInt(f),b:this.hexToInt(e)}},validateHex:function(e){e=new String(e).toUpperCase();e=e.replace(/[^A-F0-9]/g,"0");if(e.length>6){e=e.substring(0,6)}return e},webSafeDec:function(e){e=Math.round(e/51);e*=51;return e},hexToWebSafe:function(i){var h,f,e;if(i.length==3){h=i.substring(0,1);f=i.substring(1,1);e=i.substring(2,1)}else{h=i.substring(0,2);f=i.substring(2,4);e=i.substring(4,6)}return this.intToHex(this.webSafeDec(this.hexToInt(h)))+this.intToHex(this.webSafeDec(this.hexToInt(f)))+this.intToHex(this.webSafeDec(this.hexToInt(e)))},rgbToWebSafe:function(e){return{r:this.webSafeDec(e.r),g:this.webSafeDec(e.g),b:this.webSafeDec(e.b)}},rgbToHex:function(e){return this.intToHex(e.r)+this.intToHex(e.g)+this.intToHex(e.b)},intToHex:function(f){var e=(parseInt(f).toString(16));if(e.length==1){e=("0"+e)}return e.toUpperCase()},hexToInt:function(e){return(parseInt(e,16))},hslToRgb:function(v){var n=parseInt(v.h)/360;var w=parseInt(v.s)/100;var k=parseInt(v.l)/100;if(k<=0.5){var f=k*(1+w)}else{var f=k+w-(k*w)}var i=2*k-f;var t=n+(1/3);var j=n;var m=n-(1/3);var e=Math.round(this.hueToRgb(i,f,t)*255);var o=Math.round(this.hueToRgb(i,f,j)*255);var u=Math.round(this.hueToRgb(i,f,m)*255);return{r:e,g:o,b:u}},hueToRgb:function(g,f,e){if(e<0){e+=1}else{if(e>1){e-=1}}if((e*6)<1){return g+(f-g)*e*6}else{if((e*2)<1){return f}else{if((e*3)<2){return g+(f-g)*((2/3)-e)*6}else{return g}}}},rgbToHsv:function(i){var l=i.r/255;var k=i.g/255;var f=i.b/255;var h={h:0,s:0,v:0};var j=0;var e=0;if(l>=k&&l>=f){e=l;j=(k>f)?f:k}else{if(k>=f&&k>=l){e=k;j=(l>f)?f:l}else{e=f;j=(k>l)?l:k}}h.v=e;h.s=(e)?((e-j)/e):0;if(!h.s){h.h=0}else{var m=e-j;if(l==e){h.h=(k-f)/m}else{if(k==e){h.h=2+(f-l)/m}else{h.h=4+(l-k)/m}}h.h=parseInt(h.h*60);if(h.h<0){h.h+=360}}h.s=parseInt(h.s*100);h.v=parseInt(h.v*100);return h},hsvToRgb:function(l){var n={r:0,g:0,b:0};var k=l.h;var u=l.s;var o=l.v;if(u==0){if(o==0){n.r=n.g=n.b=0}else{n.r=n.g=n.b=parseInt(o*255/100)}}else{if(k==360){k=0}k/=60;u=u/100;o=o/100;var j=parseInt(k);var m=k-j;var g=o*(1-u);var e=o*(1-(u*m));var r=o*(1-(u*(1-m)));switch(j){case 0:n.r=o;n.g=r;n.b=g;break;case 1:n.r=e;n.g=o;n.b=g;break;case 2:n.r=g;n.g=o;n.b=r;break;case 3:n.r=g;n.g=e;n.b=o;break;case 4:n.r=r;n.g=g;n.b=o;break;case 5:n.r=o;n.g=g;n.b=e;break}n.r=parseInt(n.r*255);n.g=parseInt(n.g*255);n.b=parseInt(n.b*255)}return n},setRgb:function(h,f,e){var j=function(g){if(g<0||g>255){return 0}if(isNaN(parseInt(g))){return 0}return g};this.r=j(h);this.g=j(f);this.b=j(e);var i=this.rgbToHsv(this);this.h=i.h;this.s=i.s;this.v=i.v;this.hex=this.rgbToHex(this)},setHsl:function(g,f,e){this.h=g;this.s=f;this.l=e;var i=this.hslToRgb(this);this.r=i.r;this.g=i.g;this.b=i.b;this.hex=this.rgbToHex(i)},setHsv:function(g,f,e){this.h=g;this.s=f;this.v=e;var i=this.hsvToRgb(this);this.r=i.r;this.g=i.g;this.b=i.b;this.hex=this.rgbToHex(i)},setHex:function(e){this.hex=e;var g=this.hexToRgb(this.hex);this.r=g.r;this.g=g.g;this.b=g.b;var f=this.rgbToHsv(g);this.h=f.h;this.s=f.s;this.v=f.v}};if(d){if(d.hex){var c=b.validateHex(d.hex);b.setHex(c)}else{if(d.r){b.setRgb(d.r,d.g,d.b)}else{if(d.h){b.setHsv(d.h,d.s,d.v)}else{if(d.rgb){b.setRgb(d.rgb.r,d.rgb.g,d.rgb.b)}}}}}return b}})(jqxBaseFramework);(function(a){a.jqx.jqxWidget("jqxMaterialColorPicker","",{});a.extend(a.jqx._jqxMaterialColorPicker.prototype,{defineInstance:function(){var b={events:["colorchange"]};if(this===a.jqx._jqxMaterialColorPicker.prototype){return b}a.extend(true,this,b);return b},createInstance:function(){var b=this;b._renderGrid();b._addHandlers()},_renderGrid:function(){var c=this;var b=document.createElement("div");c._renderShades();c._renderColorPalette();c._renderColorLabels();b.classList="jqx-labels-and-palette";b.appendChild(c._colorLabelsContainer);b.appendChild(c._paletteContainer);c.element.appendChild(b)},_renderColorPalette:function(){var h=this;var b=[["#ffebee","#ffcdd2","#ef9a9a","#e57373","#ef5350","#f44336","#e53935","#d32f2f","#c62828","#b71c1c","#ff8a80","#ff5252","#ff1744","#d50000"],["#fce4ec","#f8bbd0","#f48fb1","#f06292","#ec407a","#e91e63","#d81b60","#c2185b","#ad1457","#880e4f","#ff80ab","#ff4081","#f50057","#c51162"],["#f3e5f5","#e1bee7","#ce93d8","#ba68c8","#ab47bc","#9c27b0","#8e24aa","#7b1fa2","#6a1b9a","#4a148c","#ea80fc","#e040fb","#d500f9","#aa00ff"],["#ede7f6","#d1c4e9","#b39ddb","#9575cd","#7e57c2","#673ab7","#5e35b1","#512da8","#4527a0","#311b92","#b388ff","#7c4dff","#651fff","#6200ea"],["#e8eaf6","#c5cae9","#9fa8da","#7986cb","#5c6bc0","#3f51b5","#3949ab","#303f9f","#283593","#1a237e","#8c9eff","#536dfe","#3d5afe","#304ffe"],["#e3f2fd","#bbdefb","#90caf9","#64b5f6","#42a5f5","#2196f3","#1e88e5","#1976d2","#1565c0","#0d47a1","#82b1ff","#448aff","#2979ff","#2962ff"],["#e1f5fe","#b3e5fc","#81d4fa","#4fc3f7","#29b6f6","#03a9f4","#039be5","#0288d1","#0277bd","#01579b","#80d8ff","#40c4ff","#00b0ff","#0091ea"],["#e0f7fa","#b2ebf2","#80deea","#4dd0e1","#26c6da","#00bcd4","#00acc1","#0097a7","#00838f","#006064","#84ffff","#18ffff","#00e5ff","#00b8d4"],["#e0f2f1","#b2dfdb","#80cbc4","#4db6ac","#26a69a","#009688","#00897b","#00796b","#00695c","#004d40","#a7ffeb","#64ffda","#1de9b6","#00bfa5"],["#e8f5e9","#c8e6c9","#a5d6a7","#81c784","#66bb6a","#4caf50","#43a047","#388e3c","#2e7d32","#1b5e20","#b9f6ca","#69f0ae","#00e676","#00c853"],["#f1f8e9","#dcedc8","#c5e1a5","#aed581","#9ccc65","#8bc34a","#7cb342","#689f38","#558b2f","#33691e","#ccff90","#b2ff59","#76ff03","#64dd17"],["#f9fbe7","#f0f4c3","#e6ee9c","#dce775","#d4e157","#cddc39","#c0ca33","#afb42b","#9e9d24","#827717","#f4ff81","#eeff41","#c6ff00","#aeea00"],["#fffde7","#fff9c4","#fff59d","#fff176","#ffee58","#ffeb3b","#fdd835","#fbc02d","#f9a825","#f57f17","#ffff8d","#ffff00","#ffea00","#ffd600"],["#fff8e1","#ffecb3","#ffe082","#ffd54f","#ffca28","#ffc107","#ffb300","#ffa000","#ff8f00","#ff6f00","#ffe57f","#ffd740","#ffc400","#ffab00"],["#fff3e0","#ffe0b2","#ffcc80","#ffb74d","#ffa726","#ff9800","#fb8c00","#f57c00","#ef6c00","#e65100","#ffd180","#ffab40","#ff9100","#ff6d00"],["#fbe9e7","#ffccbc","#ffab91","#ff8a65","#ff7043","#ff5722","#f4511e","#e64a19","#d84315","#bf360c","#ff9e80","#ff6e40","#ff3d00","#dd2c00"],["#efebe9","#d7ccc8","#bcaaa4","#a1887f","#8d6e63","#795548","#6d4c41","#5d4037","#4e342e","#3e2723"],["#fafafa","#f5f5f5","#eeeeee","#e0e0e0","#bdbdbd","#9e9e9e","#757575","#616161","#424242","#212121"],["#eceff1","#cfd8dc","#b0bec5","#90a4ae","#78909c","#607d8b","#546e7a","#455a64","#37474f","#263238"],];var g=document.createElement("div");for(var d=0,f=b.length;d",h);if(!i.width){i.width=a(i.field).width()}if(!i.height){i.height=a(i.field).outerHeight()}i.element.style.cssText=i.field.style.cssText;a(i.field).hide().after(d);var t=i.host.data();i.host=d;i.host.data(t);i.element=d[0];i.element.id=i.field.id;i.field.id=h.id;if(i._className){i.host.addClass(i._className);a(i.field).removeClass(i._className)}if(i.field.tabIndex){var c=i.field.tabIndex;i.field.tabIndex=-1;i.element.tabIndex=c}if(i.field.innerHTML!=""){var k=a.jqx.parseSourceTag(i.field);i.source=k.items;if(i.selectedIndex==-1){i.selectedIndex=k.index}}}else{if(i.host.find("li").length>0||i.host.find("option").length>0){var k=a.jqx.parseSourceTag(i.element);i.source=k.items}}i.removeHandlers();i.isanimating=false;i.id=a.jqx.utilities.createId();i.element.innerHTML="";var m=a("
");i.comboStructure=m;if(a.jqx._jqxListBox==null||a.jqx._jqxListBox==undefined){throw"jqxComboBox: Missing reference to jqxlistbox.js."}i.touch=a.jqx.mobile.isTouchDevice();if(i.touchMode===true){i.touch=true}i.host.append(m);i.dropdownlistWrapper=i.host.find("#dropdownlistWrapper");i.dropdownlistArrow=i.host.find("#dropdownlistArrow");i.dropdownlistContent=i.host.find("#dropdownlistContent");i.dropdownlistContent.addClass(i.toThemeProperty("jqx-combobox-content"));i.dropdownlistContent.addClass(i.toThemeProperty("jqx-widget-content"));i.dropdownlistWrapper[0].id="dropdownlistWrapper"+i.element.id;i.dropdownlistArrow[0].id="dropdownlistArrow"+i.element.id;i.dropdownlistContent[0].id="dropdownlistContent"+i.element.id;if(i.template){i.dropdownlistArrow.addClass(i.toThemeProperty("jqx-"+i.template+""))}i.dropdownlistContent.append(a(''));i.input=i.dropdownlistContent.find("input");i.input.addClass(i.toThemeProperty("jqx-combobox-input"));i.input.addClass(i.toThemeProperty("jqx-widget-content"));if(i.host.attr("tabindex")){i.input.attr("tabindex",i.host.attr("tabindex"));i.host.removeAttr("tabindex")}var j=a("");if(this.hint){j[0].innerHTML=this.placeHolder}j.addClass(i.toThemeProperty("jqx-input-label"));i.dropdownlistWrapper.append(j);i.label=j;var r=a("");i.dropdownlistWrapper.append(r);r.addClass(i.toThemeProperty("jqx-input-bar"));i.bar=r;var i=this;if(i.template){i.bar.addClass(i.toThemeProperty("jqx-"+i.template));i.label.addClass(i.toThemeProperty("jqx-"+i.template))}i._addInput();if(i.rtl){i.input.css({direction:"rtl"});i.dropdownlistContent.addClass(i.toThemeProperty("jqx-combobox-content-rtl"))}try{var q="listBox"+i.id;var g=a(a.find("#"+q));if(g.length>0){g.remove()}a.jqx.aria(this,"aria-owns",q);a.jqx.aria(this,"aria-haspopup",true);a.jqx.aria(this,"aria-multiline",false);if(i.listBoxContainer){i.listBoxContainer.jqxListBox("destroy")}if(i.container){i.container.remove()}var l=a("
");l.hide();if(i.dropDownContainer=="element"){l.appendTo(i.host)}else{l.appendTo(document.body)}l.addClass(i.toThemeProperty("jqx-listbox-container"));i.container=l;i.listBoxContainer=a(a.find("#innerListBox"+i.id));var p=i.width;if(i.dropDownWidth!="auto"){p=i.dropDownWidth}if(i.dropDownHeight==null){i.dropDownHeight=200}i.container.width(parseInt(p)+25);i.container.height(parseInt(i.dropDownHeight)+25);i._ready=false;i.addHandler(i.listBoxContainer,"bindingComplete",function(e){if(!i.listBox){i.listBox=a.data(i.listBoxContainer[0],"jqxListBox").instance}if(!i._ready){if(i.ready){i.ready()}i._ready=true}i._raiseEvent("6")});i.addHandler(i.listBoxContainer,"itemAdd",function(e){i._raiseEvent("7",e.args)});i.addHandler(i.listBoxContainer,"itemRemove",function(e){i._raiseEvent("8",e.args)});i.addHandler(i.listBoxContainer,"itemUpdate",function(e){i._raiseEvent("9",e.args)});var o=true;i.listBoxContainer.jqxListBox({autoItemsHeight:i.autoItemsHeight,_checkForHiddenParent:false,allowDrop:false,allowDrag:false,checkboxes:i.checkboxes,emptyString:i.emptyString,autoBind:!i.remoteAutoComplete&&i.autoBind,renderer:i.renderer,rtl:i.rtl,itemHeight:i.itemHeight,selectedIndex:i.selectedIndex,incrementalSearch:false,width:p,scrollBarSize:i.scrollBarSize,autoHeight:i.autoDropDownHeight,height:i.dropDownHeight,groupMember:i.groupMember,searchMember:i.searchMember,displayMember:i.displayMember,valueMember:i.valueMember,source:i.source,theme:i.theme,rendered:function(){i.listBox=a.data(i.listBoxContainer[0],"jqxListBox").instance;if(i.remoteAutoComplete){if(i.autoDropDownHeight){i.container.height(i.listBox.virtualSize.height+25);i.listBoxContainer.height(i.listBox.virtualSize.height);i.listBox._arrange()}else{i.listBox._arrange();i.listBox.ensureVisible(0);i.listBox._renderItems();i.container.height(i.listBoxContainer.height()+25)}if(i.searchString!=undefined&&i.searchString.length>=i.minLength){var e=i.listBoxContainer.jqxListBox("items");if(e){if(e.length>0){if(!i.isOpened()){i.open()}}else{i.close()}}else{i.close()}}else{i.close()}}else{i.renderSelection("mouse");if(i.multiSelect){i.doMultiSelect(false)}}if(i.rendered){i.rendered()}}});if(i.dropDownContainer=="element"){i.listBoxContainer.css({position:"absolute",top:0,left:0})}else{i.listBoxContainer.css({position:"absolute",zIndex:i.popupZIndex,top:0,left:0})}i.listBoxContainer.css("border-top-width","1px");i.listBoxContainer.addClass(i.toThemeProperty("jqx-popup"));if(a.jqx.browser.msie){i.listBoxContainer.addClass(i.toThemeProperty("jqx-noshadow"))}if(i.template){i.listBoxContainer.addClass(i.toThemeProperty("jqx-"+i.template+"-item"))}i.listBox=a.data(i.listBoxContainer[0],"jqxListBox").instance;i.listBox.enableSelection=i.enableSelection;i.listBox.enableHover=i.enableHover;i.listBox.equalItemsWidth=i.equalItemsWidth;i.listBox._arrange();i.addHandler(i.listBoxContainer,"unselect",function(e){if(!i.multiSelect){i._raiseEvent("3",{index:e.args.index,type:e.args.type,item:e.args.item})}});i.addHandler(i.listBoxContainer,"change",function(e){if(!i.multiSelect){i.selectedIndex=i.listBox.selectedIndex;i._raiseEvent("4",{index:e.args.index,type:e.args.type,item:e.args.item})}});if(i.animationType=="none"){i.container.css("display","none")}else{i.container.hide()}o=false}catch(s){throw s}var i=this;i.input.attr("disabled",i.disabled);var f=a.jqx.browser.msie&&a.jqx.browser.version<8;if(!f){if(i.isMaterialized()&&i.hint){i.label[0].innerHTML=i.placeHolder}else{i.input.attr("placeholder",i.placeHolder)}}i.propertyChangeMap.disabled=function(e,v,u,w){if(w){e.host.addClass(i.toThemeProperty("jqx-combobox-state-disabled"));e.host.addClass(i.toThemeProperty("jqx-fill-state-disabled"));e.dropdownlistContent.addClass(i.toThemeProperty("jqx-combobox-content-disabled"))}else{e.host.removeClass(i.toThemeProperty("jqx-combobox-state-disabled"));e.host.removeClass(i.toThemeProperty("jqx-fill-state-disabled"));e.dropdownlistContent.removeClass(i.toThemeProperty("jqx-combobox-content-disabled"))}e.input.attr("disabled",e.disabled);a.jqx.aria(e,"aria-disabled",e.disabled);e.input.attr("disabled",e.disabled)};if(i.disabled){i.host.addClass(i.toThemeProperty("jqx-combobox-state-disabled"));i.host.addClass(i.toThemeProperty("jqx-fill-state-disabled"));i.dropdownlistContent.addClass(i.toThemeProperty("jqx-combobox-content-disabled"))}i.host.addClass(i.toThemeProperty("jqx-combobox-state-normal"));i.host.addClass(i.toThemeProperty("jqx-combobox"));i.host.addClass(i.toThemeProperty("jqx-rc-all"));i.host.addClass(i.toThemeProperty("jqx-widget"));i.host.addClass(i.toThemeProperty("jqx-widget-content"));i.dropdownlistArrowIcon=a("
");if(i.dropDownVerticalAlignment=="top"){i.dropdownlistArrowIcon.addClass(i.toThemeProperty("jqx-icon-arrow-up"))}else{i.dropdownlistArrowIcon.addClass(i.toThemeProperty("jqx-icon-arrow-down"))}i.dropdownlistArrowIcon.addClass(i.toThemeProperty("jqx-icon"));i.dropdownlistArrow.append(i.dropdownlistArrowIcon);i.dropdownlistArrow.addClass(i.toThemeProperty("jqx-combobox-arrow-normal"));i.dropdownlistArrow.addClass(i.toThemeProperty("jqx-fill-state-normal"));if(!i.rtl){i.dropdownlistArrow.addClass(i.toThemeProperty("jqx-rc-r"))}else{i.dropdownlistArrow.addClass(i.toThemeProperty("jqx-rc-l"))}i._setSize();i._updateHandlers();i.addHandler(i.input,"keyup.textchange",function(e){if(i._writeTimer){clearTimeout(i._writeTimer)}i._writeTimer=setTimeout(function(){var u=i._search(e);if(i.cinput&&i.input){if(!i.displayMember){i.cinput[0].value=i.input[0].value}else{i._updateInputSelection()}}},50)});if(a.jqx.browser.msie&&a.jqx.browser.version<8){if(i.host.parents(".jqx-window").length>0){var n=i.host.parents(".jqx-window").css("z-index");l.css("z-index",n+10);i.listBoxContainer.css("z-index",n+10)}}if(i.checkboxes){i.input.attr("readonly",true);a.jqx.aria(this,"aria-readonly",true)}else{a.jqx.aria(this,"aria-readonly",false)}if(!i.remoteAutoComplete){i.searchString=""}this.bar.css("top",this.host.height())},_addInput:function(){var b=this.host.attr("name");this.cinput=a("");this.host.append(this.cinput);if(b){this.cinput.attr("name",b)}},_updateInputSelection:function(){if(this.cinput){var c=new Array();if(this.selectedIndex==-1){this.cinput.val("")}else{var e=this.getSelectedItem();if(e!=null){this.cinput.val(e.value);c.push(e.value)}else{this.cinput.val(this.dropdownlistContent.text())}}if(this.checkboxes||this.multiSelect){if(!this.multiSelect){var b=this.getCheckedItems()}else{var b=this.getSelectedItems()}var f="";if(b!=null){for(var d=0;d=0;if(this.selected){a(this).attr("selected",true)}})}else{a.each(this.items,function(g,h){a(this.originalItem.originalItem).removeAttr("data-selected");this.selected=c.indexOf(this.value)>=0;if(this.selected){a(this.originalItem.originalItem).attr("data-selected",true)}})}}}},_search:function(d){var i=this;if(d.keyCode==9){return}if(i.searchMode=="none"||i.searchMode==null||i.searchMode=="undefined"){return}if(d.keyCode==16||d.keyCode==17||d.keyCode==20){return}if(i.checkboxes){return}if(i.multiSelect){var l=a(""+document.createTextNode(i.input.val())+"");l.addClass(i.toThemeProperty("jqx-widget"));a(document.body).append(l);var e=l.width()+15;l.remove();if(e>i.host.width()){e=i.host.width()}if(e<25){e=25}i.input.css("width",e+"px");if(i.selectedItems.length==0){i.input.css("width","100%");if(!i.isMaterialized()){i.input.attr("placeholder",i.placeHolder)}}else{if(!i.isMaterialized()){i.input.attr("placeholder","")}}var j=parseInt(this._findPos(i.host[0])[1])+parseInt(i.host.outerHeight())-1+"px";var r=false;if((r!=null&&r)){j=a.jqx.mobile.getTopPos(this.element)+parseInt(i.host.outerHeight());if(a("body").css("border-top-width")!="0px"){j=parseInt(j)-this._getBodyOffset().top+"px"}}i.container.css("top",j);var o=parseInt(i.host.height());i.dropdownlistArrow.height(o)}if(!i.isanimating){if(d.altKey&&d.keyCode==38){i.hideListBox("altKey");return false}if(d.altKey&&d.keyCode==40){if(!i.isOpened()){i.showListBox("altKey")}return false}}if(d.keyCode==37||d.keyCode==39){return false}if(d.altKey||d.keyCode==18){return}if(d.keyCode>=33&&d.keyCode<=40){return}if(d.ctrlKey||i.ctrlKey){if(d.keyCode!=88&&d.keyCode!=86){return}}var k=i.input.val();if(k.length==0&&!i.autoComplete){i.listBox.searchString=i.input.val();i.listBox.clearSelection();i.hideListBox("search");i.searchString=i.input.val();return}if(i.remoteAutoComplete){var i=this;var q=function(){i.listBox.vScrollInstance.value=0};if(k.length>=i.minLength){if(!d.ctrlKey&&!d.altKey){if(i.searchString!=k){var c=i.listBoxContainer.jqxListBox("source");if(c==null){i.listBoxContainer.jqxListBox({source:i.source})}if(i._searchTimer){clearTimeout(i._searchTimer)}if(d.keyCode!=13&&d.keyCode!=27){i._searchTimer=setTimeout(function(){q();if(i.autoDropDownHeight){i.listBox.autoHeight=true}i.searchString=i.input.val();if(i.search!=null){i.search(i.input.val())}else{throw"'search' function is not defined"}},i.remoteAutoCompleteDelay)}}i.searchString=k}}else{if(i._searchTimer){clearTimeout(i._searchTimer)}q();i.searchString="";i.search("");i.listBoxContainer.jqxListBox({source:null})}return}var i=this;if(k===i.searchString){return}if(!(d.keyCode=="27"||d.keyCode=="13")){var n=i.input[0].value;var g=i._updateItemsVisibility(k);var m=g.matchItems;if(i.autoComplete&&i.autoItemsHeight){i.input[0].value=n}var h=g.index;if(!i.autoComplete&&!i.remoteAutoComplete){if(!i.multiSelect||(i.multiSelect&&h>=0)){i.listBox.selectIndex(h);var f=i.listBox.isIndexInView(h);if(!f){i.listBox.ensureVisible(h)}else{i.listBox._renderItems()}}}if(i.autoComplete&&m.length===0){i.hideListBox("search")}}if(d.keyCode=="13"){var b=i.container.css("display")=="block";if(b&&!i.isanimating){i.hideListBox("keyboard");i._oldvalue=i.listBox.selectedValue;return}}else{if(d.keyCode=="27"){var b=i.container.css("display")=="block";if(b&&!i.isanimating){if(!i.multiSelect){var p=i.listBox.getVisibleItem(i._oldvalue);if(p){var i=this;setTimeout(function(){if(i.autoComplete){i._updateItemsVisibility("")}i.listBox.selectIndex(p.index);i.renderSelection("api")},i.closeDelay)}else{i.clearSelection()}}else{i.input.val("");i.listBox.selectedValue=null}i.hideListBox("keyboard");i.renderSelection("api");d.preventDefault();return false}}else{if(!i.isOpened()&&!i.opening&&!d.ctrlKey){if(i.listBox.visibleItems&&i.listBox.visibleItems.length>0){if(i.input.val()!=i.searchString&&i.searchString!=undefined&&h!=-1){i.showListBox("search")}}}i.searchString=i.input.val();if(i.searchString==""){if(!i.listBox.itemsByValue[""]){h=-1;if(!i.multiSelect){i.clearSelection()}}}var p=i.listBox.getVisibleItem(h);if(p!=undefined){i._updateInputSelection()}}}},val:function(c){if(!this.input){return""}var d=function(f){for(var e in f){if(f.hasOwnProperty(e)){return false}}if(typeof c=="number"){return false}if(typeof c=="date"){return false}if(typeof c=="boolean"){return false}if(typeof c=="string"){return false}return true};if(d(c)||arguments.length==0){var b=this.getSelectedItem();if(b){return b.value}return this.input.val()}else{var b=this.getItemByValue(c);if(b!=null){this.selectItem(b)}else{this.input.val(c)}return this.input.val()}},focus:function(){var c=this;var b=function(){c.input.focus();var d=c.input.val();c._setSelection(0,d.length)};b();setTimeout(function(){b()},10)},_setSelection:function(e,b){try{if("selectionStart" in this.input[0]){this.input[0].focus();this.input[0].setSelectionRange(e,b)}else{var c=this.input[0].createTextRange();c.collapse(true);c.moveEnd("character",b);c.moveStart("character",e);c.select()}}catch(d){}},setContent:function(b){this.input.val(b)},_updateItemsVisibility:function(k){var i=this.getItems();if(i==undefined){return{index:-1,matchItem:new Array()}}var f=this;var g=-1;var l=new Array();var j=0;a.each(i,function(o){var q="";if(!this.isGroup){if(this.searchLabel){q=this.searchLabel}else{if(this.label){q=this.label}else{if(this.value){q=this.value}else{if(this.title){q=this.title}else{q="jqxItem"}}}}q=q.toString();var p=false;switch(f.searchMode){case"containsignorecase":p=a.jqx.string.containsIgnoreCase(q,k);break;case"contains":p=a.jqx.string.contains(q,k);break;case"equals":p=a.jqx.string.equals(q,k);break;case"equalsignorecase":p=a.jqx.string.equalsIgnoreCase(q,k);break;case"startswith":p=a.jqx.string.startsWith(q,k);break;case"startswithignorecase":p=a.jqx.string.startsWithIgnoreCase(q,k);break;case"endswith":p=a.jqx.string.endsWith(q,k);break;case"endswithignorecase":p=a.jqx.string.endsWithIgnoreCase(q,k);break}if(f.autoComplete&&!p){this.visible=false}if(p&&f.autoComplete){l[j++]=this;this.visible=true;g=this.visibleIndex}if(k==""&&f.autoComplete){this.visible=true;p=false}if(f.multiSelect){this.disabled=false;if(f.selectedItems.indexOf(this.value)>=0||f._disabledItems.indexOf(this.value)>=0){this.disabled=true;p=false}}if(!f.multiSelect){if(p&&!f.autoComplete){g=this.visibleIndex;return false}}else{if(p&&!f.autoComplete){if(g===-1){g=this.visibleIndex}return true}}}});this.listBox.searchString=k;var f=this;var h=function(){if(f.multiSelect){return}var o=0;var r=false;var q=null;for(var p=0;p0){if(q){f.listBox.selectedValue=q.value}else{f.listBox.selectedValue=null}}else{f.listBox.selectedValue=null}f.listBox.ensureVisible(0)};if(!this.autoComplete){h();return{index:g,matchItems:l}}this.listBox.renderedVisibleItems=new Array();var b=this.listBox.vScrollInstance.value;this.listBox.vScrollInstance.value=0;this.listBox.visibleItems=new Array();this.listBox._renderItems();var e=this.listBox.selectedValue;var n=this.listBox.getItemByValue(e);if(!this.multiSelect){if(n){if(n.visible){this.listBox.selectedIndex=n.visibleIndex;for(var d=0;d0){this.host.css("box-sizing","border-box")}}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){g=true;this.element.style.height=this.height}if(g){var e=this;var d=this.host.width();if(this.dropDownWidth!="auto"){d=this.dropDownWidth}this.listBoxContainer.jqxListBox({width:d});this.container.width(parseInt(d)+25);this._arrange()}var e=this;var f=function(){if(e.multiSelect){e.host.height(e.height)}e._arrange();if(e.multiSelect){e.host.height("auto")}};e.oldWidth=e.host.width();e.oldHeight=e.host.height();a.jqx.utilities.resize(this.host,function(){var i=e.host.width();var j=e.host.height();if(i!=e.oldWidth||j!=e.oldHeight){f();e.hideListBox("api")}e.oldWidth=i;e.oldHeight=j})},isOpened:function(){var c=this;var b=a.data(document.body,"openedCombojqxListBox"+this.element.id);if(this.container.css("display")!="block"){return false}if(b!=null&&b==c.listBoxContainer){return true}return false},_updateHandlers:function(){var e=this;var d=false;this.removeHandlers();if(this.multiSelect){this.addHandler(this.dropdownlistContent,"click",function(f){if(f.target.href){return false}e.input.focus();setTimeout(function(){e.input.focus()},10)});this.addHandler(this.dropdownlistContent,"focus",function(f){if(f.target.href){return false}e.input.focus();setTimeout(function(){e.input.focus()},10)})}if(!this.touch){if(this.host.parents()){this.addHandler(this.host.parents(),"scroll.combobox"+this.element.id,function(f){var g=e.isOpened();if(g){e.close()}})}this.addHandler(this.host,"mouseenter",function(){if(!e.disabled&&e.enableHover){d=true;e.host.addClass(e.toThemeProperty("jqx-combobox-state-hover"));if(e.dropDownVerticalAlignment=="top"){e.dropdownlistArrowIcon.addClass(e.toThemeProperty("jqx-icon-arrow-up"))}else{e.dropdownlistArrowIcon.addClass(e.toThemeProperty("jqx-icon-arrow-down-hover"))}e.dropdownlistArrow.addClass(e.toThemeProperty("jqx-combobox-arrow-hover"));e.dropdownlistArrow.addClass(e.toThemeProperty("jqx-fill-state-hover"))}});this.addHandler(this.host,"mouseleave",function(){if(!e.disabled&&e.enableHover){e.host.removeClass(e.toThemeProperty("jqx-combobox-state-hover"));e.dropdownlistArrowIcon.removeClass(e.toThemeProperty("jqx-icon-arrow-down-hover"));e.dropdownlistArrowIcon.removeClass(e.toThemeProperty("jqx-icon-arrow-up-hover"));e.dropdownlistArrow.removeClass(e.toThemeProperty("jqx-combobox-arrow-hover"));e.dropdownlistArrow.removeClass(e.toThemeProperty("jqx-fill-state-hover"));d=false}})}if(e.autoOpen){this.addHandler(this.host,"mouseenter",function(){var f=e.isOpened();if(!f&&e.autoOpen){e.open();e.host.focus()}});this.addHandler(a(document),"mousemove."+e.id,function(f){var m=e.isOpened();if(m&&e.autoOpen){var j=e.host.coord();var k=j.top;var i=j.left;var g=e.container.coord();var n=g.left;var l=g.top;var h=true;if(f.pageY>=k&&f.pageY<=k+e.host.height()+2){if(f.pageX>=i&&f.pageX=l&&f.pageY<=l+e.container.height()-20){if(f.pageX>=n&&f.pageX=0){return true}}e.renderSelection("mouse");e._oldvalue=e.listBox.selectedValue;if(!e.touch&&!e.ishiding){if(!e.checkboxes){e.hideListBox("mouse");e.input.focus()}}if(e.touch===true){if(!e.checkboxes){e.hideListBox("mouse")}}}})}},_selectOldValue:function(){var c=this;if(c.listBox.selectedIndex==-1){if(!c.multiSelect){var b=c.listBox.getItemByValue(c._oldvalue);if(b){setTimeout(function(){if(c.autoComplete){c._updateItemsVisibility("")}c.listBox.selectIndex(b.index);c.renderSelection("api")},c.closeDelay)}else{c.clearSelection();c.listBox.selectIndex(0);c.renderSelection("api")}}else{c.listBox.selectedValue=null;c.input.val("")}}else{c.renderSelection("api")}},removeHandlers:function(){var c=this;if(this.dropdownlistWrapper!=null){this.removeHandler(this.dropdownlistWrapper,"mousedown")}if(this.dropdownlistContent){this.removeHandler(this.dropdownlistContent,"click");this.removeHandler(this.dropdownlistContent,"focus")}this.removeHandler(this.host,"keydown");this.removeHandler(this.host,"focus");if(this.input!=null){this.removeHandler(this.input,"focus");this.removeHandler(this.input,"blur")}this.removeHandler(this.host,"mouseenter");this.removeHandler(this.host,"mouseleave");this.removeHandler(a(document),"mousemove."+c.id);if(this.listBoxContainer){this.removeHandler(this.listBoxContainer,"checkChange");this.removeHandler(this.listBoxContainer,"select")}if(this.host.parents()){this.removeHandler(this.host.parents(),"scroll.combobox"+this.element.id)}if(this.dropdownlistArrowIcon&&this.dropdownlistArrow){var b="mousedown";if(this.touch){b=a.jqx.mobile.getTouchEventName("touchstart")}this.removeHandler(this.dropdownlistArrowIcon,b);this.removeHandler(this.dropdownlistArrow,b)}},getItem:function(b){var c=this.listBox.getItem(b);return c},getItemByValue:function(c){var b=this.listBox.getItemByValue(c);return b},getVisibleItem:function(b){var c=this.listBox.getVisibleItem(b);return c},renderSelection:function(j){if(j==undefined||j=="none"){return}if(this._disableSelection===true){return}if(this.listBox==null){return}if(this.multiSelect){return}var k=this.listBox.visibleItems[this.listBox.selectedIndex];if(this.autoComplete&&!this.checkboxes){if(this.listBox.selectedValue!==undefined){var k=this.getItemByValue(this.listBox.selectedValue)}}if(this.checkboxes){var f=this.getCheckedItems();if(f!=null&&f.length>0){k=f[0]}else{k=null}}if(this.hint){this.label[0].innerHTML=this.placeHolder}if(k!=null){if(this.hint){this.element.setAttribute("hint",true)}}else{this.element.removeAttribute("hint")}this.bar.css("top",this.host.height());if(k==null){var d=a.jqx.browser.msie&&a.jqx.browser.version<8;this.input.val("");this.input.attr("value","");if(!d){if(this.isMaterialized()){this.label[0].innerHTML=this.placeHolder;this.input.removeAttr("placeholder")}else{this.input.attr("placeholder",this.placeHolder)}}this._updateInputSelection();return}this.selectedIndex=this.listBox.selectedIndex;var c=a("");if(k.label!=undefined&&k.label!=null&&k.label.toString().length>0){a.jqx.utilities.html(c,k.label)}else{if(k.value!=undefined&&k.value!=null&&k.value.toString().length>0){a.jqx.utilities.html(c,k.value)}else{if(k.title!=undefined&&k.title!=null&&k.title.toString().length>0){a.jqx.utilities.html(c,k.title)}else{a.jqx.utilities.html(c,this.emptyString)}}}var b=c.outerHeight();if(this.checkboxes){var g=this.getCheckedItems();var h="";for(var e=0;e=0){var b=this.getItem(c);var e=this.selectedItems.indexOf(b.value);if(e>=0){if(b.value===this.listBox.selectedValue){this.listBox.selectedValue=null}this.selectedItems.splice(e,1);this._selectedItems.splice(e,1)}}this.doMultiSelect(false)}},selectIndex:function(b,d,e,c){if(this.autoComplete){this._updateItemsVisibility("")}this.listBox.selectIndex(b,d,e,c);this.renderSelection("mouse");this.selectedIndex=b;if(this.multiSelect){this.doMultiSelect()}},selectItem:function(b){if(this.autoComplete){this._updateItemsVisibility("")}if(this.listBox!=undefined){this.listBox.selectedIndex=-1;this.listBox.selectItem(b);this.selectedIndex=this.listBox.selectedIndex;this.renderSelection("mouse");if(this.multiSelect){this.doMultiSelect(false)}}},unselectItem:function(d){if(this.autoComplete){this._updateItemsVisibility("")}if(this.listBox!=undefined){this.listBox.unselectItem(d);this.renderSelection("mouse");if(this.multiSelect){var b=this.getItemByValue(d);if(b){var c=this.selectedItems.indexOf(b.value);if(c>=0){if(b.value===this.listBox.selectedValue){this.listBox.selectedValue=null}this.selectedItems.splice(c,1);this._selectedItems.splice(c,1)}}this.doMultiSelect(false)}}},checkItem:function(b){if(this.autoComplete){this._updateItemsVisibility("")}if(this.listBox!=undefined){this.listBox.checkItem(b)}},uncheckItem:function(b){if(this.autoComplete){this._updateItemsVisibility("")}if(this.listBox!=undefined){this.listBox.uncheckItem(b)}},indeterminateItem:function(b){if(this.autoComplete){this._updateItemsVisibility("")}if(this.listBox!=undefined){this.listBox.indeterminateItem(b)}},getSelectedValue:function(){return this.listBox.selectedValue},getSelectedIndex:function(){if(!this.multiSelect){return this.listBox.selectedIndex}else{if(this.remoteAutoComplete&&this.multiSelect&&this._selectedItems.length>0){return this.getSelectedItems()[0].index}if(this._selectedItems&&this._selectedItems.length>0){return this.getSelectedItems()[0].index}}},getSelectedItem:function(){if(!this.multiSelect){return this.getVisibleItem(this.listBox.selectedIndex)}else{if(this.remoteAutoComplete&&this.multiSelect&&this._selectedItems.length>0){return this.getSelectedItems()[0]}if(this._selectedItems&&this._selectedItems.length>0){return this.getSelectedItems()[0]}return null}},getSelectedItems:function(){if(this.remoteAutoComplete&&this.multiSelect){return this._selectedItems}var c=new Array();var b=this;a.each(this.selectedItems,function(){var d=b.getItemByValue(this);if(d){c.push(d)}else{var d=b._selectedItems[this];if(d){c.push(d)}}});return c},getCheckedItems:function(){return this.listBox.getCheckedItems()},checkIndex:function(b){this.listBox.checkIndex(b)},uncheckIndex:function(b){this.listBox.uncheckIndex(b)},indeterminateIndex:function(b){this.listBox.indeterminateIndex(b)},checkAll:function(){this.listBox.checkAll();this.renderSelection("mouse")},uncheckAll:function(){this.listBox.uncheckAll();this.renderSelection("mouse")},insertAt:function(c,b){if(c==null){return false}return this.listBox.insertAt(c,b)},addItem:function(b){return this.listBox.addItem(b)},removeAt:function(c){var b=this.listBox.removeAt(c);this.renderSelection("mouse");return b},removeItem:function(c){var b=this.listBox.removeItem(c);this.renderSelection("mouse");return b},updateItem:function(c,d){var b=this.listBox.updateItem(c,d);this.renderSelection("mouse");return b},updateAt:function(d,c){var b=this.listBox.updateAt(d,c);this.renderSelection("mouse");return b},ensureVisible:function(b){return this.listBox.ensureVisible(b)},disableAt:function(b){var c=this.getVisibleItem(b);if(c){this._disabledItems.push(c.value)}return this.listBox.disableAt(b)},enableAt:function(b){var c=this.getVisibleItem(b);if(c){this._disabledItems.splice(this._disabledItems.indexOf(c.value),1)}return this.listBox.enableAt(b)},disableItem:function(b){var b=this.getVisibleItem(b);if(b){this._disabledItems.push(b.value)}return this.listBox.disableItem(b)},enableItem:function(b){var b=this.getVisibleItem(b);if(b){this._disabledItems.splice(this._disabledItems.indexOf(b.value),1)}return this.listBox.enableItem(b)},_findPos:function(c){while(c&&(c.type=="hidden"||c.nodeType!=1||a.expr.filters.hidden(c))){c=c.nextSibling}if(c){var b=a(c).coord(true);return[b.left,b.top]}},testOffset:function(h,f,c){var g=h.outerWidth();var j=h.outerHeight();var i=a(window).width()+a(window).scrollLeft();var e=a(window).height()+a(window).scrollTop();if(f.left+g>i){if(g>this.host.width()){var d=this.host.coord().left;var b=g-this.host.width();f.left=d-b+2}}if(f.left<0){f.left=parseInt(this.host.coord().left)+"px"}f.top-=Math.min(f.top,(f.top+j>e&&e>j)?Math.abs(j+c+23):0);return f},open:function(){if(!this.isOpened()&&!this.opening){this.showListBox("api")}},close:function(){if(this.isOpened()){this.hideListBox("api")}},_getBodyOffset:function(){var c=0;var b=0;if(a("body").css("border-top-width")!="0px"){c=parseInt(a("body").css("border-top-width"));if(isNaN(c)){c=0}}if(a("body").css("border-left-width")!="0px"){b=parseInt(a("body").css("border-left-width"));if(isNaN(b)){b=0}}return{left:b,top:c}},showListBox:function(n){if(this.listBox.items&&this.listBox.items.length==0){return}if(n=="search"&&!this.autoComplete&&!this.remoteAutoComplete){if(this.autoDropDownHeight){this.container.height(this.listBoxContainer.height()+25)}}this.element.setAttribute("opened",true);if(this.autoComplete||this.multiSelect&&!this.remoteAutoComplete){if(n!="search"){this._updateItemsVisibility("");if(this.multiSelect){var r=this.getVisibleItems();for(var x=0;xthis.host.width()){this.container.css("left",25+parseInt(Math.round(s))-v+"px")}else{this.container.css("left",25+parseInt(Math.round(s))+v+"px")}}if(this.dropDownVerticalAlignment=="top"){var w=h.height();b=true;h.css("top",23);h.addClass(this.toThemeProperty("jqx-popup-up"));var o=parseInt(this.host.outerHeight());var m=parseInt(p)-Math.abs(w+o+23);this.container.css("top",m)}if(this.enableBrowserBoundsDetection){var k=this.testOffset(h,{left:parseInt(this.container.css("left")),top:parseInt(p)},parseInt(this.host.outerHeight()));if(parseInt(this.container.css("top"))!=k.top){b=true;h.css("top",23);h.addClass(this.toThemeProperty("jqx-popup-up"))}else{h.css("top",0)}this.container.css("top",k.top);this.container.css("top",k.top);if(parseInt(this.container.css("left"))!=k.left){this.container.css("left",k.left)}}if(this.animationType=="none"||this.animationType==="transform"){this.container.css("display","block");a.data(document.body,"openedCombojqxListBoxParent",j);a.data(document.body,"openedCombojqxListBox"+j.element.id,h);h.css("margin-top",0);h.css("opacity",1)}else{this.container.css("display","block");var q=h.outerHeight();h.stop();if(this.animationType=="fade"){h.css("margin-top",0);h.css("opacity",0);h.animate({opacity:1},this.openDelay,function(){j.isanimating=false;j.opening=false;a.data(document.body,"openedCombojqxListBoxParent",j);a.data(document.body,"openedCombojqxListBox"+j.element.id,h)})}else{h.css("opacity",1);if(b){h.css("margin-top",q)}else{h.css("margin-top",-q)}this.isanimating=true;this.opening=true;h.animate({"margin-top":0},this.openDelay,function(){j.isanimating=false;j.opening=false;a.data(document.body,"openedCombojqxListBoxParent",j);a.data(document.body,"openedCombojqxListBox"+j.element.id,h)})}}z._renderItems();if(!b){this.host.addClass(this.toThemeProperty("jqx-rc-b-expanded"));h.addClass(this.toThemeProperty("jqx-rc-t-expanded"));this.dropdownlistArrow.addClass(this.toThemeProperty("jqx-rc-b-expanded"))}else{this.host.addClass(this.toThemeProperty("jqx-rc-t-expanded"));h.addClass(this.toThemeProperty("jqx-rc-b-expanded"));this.dropdownlistArrow.addClass(this.toThemeProperty("jqx-rc-t-expanded"))}h.addClass(this.toThemeProperty("jqx-fill-state-focus"));this._raiseEvent("0",z);h.addClass(this.toThemeProperty("jqx-popup-show"))},doMultiSelect:function(c){if(this.checkboxes){this.multiSelect=false}var e=this;if(!this.multiSelect){var g=e.dropdownlistContent.find(".jqx-button");var d="mousedown";if(this.touch){d=a.jqx.mobile.getTouchEventName("touchstart")}this.removeHandler(g,d);this.removeHandler(g.find(".jqx-icon-close"),d);g.remove();var f=this.listBox.items;if(!f){return}for(var b=0;b=0||this._disabledItems.indexOf(this.value)>=0){f[b].disabled=true}}this.listBox._renderItems();this.searchString="";this.input.val("");var f="";var d="mousedown";var g=e.dropdownlistContent.find(".jqx-button");if(this.touch){d=a.jqx.mobile.getTouchEventName("touchstart")}this.removeHandler(g,d);this.removeHandler(g.find(".jqx-icon-close"),d);g.remove();e.input.detach();if(this.selectedItems.length>0){e.input.css("width","25px");if(this.isMaterialized()&&e.hint){e.label[0].innerHTML=this.placeHolder}else{e.input.attr("placeholder","")}}else{e.input.css("width","100%");if(e.isMaterialized()&&e.hint){e.label[0].innerHTML=this.placeHolder}else{e.input.attr("placeholder",this.placeHolder)}}if(e.isMaterialized()){if(e.hint){setTimeout(function(){if(e.selectedItems.length===0){e.element.removeAttribute("hint");e.label[0].innerHTML=e.placeHolder}else{if(e.hint){e.element.setAttribute("hint",true)}}})}}a.each(this.selectedItems,function(l){var n=e.getItemByValue(this);if(!n||e.remoteAutoComplete){n=e._selectedItems[l]}var p=a('
');p.addClass(e.toThemeProperty("jqx-button"));p.addClass(e.toThemeProperty("jqx-combobox-multi-item"));p.addClass(e.toThemeProperty("jqx-fill-state-normal"));p.addClass(e.toThemeProperty("jqx-rc-all"));if(n){var q=n.label;if(e.renderSelectedItem){var i=e.renderSelectedItem(l,n);if(i){q=i}}if(p[0].innerHTML==""){p[0].innerHTML=''+q+""}if(e.rtl){p[0].innerHTML=''+q+""}var o=!e.rtl?"right":"left";if(e.showCloseButtons){var m='
';if(a.jqx.browser.msie&&a.jqx.browser.version<8){m='
'}if(e.rtl){var m='
';if(a.jqx.browser.msie&&a.jqx.browser.version<8){m='
'}}p[0].innerHTML+=m}}else{if(p[0].innerHTML==""){p[0].innerHTML=''}}e.dropdownlistContent.append(p)});e.dropdownlistContent.append(e.input);e.input.val("");if(c!==false){e.input.focus();setTimeout(function(){e.input.focus()},10)}var g=e.dropdownlistContent.find(".jqx-button");if(this.touchMode===true){d="mousedown"}this.addHandler(g,d,function(l){if(l.target.className.indexOf("jqx-icon-close")>=0){return true}if(e.disabled){return true}var m=a(l.target).attr("data-value");var i=e.getItemByValue(m);if(i){e.listBox.selectedValue=null;e.listBox.clearSelection()}e.listBox.scrollTo(0,0);e.open();if(l.preventDefault){l.preventDefault()}if(l.stopPropagation){l.stopPropagation()}return false});this.addHandler(g.find(".jqx-icon-close"),d,function(p){if(e.disabled){return}var r=a(p.target).parent().parent().find("a").attr("data-value");var o=e.getItemByValue(r);if(o||(e.remoteAutoComplete&&!o&&e.selectedItems.indexOf(r)>=0)){e.listBox.selectedValue=null;var l=e.selectedItems.indexOf(r);var n=o&&o.index>=0?o.index:l;if(l>=0){e.selectedItems.splice(l,1);var q=e._selectedItems[l];if(!q){q=o}e._selectedItems.splice(l,1);e._raiseEvent("3",{index:n,type:"mouse",item:q});e._raiseEvent("4",{index:n,type:"mouse",item:q});e.doMultiSelect()}else{for(var m=0;m0){this.dropdownlistContent[0].style.width=b+"px"}if(this.rtl){this.dropdownlistContent[0].style.width=(-1+b+"px")}this.dropdownlistContent[0].style.height=j+"px";this.dropdownlistContent[0].style.left="0px";this.dropdownlistContent[0].style.top="0px";this.dropdownlistArrow[0].style.width=f+"px";this.dropdownlistArrow[0].style.height=j+"px";this.dropdownlistArrow[0].style.left=1+b+"px";this.input[0].style.width="100%";if(!this.multiSelect){this.input.height(j)}var c=this.input.height();if(c==0){c=parseInt(this.input.css("font-size"))+3}if(this.input[0].className.indexOf("jqx-rc-all")==-1){this.input.addClass(this.toThemeProperty("jqx-rc-all"))}var i=parseInt(j)/2-parseInt(c)/2;if(i>0){}if(this.rtl){this.dropdownlistArrow.css("left","0px");this.dropdownlistContent.css("left",this.dropdownlistArrow.width());if(a.jqx.browser.msie&&a.jqx.browser.version<=8){this.dropdownlistContent.css("left",1+this.dropdownlistArrow.width())}}if(this.multiSelect){this.input.css("float","left");this.input.width(25);this.dropdownlistWrapper.parent().css("height","auto");this.dropdownlistContent.css("height","auto");this.dropdownlistWrapper.css("height","auto");this.dropdownlistContent.css("position","relative");this.dropdownlistContent.css("cursor","text");this.host.css("height","auto");this.host.css("min-height",this.height);this.dropdownlistContent.css("min-height",this.height);var j=parseInt(this.host.height());this.dropdownlistArrow.height(j);var g=parseInt(this.host.css("min-height"));var i=parseInt(g)/2-parseInt(c)/2;if(i>0){this.input.css("margin-top",i)}if(this.isMaterialized()){this.host.height(this.dropdownlistContent.height())}this.bar.css("top",this.host.height());this.dropdownlistArrow.height(this.host.height())}},destroy:function(){if(this.source&&this.source.unbindBindingUpdate){this.source.unbindBindingUpdate(this.element.id);this.source.unbindBindingUpdate(this.listBoxContainer[0].id);this.source.unbindDownloadComplete(this.element.id);this.source.unbindDownloadComplete(this.listBoxContainer[0].id)}a.jqx.utilities.resize(this.host,null,true);this.removeHandler(this.listBoxContainer,"select");this.removeHandler(this.listBoxContainer,"unselect");this.removeHandler(this.listBoxContainer,"change");this.removeHandler(this.listBoxContainer,"bindingComplete");this.removeHandler(this.dropdownlistWrapper,"selectstart");this.removeHandler(this.dropdownlistWrapper,"mousedown");this.removeHandler(this.host,"keydown");this.removeHandler(this.listBoxContainer,"select");this.removeHandler(this.listBox.content,"click");this.removeHandlers();this.removeHandler(this.input,"keyup.textchange");this.listBoxContainer.jqxListBox("destroy");this.listBoxContainer.remove();this.host.removeClass();this.removeHandler(a(document),"mousedown."+this.id,this.closeOpenedListBox);if(this.touch){this.removeHandler(a(document),a.jqx.mobile.getTouchEventName("touchstart")+"."+this.id)}this.cinput.remove();delete this.cinput;this.dropdownlistArrow.remove();delete this.dropdownlistArrow;this.dropdownlistArrowIcon.remove();delete this.dropdownlistArrowIcon;delete this.dropdownlistWrapper;delete this.listBoxContainer;delete this.input;delete this.dropdownlistContent;delete this.comboStructure;this.container.remove();delete this.listBox;delete this.container;var b=a.data(this.element,"jqxComboBox");if(b){delete b.instance}this.host.removeData();this.host.remove();delete this.host;delete this.set;delete this.get;delete this.call;delete this.element},_raiseEvent:function(g,c){if(c==undefined){c={owner:null}}var d=this.events[g];var e=c;e.owner=this;var f=new a.Event(d);f.owner=this;if(g==2||g==3||g==4||g==5||g==6||g==7||g==8||g==9){f.args=c}var b=this.host.trigger(f);return b},propertiesChangedHandler:function(b,c,e){if(e.width&&e.height&&Object.keys(e).length==2){b._setSize();if(c=="width"){if(b.dropDownWidth=="auto"){var d=b.host.width();b.listBoxContainer.jqxListBox({width:d});b.container.width(parseInt(d)+25)}}b._arrange();b.close()}},propertyChangedHandler:function(e,k,c,j){if(e.isInitialized==undefined||e.isInitialized==false){return}if(e.batchUpdate&&e.batchUpdate.width&&e.batchUpdate.height&&Object.keys(e.batchUpdate).length==2){return}if(k=="template"){e.listBoxContainer.removeClass(e.toThemeProperty("jqx-"+c+"-item"));e.listBoxContainer.addClass(e.toThemeProperty("jqx-"+e.template+"-item"));e.dropDownListArrow.removeClass(e.toThemeProperty("jqx-"+c+""));e.dropDownListArrow.addClass(e.toThemeProperty("jqx-"+e.template+""));var g=this;g.bar.removeClass(g.toThemeProperty("jqx-"+c));g.label.removeClass(g.toThemeProperty("jqx-"+c));g.bar.addClass(g.toThemeProperty("jqx-"+g.template));g.label.addClass(g.toThemeProperty("jqx-"+g.template))}if(k=="dropDownVerticalAlignment"){e.close();e.dropdownlistArrowIcon.removeClass(e.toThemeProperty("jqx-icon-arrow-up"));e.dropdownlistArrowIcon.removeClass(e.toThemeProperty("jqx-icon-arrow-down"));if(e.dropDownVerticalAlignment=="top"){e.dropdownlistArrowIcon.addClass(e.toThemeProperty("jqx-icon-arrow-up"))}else{e.dropdownlistArrowIcon.addClass(e.toThemeProperty("jqx-icon-arrow-down"))}e.listBoxContainer.css("top",0);e.listBoxContainer.removeClass(this.toThemeProperty("jqx-popup-up"))}if(k=="autoItemsHeight"){e.listBoxContainer.jqxListBox({autoItemsHeight:j})}if(k=="itemHeight"){e.listBoxContainer.jqxListBox({itemHeight:j})}if(k=="renderSelectedItem"){e.renderSelection("mouse")}if(k=="renderer"){e.listBoxContainer.jqxListBox({renderer:j})}if(k=="enableSelection"){e.listBoxContainer.jqxListBox({enableSelection:j})}if(k=="enableHover"){e.listBoxContainer.jqxListBox({enableHover:j})}if(k==="touchMode"){e.listBoxContainer.jqxListBox({touchMode:j});e.touch=a.jqx.mobile.isTouchDevice();if(e.touchMode===true){e.touch=true}e._updateHandlers()}if(k=="multiSelect"){if(j){e.doMultiSelect(false)}else{var h=e.listBox.items;var d=-1;for(var f=0;f=0||e._disabledItems.indexOf(e.value)>=0){h[f].disabled=true;d=h[f].index}}e.doMultiSelect(false);e.listBox._renderItems();if(!h){return}e.listBox.selectedIndex=d;e.renderSelection("mouse");e.dropdownlistWrapper.parent().css("height","100%");e.dropdownlistContent.css("height","100");e.dropdownlistWrapper.css("height","100");e.dropdownlistContent.css("position","relative");e.host.css("min-height",null);e._setSize();e._arrange()}}if(k=="showArrow"){e._arrange();if(e.multiSelect){e.doMultiSelect(false)}}if(k=="placeHolder"){if(e.isMaterialized()){e.label.innerHTML=e.placeHolder}else{e.input.attr("placeholder",e.placeHolder)}}if(k=="popupZIndex"){e.listBoxContainer.css({zIndex:e.popupZIndex})}if(k=="promptText"){e.placeHolder=j}if(k=="autoOpen"){e._updateHandlers()}if(k=="renderer"){e.listBox.renderer=e.renderer}if(k=="itemHeight"){e.listBox.itemHeight=j}if(k=="source"){e.input.val("");e.listBoxContainer.jqxListBox({source:e.source});e.renderSelection("mouse");if(e.source==null){e.clearSelection()}if(e.multiSelect){e.selectedItems=new Array();e._selectedItems=new Array();e.doMultiSelect(false)}}if(k=="rtl"){if(j){e.dropdownlistArrow.css("float","left");e.dropdownlistContent.css("float","right")}else{e.dropdownlistArrow.css("float","right");e.dropdownlistContent.css("float","left")}e.listBoxContainer.jqxListBox({rtl:e.rtl})}if(k=="displayMember"||k=="valueMember"){e.listBoxContainer.jqxListBox({displayMember:e.displayMember,valueMember:e.valueMember});e.renderSelection("mouse")}if(k=="autoDropDownHeight"){e.listBoxContainer.jqxListBox({autoHeight:e.autoDropDownHeight});if(e.autoDropDownHeight){e.container.height(e.listBoxContainer.height()+25)}else{e.listBoxContainer.jqxListBox({height:e.dropDownHeight});e.container.height(parseInt(e.dropDownHeight)+25)}e.listBox._arrange();e.listBox._updatescrollbars()}if(k=="dropDownHeight"){if(!e.autoDropDownHeight){e.listBoxContainer.jqxListBox({height:e.dropDownHeight});e.container.height(parseInt(e.dropDownHeight)+25)}}if(k=="dropDownWidth"||k=="scrollBarSize"){var b=e.width;if(e.dropDownWidth!="auto"){b=e.dropDownWidth}e.listBoxContainer.jqxListBox({width:b,scrollBarSize:e.scrollBarSize});e.container.width(parseInt(b)+25)}if(k=="autoComplete"){e._resetautocomplete()}if(k=="checkboxes"){e.listBoxContainer.jqxListBox({checkboxes:e.checkboxes});if(e.checkboxes){e.input.attr("readonly",true);a.jqx.aria(e,"aria-readonly",true)}else{a.jqx.aria(e,"aria-readonly",false)}}if(k=="theme"&&j!=null){e.listBoxContainer.jqxListBox({theme:j});e.listBoxContainer.addClass(e.toThemeProperty("jqx-popup"));if(a.jqx.browser.msie){e.listBoxContainer.addClass(e.toThemeProperty("jqx-noshadow"))}a.jqx.utilities.setTheme(c,j,e.host)}if(k=="rtl"){e.render();e.refresh()}if(k=="width"||k=="height"){e._setSize();if(k=="width"){if(e.dropDownWidth=="auto"){var b=e.host.width();e.listBoxContainer.jqxListBox({width:b});e.container.width(parseInt(b)+25)}}e._arrange();e.close()}if(k=="selectedIndex"){e.listBox.selectIndex(j);e.renderSelection("mouse")}}})})(jqxBaseFramework); + +(function(a){a.jqx.jqxWidget("jqxComplexInput","",{});a.extend(a.jqx._jqxComplexInput.prototype,{defineInstance:function(){var b={width:null,height:null,decimalNotation:"default",value:"",spinButtons:false,spinButtonsStep:1,placeHolder:"",roundedCorners:true,disabled:false,rtl:false,changeType:null,hint:true,template:"",events:["change"]};if(this===a.jqx._jqxComplexInput.prototype){return b}a.extend(true,this,b);return b},createInstance:function(){var b=this;b._firefox=a.jqx.browser.browser==="mozilla";b._currentNumber={};b._allowedCharacters=new RegExp(/([\+\-\.0-9i])/i);b.render()},render:function(){var e=this;if(e.isMaterialized()){var i=a("