Compare commits

..
422 Commits
Author SHA1 Message Date
Stefan Dej a72af00c0a push version number to v1.0.2
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-24 21:45:54 +01:00
Stefan Dej 576f3ee4fa bugfix: thumbnails in gcode files
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-24 21:40:14 +01:00
Stefan Dej 2ee53b26bb push version number
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-24 18:02:18 +01:00
Stefan Dej 414a05bf7b bugfix: fixed updateManager order
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-24 17:05:39 +01:00
Stefan Dej bb83dcda11 type in MinSettingsPanel.vue
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-24 15:47:32 +01:00
Stefan Dej 4f34b63fc0 bugfix: fixed problem with older moonraker version (registered_directories)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-24 15:44:26 +01:00
Stefan Dej ae058ca2d0 bugfix: fix undefined dir in filetree
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-24 15:01:24 +01:00
Stefan Dej 53e394eddd bugfix: hide docs in ConfigFilesPanel.vue
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-24 15:00:34 +01:00
Stefan Dej 25221ca6cb feature: redesign MoonrakerFailedPluginsPanel.vue and MinSettingsPanel.vue
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-24 14:57:58 +01:00
Stefan Dej e7999d5577 bugfix: load thumbnails between 32-64px in gcode files
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-24 14:57:20 +01:00
Rufo Sanchez 9545fc76bb Reduce CPU utilization of progress circle
The value of the math progress circle winds up calculating progress to
an incredibly fine degree, which causes hundreds of updates and
recalculations. Changing the progress circle to round to the closest
percentage greatly reduces the number of updates, dropping the browser's
CPU usage by 10-20%.
2021-01-24 00:15:45 +01:00
Stefan Dej 3e0607fc9b bugfix: load thumbnails between 32-64px in gcode files
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-23 23:51:37 +01:00
Stefan Dej f6eb37928b bugfix: fix margins in edit preset dialog
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-23 23:17:42 +01:00
Stefan Dej e16694eae8 bugfix: firefox > edit presets > checkbox and input remove linebreak
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-23 23:12:30 +01:00
Stefan Dej d786d88348 bugfix: add warning when saving a empty preset
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-23 23:05:58 +01:00
Stefan Dej bce06f0e1b bugfix: fixed duplicate printers after browser sleep
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-23 19:53:25 +01:00
Stefan Dej 294f48124f bugfix: add close/exit button in SelectPrinterDialog.vue
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-23 19:29:46 +01:00
Stefan Dej cc77c47d54 type in WebcamPanel.vue
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-23 19:25:40 +01:00
Stefan Dej 6a0f19926e refresh webcam little code cleanup
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-23 19:25:13 +01:00
Samori Gorse 45198d7d93 feat(refresh-webcam): Refresh webcam view on focus
Computers with agressive power management policies
tend to stop the webcam feed after getting to sleep.

This forces the webcam feed to be restarted on focus.
2021-01-23 18:57:57 +01:00
Stefan Dej 54c78e2735 bugfix: add heater change gcode in event list (console history)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-23 01:39:11 +01:00
Stefan Dej 659504f77e feature: restart moonraker if you click SAVE & RESTART of moonraker.conf
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-23 01:36:29 +01:00
Stefan Dej e81ba35909 update config editor topbar buttons responsive
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-23 01:30:16 +01:00
Stefan Dej feb9579ae1 update updateManager for multiclient support (https://github.com/Arksine/moonraker/pull/63)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-23 00:53:24 +01:00
Stefan Dej 35013e755c feature: add registered_directories in server init process
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-20 21:56:45 +01:00
Stefan Dej 4b5f03b886 bugfix: download config files (issue with url build)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-20 20:04:25 +01:00
Stefan Dej 7dc16da940 bugfix: add SelectPrinterDialog.vue hostname rule (http: && https: is invalid)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-20 20:00:43 +01:00
Stefan Dej 08bd7440a9 bugfix: add remotePrinter hostname rule (http: && https: is invalid)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-20 19:23:25 +01:00
Stefan Dej 2e0ba91e50 bugfix: change restart icons in KlippyStatePanel.vue
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-20 19:16:23 +01:00
Stefan Dej ca79e3b63e bugfix: convertNamein preset panel
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-20 01:06:38 +01:00
Stefan Dej 9429e11645 push version number to 1.0.0
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-19 23:55:05 +01:00
Stefan Dej 7b90c32b96 bugfix: type in printer select dialog
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-19 23:54:50 +01:00
Stefan Dej f2809d304c feater: add remotemode
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-19 23:10:43 +01:00
Stefan Dej 1d86c22126 rename peripherie to miscellaneous
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-19 23:08:09 +01:00
Stefan Dej d767f50bbb feature: convert heater, fan & sensor names
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-19 23:08:09 +01:00
Stefan Dej a6c4dd75f1 bugfix: fixed favicon glitches
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-19 23:08:09 +01:00
Stefan Dej bd44c5608a bugfix: change colors and put lines in the front of the temp chart
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-19 23:08:09 +01:00
Stefan Dej 97012256f6 bugfix: disable preset button during a print
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-19 23:08:09 +01:00
Stefan Dej 5ee8e69d81 Update CNAME 2021-01-19 22:59:36 +01:00
Stefan Dej d05fa70832 bugfix: disable update button during print in UpdatePanel.vue
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-19 20:26:40 +01:00
Stefan Dej edf1507359 bugfix: fix nginx config
bugfix: disable upload limit in nginx config
bugfix: disable cache for index.html

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-18 23:27:20 +01:00
Stefan Dej bb831cd22f bugfix: add unit to requested_speed
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-18 20:54:52 +01:00
Stefan Dej 423d2eaa88 bugfix: layer_count to 0 until the print starts
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-18 20:53:33 +01:00
Stefan Dej 92679b001a bugfix: unknown attribute in farm printer getter
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-18 20:23:02 +01:00
Stefan Dej 21c01b0de7 bugfix: favicon wrong url
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-18 20:20:39 +01:00
Stefan Dej 0ae1b32a56 bugfix: dashboard status panel and farm printer panel -> different eta time
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-18 00:14:32 +01:00
Stefan Dej 7cda0f7058 feature: add custom gcode to presets
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-17 23:00:37 +01:00
Stefan Dej fe246393ea feature: add HomeAll (G28) button in Heightmap.vue
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-17 23:00:37 +01:00
Stefan Dej a512743038 bugfix: topbar SAVE_CONFIG button doesnt work
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-17 23:00:37 +01:00
ace 645084700d simplify nginx config in setup documentation 2021-01-17 19:55:32 +01:00
Stefan Dej b784b3f277 bugfix: reload for klippy state message
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-17 01:51:52 +01:00
Stefan Dej c5999221bc feature: add preheat & cooldown function in ToolsPanel.vue
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-17 01:32:26 +01:00
Stefan Dej d1cb7f2def bugfix: StatusPanel.vue text no warp
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-16 19:46:59 +01:00
Stefan Dej 6927ce6038 bugfix: save config without restart
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-16 17:50:19 +01:00
Stefan Dej 4579129a4f feature: upload & start button in topbar
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-16 02:25:34 +01:00
Stefan Dej 5fd89c2600 bugfix: gcode_position unknown fixed in StatusPanel.vue
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-16 02:25:16 +01:00
Stefan Dej 354f6e9250 feature: close top corner menu after all functions except power devices
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-16 01:44:15 +01:00
Stefan Dej 9e6e8c1290 bugfix: change sync icon to restart icon in top corner menu
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-16 01:37:22 +01:00
Stefan Dej 7164dd7c3c feature: add klipper config references link in editor
feature: add save & restart button in editor

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-16 01:36:42 +01:00
Stefan Dej b38b052004 feature: add requested speed to StatusPanel.vue during print
feature: add ETA to StatusPanel.vue
feature: add current & max layer to StatusPanel.vue

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-16 01:26:40 +01:00
Stefan Dej ff366ee966 bugfix: ControlPanel.vue padding top during a print
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-15 22:03:59 +01:00
Stefan Dej dc1a7dfe03 bugfix: console autocomplete -> fixed addEvent attributes
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-15 21:35:10 +01:00
Stefan Dej d2d5d3da0c bugfix: delete margin top klipper state panel
bugfix: peripherie pwm state true (check value)

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-15 00:39:03 +01:00
Stefan Dej 03322739d5 update packages
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-15 00:24:56 +01:00
Stefan Dej 31b4d4cb3d feature: display reprint & clear print button in print_state error
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-15 00:24:32 +01:00
Stefan Dej d2d8546bc9 bugfix: uppercase every first letter in peripherie names
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-14 23:35:29 +01:00
Stefan Dej 93c952cabb feature: add clear print stats button in complete state
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-14 00:32:24 +01:00
Stefan Dej 02f9f9a1d4 feature: add output_pin to PeripheriePanel.vue (fan panel before)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-14 00:25:32 +01:00
Stefan Dej e3607c8f3d feature: add detached state in update manager
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-13 00:21:48 +01:00
Stefan Dej 2b08e34ba7 feature: show klipper & moonraker branch on hover
feature: disable update buttons during a print

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-12 23:44:30 +01:00
Stefan Dej 747722ec2c feature: hide mainsail in the update manager in remoteMode
bugfix: fixed padding bottom of the close button in the UpdateDialog.vue

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-12 23:13:06 +01:00
Stefan Dej 0befcea658 bugfix: clear new printer objects on reset
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-12 23:02:33 +01:00
Stefan Dej ff3cf167ad fixed addEvent commits
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-12 22:46:29 +01:00
Stefan Dej c8cff6d3d8 feature: add gcodeStore types (respond, command)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-12 21:46:17 +01:00
Stefan Dej 397d9b8a7c bugfix: tool input is empty -> klipper error unable to parse
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-12 00:46:24 +01:00
Stefan Dej 84f2b6a473 bugfix: switching printers in remoteMode change to single mode
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-11 22:48:23 +01:00
Stefan Dej b6d20f20ee feature: moonraker failed_plugin output on dashboard
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-11 00:14:15 +01:00
Stefan Dej 13859d3832 feature: add moonraker update notifications
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-10 03:27:42 +01:00
Stefan Dej b88ebf38c7 fix package list tooltip width
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-10 02:55:53 +01:00
Stefan Dej 5831e43fba feature: add farm mode
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-10 02:53:17 +01:00
Stefan Dej 21669f11f7 add discord invite link
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-09 20:38:18 +01:00
Stefan Dej 7b20b47d21 add .version file to build
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-09 19:46:31 +01:00
Stefan Dej 8d15e59e35 update manual setup guide and kiauh description
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-06 14:09:22 +01:00
Stefan Dej 8ee93d1c4a update virtual_sdcard path to gcode_files
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-06 01:29:18 +01:00
Stefan Dej 0b23e512e6 update kiauh guides
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-06 00:54:29 +01:00
Stefan Dej 7ff060edff update mainsailOS and kiauh guides
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-06 00:46:07 +01:00
Stefan Dej 0bfc856606 update mainsailOS and kiauh guides
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-06 00:37:19 +01:00
Stefan Dej 3c78c5af58 add mainsailOS and kiauh guides
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-06 00:31:55 +01:00
Stefan Dej efbbbb0142 fixed typo & order of installation
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-04 20:41:11 +01:00
Stefan Dej d57f68b511 bugfix: only display 32x32 thumbnails in gcode files list
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-03 03:48:58 +01:00
Stefan Dej 64f473e0c6 fixed typo "dashboard". thx Mak
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-02 17:29:09 +01:00
Stefan Dej a2863f2141 Create CNAME 2021-01-02 17:22:25 +01:00
Stefan Dej ef3b179339 update vuetify to 2.4.0
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-02 03:36:22 +01:00
Stefan Dej 2bceb2b24f update vuetify to 2.4.0
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-01-02 03:27:03 +01:00
Stefan Dej aaf934eaae push to v0.4.1
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-31 01:41:22 +01:00
Stefan Dej e44e3bc540 feature: add multi file upload in gcode-files & config-files
feature: add upload status in config-files

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-31 01:37:58 +01:00
Stefan Dej 6856c9a99f bugfix: delete files with special chars in ConfigFilesPanel
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-30 22:53:42 +01:00
Stefan Dej d74e38d0ba bugfix: delete files with special chars (fix #149)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-30 22:31:15 +01:00
Stefan Dej 4ec5ab0f53 change UpdateDialog to dark mode
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-30 21:44:42 +01:00
Stefan Dej 8226c32bb3 exclude sourceMaps to build release
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-30 05:22:41 +01:00
Stefan Dej 99f963df26 feature: gcode files fileupload progress
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-30 04:32:14 +01:00
Stefan Dej 07072ce2a1 feature: add customizing favicons
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-30 00:50:03 +01:00
Stefan Dej 983c5c9bda feature: add customizing sidebar logo
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-29 23:40:40 +01:00
Stefan Dej a8ea45d53c feature: add log during a update
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-29 23:20:14 +01:00
Stefan Dej 595e5bb4a0 upload customize guide
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-29 17:36:09 +01:00
Stefan Dej 2e7290210f upload customize guide
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-29 17:12:22 +01:00
Stefan Dej 9152934f9d update mainsail setup guide
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-28 23:59:49 +01:00
Stefan Dej 02eab15fe5 bugfix: first column width of gcode files & config files and centering the icons
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-28 17:02:58 +01:00
Stefan Dej 8d12bac8c8 bugfix: update manager > update mainsail button show the wrong state
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-27 22:02:22 +01:00
Stefan Dej 64b65454b8 update guide & package.json to V0.4.0
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-27 21:38:49 +01:00
Stefan Dej daa4fd82a0 make top corner menu smaller
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-27 21:35:00 +01:00
Stefan Dej 9a58f58245 update default gui settings
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-27 19:53:19 +01:00
Stefan Dej f51e8fafcc bugfix: move files in gcode files. error/success message don't work
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-27 19:19:20 +01:00
Stefan Dej 5697792504 feature: update manager -> add loading to sync button
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-27 01:20:03 +01:00
Stefan Dej 583aa2b64b feature: restart services (moonraker, klipper)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-27 01:15:53 +01:00
Stefan Dej 72f82504e9 bugfix: tempchart doestn't work after FW_RESTART
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-27 00:30:36 +01:00
Stefan Dej 2323278b8e code cleanup
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-26 23:50:15 +01:00
Stefan Dej 3c217e1161 feature: hide temperature output in console and add custom filters
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-26 23:36:09 +01:00
Stefan Dej 6f4f33f1a6 bugfix: filament runout sensor new design / rework
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-26 21:32:15 +01:00
Stefan Dej 339dda6455 feature: update manager for klipper, moonraker, mainsail & os packages
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-26 21:15:37 +01:00
Stefan Dej 974b7aab28 bugfix: miniconsole col width
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-26 00:25:46 +01:00
Stefan Dej 15cb4232e7 feature: colorize console output & input
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-16 01:15:01 +01:00
Stefan Dej bca27fadb7 bugfix: loading buttons after a error/timeout
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-16 00:00:06 +01:00
Stefan Dej 8aa6338057 bugfix: mobile view in heightmap (not finished)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-15 22:22:35 +01:00
Stefan Dej 8ae2e6defd bugfix: save hidden columns in g-code files
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-15 21:43:32 +01:00
Stefan Dej dc4f4f250f update install guide
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-14 22:16:04 +01:00
Stefan Dej d36ba49f1f Merge remote-tracking branch 'origin/master' 2020-12-14 00:11:31 +01:00
Stefan Dej b4e311277a bugfix: console responsive select & datetime
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-14 00:11:18 +01:00
Stefan Dej 1274b73470 Update FUNDING.yml 2020-12-13 21:27:07 +01:00
Stefan Dej e40a76f085 fixed update-guide
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-11 20:51:51 +01:00
Stefan Dej 58427f5bc3 typo update-guide
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-10 22:28:50 +01:00
Stefan Dej 3bc1c58fed update update-guide
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-10 22:25:59 +01:00
Stefan Dej c3b442c43f feature: disable save_config during a print
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-10 00:52:06 +01:00
Stefan Dej 131a917171 feature: tool panel > temperature_sensor > tooltip on mouseover (min/max)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-10 00:08:57 +01:00
Stefan Dej 664ed54cd0 feature: display PWM value in heater list
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-09 23:54:43 +01:00
Stefan Dej ea932e85f0 feature: variable max temp from temp chart
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-09 23:54:13 +01:00
Stefan Dej 8ee22269e2 bugfix: show controls in paused state, reorder panels dashbaord
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-09 23:51:56 +01:00
Stefan Dej 35112e2ca0 bugfix: hide macros with _ prefix on dashboard
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-09 21:34:34 +01:00
Stefan Dej b0a3d49cc0 bugfix: col width in klippy-state disconnected
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-09 21:25:13 +01:00
Stefan Dej 57ca568bbe feature: move power switches to top corner navi
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-09 00:43:31 +01:00
Stefan Dej d1401d321a feature/bugfix: rework heightmap (add scale option, modify workflow)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-09 00:38:30 +01:00
Stefan Dej b1e2c280e5 bugfix: startup without running klipper instance
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-08 23:13:36 +01:00
Stefan Dej 7200cfac68 feature: update of the heightmap
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-07 00:03:53 +01:00
Stefan Dej ac0f570ec2 feature: custom sidebar background image & custom css
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-05 21:54:03 +01:00
Stefan Dej 53049b79a6 feature: hide hidden files in config files
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-05 16:56:51 +01:00
Stefan Dej caead858fe bugfix: console doesnt work with new loadings store
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-05 15:57:03 +01:00
Stefan Dej 0bb53fdde7 bugfix: change gui.json to .mainsail.json
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-05 15:45:55 +01:00
Stefan Dej 3747682538 Create FUNDING.yml 2020-12-05 04:30:00 +01:00
Stefan Dej 20e748cfce bugfix: responsive correction for config files
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-05 04:04:24 +01:00
Stefan Dej 940f3bd400 code cleanup
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-05 04:01:13 +01:00
Stefan Dej c192cc2f2d feature: customizable sidebar background
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-05 03:50:39 +01:00
Stefan Dej 1b632c2cca feature: Console Dashboard -> input field
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-05 01:55:51 +01:00
Stefan Dej f5d8913133 bugfix: fix responive pagination in gcode files
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-04 21:35:08 +01:00
Stefan Dej fab7de1ba7 cleanup dependencies
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-04 21:13:39 +01:00
Stefan Dej 6c519bfb29 bugfix: responsive fix in gcode-files
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-04 21:12:23 +01:00
Stefan Dej a41ad9aa64 bugfix: fixes last bugs of new temp chart
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-04 19:48:04 +01:00
Stefan Dej 5c6e5db9c4 first implementation of canvasjs
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-04 19:48:04 +01:00
Stefan Dej 59a6a8476c delete not used files from canvas
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-04 19:48:04 +01:00
Stefan Dej 76e0518446 first test with canvasjs
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-04 19:48:04 +01:00
Stefan Dej 587f54d228 bugfix: min_extrude_temp extruder control fallback
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-12-04 01:01:14 +01:00
translucentfocus eaa8288875 Optimized Imgs / Scaled & Repositioned Maskables 2020-11-28 13:11:45 +01:00
Stefan Dej 50ea376736 update download link mainsail
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-11-28 03:32:15 +01:00
Stefan Dej 460714e775 update links
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-11-28 02:40:38 +01:00
Stefan Dej b668fb6b48 typos docs
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-11-28 02:34:32 +01:00
Stefan Dej 8f11d50915 update docs
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-11-28 02:31:38 +01:00
lixxbox d13642cfd2 renamed: docs/about.md -> docs/about.md.draft
modified:   docs/index.md
2020-11-27 23:28:52 +01:00
lixxbox 94858b9340 new file: docs/_config.yml
new file:   docs/_sass/color_schemes/mainsail-dark.scss
	new file:   docs/_sass/color_schemes/mainsail.scss
	new file:   docs/about.md
	new file:   docs/additional-support/index.md
	new file:   docs/additional-support/shares.md.draft
	new file:   docs/additional-support/slicer-upload.md
	new file:   docs/additional-support/thumbnails.md
	new file:   docs/additional-support/webcam.md.draft
	new file:   docs/assets/img/additional/FileUpload-PrusaSlicer-2.2.0.png
	new file:   docs/assets/img/additional/PrusaSlicer-thumbnails.png
	new file:   docs/assets/img/additional/SuperSlicer-thumbnails.png
	new file:   docs/assets/img/additional/large-preview.png
	new file:   docs/assets/img/logo-mainsail-light.png
	renamed:    docs/images/logo-mainsail.png -> docs/assets/img/logo-mainsail.png
	new file:   docs/assets/img/logo.png
	new file:   docs/assets/img/logo.svg
	new file:   docs/assets/img/screenshot.png
	deleted:    docs/images/screenshot-dashboard.png
	deleted:    docs/images/screenshot-gcode-thumbnail.png
	deleted:    docs/images/superslicer-upload.png
	new file:   docs/index.md
	new file:   docs/necessary-cfg.md
	new file:   docs/setup-guide/index.md
	new file:   docs/setup-guide/klipper.md
	new file:   docs/setup-guide/mainsail.md
	new file:   docs/setup-guide/moonraker.md
	new file:   docs/setup-guide/operating-system.md
2020-11-27 23:28:52 +01:00
Stefan Dej 605c6ee05e bugfix: PWA maskable icons
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-11-27 22:21:20 +01:00
Stefan Dej 31667347f9 bugfix: temperature_sensor target temp in chart
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-11-27 20:00:04 +01:00
Stefan Dej 99529defb8 bugfix: change printer name
bugfix: favicon percent icon

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-11-27 18:48:37 +01:00
Stefan Dej 188bce0aa4 bugfixes
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-11-26 23:00:27 +01:00
Stefan Dej 98f50790c0 bugfixes: missing config update to vuex models, ControlPanel.vue buttons equal width, ConfigFilesPanel.vue default path
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-11-22 20:02:17 +01:00
meteyou 1e2c2d15e6 voron clean & update favicon, icons & pwa
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-22 01:35:27 +01:00
meteyou cb602518f0 feature: redesign panel headers
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-21 22:52:54 +01:00
meteyou 8f363ec1c1 feature: dynamic temperature-sensor icons + header minimize from temperature panel
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-21 18:20:58 +01:00
meteyou f26aff2085 feature: update PowerControlPanel.vue > new moonraker version of power plugin
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-21 17:30:28 +01:00
meteyou fcae508d19 bugfix: update to smaller header
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-21 16:51:53 +01:00
meteyou d9b5486346 bugfix: update to smaller header
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-21 16:49:27 +01:00
meteyou a333b8afa6 bugfix: upload new navi background
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-21 10:37:18 +01:00
meteyou 672c6b3f32 bugfix: background color on scroll
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-21 10:13:41 +01:00
meteyou ebaab6324d feature: save countPerPage from gcode files & config files in gui.json
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-20 20:28:21 +01:00
meteyou 6c01fc04f8 bugfix: fixed updaten heaters in ToolPanel
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-20 20:27:21 +01:00
meteyou 7756362a58 bugfix: fixed toastr bg colors and font
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-20 20:26:37 +01:00
meteyou 601d49fc4e bugfix: reprogramming button loadings
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-20 00:47:58 +01:00
meteyou 7b2d257db3 optimize console view
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-19 22:41:06 +01:00
meteyou 3fd3862bc5 renew dashboard sizes
feature: new estimated times

Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-19 22:14:39 +01:00
meteyou e9179e5bcd feature: new estimate time calculation
move getters to printer/getters

Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-19 00:29:59 +01:00
meteyou f068a2ef21 update packages
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-18 22:17:28 +01:00
meteyou 6da293b494 feature: debug .env.development.local.example for moonraker connection
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-18 21:21:43 +01:00
meteyou fe385d1558 bugfix: dashboard > tempchart
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-18 11:05:39 +01:00
meteyou d4785c0b27 bugfix: dashbaord > print settings > steps +/- buttons
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-18 11:04:38 +01:00
meteyou 894ef6912b bugfix: dashboard > MiniconsolePanel.vue > empty message line-height
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-18 09:15:34 +01:00
meteyou 3997c8b3a1 bugfix: machine limits -> max 0 on startup
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-17 22:22:48 +01:00
meteyou 5a4dfb492b bugfix: save gcodefiles settings
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-17 20:47:54 +01:00
meteyou 49c79c9eae bugfix: tool input number buttons hidden
bugfix: UFP thumbnail (only 300px)
bugfix: moonraker > websocket subscription
bugfix: miniconsole > different line baseline
bugfix: new metadata push > redirect to current file
feature: show/hide colums in gcode-files
feature: show/hide hidden files/dir
feature: display missing config sections
feature: display klippy-state in settings > machinies

Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-17 00:35:59 +01:00
meteyou 2bcf08e5ab typo: wikipedia -> wiki
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-13 21:17:08 +01:00
meteyou ce6843cf49 feature: Missing config panel on Dashboard.vue
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-09 23:17:52 +01:00
meteyou cf7cb122d1 move docs to github wiki
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-09 20:42:46 +01:00
meteyou a56050ca1c move docs to github wiki
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-09 20:41:48 +01:00
meteyou 39fdb75a96 move docs to github wiki
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-09 20:40:39 +01:00
meteyou f6687a944d feature: show klippy state panel in settings > machine & rename SystemPanel.vue to LogfilesPanel.vue.
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-08 21:56:44 +01:00
meteyou c513a7ca51 bugfix: print metadata by direct upload & print form slicer
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-08 21:28:13 +01:00
meteyou 616f84edbe feature: show/hide columns in G-Code-Files
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-08 18:29:31 +01:00
meteyou fefabb1ef7 delete error toasts
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-08 00:33:38 +01:00
meteyou 189fd3ddd7 update update.md for moonraker dep.
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-07 23:22:26 +01:00
Leonard Freimuth e796b27145 Update App.vue 2020-11-05 21:31:41 +01:00
Stefan Dej ac32eca665 fix mini console
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-27 23:27:12 +01:00
Stefan Dej f94402b94b update version number, installation.md, update.md to 0.2.6
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-27 23:06:48 +01:00
Stefan Dej 91f2e9b6d8 feature: modify dashboard console for more message space
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-27 23:05:42 +01:00
Stefan Dej 0f955fbeb4 bugfix: machine-limits expander
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-27 22:44:11 +01:00
Randell L Hodges 6282356ddd clear fileupload after uploading 2020-10-27 19:50:27 +01:00
Randell L Hodges 9057bea653 Modified times now come as unix times 2020-10-27 19:45:21 +01:00
Stefan Dej d19bf2ee05 Update update.md and installation.md
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-25 00:21:46 +02:00
Stefan Dej f35cf70301 feature: rework the StatusPanel.vue
feature: add Sys Commands to the topbar

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-24 23:14:34 +02:00
meteyou 27308e44ab Merge pull request #108 from randellhodges/handle-gcode-response
handle gcode_store data format changes from moonraker
2020-10-24 16:10:56 +02:00
Randell L Hodges 0a5b664ded removed backwards handling of gcode_store 2020-10-24 09:07:40 -05:00
Randell L Hodges ece599595b handle gcode_store data format changes from moonraker 2020-10-24 08:52:41 -05:00
Stefan Dej c8f847ccc8 bugfix: generic heater in tool panel dont work
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-18 15:48:24 +02:00
Stefan Dej ca1fd5d04e update update.md for MainsailOS
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-17 13:38:20 +02:00
Stefan Dej 470a7633c5 bugfix: fix typo for gpio power devices
update update.md to 0.2.4

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-16 22:58:37 +02:00
Stefan Dej 01da938a79 update update.md to v0.2.3
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-15 21:25:12 +02:00
Stefan Dej b27390133a feature: read version from package.json
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-15 21:09:49 +02:00
Stefan Dej 231ef16da1 bugfix: save_config_pending rename
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-13 22:41:34 +02:00
Stefan Dej 906e738151 bugfix: dynamic favicon error of pwa
feature: display klippy_disconnected status
feature: load gcode_store on startup

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-13 22:38:48 +02:00
meteyou 4b6bcd7ad4 Merge pull request #101 from meteyou/add-license
Create LICENSE
2020-10-10 14:40:44 +02:00
meteyou 959869b64f Create LICENSE 2020-10-10 14:40:19 +02:00
Stefan Dej fe19bddb54 Merge remote-tracking branch 'origin/master' 2020-10-09 23:56:30 +02:00
Stefan Dej 59db2ca55b bugfix: remove old cancel print commands / default parameters
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-09 23:56:17 +02:00
meteyou 1691a2cbfe Merge pull request #94 from cadriel/master
refactor: docs move upstreams and common vars to independent conf
2020-10-05 21:29:22 +02:00
Craig Bassett 257b792aee refactor: docs move upstreams and common vars to independent conf 2020-10-05 10:05:16 -05:00
Stefan Dej 1457f86764 bugfix: remove comment in same line as a config
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-04 23:43:56 +02:00
Stefan Dej 3670d4cc63 bugfix: add heater_generic to tools (fix #87)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-04 23:42:15 +02:00
meteyou d397ccf804 Merge pull request #70 from cadriel/feature/static-app-bar
feature: ensures app bar doesn't scroll off page
2020-10-04 18:38:41 +02:00
Stefan Dej 1b3636864d bugfix: startscreen from PWA settings
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-04 18:36:49 +02:00
meteyou ce8608f7db Merge pull request #84 from translucentfocus/InitialPWASupport
Feature: Initial PWA Support (Service workers disabled)
2020-10-04 18:01:13 +02:00
Stefan Dej 0b276168b9 add description for gzip and pi zero
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-04 17:48:53 +02:00
meteyou ea5f61761b Merge pull request #83 from translucentfocus/patch-1
Enhancement: Add enabling Gzip for mainsail nginx config
2020-10-04 17:44:51 +02:00
meteyou 260be4ae24 Merge pull request #91 from th33xitus/work-docs
Update installation.md
2020-10-04 13:29:09 +02:00
th33xitus 0b14108a6a Update installation.md
Adding a note to make users aware that the IP in the example configuration must be replaced with a valid IP from their own local network.
2020-10-04 12:01:50 +02:00
translucentfocus 7442908405 Initial PWA Support & favicons moved to /img/icons
Inital Commit

Favicon file path fixes & use relative pathing
2020-09-27 22:22:18 -05:00
translucentfocus bb50aa690d Gzip config for mainsail 2020-09-27 21:17:58 -05:00
Stefan Dej facd18543e bugfix: install unzip on a non raspberry pi os image (fix #85)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-28 00:12:25 +02:00
Stefan Dej c3e3c6e567 bugfix: hide klipper version in footer on smarthphone
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-28 00:06:55 +02:00
Stefan Dej 0977cb39c6 feature: SAVE_CONFIG button, if klipper needs a "SAVE_CONFIG"
bugfix: temp chart bug after loosing connection (fix #82)
bugfix: clear mainsail store after klipper restart
bugfix: heater min/max temp input field

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-28 00:00:17 +02:00
Stefan Dej e2273ecfaf bugfix: hide power plugin error message
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-26 00:22:03 +02:00
Stefan Dej a011510098 bugfix: move gui.json from virtual_sdcard directory to config directory
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-25 22:26:51 +02:00
Stefan Dej 08a106d945 bugfix: extruder amounts and feedrates in a array
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-23 22:25:08 +02:00
Stefan Dej e6c19065b9 bugfix: navipoint webcam and nginx redirect use the same url (fix #81)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-23 21:14:11 +02:00
Stefan Dej c9e0278b26 Merge remote-tracking branch 'origin/master' 2020-09-21 00:04:42 +02:00
Stefan Dej 8220642774 bugfix: replace underline of macro name (only first underline replaced)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-20 23:48:56 +02:00
meteyou c48f8321d5 Update bug_report.md
fixed line breaks
2020-09-20 19:59:14 +02:00
meteyou 789c1d2a5b Update bug_report.md
wrap test
2020-09-20 19:53:45 +02:00
meteyou 294d21e47c Update bug_report.md
typo fix
2020-09-20 19:48:25 +02:00
meteyou d235c434f4 Merge pull request #72 from kageurufu/ssl-support
Support mainsail through an SSL proxy
2020-09-19 23:11:12 +02:00
meteyou ce8df80d1c Merge pull request #71 from yanfali/safe-default-helper
Small helper function for DRY code
2020-09-19 23:09:02 +02:00
Stefan Dej 0672caa6fd Merge remote-tracking branch 'origin/master' 2020-09-19 23:04:25 +02:00
Stefan Dej bc0d1ed6df update install doc with link zu macros and update macros.md
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-19 22:59:28 +02:00
meteyou 676fdaede5 Update issue templates 2020-09-19 21:00:36 +02:00
Stefan Dej 75d742acbe bugfix: hide temps in tempchart (fixed #61)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-19 14:39:15 +02:00
Franklyn c386375e53 Support mainsail through an SSL proxy
I like to run all my web services proxied through a single
 internet-accessible server, secured through SSL and authenticated
 against a single proxy server (nginx, in my case)

I found that mainsail hardcoded ws:// and many http:// addresses, so
 I've updated them to detect ws:// vs ws:///, and just use the protocol
 agnostic // prefix, which then sends the request over the same protocol
 the page is loaded under, either http or https.

Now i've got a nice SSL secured but publicly accessible URL for remote
 printer monitoring
2020-09-15 07:40:00 +01:00
meteyou 98f7ceebd7 Merge pull request #65 from yanfali/share-sorting-function
Share the sort function in getters between functions
2020-09-15 08:18:24 +02:00
Yan-Fa Li c14f9d8deb Small helper function for DRY code
Adds small helper function, to avoid repeating pattern.
2020-09-14 13:17:28 -07:00
Craig Bassett 8aef278a03 feature: ensures app bar doesn't scroll off page
Added benefit of the emergency stop button being always available.
2020-09-14 14:32:37 -05:00
Yan-Fa Li bd938a5d02 Share the sort function in getters between functions
- factor out sort into a named function and share it among common
   callers
 - add a suggested .editorconfig to avoid changing indents and line
   endings
 - add a suggested .pretterrc which honors original formatting as much
   as possible
2020-09-14 09:47:27 -07:00
Stefan Dej 76a93ccb45 feature: add slicer version in g-codes files
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-14 00:29:19 +02:00
meteyou 5a20f9dcad Merge pull request #69 from translucentfocus/master
Separated some words
2020-09-13 23:05:44 +02:00
translucentfocus 5fed21320f Add spacing 2020-09-13 14:18:25 -05:00
translucentfocus 8d620ba522 Add spacing 2020-09-13 14:17:28 -05:00
meteyou 9074d28d9f Merge pull request #38 from Birkemosen/PowerControl
Initial development of Power Control Panel
2020-09-12 23:24:41 +02:00
meteyou a60603e360 Merge pull request #67 from kageurufu/disable-autocomplete
Disable browser autocomplete in console
2020-09-12 23:23:11 +02:00
meteyou b216ead36d Merge pull request #64 from cadriel/feature/webcam_flip
feature: allows flipping the webcam horizontally and vertically
2020-09-12 22:33:16 +02:00
Franklyn 330e78828d Disable browser autocomplete in console
This stops chrome from breaking the cnonsole history feature
2020-09-12 18:36:56 +01:00
Craig Bassett b0b25839ca feature: allows flipping the webcam horizontally and vertically 2020-09-11 14:14:24 -05:00
Stefan Dej 5caaf20ee1 Merge remote-tracking branch 'origin/master' 2020-09-10 22:16:50 +02:00
Stefan Dej afb62ca393 credits upload
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-10 22:16:32 +02:00
meteyou c971e80074 Merge pull request #58 from kageurufu/fix-encoded-filenames
Use encodeURI instead of encodeURIComponent for paths+filename
2020-09-06 22:53:26 +02:00
Franklyn f53cd00cc1 Use encodeURI for paths
Moonraker expects file paths to use un-escaped file paths,
 such as gcodes/some%20file.gcode, but encodeURIComponent
 will always escape the slash. Using encodeURI here will not.
2020-09-06 20:36:24 +01:00
Birkemosen 59efbfa369 Update to latest moonraker api changes 2020-09-06 21:31:17 +02:00
Birkemosen b314e57bfc Update from upstream 2020-09-06 21:16:11 +02:00
Stefan Dej 458444f03a bugfix: delete files with % in filename (fix #55)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-06 00:31:04 +02:00
Stefan Dej 2c093913e8 bugfix: extrude buttons min_extrude_temp dynamic
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-04 23:49:15 +02:00
Stefan Dej c81c491577 update versionnumber
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-03 22:32:33 +02:00
Stefan Dej 5cbed10d44 feature: add "edit file" in context menu of configfiles
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-03 22:07:15 +02:00
Stefan Dej 958358d483 update docs for v0.2.2
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-03 21:40:42 +02:00
Stefan Dej ddc2ab477f Update websocket reqeusts for moonraker update from 03-09-2020
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-03 21:28:47 +02:00
Stefan Dej f351268745 bugfix: Files.vue context menu "print start" -> wrong action
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-03 21:03:24 +02:00
Stefan Dej 25a7e8a33b bugfix: check websocket before send requests
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-02 23:57:37 +02:00
Stefan Dej 8b8f3cf939 feature: switch to meta data notifiy
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-02 23:57:05 +02:00
meteyou 3440d486df Merge pull request #53 from th33xitus/patch-extrude_retract_gcode
bugfix: remove M120/M121 from extrude/retract command
2020-09-02 11:18:57 +02:00
th33xitus 693fcae49a bugfix: remove unnecessary M120/M121
Removes the unnecessary M120 and M121 g-codes when sending an extrude or retract command via the Extrude/Retract button via the Dashboard
2020-09-02 11:06:51 +02:00
Birkemosen c99d4bea7e Change hiding of PowerControlPanel to Dashboard.vue. Update power buttons state from moonraker response. 2020-09-02 10:08:03 +02:00
Stefan Dej ac01dce620 bugfix: fix gcode thumbnail on dashboard
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-02 00:10:34 +02:00
Stefan Dej d3c3113c43 bugfix: show status if no thumbnail exists
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-02 00:02:31 +02:00
Stefan Dej ae30257ee1 update docs to v0.2.1
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 23:56:10 +02:00
Stefan Dej b5add6f919 bugfix: sticky toolbar in config editor
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 23:48:09 +02:00
Stefan Dej 90b3419552 increment version number
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 23:30:29 +02:00
Stefan Dej 0100eaad5d bugfix: configfile save button and scrollbar overlap
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 23:29:14 +02:00
Stefan Dej 825d65be9d bugfix: expand min/max in heightmap is lower -1 or higher 1
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 23:05:29 +02:00
Stefan Dej 38a0c8f441 bugfix: settings panel system -> responsive view
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 22:50:09 +02:00
Stefan Dej ad6ae1128b feature: show gcode thumbnail in StatusPanel.vue while printing
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 22:45:12 +02:00
Stefan Dej 6094c4f9bd bugfix: show favicon if print process == 100%
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 22:44:23 +02:00
Stefan Dej 65a4e40d39 bugfix: SettingsSystemPanel remove margin top when klipper != ready
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 20:53:37 +02:00
Stefan Dej 39f3cfe824 bugfix: ZOffsetPanel.vue current offset
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 20:42:13 +02:00
Stefan Dej 84c9040e2a bugfix: print pause button reset loading status
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 20:22:47 +02:00
Stefan Dej 890a3e3332 bugfix: min_extrude_temp from config file (extrude/retract buttons on dashboard)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 20:19:53 +02:00
Stefan Dej 16b6ed6000 bugfix: min_extrude_temp from config file (extrude/retract buttons on dashboard)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 19:32:21 +02:00
Birkemosen 2efc961eeb Fix missing upstream update 2020-09-01 13:13:47 +02:00
Birkemosen 70c259bd22 Merge remote-tracking branch 'upstream/master' into PowerControl 2020-09-01 13:00:22 +02:00
Stefan Dej d6eb97ffe1 update guides to 0.2.0
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-09-01 00:04:31 +02:00
Stefan Dej fb10211b52 typo heart.png
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-31 23:35:14 +02:00
Stefan Dej 753efc5104 bugfix: format error onload temperature sensor
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-31 23:34:37 +02:00
Stefan Dej 543af7032e insert version number
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-31 23:18:23 +02:00
Stefan Dej 0e21d865b7 bugfix: update heightmap to new klipper/moonraker version
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-31 22:06:43 +02:00
Stefan Dej 601dd07f85 bugfix: typo mooonraker to moonraker
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-31 19:21:25 +02:00
Stefan Dej f06ce3e430 bugfix: load metadata after fileupload
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-31 17:54:12 +02:00
Stefan Dej 1f5f1749fc bugfix: deactivate debug output
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-31 16:26:08 +02:00
Stefan Dej a40701d611 bugfix: macros interface settings -> list all macros
bugfix: margin between dashboard panels

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-30 23:36:38 +02:00
Stefan Dej c0472dfb30 Update all klipper/moonraker communication to Moonraker 'August 16 2020' Version. The Klippy state is more definied and should work better now. This work is not finished!
feature: display print complete with time and filament used + reprint button

bugfix: Fix issue #48. Tempchart need to many load
bugfix: Fix issue #46. Print time > 1 day (was a moonraker bug) + format time to "1d 1h" and not "25h"
bugfix: Fix issue #39. Mainsail title will show filename
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-30 14:58:26 +02:00
Birkemosen 3607a2f6f9 Remove autoformat from js files. 2020-08-17 12:45:24 +02:00
Birkemosen 03610868d1 Revert autoformatting 2020-08-17 12:26:58 +02:00
Stefan Dej f6873bda85 bugfix: toolSlider extend only by machine limits
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-16 21:51:02 +02:00
Stefan Dej bec378d2a0 Update installation.md
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-15 03:38:04 +02:00
Stefan Dej f2a5d1d8ee Update update-0.1.x.md
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-15 01:56:17 +02:00
Stefan Dej 1daf1b07aa Update installation.md -> STRG to CTRL. Thx DocGalaxyBlock
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-15 01:35:12 +02:00
Stefan Dej 9bdcec01ca Update Mainsail to the Moonraker 0.1
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-15 01:23:09 +02:00
Stefan Dej 717408592d Merge remote-tracking branch 'origin/master' 2020-08-14 22:50:02 +02:00
Stefan Dej 00319167a4 update guides to outdated
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-14 22:49:44 +02:00
meteyou beb52f2290 Merge pull request #24 from meteyou/dependabot/npm_and_yarn/websocket-extensions-0.1.4
Bump websocket-extensions from 0.1.3 to 0.1.4
2020-08-14 10:38:30 +02:00
meteyou 8d45767e14 Merge pull request #29 from meteyou/dependabot/npm_and_yarn/lodash-4.17.19
build(deps): bump lodash from 4.17.15 to 4.17.19
2020-08-14 10:38:17 +02:00
Stefan Dej ffa2ea9b08 bugfix: min_extrude_temp at ExtruderPanel.vue (fix #35)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-14 10:24:38 +02:00
Stefan Dej 41f855d9c4 upload update-0.1.x.md preview
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-14 10:04:49 +02:00
Stefan Dej f4a514cb67 bugfix: machine limits auto extend
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-12 22:33:20 +02:00
Stefan Dej 29d5b81b47 feature: add config editor
bugfix: new file named "e" after upload in root directory

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-08 18:26:27 +02:00
Stefan Dej c322edba72 bugfix: fix filament runout sensor -> on/off
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-05 00:06:49 +02:00
Stefan Dej 43d832cd33 bugfix: fix load metadata load after upload (delay to short for the moonraker)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-04 21:53:17 +02:00
Stefan Dej 981b2e854c update docs
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-04 00:28:59 +02:00
Stefan Dej 707330e501 bugfix: add timestamp to gui.json for caching problems
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-04 00:17:58 +02:00
Stefan Dej 7a75f6f6cc bugfix: remove "move=1" before all axis are homed
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-04 00:05:39 +02:00
Stefan Dej 331c0a1e99 add mjpgstreamer to nginx in installation.md
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-02 22:36:12 +02:00
Stefan Dej 0c70bd5f23 update installation.md
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-01 21:20:55 +02:00
Stefan Dej bce591e16e update installation.md
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-01 21:20:16 +02:00
Stefan Dej d0d36470ba update loadingQGL to generic function
report klippy state in browser console log

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-01 16:41:33 +02:00
Stefan Dej 479f2245e3 bugfix: disable heater with value 0
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-01 16:38:58 +02:00
Stefan Dej 706803ea5b update update-0.1.x.md
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-01 16:27:46 +02:00
Stefan Dej 1efe346cb0 add update-0.1.x.md
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-01 14:02:53 +02:00
Stefan Dej 20bad7d24c update installation.md and update-0.0.x.md to v0.1.1
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-01 12:17:08 +02:00
Stefan Dej 8494a35adf bugfix: update notify_filelist_changed
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-08-01 01:07:37 +02:00
Stefan Dej 6766a266e8 feature: rename "Host restart" to "Host reboot"
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-07-31 17:05:42 +02:00
meteyou 75d6cce540 feature: add Z_TILT in ControlPanel.vue
feature: replace "_" in macro names in ControlPanel.vue

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-07-31 15:26:16 +02:00
Stefan Dej e0e3150466 bugfix: babystepping on dashboard 2020-07-28 23:28:38 +02:00
Stefan Dej fcaebc4413 add gcode-thumbnails.md 2020-07-28 23:28:11 +02:00
Stefan Dej 37f1ffb04b feature: fine babystepping (0.01 steps) 2020-07-27 23:39:38 +02:00
Stefan Dej 1b501bb810 bugfix: sensor colors in temp chart 2020-07-27 23:01:02 +02:00
Stefan Dej 7956304f64 fix installation.md and update-0.0.x.md link 2020-07-27 00:09:04 +02:00
Stefan Dej e98d6c0ba9 Update root README.md 2020-07-27 00:03:00 +02:00
Stefan Dej be7abdf254 feature: warning tool input if temp too high or too low 2020-07-26 23:42:02 +02:00
Stefan Dej 0e598f83a6 bugfix: count missing update ticks of temp sensor to compensate temp chart 2020-07-26 22:53:22 +02:00
Stefan Dej ded73fc6a8 bugfix: pause state of StatusPanel.vue; cleanup websocket notifies 2020-07-26 21:34:38 +02:00
Stefan Dej 458a6e8592 feature: update package.json 2020-07-21 00:13:01 +02:00
Stefan Dej 15a5e07dca bugfix: remove dir -> remove dir from state.filetree 2020-07-20 23:20:45 +02:00
Stefan Dej efa15131d8 initial upload of the new docs 2020-07-19 23:35:12 +02:00
dependabot[bot] e9fc463e4a build(deps): bump lodash from 4.17.15 to 4.17.19
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-19 19:27:38 +00:00
Stefan Dej 2636311cc1 feature: move files in filemanager
bugfix: update endstop status mutations
2020-07-18 19:38:23 +02:00
Stefan Dej 32daeedcf7 bugfix: reload endstop status by changing the current page
this closes #19
2020-07-18 19:32:12 +02:00
Stefan Dej 98a7292b7b feature: rename files & directories in g-code files
bugfix: message display on dashboard
2020-07-16 00:33:48 +02:00
Stefan Dej 86d9bac54d bugfix: update save config to moonraker .8 2020-07-14 23:37:09 +02:00
Stefan Dej bb0b7b58fa bugfix: heightmap control 2020-07-14 22:50:36 +02:00
Stefan Dej d18355507f bugfix: subscription of special extras 2020-07-14 12:49:51 +02:00
Stefan Dej 316763e92e bugfix: current_file -> update to moonraker 0.8 2020-07-14 03:36:43 +02:00
Stefan Dej 44a381c243 feature: file manager -> create/remove directores
feature: file manager -> show thumbnails (list + printstart)
2020-07-14 02:57:36 +02:00
Stefan Dej c71bc47ab8 feature: file manager -> show/browse directories
feature: file manager -> grab metadata per page
feature: file manager -> search in directory
2020-07-13 03:58:15 +02:00
Stefan Dej 143d9aad7e bugfix: bed_mesh profile loader
feature: load/save/remove bed_mesh_profile
feature: calibrate/clear bed_mesh
feature: change between probe_matrix and mesh_matrix in the visualizer
2020-07-12 03:00:57 +02:00
Stefan Dej f2466b3ad7 bugfix: virtual_sdcard.progress not loaded at startup 2020-07-11 23:30:27 +02:00
Stefan Dej 7f6a1bcabe bugfix: FW restart fixed
feature: Klippy State Panel
2020-07-07 20:51:20 +02:00
Stefan Dej fb242bc5d3 Update to Moonraker .08-alpha (emergency stop) 2020-07-05 23:43:35 +02:00
Stefan Dej accde2227b Update to Moonraker .08-alpha 2020-07-05 23:41:39 +02:00
Stefan Dej e25c10c757 bugfix: sort temp sensors for the tempchart 2020-06-30 23:04:52 +02:00
Stefan Dej 5795fe45d1 feature: show temperature_probe on dashboard 2020-06-30 00:46:43 +02:00
Stefan Dej 1e61749175 feature: babystepping, switch between idle interface & printing interface, first tests with PS thumbnails 2020-06-17 23:39:16 +02:00
dependabot[bot] 4937f02673 Bump websocket-extensions from 0.1.3 to 0.1.4
Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/faye/websocket-extensions-node/releases)
- [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-06-07 22:59:23 +00:00
Stefan Dej 4b13e4c6ce Merge remote-tracking branch 'origin/master' 2020-05-28 00:58:05 +02:00
Stefan Dej b4ee662a4f feature: if Filament used > 1000mm -> convert to m 2020-05-28 00:16:10 +02:00
meteyou 1fd2473e9e Merge pull request #21 from translucentfocus/MachineSettingsTypo
Machine Limits Typo
2020-05-26 14:14:45 +02:00
meteyou 8a203c1def Merge pull request #20 from translucentfocus/renaming
Renaming kwc to mainsail
2020-05-26 14:14:14 +02:00
translucentfocus 57f6d275a3 Machine Settings Typo
Renamed headline to Machine Settings
2020-05-25 14:01:52 -05:00
translucentfocus 78dfbfb131 Renaming kwc to mainsail
Note: package-lock.json still has kwc in the name. I didn't change due to it being build-related
2020-05-25 13:54:36 -05:00
meteyou da844fec63 Merge pull request #17 from translucentfocus/master
Bumped Update Header Text to current version
2020-05-24 10:34:18 +02:00
translucentfocus 35e8470430 Bumped Update Header Text to current version
Your terminal commands are for the latest update V0.0.12, but the header text still said V0.0.11 🙂

Btw, this is amazing work!
2020-05-24 01:59:03 -05:00
Stefan Dej 5cff1fc45a bugfix: control button position z
feature: add extruder control panel
2020-05-23 00:46:02 +02:00
Stefan Dej 7301cecbdf bugfix: console log sort with milliseconds,
feature: add all gcode buttons to event log
2020-05-12 01:13:55 +02:00
Stefan Dej 0478d1aefb rename nginx log from kwc to mainsail 2020-05-11 11:11:12 +02:00
Stefan Dej d9469b3c8b fixed typos in Heightmap.vue 2020-05-11 08:59:39 +02:00
Stefan Dej 0a51b0d255 bugfix: time format in status panel,
update README.md for V0.0.12
2020-05-11 08:40:00 +02:00
Stefan Dej 52afc35fd6 update README.md for V0.0.11 2020-05-11 01:11:27 +02:00
Stefan Dej 9e5266425c feature: select value by focus heater input field 2020-05-11 01:07:29 +02:00
Stefan Dej 86595ab70b feature: temperature_sensor min/max temp by hover 2020-05-11 01:04:59 +02:00
Stefan Dej 0f87e3f28f bugfix: temperature_fans onload & update fix
feature: save hidden sensors from chart in gui.json
2020-05-11 00:54:36 +02:00
Stefan Dej 88305e74cf fixes #9 2020-05-09 02:20:50 +02:00
Stefan Dej abea5d8660 fixes #13 for time > 24h 2020-05-09 02:12:42 +02:00
Stefan Dej d2bccb737e Update README.md 2020-05-09 02:03:19 +02:00
Stefan Dej 0bfde82ee8 add sensor number 2020-05-09 01:58:16 +02:00
Stefan Dej de9485cc84 update README.md, load tempchart history, update to moonraker 2020-05-09 01:47:30 +02:00
Stefan Dej e8d2c71401 update README.md 2020-04-27 21:52:37 +02:00
meteyou 554b25d754 Merge pull request #5 from pusewicz/patch-1
Few tweaks to the README file

thx!
2020-04-27 12:36:51 +02:00
Piotr Usewicz ecf2ee070b Few tweaks to the README file
This is a PR that tweaks some of the README that fixes some of the typos. I did not go much into detail.
2020-04-27 12:14:42 +02:00
meteyou e35d13d446 Merge pull request #1 from meteyou/dependabot/npm_and_yarn/acorn-6.4.1
Bump acorn from 6.3.0 to 6.4.1
2020-04-27 10:52:07 +02:00
Stefan Dej 9f46a502fc finish README.md 2020-04-27 10:31:56 +02:00
Stefan Dej a4436348df finish README.md 2020-04-27 08:40:06 +02:00
Stefan Dej 706515bc84 Update Websocket + README.md 2020-04-27 01:55:01 +02:00
Stefan Dej efc70ca5aa test with new websocket implementation 2020-04-25 21:17:27 +02:00
Stefan Dej 544d5e2db5 update npm packages & change to local dependency 2020-04-19 17:06:31 +02:00
Stefan Dej 70e8ce5687 update README.md for V0.0.8 2020-04-18 03:24:21 +02:00
Stefan Dej 6bc72dcb8c modify nginx config in README;
Settings > Machine > Endstop Status
Settings > Machine > Runout Sensor
2020-04-18 03:13:44 +02:00
Stefan Dej d0f78196c5 modify nginx config in README 2020-04-14 13:48:33 +02:00
Stefan Dej ec827bbea4 add nginx config in README 2020-04-14 13:34:32 +02:00
Stefan Dej beba547031 clean settings and last API corrections 2020-04-14 00:43:32 +02:00
Stefan Dej bb18992f80 add interface settings and save gui.json on virtual_sdcard 2020-04-14 00:08:52 +02:00
Stefan Dej 572fbd7629 edit README.md: including lighttpd and optimize haproxy 2020-04-12 17:42:23 +02:00
Stefan Dej 69fff8fe0e dashboard:
- temp combine table+chart;
- add estimated time by: filament, slicer
- format control buttons

gcode files:
- add meta data
2020-04-12 03:56:32 +02:00
Stefan Dej 101904bd6d console autocomplete;
tempchart target temp;
settings machinelimits
add webcamsupport
2020-04-12 00:13:40 +02:00
Stefan Dej 28177e35a7 update README.md to V0.0.6 2020-03-26 01:50:54 +01:00
dependabot[bot] d57e888133 Bump acorn from 6.3.0 to 6.4.1
Bumps [acorn](https://github.com/acornjs/acorn) from 6.3.0 to 6.4.1.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/6.3.0...6.4.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-03-16 03:31:57 +00:00
182 changed files with 38086 additions and 3720 deletions

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
# hostname or ip from the moonraker instance
VUE_APP_HOSTNAME=printer.local
# port from the moonraker instance
VUE_APP_PORT=7125
# reconnect interval in ms
VUE_APP_RECONNECT_INTERVAL=5000
+12
View File
@@ -0,0 +1,12 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: meteyou
open_collective: # Replace with a single Open Collective username
ko_fi: mainsail
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
+22
View File
@@ -0,0 +1,22 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---
**Describe the bug:**\
A clear and concise description of what the bug is.
**Expected behavior:**\
A clear and concise description of what you expected to happen.
**Screenshots:**\
If applicable, add screenshots to help explain your problem.
**Logfiles:**\
Please upload your Logfiles here or upload them to [pastebin.com](http://pastebin.com) and paste your log links here.
- klippy.log
- moonraker.log
+20
View File
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[FR]"
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
+13
View File
@@ -0,0 +1,13 @@
node_modules
.DS_Store
design
*.log
packages/test
dist
temp
.vuerc
.version
.versions
.changelog
package-lock.json
*.local
+674
View File
@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program 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 3 of the License, or
(at your option) any later version.
This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
+13 -94
View File
@@ -1,99 +1,18 @@
# Klipper Web Control
KWC is a responsive web interface for [Klipper](https://github.com/KevinOConnor/klipper) 3D printer firmware. It communicates with the klipper-api from [Arksine](https://github.com/arksine).
# Mainsail
Mainsail is a lightweight & responsive web interface for the [Klipper](https://github.com/KevinOConnor/klipper)
3D printer firmware. It communicates with the [Moonraker (Klipper-API)](https://github.com/arksine/moonraker) from [Arksine](https://github.com/arksine).
## Installation
At first install Arksine klipper-api fork/branch -> [install manual](https://github.com/Arksine/klipper/tree/work-web_server-20200131/klippy/extras/web_server)
![screenshot-dashboard](docs/assets/img/screenshot.png)
Download and install KWC:
```bash
mkdir -p ~/kwc
cd ~/kwc
wget -q -O kwc.zip https://github.com/meteyou/kwc/releases/download/v0.0.5/kwc-alpha-0.0.5.zip && unzip kwc.zip && rm kwc.zip
```
To begin using Mainsail start by [installing](https://meteyou.github.io/mainsail/setup/) it or read the [pages](https://meteyou.github.io/mainsail/) for more informations.
Configure web_server in printer.cfg:
```
[web_server]
port: 8080
enable_cors: true
trusted_clients:
192.168.1.0/24
127.0.0.1
web_path: ~/kwc
```
For support join our discord server -> [https://discord.gg/skWTwTD](https://discord.gg/skWTwTD)
Example Klipper macros:
```
[pause_resume]
## Credit, sources and inspiration
* [Kevin O'Connor](https://github.com/KevinOConnor) for the awesome 3D printer firmware [Klipper](https://github.com/KevinOConnor/klipper)
* [Eric Callahan (arksine)](https://github.com/Arksine) for [Moonraker (Klipper API)](https://github.com/Arksine/moonraker). Without Moonraker, Mainsail would not be possible.
* [lixxbox](https://github.com/lixxbox) for the Mainsail logo & Docs
* [Vue.js](https://vuejs.org/): The Progressive JavaScript Framework
* [Vuetify](https://vuetifyjs.com/): Material Design Component Framework for Vue.js
[gcode_macro CANCEL]
default_parameter_X: 230
default_parameter_Y: 230
default_parameter_Z: 10
gcode:
M104 S0
M140 S0
M141 S0
M106 S0
CLEAR_PAUSE
RESET_SD
[gcode_macro CANCEL_PRINT]
gcode:
CANCEL
[gcode_macro PAUSE]
rename_existing: BASE_PAUSE
default_parameter_X: 230
default_parameter_Y: 230
default_parameter_Z: 10
gcode:
SAVE_GCODE_STATE NAME=PAUSE_state
BASE_PAUSE
G91
G1 E-1.7 F2100
G1 Z{Z}
G90
G1 X{X} Y{Y} F6000
G91
[gcode_macro RESUME]
rename_existing: BASE_RESUME
gcode:
G91
G1 E1.7 F2100
G91
RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
BASE_RESUME
```
## Installation haproxy
haproxy is necessary to use port 80.
`sudo apt install haproxy`
add following lines at the end of `/etc/haproxy/haproxy.cfg`:
```
frontend public
bind :::80 v4v6
# use_backend webcam if { path_beg /webcam/ }
default_backend kwc
backend kwc
reqrep ^([^\ :]*)\ /(.*)     \1\ /\2
option forwardfor
server kwc1 127.0.0.1:8080
#backend webcam
# reqrep ^([^\ :]*)\ /webcam/(.*) \1\ /\2
# server webcam1 127.0.0.1:8081
```
## Update KWC to V0.0.5
```
rm -R ~/kwc/*
cd ~/kwc
wget -q -O kwc.zip https://github.com/meteyou/kwc/releases/download/v0.0.5/kwc-alpha-0.0.5.zip && unzip kwc.zip && rm kwc.zip
```
and update your macros
Massive thanks to the whole [Voron Design](http://vorondesign.com/) community. Without them such a project would not be possible.
+1
View File
@@ -0,0 +1 @@
docs.mainsail.xyz
+1
View File
@@ -0,0 +1 @@
Welcome to the Mainsail documentation. The [index](http://meteyou.github.io/mainsail) of the docs is here.
+6
View File
@@ -0,0 +1,6 @@
title: "Mainsail"
logo: "/assets/img/logo-mainsail.png"
description: A web interface for Klipper
remote_theme: pmarsceill/just-the-docs
color_scheme: "mainsail"
search_enabled: true
@@ -0,0 +1,17 @@
$body-background-color: darken($grey-dk-300, 3%);
$sidebar-color: $grey-dk-300;
$border-color: $grey-dk-200;
$body-text-color: $grey-lt-300;
$body-heading-color: $grey-lt-000;
$nav-child-link-color: $grey-dk-000;
$search-result-preview-color: $grey-dk-000;
$link-color: $red-300;
$btn-primary-color: $blue-200;
$base-button-color: $grey-dk-250;
$code-background-color: $grey-dk-250;
$search-background-color: $grey-dk-250;
$table-background-color: $grey-dk-250;
$feedback-color: darken($sidebar-color, 3%);
+1
View File
@@ -0,0 +1 @@
$link-color: $red-300;
+10
View File
@@ -0,0 +1,10 @@
---
layout: default
title: About
nav_order: 100
has_children: false
permalink: /about
---
# About Mainsail
trollolol
+7
View File
@@ -0,0 +1,7 @@
---
layout: default
title: Additional Support
nav_order: 7
has_children: true
permalink: /additional
---
+44
View File
@@ -0,0 +1,44 @@
---
layout: default
title: Samba shares
parent: Additional Support
nav_order: 1
permalink: /additional/shares
---
## Samba shares
``sudo apt-get update``
``sudo apt-get install samba samba-common-bin``
> _passwort setzen - wird der schritt benötigt?_
``sudo smbpasswd -a pi​``
``sudo chmod -R 777 /home/pi/klipper_config``
``sudo chmod -R 777 /home/pi/sdcard``
``sudo nano /etc/samba/smb.conf``
```ini
[klipper_config]
comment = klipper config
path = /home/pi/klipper_config
writeable = Yes
only guest = Yes
create mask = 0777
directory mask = 0777
browseable = Yes
public = yes
[virtual_sdcard]
comment = virtual sdcard
path = /home/pi/sdcard
writeable = yes
only guest = yes
create mask = 0777
directory mask = 0777
browseable = yes
public = yes
```
``sudo service smbd restart``
+21
View File
@@ -0,0 +1,21 @@
---
layout: default
title: Slicer upload
parent: Additional Support
nav_order: 1
permalink: /additional/slicer-upload
---
## Upload from Slicer
### PrusaSlicer/SuperSlicer (prior to v2.3.0)
You can upload your GCode-files from your Slicer. Moonraker simulates the octoprint-upload function.
If not already been done, switch to advanced or expert mode and set the options under "Printer Settings / General" as shown in the screenshot below.
For "API Key" you can type anything.
![screenshot](../assets/img/additional/FileUpload-PrusaSlicer-2.2.0.png)
### PrusaSlicer/SuperSlicer (since v2.3.0)
A "Physical Printer" must be defined to configure the settings from above.
More detailed instructions will follow.
+28
View File
@@ -0,0 +1,28 @@
---
layout: default
title: Thumbnails
parent: Additional Support
nav_order: 1
permalink: /additional/thumbnails
---
## Thumbnails
Mainsail can display thumbnails in the file browser and as previews in the print status.
![preview](../assets/img/additional/large-preview.png)
### SuperSlicer (since v2.2.54.0)
In "Expert" mode SuperSlicer has some very convenient options in the "printer settings" tab to activate and customize the previews.
![SuperSlicer](../assets/img/additional/SuperSlicer-thumbnails.png)
### PrusaSlicer/SuperSlicer
To enable thumbnails, click on `Help > Show Configuration Folder` and navigate to your printer profiles inside the `printer` folder.
Open your printer profile in a text editor and find `thumbnails =` and add the resolutions `32x32,400x300`. Save the file and restart your Slicer.
![PrusaSlicer](../assets/img/additional/PrusaSlicer-thumbnails.png)
From now on the gcode files contain thumbnails displayed by mainsail.
+7
View File
@@ -0,0 +1,7 @@
---
layout: default
title: Webcam
parent: Additional Support
nav_order: 1
permalink: /additional/webcam
---
Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

+27
View File
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generator: Adobe Illustrator 25.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 599.38 523.11" style="enable-background:new 0 0 599.38 523.11;" xml:space="preserve">
<style type="text/css">
.st0{fill:#E30613;stroke:#009640;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;}
.st1{fill:#D41216;}
.st2{fill:#D41216;stroke:#009640;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;}
.st3{fill:none;stroke:#009640;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;}
.st4{display:none;}
.st5{display:inline;fill:#E73D26;}
.st6{display:inline;fill:none;}
</style>
<g id="Ebene_2">
<g>
<path class="st0" d="M382.29,142.98"/>
<path class="st1" d="M382.29,142.98L132.98,522.82L0,522.68L344.3,0l0,0C352.18,49.06,365.2,97.68,382.29,142.98"/>
<path class="st2" d="M413.28,213.54L208.5,522.92l132.94,0.19l135.03-206.33l0,0C452.69,284.29,431.53,249.77,413.28,213.54 L413.28,213.54"/>
<path class="st3" d="M599.38,447.69"/>
<path class="st3" d="M518.6,369.16"/>
<path class="st1" d="M599.38,447.69l-49.25,75.42L417,522.82l101.6-153.67l0,0C543.48,397.35,570.49,423.61,599.38,447.69 L599.38,447.69z"/>
</g>
</g>
<g id="Ebene_1" class="st4">
<path class="st5" d="M-45.42,426.29c0.34,0.34,97.62,1.14,107.04,0.94c0.94-0.07,1.75-0.74,2.29-2.08 c0.47-1.14,1.08-2.02,1.41-2.02s0.61-0.34,0.61-0.67c0-0.81,2.76-4.91,3.56-5.24c0.27-0.13,0.47-0.61,0.47-1.08 c0-0.74,0.61-1.61,3.29-4.84c0.34-0.47,0.47-1.01,0.27-1.21c-0.27-0.2-0.07-0.4,0.34-0.4c0.47,0,0.81-0.47,0.81-1.01 c0-0.47,0.47-1.21,1.08-1.55c0.61-0.34,1.08-0.87,1.08-1.21c0.07-0.54,3.09-5.58,3.9-6.32c0.2-0.2,0.94-1.41,1.61-2.69 c0.74-1.28,1.48-2.49,1.68-2.69c0.61-0.54,3.43-4.64,3.43-4.98c0-0.2,1.95-3.23,4.37-6.72s4.37-6.66,4.37-7.06 c0-0.34,0.2-0.74,0.54-0.87c0.54-0.27,3.5-4.37,3.5-4.91c0-0.2,0.34-0.74,0.74-1.21c0.34-0.47,2.22-3.23,4.17-6.19 c1.88-2.96,3.56-5.51,3.83-5.71c0.2-0.2,0.74-1.14,1.28-2.15c0.54-1.01,1.48-2.49,2.22-3.16c0.67-0.74,1.21-1.55,1.21-1.68 c0-0.61,12.98-20.17,13.65-20.64c0.34-0.2,0.47-0.61,0.34-0.81c-0.07-0.27,0.27-1.01,0.87-1.68c0.61-0.67,1.61-2.22,2.35-3.36 c0.67-1.21,1.48-2.15,1.82-2.15c0.27,0,0.4-0.27,0.13-0.61c-0.2-0.34,0.07-1.01,0.54-1.55c1.48-1.48,5.18-7.13,5.18-7.87 c0-0.4,0.34-0.74,0.67-0.74c0.4,0,0.67-0.47,0.67-1.01c0-0.54,0.34-1.01,0.67-1.01c0.4,0,0.67-0.4,0.67-0.94 c0-0.54,0.27-1.08,0.54-1.21c0.27-0.13,1.28-1.41,2.15-2.89c0.87-1.48,1.88-3.03,2.15-3.36c1.01-1.21,9.28-13.92,9.28-14.19 c0-0.34,4.24-6.45,5.18-7.46c0.4-0.47,1.01-1.48,1.21-2.22c0.2-0.74,0.67-1.34,1.01-1.34c0.27,0,0.67-0.54,0.94-1.21 c0.4-1.14,1.82-3.56,2.49-4.17c0.2-0.2,2.15-3.16,4.37-6.66c2.15-3.43,4.5-6.86,5.11-7.53c0.67-0.74,1.08-1.28,0.87-1.28 c-0.2,0,0.74-1.48,2.02-3.36c1.28-1.82,2.35-3.63,2.35-4.03c0-0.34,0.2-0.67,0.54-0.67c0.27,0,1.21-1.34,2.15-3.03 c0.94-1.68,1.88-3.03,2.15-3.03c0.34,0,0.54-0.4,0.54-0.87c0-0.54,0.61-1.48,1.34-2.15c0.74-0.67,1.34-1.61,1.34-2.15 c0-0.47,0.34-0.87,0.67-0.87c0.4,0,0.67-0.34,0.67-0.67c0-0.74,3.16-5.85,4.5-7.26c0.4-0.4,1.01-1.41,1.21-2.15 s0.67-1.34,0.94-1.34c0.34,0,0.94-0.87,1.41-2.02c0.47-1.14,1.08-2.02,1.34-2.02c0.27,0,0.87-0.87,1.34-2.02 c0.47-1.14,1.08-2.02,1.34-2.02c0.27,0,0.87-0.94,1.34-2.02c0.47-1.14,1.14-2.02,1.48-2.02s0.4-0.34,0.2-0.67 c-0.2-0.4-0.2-0.67,0.13-0.67c0.27,0,1.41-1.55,2.55-3.36c1.08-1.88,2.22-3.36,2.55-3.36c0.27,0,0.4-0.27,0.2-0.61 c-0.2-0.27,0.2-1.08,0.94-1.75c0.74-0.67,1.34-1.55,1.34-1.95c0-0.4,0.74-1.61,1.68-2.62c0.94-1.01,1.55-1.82,1.41-1.82 c-0.34,0,8.87-14.19,10.35-15.93c0.34-0.47,0.67-1.14,0.67-1.55c0-0.34,0.34-0.67,0.67-0.67c0.4,0,0.67-0.47,0.67-1.01 s0.34-1.01,0.67-1.01c0.4,0,0.67-0.34,0.67-0.67c0-0.4,1.08-2.22,2.35-4.03s2.35-3.5,2.35-3.7s0.61-1.01,1.34-1.82 c0.74-0.81,1.34-1.88,1.34-2.35s0.34-0.87,0.74-0.87c0.34,0,0.54-0.27,0.34-0.54c-0.2-0.34,0.27-0.94,0.94-1.48 c0.67-0.54,1.14-1.14,1.01-1.34c-0.2-0.27,0.27-1.01,1.01-1.68c0.74-0.67,1.34-1.48,1.34-1.75c0-0.27,2.35-4.1,5.24-8.47 c2.96-4.37,8.27-12.51,11.9-18.02c3.63-5.58,6.93-10.29,7.33-10.56c0.4-0.27,0.47-0.54,0.13-0.54c-0.34,0-0.13-0.54,0.4-1.21 c1.01-1.21,1.08-1.75,0.2-3.83c-2.89-6.93-5.04-12.77-5.04-13.51c0-0.54-0.27-0.94-0.67-0.94c-0.34,0-0.61-0.2-0.54-0.54 c0.2-0.87-1.75-6.52-2.42-6.99c-0.4-0.27-0.47-0.67-0.2-0.94s0.2-0.81-0.13-1.21c-0.47-0.67-3.97-10.62-4.37-12.71 c-0.13-0.47-0.4-1.34-0.61-2.02c-0.27-0.61-0.67-1.68-0.94-2.35c-0.2-0.61-0.47-1.61-0.61-2.15c-0.27-1.34-1.61-5.98-2.42-8.14 c-0.34-0.94-0.67-2.35-0.74-3.16c-0.07-0.81-0.27-1.48-0.47-1.48c-0.27,0-0.47-0.4-0.54-0.87c0-0.4-0.2-1.41-0.4-2.15 c-0.2-0.74-1.01-3.9-1.68-7.06c-0.74-3.16-1.34-5.78-1.41-5.92c-0.13-0.07-0.2-0.34-0.27-0.67c-0.34-1.34-1.28-5.92-1.41-6.52 c-0.07-0.4-0.2-0.81-0.27-1.01c-0.2-0.4-0.54-2.22-0.94-5.38c-0.2-1.28-0.54-2.82-0.74-3.43c-0.27-0.61-0.4-1.34-0.34-1.68 c0.07-0.34,0-0.74-0.07-0.94c-0.27-0.67-0.67-3.09-0.94-5.38c-0.13-1.28-0.34-2.35-0.4-2.35c-0.13,0-0.61-3.36-0.74-5.92 c-0.07-1.01-0.4-2.02-0.74-2.22s-0.27-0.81,0.13-1.28c1.48-1.75-0.54-1.61-2.08,0.2l0,0c-0.87,1.01-2.22,2.96-2.96,4.37 c-0.74,1.48-1.95,3.29-2.69,4.1c-0.74,0.81-1.95,2.62-2.69,4.03c-0.74,1.34-1.82,3.03-2.42,3.63c-0.54,0.61-1.61,2.22-2.35,3.5 c-1.48,2.69-1.68,2.96-3.97,5.78c-0.94,1.21-1.68,2.35-1.68,2.55c0,0.47-6.66,10.56-7.33,11.16c-0.2,0.2-1.01,1.41-1.68,2.69 c-0.74,1.28-1.48,2.49-1.68,2.69c-0.47,0.4-8.27,12.03-8.81,13.11 M294.17,171.07c-0.74,1.14-1.82,2.76-2.35,3.56 c-0.54,0.81-1.68,2.55-2.49,3.83c-1.88,2.82-2.22,3.36-5.58,8.2c-1.48,2.15-2.69,4.03-2.69,4.24s-0.34,0.67-0.74,1.14 c-0.34,0.47-4.24,6.25-8.67,12.91c-4.37,6.66-8.27,12.44-8.67,12.91c-0.4,0.47-0.74,0.94-0.74,1.14c0,0.61-4.3,6.79-4.84,6.99 c-0.27,0.13-0.54,0.67-0.54,1.21s-0.34,0.94-0.74,0.94c-0.34,0-0.54,0.27-0.34,0.61c0.27,0.34,0.2,0.74-0.07,0.87 c-0.81,0.34-4.91,6.39-4.91,7.19c0,0.34-0.54,1.01-1.14,1.34c-0.67,0.4-0.94,0.74-0.67,0.74s-0.07,0.67-0.87,1.48 c-0.74,0.81-1.34,1.88-1.34,2.35s-0.2,0.87-0.47,0.87c-0.34,0-1.41,1.55-2.55,3.43c-1.08,1.88-2.29,3.77-2.69,4.24 c-1.34,1.61-3.7,5.04-3.7,5.45c0,0.27-0.4,0.87-0.81,1.34c-1.95,2.15-2.49,2.89-2.22,3.16c0.13,0.13-0.47,1.14-1.34,2.15 c-0.94,1.08-1.68,2.15-1.68,2.42s-0.61,1.14-1.34,2.02s-1.34,1.95-1.34,2.49s-0.27,0.81-0.61,0.61c-0.34-0.2-0.81,0.34-1.01,1.28 cLine truncated
<line class="st6" x1="108.71" y1="523.11" x2="108.7" y2="523.11"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 KiB

+16
View File
@@ -0,0 +1,16 @@
---
layout: default
title: Custom CSS
parent: Customizing
nav_order: 99
permalink: /customizing/custom-css
---
## Custom-CSS
The custom.css file allows you to customize the appearance of Mainsail
without the need of rebuilding it. All you need to do is to place a file
named "custom.css" into the configuration directory ".theme" and define
your css rules in there.
![screenshot](../assets/img/customizing/screenshot-custom-css.png)
+15
View File
@@ -0,0 +1,15 @@
---
layout: default
title: Favicons
parent: Customizing
nav_order: 3
permalink: /customizing/favicons
---
## Custom favicon
Upload the images with the name "favicon-16x16.png" and "favicon-32x32.png"
to the .theme folder. Allowed extension is only .png. The "favicon-32x32.png"
is required. The "favicon-16x16.png" is optional. Maybe a hard refresh is
necessary (CTRL+SHIFT+F5 on windows or CMD+SHIFT+R on mac).
![screenshot](../assets/img/customizing/screenshot-favicons.png)
+22
View File
@@ -0,0 +1,22 @@
---
layout: default
title: Customizing
nav_order: 6
has_children: true
permalink: /customizing
---
# Customizing
Feel free to customize Mainsail to your preferences. At the moment there
are not many possibilities, but i will expand them continuously. If some features
are not yet listed below, please create a FR (feature request) on Github.
### currently supported functions
- [change sidebar logo](sidebar.md)
- [change sidebar background](sidebar.md)
- [change favicon](favicon.md)
- [upload custom.css](custom-css.md)
### cooming soon
- change primary color (all blue buttons atm)
+16
View File
@@ -0,0 +1,16 @@
---
layout: default
title: Prepare
parent: Customizing
nav_order: 1
permalink: /customizing/prepare
---
## Prepare theme
To prepare mainsail to use themes, you only have to create the ".theme" directory. Go into
"Settings" > "Machine" and check if you have enabled "Hidden files". Then you can create a
directory with the name ".theme". Important is the "." on the beginning. All further customizing
files, will be placed in this directory.
![screenshot](../assets/img/customizing/screenshot-display-hidden-files.png)
+22
View File
@@ -0,0 +1,22 @@
---
layout: default
title: Sidebar
parent: Customizing
nav_order: 2
permalink: /customizing/sidebar
---
## Sidebar customizing
### Change sidebar logo
Upload an image with the name "sidebar-logo" to the .theme folder.
Allowed file extensions for the image are: .svg, .jpg, .png and .gif.
![screenshot](../assets/img/customizing/screenshot-sidebar-logo.png)
### Change sidebar background image
Upload an image with the name "sidebar-background" to the .theme folder.
Allowed file extensions for the image are: .jpg, .png and .gif. The
recommended image size is 300x1000px.
![screenshot](../assets/img/customizing/screenshot-sidebar-background.png)
+17
View File
@@ -0,0 +1,17 @@
---
layout: default
title: Welcome
nav_order: 1
has_children: false
---
# Welcome to the Mainsail docs!
Mainsail is a lightweight & responsive web interface for the Klipper 3D printer firmware. It communicates with Moonraker (Klipper-API) from Arksine.
[Setup Guide](/setup-guide/index.md){: .btn}
For support join our discord server -> [https://discord.gg/skWTwTD](https://discord.gg/skWTwTD)
## Screenshots
![Dashboard](assets/img/screenshot.png)
+89
View File
@@ -0,0 +1,89 @@
---
layout: default
title: Necessary Configuration
nav_order: 5
has_children: false
permalink: /necessary-configuration
---
Mainsail requires a minimum configuration to function properly. It should give you a warning at startup if the required parts are not found in your configuration.
## Required configuration
### virtual_sdcard
This allows gcode file uploads.
```yaml
[virtual_sdcard]
path: ~/gcode_files
```
### display_status
This is required for messages in your status panel, if you don't have a `[display]` in your configuration.
```yaml
[display_status]
```
### pause / resume / cancel
This enables pause / resume in mainsail.
```yaml
[pause_resume]
```
## Macros
### for pause /resume / cancel functionality
These should be modified to your own needs.
```yaml
[gcode_macro PAUSE]
rename_existing: BASE_PAUSE
default_parameter_X: 230 #edit to your park position
default_parameter_Y: 230 #edit to your park position
default_parameter_Z: 10 #edit to your park position
default_parameter_E: 1 #edit to your retract length
gcode:
SAVE_GCODE_STATE NAME=PAUSE_state
BASE_PAUSE
G91
G1 E-{E} F2100
G1 Z{Z}
G90
G1 X{X} Y{Y} F6000
```
```yaml
[gcode_macro RESUME]
rename_existing: BASE_RESUME
default_parameter_E: 1 #edit to your retract length
gcode:
G91
G1 E{E} F2100
G90
RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
BASE_RESUME
```
```yaml
[gcode_macro CANCEL_PRINT]
rename_existing: BASE_CANCEL_PRINT
gcode:
TURN_OFF_HEATERS
CLEAR_PAUSE
SDCARD_RESET_FILE
BASE_CANCEL_PRINT
```
## Optional
### customize klipper default commands
for example, if you want to adjust the `BED_MESH_CALIBRATE` command, which you can run from "heightmap > calibrate".
```yaml
[gcode_macro BED_MESH_CALIBRATE]
rename_existing: BASE_BED_MESH_CALIBRATE
gcode:
#before the original gcode
BED_MESH_CLEAR
QUAD_GANTRY_LEVEL
G1 X125 Y125 Z5 F6000
#the original gcode
BASE_BED_MESH_CALIBRATE
#after the original gcode
```
+10
View File
@@ -0,0 +1,10 @@
---
layout: default
title: Remote Mode
nav_order: 4
has_children: false
permalink: /remotemode
---
## Remote Mode
+14
View File
@@ -0,0 +1,14 @@
---
layout: default
title: Setup Guides
nav_order: 2
has_children: true
permalink: /setup/
has_toc: false
---
# Setup Guides
There are different ways to install Mainsail.
- [MainsailOS (recommend)](mainsail-os.md)
- [Kiauh (Klipper Install And Update Helper)](kiauh.md)
- [Manual Setup](manual-setup/index.md)
+14
View File
@@ -0,0 +1,14 @@
---
layout: default
title: Kiauh Guide
parent: Setup Guides
nav_order: 2
has_children: false
permalink: /setup/kiauh
---
# Installing Mainsail with Kiauh
Kiauh is a tool that helps you install or upgrade Klipper, Moonraker, Mainsail and various
other extensions easily and comfortably.
For more informations and get to the guide click [here](https://github.com/th33xitus/kiauh).
+27
View File
@@ -0,0 +1,27 @@
---
layout: default
title: MainsailOS Guide
parent: Setup Guides
nav_order: 1
has_children: false
permalink: /setup/mainsail-os
---
# Installing Mainsail with MainsailOS
The recommended way to install Mainsail on a Raspberry Pi is to use [MainsailOS](https://github.com/raymondh2/MainsailOS),
a pre-packaged disk image. If you are building a custom configuration, you may need to skip
these instructions and install Mainsail [manually](manual-setup/index.md).
1. Download the latest mainsailOS [Release](https://github.com/raymondh2/MainsailOS/releases)
2. Unzip the .img file from your download.
3. Use [BalenaEtcher](https://www.balena.io/etcher/) to write the .img on to an 8GB, or larger SDcard. *THIS WILL DESTROY ALL DATA ON YOUR CARD*.
_note: It is a good idea to use a premium SDcard from a reputable manufacturer such as Sandisk, Kingston or Samsung. Low end cards will often fail quickly when used in this application_
4. If you will be using wifi, edit the file `mainsailos-wpa-supplicant.txt` with your Wifi information. If you are having trouble seeing this file on the sdcard, try removing it and re-inserting it into your card reader.
5. Make sure that your MCU(s) is connected to your pi, If you will be using wired networking, also make sure your ethernet cable is connected.
5. Insert the SDcard into your Pi, and power on the Pi.
6. Find your pi on the network, and ssh into it, (Using PuTTY on Windows or the terminal on MacOS)
* If your network supports bonjour, the pi should show up as `mainsailos.local`
* If your network automatically assigns DNS hostnames, it may simply show up as `mainsailos`
* Failing these two options, you may need to check your router's DHCP server, and find out what IP address as been assigned to the device.
+9
View File
@@ -0,0 +1,9 @@
---
layout: default
title: Manual Setup Guide
parent: Setup Guides
nav_order: 3
has_children: true
permalink: /setup/manual-setup
---
This is a guide to setting up Klipper, Moonraker & Mainsail on a Raspberry Pi with Raspberry Pi OS. Other SBCs and/or Linux distributions might work, but may require a customized installation script or configs.
+64
View File
@@ -0,0 +1,64 @@
---
layout: default
title: Klipper
parent: Manual Setup Guide
grand_parent: Setup Guides
nav_order: 3
permalink: /setup/manual-setup/klipper
---
## Klipper
### Installation
The following commands will clone Klipper to an appropriate directory in HOME and run the setup script.
```bash
cd ~
git clone https://github.com/KevinOConnor/klipper
cd ~/klipper
./scripts/install-octopi.sh
```
### Configuration
After Klipper is installed, you will need to change the default location of the printer.cfg and add the UDS (unix domain socket). This is defined in the file `/etc/default/klipper`
To edit this file type:
```bash
sudo nano /etc/default/klipper
```
find the following line:
```
KLIPPY_ARGS="/home/pi/klipper/klippy/klippy.py /home/pi/printer.cfg -l /tmp/klippy.log"
```
and change the config location to `/home/pi/klipper_config/printer.cfg` and add `-a /tmp/klippy_uds` to define UDS.
```
KLIPPY_ARGS="/home/pi/klipper/klippy/klippy.py /home/pi/klipper_config/printer.cfg -l /tmp/klippy.log -a /tmp/klippy_uds"
```
Save the file with `CTRL+O` and close the editor with `CTRL+X`.
You have to create the directories for your klipper configuration and the virtual_sdcard directory:
```bash
mkdir ~/klipper_config
mkdir ~/gcode_files
```
Move your printer.cfg to ~/klipper_config and check if the following entries are present in the config.
```ini
[virtual_sdcard]
# for gcode upload
path: ~/gcode_files
[display_status]
# for display messages in status panel
[pause_resume]
# for pause/resume functionality.
# Mainsail needs gcode macros for `PAUSE`, `RESUME` and `CANCEL_PRINT` to make the buttons work.
```
> ℹ️ **These entries are very important.**
For the full functionality of mainsail, you should also define gcode macros for `PAUSE`, `RESUME` and `CANCEL_PRINT`. You'll find further information in [this](../../necessary-cfg.md){: target="_blank"} document.
After your config is in place, restart klipper with `sudo service klipper restart`. Check the `/tmp/klippy.log` for errors, if Klipper starts correctly you can continue the guide.
---
[< previous step](operating-system.md){: .btn } [next step >](moonraker.md){: .btn}
+175
View File
@@ -0,0 +1,175 @@
---
layout: default
title: Mainsail
parent: Manual Setup Guide
grand_parent: Setup Guides
nav_order: 5
permalink: /setup/manual-setup/mainsail
---
## Mainsail
### Install webserver & reverse proxy (nginx)
nginx is important to mount all components on port 80 and host the static files from Mainsail. To install nginx you only need to execute:
`sudo apt install nginx`
now we create the config files with:
```
sudo touch /etc/nginx/sites-available/mainsail
sudo touch /etc/nginx/conf.d/upstreams.conf
sudo touch /etc/nginx/conf.d/common_vars.conf
```
Each file can be filled with the following content:
`sudo nano /etc/nginx/conf.d/upstreams.conf`
```
# /etc/nginx/conf.d/upstreams.conf
upstream apiserver {
#if you need to change your api port, edit it here
ip_hash;
server 127.0.0.1:7125;
}
upstream mjpgstreamer {
#if you need to change your webcam port, edit it here
ip_hash;
server 127.0.0.1:8080;
}
```
Save the file with `CTRL+O` and close the editor with `CTRL+X`.
`sudo nano /etc/nginx/conf.d/common_vars.conf`
```
# /etc/nginx/conf.d/common_vars.conf
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
```
Save the file with `CTRL+O` and close the editor with `CTRL+X`.
`sudo nano /etc/nginx/sites-available/mainsail`
```
# /etc/nginx/sites-available/mainsail
server {
listen 80 default_server;
listen [::]:80 default_server;
access_log /var/log/nginx/mainsail-access.log;
error_log /var/log/nginx/mainsail-error.log;
#disable this section on smaller hardware like a pi zero
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_proxied expired no-cache no-store private auth;
gzip_comp_level 4;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/json application/xml;
#web_path from mainsail static files
root /home/pi/mainsail;
index index.html;
server_name _;
#disable max upload size
client_max_body_size 0;
location / {
try_files $uri $uri/ /index.html;
}
location = /index.html {
add_header Cache-Control "no-store, no-cache, must-revalidate";
}
location /websocket {
proxy_pass http://apiserver/websocket;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 86400;
}
location ~ ^/(printer|api|access|machine|server)/ {
proxy_pass http://apiserver$request_uri;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
}
location /webcam/ {
proxy_pass http://mjpgstreamer/;
}
}
```
Save the file with `CTRL+O` and close the editor with `CTRL+X`.
Create directory for static files and active nginx config:
```
mkdir ~/mainsail
sudo rm /etc/nginx/sites-enabled/default
sudo ln -s /etc/nginx/sites-available/mainsail /etc/nginx/sites-enabled/
sudo service nginx restart
```
Now you can check again the API if it works with the reverse proxy. Open the url http://\<printer-ip\>/printer/info in your browser. if you see a content like this:
```
{"result": {"hostname": "voron250", "error_detected": false, "version": "v0.8.0-479-gd586fb06", "is_ready": true, "message": "Printer is ready", "cpu": "4 core ARMv7 Processor rev 4 (v7l)"}}
```
Now we can install Mainsail (static httpdocs).
### Install httpdocs
Now you can download the current mainsail static data
```
cd ~/mainsail
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/latest/download/mainsail.zip && unzip mainsail.zip && rm mainsail.zip
```
Now it should be possible to open the interface: `http://<printer-ip>/`.
### Important macros
if you want to get the full experience with mainsail and klipper virtual_sdcard print, you should use these macros, or use them as templates for your own.
[Macro Link](../../necessary-cfg.md){: .btn target="_blank"}
### Change the Hostname (optional)
to use the hostname instate of the ip, you can install the avahi-daemon:
`sudo apt install avahi-daemon`
and you can config your hostname:
`sudo raspi-config`
in 2 Network Options > N1 Hostname you can edit your hostname of your raspberry pi. After a reboot you can use http://\<hostname\>.local/ to open the webinterface.
---
[< previous step](moonraker.md){: .btn }
@@ -0,0 +1,83 @@
---
layout: default
title: Moonraker
parent: Manual Setup Guide
grand_parent: Setup Guides
nav_order: 4
permalink: /setup/manual-setup/moonraker
---
## Moonraker
Moonraker is a web server that exposes APIs which lets Mainsail interact with Klipper.
### Installation
Clone Moonraker into your HOME directory:
```bash
cd ~
git clone https://github.com/Arksine/moonraker.git
```
Run Moonrakers install script:
```bash
cd ~/moonraker/scripts
./install-moonraker.sh -c /home/pi/klipper_config/moonraker.conf
```
### Configuration
> ⚠️ **Please pay attention to the following steps!**
Misconfigured trusted_clients are a very common source of failure.
For Moonraker you'll need to create a separate config file.
`nano ~/klipper_config/moonraker.conf`
Insert the following part and modify `trusted_clients` according to arksines description below.
Also consider further IP ranges, e.g. when connecting via VPN. To determine your local ip `ip a` and `ifconfig -a` are common ways to do so on Linux and `ipconfig` on Windows.
> ℹ️ **This is a very basic config**
For more options and detailed explanations you should follow [arksines instructions](https://github.com/Arksine/moonraker/blob/master/docs/installation.md).
```
[server]
host: 0.0.0.0
config_path: ~/klipper_config
[authorization]
enabled: true
trusted_clients:
192.168.1.0/24
2a02:810d:9340:33f6::/64
[update_manager]
client_repo: meteyou/mainsail
client_path: ~/mainsail
```
> 🔥 **trusted_clients - read carefully** 🔥
A list of newline separated ip addresses and/or ip ranges that are
trusted. Trusted clients are given full access to the API. Both IPv4
and IPv6 addresses and ranges are supported. Ranges must be expressed
in CIDR notation (see http://ip.sb/cidr for more info).
For example, an entry of 192.168.1.0/24 will authorize IPs in the range of 192.168.1.1 -
192.168.1.254. Note that when specifying IPv4 ranges the last segment
of the ip address must be 0. The default is no clients or ranges are
trusted.
Save the file with `CTRL+O` and close the editor with `CTRL+X`.
Restart Moonraker
```bash
sudo service moonraker restart
```
Open the following url with your printers IP in your browser
```
http://<printer-ip>:7125/printer/info
```
If everything has been set up successfully, a message like this should appear:
```
{"result": {"hostname": "voron250", "error_detected": false, "version": "v0.8.0-643-g528f9f25", "is_ready": true, "message": "Printer is ready", "cpu": "4 core ARMv7 Processor rev 4 (v7l)"}}
```
---
[< previous step](klipper.md){: .btn } [next step >](mainsail.md){: .btn }
@@ -0,0 +1,31 @@
---
layout: default
title: Operating System
parent: Manual Setup Guide
grand_parent: Setup Guides
nav_order: 2
permalink: /setup/manual-setup/operating-systen
---
## Operation System
> ⚠️ **Please don't use an OctoPi image!**
It can cause unforeseeable events, like rips in the space-time continuum. So be aware!
It is recommended to use a clean Raspberry Pi OS 32-bit Lite image (previously called Raspbian). You can download it [here](https://downloads.raspberrypi.org/raspios_lite_armhf_latest){:target="_blank"}.
For more information about installing Raspberry Pi OS click [here](https://www.raspberrypi.org/documentation/installation/installing-images/){:target="_blank"}. Don't forget to enable ssh.
Once you have finished the installation and are connected via ssh, you can continue.
### Requirements
```bash
sudo apt update && sudo apt upgrade
sudo apt install git dfu-util unzip
```
> ⚠️ **Moonraker requires Python 3.7 or greater,** verify that your distribution's Python 3 packages meet this requirement.
```
python3 --version
```
---
[< table of contents](index.md){: .btn } [next step >](klipper.md){: .btn }
+9
View File
@@ -0,0 +1,9 @@
---
layout: default
title: Update Guide
nav_order: 3
has_children: true
permalink: /update/
---
This is a guide to update up Klipper, Moonraker & Mainsail on your Raspberry Pi.
+23
View File
@@ -0,0 +1,23 @@
---
layout: default
title: Klipper
parent: Update Guide
nav_order: 2
permalink: /update/klipper
---
## Klipper
### Update from Repository
```bash
cd ~/klipper
git pull
```
Restart Klipper (`sudo service klipper restart`) and check the `klippy.log`, if Klipper starts
correctly and then continue the guide.
### Klipper config changes
If you have issues after update your Klipper instance, you can check config changes [here](https://github.com/KevinOConnor/klipper/blob/master/docs/Config_Changes.md).
---
[< table of contents](index.md){: .btn } [next step >](moonraker.md){: .btn}
+25
View File
@@ -0,0 +1,25 @@
---
layout: default
title: Mainsail
parent: Update Guide
nav_order: 4
permalink: /update/mainsail
---
## Mainsail
```bash
cd ~/mainsail
rm -R ./*
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/latest/download/mainsail.zip && unzip mainsail.zip && rm mainsail.zip
```
### Move gui.json from gcodes to klipper_config
This is only necessary if you update from 0.2.2 to 0.2.3 or higher. If you use MainsailOS, the virtual_sdcard directory is `gcode_files` instead of `sdcard`.
```
mv ~/sdcard/gui.json ~/klipper_config/
```
Now it should be possible to open the interface: `http://<printer-ip>/`.
---
[< previous step](moonraker.md){: .btn }
+47
View File
@@ -0,0 +1,47 @@
---
layout: default
title: Moonraker
parent: Update Guide
nav_order: 3
permalink: /update/moonraker
---
## Moonraker
```bash
cd ~/moonraker
git pull
```
Restart Moonraker (`sudo service moonraker restart`) and open the url `http://<printer-ip>:7125/printer/info` in your browser.
If you see a content like this
```
{"result": {"hostname": "voron250", "error_detected": false, "version": "v0.8.0-643-g528f9f25", "is_ready": true, "message": "Printer is ready", "cpu": "4 core ARMv7 Processor rev 4 (v7l)"}}
```
### Add Moonraker update manager
To use the update manager in Mainsail you have to add this in your moonraker.conf:
```
[update_manager]
client_repo: meteyou/mainsail
client_path: ~/mainsail
```
### Change Moonraker to systemd service (December 6th 2020)
Moonraker is now installed as a systemd service. If `moonraker.conf` is not located in the home directory, the command will looks something like the following:
```bash
~/moonraker/scripts/install-moonraker.sh -f -c /home/pi/klipper_config/moonraker.conf
```
This allows logging to stdout which can be viewed with the `journalctl -u moonraker command`.
### Update Moonraker dependence
This is only nessasary, if you see missing modules in the moonraker log.
```bash
~/moonraker/scripts/install-moonraker.sh -r
```
### Moonraker config changes
If you have issues after update your Moonraker instance, you can check config changes [here](https://github.com/Arksine/moonraker/blob/master/docs/user_changes.md).
---
[< previous step](klipper.md){: .btn } [next step >](mainsail.md){: .btn }
+25904 -1930
View File
File diff suppressed because it is too large. Load diff
+33 -30
View File
@@ -1,46 +1,49 @@
{
"name": "kwc",
"version": "0.1.0",
"name": "mainsail",
"version": "1.0.2",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
"build": "vue-cli-service build && npm run build.zip",
"lint": "vue-cli-service lint",
"build.zip": "cd ./dist && zip -r mainsail.zip ./ && cd .."
},
"dependencies": {
"axios": "^0.19.2",
"chart.js": "^2.9.3",
"core-js": "^3.6.4",
"vue": "^2.6.11",
"vue-chartjs": "^3.5.0",
"vue-context": "^5.0.0",
"axios": "^0.21.1",
"core-js": "^3.8.2",
"object-assign-deep": "^0.4.0",
"prismjs": "^1.23.0",
"vue": "^2.6.12",
"vue-context": "^6.0.0",
"vue-github-api": "^0.1.7",
"vue-headful": "^2.1.0",
"vue-json-rpc-websocket": "^1.1.1",
"vue-plotly": "^1.1.0",
"vue-prism-editor": "^1.2.2",
"vue-resource": "^1.5.1",
"vue-simple-upload": "^0.1.6",
"vue-toast-notification": "0.0.3",
"vuetify": "^2.2.17",
"vuetify-toast-snackbar": "^0.6.1",
"vuex": "^3.1.3"
"vue-toast-notification": "^0.6.0",
"vuetify": "^2.4.2",
"vuex": "^3.6.0"
},
"devDependencies": {
"@fortawesome/fontawesome-free": "^5.12.1",
"@mdi/font": "^4.9.95",
"@vue/cli-plugin-babel": "^4.2.3",
"@vue/cli-plugin-eslint": "^4.2.3",
"@vue/cli-service": "^4.2.3",
"@mdi/font": "^5.8.55",
"@vue/cli-plugin-babel": "^4.5.10",
"@vue/cli-plugin-eslint": "^4.5.3",
"@vue/cli-plugin-pwa": "^4.5.10",
"@vue/cli-service": "^4.5.10",
"babel-eslint": "^10.1.0",
"css-loader": "^3.4.2",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"material-design-icons-iconfont": "^5.0.1",
"sass": "^1.26.3",
"sass-loader": "^8.0.2",
"css-loader": "^5.0.1",
"eslint": "^7.17.0",
"eslint-plugin-vue": "^7.4.1",
"generate-file-webpack-plugin": "^1.0.1",
"sass": "^1.32.4",
"sass-loader": "^10.1.1",
"sw-precache-webpack-plugin": "^1.0.0",
"vue-cli-plugin-route": "0.0.7",
"vue-cli-plugin-vuetify": "^1.1.2",
"vue-router": "^3.1.6",
"vue-template-compiler": "^2.6.11",
"vuetify-loader": "^1.4.3"
"vue-cli-plugin-vuetify": "^2.0.9",
"vue-router": "^3.4.9",
"vue-template-compiler": "^2.6.12",
"vuetify-loader": "^1.6.0"
},
"eslintConfig": {
"root": true,
+3
View File
@@ -0,0 +1,3 @@
{
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 546 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

+120
View File
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 599.38 523.11" style="enable-background:new 0 0 599.38 523.11;" xml:space="preserve">
<style type="text/css">
.st0{fill:#E30613;stroke:#009640;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;}
.st1{fill:#D41216;}
.st2{fill:#D41216;stroke:#009640;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;}
.st3{fill:none;stroke:#009640;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;}
.st4{display:none;}
.st5{display:inline;fill:#E73D26;}
.st6{display:inline;fill:none;}
</style>
<g id="Ebene_2">
<g>
<path class="st0" d="M382.29,142.98"/>
<path class="st1" d="M382.29,142.98L132.98,522.82L0,522.68L344.3,0l0,0C352.18,49.06,365.2,97.68,382.29,142.98"/>
<path class="st2" d="M413.28,213.54L208.5,522.92l132.94,0.19l135.03-206.33l0,0C452.69,284.29,431.53,249.77,413.28,213.54
L413.28,213.54"/>
<path class="st3" d="M599.38,447.69"/>
<path class="st3" d="M518.6,369.16"/>
<path class="st1" d="M599.38,447.69l-49.25,75.42L417,522.82l101.6-153.67l0,0C543.48,397.35,570.49,423.61,599.38,447.69
L599.38,447.69z"/>
</g>
</g>
<g id="Ebene_1" class="st4">
<path class="st5" d="M-45.42,426.29c0.34,0.34,97.62,1.14,107.04,0.94c0.94-0.07,1.75-0.74,2.29-2.08
c0.47-1.14,1.08-2.02,1.41-2.02s0.61-0.34,0.61-0.67c0-0.81,2.76-4.91,3.56-5.24c0.27-0.13,0.47-0.61,0.47-1.08
c0-0.74,0.61-1.61,3.29-4.84c0.34-0.47,0.47-1.01,0.27-1.21c-0.27-0.2-0.07-0.4,0.34-0.4c0.47,0,0.81-0.47,0.81-1.01
c0-0.47,0.47-1.21,1.08-1.55c0.61-0.34,1.08-0.87,1.08-1.21c0.07-0.54,3.09-5.58,3.9-6.32c0.2-0.2,0.94-1.41,1.61-2.69
c0.74-1.28,1.48-2.49,1.68-2.69c0.61-0.54,3.43-4.64,3.43-4.98c0-0.2,1.95-3.23,4.37-6.72s4.37-6.66,4.37-7.06
c0-0.34,0.2-0.74,0.54-0.87c0.54-0.27,3.5-4.37,3.5-4.91c0-0.2,0.34-0.74,0.74-1.21c0.34-0.47,2.22-3.23,4.17-6.19
c1.88-2.96,3.56-5.51,3.83-5.71c0.2-0.2,0.74-1.14,1.28-2.15c0.54-1.01,1.48-2.49,2.22-3.16c0.67-0.74,1.21-1.55,1.21-1.68
c0-0.61,12.98-20.17,13.65-20.64c0.34-0.2,0.47-0.61,0.34-0.81c-0.07-0.27,0.27-1.01,0.87-1.68c0.61-0.67,1.61-2.22,2.35-3.36
c0.67-1.21,1.48-2.15,1.82-2.15c0.27,0,0.4-0.27,0.13-0.61c-0.2-0.34,0.07-1.01,0.54-1.55c1.48-1.48,5.18-7.13,5.18-7.87
c0-0.4,0.34-0.74,0.67-0.74c0.4,0,0.67-0.47,0.67-1.01c0-0.54,0.34-1.01,0.67-1.01c0.4,0,0.67-0.4,0.67-0.94
c0-0.54,0.27-1.08,0.54-1.21c0.27-0.13,1.28-1.41,2.15-2.89c0.87-1.48,1.88-3.03,2.15-3.36c1.01-1.21,9.28-13.92,9.28-14.19
c0-0.34,4.24-6.45,5.18-7.46c0.4-0.47,1.01-1.48,1.21-2.22c0.2-0.74,0.67-1.34,1.01-1.34c0.27,0,0.67-0.54,0.94-1.21
c0.4-1.14,1.82-3.56,2.49-4.17c0.2-0.2,2.15-3.16,4.37-6.66c2.15-3.43,4.5-6.86,5.11-7.53c0.67-0.74,1.08-1.28,0.87-1.28
c-0.2,0,0.74-1.48,2.02-3.36c1.28-1.82,2.35-3.63,2.35-4.03c0-0.34,0.2-0.67,0.54-0.67c0.27,0,1.21-1.34,2.15-3.03
c0.94-1.68,1.88-3.03,2.15-3.03c0.34,0,0.54-0.4,0.54-0.87c0-0.54,0.61-1.48,1.34-2.15c0.74-0.67,1.34-1.61,1.34-2.15
c0-0.47,0.34-0.87,0.67-0.87c0.4,0,0.67-0.34,0.67-0.67c0-0.74,3.16-5.85,4.5-7.26c0.4-0.4,1.01-1.41,1.21-2.15
s0.67-1.34,0.94-1.34c0.34,0,0.94-0.87,1.41-2.02c0.47-1.14,1.08-2.02,1.34-2.02c0.27,0,0.87-0.87,1.34-2.02
c0.47-1.14,1.08-2.02,1.34-2.02c0.27,0,0.87-0.94,1.34-2.02c0.47-1.14,1.14-2.02,1.48-2.02s0.4-0.34,0.2-0.67
c-0.2-0.4-0.2-0.67,0.13-0.67c0.27,0,1.41-1.55,2.55-3.36c1.08-1.88,2.22-3.36,2.55-3.36c0.27,0,0.4-0.27,0.2-0.61
c-0.2-0.27,0.2-1.08,0.94-1.75c0.74-0.67,1.34-1.55,1.34-1.95c0-0.4,0.74-1.61,1.68-2.62c0.94-1.01,1.55-1.82,1.41-1.82
c-0.34,0,8.87-14.19,10.35-15.93c0.34-0.47,0.67-1.14,0.67-1.55c0-0.34,0.34-0.67,0.67-0.67c0.4,0,0.67-0.47,0.67-1.01
s0.34-1.01,0.67-1.01c0.4,0,0.67-0.34,0.67-0.67c0-0.4,1.08-2.22,2.35-4.03s2.35-3.5,2.35-3.7s0.61-1.01,1.34-1.82
c0.74-0.81,1.34-1.88,1.34-2.35s0.34-0.87,0.74-0.87c0.34,0,0.54-0.27,0.34-0.54c-0.2-0.34,0.27-0.94,0.94-1.48
c0.67-0.54,1.14-1.14,1.01-1.34c-0.2-0.27,0.27-1.01,1.01-1.68c0.74-0.67,1.34-1.48,1.34-1.75c0-0.27,2.35-4.1,5.24-8.47
c2.96-4.37,8.27-12.51,11.9-18.02c3.63-5.58,6.93-10.29,7.33-10.56c0.4-0.27,0.47-0.54,0.13-0.54c-0.34,0-0.13-0.54,0.4-1.21
c1.01-1.21,1.08-1.75,0.2-3.83c-2.89-6.93-5.04-12.77-5.04-13.51c0-0.54-0.27-0.94-0.67-0.94c-0.34,0-0.61-0.2-0.54-0.54
c0.2-0.87-1.75-6.52-2.42-6.99c-0.4-0.27-0.47-0.67-0.2-0.94s0.2-0.81-0.13-1.21c-0.47-0.67-3.97-10.62-4.37-12.71
c-0.13-0.47-0.4-1.34-0.61-2.02c-0.27-0.61-0.67-1.68-0.94-2.35c-0.2-0.61-0.47-1.61-0.61-2.15c-0.27-1.34-1.61-5.98-2.42-8.14
c-0.34-0.94-0.67-2.35-0.74-3.16c-0.07-0.81-0.27-1.48-0.47-1.48c-0.27,0-0.47-0.4-0.54-0.87c0-0.4-0.2-1.41-0.4-2.15
c-0.2-0.74-1.01-3.9-1.68-7.06c-0.74-3.16-1.34-5.78-1.41-5.92c-0.13-0.07-0.2-0.34-0.27-0.67c-0.34-1.34-1.28-5.92-1.41-6.52
c-0.07-0.4-0.2-0.81-0.27-1.01c-0.2-0.4-0.54-2.22-0.94-5.38c-0.2-1.28-0.54-2.82-0.74-3.43c-0.27-0.61-0.4-1.34-0.34-1.68
c0.07-0.34,0-0.74-0.07-0.94c-0.27-0.67-0.67-3.09-0.94-5.38c-0.13-1.28-0.34-2.35-0.4-2.35c-0.13,0-0.61-3.36-0.74-5.92
c-0.07-1.01-0.4-2.02-0.74-2.22s-0.27-0.81,0.13-1.28c1.48-1.75-0.54-1.61-2.08,0.2l0,0c-0.87,1.01-2.22,2.96-2.96,4.37
c-0.74,1.48-1.95,3.29-2.69,4.1c-0.74,0.81-1.95,2.62-2.69,4.03c-0.74,1.34-1.82,3.03-2.42,3.63c-0.54,0.61-1.61,2.22-2.35,3.5
c-1.48,2.69-1.68,2.96-3.97,5.78c-0.94,1.21-1.68,2.35-1.68,2.55c0,0.47-6.66,10.56-7.33,11.16c-0.2,0.2-1.01,1.41-1.68,2.69
c-0.74,1.28-1.48,2.49-1.68,2.69c-0.47,0.4-8.27,12.03-8.81,13.11 M294.17,171.07c-0.74,1.14-1.82,2.76-2.35,3.56
c-0.54,0.81-1.68,2.55-2.49,3.83c-1.88,2.82-2.22,3.36-5.58,8.2c-1.48,2.15-2.69,4.03-2.69,4.24s-0.34,0.67-0.74,1.14
c-0.34,0.47-4.24,6.25-8.67,12.91c-4.37,6.66-8.27,12.44-8.67,12.91c-0.4,0.47-0.74,0.94-0.74,1.14c0,0.61-4.3,6.79-4.84,6.99
c-0.27,0.13-0.54,0.67-0.54,1.21s-0.34,0.94-0.74,0.94c-0.34,0-0.54,0.27-0.34,0.61c0.27,0.34,0.2,0.74-0.07,0.87
c-0.81,0.34-4.91,6.39-4.91,7.19c0,0.34-0.54,1.01-1.14,1.34c-0.67,0.4-0.94,0.74-0.67,0.74s-0.07,0.67-0.87,1.48
c-0.74,0.81-1.34,1.88-1.34,2.35s-0.2,0.87-0.47,0.87c-0.34,0-1.41,1.55-2.55,3.43c-1.08,1.88-2.29,3.77-2.69,4.24
c-1.34,1.61-3.7,5.04-3.7,5.45c0,0.27-0.4,0.87-0.81,1.34c-1.95,2.15-2.49,2.89-2.22,3.16c0.13,0.13-0.47,1.14-1.34,2.15
c-0.94,1.08-1.68,2.15-1.68,2.42s-0.61,1.14-1.34,2.02s-1.34,1.95-1.34,2.49s-0.27,0.81-0.61,0.61c-0.34-0.2-0.81,0.34-1.01,1.28
c-0.27,0.94-0.74,1.68-1.08,1.68c-0.4,0-0.67,0.34-0.67,0.67c0,0.81-2.76,4.91-3.5,5.24c-0.34,0.13-0.54,0.54-0.54,0.81
c0,0.81-4.17,6.99-4.84,7.26c-0.27,0.13-0.54,0.54-0.54,0.94c0,0.74-4.1,6.79-4.84,7.13c-0.34,0.13-0.54,0.54-0.54,0.87
c0,0.94-4.91,8-5.58,8c-0.27,0-0.4,0.27-0.13,0.61c0.2,0.34-0.07,1.01-0.47,1.55c-0.47,0.47-2.55,3.43-4.57,6.59
c-2.02,3.16-3.83,5.85-4.03,6.05c-0.4,0.4-2.89,4.03-3.36,5.04c-1.01,1.95-31.26,47.13-31.87,47.53c-0.4,0.27-0.47,0.54-0.13,0.54
c0.34,0,0.07,0.67-0.67,1.48c-1.61,1.82-4.77,6.72-4.84,7.46c0,0.34-0.74,1.14-1.55,1.88c-0.81,0.67-1.21,1.28-0.94,1.28
c0.34,0-0.13,0.74-1.01,1.68s-1.28,1.68-0.94,1.68s0.27,0.27-0.07,0.54c-0.94,0.67-3.83,4.77-4.98,6.99
c-0.54,1.08-1.21,1.88-1.55,1.88c-0.27,0-0.54,0.27-0.54,0.67c0,0.34-1.01,2.08-2.22,3.83c-1.28,1.82-2.49,3.77-2.69,4.37
c-0.27,0.67-0.74,1.21-1.14,1.21c-0.34,0-0.67,0.47-0.67,1.01c0,0.54-0.27,1.01-0.67,1.01c-0.34,0-0.67,0.27-0.67,0.61
c0,0.4-2.29,4.03-5.11,8.14c-2.76,4.17-4.91,7.66-4.77,7.87c0.34,0.27,33.68,0.67,83.44,0.87c22.79,0.13,24.14,0.07,25.21-1.14
c1.21-1.48,2.55-3.43,3.23-4.91c0.27-0.54,1.01-1.61,1.68-2.29c0.61-0.67,1.01-1.55,0.81-1.88c-0.2-0.27-0.07-0.54,0.34-0.54
s1.21-1.01,1.82-2.22c0.61-1.14,1.34-2.29,1.61-2.49c0.2-0.2,1.48-2.08,2.76-4.24c1.21-2.08,2.49-3.83,2.76-3.83
c0.34,0,0.54-0.47,0.54-1.01c0-0.54,0.34-1.01,0.74-1.01c0.34,0,0.54-0.27,0.34-0.61c-0.27-0.34-0.2-0.74,0.07-0.87
c0.81-0.34,3.56-4.44,3.56-5.24c0-0.34,0.34-0.67,0.67-0.67c0.4,0,0.67-0.47,0.67-1.01c0-0.54,0.27-1.01,0.54-1.01
c0.34,0,0.94-0.67,1.41-1.55c0.4-0.81,1.34-2.42,2.08-3.5c0.74-1.14,1.68-2.69,2.08-3.56c0.47-0.81,1.08-1.48,1.41-1.48
c0.27,0,0.54-0.4,0.54-0.87c0-0.47,0.54-1.48,1.21-2.22c0.61-0.67,1.55-2.08,2.08-3.09c0.54-1.01,1.61-2.55,2.35-3.36
c0.81-0.81,1.41-1.68,1.34-1.88c-0.07-0.47,6.05-9.68,6.66-9.95c0.27-0.13,0.47-0.54,0.47-0.87c0-0.54,5.85-9.88,6.72-10.69
c0.2-0.2,1.41-2.02,2.69-4.03c1.28-2.02,2.62-3.9,3.03-4.17c0.34-0.27,0.4-0.54,0.13-0.54c-0.34,0-0.13-0.47,0.34-1.01
c2.08-2.29,2.42-2.89,2.08-3.29c-0.27-0.2-0.07-0.4,0.34-0.4c0.47,0,0.81-0.4,0.81-0.94c0-0.54,0.27-1.08,0.54-1.21
c0.34-0.13,1.95-2.35,3.56-4.91c1.61-2.62,3.16-4.84,3.43-4.91c0.27-0.13,0.54-0.54,0.54-0.87c0-0.34,1.08-2.15,2.35-3.97
c1.28-1.82,2.35-3.5,2.35-3.77c0-0.2,0.4-0.74,0.87-1.28c0.4-0.47,2.89-4.17,5.51-8.2c2.55-3.97,4.91-7.4,5.18-7.46
c0.34-0.13,0.4-0.54,0.13-0.87c-0.2-0.34,0.13-0.81,0.67-1.01c0.61-0.2,1.08-0.74,1.08-1.08c0-0.4,1.08-2.22,2.35-3.97
c1.28-1.82,2.35-3.43,2.35-3.5c0-0.27,11.16-17.28,11.97-18.29c0.27-0.4,1.14-1.75,1.88-3.03c0.67-1.28,1.68-2.62,2.15-2.89
c0.4-0.27,0.81-0.87,0.81-1.21c0-0.4,0.74-1.68,1.68-2.89c0.94-1.21,1.68-2.55,1.68-2.96c0-0.47,0.27-0.81,0.54-0.81
c0.34,0,0.94-0.74,1.34-1.61c0.61-1.34,0.34-2.02-1.95-5.04c-1.41-1.88-2.35-3.43-2.08-3.43s0.13-0.27-0.27-0.54
c-0.87-0.54-6.99-9.48-6.99-10.22c0-0.27-0.61-1.01-1.34-1.68c-0.74-0.67-1.34-1.61-1.34-2.15c0-0.47-0.27-0.87-0.67-0.87
c-0.34,0-0.67-0.4-0.67-0.94c0-0.54-0.27-1.08-0.54-1.21c-0.54-0.2-6.19-9.01-6.19-9.61c0-0.2-0.61-1.01-1.34-1.82
c-0.74-0.81-1.34-1.88-1.34-2.35s-0.27-0.87-0.67-0.87c-0.34,0-0.67-0.27-0.67-0.61c0-0.4-0.87-2.02-2.02-3.63
c-1.08-1.68-2.02-3.36-2.02-3.77c0-0.4-0.27-0.74-0.61-0.74s-0.74-0.54-0.94-1.21c-0.4-1.14-2.49-4.84-3.16-5.51
c-0.2-0.2-1.08-1.68-1.95-3.36c-0.94-1.68-1.82-3.16-2.02-3.36c-0.27-0.2-0.81-1.08-1.21-2.02c-0.47-0.94-2.22-4.1-3.9-7.06
c-1.75-2.96-3.29-5.92-3.5-6.59c-0.2-0.61-0.61-1.14-0.87-1.14c-0.54,0-2.29-3.97-2.08-4.91
C296.66,168.25,295.38,169.19,294.17,171.07L294.17,171.07z M379.36,300.09c-0.81,1.08-1.48,2.22-1.41,2.42
c0,0.27-0.2,0.67-0.54,0.87c-0.94,0.67-8.94,12.71-8.94,13.51c0,0.34-0.2,0.67-0.47,0.67c-0.34,0-1.61,1.82-2.89,4.03
s-2.55,4.03-2.82,4.03c-0.34,0-0.54,0.4-0.54,0.94c0,0.54-0.2,1.08-0.47,1.21c-0.74,0.27-4.24,5.71-4.24,6.52
c0,0.34-0.47,0.74-1.01,1.01c-0.54,0.2-1.01,0.81-1.01,1.34c0,0.54-0.2,1.08-0.54,1.21c-0.27,0.07-1.55,1.88-2.82,3.9
c-1.28,2.02-2.49,3.83-2.69,4.03s-1.14,1.55-2.02,3.03c-0.87,1.48-2.02,3.09-2.42,3.56c-0.47,0.4-1.08,1.41-1.28,2.15
c-0.2,0.74-0.74,1.34-1.14,1.34c-0.4,0-0.61,0.2-0.34,0.4c0.2,0.27,0.07,0.81-0.4,1.28c-0.47,0.47-1.21,1.41-1.61,2.08
c-0.47,0.74-2.22,3.36-3.9,5.85c-1.68,2.55-3.03,4.91-3.03,5.24c0,0.34-0.27,0.61-0.54,0.61c-0.34,0-1.01,0.81-1.55,1.82
c-0.54,1.08-1.14,2.02-1.34,2.22s-3.36,4.84-6.99,10.42c-3.63,5.51-6.86,10.22-7.13,10.29c-0.34,0.13-0.47,0.54-0.2,0.87
c0.2,0.34,0,0.61-0.34,0.61c-0.4,0-0.74,0.47-0.74,1.01c0,0.61-0.47,1.21-1.01,1.41c-0.54,0.27-0.81,0.67-0.61,1.01
c0.2,0.34,0,0.61-0.34,0.61c-0.4,0-0.74,0.34-0.74,0.74s-0.54,1.41-1.14,2.29c-1.41,1.82-1.41,1.82-8.2,12.1
c-2.96,4.44-5.71,8.47-6.12,8.94c-0.54,0.61,0.4,0.81,4.5,0.87c13.31,0.13,60.58,0.54,80.81,0.61l22.39,0.13l1.61-1.88
c0.87-1.08,1.55-2.22,1.61-2.49c0-0.27,0.61-1.14,1.34-1.95c0.74-0.81,1.34-1.88,1.34-2.35s0.34-0.87,0.74-0.87
c0.34,0,0.54-0.27,0.34-0.54c-0.2-0.34,0.27-0.94,0.94-1.48c0.67-0.54,1.14-1.14,1.01-1.34c-0.2-0.27,0.27-1.01,1.01-1.68
c0.74-0.67,1.34-1.55,1.34-1.88c0-0.4,0.74-1.68,1.68-2.82c0.87-1.21,1.41-2.35,1.21-2.62c-0.27-0.2-0.13-0.4,0.27-0.4
c0.4,0,2.89-3.5,5.58-7.73c2.69-4.24,5.51-8.34,6.19-9.08s1.08-1.34,0.94-1.34c-0.54,0,7.73-12.3,8.61-12.91
c0.4-0.27,0.47-0.54,0.2-0.54c-0.34,0,0.07-0.81,0.81-1.75c0.81-1.01,1.41-2.22,1.41-2.76c0-0.81-3.03-4.24-11.56-13.11
c-1.82-1.82-3.23-3.43-3.23-3.56c0-0.13-0.67-1.01-1.48-1.82c-1.48-1.48-6.19-6.86-11.36-12.91c-1.28-1.41-2.89-3.23-3.63-4.03
c-1.08-1.14-4.57-5.18-9.41-10.89c-1.01-1.21-4.17-5.04-11.43-14.05C380.23,296.93,381.11,297.67,379.36,300.09L379.36,300.09z"/>
<line class="st6" x1="108.71" y1="523.11" x2="108.7" y2="523.11"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

+2 -5
View File
@@ -4,14 +4,11 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico" id="favicon" />
<title>KlipperWebControl</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css">
<title>Mainsail</title>
</head>
<body>
<noscript>
<strong>We're sorry but kwc doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
<strong>We're sorry but Mainsail doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
+319 -90
View File
@@ -1,27 +1,65 @@
<style>
@import './assets/styles/fonts.css';
@import './assets/styles/toastr.css';
.button-min-width-auto {
min-width: auto !important;
}
#page-container {
max-width: 1400px;
}
#sidebarVersions {
position: absolute;
left: 0;
bottom: 0;
}
</style>
<template>
<v-app>
<vue-headful
:title="getTitle"
/>
<vue-headful :title="getTitle" />
<v-navigation-drawer
class="sidebar-wrapper" persistent v-model="drawer" enable-resize-watcher fixed app
:src="require('./assets/bg-navi.jpg')"
:src="sidebarBackground"
>
<div id="nav-header">
<img :src="require('./assets/logo.svg')" />
<v-toolbar-title>{{ hostname }}</v-toolbar-title>
<img :src="sidebarLogo" />
<v-toolbar-title>{{ printername !== "" ? printername : hostname }}</v-toolbar-title>
</div>
<ul class="navi" :expand="$vuetify.breakpoint.mdAndUp">
<li v-for="(category, index) in routes" :key="index" :prepend-icon="category.icon" :class="[category.path !== '/' && currentPage.includes(category.path) ? 'active' : '', 'nav-item']" :value="true">
<router-link slot="activator" class="nav-link" exact :to="category.path" @click.prevent>
<printer-selecter></printer-selecter>
<li v-for="(category, index) in routes" :key="index" :prepend-icon="category.icon"
:class="[category.path !== '/' && currentPage.includes(category.path) ? 'active' : '', 'nav-item']"
:value="true"
>
<router-link
slot="activator" class="nav-link" exact :to="category.path" @click.prevent
v-if="
(category.title === 'Webcam' && boolNaviWebcam) ||
(category.title === 'Heightmap' && boolNaviHeightmap) || (
category.title !== 'Webcam' &&
category.title !== 'Heightmap' &&
(klippy_state !== 'error' || category.alwaysShow)
)
">
<v-icon>mdi-{{ category.icon }}</v-icon>
<span class="nav-title">{{ category.title }}</span>
<v-badge
dot
color="warning"
style="top: -9px; left: -16px;"
v-if="category.title === 'Settings' && isUpdateAvailable"
></v-badge>
<span class="nav-title">
{{ category.title }}
</span>
<v-icon class="nav-arrow" v-if="category.children && category.children.length > 0">mdi-chevron-down</v-icon>
</router-link>
<ul class="child">
<li v-for="(page, pageIndex) in category.children" class="nav-item" v-bind:key="`${index}-${pageIndex}`">
<router-link :to="page.path" class="nav-link" @click.prevent>
<router-link :to="page.path" class="nav-link" @click.prevent v-if="klippy_state !== 'error' || page.alwaysShow">
<v-icon>mdi-{{ page.icon }}</v-icon>
<span class="nav-title">{{ page.title }}</span>
</router-link>
@@ -29,106 +67,260 @@
</ul>
</li>
</ul>
<p id="sidebarVersions" class="mb-0 text-body-2 pl-3 pb-2">
v{{ getVersion }}<span class="" v-if="klipperVersion"> - {{ klipperVersion.substr(0, klipperVersion.lastIndexOf('-')) }}</span>
</p>
</v-navigation-drawer>
<v-app-bar app absolute
elevate-on-scroll>
<v-app-bar app elevate-on-scroll>
<v-app-bar-nav-icon @click.stop="drawer = !drawer"></v-app-bar-nav-icon>
<v-spacer></v-spacer>
<!--<v-btn color="green" v-if="!isConnected" :loading="loadingEmergencyStop" @click="emergencyStop"><v-icon class="mr-2">mdi-refresh-circle</v-icon> reconnect</v-btn>-->
<v-btn color="error" v-if="isConnected" :loading="loadingEmergencyStop" @click="emergencyStop">Emergency Stop</v-btn>
<input type="file" ref="fileUploadAndStart" accept=".gcode" style="display: none" @change="uploadAndStart" />
<v-btn color="primary" class="mr-5 d-none d-sm-flex" v-if="isConnected && save_config_pending" :disabled="['printing', 'paused'].includes(printer_state)" :loading="loadings.includes['topbarSaveConfig']" @click="clickSaveConfig">SAVE CONFIG</v-btn>
<v-btn color="primary" class="mr-5 d-none d-sm-flex" v-if="isConnected && ['standby', 'complete'].includes(printer_state)" :loading="loadings.includes['btnUploadAndStart']" @click="btnUploadAndStart"><v-icon class="mr-2">mdi-file-upload</v-icon>Upload & Print</v-btn>
<v-btn color="error" class="button-min-width-auto px-3" v-if="isConnected" :loading="loadings.includes['topbarEmergencyStop']" @click="clickEmergencyStop"><v-icon class="mr-sm-2">mdi-alert-circle-outline</v-icon><span class="d-none d-sm-flex">Emergency Stop</span></v-btn>
<top-corner-menu></top-corner-menu>
</v-app-bar>
<v-content id="content">
<v-main id="content">
<v-scroll-y-transition>
<v-container fluid id="page-container" class="container">
<v-container fluid id="page-container" class="container px-3 px-sm-6 py-sm-6 mx-auto">
<keep-alive>
<router-view></router-view>
</keep-alive>
</v-container>
</v-scroll-y-transition>
</v-content>
</v-main>
<v-dialog v-model="isConnecting" persistent width="300">
<v-card color="primary" dark >
<v-card-text class="pt-2">
Connecting to Klipper
<v-progress-linear indeterminate color="white" class="mb-0"></v-progress-linear>
</v-card-text>
</v-card>
</v-dialog>
<v-snackbar
:timeout="-1"
:value="true"
fixed
right
bottom
dark
v-model="uploadSnackbar.status"
>
<strong>Uploading {{ uploadSnackbar.filename }}</strong><br />
{{ Math.round(uploadSnackbar.percent) }} % @ {{ formatFilesize(Math.round(uploadSnackbar.speed)) }}/s<br />
<v-progress-linear class="mt-2" :value="uploadSnackbar.percent"></v-progress-linear>
<template v-slot:action="{ attrs }">
<v-btn
color="red"
text
v-bind="attrs"
@click="cancelUpload"
style="min-width: auto;"
>
<v-icon class="0">mdi-close</v-icon>
</v-btn>
</template>
</v-snackbar>
<v-footer app class="d-block">
<span v-if="version">{{ version }}</span>
<span class="float-right">&copy; 2020</span>
</v-footer>
<select-printer-dialog v-if="remoteMode"></select-printer-dialog>
<connecting-dialog v-if="!remoteMode"></connecting-dialog>
<update-dialog></update-dialog>
</v-app>
</template>
<script>
import routes from './routes';
import { mapState, mapGetters } from 'vuex';
import routes from './routes'
import { mapState, mapGetters } from 'vuex'
import TopCornerMenu from "@/components/TopCornerMenu"
import UpdateDialog from "@/components/UpdateDialog"
import ConnectingDialog from "@/components/ConnectingDialog";
import SelectPrinterDialog from "@/components/SelectPrinterDialog";
import PrinterSelecter from "@/components/PrinterSelecter"
import axios from "axios";
export default {
props: {
source: String,
},
components: {
PrinterSelecter,
ConnectingDialog,
SelectPrinterDialog,
UpdateDialog,
TopCornerMenu,
},
data: () => ({
drawer: null,
activeClass: 'active',
routes: routes
routes: routes.filter((element) => element.title !== "Printers"),
boolNaviHeightmap: false,
uploadSnackbar: {
status: false,
filename: "",
percent: 0,
speed: 0,
total: 0,
cancelTokenSource: "",
lastProgress: {
time: 0,
loaded: 0
}
}
}),
created () {
this.$vuetify.theme.dark = true,
this.$socket.onOpen = () => {
this.$socket.sendObj('get_printer_info', {}, 'getKlipperInfo');
this.$socket.sendObj('get_printer_objects', {}, 'getObjectInfo');
this.$socket.sendObj('get_printer_status', { heater: [] }, 'getObjectInfo');
this.$socket.sendObj('get_printer_status', { configfile: ['config'] }, 'getPrinterConfig');
this.$socket.sendObj('post_printer_subscriptions', {
gcode: [],
toolhead: [],
virtual_sdcard: [],
heater: [],
heater_bed: [],
extruder: ["temperature", "target"],
fan: [],
pause_resume: [],
idle_timeout: [],
});
this.$socket.sendObj('get_printer_files', {}, 'getFileList');
}
this.$vuetify.theme.dark = true;
this.boolNaviHeightmap = (typeof(this.config.bed_mesh) !== "undefined");
},
computed: {
currentPage: function() {
return this.$route.fullPath;
},
...mapState({
toolhead: state => state.printer.toolhead,
hostname: state => state.printer.hostname,
version: state => state.printer.version,
loadingEmergencyStop: state => state.socket.loadingEmergencyStop,
isConnected: state => state.socket.isConnected,
isConnecting: state => !state.socket.isConnected,
progress: state => state.printer.virtual_sdcard.progress,
hostname: state => state.printer.hostname,
apiHost: state => state.socket.hostname,
apiPort: state => state.socket.port,
klippy_state: state => state.server.klippy_state,
printer_state: state => state.printer.print_stats.state,
loadings: state => state.socket.loadings,
toolhead: state => state.printer.toolhead,
printername: state => state.gui.general.printername,
virtual_sdcard: state => state.printer.virtual_sdcard,
current_file: state => state.printer.print_stats.filename,
boolNaviWebcam: state => state.gui.webcam.bool,
config: state => state.printer.configfile.config,
save_config_pending: state => state.printer.configfile.save_config_pending,
klipperVersion: state => state.printer.software_version,
remoteMode: state => state.socket.remoteMode,
}),
...mapGetters([
'getTitle'
])
'getTitle',
'getVersion',
'server/updateManager/isUpdateAvailable',
]),
print_percent: {
get() {
return this.$store.getters["printer/getPrintPercent"]
}
},
defaultFavicons: {
get() {
return this.$store.getters["files/getFavicons"]
}
},
sidebarLogo: {
get() {
return this.$store.getters["files/getSidebarLogo"]
}
},
sidebarBackground: {
get() {
return this.$store.getters["files/getSidebarBackground"]
}
},
customStylesheet: {
get() {
return this.$store.getters["files/getCustomStylesheet"]
}
},
isUpdateAvailable: {
get() {
return this.$store.getters["server/updateManager/isUpdateAvailable"]
}
}
},
methods: {
emergencyStop: function() {
this.$store.commit('setLoadingEmergencyStop', true);
this.$socket.sendObj('post_printer_gcode', {script: 'M112'}, 'setLoadingEmergencyStop');
clickEmergencyStop: function() {
this.$store.commit('socket/addLoading', { name: 'topbarEmergencyStop' });
this.$socket.sendObj('printer.emergency_stop', {}, 'socket/removeLoading',{ name: 'topbarEmergencyStop' });
},
clickSaveConfig: function() {
this.$store.commit('server/addEvent', { message: "SAVE_CONFIG", type: "command" });
this.$store.commit('socket/addLoading', { name: 'topbarSaveConfig' });
this.$socket.sendObj('printer.gcode.script', { script: "SAVE_CONFIG" }, 'socket/removeLoading', { name: 'topbarSaveConfig' });
},
btnUploadAndStart: function() {
this.$refs.fileUploadAndStart.click()
},
async uploadAndStart() {
if (this.$refs.fileUploadAndStart.files.length) {
this.$store.commit('socket/addLoading', { name: 'btnUploadAndStart' })
let successFiles = []
for (const file of this.$refs.fileUploadAndStart.files) {
const result = await this.doUploadAndStart(file)
successFiles.push(result)
}
this.$store.commit('socket/removeLoading', { name: 'gcodeUpload' })
for(const file of successFiles) {
this.$toast.success("Upload of "+file+" successful!")
}
this.$refs.fileUploadAndStart.value = ''
this.$router.push("/");
}
},
doUploadAndStart(file) {
let toast = this.$toast
let formData = new FormData()
let filename = file.name.replace(" ", "_")
this.uploadSnackbar.filename = filename
this.uploadSnackbar.status = true
this.uploadSnackbar.percent = 0
this.uploadSnackbar.speed = 0
this.uploadSnackbar.lastProgress.loaded = 0
this.uploadSnackbar.lastProgress.time = 0
formData.append('file', file, filename)
formData.append('print', true)
return new Promise(resolve => {
this.uploadSnackbar.cancelTokenSource = axios.CancelToken.source();
axios.post('//' + this.apiHost + ':' + this.apiPort + '/server/files/upload',
formData, {
cancelToken: this.uploadSnackbar.cancelTokenSource.token,
headers: { 'Content-Type': 'multipart/form-data' },
onUploadProgress: (progressEvent) => {
this.uploadSnackbar.percent = (progressEvent.loaded * 100) / progressEvent.total
if (this.uploadSnackbar.lastProgress.time) {
const time = progressEvent.timeStamp - this.uploadSnackbar.lastProgress.time
const data = progressEvent.loaded - this.uploadSnackbar.lastProgress.loaded
if (time) this.uploadSnackbar.speed = data / (time / 1000)
}
this.uploadSnackbar.lastProgress.time = progressEvent.timeStamp
this.uploadSnackbar.lastProgress.loaded = progressEvent.loaded
this.uploadSnackbar.total = progressEvent.total
}
}
).then((result) => {
this.uploadSnackbar.status = false
resolve(result.data.result)
}).catch(() => {
this.uploadSnackbar.status = false
this.$store.commit('socket/removeLoading', { name: 'btnUploadAndStart' })
toast.error("Cannot upload the file!")
})
})
},
cancelUpload: function() {
this.uploadSnackbar.cancelTokenSource.cancel()
this.uploadSnackbar.status = false
},
formatFilesize(fileSizeInBytes) {
let i = -1
let byteUnits = [' kB', ' MB', ' GB', ' TB', 'PB', 'EB', 'ZB', 'YB']
do {
fileSizeInBytes = fileSizeInBytes / 1024
i++
} while (fileSizeInBytes > 1024)
return Math.max(fileSizeInBytes, 0.1).toFixed(1) + byteUnits[i]
},
drawFavicon(val) {
let favicon = document.getElementById('favicon');
if (val === 0) favicon.href = "/favicon.ico";
else {
let favicon16 = document.querySelector("link[rel*='icon'][sizes='16x16']")
let favicon32 = document.querySelector("link[rel*='icon'][sizes='32x32']")
if (val > 0 && val < 100) {
let faviconSize = 64;
let canvas = document.createElement('canvas');
@@ -138,7 +330,7 @@ export default {
let centerX = canvas.width / 2;
let centerY = canvas.height / 2;
let radius = 32;
let percent = val * 100;
let percent = (val * 100).toFixed(0);
/* draw the grey circle */
context.beginPath();
@@ -166,28 +358,62 @@ export default {
context.fillStyle = "#e41313";
context.fill();
favicon.href = canvas.toDataURL('image/png');
favicon16.href = canvas.toDataURL('image/png')
favicon32.href = canvas.toDataURL('image/png')
} else {
const [favicon16Default, favicon32Default] = this.defaultFavicons
favicon16.href = favicon16Default
favicon32.href = favicon32Default
}
}
},
watch: {
progress: {
handler: function(val) {
this.drawFavicon(val);
print_percent() {
this.drawFavicon(this.print_percent);
},
current_file: {
handler: function(newVal) {
this.$socket.sendObj("server.files.metadata", { filename: newVal }, "files/getMetadataCurrentFile");
}
},
config() {
this.boolNaviHeightmap = (typeof(this.config.bed_mesh) !== "undefined");
},
customStylesheet(newVal) {
if (newVal !== null) {
let style = document.getElementById("customStylesheet")
if (!style) {
style = document.createElement('link')
style.id = "customStylesheet"
style.type = "text/css"
style.rel = "stylesheet"
}
style.href = newVal
document.head.appendChild(style)
} else {
let style = document.getElementById("customStylesheet")
if (style) style.remove()
}
},
defaultFavicons() {
this.drawFavicon(this.print_percent);
}
}
},
}
</script>
<style>
.sidebar-wrapper:before {
body {
background: #121212;
}
/*.sidebar-wrapper:before {
position: absolute;
content: ' ';
top: 0; right: 0; bottom: 0; left: 0;
background: #000;
opacity: .7;
}
opacity: .5;
}*/
#nav-header {
text-align: center;
@@ -224,7 +450,7 @@ export default {
margin: 0;
}
nav ul.navi a.nav-link {
nav ul.navi .nav-link {
display: block;
color: white;
border-radius: .5em;
@@ -238,25 +464,25 @@ export default {
margin: 0.5em 1em;
}
nav ul.navi a.nav-link:hover,
nav ul.navi li.active>a.nav-link,
nav ul.navi a.nav-link.router-link-active {
nav ul.navi .nav-link:hover,
nav ul.navi li.active>.nav-link,
nav ul.navi .nav-link.router-link-active {
background: rgba(255,255,255,.3);
opacity: 1;
}
nav ul.navi li.active>a.nav-link i.nav-arrow ,
nav ul.navi a.nav-link.router-link-active i.nav-arrow {
nav ul.navi li.active>.nav-link i.nav-arrow ,
nav ul.navi .nav-link.router-link-active i.nav-arrow {
transform: rotate(0);
}
nav ul.navi a.nav-link>i.v-icon {
nav ul.navi .nav-link>i.v-icon {
color: white;
font-size: 1.7em;
margin-right: .5em;
}
nav ul.navi a.nav-link>span.nav-title {
nav ul.navi .nav-link>span.nav-title {
line-height: 30px;
font-weight: 600;
text-transform: uppercase;
@@ -264,12 +490,15 @@ export default {
letter-spacing: 1px;
}
nav ul.navi a.nav-link>i.nav-arrow {
nav ul.navi .nav-link>.nav-arrow {
float: right;
margin-top: 5px;
margin-right: 0;
transform: rotate(90deg);
}
nav ul.navi .nav-link>.nav-arrow.right {
transform: rotate(-90deg);
}
nav ul.navi>li>ul.child {
display: none;
@@ -283,16 +512,16 @@ export default {
display: block;
}
nav ul.navi>li>ul.child a.nav-link {
nav ul.navi>li>ul.child .nav-link {
padding: 5px 15px 5px 15px;
}
nav ul.navi>li>ul.child a.nav-link:hover,
nav ul.navi>li>ul.child a.nav-link.router-link-active {
nav ul.navi>li>ul.child .nav-link:hover,
nav ul.navi>li>ul.child .nav-link.router-link-active {
background: rgba(255,255,255,.2);
}
nav ul.navi>li>ul.child a.nav-link>span.nav-title {
nav ul.navi>li>ul.child .nav-link>span.nav-title {
text-transform: capitalize;
font-weight: 400;
font-size: 14px;
@@ -303,4 +532,4 @@ export default {
}
</style>
</style>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

+956
View File
@@ -0,0 +1,956 @@
/*
CanvasJS HTML5 & JavaScript Charts - v3.2.4 GA - https://canvasjs.com/
Copyright 2020 fenopix
--------------------- License Information --------------------
CanvasJS is a commercial product which requires purchase of license. Without a commercial license you can use it for evaluation purposes for upto 30 days. Please refer to the following link for further details.
https://canvasjs.com/license/
---------------------Free for Non-Commercial Use--------------------
For non-commercial purposes you can use the software for free under Creative Commons Attribution-NonCommercial 3.0 License.
A credit Link is added to the bottom right of the chart which should be preserved. Refer to the following link for further details on the same.
https://creativecommons.org/licenses/by-nc/3.0/deed.en_US
*/
/*eslint-disable*/
/*jshint ignore:start*/
(function(){function oa(k,m){k.prototype=cb(m.prototype);k.prototype.constructor=k;k.base=m.prototype}function cb(k){function m(){}m.prototype=k;return new m}function Va(k,m,v){"millisecond"===v?k.setMilliseconds(k.getMilliseconds()+1*m):"second"===v?k.setSeconds(k.getSeconds()+1*m):"minute"===v?k.setMinutes(k.getMinutes()+1*m):"hour"===v?k.setHours(k.getHours()+1*m):"day"===v?k.setDate(k.getDate()+1*m):"week"===v?k.setDate(k.getDate()+7*m):"month"===v?k.setMonth(k.getMonth()+1*m):"year"===v&&k.setFullYear(k.getFullYear()+
1*m);return k}function aa(k,m){var v=!1;0>k&&(v=!0,k*=-1);k=""+k;for(m=m?m:1;k.length<m;)k="0"+k;return v?"-"+k:k}function Fa(k){if(!k)return k;k=k.replace(/^\s\s*/,"");for(var m=/\s/,v=k.length;m.test(k.charAt(--v)););return k.slice(0,v+1)}function Ba(k){k.roundRect=function(k,v,r,s,ra,D,w,E){w&&(this.fillStyle=w);E&&(this.strokeStyle=E);"undefined"===typeof ra&&(ra=5);this.lineWidth=D;this.beginPath();this.moveTo(k+ra,v);this.lineTo(k+r-ra,v);this.quadraticCurveTo(k+r,v,k+r,v+ra);this.lineTo(k+
r,v+s-ra);this.quadraticCurveTo(k+r,v+s,k+r-ra,v+s);this.lineTo(k+ra,v+s);this.quadraticCurveTo(k,v+s,k,v+s-ra);this.lineTo(k,v+ra);this.quadraticCurveTo(k,v,k+ra,v);this.closePath();w&&this.fill();E&&0<D&&this.stroke()}}function Pa(k,m){return k-m}function S(k){var m=((k&16711680)>>16).toString(16),v=((k&65280)>>8).toString(16);k=((k&255)>>0).toString(16);m=2>m.length?"0"+m:m;v=2>v.length?"0"+v:v;k=2>k.length?"0"+k:k;return"#"+m+v+k}function db(k,m){var v=this.length>>>0,r=Number(m)||0,r=0>r?Math.ceil(r):
Math.floor(r);for(0>r&&(r+=v);r<v;r++)if(r in this&&this[r]===k)return r;return-1}function r(k){return null===k||"undefined"===typeof k}function Ca(k){k.indexOf||(k.indexOf=db);return k}function eb(k){if(I.fSDec)k[Z("`eeDwdouMhrudods")](Z("e`u`@ohl`uhnoHuds`uhnoDoe"),function(){I._fTWm&&I._fTWm(k)})}function Wa(k,m,v){v=v||"normal";var r=k+"_"+m+"_"+v,s=Xa[r];if(isNaN(s)){try{k="position:absolute; left:0px; top:-20000px; padding:0px;margin:0px;border:none;white-space:pre;line-height:normal;font-family:"+
k+"; font-size:"+m+"px; font-weight:"+v+";";if(!wa){var ra=document.body;wa=document.createElement("span");wa.innerHTML="";var D=document.createTextNode("Mpgyi");wa.appendChild(D);ra.appendChild(wa)}wa.style.display="";wa.setAttribute("style",k);s=Math.round(wa.offsetHeight);wa.style.display="none"}catch(w){s=Math.ceil(1.1*m)}s=Math.max(s,m);Xa[r]=s}return s}function Q(k,m){var v=[];if(v={solid:[],shortDash:[3,1],shortDot:[1,1],shortDashDot:[3,1,1,1],shortDashDotDot:[3,1,1,1,1,1],dot:[1,2],dash:[4,
2],dashDot:[4,2,1,2],longDash:[8,2],longDashDot:[8,2,1,2],longDashDotDot:[8,2,1,2,1,2]}[k||"solid"])for(var r=0;r<v.length;r++)v[r]*=m;else v=[];return v}function W(k,m,v,s,w){s=s||[];w=r(w)?fb?{passive:!1,capture:!1}:!1:w;s.push([k,m,v,w]);return k.addEventListener?(k.addEventListener(m,v,w),v):k.attachEvent?(s=function(m){m=m||window.event;m.preventDefault=m.preventDefault||function(){m.returnValue=!1};m.stopPropagation=m.stopPropagation||function(){m.cancelBubble=!0};v.call(k,m)},k.attachEvent("on"+
m,s),s):!1}function gb(k){if(k._menuButton)k.exportEnabled?Ka(k._menuButton):ua(k._menuButton);else if(k.exportEnabled&&s){var m=!1;k._menuButton=document.createElement("button");va(k,k._menuButton,"menu");k._toolBar.appendChild(k._menuButton);W(k._menuButton,"touchstart",function(k){m=!0},k.allDOMEventHandlers);W(k._menuButton,"click",function(){"none"!==k._dropdownMenu.style.display||k._dropDownCloseTime&&500>=(new Date).getTime()-k._dropDownCloseTime.getTime()||(k._dropdownMenu.style.display="block",
k._menuButton.blur(),k._dropdownMenu.focus())},k.allDOMEventHandlers,!0);W(k._menuButton,"mouseover",function(){m||(pa(k._menuButton,{backgroundColor:k.toolbar.backgroundColorOnHover,color:k.toolbar.fontColorOnHover}),0>=navigator.userAgent.search("MSIE")&&pa(k._menuButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))},k.allDOMEventHandlers,!0);W(k._menuButton,"mouseout",function(){m||(pa(k._menuButton,{backgroundColor:k.toolbar.backgroundColor,color:k.toolbar.fontColor}),0>=
navigator.userAgent.search("MSIE")&&pa(k._menuButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}))},k.allDOMEventHandlers,!0)}if(!k._dropdownMenu&&k.exportEnabled&&s){m=!1;k._dropdownMenu=document.createElement("div");k._dropdownMenu.setAttribute("tabindex",-1);var v=-1!==k.theme.indexOf("dark")?"black":"#888888";k._dropdownMenu.style.cssText="position: absolute; z-index: 1; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: pointer;right: 0px;top: 25px;min-width: 120px;outline: 0;font-size: 14px; font-family: Arial, Helvetica, sans-serif;padding: 5px 0px 5px 0px;text-align: left;line-height: 10px;background-color:"+
k.toolbar.backgroundColor+";box-shadow: 2px 2px 10px "+v;k._dropdownMenu.style.display="none";k._toolBar.appendChild(k._dropdownMenu);W(k._dropdownMenu,"blur",function(){ua(k._dropdownMenu);k._dropDownCloseTime=new Date},k.allDOMEventHandlers,!0);v=document.createElement("div");v.style.cssText="padding: 12px 8px 12px 8px";v.innerHTML=k._cultureInfo.printText;v.style.backgroundColor=k.toolbar.backgroundColor;v.style.color=k.toolbar.fontColor;k._dropdownMenu.appendChild(v);W(v,"touchstart",function(k){m=
!0},k.allDOMEventHandlers);W(v,"mouseover",function(){m||(this.style.backgroundColor=k.toolbar.backgroundColorOnHover,this.style.color=k.toolbar.fontColorOnHover)},k.allDOMEventHandlers,!0);W(v,"mouseout",function(){m||(this.style.backgroundColor=k.toolbar.backgroundColor,this.style.color=k.toolbar.fontColor)},k.allDOMEventHandlers,!0);W(v,"click",function(){k.print();ua(k._dropdownMenu)},k.allDOMEventHandlers,!0);v=document.createElement("div");v.style.cssText="padding: 12px 8px 12px 8px";v.innerHTML=
k._cultureInfo.saveJPGText;v.style.backgroundColor=k.toolbar.backgroundColor;v.style.color=k.toolbar.fontColor;k._dropdownMenu.appendChild(v);W(v,"touchstart",function(k){m=!0},k.allDOMEventHandlers);W(v,"mouseover",function(){m||(this.style.backgroundColor=k.toolbar.backgroundColorOnHover,this.style.color=k.toolbar.fontColorOnHover)},k.allDOMEventHandlers,!0);W(v,"mouseout",function(){m||(this.style.backgroundColor=k.toolbar.backgroundColor,this.style.color=k.toolbar.fontColor)},k.allDOMEventHandlers,
!0);W(v,"click",function(){k.exportChart({format:"jpeg",fileName:k.exportFileName});ua(k._dropdownMenu)},k.allDOMEventHandlers,!0);v=document.createElement("div");v.style.cssText="padding: 12px 8px 12px 8px";v.innerHTML=k._cultureInfo.savePNGText;v.style.backgroundColor=k.toolbar.backgroundColor;v.style.color=k.toolbar.fontColor;k._dropdownMenu.appendChild(v);W(v,"touchstart",function(k){m=!0},k.allDOMEventHandlers);W(v,"mouseover",function(){m||(this.style.backgroundColor=k.toolbar.backgroundColorOnHover,
this.style.color=k.toolbar.fontColorOnHover)},k.allDOMEventHandlers,!0);W(v,"mouseout",function(){m||(this.style.backgroundColor=k.toolbar.backgroundColor,this.style.color=k.toolbar.fontColor)},k.allDOMEventHandlers,!0);W(v,"click",function(){k.exportChart({format:"png",fileName:k.exportFileName});ua(k._dropdownMenu)},k.allDOMEventHandlers,!0)}}function Ya(k,m,v){k*=ja;m*=ja;k=v.getImageData(k,m,2,2).data;m=!0;for(v=0;4>v;v++)if(k[v]!==k[v+4]|k[v]!==k[v+8]|k[v]!==k[v+12]){m=!1;break}return m?k[0]<<
16|k[1]<<8|k[2]:0}function ma(k,m,v){return k in m?m[k]:v[k]}function La(k,m,v){if(s&&Za){var r=k.getContext("2d");Ma=r.webkitBackingStorePixelRatio||r.mozBackingStorePixelRatio||r.msBackingStorePixelRatio||r.oBackingStorePixelRatio||r.backingStorePixelRatio||1;ja=Qa/Ma;k.width=m*ja;k.height=v*ja;Qa!==Ma&&(k.style.width=m+"px",k.style.height=v+"px",r.scale(ja,ja))}else k.width=m,k.height=v}function hb(k){if(!ib){var m=!1,v=!1;"undefined"===typeof qa.Chart.creditHref?(k.creditHref=Z("iuuqr;..b`ow`rkr/bnl."),
k.creditText=Z("B`ow`rKR/bnl")):(m=k.updateOption("creditText"),v=k.updateOption("creditHref"));if(k.creditHref&&k.creditText){k._creditLink||(k._creditLink=document.createElement("a"),k._creditLink.setAttribute("class","canvasjs-chart-credit"),k._creditLink.setAttribute("title","JavaScript Charts"),k._creditLink.setAttribute("style","outline:none;margin:0px;position:absolute;right:2px;top:"+(k.height-14)+"px;color:dimgrey;text-decoration:none;font-size:11px;font-family: Calibri, Lucida Grande, Lucida Sans Unicode, Arial, sans-serif"),
k._creditLink.setAttribute("tabIndex",-1),k._creditLink.setAttribute("target","_blank"));if(0===k.renderCount||m||v)k._creditLink.setAttribute("href",k.creditHref),k._creditLink.innerHTML=k.creditText;k._creditLink&&k.creditHref&&k.creditText?(k._creditLink.parentElement||k._canvasJSContainer.appendChild(k._creditLink),k._creditLink.style.top=k.height-14+"px"):k._creditLink.parentElement&&k._canvasJSContainer.removeChild(k._creditLink)}}}function ta(k,m){Ga&&(this.canvasCount|=0,window.console.log(++this.canvasCount));
var v=document.createElement("canvas");v.setAttribute("class","canvasjs-chart-canvas");La(v,k,m);s||"undefined"===typeof G_vmlCanvasManager||G_vmlCanvasManager.initElement(v);return v}function pa(k,m){for(var v in m)k.style[v]=m[v]}function va(k,m,v){m.getAttribute("state")||(m.style.backgroundColor=k.toolbar.backgroundColor,m.style.color=k.toolbar.fontColor,m.style.border="none",pa(m,{WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"}));m.getAttribute("state")!==
v&&(m.setAttribute("state",v),m.setAttribute("type","button"),pa(m,{padding:"5px 12px",cursor:"pointer","float":"left",width:"40px",height:"25px",outline:"0px",verticalAlign:"baseline",lineHeight:"0"}),m.setAttribute("title",k._cultureInfo[v+"Text"]),m.innerHTML="<img style='height:95%; pointer-events: none;' src='"+jb[v].image+"' alt='"+k._cultureInfo[v+"Text"]+"' />")}function Ka(){for(var k=null,m=0;m<arguments.length;m++)k=arguments[m],k.style&&(k.style.display="inline")}function ua(){for(var k=
null,m=0;m<arguments.length;m++)(k=arguments[m])&&k.style&&(k.style.display="none")}function Ra(k,m,v,r,s){if(null===k||"undefined"===typeof k)return"undefined"===typeof v?m:v;k=parseFloat(k.toString())*(0<=k.toString().indexOf("%")?m/100:1);"undefined"!==typeof r&&(k=Math.min(r,k),"undefined"!==typeof s&&(k=Math.max(s,k)));return!isNaN(k)&&k<=m&&0<=k?k:"undefined"===typeof v?m:v}function X(k,m,v,s,w){this._defaultsKey=k;this._themeOptionsKey=m;this._index=s;this.parent=w;this._eventListeners=[];
k={};this.theme&&r(this.parent)&&r(m)&&r(s)?k=r(this.predefinedThemes[this.theme])?this.predefinedThemes.light1:this.predefinedThemes[this.theme]:this.parent&&(this.parent.themeOptions&&this.parent.themeOptions[m])&&(null===s?k=this.parent.themeOptions[m]:0<this.parent.themeOptions[m].length&&(s=Math.min(this.parent.themeOptions[m].length-1,s),k=this.parent.themeOptions[m][s]));this.themeOptions=k;this.options=v?v:{_isPlaceholder:!0};this.setOptions(this.options,k)}function Da(k,m,v,r,s){"undefined"===
typeof s&&(s=0);this._padding=s;this._x1=k;this._y1=m;this._x2=v;this._y2=r;this._rightOccupied=this._leftOccupied=this._bottomOccupied=this._topOccupied=this._padding}function la(k,m){la.base.constructor.call(this,"TextBlock",null,m,null,null);this.ctx=k;this._isDirty=!0;this._wrappedText=null;this._initialize()}function Sa(k,m){Sa.base.constructor.call(this,"Toolbar","toolbar",m,null,k);this.chart=k;this.canvas=k.canvas;this.ctx=this.chart.ctx;this.optionsName="toolbar"}function ya(k,m){ya.base.constructor.call(this,
"Title","title",m,null,k);this.chart=k;this.canvas=k.canvas;this.ctx=this.chart.ctx;this.optionsName="title";if(r(this.options.margin)&&k.options.subtitles)for(var v=k.options.subtitles,s=0;s<v.length;s++)if((r(v[s].horizontalAlign)&&"center"===this.horizontalAlign||v[s].horizontalAlign===this.horizontalAlign)&&(r(v[s].verticalAlign)&&"top"===this.verticalAlign||v[s].verticalAlign===this.verticalAlign)&&!v[s].dockInsidePlotArea===!this.dockInsidePlotArea){this.margin=0;break}"undefined"===typeof this.options.fontSize&&
(this.fontSize=this.chart.getAutoFontSize(this.fontSize));this.height=this.width=null;this.bounds={x1:null,y1:null,x2:null,y2:null}}function Ha(k,m,v){Ha.base.constructor.call(this,"Subtitle","subtitles",m,v,k);this.chart=k;this.canvas=k.canvas;this.ctx=this.chart.ctx;this.optionsName="subtitles";this.isOptionsInArray=!0;"undefined"===typeof this.options.fontSize&&(this.fontSize=this.chart.getAutoFontSize(this.fontSize));this.height=this.width=null;this.bounds={x1:null,y1:null,x2:null,y2:null}}function Ta(){this.pool=
[]}function Ia(k){var m;k&&Ja[k]&&(m=Ja[k]);Ia.base.constructor.call(this,"CultureInfo",null,m,null,null)}var Ga=!1,I={},s=!!document.createElement("canvas").getContext,qa={Chart:{width:500,height:400,zoomEnabled:!1,zoomType:"x",backgroundColor:"white",theme:"light1",animationEnabled:!1,animationDuration:1200,dataPointWidth:null,dataPointMinWidth:null,dataPointMaxWidth:null,colorSet:"colorSet1",culture:"en",creditText:"CanvasJS",interactivityEnabled:!0,exportEnabled:!1,exportFileName:"Chart",rangeChanging:null,
rangeChanged:null,publicProperties:{title:"readWrite",subtitles:"readWrite",toolbar:"readWrite",toolTip:"readWrite",legend:"readWrite",axisX:"readWrite",axisY:"readWrite",axisX2:"readWrite",axisY2:"readWrite",data:"readWrite",options:"readWrite",bounds:"readOnly",container:"readOnly"}},Title:{padding:0,text:null,verticalAlign:"top",horizontalAlign:"center",fontSize:20,fontFamily:"Calibri",fontWeight:"normal",fontColor:"black",fontStyle:"normal",borderThickness:0,borderColor:"black",cornerRadius:0,
backgroundColor:s?"transparent":null,margin:5,wrap:!0,maxWidth:null,dockInsidePlotArea:!1,publicProperties:{options:"readWrite",bounds:"readOnly",chart:"readOnly"}},Subtitle:{padding:0,text:null,verticalAlign:"top",horizontalAlign:"center",fontSize:14,fontFamily:"Calibri",fontWeight:"normal",fontColor:"black",fontStyle:"normal",borderThickness:0,borderColor:"black",cornerRadius:0,backgroundColor:null,margin:2,wrap:!0,maxWidth:null,dockInsidePlotArea:!1,publicProperties:{options:"readWrite",bounds:"readOnly",
chart:"readOnly"}},Toolbar:{backgroundColor:"white",backgroundColorOnHover:"#2196f3",borderColor:"#2196f3",borderThickness:1,fontColor:"black",fontColorOnHover:"white",publicProperties:{options:"readWrite",chart:"readOnly"}},Legend:{name:null,verticalAlign:"center",horizontalAlign:"right",fontSize:14,fontFamily:"calibri",fontWeight:"normal",fontColor:"black",fontStyle:"normal",cursor:null,itemmouseover:null,itemmouseout:null,itemmousemove:null,itemclick:null,dockInsidePlotArea:!1,reversed:!1,backgroundColor:s?
"transparent":null,borderColor:s?"transparent":null,borderThickness:0,cornerRadius:0,maxWidth:null,maxHeight:null,markerMargin:null,itemMaxWidth:null,itemWidth:null,itemWrap:!0,itemTextFormatter:null,publicProperties:{options:"readWrite",bounds:"readOnly",chart:"readOnly"}},ToolTip:{enabled:!0,shared:!1,animationEnabled:!0,content:null,contentFormatter:null,reversed:!1,backgroundColor:s?"rgba(255,255,255,.9)":"rgb(255,255,255)",borderColor:null,borderThickness:2,cornerRadius:5,fontSize:14,fontColor:"black",
fontFamily:"Calibri, Arial, Georgia, serif;",fontWeight:"normal",fontStyle:"italic",updated:null,hidden:null,publicProperties:{options:"readWrite",chart:"readOnly"}},Axis:{minimum:null,maximum:null,viewportMinimum:null,viewportMaximum:null,interval:null,intervalType:null,reversed:!1,logarithmic:!1,logarithmBase:10,title:null,titleFontColor:"black",titleFontSize:20,titleFontFamily:"arial",titleFontWeight:"normal",titleFontStyle:"normal",titleWrap:!0,titleMaxWidth:null,titleBackgroundColor:s?"transparent":
null,titleBorderColor:s?"transparent":null,titleBorderThickness:0,titleCornerRadius:0,labelAngle:0,labelFontFamily:"arial",labelFontColor:"black",labelFontSize:12,labelFontWeight:"normal",labelFontStyle:"normal",labelAutoFit:!0,labelWrap:!0,labelMaxWidth:null,labelFormatter:null,labelBackgroundColor:s?"transparent":null,labelBorderColor:s?"transparent":null,labelBorderThickness:0,labelCornerRadius:0,labelPlacement:"outside",labelTextAlign:"left",prefix:"",suffix:"",includeZero:!1,tickLength:5,tickColor:"black",
tickThickness:1,tickPlacement:"outside",lineColor:"black",lineThickness:1,lineDashType:"solid",gridColor:"#A0A0A0",gridThickness:0,gridDashType:"solid",interlacedColor:s?"transparent":null,valueFormatString:null,margin:2,publicProperties:{options:"readWrite",stripLines:"readWrite",scaleBreaks:"readWrite",crosshair:"readWrite",bounds:"readOnly",chart:"readOnly"}},StripLine:{value:null,startValue:null,endValue:null,color:"orange",opacity:null,thickness:2,lineDashType:"solid",label:"",labelPlacement:"inside",
labelAlign:"far",labelWrap:!0,labelMaxWidth:null,labelBackgroundColor:null,labelBorderColor:s?"transparent":null,labelBorderThickness:0,labelCornerRadius:0,labelFontFamily:"arial",labelFontColor:"orange",labelFontSize:12,labelFontWeight:"normal",labelFontStyle:"normal",labelFormatter:null,showOnTop:!1,publicProperties:{options:"readWrite",axis:"readOnly",bounds:"readOnly",chart:"readOnly"}},ScaleBreaks:{autoCalculate:!1,collapsibleThreshold:"25%",maxNumberOfAutoBreaks:2,spacing:8,type:"straight",
color:"#FFFFFF",fillOpacity:0.9,lineThickness:2,lineColor:"#E16E6E",lineDashType:"solid",publicProperties:{options:"readWrite",customBreaks:"readWrite",axis:"readOnly",autoBreaks:"readOnly",bounds:"readOnly",chart:"readOnly"}},Break:{startValue:null,endValue:null,spacing:8,type:"straight",color:"#FFFFFF",fillOpacity:0.9,lineThickness:2,lineColor:"#E16E6E",lineDashType:"solid",publicProperties:{options:"readWrite",scaleBreaks:"readOnly",bounds:"readOnly",chart:"readOnly"}},Crosshair:{enabled:!1,snapToDataPoint:!1,
color:"grey",opacity:null,thickness:2,lineDashType:"solid",label:"",labelWrap:!0,labelMaxWidth:null,labelBackgroundColor:s?"grey":null,labelBorderColor:s?"grey":null,labelBorderThickness:0,labelCornerRadius:0,labelFontFamily:s?"Calibri, Optima, Candara, Verdana, Geneva, sans-serif":"calibri",labelFontSize:12,labelFontColor:"#fff",labelFontWeight:"normal",labelFontStyle:"normal",labelFormatter:null,valueFormatString:null,updated:null,hidden:null,publicProperties:{options:"readWrite",axis:"readOnly",
bounds:"readOnly",chart:"readOnly"}},DataSeries:{name:null,dataPoints:null,label:"",bevelEnabled:!1,highlightEnabled:!0,cursor:"default",indexLabel:"",indexLabelPlacement:"auto",indexLabelOrientation:"horizontal",indexLabelFontColor:"black",indexLabelFontSize:12,indexLabelFontStyle:"normal",indexLabelFontFamily:"Arial",indexLabelFontWeight:"normal",indexLabelBackgroundColor:null,indexLabelLineColor:"gray",indexLabelLineThickness:1,indexLabelLineDashType:"solid",indexLabelMaxWidth:null,indexLabelWrap:!0,
indexLabelFormatter:null,lineThickness:2,lineDashType:"solid",connectNullData:!1,nullDataLineDashType:"dash",color:null,lineColor:null,risingColor:"white",fallingColor:"red",fillOpacity:null,startAngle:0,radius:null,innerRadius:null,neckHeight:null,neckWidth:null,reversed:!1,valueRepresents:null,linkedDataSeriesIndex:null,whiskerThickness:2,whiskerDashType:"solid",whiskerColor:null,whiskerLength:null,stemThickness:2,stemColor:null,stemDashType:"solid",upperBoxColor:"white",lowerBoxColor:"white",type:"column",
xValueType:"number",axisXType:"primary",axisYType:"primary",axisXIndex:0,axisYIndex:0,xValueFormatString:null,yValueFormatString:null,zValueFormatString:null,percentFormatString:null,showInLegend:null,legendMarkerType:null,legendMarkerColor:null,legendText:null,legendMarkerBorderColor:s?"transparent":null,legendMarkerBorderThickness:0,markerType:"circle",markerColor:null,markerSize:null,markerBorderColor:s?"transparent":null,markerBorderThickness:0,mouseover:null,mouseout:null,mousemove:null,click:null,
toolTipContent:null,visible:!0,publicProperties:{options:"readWrite",axisX:"readWrite",axisY:"readWrite",chart:"readOnly"}},TextBlock:{x:0,y:0,width:null,height:null,maxWidth:null,maxHeight:null,padding:0,angle:0,text:"",horizontalAlign:"center",textAlign:"left",fontSize:12,fontFamily:"calibri",fontWeight:"normal",fontColor:"black",fontStyle:"normal",borderThickness:0,borderColor:"black",cornerRadius:0,backgroundColor:null,textBaseline:"top"},CultureInfo:{decimalSeparator:".",digitGroupSeparator:",",
zoomText:"Zoom",panText:"Pan",resetText:"Reset",menuText:"More Options",saveJPGText:"Save as JPEG",savePNGText:"Save as PNG",printText:"Print",days:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),shortDays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ")}},Ja={en:{}},w=s?"Trebuchet MS, Helvetica, sans-serif":
"Arial",Ea=s?"Impact, Charcoal, sans-serif":"Arial",za={colorSet1:"#4F81BC #C0504E #9BBB58 #23BFAA #8064A1 #4AACC5 #F79647 #7F6084 #77A033 #33558B #E59566".split(" "),colorSet2:"#6D78AD #51CDA0 #DF7970 #4C9CA0 #AE7D99 #C9D45C #5592AD #DF874D #52BCA8 #8E7AA3 #E3CB64 #C77B85 #C39762 #8DD17E #B57952 #FCC26C".split(" "),colorSet3:"#8CA1BC #36845C #017E82 #8CB9D0 #708C98 #94838D #F08891 #0366A7 #008276 #EE7757 #E5BA3A #F2990B #03557B #782970".split(" ")},G,ba,U,ea,ka;ba="#333333";U="#000000";G="#666666";
ka=ea="#000000";var V=20,E=14,Ua={colorSet:"colorSet1",backgroundColor:"#FFFFFF",title:{fontFamily:Ea,fontSize:32,fontColor:ba,fontWeight:"normal",verticalAlign:"top",margin:5},subtitles:[{fontFamily:Ea,fontSize:E,fontColor:ba,fontWeight:"normal",verticalAlign:"top",margin:5}],data:[{indexLabelFontFamily:w,indexLabelFontSize:E,indexLabelFontColor:ba,indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:w,titleFontSize:V,titleFontColor:ba,titleFontWeight:"normal",labelFontFamily:w,
labelFontSize:E,labelFontColor:U,labelFontWeight:"normal",lineThickness:1,lineColor:G,tickThickness:1,tickColor:G,gridThickness:0,gridColor:G,stripLines:[{labelFontFamily:w,labelFontSize:E,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:w,labelFontSize:E,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:ka,color:ea,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",
lineThickness:1,lineDashType:"solid"}}],axisX2:[{titleFontFamily:w,titleFontSize:V,titleFontColor:ba,titleFontWeight:"normal",labelFontFamily:w,labelFontSize:E,labelFontColor:U,labelFontWeight:"normal",lineThickness:1,lineColor:G,tickThickness:1,tickColor:G,gridThickness:0,gridColor:G,stripLines:[{labelFontFamily:w,labelFontSize:E,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:w,labelFontSize:E,labelFontColor:"#EEEEEE",
labelFontWeight:"normal",labelBackgroundColor:ka,color:ea,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY:[{titleFontFamily:w,titleFontSize:V,titleFontColor:ba,titleFontWeight:"normal",labelFontFamily:w,labelFontSize:E,labelFontColor:U,labelFontWeight:"normal",lineThickness:1,lineColor:G,tickThickness:1,tickColor:G,gridThickness:1,gridColor:G,stripLines:[{labelFontFamily:w,labelFontSize:E,labelFontColor:"#FF7300",
labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:w,labelFontSize:E,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:ka,color:ea,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY2:[{titleFontFamily:w,titleFontSize:V,titleFontColor:ba,titleFontWeight:"normal",labelFontFamily:w,labelFontSize:E,labelFontColor:U,labelFontWeight:"normal",
lineThickness:1,lineColor:G,tickThickness:1,tickColor:G,gridThickness:1,gridColor:G,stripLines:[{labelFontFamily:w,labelFontSize:E,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:w,labelFontSize:E,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:ka,color:ea,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],legend:{fontFamily:w,
fontSize:14,fontColor:ba,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:w,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1}};U=ba="#F5F5F5";G="#FFFFFF";ea="#40BAF1";ka="#F5F5F5";var V=20,E=14,$a={colorSet:"colorSet2",title:{fontFamily:w,fontSize:33,fontColor:"#3A3A3A",fontWeight:"bold",verticalAlign:"top",margin:5},subtitles:[{fontFamily:w,fontSize:E,fontColor:"#3A3A3A",fontWeight:"normal",verticalAlign:"top",margin:5}],data:[{indexLabelFontFamily:w,
indexLabelFontSize:E,indexLabelFontColor:"#666666",indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:w,titleFontSize:V,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:w,labelFontSize:E,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:1,lineColor:"#BBBBBB",tickThickness:1,tickColor:"#BBBBBB",gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:w,labelFontSize:E,labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,
color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:w,labelFontSize:E,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisX2:[{titleFontFamily:w,titleFontSize:V,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:w,labelFontSize:E,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:1,lineColor:"#BBBBBB",
tickColor:"#BBBBBB",tickThickness:1,gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:w,labelFontSize:E,labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:w,labelFontSize:E,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY:[{titleFontFamily:w,
titleFontSize:V,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:w,labelFontSize:E,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:0,lineColor:"#BBBBBB",tickColor:"#BBBBBB",tickThickness:1,gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:w,labelFontSize:E,labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:w,labelFontSize:E,labelFontColor:"#EEEEEE",labelFontWeight:"normal",
labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY2:[{titleFontFamily:w,titleFontSize:V,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:w,labelFontSize:E,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:0,lineColor:"#BBBBBB",tickColor:"#BBBBBB",tickThickness:1,gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:w,labelFontSize:E,
labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:w,labelFontSize:E,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],legend:{fontFamily:w,fontSize:14,fontColor:"#3A3A3A",fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:w,
fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1}};U=ba="#F5F5F5";G="#FFFFFF";ea="#40BAF1";ka="#F5F5F5";V=20;E=14;Ea={colorSet:"colorSet12",backgroundColor:"#2A2A2A",title:{fontFamily:Ea,fontSize:32,fontColor:ba,fontWeight:"normal",verticalAlign:"top",margin:5},subtitles:[{fontFamily:Ea,fontSize:E,fontColor:ba,fontWeight:"normal",verticalAlign:"top",margin:5}],toolbar:{backgroundColor:"#666666",backgroundColorOnHover:"#FF7372",borderColor:"#FF7372",borderThickness:1,fontColor:"#F5F5F5",
fontColorOnHover:"#F5F5F5"},data:[{indexLabelFontFamily:w,indexLabelFontSize:E,indexLabelFontColor:U,indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:w,titleFontSize:V,titleFontColor:U,titleFontWeight:"normal",labelFontFamily:w,labelFontSize:E,labelFontColor:U,labelFontWeight:"normal",lineThickness:1,lineColor:G,tickThickness:1,tickColor:G,gridThickness:0,gridColor:G,stripLines:[{labelFontFamily:w,labelFontSize:E,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,
color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:w,labelFontSize:E,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ka,color:ea,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisX2:[{titleFontFamily:w,titleFontSize:V,titleFontColor:U,titleFontWeight:"normal",labelFontFamily:w,labelFontSize:E,labelFontColor:U,labelFontWeight:"normal",lineThickness:1,lineColor:G,tickThickness:1,
tickColor:G,gridThickness:0,gridColor:G,stripLines:[{labelFontFamily:w,labelFontSize:E,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:w,labelFontSize:E,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ka,color:ea,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY:[{titleFontFamily:w,titleFontSize:V,
titleFontColor:U,titleFontWeight:"normal",labelFontFamily:w,labelFontSize:E,labelFontColor:U,labelFontWeight:"normal",lineThickness:1,lineColor:G,tickThickness:1,tickColor:G,gridThickness:1,gridColor:G,stripLines:[{labelFontFamily:w,labelFontSize:E,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:w,labelFontSize:E,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ka,color:ea,thickness:1,lineDashType:"dash"},
scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY2:[{titleFontFamily:w,titleFontSize:V,titleFontColor:U,titleFontWeight:"normal",labelFontFamily:w,labelFontSize:E,labelFontColor:U,labelFontWeight:"normal",lineThickness:1,lineColor:G,tickThickness:1,tickColor:G,gridThickness:1,gridColor:G,stripLines:[{labelFontFamily:w,labelFontSize:E,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],
crosshair:{labelFontFamily:w,labelFontSize:E,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ka,color:ea,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],legend:{fontFamily:w,fontSize:14,fontColor:ba,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:w,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1,fontColor:U,backgroundColor:"rgba(0, 0, 0, .7)"}};
G="#FFFFFF";U=ba="#FAFAFA";ea="#40BAF1";ka="#F5F5F5";var V=20,E=14,ab={light1:Ua,light2:$a,dark1:Ea,dark2:{colorSet:"colorSet2",backgroundColor:"#32373A",title:{fontFamily:w,fontSize:32,fontColor:ba,fontWeight:"normal",verticalAlign:"top",margin:5},subtitles:[{fontFamily:w,fontSize:E,fontColor:ba,fontWeight:"normal",verticalAlign:"top",margin:5}],toolbar:{backgroundColor:"#666666",backgroundColorOnHover:"#FF7372",borderColor:"#FF7372",borderThickness:1,fontColor:"#F5F5F5",fontColorOnHover:"#F5F5F5"},
data:[{indexLabelFontFamily:w,indexLabelFontSize:E,indexLabelFontColor:U,indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:w,titleFontSize:V,titleFontColor:U,titleFontWeight:"normal",labelFontFamily:w,labelFontSize:E,labelFontColor:U,labelFontWeight:"normal",lineThickness:1,lineColor:G,tickThickness:1,tickColor:G,gridThickness:0,gridColor:G,stripLines:[{labelFontFamily:w,labelFontSize:E,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",
thickness:1}],crosshair:{labelFontFamily:w,labelFontSize:E,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ka,color:ea,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisX2:[{titleFontFamily:w,titleFontSize:V,titleFontColor:U,titleFontWeight:"normal",labelFontFamily:w,labelFontSize:E,labelFontColor:U,labelFontWeight:"normal",lineThickness:1,lineColor:G,tickThickness:1,tickColor:G,
gridThickness:0,gridColor:G,stripLines:[{labelFontFamily:w,labelFontSize:E,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:w,labelFontSize:E,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ka,color:ea,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY:[{titleFontFamily:w,titleFontSize:V,titleFontColor:U,
titleFontWeight:"normal",labelFontFamily:w,labelFontSize:E,labelFontColor:U,labelFontWeight:"normal",lineThickness:0,lineColor:G,tickThickness:1,tickColor:G,gridThickness:1,gridColor:G,stripLines:[{labelFontFamily:w,labelFontSize:E,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:w,labelFontSize:E,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ka,color:ea,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",
spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY2:[{titleFontFamily:w,titleFontSize:V,titleFontColor:U,titleFontWeight:"normal",labelFontFamily:w,labelFontSize:E,labelFontColor:U,labelFontWeight:"normal",lineThickness:0,lineColor:G,tickThickness:1,tickColor:G,gridThickness:1,gridColor:G,stripLines:[{labelFontFamily:w,labelFontSize:E,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:w,
labelFontSize:E,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ka,color:ea,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],legend:{fontFamily:w,fontSize:14,fontColor:ba,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:w,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1,fontColor:U,backgroundColor:"rgba(0, 0, 0, .7)"}},theme1:Ua,
theme2:$a,theme3:Ua},T={numberDuration:1,yearDuration:314496E5,monthDuration:2592E6,weekDuration:6048E5,dayDuration:864E5,hourDuration:36E5,minuteDuration:6E4,secondDuration:1E3,millisecondDuration:1,dayOfWeekFromInt:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ")};(function(){I.fSDec=function(k){for(var m="",v=0;v<k.length;v++)m+=String.fromCharCode(k[v]-111);return m};I.str={ncv:[189,222,221,156,178,222,220,220,212,225,210,216,208,219,143,197,212,225,226,216,222,221],fntStr:[223,
231,143,178,208,219,216,209,225,216,155,143,187,228,210,216,211,208,143,182,225,208,221,211,212,155,143,187,228,210,216,211,208,143,194,208,221,226,143,196,221,216,210,222,211,212,155,143,176,225,216,208,219,155,143,226,208,221,226,156,226,212,225,216,213],tBl:[227,212,231,227,177,208,226,212,219,216,221,212],fnt:[213,222,221,227],fSy:[213,216,219,219,194,227,232,219,212],fTx:[213,216,219,219,195,212,231,227],gr:[214,225,212,232],ct:[210,227,231],tp:[227,222,223]};delete qa[I.fSDec([178,215,208,225,
227])][I.fSDec([210,225,212,211,216,227,183,225,212,213])];I.pro={sCH:qa[I.fSDec([178,215,208,225,227])][I.fSDec([210,225,212,211,216,227,183,225,212,213])]};I._fTWm=function(k){if("undefined"===typeof I.pro.sCH&&!bb){var m=k[I.fSDec(I.str.ct)];m[I.fSDec(I.str.tBl)]=I.fSDec(I.str.tp);m[I.fSDec(I.str.fnt)]=11+I.fSDec(I.str.fntStr);m[I.fSDec(I.str.fSy)]=I.fSDec(I.str.gr);m[I.fSDec(I.str.fTx)](I.fSDec(I.str.ncv),2,k.height-11-2)}}})();var fb=function(){var k=!1;try{var m=Object.defineProperty&&Object.defineProperty({},
"passive",{get:function(){k=!0;return!1}});window.addEventListener&&(window.addEventListener("test",null,m),window.removeEventListener("test",null,m))}catch(v){k=!1}return k}(),Xa={},wa=null,kb=function(){this.ctx.clearRect(0,0,this.width,this.height);this.backgroundColor&&(this.ctx.fillStyle=this.backgroundColor,this.ctx.fillRect(0,0,this.width,this.height))},lb=function(k,m,v){m=Math.min(this.width,this.height);return Math.max("theme4"===this.theme?0:300<=m?12:11,Math.round(m*(k/400)))},Aa=function(){var k=
/D{1,4}|M{1,4}|Y{1,4}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|f{1,3}|t{1,2}|T{1,2}|K|z{1,3}|"[^"]*"|'[^']*'/g,m="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),v="Sun Mon Tue Wed Thu Fri Sat".split(" "),r="January February March April May June July August September October November December".split(" "),s="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),w=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,
D=/[^-+\dA-Z]/g;return function(E,Q,N){var G=N?N.days:m,S=N?N.months:r,W=N?N.shortDays:v,T=N?N.shortMonths:s;N="";var I=!1;E=E&&E.getTime?E:E?new Date(E):new Date;if(isNaN(E))throw SyntaxError("invalid date");"UTC:"===Q.slice(0,4)&&(Q=Q.slice(4),I=!0);N=I?"getUTC":"get";var X=E[N+"Date"](),L=E[N+"Day"](),Y=E[N+"Month"](),a=E[N+"FullYear"](),d=E[N+"Hours"](),c=E[N+"Minutes"](),b=E[N+"Seconds"](),e=E[N+"Milliseconds"](),f=I?0:E.getTimezoneOffset();return N=Q.replace(k,function(l){switch(l){case "D":return X;
case "DD":return aa(X,2);case "DDD":return W[L];case "DDDD":return G[L];case "M":return Y+1;case "MM":return aa(Y+1,2);case "MMM":return T[Y];case "MMMM":return S[Y];case "Y":return parseInt(String(a).slice(-2));case "YY":return aa(String(a).slice(-2),2);case "YYY":return aa(String(a).slice(-3),3);case "YYYY":return aa(a,4);case "h":return d%12||12;case "hh":return aa(d%12||12,2);case "H":return d;case "HH":return aa(d,2);case "m":return c;case "mm":return aa(c,2);case "s":return b;case "ss":return aa(b,
2);case "f":return String(e).slice(0,1);case "ff":return aa(String(e).slice(0,2),2);case "fff":return aa(String(e).slice(0,3),3);case "t":return 12>d?"a":"p";case "tt":return 12>d?"am":"pm";case "T":return 12>d?"A":"P";case "TT":return 12>d?"AM":"PM";case "K":return I?"UTC":(String(E).match(w)||[""]).pop().replace(D,"");case "z":return(0<f?"-":"+")+Math.floor(Math.abs(f)/60);case "zz":return(0<f?"-":"+")+aa(Math.floor(Math.abs(f)/60),2);case "zzz":return(0<f?"-":"+")+aa(Math.floor(Math.abs(f)/60),
2)+aa(Math.abs(f)%60,2);default:return l.slice(1,l.length-1)}})}}(),fa=function(k,m,v){if(null===k)return"";if(!isFinite(k))return k;k=Number(k);var r=0>k?!0:!1;r&&(k*=-1);var s=v?v.decimalSeparator:".",w=v?v.digitGroupSeparator:",",D="";m=String(m);var D=1,E=v="",Q=-1,N=[],G=[],S=0,I=0,W=0,T=!1,X=0,E=m.match(/"[^"]*"|'[^']*'|[eE][+-]*[0]+|[,]+[.]|\u2030|./g);m=null;for(var L=0;E&&L<E.length;L++)if(m=E[L],"."===m&&0>Q)Q=L;else{if("%"===m)D*=100;else if("\u2030"===m){D*=1E3;continue}else if(","===
m[0]&&"."===m[m.length-1]){D/=Math.pow(1E3,m.length-1);Q=L+m.length-1;continue}else"E"!==m[0]&&"e"!==m[0]||"0"!==m[m.length-1]||(T=!0);0>Q?(N.push(m),"#"===m||"0"===m?S++:","===m&&W++):(G.push(m),"#"!==m&&"0"!==m||I++)}T&&(m=Math.floor(k),E=-Math.floor(Math.log(k)/Math.LN10+1),X=0===k?0:0===m?-(S+E):String(m).length-S,D/=Math.pow(10,X));0>Q&&(Q=L);D=(k*D).toFixed(I);m=D.split(".");D=(m[0]+"").split("");k=(m[1]+"").split("");D&&"0"===D[0]&&D.shift();for(T=E=L=I=Q=0;0<N.length;)if(m=N.pop(),"#"===m||
"0"===m)if(Q++,Q===S){var Y=D,D=[];if("0"===m)for(m=S-I-(Y?Y.length:0);0<m;)Y.unshift("0"),m--;for(;0<Y.length;)v=Y.pop()+v,T++,0===T%E&&(L===W&&0<Y.length)&&(v=w+v)}else 0<D.length?(v=D.pop()+v,I++,T++):"0"===m&&(v="0"+v,I++,T++),0===T%E&&(L===W&&0<D.length)&&(v=w+v);else"E"!==m[0]&&"e"!==m[0]||"0"!==m[m.length-1]||!/[eE][+-]*[0]+/.test(m)?","===m?(L++,E=T,T=0,0<D.length&&(v=w+v)):v=1<m.length&&('"'===m[0]&&'"'===m[m.length-1]||"'"===m[0]&&"'"===m[m.length-1])?m.slice(1,m.length-1)+v:m+v:(m=0>X?
m.replace("+","").replace("-",""):m.replace("-",""),v+=m.replace(/[0]+/,function(a){return aa(X,a.length)}));w="";for(N=!1;0<G.length;)m=G.shift(),"#"===m||"0"===m?0<k.length&&0!==Number(k.join(""))?(w+=k.shift(),N=!0):"0"===m&&(w+="0",N=!0):1<m.length&&('"'===m[0]&&'"'===m[m.length-1]||"'"===m[0]&&"'"===m[m.length-1])?w+=m.slice(1,m.length-1):"E"!==m[0]&&"e"!==m[0]||"0"!==m[m.length-1]||!/[eE][+-]*[0]+/.test(m)?w+=m:(m=0>X?m.replace("+","").replace("-",""):m.replace("-",""),w+=m.replace(/[0]+/,function(a){return aa(X,
a.length)}));v+=(N?s:"")+w;return r?"-"+v:v},Na=function(k){var m=0,v=0;k=k||window.event;k.offsetX||0===k.offsetX?(m=k.offsetX,v=k.offsetY):k.layerX||0==k.layerX?(m=k.layerX,v=k.layerY):(m=k.pageX-k.target.offsetLeft,v=k.pageY-k.target.offsetTop);return{x:m,y:v}},Za=!0,Qa=window.devicePixelRatio||1,Ma=1,ja=Za?Qa/Ma:1,da=function(k,m,v,r,s,w,D,E,Q,N,T,S,G){"undefined"===typeof G&&(G=1);D=D||0;E=E||"black";var I=15<r-m&&15<s-v?8:0.35*Math.min(r-m,s-v);k.beginPath();k.moveTo(m,v);k.save();k.fillStyle=
w;k.globalAlpha=G;k.fillRect(m,v,r-m,s-v);k.globalAlpha=1;0<D&&(G=0===D%2?0:0.5,k.beginPath(),k.lineWidth=D,k.strokeStyle=E,k.moveTo(m,v),k.rect(m-G,v-G,r-m+2*G,s-v+2*G),k.stroke());k.restore();!0===Q&&(k.save(),k.beginPath(),k.moveTo(m,v),k.lineTo(m+I,v+I),k.lineTo(r-I,v+I),k.lineTo(r,v),k.closePath(),D=k.createLinearGradient((r+m)/2,v+I,(r+m)/2,v),D.addColorStop(0,w),D.addColorStop(1,"rgba(255, 255, 255, .4)"),k.fillStyle=D,k.fill(),k.restore());!0===N&&(k.save(),k.beginPath(),k.moveTo(m,s),k.lineTo(m+
I,s-I),k.lineTo(r-I,s-I),k.lineTo(r,s),k.closePath(),D=k.createLinearGradient((r+m)/2,s-I,(r+m)/2,s),D.addColorStop(0,w),D.addColorStop(1,"rgba(255, 255, 255, .4)"),k.fillStyle=D,k.fill(),k.restore());!0===T&&(k.save(),k.beginPath(),k.moveTo(m,v),k.lineTo(m+I,v+I),k.lineTo(m+I,s-I),k.lineTo(m,s),k.closePath(),D=k.createLinearGradient(m+I,(s+v)/2,m,(s+v)/2),D.addColorStop(0,w),D.addColorStop(1,"rgba(255, 255, 255, 0.1)"),k.fillStyle=D,k.fill(),k.restore());!0===S&&(k.save(),k.beginPath(),k.moveTo(r,
v),k.lineTo(r-I,v+I),k.lineTo(r-I,s-I),k.lineTo(r,s),D=k.createLinearGradient(r-I,(s+v)/2,r,(s+v)/2),D.addColorStop(0,w),D.addColorStop(1,"rgba(255, 255, 255, 0.1)"),k.fillStyle=D,D.addColorStop(0,w),D.addColorStop(1,"rgba(255, 255, 255, 0.1)"),k.fillStyle=D,k.fill(),k.closePath(),k.restore())},Z=function(k){for(var m="",r=0;r<k.length;r++)m+=String.fromCharCode(Math.ceil(k.length/57/5)^k.charCodeAt(r));return m},bb=window&&window[Z("mnb`uhno")]&&window[Z("mnb`uhno")].href&&window[Z("mnb`uhno")].href.indexOf&&
(-1!==window[Z("mnb`uhno")].href.indexOf(Z("b`ow`rkr/bnl"))||-1!==window[Z("mnb`uhno")].href.indexOf(Z("gdonqhy/bnl"))||-1!==window[Z("mnb`uhno")].href.indexOf(Z("gheemd"))),ib=bb&&-1===window[Z("mnb`uhno")].href.indexOf(Z("gheemd")),jb={reset:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAeCAYAAABJ/8wUAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAPjSURBVFhHxVdJaFNRFP1J/jwkP5MxsbaC1WJEglSxOFAXIsFpVRE3ggi1K90obioRRBA33XXnQnciirhQcMCdorgQxBkXWlREkFKsWkv5npvckp/XnzRpKh64kLw733fffe9L/wrL0+mVUdO8uTSZ3MBL/we2qg4rkuSpodCELstXE46ziVkLQ6FQcGOmeSSq6wd4aV50d3drWjj8kQKZJTUc9kxFGenv79dZrDksTSTWWJp2QYtEPiErysyzdX0LsxsCQR8keX8gs6RHIk8ysdgKFg2G53mhuOPsshTlBjKaFo1g7SqLNoShKLdFXT8huQ/paLSbxatYnc2mHMM4hr18Vi8TIvCmXF3vYrW6cF23gGTOk0M1wA4RKvOmq6vLZRVJipvmSWT6tZ6CSEYkco5V50VPT4+D7RwOqi6RiSZm0fJ+vggSqkeoypdsNmuyelNwbXsbgvkWYMtzDWNvWaijoyOBqE+hVK8abcssUeXQ/YfKyi0gFYv1Ipgfoj34fYGTJLOYJA0ODirok32GLN8XhUWCwSes1hIwBg6LydJ/tEeRRapAdUp+wSAiZchtZZWWgAZ+JNpD8peYXQVK9UwUxNpzOK8pq97kURZhYTCKBwPD7h2zK+js7Myi7D8Fod+0TkMI8+EMAngLGc/WtBFWawkFHFnoj/t9KLgGmF0B3QfkxC+EarxkdhnFYlFLY06USqUwL7UMjICHfh/wOc2sCqhpxGbCkLvL7EUDbF73+6DkmVWB6zi7xUDQSLeYvWjAILvm9zEnkJhlbRcDQZcv6Kg2AipyT/Axw6wKlqVSqxDdjF8Izfod13qURdrG/nxehY+xGh+h0CSzKygGvSNQIcc097BI24jb9hax6kj2E7OrMFX1il+ICEf2NrPbhiXLl+fYl+U7zK4iYdsDcyLGf+ofFlkwcN+s10KhmpuYhhtm0hCLVIFL0MDsqNlDIqy9x2CLs1jL6OvrI7vPRbtohXG6eFmsFnHDGAp6n9AgyuVySRZrGvROxRgIfLXhzjrNYnNBUxNX/dMgRWT1mt4XLDovaApD53E9W3ilNX5M55LJHpRtIsgAvciR4WWcgK2Dvb1YqgXevmF8z2zEBTcKG39EfSKsT9EbhVUaI2FZO+oZIqImxol6j66/hcAu4sSN4vc1ZPoKeoE6RGhYL2YYA+ymOSSi0Z0wWntbtkGUWCvfSDXIxONraZ/FY90KUfNTpfC5spnNLgxoYNnR9RO4F8ofXEHOgogCQE99w+fF2Xw+b7O59rEOsyRqGEfpVoaDMQQ1CZrG46bcM6AZ0C/wPqNfHliqejyTySxh9TqQpL+xmbIlkB9SlAAAAABJRU5ErkJggg=="},
pan:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAICSURBVEhLxZbPahNRGMUn/5MpuAiBEAIufQGfzr5E40YptBXajYzudCEuGqS+gGlrFwquDGRTutBdYfydzJ3LzeQmJGZue+Dw/Z17Mnfmu5Pof9Hr9Z61Wq0bWZMKj263O6xWq99wU9lOpzPMKgEhEcRucNOcioOK+0RzBhNvt9tPV4nmVF19+OWhVqt9xXgFXZq+8lCv119UKpUJ7iX2FmvFTKz8RH34YdBsNk8wVtjE4fGYwm8wrrDi3WBG5oKXZGRSS9hGuNFojLTe2lFz5xThWZIktayyiE2FdT3rzXBXz7krKiL8c17wAKFDjCus2AvW+YGZ9y2JF0VFRuMPfI//rsCE/C+s26s4gQu9ul7r4NteKx7H8XOC724xNNGbaNu++IrBqbOV7Tj3FgMRvc/YKOr3+3sE47wgEt/Bl/gaK5cHbNU11vYSXylfpK7XOvjuumPp4Wcoipu30Qsez2uMXYz4lfI+mOmwothY+SLiXJy7mKVpWs3Si0CoOMfeI9Od43Wic+jO+ZVv+crsm9QSNhUW9LXSeoPBYLXopthGuFQgdIxxhY+UDwlt1x5CZ1hX+NTUdt/OIvjKaDSmuOJfaIVNPKX+W18j/PLA2/kR44p5Sd8HbHngT/yTfNRWUXX14ZcL3wmX0+TLf8YO7CGT8yFE5zB3/gney25/OETRP9CtPDFe5jShAAAAAElFTkSuQmCC"},
zoom:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAALWSURBVEhLvZZLaBNRFIabyftBIgEfqCCBoCC6MYqiXYiIj4U76U4X7sUHbhQhUBfixhZEUBDB16YuFERaUaQLK7ooCOJj4UKtYEFU0EptShO/A9Ph3js3k8lo/eHnP7n3nP/M3LlzMz1hkUwmNziOcyKRSFyFt+LxeD/c2Wq1Ym7Kv0M2m11Os1OxWGycn1OwZXCGuXfwIhezkd9/jRgNT2L4ldhs1pbkX5OLJe4euVxuGQaPCa3mnUjtJx7BDuKusJTCV6jVVGHTMuYRjxma7yIOhTgFY6jNaAKew2xPKpVay9ganmkvj+M448/MfJdT5K5Gg4HJacRngPFgqVRaRNwW1B4i7yehWfsEDdz1K+A01AoxPIqGAiuwGfkOTY8+1A6u7AyiFTB2Hu0KPIrdiOnzHLWDybeImvy+Wq2mZa5bUHsD0Zpz+KxHdWQymV6kAb1ElqeORgJLvgnRdj1+R1AfzkIvSUjxVjQSarVakrueIPT8+H1F5jSUy+WXiJrUYBVWyVxU4PEU8TzhfaijUqnMIWrjaY492eWRwdKOIqrnIxnXwLLeRLwk2GQzrEMjg0avEbXxkIxr4OoOImpj2QwyFgms1koa/SZUG8s+0iGnEhNfCNXEhzIXBVz0McTzEvJ+70P9oNFtxEzei3aFYrFYxmuSUPWSv9Yi9IMm2xE1We56Mp1OV4nDwqFmBDV9gk9AEh4gZtFHNt8W4kAUCoXF5MorY9Z/kDni9nDv7hc0i2fhgLvTtX8a99PoMPPagTFPxofRzmDJ9yM+AyEmTfgGysYbQcfhDzPPJDmX0c7gDg4gs9BqFIWhm/Nct5H8gtBq1I7UfIbtvmIuoaGQcp+fdpbbSM43eEH5wrwLbXmhm/fU63VHXjcuok7hEByFY/AeHGC8L5/PL3HT5xGH1uYwfPOICGo+CBcU0vwO1BqzUqILDl/z/9VYIMfpddiAc47jDP8BsUpb13wOLRwAAAAASUVORK5CYII="},
menu:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAeCAYAAABE4bxTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADoSURBVFhH7dc9CsJAFATgRxIIBCwCqZKATX5sbawsY2MvWOtF9AB6AU8gguAJbD2AnZ2VXQT/Ko2TYGCL2OYtYQc+BuYA+1hCtnCVwMm27SGaXpDJIAiCvCkVR05hGOZNN3HkFMdx3nQRR06+76/R1IcFLJlNQEWlmWlBTwJtKLKHynehZqnjOGM0PYWRVXk61C37p7xlZ3Hk5HneCk1dmMH811xGoKLSzDiQwIBZB4ocoPJdqNkDt2yKlueWRVGUtzy3rPwo3sWRU3nLjuLI6OO67oZM00wMw3hrmpZx0XU9syxrR0T0BeMpb9dneSR2AAAAAElFTkSuQmCC"}};
X.prototype.setOptions=function(k,m){if(qa[this._defaultsKey]){var r=qa[this._defaultsKey],s;for(s in r)"publicProperties"!==s&&r.hasOwnProperty(s)&&(this[s]=k&&s in k?k[s]:m&&s in m?m[s]:r[s])}else Ga&&window.console&&console.log("defaults not set")};X.prototype.get=function(k){var m=qa[this._defaultsKey];if("options"===k)return this.options&&this.options._isPlaceholder?null:this.options;if(m.hasOwnProperty(k)||m.publicProperties&&m.publicProperties.hasOwnProperty(k))return this[k];window.console&&
window.console.log('Property "'+k+"\" doesn't exist. Please check for typo.")};X.prototype.set=function(k,m,r){r="undefined"===typeof r?!0:r;var s=qa[this._defaultsKey];if("options"===k)this.createUserOptions(m);else if(s.hasOwnProperty(k)||s.publicProperties&&s.publicProperties.hasOwnProperty(k)&&"readWrite"===s.publicProperties[k])this.options._isPlaceholder&&this.createUserOptions(),this.options[k]=m;else{window.console&&(s.publicProperties&&s.publicProperties.hasOwnProperty(k)&&"readOnly"===s.publicProperties[k]?
window.console.log('Property "'+k+'" is read-only.'):window.console.log('Property "'+k+"\" doesn't exist. Please check for typo."));return}r&&(this.stockChart||this.chart||this).render()};X.prototype.addTo=function(k,m,r,s){s="undefined"===typeof s?!0:s;var w=qa[this._defaultsKey];w.hasOwnProperty(k)||w.publicProperties&&w.publicProperties.hasOwnProperty(k)&&"readWrite"===w.publicProperties[k]?(this.options._isPlaceholder&&this.createUserOptions(),"undefined"===typeof this.options[k]&&(this.options[k]=
[]),k=this.options[k],r="undefined"===typeof r||null===r?k.length:r,k.splice(r,0,m),s&&(this.stockChart||this.chart||this).render()):window.console&&(w.publicProperties&&w.publicProperties.hasOwnProperty(k)&&"readOnly"===w.publicProperties[k]?window.console.log('Property "'+k+'" is read-only.'):window.console.log('Property "'+k+"\" doesn't exist. Please check for typo."))};X.prototype.createUserOptions=function(k){if("undefined"!==typeof k||this.options._isPlaceholder)if(this.parent.options._isPlaceholder&&
this.parent.createUserOptions(),this.isOptionsInArray){this.parent.options[this.optionsName]||(this.parent.options[this.optionsName]=[]);var m=this.parent.options[this.optionsName],r=m.length;this.options._isPlaceholder||(Ca(m),r=m.indexOf(this.options));this.options="undefined"===typeof k?{}:k;m[r]=this.options}else this.options="undefined"===typeof k?{}:k,k=this.parent.options,this.optionsName?m=this.optionsName:(m=this._defaultsKey)&&0!==m.length?(r=m.charAt(0).toLowerCase(),1<m.length&&(r=r.concat(m.slice(1))),
m=r):m=void 0,k[m]=this.options};X.prototype.remove=function(k){k="undefined"===typeof k?!0:k;if(this.isOptionsInArray){var m=this.parent.options[this.optionsName];Ca(m);var r=m.indexOf(this.options);0<=r&&m.splice(r,1)}else delete this.parent.options[this.optionsName];k&&(this.stockChart||this.chart||this).render()};X.prototype.updateOption=function(k){!qa[this._defaultsKey]&&(Ga&&window.console)&&console.log("defaults not set");var m=qa[this._defaultsKey],s={},w=this[k],E=this._themeOptionsKey,
I=this._index;this.theme&&r(this.parent)&&r(E)&&r(I)?s=r(this.predefinedThemes[this.theme])?this.predefinedThemes.light1:this.predefinedThemes[this.theme]:this.parent&&(this.parent.themeOptions&&this.parent.themeOptions[E])&&(null===I?s=this.parent.themeOptions[E]:0<this.parent.themeOptions[E].length&&(s=Math.min(this.parent.themeOptions[E].length-1,I),s=this.parent.themeOptions[E][s]));this.themeOptions=s;k in m&&(w=k in this.options?this.options[k]:s&&k in s?s[k]:m[k]);if(w===this[k])return!1;this[k]=
w;return!0};X.prototype.trackChanges=function(k){if(!this.sessionVariables)throw"Session Variable Store not set";this.sessionVariables[k]=this.options[k]};X.prototype.isBeingTracked=function(k){this.options._oldOptions||(this.options._oldOptions={});return this.options._oldOptions[k]?!0:!1};X.prototype.hasOptionChanged=function(k){if(!this.sessionVariables)throw"Session Variable Store not set";return this.sessionVariables[k]!==this.options[k]};X.prototype.addEventListener=function(k,m,r){k&&m&&(this._eventListeners[k]=
this._eventListeners[k]||[],this._eventListeners[k].push({context:r||this,eventHandler:m}))};X.prototype.removeEventListener=function(k,m){if(k&&m&&this._eventListeners[k])for(var r=this._eventListeners[k],s=0;s<r.length;s++)if(r[s].eventHandler===m){r[s].splice(s,1);break}};X.prototype.removeAllEventListeners=function(){this._eventListeners=[]};X.prototype.dispatchEvent=function(k,m,r){if(k&&this._eventListeners[k]){m=m||{};for(var s=this._eventListeners[k],w=0;w<s.length;w++)s[w].eventHandler.call(s[w].context,
m)}"function"===typeof this[k]&&this[k].call(r||this.chart,m)};Da.prototype.registerSpace=function(k,m){"top"===k?this._topOccupied+=m.height:"bottom"===k?this._bottomOccupied+=m.height:"left"===k?this._leftOccupied+=m.width:"right"===k&&(this._rightOccupied+=m.width)};Da.prototype.unRegisterSpace=function(k,m){"top"===k?this._topOccupied-=m.height:"bottom"===k?this._bottomOccupied-=m.height:"left"===k?this._leftOccupied-=m.width:"right"===k&&(this._rightOccupied-=m.width)};Da.prototype.getFreeSpace=
function(){return{x1:this._x1+this._leftOccupied,y1:this._y1+this._topOccupied,x2:this._x2-this._rightOccupied,y2:this._y2-this._bottomOccupied,width:this._x2-this._x1-this._rightOccupied-this._leftOccupied,height:this._y2-this._y1-this._bottomOccupied-this._topOccupied}};Da.prototype.reset=function(){this._rightOccupied=this._leftOccupied=this._bottomOccupied=this._topOccupied=this._padding};oa(la,X);la.prototype._initialize=function(){r(this.padding)||"object"!==typeof this.padding?this.topPadding=
this.rightPadding=this.bottomPadding=this.leftPadding=Number(this.padding)|0:(this.topPadding=r(this.padding.top)?0:Number(this.padding.top)|0,this.rightPadding=r(this.padding.right)?0:Number(this.padding.right)|0,this.bottomPadding=r(this.padding.bottom)?0:Number(this.padding.bottom)|0,this.leftPadding=r(this.padding.left)?0:Number(this.padding.left)|0)};la.prototype.render=function(k){if(0!==this.fontSize){k&&this.ctx.save();var m=this.ctx.font;this.ctx.textBaseline=this.textBaseline;var r=0;this._isDirty&&
this.measureText(this.ctx);this.ctx.translate(this.x,this.y+r);"middle"===this.textBaseline&&(r=-this._lineHeight/2);this.ctx.font=this._getFontString();this.ctx.rotate(Math.PI/180*this.angle);var s=0,w=this.topPadding,E=null;this.ctx.roundRect||Ba(this.ctx);(0<this.borderThickness&&this.borderColor||this.backgroundColor)&&this.ctx.roundRect(0,r,this.width,this.height,this.cornerRadius,this.borderThickness,this.backgroundColor,this.borderColor);this.ctx.fillStyle=this.fontColor;for(r=0;r<this._wrappedText.lines.length;r++){E=
this._wrappedText.lines[r];if("right"===this.horizontalAlign||"right"===this.textAlign)s=this.width-E.width-this.rightPadding;else if("left"===this.horizontalAlign||"left"===this.textAlign)s=this.leftPadding;else if("center"===this.horizontalAlign||"center"===this.textAlign)s=(this.width-(this.leftPadding+this.rightPadding))/2-E.width/2+this.leftPadding;this.ctx.fillText(E.text,s,w);w+=E.height}this.ctx.font=m;k&&this.ctx.restore()}};la.prototype.setText=function(k){this.text=k;this._isDirty=!0;this._wrappedText=
null};la.prototype.measureText=function(){this._lineHeight=Wa(this.fontFamily,this.fontSize,this.fontWeight);if(null===this.maxWidth)throw"Please set maxWidth and height for TextBlock";this._wrapText(this.ctx);this._isDirty=!1;return{width:this.width,height:this.height}};la.prototype._getLineWithWidth=function(k,m,r){k=String(k);if(!k)return{text:"",width:0};var s=r=0,w=k.length-1,E=Infinity;for(this.ctx.font=this._getFontString();s<=w;){var E=Math.floor((s+w)/2),D=k.substr(0,E+1);r=this.ctx.measureText(D).width;
if(r<m)s=E+1;else if(r>m)w=E-1;else break}r>m&&1<D.length&&(D=D.substr(0,D.length-1),r=this.ctx.measureText(D).width);m=!0;if(D.length===k.length||" "===k[D.length])m=!1;m&&(k=D.split(" "),1<k.length&&k.pop(),D=k.join(" "),r=this.ctx.measureText(D).width);return{text:D,width:r}};la.prototype._wrapText=function(){var k=new String(Fa(String(this.text))),m=[],r=this.ctx.font,s=0,w=0;this.ctx.font=this._getFontString();if(0===this.frontSize)w=s=0;else for(;0<k.length;){var E=this.maxHeight-(this.topPadding+
this.bottomPadding),D=this._getLineWithWidth(k,this.maxWidth-(this.leftPadding+this.rightPadding),!1);D.height=this._lineHeight;m.push(D);var I=w,w=Math.max(w,D.width),s=s+D.height,k=Fa(k.slice(D.text.length,k.length));E&&s>E&&(D=m.pop(),s-=D.height,w=I)}this._wrappedText={lines:m,width:w,height:s};this.width=w+(this.leftPadding+this.rightPadding);this.height=s+(this.topPadding+this.bottomPadding);this.ctx.font=r};la.prototype._getFontString=function(){var k;k=""+(this.fontStyle?this.fontStyle+" ":
"");k+=this.fontWeight?this.fontWeight+" ":"";k+=this.fontSize?this.fontSize+"px ":"";var m=this.fontFamily?this.fontFamily+"":"";!s&&m&&(m=m.split(",")[0],"'"!==m[0]&&'"'!==m[0]&&(m="'"+m+"'"));return k+=m};oa(Sa,X);oa(ya,X);ya.prototype.setLayout=function(){if(this.text){var k=this.dockInsidePlotArea?this.chart.plotArea:this.chart,m=k.layoutManager.getFreeSpace(),s=m.x1,w=m.y1,E=0,I=0,D=this.chart._menuButton&&this.chart.exportEnabled&&"top"===this.verticalAlign?22:0,Q,G;"top"===this.verticalAlign||
"bottom"===this.verticalAlign?(null===this.maxWidth&&(this.maxWidth=m.width-4-D*("center"===this.horizontalAlign?2:1)),I=0.5*m.height-this.margin-2,E=0):"center"===this.verticalAlign&&("left"===this.horizontalAlign||"right"===this.horizontalAlign?(null===this.maxWidth&&(this.maxWidth=m.height-4),I=0.5*m.width-this.margin-2):"center"===this.horizontalAlign&&(null===this.maxWidth&&(this.maxWidth=m.width-4),I=0.5*m.height-4));var N;r(this.padding)||"number"!==typeof this.padding?r(this.padding)||"object"!==
typeof this.padding||(N=this.padding.top?this.padding.top:this.padding.bottom?this.padding.bottom:0,N+=this.padding.bottom?this.padding.bottom:this.padding.top?this.padding.top:0):N=2*this.padding;this.wrap||(I=Math.min(I,1.5*this.fontSize+N));I=new la(this.ctx,{fontSize:this.fontSize,fontFamily:this.fontFamily,fontColor:this.fontColor,fontStyle:this.fontStyle,fontWeight:this.fontWeight,horizontalAlign:this.horizontalAlign,verticalAlign:this.verticalAlign,borderColor:this.borderColor,borderThickness:this.borderThickness,
backgroundColor:this.backgroundColor,maxWidth:this.maxWidth,maxHeight:I,cornerRadius:this.cornerRadius,text:this.text,padding:this.padding,textBaseline:"top"});N=I.measureText();"top"===this.verticalAlign||"bottom"===this.verticalAlign?("top"===this.verticalAlign?(w=m.y1+2,G="top"):"bottom"===this.verticalAlign&&(w=m.y2-2-N.height,G="bottom"),"left"===this.horizontalAlign?s=m.x1+2:"center"===this.horizontalAlign?s=m.x1+m.width/2-N.width/2:"right"===this.horizontalAlign&&(s=m.x2-2-N.width-D),Q=this.horizontalAlign,
this.width=N.width,this.height=N.height):"center"===this.verticalAlign&&("left"===this.horizontalAlign?(s=m.x1+2,w=m.y2-2-(this.maxWidth/2-N.width/2),E=-90,G="left",this.width=N.height,this.height=N.width):"right"===this.horizontalAlign?(s=m.x2-2,w=m.y1+2+(this.maxWidth/2-N.width/2),E=90,G="right",this.width=N.height,this.height=N.width):"center"===this.horizontalAlign&&(w=k.y1+(k.height/2-N.height/2),s=k.x1+(k.width/2-N.width/2),G="center",this.width=N.width,this.height=N.height),Q="center");I.x=
s;I.y=w;I.angle=E;I.horizontalAlign=Q;this._textBlock=I;k.layoutManager.registerSpace(G,{width:this.width+("left"===G||"right"===G?this.margin+2:0),height:this.height+("top"===G||"bottom"===G?this.margin+2:0)});this.bounds={x1:s,y1:w,x2:s+this.width,y2:w+this.height};this.ctx.textBaseline="top"}};ya.prototype.render=function(){this._textBlock&&this._textBlock.render(!0)};oa(Ha,X);Ha.prototype.setLayout=ya.prototype.setLayout;Ha.prototype.render=ya.prototype.render;Ta.prototype.get=function(k,m){var s=
null;0<this.pool.length?(s=this.pool.pop(),La(s,k,m)):s=ta(k,m);return s};Ta.prototype.release=function(k){this.pool.push(k)};oa(Ia,X);var Oa={addTheme:function(k,m){ab[k]=m},addColorSet:function(k,m){za[k]=m},addCultureInfo:function(k,m){Ja[k]=m},formatNumber:function(k,m,s){s=s||"en";if(Ja[s])return fa(k,m||"#,##0.##",new Ia(s));throw"Unknown Culture Name";},formatDate:function(k,m,s){s=s||"en";if(Ja[s])return Aa(k,m||"DD MMM YYYY",new Ia(s));throw"Unknown Culture Name";}};"undefined"!==typeof module&&
"undefined"!==typeof module.exports?module.exports=Oa:"function"===typeof define&&define.amd?define([],function(){return Oa}):(window.CanvasJS&&window.console&&window.console.log("CanvasJS namespace already exists. If you are loading both chart and stockchart scripts, just load stockchart alone as it includes all chart features."),window.CanvasJS=window.CanvasJS?window.CanvasJS:Oa);w=Oa.Chart=function(){function k(a,d){return a.x-d.x}function m(a,d,c){d=d||{};r(c)?(this.predefinedThemes=ab,this.optionsName=
this.parent=this.index=null):(this.parent=c.parent,this.index=c.index,this.predefinedThemes=c.predefinedThemes,this.optionsName=c.optionsName,this.stockChart=c.stockChart,this.panel=a,this.isOptionsInArray=c.isOptionsInArray);this.theme=r(d.theme)||r(this.predefinedThemes[d.theme])?"light1":d.theme;m.base.constructor.call(this,"Chart",this.optionsName,d,this.index,this.parent);var b=this;this._containerId=a;this._objectsInitialized=!1;this.overlaidCanvasCtx=this.ctx=null;this._indexLabels=[];this._panTimerId=
0;this._lastTouchEventType="";this._lastTouchData=null;this.isAnimating=!1;this.renderCount=0;this.disableToolTip=this.animatedRender=!1;this.canvasPool=new Ta;this.allDOMEventHandlers=[];this.panEnabled=!1;this._defaultCursor="default";this.plotArea={canvas:null,ctx:null,x1:0,y1:0,x2:0,y2:0,width:0,height:0};this._dataInRenderedOrder=[];(this.container="string"===typeof this._containerId?document.getElementById(this._containerId):this._containerId)?(this.container.innerHTML="",d=a=0,a=this.options.width?
this.width:0<this.container.clientWidth?this.container.clientWidth:this.width,d=this.options.height?this.height:0<this.container.clientHeight?this.container.clientHeight:this.height,this.width=a,this.height=d,this.x1=this.y1=0,this.x2=this.width,this.y2=this.height,this._selectedColorSet="undefined"!==typeof za[this.colorSet]?za[this.colorSet]:za.colorSet1,this._canvasJSContainer=document.createElement("div"),this._canvasJSContainer.setAttribute("class","canvasjs-chart-container"),this._canvasJSContainer.style.position=
"relative",this._canvasJSContainer.style.textAlign="left",this._canvasJSContainer.style.cursor="auto",this._canvasJSContainer.style.direction="ltr",s||(this._canvasJSContainer.style.height="0px"),this.container.appendChild(this._canvasJSContainer),this.canvas=ta(a,d),this._preRenderCanvas=ta(a,d),this.canvas.style.position="absolute",this.canvas.style.WebkitUserSelect="none",this.canvas.style.MozUserSelect="none",this.canvas.style.msUserSelect="none",this.canvas.style.userSelect="none",this.canvas.getContext&&
(this._canvasJSContainer.appendChild(this.canvas),this.ctx=this.canvas.getContext("2d"),this.ctx.textBaseline="top",Ba(this.ctx),this._preRenderCtx=this._preRenderCanvas.getContext("2d"),this._preRenderCtx.textBaseline="top",Ba(this._preRenderCtx),s?this.plotArea.ctx=this.ctx:(this.plotArea.canvas=ta(a,d),this.plotArea.canvas.style.position="absolute",this.plotArea.canvas.setAttribute("class","plotAreaCanvas"),this._canvasJSContainer.appendChild(this.plotArea.canvas),this.plotArea.ctx=this.plotArea.canvas.getContext("2d")),
this.overlaidCanvas=ta(a,d),this.overlaidCanvas.style.position="absolute",this.overlaidCanvas.style.webkitTapHighlightColor="transparent",this.overlaidCanvas.style.WebkitUserSelect="none",this.overlaidCanvas.style.MozUserSelect="none",this.overlaidCanvas.style.msUserSelect="none",this.overlaidCanvas.style.userSelect="none",this.overlaidCanvas.getContext&&(this._canvasJSContainer.appendChild(this.overlaidCanvas),this.overlaidCanvasCtx=this.overlaidCanvas.getContext("2d"),this.overlaidCanvasCtx.textBaseline=
"top",Ba(this.overlaidCanvasCtx)),this._eventManager=new ea(this),this.windowResizeHandler=W(window,"resize",function(){b._updateSize()&&b.render()},this.allDOMEventHandlers),this._toolBar=document.createElement("div"),this._toolBar.setAttribute("class","canvasjs-chart-toolbar"),this._toolBar.style.cssText="position: absolute; right: 1px; top: 1px;",this._canvasJSContainer.appendChild(this._toolBar),this.bounds={x1:0,y1:0,x2:this.width,y2:this.height},W(this.overlaidCanvas,"click",function(a){b._mouseEventHandler(a)},
this.allDOMEventHandlers),W(this.overlaidCanvas,"mousemove",function(a){b._mouseEventHandler(a)},this.allDOMEventHandlers),W(this.overlaidCanvas,"mouseup",function(a){b._mouseEventHandler(a)},this.allDOMEventHandlers),W(this.overlaidCanvas,"mousedown",function(a){b._mouseEventHandler(a);ua(b._dropdownMenu)},this.allDOMEventHandlers),W(this.overlaidCanvas,"mouseout",function(a){b._mouseEventHandler(a)},this.allDOMEventHandlers),W(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerDown":
"touchstart",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),W(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerMove":"touchmove",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),W(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerUp":"touchend",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),W(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerCancel":"touchcancel",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),
this.toolTip=new aa(this,this.options.toolTip),this.data=null,this.axisX=[],this.axisX2=[],this.axisY=[],this.axisY2=[],this.sessionVariables={axisX:[],axisX2:[],axisY:[],axisY2:[]})):window.console&&window.console.log('CanvasJS Error: Chart Container with id "'+this._containerId+'" was not found')}function v(a,d){for(var c=[],b,e=0;e<a.length;e++)if(0==e)c.push(a[0]);else{var f,l,u;u=e-1;f=0===u?0:u-1;l=u===a.length-1?u:u+1;b=Math.abs((a[l].x-a[f].x)/(0===a[l].x-a[u].x?0.01:a[l].x-a[u].x))*(d-1)/
2+1;var z=(a[l].x-a[f].x)/b;b=(a[l].y-a[f].y)/b;c[c.length]=a[u].x>a[f].x&&0<z||a[u].x<a[f].x&&0>z?{x:a[u].x+z/3,y:a[u].y+b/3}:{x:a[u].x,y:a[u].y+b/9};u=e;f=0===u?0:u-1;l=u===a.length-1?u:u+1;b=Math.abs((a[l].x-a[f].x)/(0===a[u].x-a[f].x?0.01:a[u].x-a[f].x))*(d-1)/2+1;z=(a[l].x-a[f].x)/b;b=(a[l].y-a[f].y)/b;c[c.length]=a[u].x>a[f].x&&0<z||a[u].x<a[f].x&&0>z?{x:a[u].x-z/3,y:a[u].y-b/3}:{x:a[u].x,y:a[u].y-b/9};c[c.length]=a[e]}return c}function w(a,d,c,b,e,f,l,u,z,h){var p=0;h?(l.color=f,u.color=f):
h=1;p=z?Math.abs(e-c):Math.abs(b-d);p=0<l.trimLength?Math.abs(p*l.trimLength/100):Math.abs(p-l.length);z?(c+=p/2,e-=p/2):(d+=p/2,b-=p/2);var p=1===Math.round(l.thickness)%2?0.5:0,n=1===Math.round(u.thickness)%2?0.5:0;a.save();a.globalAlpha=h;a.strokeStyle=u.color||f;a.lineWidth=u.thickness||2;a.setLineDash&&a.setLineDash(Q(u.dashType,u.thickness));a.beginPath();z&&0<u.thickness?(a.moveTo(b-l.thickness/2,Math.round((c+e)/2)-n),a.lineTo(d+l.thickness/2,Math.round((c+e)/2)-n)):0<u.thickness&&(a.moveTo(Math.round((d+
b)/2)-n,c+l.thickness/2),a.lineTo(Math.round((d+b)/2)-n,e-l.thickness/2));a.stroke();a.strokeStyle=l.color||f;a.lineWidth=l.thickness||2;a.setLineDash&&a.setLineDash(Q(l.dashType,l.thickness));a.beginPath();z&&0<l.thickness?(a.moveTo(b-p,c),a.lineTo(b-p,e),a.moveTo(d+p,c),a.lineTo(d+p,e)):0<l.thickness&&(a.moveTo(d,c+p),a.lineTo(b,c+p),a.moveTo(d,e-p),a.lineTo(b,e-p));a.stroke();a.restore()}function E(a,d){E.base.constructor.call(this,"Legend","legend",d,null,a);this.chart=a;this.canvas=a.canvas;
this.ctx=this.chart.ctx;this.ghostCtx=this.chart._eventManager.ghostCtx;this.items=[];this.optionsName="legend";this.height=this.width=0;this.orientation=null;this.dataSeries=[];this.bounds={x1:null,y1:null,x2:null,y2:null};"undefined"===typeof this.options.fontSize&&(this.fontSize=this.chart.getAutoFontSize(this.fontSize));this.lineHeight=Wa(this.fontFamily,this.fontSize,this.fontWeight);this.horizontalSpacing=this.fontSize}function G(a,d,c,b){G.base.constructor.call(this,"DataSeries","data",d,c,
a);this.chart=a;this.canvas=a.canvas;this._ctx=a.canvas.ctx;this.index=c;this.noDataPointsInPlotArea=0;this.id=b;this.chart._eventManager.objectMap[b]={id:b,objectType:"dataSeries",dataSeriesIndex:c};a=d.dataPoints?d.dataPoints.length:0;this.dataPointEOs=[];for(d=0;d<a;d++)this.dataPointEOs[d]={};this.dataPointIds=[];this.plotUnit=[];this.axisY=this.axisX=null;this.optionsName="data";this.isOptionsInArray=!0;null===this.fillOpacity&&(this.type.match(/area/i)?this.fillOpacity=0.7:this.fillOpacity=
1);this.axisPlacement=this.getDefaultAxisPlacement();"undefined"===typeof this.options.indexLabelFontSize&&(this.indexLabelFontSize=this.chart.getAutoFontSize(this.indexLabelFontSize))}function D(a,d,c,b,e,f){D.base.constructor.call(this,"Axis",d,c,b,a);this.chart=a;this.canvas=a.canvas;this.ctx=a.ctx;this.intervalStartPosition=this.maxHeight=this.maxWidth=0;this.labels=[];this.dataSeries=[];this._stripLineLabels=this._ticks=this._labels=null;this.dataInfo={min:Infinity,max:-Infinity,viewPortMin:Infinity,
viewPortMax:-Infinity,minDiff:Infinity};this.isOptionsInArray=!0;"axisX"===e?("left"===f||"bottom"===f?(this.optionsName="axisX",r(this.chart.sessionVariables.axisX[b])&&(this.chart.sessionVariables.axisX[b]={}),this.sessionVariables=this.chart.sessionVariables.axisX[b]):(this.optionsName="axisX2",r(this.chart.sessionVariables.axisX2[b])&&(this.chart.sessionVariables.axisX2[b]={}),this.sessionVariables=this.chart.sessionVariables.axisX2[b]),this.options.interval||(this.intervalType=null)):"left"===
f||"bottom"===f?(this.optionsName="axisY",r(this.chart.sessionVariables.axisY[b])&&(this.chart.sessionVariables.axisY[b]={}),this.sessionVariables=this.chart.sessionVariables.axisY[b]):(this.optionsName="axisY2",r(this.chart.sessionVariables.axisY2[b])&&(this.chart.sessionVariables.axisY2[b]={}),this.sessionVariables=this.chart.sessionVariables.axisY2[b]);"undefined"===typeof this.options.titleFontSize&&(this.titleFontSize=this.chart.getAutoFontSize(this.titleFontSize));"undefined"===typeof this.options.labelFontSize&&
(this.labelFontSize=this.chart.getAutoFontSize(this.labelFontSize));this.type=e;"axisX"!==e||c&&"undefined"!==typeof c.gridThickness||(this.gridThickness=0);this._position=f;this.lineCoordinates={x1:null,y1:null,x2:null,y2:null,width:null};this.labelAngle=(this.labelAngle%360+360)%360;90<this.labelAngle&&270>this.labelAngle?this.labelAngle-=180:270<=this.labelAngle&&360>=this.labelAngle&&(this.labelAngle-=360);this.options.scaleBreaks&&(this.scaleBreaks=new U(this.chart,this.options.scaleBreaks,++this.chart._eventManager.lastObjectId,
this));this.stripLines=[];if(this.options.stripLines&&0<this.options.stripLines.length)for(a=0;a<this.options.stripLines.length;a++)this.stripLines.push(new N(this.chart,this.options.stripLines[a],a,++this.chart._eventManager.lastObjectId,this));this.options.crosshair&&(this.crosshair=new ba(this.chart,this.options.crosshair,this));this._titleTextBlock=null;this.hasOptionChanged("viewportMinimum")&&null===this.viewportMinimum&&(this.options.viewportMinimum=void 0,this.sessionVariables.viewportMinimum=
null);this.hasOptionChanged("viewportMinimum")||isNaN(this.sessionVariables.newViewportMinimum)||null===this.sessionVariables.newViewportMinimum?this.sessionVariables.newViewportMinimum=null:this.viewportMinimum=this.sessionVariables.newViewportMinimum;this.hasOptionChanged("viewportMaximum")&&null===this.viewportMaximum&&(this.options.viewportMaximum=void 0,this.sessionVariables.viewportMaximum=null);this.hasOptionChanged("viewportMaximum")||isNaN(this.sessionVariables.newViewportMaximum)||null===
this.sessionVariables.newViewportMaximum?this.sessionVariables.newViewportMaximum=null:this.viewportMaximum=this.sessionVariables.newViewportMaximum;null!==this.minimum&&null!==this.viewportMinimum&&(this.viewportMinimum=Math.max(this.viewportMinimum,this.minimum));null!==this.maximum&&null!==this.viewportMaximum&&(this.viewportMaximum=Math.min(this.viewportMaximum,this.maximum));this.trackChanges("viewportMinimum");this.trackChanges("viewportMaximum")}function U(a,d,c,b){U.base.constructor.call(this,
"ScaleBreaks","scaleBreaks",d,null,b);this.id=c;this.chart=a;this.ctx=this.chart.ctx;this.axis=b;this.optionsName="scaleBreaks";this.isOptionsInArray=!1;this._appliedBreaks=[];this.customBreaks=[];this.autoBreaks=[];"string"===typeof this.spacing?(this.spacing=parseFloat(this.spacing),this.spacing=isNaN(this.spacing)?8:(10<this.spacing?10:this.spacing)+"%"):"number"!==typeof this.spacing&&(this.spacing=8);this.autoCalculate&&(this.maxNumberOfAutoBreaks=Math.min(this.maxNumberOfAutoBreaks,5));if(this.options.customBreaks&&
0<this.options.customBreaks.length){for(a=0;a<this.options.customBreaks.length;a++)this.customBreaks.push(new V(this.chart,"customBreaks",this.options.customBreaks[a],a,++this.chart._eventManager.lastObjectId,this)),"number"===typeof this.customBreaks[a].startValue&&("number"===typeof this.customBreaks[a].endValue&&this.customBreaks[a].endValue!==this.customBreaks[a].startValue)&&this._appliedBreaks.push(this.customBreaks[a]);this._appliedBreaks.sort(function(a,b){return a.startValue-b.startValue});
for(a=0;a<this._appliedBreaks.length-1;a++)this._appliedBreaks[a].endValue>=this._appliedBreaks[a+1].startValue&&(this._appliedBreaks[a].endValue=Math.max(this._appliedBreaks[a].endValue,this._appliedBreaks[a+1].endValue),window.console&&window.console.log("CanvasJS Error: Breaks "+a+" and "+(a+1)+" are overlapping."),this._appliedBreaks.splice(a,2),a--)}}function V(a,d,c,b,e,f){V.base.constructor.call(this,"Break",d,c,b,f);this.id=e;this.chart=a;this.ctx=this.chart.ctx;this.scaleBreaks=f;this.optionsName=
d;this.isOptionsInArray=!0;this.type=c.type?this.type:f.type;this.fillOpacity=r(c.fillOpacity)?f.fillOpacity:this.fillOpacity;this.lineThickness=r(c.lineThickness)?f.lineThickness:this.lineThickness;this.color=c.color?this.color:f.color;this.lineColor=c.lineColor?this.lineColor:f.lineColor;this.lineDashType=c.lineDashType?this.lineDashType:f.lineDashType;!r(this.startValue)&&this.startValue.getTime&&(this.startValue=this.startValue.getTime());!r(this.endValue)&&this.endValue.getTime&&(this.endValue=
this.endValue.getTime());"number"===typeof this.startValue&&("number"===typeof this.endValue&&this.endValue<this.startValue)&&(a=this.startValue,this.startValue=this.endValue,this.endValue=a);this.spacing="undefined"===typeof c.spacing?f.spacing:c.spacing;"string"===typeof this.options.spacing?(this.spacing=parseFloat(this.spacing),this.spacing=isNaN(this.spacing)?0:(10<this.spacing?10:this.spacing)+"%"):"number"!==typeof this.options.spacing&&(this.spacing=f.spacing);this.size=f.parent.logarithmic?
1:0}function N(a,d,c,b,e){N.base.constructor.call(this,"StripLine","stripLines",d,c,e);this.id=b;this.chart=a;this.ctx=this.chart.ctx;this.label=this.label;this.axis=e;this.optionsName="stripLines";this.isOptionsInArray=!0;this._thicknessType="pixel";null!==this.startValue&&null!==this.endValue&&(this.value=e.logarithmic?Math.sqrt((this.startValue.getTime?this.startValue.getTime():this.startValue)*(this.endValue.getTime?this.endValue.getTime():this.endValue)):((this.startValue.getTime?this.startValue.getTime():
this.startValue)+(this.endValue.getTime?this.endValue.getTime():this.endValue))/2,this._thicknessType=null)}function ba(a,d,c){ba.base.constructor.call(this,"Crosshair","crosshair",d,null,c);this.chart=a;this.ctx=this.chart.ctx;this.axis=c;this.optionsName="crosshair";this._thicknessType="pixel"}function aa(a,d){aa.base.constructor.call(this,"ToolTip","toolTip",d,null,a);this.chart=a;this.canvas=a.canvas;this.ctx=this.chart.ctx;this.currentDataPointIndex=this.currentSeriesIndex=-1;this._prevY=this._prevX=
NaN;this.containerTransitionDuration=0.1;this.mozContainerTransition=this.getContainerTransition(this.containerTransitionDuration);this.optionsName="toolTip";this._initialize()}function ea(a){this.chart=a;this.lastObjectId=0;this.objectMap=[];this.rectangularRegionEventSubscriptions=[];this.previousDataPointEventObject=null;this.ghostCanvas=ta(this.chart.width,this.chart.height);this.ghostCtx=this.ghostCanvas.getContext("2d");this.mouseoveredObjectMaps=[]}function ka(a){this.chart=a;this.ctx=this.chart.plotArea.ctx;
this.animations=[];this.animationRequestId=null}oa(m,X);m.prototype.destroy=function(){var a=this.allDOMEventHandlers;this._animator&&this._animator.cancelAllAnimations();this._panTimerId&&clearTimeout(this._panTimerId);for(var d=0;d<a.length;d++){var c=a[d][0],b=a[d][1],e=a[d][2],f=a[d][3],f=f||!1;c.removeEventListener?c.removeEventListener(b,e,f):c.detachEvent&&c.detachEvent("on"+b,e)}this.allDOMEventHandlers=[];for(this.removeAllEventListeners();this._canvasJSContainer&&this._canvasJSContainer.hasChildNodes();)this._canvasJSContainer.removeChild(this._canvasJSContainer.lastChild);
for(;this.container&&this.container.hasChildNodes();)this.container.removeChild(this.container.lastChild);for(;this._dropdownMenu&&this._dropdownMenu.hasChildNodes();)this._dropdownMenu.removeChild(this._dropdownMenu.lastChild);this.overlaidCanvas=this.canvas=this.container=this._canvasJSContainer=null;this._toolBar=this._dropdownMenu=this._menuButton=this._resetButton=this._zoomButton=this._breaksCanvas=this._preRenderCanvas=this.toolTip.container=null};m.prototype._updateOptions=function(){var a=
this;this.updateOption("width");this.updateOption("height");this.updateOption("dataPointWidth");this.updateOption("dataPointMinWidth");this.updateOption("dataPointMaxWidth");this.updateOption("interactivityEnabled");this.updateOption("theme");this.updateOption("colorSet")&&(this._selectedColorSet="undefined"!==typeof za[this.colorSet]?za[this.colorSet]:za.colorSet1);this.updateOption("backgroundColor");this.backgroundColor||(this.backgroundColor="rgba(0,0,0,0)");this.updateOption("culture");this._cultureInfo=
new Ia(this.options.culture);this.updateOption("animationEnabled");this.animationEnabled=this.animationEnabled&&s;this.updateOption("animationDuration");this.updateOption("rangeChanging");this.updateOption("rangeChanged");this.updateOption("exportEnabled");this.updateOption("exportFileName");this.updateOption("zoomType");if(this.options.zoomEnabled||this.panEnabled){if(!this._zoomButton){var d=!1;ua(this._zoomButton=document.createElement("button"));va(this,this._zoomButton,"pan");this._toolBar.appendChild(this._zoomButton);
this._zoomButton.style.borderRight=this.toolbar.borderThickness+"px solid "+this.toolbar.borderColor;W(this._zoomButton,"touchstart",function(a){d=!0},this.allDOMEventHandlers);W(this._zoomButton,"click",function(){a.zoomEnabled?(a.zoomEnabled=!1,a.panEnabled=!0,va(a,a._zoomButton,"zoom")):(a.zoomEnabled=!0,a.panEnabled=!1,va(a,a._zoomButton,"pan"));a.render()},this.allDOMEventHandlers);W(this._zoomButton,"mouseover",function(){d?d=!1:(pa(a._zoomButton,{backgroundColor:a.toolbar.backgroundColorOnHover,
color:a.toolbar.fontColorOnHover,transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&pa(a._zoomButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))},this.allDOMEventHandlers);W(this._zoomButton,"mouseout",function(){d||(pa(a._zoomButton,{backgroundColor:a.toolbar.backgroundColor,color:a.toolbar.fontColor,transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&pa(a._zoomButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}))},
this.allDOMEventHandlers)}this._resetButton||(d=!1,ua(this._resetButton=document.createElement("button")),va(this,this._resetButton,"reset"),this._resetButton.style.borderRight=(this.exportEnabled?this.toolbar.borderThickness:0)+"px solid "+this.toolbar.borderColor,this._toolBar.appendChild(this._resetButton),W(this._resetButton,"touchstart",function(a){d=!0},this.allDOMEventHandlers),W(this._resetButton,"click",function(){a.toolTip.hide();a.toolTip.dispatchEvent("hidden",{chart:a,toolTip:a.toolTip},
a.toolTip);a.zoomEnabled||a.panEnabled?(a.zoomEnabled=!0,a.panEnabled=!1,va(a,a._zoomButton,"pan"),a._defaultCursor="default",a.overlaidCanvas.style.cursor=a._defaultCursor):(a.zoomEnabled=!1,a.panEnabled=!1);if(a.sessionVariables.axisX)for(var b=0;b<a.sessionVariables.axisX.length;b++)a.sessionVariables.axisX[b].newViewportMinimum=null,a.sessionVariables.axisX[b].newViewportMaximum=null;if(a.sessionVariables.axisX2)for(b=0;b<a.sessionVariables.axisX2.length;b++)a.sessionVariables.axisX2[b].newViewportMinimum=
null,a.sessionVariables.axisX2[b].newViewportMaximum=null;if(a.sessionVariables.axisY)for(b=0;b<a.sessionVariables.axisY.length;b++)a.sessionVariables.axisY[b].newViewportMinimum=null,a.sessionVariables.axisY[b].newViewportMaximum=null;if(a.sessionVariables.axisY2)for(b=0;b<a.sessionVariables.axisY2.length;b++)a.sessionVariables.axisY2[b].newViewportMinimum=null,a.sessionVariables.axisY2[b].newViewportMaximum=null;a.resetOverlayedCanvas();ua(a._zoomButton,a._resetButton);a.stockChart&&(a.stockChart._rangeEventParameter=
{stockChart:a.stockChart,source:"chart",index:a.stockChart.charts.indexOf(a),minimum:null,maximum:null});a._dispatchRangeEvent("rangeChanging","reset");a.stockChart&&(a.stockChart._rangeEventParameter.type="rangeChanging",a.stockChart.dispatchEvent("rangeChanging",a.stockChart._rangeEventParameter,a.stockChart));a.render();a.syncCharts&&a.syncCharts(null,null);a._dispatchRangeEvent("rangeChanged","reset");a.stockChart&&(a.stockChart._rangeEventParameter.type="rangeChanged",a.stockChart.dispatchEvent("rangeChanged",
a.stockChart._rangeEventParameter,a.stockChart))},this.allDOMEventHandlers),W(this._resetButton,"mouseover",function(){d||(pa(a._resetButton,{backgroundColor:a.toolbar.backgroundColorOnHover,color:a.toolbar.hoverFfontColorOnHoverontColor,transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&pa(a._resetButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))},this.allDOMEventHandlers),W(this._resetButton,"mouseout",function(){d||(pa(a._resetButton,{backgroundColor:a.toolbar.backgroundColor,
color:a.toolbar.fontColor,transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&pa(a._resetButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}))},this.allDOMEventHandlers),this.overlaidCanvas.style.cursor=a._defaultCursor);this.zoomEnabled||this.panEnabled||(this._zoomButton?(a._zoomButton.getAttribute("state")===a._cultureInfo.zoomText?(this.panEnabled=!0,this.zoomEnabled=!1):(this.zoomEnabled=!0,this.panEnabled=!1),Ka(a._zoomButton,a._resetButton)):
(this.zoomEnabled=!0,this.panEnabled=!1))}else this.panEnabled=this.zoomEnabled=!1;gb(this);"none"!==this._toolBar.style.display&&this._zoomButton&&(this.panEnabled?va(a,a._zoomButton,"zoom"):va(a,a._zoomButton,"pan"),a._resetButton.getAttribute("state")!==a._cultureInfo.resetText&&va(a,a._resetButton,"reset"));this.options.toolTip&&this.toolTip.options!==this.options.toolTip&&(this.toolTip.options=this.options.toolTip);for(var c in this.toolTip.options)this.toolTip.options.hasOwnProperty(c)&&this.toolTip.updateOption(c)};
m.prototype._updateSize=function(){var a;a=[this.canvas,this.overlaidCanvas,this._eventManager.ghostCanvas];var d=0,c=0;this.options.width?d=this.width:this.width=d=0<this.container.clientWidth?this.container.clientWidth:this.width;this.options.height?c=this.height:this.height=c=0<this.container.clientHeight?this.container.clientHeight:this.height;if(this.canvas.width!==d*ja||this.canvas.height!==c*ja){for(var b=0;b<a.length;b++)La(a[b],d,c);this.bounds={x1:0,y1:0,x2:this.width,y2:this.height,width:this.width,
height:this.height};a=!0}else a=!1;return a};m.prototype._initialize=function(){this.isNavigator=r(this.parent)||r(this.parent._defaultsKey)||"Navigator"!==this.parent._defaultsKey?!1:!0;this.toolbar=new Sa(this,this.options.toolbar);this._animator?this._animator.cancelAllAnimations():this._animator=new ka(this);this.removeAllEventListeners();this.disableToolTip=!1;this._axes=[];this.funnelPyramidClickHandler=this.pieDoughnutClickHandler=null;this._updateOptions();this.animatedRender=s&&this.animationEnabled&&
0===this.renderCount;this._updateSize();this.clearCanvas();this.ctx.beginPath();this.axisX=[];this.axisX2=[];this.axisY=[];this.axisY2=[];this._indexLabels=[];this._dataInRenderedOrder=[];this._events=[];this._eventManager&&this._eventManager.reset();this.plotInfo={axisPlacement:null,plotTypes:[]};this.layoutManager=new Da(0,0,this.width,this.height,this.isNavigator?0:2);this.plotArea.layoutManager&&this.plotArea.layoutManager.reset();this.data=[];var a=0,d=null;if(this.options.data){for(var c=0;c<
this.options.data.length;c++)if(a++,!this.options.data[c].type||0<=m._supportedChartTypes.indexOf(this.options.data[c].type)){var b=new G(this,this.options.data[c],a-1,++this._eventManager.lastObjectId);"error"===b.type&&(b.linkedDataSeriesIndex=r(this.options.data[c].linkedDataSeriesIndex)?c-1:this.options.data[c].linkedDataSeriesIndex,0>b.linkedDataSeriesIndex||b.linkedDataSeriesIndex>=this.options.data.length||"number"!==typeof b.linkedDataSeriesIndex||"error"===this.options.data[b.linkedDataSeriesIndex].type)&&
(b.linkedDataSeriesIndex=null);null===b.name&&(b.name="DataSeries "+a);null===b.color?1<this.options.data.length?(b._colorSet=[this._selectedColorSet[b.index%this._selectedColorSet.length]],b.color=this._selectedColorSet[b.index%this._selectedColorSet.length]):b._colorSet="line"===b.type||"stepLine"===b.type||"spline"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"stackedArea"===b.type||"stackedArea100"===b.type||"rangeArea"===b.type||"rangeSplineArea"===b.type||"candlestick"===
b.type||"ohlc"===b.type||"waterfall"===b.type||"boxAndWhisker"===b.type?[this._selectedColorSet[0]]:this._selectedColorSet:b._colorSet=[b.color];null===b.markerSize&&(("line"===b.type||"stepLine"===b.type||"spline"===b.type||0<=b.type.toLowerCase().indexOf("area"))&&b.dataPoints&&b.dataPoints.length<this.width/16||"scatter"===b.type)&&(b.markerSize=8);"bubble"!==b.type&&"scatter"!==b.type||!b.dataPoints||(b.dataPoints.some?b.dataPoints.some(function(a){return a.x})&&b.dataPoints.sort(k):b.dataPoints.sort(k));
this.data.push(b);var e=b.axisPlacement,d=d||e,f;"normal"===e?"xySwapped"===this.plotInfo.axisPlacement?f='You cannot combine "'+b.type+'" with bar chart':"none"===this.plotInfo.axisPlacement?f='You cannot combine "'+b.type+'" with pie chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="normal"):"xySwapped"===e?"normal"===this.plotInfo.axisPlacement?f='You cannot combine "'+b.type+'" with line, area, column or pie chart':"none"===this.plotInfo.axisPlacement?f='You cannot combine "'+
b.type+'" with pie chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="xySwapped"):"none"===e?"normal"===this.plotInfo.axisPlacement?f='You cannot combine "'+b.type+'" with line, area, column or bar chart':"xySwapped"===this.plotInfo.axisPlacement?f='You cannot combine "'+b.type+'" with bar chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="none"):null===e&&"none"===this.plotInfo.axisPlacement&&(f='You cannot combine "'+b.type+'" with pie chart');if(f&&window.console){window.console.log(f);
return}}for(c=0;c<this.data.length;c++){if("none"==d&&"error"===this.data[c].type&&window.console){window.console.log('You cannot combine "'+b.type+'" with error chart');return}"error"===this.data[c].type&&(this.data[c].axisPlacement=this.plotInfo.axisPlacement=d||"normal",this.data[c]._linkedSeries=null===this.data[c].linkedDataSeriesIndex?null:this.data[this.data[c].linkedDataSeriesIndex])}}this._objectsInitialized=!0;this._plotAreaElements=[]};m._supportedChartTypes=Ca("line stepLine spline column area stepArea splineArea bar bubble scatter stackedColumn stackedColumn100 stackedBar stackedBar100 stackedArea stackedArea100 candlestick ohlc boxAndWhisker rangeColumn error rangeBar rangeArea rangeSplineArea pie doughnut funnel pyramid waterfall".split(" "));
m.prototype.setLayout=function(){for(var a=this._plotAreaElements,d=0;d<this.data.length;d++)if("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement){if(!this.data[d].axisYType||"primary"===this.data[d].axisYType)if(this.options.axisY&&0<this.options.axisY.length){if(!this.axisY.length)for(var c=0;c<this.options.axisY.length;c++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY[c]=new D(this,"axisY",this.options.axisY[c],c,"axisY","left")):"xySwapped"===
this.plotInfo.axisPlacement&&this._axes.push(this.axisY[c]=new D(this,"axisY",this.options.axisY[c],c,"axisY","bottom"));this.data[d].axisY=this.axisY[0<=this.data[d].axisYIndex&&this.data[d].axisYIndex<this.axisY.length?this.data[d].axisYIndex:0];this.axisY[0<=this.data[d].axisYIndex&&this.data[d].axisYIndex<this.axisY.length?this.data[d].axisYIndex:0].dataSeries.push(this.data[d])}else this.axisY.length||("normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY[0]=new D(this,"axisY",this.options.axisY,
0,"axisY","left")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY[0]=new D(this,"axisY",this.options.axisY,0,"axisY","bottom"))),this.data[d].axisY=this.axisY[0],this.axisY[0].dataSeries.push(this.data[d]);if("secondary"===this.data[d].axisYType)if(this.options.axisY2&&0<this.options.axisY2.length){if(!this.axisY2.length)for(c=0;c<this.options.axisY2.length;c++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY2[c]=new D(this,"axisY2",this.options.axisY2[c],c,
"axisY","right")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY2[c]=new D(this,"axisY2",this.options.axisY2[c],c,"axisY","top"));this.data[d].axisY=this.axisY2[0<=this.data[d].axisYIndex&&this.data[d].axisYIndex<this.axisY2.length?this.data[d].axisYIndex:0];this.axisY2[0<=this.data[d].axisYIndex&&this.data[d].axisYIndex<this.axisY2.length?this.data[d].axisYIndex:0].dataSeries.push(this.data[d])}else this.axisY2.length||("normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY2[0]=
new D(this,"axisY2",this.options.axisY2,0,"axisY","right")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY2[0]=new D(this,"axisY2",this.options.axisY2,0,"axisY","top"))),this.data[d].axisY=this.axisY2[0],this.axisY2[0].dataSeries.push(this.data[d]);if(!this.data[d].axisXType||"primary"===this.data[d].axisXType)if(this.options.axisX&&0<this.options.axisX.length){if(!this.axisX.length)for(c=0;c<this.options.axisX.length;c++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisX[c]=
new D(this,"axisX",this.options.axisX[c],c,"axisX","bottom")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisX[c]=new D(this,"axisX",this.options.axisX[c],c,"axisX","left"));this.data[d].axisX=this.axisX[0<=this.data[d].axisXIndex&&this.data[d].axisXIndex<this.axisX.length?this.data[d].axisXIndex:0];this.axisX[0<=this.data[d].axisXIndex&&this.data[d].axisXIndex<this.axisX.length?this.data[d].axisXIndex:0].dataSeries.push(this.data[d])}else this.axisX.length||("normal"===this.plotInfo.axisPlacement?
this._axes.push(this.axisX[0]=new D(this,"axisX",this.options.axisX,0,"axisX","bottom")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisX[0]=new D(this,"axisX",this.options.axisX,0,"axisX","left"))),this.data[d].axisX=this.axisX[0],this.axisX[0].dataSeries.push(this.data[d]);if("secondary"===this.data[d].axisXType)if(this.options.axisX2&&0<this.options.axisX2.length){if(!this.axisX2.length)for(c=0;c<this.options.axisX2.length;c++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisX2[c]=
new D(this,"axisX2",this.options.axisX2[c],c,"axisX","top")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisX2[c]=new D(this,"axisX2",this.options.axisX2[c],c,"axisX","right"));this.data[d].axisX=this.axisX2[0<=this.data[d].axisXIndex&&this.data[d].axisXIndex<this.axisX2.length?this.data[d].axisXIndex:0];this.axisX2[0<=this.data[d].axisXIndex&&this.data[d].axisXIndex<this.axisX2.length?this.data[d].axisXIndex:0].dataSeries.push(this.data[d])}else this.axisX2.length||("normal"===
this.plotInfo.axisPlacement?this._axes.push(this.axisX2[0]=new D(this,"axisX2",this.options.axisX2,0,"axisX","top")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisX2[0]=new D(this,"axisX2",this.options.axisX2,0,"axisX","right"))),this.data[d].axisX=this.axisX2[0],this.axisX2[0].dataSeries.push(this.data[d])}if(this.axisY){for(c=1;c<this.axisY.length;c++)"undefined"===typeof this.axisY[c].options.gridThickness&&(this.axisY[c].gridThickness=0);for(c=0;c<this.axisY.length-1;c++)"undefined"===
typeof this.axisY[c].options.margin&&(this.axisY[c].margin=10)}if(this.axisY2){for(c=1;c<this.axisY2.length;c++)"undefined"===typeof this.axisY2[c].options.gridThickness&&(this.axisY2[c].gridThickness=0);for(c=0;c<this.axisY2.length-1;c++)"undefined"===typeof this.axisY2[c].options.margin&&(this.axisY2[c].margin=10)}this.axisY&&0<this.axisY.length&&(this.axisY2&&0<this.axisY2.length)&&(0<this.axisY[0].gridThickness&&"undefined"===typeof this.axisY2[0].options.gridThickness?this.axisY2[0].gridThickness=
0:0<this.axisY2[0].gridThickness&&"undefined"===typeof this.axisY[0].options.gridThickness&&(this.axisY[0].gridThickness=0));if(this.axisX)for(c=0;c<this.axisX.length;c++)"undefined"===typeof this.axisX[c].options.gridThickness&&(this.axisX[c].gridThickness=0);if(this.axisX2)for(c=0;c<this.axisX2.length;c++)"undefined"===typeof this.axisX2[c].options.gridThickness&&(this.axisX2[c].gridThickness=0);this.axisX&&0<this.axisX.length&&(this.axisX2&&0<this.axisX2.length)&&(0<this.axisX[0].gridThickness&&
"undefined"===typeof this.axisX2[0].options.gridThickness?this.axisX2[0].gridThickness=0:0<this.axisX2[0].gridThickness&&"undefined"===typeof this.axisX[0].options.gridThickness&&(this.axisX[0].gridThickness=0));c=!1;if(0<this._axes.length&&this.options.zoomEnabled&&(this.zoomEnabled||this.panEnabled))for(d=0;d<this._axes.length;d++)if(null!==this._axes[d].viewportMinimum||null!==this._axes[d].viewportMaximum){c=!0;break}c?(Ka(this._zoomButton,this._resetButton),this._toolBar.style.border=this.toolbar.borderThickness+
"px solid "+this.toolbar.borderColor,this._zoomButton.style.borderRight=this.toolbar.borderThickness+"px solid "+this.toolbar.borderColor,this._resetButton.style.borderRight=(this.exportEnabled?this.toolbar.borderThickness:0)+"px solid "+this.toolbar.borderColor):(ua(this._zoomButton,this._resetButton),this._toolBar.style.border=this.toolbar.borderThickness+"px solid transparent",this.options.zoomEnabled&&(this.zoomEnabled=!0,this.panEnabled=!1));eb(this);this._processData();this.options.title&&(this.title=
new ya(this,this.options.title),this.title.dockInsidePlotArea?a.push(this.title):this.title.setLayout());this.subtitles=[];if(this.options.subtitles)for(d=0;d<this.options.subtitles.length;d++)c=new Ha(this,this.options.subtitles[d],d),this.subtitles.push(c),c.dockInsidePlotArea?a.push(c):c.setLayout();this.legend=new E(this,this.options.legend);for(d=0;d<this.data.length;d++)(this.data[d].showInLegend||"pie"===this.data[d].type||"doughnut"===this.data[d].type||"funnel"===this.data[d].type||"pyramid"===
this.data[d].type)&&this.legend.dataSeries.push(this.data[d]);this.legend.dockInsidePlotArea?a.push(this.legend):this.legend.setLayout();for(d=0;d<this._axes.length;d++)if(this._axes[d].scaleBreaks&&this._axes[d].scaleBreaks._appliedBreaks.length){s?(this._breaksCanvas=ta(this.width,this.height,!0),this._breaksCanvasCtx=this._breaksCanvas.getContext("2d")):(this._breaksCanvas=this.canvas,this._breaksCanvasCtx=this.ctx);break}this._preRenderCanvas=ta(this.width,this.height);this._preRenderCtx=this._preRenderCanvas.getContext("2d");
"normal"!==this.plotInfo.axisPlacement&&"xySwapped"!==this.plotInfo.axisPlacement||D.setLayout(this.axisX,this.axisX2,this.axisY,this.axisY2,this.plotInfo.axisPlacement,this.layoutManager.getFreeSpace())};m.prototype.renderElements=function(){var a=this._plotAreaElements;this.title&&!this.title.dockInsidePlotArea&&this.title.render();for(var d=0;d<this.subtitles.length;d++)this.subtitles[d].dockInsidePlotArea||this.subtitles[d].render();this.legend.dockInsidePlotArea||this.legend.render();if("normal"===
this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement)D.render(this.axisX,this.axisX2,this.axisY,this.axisY2,this.plotInfo.axisPlacement);else if("none"===this.plotInfo.axisPlacement)this.preparePlotArea();else return;for(d=0;d<a.length;d++)a[d].setLayout(),a[d].render();var c=[];if(this.animatedRender){var b=ta(this.width,this.height);b.getContext("2d").drawImage(this.canvas,0,0,this.width,this.height)}hb(this);var a=this.ctx.miterLimit,e;this.ctx.miterLimit=3;s&&this._breaksCanvas&&
(this._preRenderCtx.drawImage(this.canvas,0,0,this.width,this.height),this._preRenderCtx.drawImage(this._breaksCanvas,0,0,this.width,this.height),this._breaksCanvasCtx.globalCompositeOperation="source-atop",this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),this._preRenderCtx.clearRect(0,0,this.width,this.height));for(d=0;d<this.plotInfo.plotTypes.length;d++)for(var f=this.plotInfo.plotTypes[d],l=0;l<f.plotUnits.length;l++){var u=f.plotUnits[l],z=null;u.targetCanvas=
null;this.animatedRender&&(u.targetCanvas=ta(this.width,this.height),u.targetCanvasCtx=u.targetCanvas.getContext("2d"),e=u.targetCanvasCtx.miterLimit,u.targetCanvasCtx.miterLimit=3);"line"===u.type?z=this.renderLine(u):"stepLine"===u.type?z=this.renderStepLine(u):"spline"===u.type?z=this.renderSpline(u):"column"===u.type?z=this.renderColumn(u):"bar"===u.type?z=this.renderBar(u):"area"===u.type?z=this.renderArea(u):"stepArea"===u.type?z=this.renderStepArea(u):"splineArea"===u.type?z=this.renderSplineArea(u):
"stackedColumn"===u.type?z=this.renderStackedColumn(u):"stackedColumn100"===u.type?z=this.renderStackedColumn100(u):"stackedBar"===u.type?z=this.renderStackedBar(u):"stackedBar100"===u.type?z=this.renderStackedBar100(u):"stackedArea"===u.type?z=this.renderStackedArea(u):"stackedArea100"===u.type?z=this.renderStackedArea100(u):"bubble"===u.type?z=z=this.renderBubble(u):"scatter"===u.type?z=this.renderScatter(u):"pie"===u.type?this.renderPie(u):"doughnut"===u.type?this.renderPie(u):"funnel"===u.type?
z=this.renderFunnel(u):"pyramid"===u.type?z=this.renderFunnel(u):"candlestick"===u.type?z=this.renderCandlestick(u):"ohlc"===u.type?z=this.renderCandlestick(u):"rangeColumn"===u.type?z=this.renderRangeColumn(u):"error"===u.type?z=this.renderError(u):"rangeBar"===u.type?z=this.renderRangeBar(u):"rangeArea"===u.type?z=this.renderRangeArea(u):"rangeSplineArea"===u.type?z=this.renderRangeSplineArea(u):"waterfall"===u.type?z=this.renderWaterfall(u):"boxAndWhisker"===u.type&&(z=this.renderBoxAndWhisker(u));
for(var h=0;h<u.dataSeriesIndexes.length;h++)this._dataInRenderedOrder.push(this.data[u.dataSeriesIndexes[h]]);this.animatedRender&&(u.targetCanvasCtx.miterLimit=e,z&&c.push(z))}this.ctx.miterLimit=a;this.animatedRender&&this._breaksCanvasCtx&&c.push({source:this._breaksCanvasCtx,dest:this.plotArea.ctx,animationCallback:L.fadeInAnimation,easingFunction:L.easing.easeInQuad,animationBase:0,startTimePercent:0.7});this.animatedRender&&0<this._indexLabels.length&&(e=ta(this.width,this.height).getContext("2d"),
c.push(this.renderIndexLabels(e)));var p=this;if(0<c.length)p.disableToolTip=!0,p._animator.animate(200,p.animationDuration,function(a){p.ctx.clearRect(0,0,p.width,p.height);p.ctx.drawImage(b,0,0,Math.floor(p.width*ja),Math.floor(p.height*ja),0,0,p.width,p.height);for(var e=0;e<c.length;e++)z=c[e],1>a&&"undefined"!==typeof z.startTimePercent?a>=z.startTimePercent&&z.animationCallback(z.easingFunction(a-z.startTimePercent,0,1,1-z.startTimePercent),z):z.animationCallback(z.easingFunction(a,0,1,1),z);
p.dispatchEvent("dataAnimationIterationEnd",{chart:p})},function(){c=[];for(var a=0;a<p.plotInfo.plotTypes.length;a++)for(var e=p.plotInfo.plotTypes[a],d=0;d<e.plotUnits.length;d++)e.plotUnits[d].targetCanvas=null;b=null;p.disableToolTip=!1;p.dispatchEvent("dataAnimationEnd",{chart:p})});else{if(p._breaksCanvas)if(s)p.plotArea.ctx.drawImage(p._breaksCanvas,0,0,this.width,this.height);else for(h=0;h<p._axes.length;h++)p._axes[h].createMask();0<p._indexLabels.length&&p.renderIndexLabels();p.dispatchEvent("dataAnimationIterationEnd",
{chart:p});p.dispatchEvent("dataAnimationEnd",{chart:p})}this.attachPlotAreaEventHandlers();this.zoomEnabled||(this.panEnabled||!this._zoomButton||"none"===this._zoomButton.style.display)||ua(this._zoomButton,this._resetButton);this.toolTip._updateToolTip();this.renderCount++;Ga&&(p=this,setTimeout(function(){var a=document.getElementById("ghostCanvasCopy");a&&(La(a,p.width,p.height),a.getContext("2d").drawImage(p._eventManager.ghostCanvas,0,0))},2E3));this._breaksCanvas&&(delete this._breaksCanvas,
delete this._breaksCanvasCtx);for(h=0;h<this._axes.length;h++)this._axes[h].maskCanvas&&(delete this._axes[h].maskCanvas,delete this._axes[h].maskCtx)};m.prototype.render=function(a){a&&(this.options=a);this._initialize();this.setLayout();this.renderElements();this._preRenderCanvas=null};m.prototype.attachPlotAreaEventHandlers=function(){this.attachEvent({context:this,chart:this,mousedown:this._plotAreaMouseDown,mouseup:this._plotAreaMouseUp,mousemove:this._plotAreaMouseMove,cursor:this.panEnabled?
"move":"default",capture:!0,bounds:this.plotArea})};m.prototype.categoriseDataSeries=function(){for(var a="",d=0;d<this.data.length;d++)if(a=this.data[d],a.dataPoints&&(0!==a.dataPoints.length&&a.visible)&&0<=m._supportedChartTypes.indexOf(a.type)){for(var c=null,b=!1,e=null,f=!1,l=0;l<this.plotInfo.plotTypes.length;l++)if(this.plotInfo.plotTypes[l].type===a.type){b=!0;c=this.plotInfo.plotTypes[l];break}b||(c={type:a.type,totalDataSeries:0,plotUnits:[]},this.plotInfo.plotTypes.push(c));for(l=0;l<
c.plotUnits.length;l++)if(c.plotUnits[l].axisYType===a.axisYType&&c.plotUnits[l].axisXType===a.axisXType&&c.plotUnits[l].axisYIndex===a.axisYIndex&&c.plotUnits[l].axisXIndex===a.axisXIndex){f=!0;e=c.plotUnits[l];break}f||(e={type:a.type,previousDataSeriesCount:0,index:c.plotUnits.length,plotType:c,axisXType:a.axisXType,axisYType:a.axisYType,axisYIndex:a.axisYIndex,axisXIndex:a.axisXIndex,axisY:"primary"===a.axisYType?this.axisY[0<=a.axisYIndex&&a.axisYIndex<this.axisY.length?a.axisYIndex:0]:this.axisY2[0<=
a.axisYIndex&&a.axisYIndex<this.axisY2.length?a.axisYIndex:0],axisX:"primary"===a.axisXType?this.axisX[0<=a.axisXIndex&&a.axisXIndex<this.axisX.length?a.axisXIndex:0]:this.axisX2[0<=a.axisXIndex&&a.axisXIndex<this.axisX2.length?a.axisXIndex:0],dataSeriesIndexes:[],yTotals:[]},c.plotUnits.push(e));c.totalDataSeries++;e.dataSeriesIndexes.push(d);a.plotUnit=e}for(d=0;d<this.plotInfo.plotTypes.length;d++)for(c=this.plotInfo.plotTypes[d],l=a=0;l<c.plotUnits.length;l++)c.plotUnits[l].previousDataSeriesCount=
a,a+=c.plotUnits[l].dataSeriesIndexes.length};m.prototype.assignIdToDataPoints=function(){for(var a=0;a<this.data.length;a++){var d=this.data[a];if(d.dataPoints)for(var c=d.dataPoints.length,b=0;b<c;b++)d.dataPointIds[b]=++this._eventManager.lastObjectId}};m.prototype._processData=function(){this.assignIdToDataPoints();this.categoriseDataSeries();for(var a=0;a<this.plotInfo.plotTypes.length;a++)for(var d=this.plotInfo.plotTypes[a],c=0;c<d.plotUnits.length;c++){var b=d.plotUnits[c];"line"===b.type||
"stepLine"===b.type||"spline"===b.type||"column"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"bar"===b.type||"bubble"===b.type||"scatter"===b.type?this._processMultiseriesPlotUnit(b):"stackedColumn"===b.type||"stackedBar"===b.type||"stackedArea"===b.type?this._processStackedPlotUnit(b):"stackedColumn100"===b.type||"stackedBar100"===b.type||"stackedArea100"===b.type?this._processStacked100PlotUnit(b):"candlestick"===b.type||"ohlc"===b.type||"rangeColumn"===b.type||"rangeBar"===
b.type||"rangeArea"===b.type||"rangeSplineArea"===b.type||"error"===b.type||"boxAndWhisker"===b.type?this._processMultiYPlotUnit(b):"waterfall"===b.type&&this._processSpecificPlotUnit(b)}this.calculateAutoBreaks()};m.prototype._processMultiseriesPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length))for(var d=a.axisY.dataInfo,c=a.axisX.dataInfo,b,e,f=!1,l=0;l<a.dataSeriesIndexes.length;l++){var u=this.data[a.dataSeriesIndexes[l]],z=0,h=!1,p=!1,n;if("normal"===u.axisPlacement||
"xySwapped"===u.axisPlacement)var q=a.axisX.sessionVariables.newViewportMinimum?a.axisX.sessionVariables.newViewportMinimum:this.options.axisX&&this.options.axisX.viewportMinimum?this.options.axisX.viewportMinimum:this.options.axisX&&this.options.axisX.minimum?this.options.axisX.minimum:a.axisX.logarithmic?0:-Infinity,g=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:this.options.axisX&&this.options.axisX.viewportMaximum?this.options.axisX.viewportMaximum:this.options.axisX&&
this.options.axisX.maximum?this.options.axisX.maximum:Infinity;if(u.dataPoints[z].x&&u.dataPoints[z].x.getTime||"dateTime"===u.xValueType)f=!0;for(z=0;z<u.dataPoints.length;z++){"undefined"===typeof u.dataPoints[z].x&&(u.dataPoints[z].x=z+(a.axisX.logarithmic?1:0));u.dataPoints[z].x.getTime?(f=!0,b=u.dataPoints[z].x.getTime()):b=u.dataPoints[z].x;e=u.dataPoints[z].y;b<c.min&&(c.min=b);b>c.max&&(c.max=b);e<d.min&&"number"===typeof e&&(d.min=e);e>d.max&&"number"===typeof e&&(d.max=e);if(0<z){if(a.axisX.logarithmic){var B=
b/u.dataPoints[z-1].x;1>B&&(B=1/B);c.minDiff>B&&1!==B&&(c.minDiff=B)}else B=b-u.dataPoints[z-1].x,0>B&&(B*=-1),c.minDiff>B&&0!==B&&(c.minDiff=B);null!==e&&null!==u.dataPoints[z-1].y&&(a.axisY.logarithmic?(B=e/u.dataPoints[z-1].y,1>B&&(B=1/B),d.minDiff>B&&1!==B&&(d.minDiff=B)):(B=e-u.dataPoints[z-1].y,0>B&&(B*=-1),d.minDiff>B&&0!==B&&(d.minDiff=B)))}if(b<q&&!h)null!==e&&(n=b);else{if(!h&&(h=!0,0<z)){z-=2;continue}if(b>g&&!p)p=!0;else if(b>g&&p)continue;u.dataPoints[z].label&&(a.axisX.labels[b]=u.dataPoints[z].label);
b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);null===e?c.viewPortMin===b&&n<b&&(c.viewPortMin=n):(e<d.viewPortMin&&"number"===typeof e&&(d.viewPortMin=e),e>d.viewPortMax&&"number"===typeof e&&(d.viewPortMax=e))}}u.axisX.valueType=u.xValueType=f?"dateTime":"number"}};m.prototype._processStackedPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){for(var d=a.axisY.dataInfo,c=a.axisX.dataInfo,b,e,f=!1,l=[],u=[],z=Infinity,h=-Infinity,p=0;p<a.dataSeriesIndexes.length;p++){var n=
this.data[a.dataSeriesIndexes[p]],q=0,g=!1,B=!1,k;if("normal"===n.axisPlacement||"xySwapped"===n.axisPlacement)var O=a.axisX.sessionVariables.newViewportMinimum?a.axisX.sessionVariables.newViewportMinimum:this.options.axisX&&this.options.axisX.viewportMinimum?this.options.axisX.viewportMinimum:this.options.axisX&&this.options.axisX.minimum?this.options.axisX.minimum:-Infinity,t=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:this.options.axisX&&this.options.axisX.viewportMaximum?
this.options.axisX.viewportMaximum:this.options.axisX&&this.options.axisX.maximum?this.options.axisX.maximum:Infinity;if(n.dataPoints[q].x&&n.dataPoints[q].x.getTime||"dateTime"===n.xValueType)f=!0;for(q=0;q<n.dataPoints.length;q++){"undefined"===typeof n.dataPoints[q].x&&(n.dataPoints[q].x=q+(a.axisX.logarithmic?1:0));n.dataPoints[q].x.getTime?(f=!0,b=n.dataPoints[q].x.getTime()):b=n.dataPoints[q].x;e=r(n.dataPoints[q].y)?0:n.dataPoints[q].y;b<c.min&&(c.min=b);b>c.max&&(c.max=b);if(0<q){if(a.axisX.logarithmic){var m=
b/n.dataPoints[q-1].x;1>m&&(m=1/m);c.minDiff>m&&1!==m&&(c.minDiff=m)}else m=b-n.dataPoints[q-1].x,0>m&&(m*=-1),c.minDiff>m&&0!==m&&(c.minDiff=m);null!==e&&null!==n.dataPoints[q-1].y&&(a.axisY.logarithmic?0<e&&(m=e/n.dataPoints[q-1].y,1>m&&(m=1/m),d.minDiff>m&&1!==m&&(d.minDiff=m)):(m=e-n.dataPoints[q-1].y,0>m&&(m*=-1),d.minDiff>m&&0!==m&&(d.minDiff=m)))}if(b<O&&!g)null!==n.dataPoints[q].y&&(k=b);else{if(!g&&(g=!0,0<q)){q-=2;continue}if(b>t&&!B)B=!0;else if(b>t&&B)continue;n.dataPoints[q].label&&(a.axisX.labels[b]=
n.dataPoints[q].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);null===n.dataPoints[q].y?c.viewPortMin===b&&k<b&&(c.viewPortMin=k):(a.yTotals[b]=(a.yTotals[b]?a.yTotals[b]:0)+e,0<=e?l[b]?l[b]+=e:(l[b]=e,z=Math.min(e,z)):u[b]?u[b]+=e:(u[b]=e,h=Math.max(e,h)))}}a.axisY.scaleBreaks&&(a.axisY.scaleBreaks.autoCalculate&&1<=a.axisY.scaleBreaks.maxNumberOfAutoBreaks)&&(d.dataPointYPositiveSums?(d.dataPointYPositiveSums.push.apply(d.dataPointYPositiveSums,l),d.dataPointYNegativeSums.push.apply(d.dataPointYPositiveSums,
u)):(d.dataPointYPositiveSums=l,d.dataPointYNegativeSums=u));n.axisX.valueType=n.xValueType=f?"dateTime":"number"}for(q in l)l.hasOwnProperty(q)&&!isNaN(q)&&(a=l[q],a<d.min&&(d.min=Math.min(a,z)),a>d.max&&(d.max=a),q<c.viewPortMin||q>c.viewPortMax||(a<d.viewPortMin&&(d.viewPortMin=Math.min(a,z)),a>d.viewPortMax&&(d.viewPortMax=a)));for(q in u)u.hasOwnProperty(q)&&!isNaN(q)&&(a=u[q],a<d.min&&(d.min=a),a>d.max&&(d.max=Math.max(a,h)),q<c.viewPortMin||q>c.viewPortMax||(a<d.viewPortMin&&(d.viewPortMin=
a),a>d.viewPortMax&&(d.viewPortMax=Math.max(a,h))))}};m.prototype._processStacked100PlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){for(var d=a.axisY.dataInfo,c=a.axisX.dataInfo,b,e,f=!1,l=!1,u=!1,z=[],h=0;h<a.dataSeriesIndexes.length;h++){var p=this.data[a.dataSeriesIndexes[h]],n=0,q=!1,g=!1,B;if("normal"===p.axisPlacement||"xySwapped"===p.axisPlacement)var k=a.axisX.sessionVariables.newViewportMinimum?a.axisX.sessionVariables.newViewportMinimum:this.options.axisX&&
this.options.axisX.viewportMinimum?this.options.axisX.viewportMinimum:this.options.axisX&&this.options.axisX.minimum?this.options.axisX.minimum:-Infinity,m=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:this.options.axisX&&this.options.axisX.viewportMaximum?this.options.axisX.viewportMaximum:this.options.axisX&&this.options.axisX.maximum?this.options.axisX.maximum:Infinity;if(p.dataPoints[n].x&&p.dataPoints[n].x.getTime||"dateTime"===p.xValueType)f=!0;for(n=
0;n<p.dataPoints.length;n++){"undefined"===typeof p.dataPoints[n].x&&(p.dataPoints[n].x=n+(a.axisX.logarithmic?1:0));p.dataPoints[n].x.getTime?(f=!0,b=p.dataPoints[n].x.getTime()):b=p.dataPoints[n].x;e=r(p.dataPoints[n].y)?null:p.dataPoints[n].y;b<c.min&&(c.min=b);b>c.max&&(c.max=b);if(0<n){if(a.axisX.logarithmic){var t=b/p.dataPoints[n-1].x;1>t&&(t=1/t);c.minDiff>t&&1!==t&&(c.minDiff=t)}else t=b-p.dataPoints[n-1].x,0>t&&(t*=-1),c.minDiff>t&&0!==t&&(c.minDiff=t);r(e)||null===p.dataPoints[n-1].y||
(a.axisY.logarithmic?0<e&&(t=e/p.dataPoints[n-1].y,1>t&&(t=1/t),d.minDiff>t&&1!==t&&(d.minDiff=t)):(t=e-p.dataPoints[n-1].y,0>t&&(t*=-1),d.minDiff>t&&0!==t&&(d.minDiff=t)))}if(b<k&&!q)null!==e&&(B=b);else{if(!q&&(q=!0,0<n)){n-=2;continue}if(b>m&&!g)g=!0;else if(b>m&&g)continue;p.dataPoints[n].label&&(a.axisX.labels[b]=p.dataPoints[n].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);null===e?c.viewPortMin===b&&B<b&&(c.viewPortMin=B):(a.yTotals[b]=(a.yTotals[b]?a.yTotals[b]:
0)+e,0<=e?l=!0:0>e&&(u=!0),z[b]=z[b]?z[b]+Math.abs(e):Math.abs(e))}}p.axisX.valueType=p.xValueType=f?"dateTime":"number"}a.axisY.logarithmic?(d.max=r(d.viewPortMax)?99*Math.pow(a.axisY.logarithmBase,-0.05):Math.max(d.viewPortMax,99*Math.pow(a.axisY.logarithmBase,-0.05)),d.min=r(d.viewPortMin)?1:Math.min(d.viewPortMin,1)):l&&!u?(d.max=r(d.viewPortMax)?99:Math.max(d.viewPortMax,99),d.min=r(d.viewPortMin)?1:Math.min(d.viewPortMin,1)):l&&u?(d.max=r(d.viewPortMax)?99:Math.max(d.viewPortMax,99),d.min=r(d.viewPortMin)?
-99:Math.min(d.viewPortMin,-99)):!l&&u&&(d.max=r(d.viewPortMax)?-1:Math.max(d.viewPortMax,-1),d.min=r(d.viewPortMin)?-99:Math.min(d.viewPortMin,-99));d.viewPortMin=d.min;d.viewPortMax=d.max;a.dataPointYSums=z}};m.prototype._processMultiYPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length))for(var d=a.axisY.dataInfo,c=a.axisX.dataInfo,b,e,f,l,u=!1,z=0;z<a.dataSeriesIndexes.length;z++){var h=this.data[a.dataSeriesIndexes[z]],p=0,n=!1,q=!1,g,B,k;if("normal"===h.axisPlacement||
"xySwapped"===h.axisPlacement)var m=a.axisX.sessionVariables.newViewportMinimum?a.axisX.sessionVariables.newViewportMinimum:this.options.axisX&&this.options.axisX.viewportMinimum?this.options.axisX.viewportMinimum:this.options.axisX&&this.options.axisX.minimum?this.options.axisX.minimum:a.axisX.logarithmic?0:-Infinity,t=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:this.options.axisX&&this.options.axisX.viewportMaximum?this.options.axisX.viewportMaximum:this.options.axisX&&
this.options.axisX.maximum?this.options.axisX.maximum:Infinity;if(h.dataPoints[p].x&&h.dataPoints[p].x.getTime||"dateTime"===h.xValueType)u=!0;for(p=0;p<h.dataPoints.length;p++){"undefined"===typeof h.dataPoints[p].x&&(h.dataPoints[p].x=p+(a.axisX.logarithmic?1:0));h.dataPoints[p].x.getTime?(u=!0,b=h.dataPoints[p].x.getTime()):b=h.dataPoints[p].x;if((e=h.dataPoints[p].y)&&e.length){f=Math.min.apply(null,e);l=Math.max.apply(null,e);B=!0;for(var x=0;x<e.length;x++)null===e.k&&(B=!1);B&&(n||(k=g),g=
b)}b<c.min&&(c.min=b);b>c.max&&(c.max=b);f<d.min&&(d.min=f);l>d.max&&(d.max=l);0<p&&(a.axisX.logarithmic?(B=b/h.dataPoints[p-1].x,1>B&&(B=1/B),c.minDiff>B&&1!==B&&(c.minDiff=B)):(B=b-h.dataPoints[p-1].x,0>B&&(B*=-1),c.minDiff>B&&0!==B&&(c.minDiff=B)),e&&(null!==e[0]&&h.dataPoints[p-1].y&&null!==h.dataPoints[p-1].y[0])&&(a.axisY.logarithmic?(B=e[0]/h.dataPoints[p-1].y[0],1>B&&(B=1/B),d.minDiff>B&&1!==B&&(d.minDiff=B)):(B=e[0]-h.dataPoints[p-1].y[0],0>B&&(B*=-1),d.minDiff>B&&0!==B&&(d.minDiff=B))));
if(!(b<m)||n){if(!n&&(n=!0,0<p)){p-=2;g=k;continue}if(b>t&&!q)q=!0;else if(b>t&&q)continue;h.dataPoints[p].label&&(a.axisX.labels[b]=h.dataPoints[p].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);if(c.viewPortMin===b&&e)for(x=0;x<e.length;x++)if(null===e[x]&&g<b){c.viewPortMin=g;break}null===e?c.viewPortMin===b&&g<b&&(c.viewPortMin=g):(f<d.viewPortMin&&(d.viewPortMin=f),l>d.viewPortMax&&(d.viewPortMax=l))}}h.axisX.valueType=h.xValueType=u?"dateTime":"number"}};m.prototype._processSpecificPlotUnit=
function(a){if("waterfall"===a.type&&a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length))for(var d=a.axisY.dataInfo,c=a.axisX.dataInfo,b,e,f=!1,l=0;l<a.dataSeriesIndexes.length;l++){var u=this.data[a.dataSeriesIndexes[l]],z=0,h=!1,p=!1,n=b=0;if("normal"===u.axisPlacement||"xySwapped"===u.axisPlacement)var q=a.axisX.sessionVariables.newViewportMinimum?a.axisX.sessionVariables.newViewportMinimum:this.options.axisX&&this.options.axisX.viewportMinimum?this.options.axisX.viewportMinimum:this.options.axisX&&
this.options.axisX.minimum?this.options.axisX.minimum:a.axisX.logarithmic?0:-Infinity,g=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:this.options.axisX&&this.options.axisX.viewportMaximum?this.options.axisX.viewportMaximum:this.options.axisX&&this.options.axisX.maximum?this.options.axisX.maximum:Infinity;if(u.dataPoints[z].x&&u.dataPoints[z].x.getTime||"dateTime"===u.xValueType)f=!0;for(z=0;z<u.dataPoints.length;z++)"undefined"!==typeof u.dataPoints[z].isCumulativeSum&&
!0===u.dataPoints[z].isCumulativeSum?(u.dataPointEOs[z].cumulativeSumYStartValue=0,u.dataPointEOs[z].cumulativeSum=0===z?0:u.dataPointEOs[z-1].cumulativeSum,u.dataPoints[z].y=0===z?0:u.dataPointEOs[z-1].cumulativeSum):"undefined"!==typeof u.dataPoints[z].isIntermediateSum&&!0===u.dataPoints[z].isIntermediateSum?(u.dataPointEOs[z].cumulativeSumYStartValue=n,u.dataPointEOs[z].cumulativeSum=0===z?0:u.dataPointEOs[z-1].cumulativeSum,u.dataPoints[z].y=0===z?0:b,n=0===z?0:u.dataPointEOs[z-1].cumulativeSum,
b=0):(e="number"!==typeof u.dataPoints[z].y?0:u.dataPoints[z].y,u.dataPointEOs[z].cumulativeSumYStartValue=0===z?0:u.dataPointEOs[z-1].cumulativeSum,u.dataPointEOs[z].cumulativeSum=0===z?e:u.dataPointEOs[z-1].cumulativeSum+e,b+=e);for(z=0;z<u.dataPoints.length;z++)if("undefined"===typeof u.dataPoints[z].x&&(u.dataPoints[z].x=z+(a.axisX.logarithmic?1:0)),u.dataPoints[z].x.getTime?(f=!0,b=u.dataPoints[z].x.getTime()):b=u.dataPoints[z].x,e=u.dataPoints[z].y,b<c.min&&(c.min=b),b>c.max&&(c.max=b),u.dataPointEOs[z].cumulativeSum<
d.min&&(d.min=u.dataPointEOs[z].cumulativeSum),u.dataPointEOs[z].cumulativeSum>d.max&&(d.max=u.dataPointEOs[z].cumulativeSum),0<z&&(a.axisX.logarithmic?(n=b/u.dataPoints[z-1].x,1>n&&(n=1/n),c.minDiff>n&&1!==n&&(c.minDiff=n)):(n=b-u.dataPoints[z-1].x,0>n&&(n*=-1),c.minDiff>n&&0!==n&&(c.minDiff=n)),null!==e&&null!==u.dataPoints[z-1].y&&(a.axisY.logarithmic?(e=u.dataPointEOs[z].cumulativeSum/u.dataPointEOs[z-1].cumulativeSum,1>e&&(e=1/e),d.minDiff>e&&1!==e&&(d.minDiff=e)):(e=u.dataPointEOs[z].cumulativeSum-
u.dataPointEOs[z-1].cumulativeSum,0>e&&(e*=-1),d.minDiff>e&&0!==e&&(d.minDiff=e)))),!(b<q)||h){if(!h&&(h=!0,0<z)){z-=2;continue}if(b>g&&!p)p=!0;else if(b>g&&p)continue;u.dataPoints[z].label&&(a.axisX.labels[b]=u.dataPoints[z].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);0<z&&(u.dataPointEOs[z-1].cumulativeSum<d.viewPortMin&&(d.viewPortMin=u.dataPointEOs[z-1].cumulativeSum),u.dataPointEOs[z-1].cumulativeSum>d.viewPortMax&&(d.viewPortMax=u.dataPointEOs[z-1].cumulativeSum));
u.dataPointEOs[z].cumulativeSum<d.viewPortMin&&(d.viewPortMin=u.dataPointEOs[z].cumulativeSum);u.dataPointEOs[z].cumulativeSum>d.viewPortMax&&(d.viewPortMax=u.dataPointEOs[z].cumulativeSum)}u.axisX.valueType=u.xValueType=f?"dateTime":"number"}};m.prototype.calculateAutoBreaks=function(){function a(a,b,c,e){if(e)return c=Math.pow(Math.min(c*a/b,b/a),0.2),1>=c&&(c=Math.pow(1>a?1/a:Math.min(b/a,a),0.25)),{startValue:a*c,endValue:b/c};c=0.2*Math.min(c-b+a,b-a);0>=c&&(c=0.25*Math.min(b-a,Math.abs(a)));
return{startValue:a+c,endValue:b-c}}function d(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){var b=a.axisX.scaleBreaks&&a.axisX.scaleBreaks.autoCalculate&&1<=a.axisX.scaleBreaks.maxNumberOfAutoBreaks,c=a.axisY.scaleBreaks&&a.axisY.scaleBreaks.autoCalculate&&1<=a.axisY.scaleBreaks.maxNumberOfAutoBreaks;if(b||c)for(var d=a.axisY.dataInfo,f=a.axisX.dataInfo,g,h=f.min,l=f.max,p=d.min,q=d.max,f=f._dataRanges,d=d._dataRanges,n,u=0,z=0;z<a.dataSeriesIndexes.length;z++){var k=e.data[a.dataSeriesIndexes[z]];
if(!(4>k.dataPoints.length))for(u=0;u<k.dataPoints.length;u++)if(b&&(n=(l+1-h)*Math.max(parseFloat(a.axisX.scaleBreaks.collapsibleThreshold)||10,10)/100,g=k.dataPoints[u].x.getTime?k.dataPoints[u].x.getTime():k.dataPoints[u].x,n=Math.floor((g-h)/n),g<f[n].min&&(f[n].min=g),g>f[n].max&&(f[n].max=g)),c){var m=(q+1-p)*Math.max(parseFloat(a.axisY.scaleBreaks.collapsibleThreshold)||10,10)/100;if((g="waterfall"===a.type?k.dataPointEOs[u].cumulativeSum:k.dataPoints[u].y)&&g.length)for(var s=0;s<g.length;s++)n=
Math.floor((g[s]-p)/m),g[s]<d[n].min&&(d[n].min=g[s]),g[s]>d[n].max&&(d[n].max=g[s]);else r(g)||(n=Math.floor((g-p)/m),g<d[n].min&&(d[n].min=g),g>d[n].max&&(d[n].max=g))}}}}function c(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)&&a.axisX.scaleBreaks&&a.axisX.scaleBreaks.autoCalculate&&1<=a.axisX.scaleBreaks.maxNumberOfAutoBreaks)for(var b=a.axisX.dataInfo,c=b.min,d=b.max,f=b._dataRanges,g,h=0,l=0;l<a.dataSeriesIndexes.length;l++){var p=e.data[a.dataSeriesIndexes[l]];if(!(4>p.dataPoints.length))for(h=
0;h<p.dataPoints.length;h++)g=(d+1-c)*Math.max(parseFloat(a.axisX.scaleBreaks.collapsibleThreshold)||10,10)/100,b=p.dataPoints[h].x.getTime?p.dataPoints[h].x.getTime():p.dataPoints[h].x,g=Math.floor((b-c)/g),b<f[g].min&&(f[g].min=b),b>f[g].max&&(f[g].max=b)}}for(var b,e=this,f=!1,l=0;l<this._axes.length;l++)if(this._axes[l].scaleBreaks&&this._axes[l].scaleBreaks.autoCalculate&&1<=this._axes[l].scaleBreaks.maxNumberOfAutoBreaks){f=!0;this._axes[l].dataInfo._dataRanges=[];for(var u=0;u<100/Math.max(parseFloat(this._axes[l].scaleBreaks.collapsibleThreshold)||
10,10);u++)this._axes[l].dataInfo._dataRanges.push({min:Infinity,max:-Infinity})}if(f){for(l=0;l<this.plotInfo.plotTypes.length;l++)for(f=this.plotInfo.plotTypes[l],u=0;u<f.plotUnits.length;u++)b=f.plotUnits[u],"line"===b.type||"stepLine"===b.type||"spline"===b.type||"column"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"bar"===b.type||"bubble"===b.type||"scatter"===b.type||"candlestick"===b.type||"ohlc"===b.type||"rangeColumn"===b.type||"rangeBar"===b.type||"rangeArea"===
b.type||"rangeSplineArea"===b.type||"waterfall"===b.type||"error"===b.type||"boxAndWhisker"===b.type?d(b):0<=b.type.indexOf("stacked")&&c(b);for(l=0;l<this._axes.length;l++)if(this._axes[l].dataInfo._dataRanges){var z=this._axes[l].dataInfo.min;b=(this._axes[l].dataInfo.max+1-z)*Math.max(parseFloat(this._axes[l].scaleBreaks.collapsibleThreshold)||10,10)/100;var h=this._axes[l].dataInfo._dataRanges,p,n,f=[];if(this._axes[l].dataInfo.dataPointYPositiveSums){var q=this._axes[l].dataInfo.dataPointYPositiveSums;
p=h;for(u in q)if(q.hasOwnProperty(u)&&!isNaN(u)&&(n=q[u],!r(n))){var g=Math.floor((n-z)/b);n<p[g].min&&(p[g].min=n);n>p[g].max&&(p[g].max=n)}delete this._axes[l].dataInfo.dataPointYPositiveSums}if(this._axes[l].dataInfo.dataPointYNegativeSums){q=this._axes[l].dataInfo.dataPointYNegativeSums;p=h;for(u in q)q.hasOwnProperty(u)&&!isNaN(u)&&(n=-1*q[u],r(n)||(g=Math.floor((n-z)/b),n<p[g].min&&(p[g].min=n),n>p[g].max&&(p[g].max=n)));delete this._axes[l].dataInfo.dataPointYNegativeSums}for(u=0;u<h.length-
1;u++)if(p=h[u].max,isFinite(p))for(;u<h.length-1;)if(z=h[u+1].min,isFinite(z)){n=z-p;n>b&&f.push({diff:n,start:p,end:z});break}else u++;if(this._axes[l].scaleBreaks.customBreaks)for(u=0;u<this._axes[l].scaleBreaks.customBreaks.length;u++)for(b=0;b<f.length;b++)if(this._axes[l].scaleBreaks.customBreaks[u].startValue<=f[b].start&&f[b].start<=this._axes[l].scaleBreaks.customBreaks[u].endValue||this._axes[l].scaleBreaks.customBreaks[u].startValue<=f[b].start&&f[b].start<=this._axes[l].scaleBreaks.customBreaks[u].endValue||
f[b].start<=this._axes[l].scaleBreaks.customBreaks[u].startValue&&this._axes[l].scaleBreaks.customBreaks[u].startValue<=f[b].end||f[b].start<=this._axes[l].scaleBreaks.customBreaks[u].endValue&&this._axes[l].scaleBreaks.customBreaks[u].endValue<=f[b].end)f.splice(b,1),b--;f.sort(function(a,b){return b.diff-a.diff});for(u=0;u<Math.min(f.length,this._axes[l].scaleBreaks.maxNumberOfAutoBreaks);u++)b=a(f[u].start,f[u].end,this._axes[l].logarithmic?this._axes[l].dataInfo.max/this._axes[l].dataInfo.min:
this._axes[l].dataInfo.max-this._axes[l].dataInfo.min,this._axes[l].logarithmic),this._axes[l].scaleBreaks.autoBreaks.push(new V(this,"autoBreaks",b,u,++this._eventManager.lastObjectId,this._axes[l].scaleBreaks)),this._axes[l].scaleBreaks._appliedBreaks.push(this._axes[l].scaleBreaks.autoBreaks[this._axes[l].scaleBreaks.autoBreaks.length-1]);this._axes[l].scaleBreaks._appliedBreaks.sort(function(a,b){return a.startValue-b.startValue})}}};m.prototype.renderCrosshairs=function(a){for(var d=0;d<this.axisX.length;d++)this.axisX[d]!=
a&&(this.axisX[d].crosshair&&this.axisX[d].crosshair.enabled&&!this.axisX[d].crosshair._hidden)&&this.axisX[d].showCrosshair(this.axisX[d].crosshair._updatedValue);for(d=0;d<this.axisX2.length;d++)this.axisX2[d]!=a&&(this.axisX2[d].crosshair&&this.axisX2[d].crosshair.enabled&&!this.axisX2[d].crosshair._hidden)&&this.axisX2[d].showCrosshair(this.axisX2[d].crosshair._updatedValue);for(d=0;d<this.axisY.length;d++)this.axisY[d]!=a&&(this.axisY[d].crosshair&&this.axisY[d].crosshair.enabled&&!this.axisY[d].crosshair._hidden)&&
this.axisY[d].showCrosshair(this.axisY[d].crosshair._updatedValue);for(d=0;d<this.axisY2.length;d++)this.axisY2[d]!=a&&(this.axisY2[d].crosshair&&this.axisY2[d].crosshair.enabled&&!this.axisY2[d].crosshair._hidden)&&this.axisY2[d].showCrosshair(this.axisY2[d].crosshair._updatedValue)};m.prototype.getDataPointAtXY=function(a,d,c){c=c||!1;for(var b=[],e=this._dataInRenderedOrder.length-1;0<=e;e--){var f=null;(f=this._dataInRenderedOrder[e].getDataPointAtXY(a,d,c))&&b.push(f)}a=null;d=!1;for(c=0;c<b.length;c++)if("line"===
b[c].dataSeries.type||"stepLine"===b[c].dataSeries.type||"area"===b[c].dataSeries.type||"stepArea"===b[c].dataSeries.type)if(e=ma("markerSize",b[c].dataPoint,b[c].dataSeries)||8,b[c].distance<=e/2){d=!0;break}for(c=0;c<b.length;c++)d&&"line"!==b[c].dataSeries.type&&"stepLine"!==b[c].dataSeries.type&&"area"!==b[c].dataSeries.type&&"stepArea"!==b[c].dataSeries.type||(a?b[c].distance<=a.distance&&(a=b[c]):a=b[c]);return a};m.prototype.getObjectAtXY=function(a,d,c){var b=null;if(c=this.getDataPointAtXY(a,
d,c||!1))b=c.dataSeries.dataPointIds[c.dataPointIndex];else if(s)b=Ya(a,d,this._eventManager.ghostCtx);else for(c=0;c<this.legend.items.length;c++){var e=this.legend.items[c];a>=e.x1&&(a<=e.x2&&d>=e.y1&&d<=e.y2)&&(b=e.id)}return b};m.prototype.getAutoFontSize=lb;m.prototype.resetOverlayedCanvas=function(){this.overlaidCanvasCtx.clearRect(0,0,this.width,this.height)};m.prototype.clearCanvas=kb;m.prototype.attachEvent=function(a){this._events.push(a)};m.prototype._touchEventHandler=function(a){if(a.changedTouches&&
this.interactivityEnabled){var d=[],c=a.changedTouches,b=c?c[0]:a,e=null;switch(a.type){case "touchstart":case "MSPointerDown":d=["mousemove","mousedown"];this._lastTouchData=Na(b);this._lastTouchData.time=new Date;break;case "touchmove":case "MSPointerMove":d=["mousemove"];break;case "touchend":case "MSPointerUp":var f=this._lastTouchData&&this._lastTouchData.time?new Date-this._lastTouchData.time:0,d="touchstart"===this._lastTouchEventType||"MSPointerDown"===this._lastTouchEventType||300>f?["mouseup",
"click"]:["mouseup"];break;default:return}if(!(c&&1<c.length)){e=Na(b);e.time=new Date;try{var l=e.y-this._lastTouchData.y,f=e.time-this._lastTouchData.time;if(1<Math.abs(l)&&this._lastTouchData.scroll||5<Math.abs(l)&&250>f)this._lastTouchData.scroll=!0}catch(u){}this._lastTouchEventType=a.type;if(this._lastTouchData.scroll&&this.zoomEnabled)this.isDrag&&this.resetOverlayedCanvas(),this.isDrag=!1;else for(c=0;c<d.length;c++)if(e=d[c],l=document.createEvent("MouseEvent"),l.initMouseEvent(e,!0,!0,window,
1,b.screenX,b.screenY,b.clientX,b.clientY,!1,!1,!1,!1,0,null),b.target.dispatchEvent(l),!r(this._lastTouchData.scroll)&&!this._lastTouchData.scroll||!this._lastTouchData.scroll&&250<f||"click"===e)a.preventManipulation&&a.preventManipulation(),a.preventDefault&&a.cancelable&&a.preventDefault()}}};m.prototype._dispatchRangeEvent=function(a,d){var c={chart:this};c.type=a;c.trigger=d;var b=[];this.axisX&&0<this.axisX.length&&b.push("axisX");this.axisX2&&0<this.axisX2.length&&b.push("axisX2");this.axisY&&
0<this.axisY.length&&b.push("axisY");this.axisY2&&0<this.axisY2.length&&b.push("axisY2");for(var e=0;e<b.length;e++)if(r(c[b[e]])&&(c[b[e]]=[]),"axisY"===b[e])for(var f=0;f<this.axisY.length;f++)c[b[e]].push({viewportMinimum:this[b[e]][f].sessionVariables.newViewportMinimum,viewportMaximum:this[b[e]][f].sessionVariables.newViewportMaximum});else if("axisY2"===b[e])for(f=0;f<this.axisY2.length;f++)c[b[e]].push({viewportMinimum:this[b[e]][f].sessionVariables.newViewportMinimum,viewportMaximum:this[b[e]][f].sessionVariables.newViewportMaximum});
else if("axisX"===b[e])for(f=0;f<this.axisX.length;f++)c[b[e]].push({viewportMinimum:this[b[e]][f].sessionVariables.newViewportMinimum,viewportMaximum:this[b[e]][f].sessionVariables.newViewportMaximum});else if("axisX2"===b[e])for(f=0;f<this.axisX2.length;f++)c[b[e]].push({viewportMinimum:this[b[e]][f].sessionVariables.newViewportMinimum,viewportMaximum:this[b[e]][f].sessionVariables.newViewportMaximum});this.dispatchEvent(a,c,this)};m.prototype._mouseEventHandler=function(a){"undefined"===typeof a.target&&
a.srcElement&&(a.target=a.srcElement);var d=Na(a),c=a.type,b,e;a.which?e=3==a.which:a.button&&(e=2==a.button);m.capturedEventParam&&(b=m.capturedEventParam,"mouseup"===c&&(m.capturedEventParam=null,b.chart.overlaidCanvas.releaseCapture?b.chart.overlaidCanvas.releaseCapture():document.documentElement.removeEventListener("mouseup",b.chart._mouseEventHandler,!1)),b.hasOwnProperty(c)&&("mouseup"!==c||b.chart.overlaidCanvas.releaseCapture?a.target!==b.chart.overlaidCanvas&&s||b[c].call(b.context,d.x,d.y):
a.target!==b.chart.overlaidCanvas&&(b.chart.isDrag=!1)));if(this.interactivityEnabled)if(this._ignoreNextEvent)this._ignoreNextEvent=!1;else if(a.preventManipulation&&a.preventManipulation(),a.preventDefault&&a.preventDefault(),Ga&&window.console&&(window.console.log(c+" --\x3e x: "+d.x+"; y:"+d.y),e&&window.console.log(a.which),"mouseup"===c&&window.console.log("mouseup")),!e){if(!m.capturedEventParam&&this._events){for(var f=0;f<this._events.length;f++)if(this._events[f].hasOwnProperty(c))if(b=
this._events[f],e=b.bounds,d.x>=e.x1&&d.x<=e.x2&&d.y>=e.y1&&d.y<=e.y2){b[c].call(b.context,d.x,d.y);"mousedown"===c&&!0===b.capture?(m.capturedEventParam=b,this.overlaidCanvas.setCapture?this.overlaidCanvas.setCapture():document.documentElement.addEventListener("mouseup",this._mouseEventHandler,!1)):"mouseup"===c&&(b.chart.overlaidCanvas.releaseCapture?b.chart.overlaidCanvas.releaseCapture():document.documentElement.removeEventListener("mouseup",this._mouseEventHandler,!1));break}else b=null;a.target.style.cursor=
b&&b.cursor?b.cursor:this._defaultCursor}c=this.plotArea;if(d.x<c.x1||d.x>c.x2||d.y<c.y1||d.y>c.y2)if(this.toolTip&&this.toolTip.enabled){this.toolTip.hide();this.toolTip.dispatchEvent("hidden",{chart:this,toolTip:this.toolTip},this.toolTip);for(f=0;f<this.axisX.length;f++)this.axisX[f].crosshair&&this.axisX[f].crosshair.enabled&&this.axisX[f].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisX[f].options},this.axisX[f].crosshair);for(f=0;f<this.axisX2.length;f++)this.axisX2[f].crosshair&&
this.axisX2[f].crosshair.enabled&&this.axisX2[f].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisX2[f].options},this.axisX2[f].crosshair);for(f=0;f<this.axisY.length;f++)this.axisY[f].crosshair&&this.axisY[f].crosshair.enabled&&this.axisY[f].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisY[f].options},this.axisY[f].crosshair);for(f=0;f<this.axisY2.length;f++)this.axisY2[f].crosshair&&this.axisY2[f].crosshair.enabled&&this.axisY2[f].crosshair.dispatchEvent("hidden",{chart:this,
axis:this.axisY2[f].options},this.axisY2[f].crosshair)}else this.resetOverlayedCanvas();this.isDrag&&this.zoomEnabled||!this._eventManager||this._eventManager.mouseEventHandler(a)}};m.prototype._plotAreaMouseDown=function(a,d){this.isDrag=!0;this.dragStartPoint={x:a,y:d}};m.prototype._plotAreaMouseUp=function(a,d){if(("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement)&&this.isDrag){var c=d-this.dragStartPoint.y,b=a-this.dragStartPoint.x,e=0<=this.zoomType.indexOf("x"),
f=0<=this.zoomType.indexOf("y"),l=!1;this.resetOverlayedCanvas();if("xySwapped"===this.plotInfo.axisPlacement)var u=f,f=e,e=u;if(this.panEnabled||this.zoomEnabled){if(this.panEnabled)for(e=f=0;e<this._axes.length;e++)c=this._axes[e],c.logarithmic?c.viewportMinimum<c.minimum?(f=c.minimum/c.viewportMinimum,c.sessionVariables.newViewportMinimum=c.viewportMinimum*f,c.sessionVariables.newViewportMaximum=c.viewportMaximum*f,l=!0):c.viewportMaximum>c.maximum&&(f=c.viewportMaximum/c.maximum,c.sessionVariables.newViewportMinimum=
c.viewportMinimum/f,c.sessionVariables.newViewportMaximum=c.viewportMaximum/f,l=!0):c.viewportMinimum<c.minimum?(f=c.minimum-c.viewportMinimum,c.sessionVariables.newViewportMinimum=c.viewportMinimum+f,c.sessionVariables.newViewportMaximum=c.viewportMaximum+f,l=!0):c.viewportMaximum>c.maximum&&(f=c.viewportMaximum-c.maximum,c.sessionVariables.newViewportMinimum=c.viewportMinimum-f,c.sessionVariables.newViewportMaximum=c.viewportMaximum-f,l=!0);else if((!e||2<Math.abs(b))&&(!f||2<Math.abs(c))&&this.zoomEnabled){if(!this.dragStartPoint)return;
c=e?this.dragStartPoint.x:this.plotArea.x1;b=f?this.dragStartPoint.y:this.plotArea.y1;e=e?a:this.plotArea.x2;f=f?d:this.plotArea.y2;2<Math.abs(c-e)&&2<Math.abs(b-f)&&this._zoomPanToSelectedRegion(c,b,e,f)&&(l=!0)}l&&(this._ignoreNextEvent=!0,this._dispatchRangeEvent("rangeChanging","zoom"),this.stockChart&&(this.stockChart.navigator&&this.stockChart.navigator.enabled)&&(this.stockChart._rangeEventParameter||(this.stockChart._rangeEventParameter={stockChart:this.stockChart,source:"chart",index:this.stockChart.charts.indexOf(this),
minimum:this.stockChart.sessionVariables._axisXMin,maximum:this.stockChart.sessionVariables._axisXMax}),this.stockChart._rangeEventParameter.type="rangeChanging",this.stockChart.dispatchEvent("rangeChanging",this.stockChart._rangeEventParameter,this.stockChart)),this.render(),this._dispatchRangeEvent("rangeChanged","zoom"),this.stockChart&&(this.stockChart.navigator&&this.stockChart.navigator.enabled)&&(this.stockChart._rangeEventParameter.type="rangeChanged",this.stockChart.dispatchEvent("rangeChanged",
this.stockChart._rangeEventParameter,this.stockChart)),l&&(this.zoomEnabled&&"none"===this._zoomButton.style.display)&&(Ka(this._zoomButton,this._resetButton),va(this,this._zoomButton,"pan"),va(this,this._resetButton,"reset")))}}this.isDrag=!1;if("none"!==this.plotInfo.axisPlacement){this.resetOverlayedCanvas();if(this.axisX&&0<this.axisX.length)for(l=0;l<this.axisX.length;l++)this.axisX[l].crosshair&&this.axisX[l].crosshair.enabled&&this.axisX[l].renderCrosshair(a,d);if(this.axisX2&&0<this.axisX2.length)for(l=
0;l<this.axisX2.length;l++)this.axisX2[l].crosshair&&this.axisX2[l].crosshair.enabled&&this.axisX2[l].renderCrosshair(a,d);if(this.axisY&&0<this.axisY.length)for(l=0;l<this.axisY.length;l++)this.axisY[l].crosshair&&this.axisY[l].crosshair.enabled&&this.axisY[l].renderCrosshair(a,d);if(this.axisY2&&0<this.axisY2.length)for(l=0;l<this.axisY2.length;l++)this.axisY2[l].crosshair&&this.axisY2[l].crosshair.enabled&&this.axisY2[l].renderCrosshair(a,d)}};m.prototype._plotAreaMouseMove=function(a,d){if(this.isDrag&&
"none"!==this.plotInfo.axisPlacement){var c=0,b=0,e=c=null,e=0<=this.zoomType.indexOf("x"),f=0<=this.zoomType.indexOf("y"),l=this;"xySwapped"===this.plotInfo.axisPlacement&&(c=f,f=e,e=c);c=this.dragStartPoint.x-a;b=this.dragStartPoint.y-d;2<Math.abs(c)&&8>Math.abs(c)&&(this.panEnabled||this.zoomEnabled)?(this.toolTip.hide(),this.toolTip.dispatchEvent("hidden",{chart:this,toolTip:this.toolTip},this.toolTip)):this.panEnabled||this.zoomEnabled||this.toolTip.mouseMoveHandler(a,d);if((!e||2<Math.abs(c)||
!f||2<Math.abs(b))&&(this.panEnabled||this.zoomEnabled))if(this.panEnabled)e={x1:e?this.plotArea.x1+c:this.plotArea.x1,y1:f?this.plotArea.y1+b:this.plotArea.y1,x2:e?this.plotArea.x2+c:this.plotArea.x2,y2:f?this.plotArea.y2+b:this.plotArea.y2},clearTimeout(l._panTimerId),l._panTimerId=setTimeout(function(b,c,e,f){return function(){l._zoomPanToSelectedRegion(b,c,e,f,!0)&&(l._dispatchRangeEvent("rangeChanging","pan"),l.stockChart&&(l.stockChart.navigator&&l.stockChart.navigator.enabled)&&(l.stockChart._rangeEventParameter.type=
"rangeChanging",l.stockChart.dispatchEvent("rangeChanging",l.stockChart._rangeEventParameter,l.stockChart)),l.render(),l._dispatchRangeEvent("rangeChanged","pan"),l.stockChart&&(l.stockChart.navigator&&l.stockChart.navigator.enabled)&&(l.stockChart._rangeEventParameter.type="rangeChanged",l.stockChart.dispatchEvent("rangeChanged",l.stockChart._rangeEventParameter,l.stockChart)),l.dragStartPoint.x=a,l.dragStartPoint.y=d)}}(e.x1,e.y1,e.x2,e.y2),0);else if(this.zoomEnabled){this.resetOverlayedCanvas();
c=this.overlaidCanvasCtx.globalAlpha;this.overlaidCanvasCtx.fillStyle="#A89896";var b=e?this.dragStartPoint.x:this.plotArea.x1,u=f?this.dragStartPoint.y:this.plotArea.y1,z=e?a-this.dragStartPoint.x:this.plotArea.x2-this.plotArea.x1,h=f?d-this.dragStartPoint.y:this.plotArea.y2-this.plotArea.y1;this.validateRegion(b,u,e?a:this.plotArea.x2-this.plotArea.x1,f?d:this.plotArea.y2-this.plotArea.y1,"xy"!==this.zoomType).isValid&&(this.resetOverlayedCanvas(),this.overlaidCanvasCtx.fillStyle="#99B2B5");this.overlaidCanvasCtx.globalAlpha=
0.7;this.overlaidCanvasCtx.fillRect(b,u,z,h);this.overlaidCanvasCtx.globalAlpha=c}}else if(this.toolTip.mouseMoveHandler(a,d),"none"!==this.plotInfo.axisPlacement){if(this.axisX&&0<this.axisX.length)for(e=0;e<this.axisX.length;e++)this.axisX[e].crosshair&&this.axisX[e].crosshair.enabled&&this.axisX[e].renderCrosshair(a,d);if(this.axisX2&&0<this.axisX2.length)for(e=0;e<this.axisX2.length;e++)this.axisX2[e].crosshair&&this.axisX2[e].crosshair.enabled&&this.axisX2[e].renderCrosshair(a,d);if(this.axisY&&
0<this.axisY.length)for(e=0;e<this.axisY.length;e++)this.axisY[e].crosshair&&this.axisY[e].crosshair.enabled&&this.axisY[e].renderCrosshair(a,d);if(this.axisY2&&0<this.axisY2.length)for(e=0;e<this.axisY2.length;e++)this.axisY2[e].crosshair&&this.axisY2[e].crosshair.enabled&&this.axisY2[e].renderCrosshair(a,d)}};m.prototype._zoomPanToSelectedRegion=function(a,d,c,b,e){a=this.validateRegion(a,d,c,b,e);d=a.axesWithValidRange;c=a.axesRanges;if(a.isValid)for(b=0;b<d.length;b++)e=c[b],d[b].setViewPortRange(e.val1,
e.val2),this.syncCharts&&"y"!=this.zoomType&&this.syncCharts(e.val1,e.val2),this.stockChart&&(this.stockChart._rangeEventParameter={stockChart:this.stockChart,source:"chart",index:this.stockChart.charts.indexOf(this),minimum:e.val1,maximum:e.val2});return a.isValid};m.prototype.validateRegion=function(a,d,c,b,e){e=e||!1;for(var f=0<=this.zoomType.indexOf("x"),l=0<=this.zoomType.indexOf("y"),u=!1,z=[],h=[],p=[],n=0;n<this._axes.length;n++)("axisX"===this._axes[n].type&&f||"axisY"===this._axes[n].type&&
l)&&h.push(this._axes[n]);for(l=0;l<h.length;l++){var n=h[l],f=!1,q=n.convertPixelToValue({x:a,y:d}),g=n.convertPixelToValue({x:c,y:b});if(q>g)var B=g,g=q,q=B;if(n.scaleBreaks)for(B=0;!f&&B<n.scaleBreaks._appliedBreaks.length;B++)f=n.scaleBreaks._appliedBreaks[B].startValue<=q&&n.scaleBreaks._appliedBreaks[B].endValue>=g;if(isFinite(n.dataInfo.minDiff))if(B=n.getApparentDifference(q,g,null,!0),!(f||!(this.panEnabled&&n.scaleBreaks&&n.scaleBreaks._appliedBreaks.length)&&(n.logarithmic&&B<Math.pow(n.dataInfo.minDiff,
3)||!n.logarithmic&&B<3*Math.abs(n.dataInfo.minDiff))||q<n.minimum||g>n.maximum))z.push(n),p.push({val1:q,val2:g}),u=!0;else if(!e){u=!1;break}}return{isValid:u,axesWithValidRange:z,axesRanges:p}};m.prototype.preparePlotArea=function(){var a=this.plotArea;!s&&(0<a.x1||0<a.y1)&&a.ctx.translate(a.x1,a.y1);if((this.axisX[0]||this.axisX2[0])&&(this.axisY[0]||this.axisY2[0])){var d=this.axisX[0]?this.axisX[0].lineCoordinates:this.axisX2[0].lineCoordinates;if(this.axisY&&0<this.axisY.length&&this.axisY[0]){var c=
this.axisY[0];a.x1=d.x1<d.x2?d.x1:c.lineCoordinates.x1;a.y1=d.y1<c.lineCoordinates.y1?d.y1:c.lineCoordinates.y1;a.x2=d.x2>c.lineCoordinates.x2?d.x2:c.lineCoordinates.x2;a.y2=d.y2>d.y1?d.y2:c.lineCoordinates.y2;a.width=a.x2-a.x1;a.height=a.y2-a.y1}this.axisY2&&0<this.axisY2.length&&this.axisY2[0]&&(c=this.axisY2[0],a.x1=d.x1<d.x2?d.x1:c.lineCoordinates.x1,a.y1=d.y1<c.lineCoordinates.y1?d.y1:c.lineCoordinates.y1,a.x2=d.x2>c.lineCoordinates.x2?d.x2:c.lineCoordinates.x2,a.y2=d.y2>d.y1?d.y2:c.lineCoordinates.y2,
a.width=a.x2-a.x1,a.height=a.y2-a.y1)}else d=this.layoutManager.getFreeSpace(),a.x1=d.x1,a.x2=d.x2,a.y1=d.y1,a.y2=d.y2,a.width=d.width,a.height=d.height;s||(a.canvas.width=a.width,a.canvas.height=a.height,a.canvas.style.left=a.x1+"px",a.canvas.style.top=a.y1+"px",(0<a.x1||0<a.y1)&&a.ctx.translate(-a.x1,-a.y1));a.layoutManager=new Da(a.x1,a.y1,a.x2,a.y2,2)};m.prototype.renderIndexLabels=function(a){var d=a||this.plotArea.ctx,c=this.plotArea,b=0,e=0,f=0,l=0,u=b=l=e=f=0,z=0;for(a=0;a<this._indexLabels.length;a++){var h=
this._indexLabels[a],p=h.chartType.toLowerCase(),n,q,u=ma("indexLabelFontColor",h.dataPoint,h.dataSeries),z=ma("indexLabelFontSize",h.dataPoint,h.dataSeries);n=ma("indexLabelFontFamily",h.dataPoint,h.dataSeries);q=ma("indexLabelFontStyle",h.dataPoint,h.dataSeries);var l=ma("indexLabelFontWeight",h.dataPoint,h.dataSeries),g=ma("indexLabelBackgroundColor",h.dataPoint,h.dataSeries),e=ma("indexLabelMaxWidth",h.dataPoint,h.dataSeries),f=ma("indexLabelWrap",h.dataPoint,h.dataSeries),B=ma("indexLabelLineDashType",
h.dataPoint,h.dataSeries),k=ma("indexLabelLineColor",h.dataPoint,h.dataSeries),m=r(h.dataPoint.indexLabelLineThickness)?r(h.dataSeries.options.indexLabelLineThickness)?0:h.dataSeries.options.indexLabelLineThickness:h.dataPoint.indexLabelLineThickness,b=0<m?Math.min(10,("normal"===this.plotInfo.axisPlacement?this.plotArea.height:this.plotArea.width)<<0):0,t={percent:null,total:null},x=null;if(0<=h.dataSeries.type.indexOf("stacked")||"pie"===h.dataSeries.type||"doughnut"===h.dataSeries.type)t=this.getPercentAndTotal(h.dataSeries,
h.dataPoint);if(h.dataSeries.indexLabelFormatter||h.dataPoint.indexLabelFormatter)x={chart:this,dataSeries:h.dataSeries,dataPoint:h.dataPoint,index:h.indexKeyword,total:t.total,percent:t.percent};var A=h.dataPoint.indexLabelFormatter?h.dataPoint.indexLabelFormatter(x):h.dataPoint.indexLabel?this.replaceKeywordsWithValue(h.dataPoint.indexLabel,h.dataPoint,h.dataSeries,null,h.indexKeyword):h.dataSeries.indexLabelFormatter?h.dataSeries.indexLabelFormatter(x):h.dataSeries.indexLabel?this.replaceKeywordsWithValue(h.dataSeries.indexLabel,
h.dataPoint,h.dataSeries,null,h.indexKeyword):null;if(null!==A&&""!==A){var t=ma("indexLabelPlacement",h.dataPoint,h.dataSeries),x=ma("indexLabelOrientation",h.dataPoint,h.dataSeries),J=h.direction,C=h.dataSeries.axisX,y=h.dataSeries.axisY,v=!1,g=new la(d,{x:0,y:0,maxWidth:e?e:0.5*this.width,maxHeight:f?5*z:1.5*z,angle:"horizontal"===x?0:-90,text:A,padding:0,backgroundColor:g,horizontalAlign:"left",fontSize:z,fontFamily:n,fontWeight:l,fontColor:u,fontStyle:q,textBaseline:"top"});g.measureText();h.dataSeries.indexLabelMaxWidth=
g.maxWidth;if("stackedarea100"===p){if(h.point.x<c.x1||h.point.x>c.x2||h.point.y<c.y1-1||h.point.y>c.y2+1)continue}else if("rangearea"===p||"rangesplinearea"===p){if(h.dataPoint.x<C.viewportMinimum||h.dataPoint.x>C.viewportMaximum||Math.max.apply(null,h.dataPoint.y)<y.viewportMinimum||Math.min.apply(null,h.dataPoint.y)>y.viewportMaximum)continue}else if(0<=p.indexOf("line")||0<=p.indexOf("area")||0<=p.indexOf("bubble")||0<=p.indexOf("scatter")){if(h.dataPoint.x<C.viewportMinimum||h.dataPoint.x>C.viewportMaximum||
h.dataPoint.y<y.viewportMinimum||h.dataPoint.y>y.viewportMaximum)continue}else if(0<=p.indexOf("column")||"waterfall"===p||"error"===p&&!h.axisSwapped){if(h.dataPoint.x<C.viewportMinimum||h.dataPoint.x>C.viewportMaximum||h.bounds.y1>c.y2||h.bounds.y2<c.y1)continue}else if(0<=p.indexOf("bar")||"error"===p){if(h.dataPoint.x<C.viewportMinimum||h.dataPoint.x>C.viewportMaximum||h.bounds.x1>c.x2||h.bounds.x2<c.x1)continue}else if("candlestick"===p||"ohlc"===p){if(h.dataPoint.x<C.viewportMinimum||h.dataPoint.x>
C.viewportMaximum||Math.max.apply(null,h.dataPoint.y)<y.viewportMinimum||Math.min.apply(null,h.dataPoint.y)>y.viewportMaximum)continue}else if(h.dataPoint.x<C.viewportMinimum||h.dataPoint.x>C.viewportMaximum)continue;e=l=2;"horizontal"===x?(u=g.width,z=g.height):(z=g.width,u=g.height);if("normal"===this.plotInfo.axisPlacement){if(0<=p.indexOf("line")||0<=p.indexOf("area"))t="auto",l=4;else if(0<=p.indexOf("stacked"))"auto"===t&&(t="inside");else if("bubble"===p||"scatter"===p)t="inside";n=h.point.x-
u/2;"inside"!==t?(e=c.y1,f=c.y2,0<J?(q=h.point.y-z-l-b,q<e&&(q="auto"===t?Math.max(h.point.y,e)+l+b:e+l+b,v=q+z>h.point.y)):(q=h.point.y+l+b,q>f-z-l-b&&(q="auto"===t?Math.min(h.point.y,f)-z-l-b:f-z-l-b,v=q<h.point.y))):(e=Math.max(h.bounds.y1,c.y1),f=Math.min(h.bounds.y2,c.y2),b=0<=p.indexOf("range")||"error"===p?0<J?Math.max(h.bounds.y1,c.y1)+z/2+l:Math.min(h.bounds.y2,c.y2)-z/2-l:(Math.max(h.bounds.y1,c.y1)+Math.min(h.bounds.y2,c.y2))/2,0<J?(q=Math.max(h.point.y,b)-z/2,q<e&&("bubble"===p||"scatter"===
p)&&(q=Math.max(h.point.y-z-l,c.y1+l))):(q=Math.min(h.point.y,b)-z/2,q>f-z-l&&("bubble"===p||"scatter"===p)&&(q=Math.min(h.point.y+l,c.y2-z-l))),q=Math.min(q,f-z))}else 0<=p.indexOf("line")||0<=p.indexOf("area")||0<=p.indexOf("scatter")?(t="auto",e=4):0<=p.indexOf("stacked")?"auto"===t&&(t="inside"):"bubble"===p&&(t="inside"),q=h.point.y-z/2,"inside"!==t?(l=c.x1,f=c.x2,0>J?(n=h.point.x-u-e-b,n<l&&(n="auto"===t?Math.max(h.point.x,l)+e+b:l+e+b,v=n+u>h.point.x)):(n=h.point.x+e+b,n>f-u-e-b&&(n="auto"===
t?Math.min(h.point.x,f)-u-e-b:f-u-e-b,v=n<h.point.x))):(l=Math.max(h.bounds.x1,c.x1),Math.min(h.bounds.x2,c.x2),b=0<=p.indexOf("range")||"error"===p?0>J?Math.max(h.bounds.x1,c.x1)+u/2+e:Math.min(h.bounds.x2,c.x2)-u/2-e:(Math.max(h.bounds.x1,c.x1)+Math.min(h.bounds.x2,c.x2))/2,n=0>J?Math.max(h.point.x,b)-u/2:Math.min(h.point.x,b)-u/2,n=Math.max(n,l));"vertical"===x&&(q+=z);g.x=n;g.y=q;g.render(!0);m&&("inside"!==t&&(0>p.indexOf("bar")&&("error"!==p||!h.axisSwapped)&&h.point.x>c.x1&&h.point.x<c.x2||
!v)&&(0>p.indexOf("column")&&("error"!==p||h.axisSwapped)&&h.point.y>c.y1&&h.point.y<c.y2||!v))&&(d.lineWidth=m,d.strokeStyle=k?k:"gray",d.setLineDash&&d.setLineDash(Q(B,m)),d.beginPath(),d.moveTo(h.point.x,h.point.y),0<=p.indexOf("bar")||"error"===p&&h.axisSwapped?d.lineTo(n+(0<h.direction?0:u),q+("horizontal"===x?z:-z)/2):0<=p.indexOf("column")||"error"===p&&!h.axisSwapped?d.lineTo(n+u/2,q+((0<h.direction?z:-z)+("horizontal"===x?z:-z))/2):d.lineTo(n+u/2,q+((q<h.point.y?z:-z)+("horizontal"===x?z:
-z))/2),d.stroke())}}d={source:d,dest:this.plotArea.ctx,animationCallback:L.fadeInAnimation,easingFunction:L.easing.easeInQuad,animationBase:0,startTimePercent:0.7};for(a=0;a<this._indexLabels.length;a++)h=this._indexLabels[a],g=ma("indexLabelBackgroundColor",h.dataPoint,h.dataSeries),h.dataSeries.indexLabelBackgroundColor=r(g)?s?"transparent":null:g;return d};m.prototype.renderLine=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=s?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=
this._eventManager.ghostCtx;c.save();var e=this.plotArea;c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();for(var f=[],l,u=0;u<a.dataSeriesIndexes.length;u++){var z=a.dataSeriesIndexes[u],h=this.data[z];c.lineWidth=h.lineThickness;var p=h.dataPoints,n="solid";if(c.setLineDash){var q=Q(h.nullDataLineDashType,h.lineThickness),n=h.lineDashType,g=Q(n,h.lineThickness);c.setLineDash(g)}var B=h.id;this._eventManager.objectMap[B]={objectType:"dataSeries",dataSeriesIndex:z};B=S(B);b.strokeStyle=B;
b.lineWidth=0<h.lineThickness?Math.max(h.lineThickness,4):0;var B=h._colorSet,k=B=h.lineColor=h.options.lineColor?h.options.lineColor:B[0];c.strokeStyle=B;var m=!0,t=0,x,r;c.beginPath();if(0<p.length){for(var J=!1,t=0;t<p.length;t++)if(x=p[t].x.getTime?p[t].x.getTime():p[t].x,!(x<a.axisX.dataInfo.viewPortMin||x>a.axisX.dataInfo.viewPortMax&&(!h.connectNullData||!J)))if("number"!==typeof p[t].y)0<t&&!(h.connectNullData||J||m)&&(c.stroke(),s&&b.stroke()),J=!0;else{x=a.axisX.convertValueToPixel(x);r=
a.axisY.convertValueToPixel(p[t].y);var C=h.dataPointIds[t];this._eventManager.objectMap[C]={id:C,objectType:"dataPoint",dataSeriesIndex:z,dataPointIndex:t,x1:x,y1:r};m||J?(!m&&h.connectNullData?(c.setLineDash&&(h.options.nullDataLineDashType||n===h.lineDashType&&h.lineDashType!==h.nullDataLineDashType)&&(c.stroke(),c.beginPath(),c.moveTo(l.x,l.y),n=h.nullDataLineDashType,c.setLineDash(q)),c.lineTo(x,r),s&&b.lineTo(x,r)):(c.beginPath(),c.moveTo(x,r),s&&(b.beginPath(),b.moveTo(x,r))),J=m=!1):(c.lineTo(x,
r),s&&b.lineTo(x,r),0==t%500&&(c.stroke(),c.beginPath(),c.moveTo(x,r),s&&(b.stroke(),b.beginPath(),b.moveTo(x,r))));l={x:x,y:r};t<p.length-1&&(k!==(p[t].lineColor||B)||n!==(p[t].lineDashType||h.lineDashType))&&(c.stroke(),c.beginPath(),c.moveTo(x,r),k=p[t].lineColor||B,c.strokeStyle=k,c.setLineDash&&(p[t].lineDashType?(n=p[t].lineDashType,c.setLineDash(Q(n,h.lineThickness))):(n=h.lineDashType,c.setLineDash(g))));if(0<p[t].markerSize||0<h.markerSize){var y=h.getMarkerProperties(t,x,r,c);f.push(y);
C=S(C);s&&f.push({x:x,y:r,ctx:b,type:y.type,size:y.size,color:C,borderColor:C,borderThickness:y.borderThickness})}(p[t].indexLabel||h.indexLabel||p[t].indexLabelFormatter||h.indexLabelFormatter)&&this._indexLabels.push({chartType:"line",dataPoint:p[t],dataSeries:h,point:{x:x,y:r},direction:0>p[t].y===a.axisY.reversed?1:-1,color:B})}c.stroke();s&&b.stroke()}}Y.drawMarkers(f);s&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&
c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),b.beginPath());c.restore();c.beginPath();return{source:d,dest:this.plotArea.ctx,animationCallback:L.xClipAnimation,easingFunction:L.easing.linear,animationBase:0}}};m.prototype.renderStepLine=function(a){var d=a.targetCanvasCtx||
this.plotArea.ctx,c=s?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx;c.save();var e=this.plotArea;c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();for(var f=[],l,u=0;u<a.dataSeriesIndexes.length;u++){var z=a.dataSeriesIndexes[u],h=this.data[z];c.lineWidth=h.lineThickness;var p=h.dataPoints,n="solid";if(c.setLineDash){var q=Q(h.nullDataLineDashType,h.lineThickness),n=h.lineDashType,g=Q(n,h.lineThickness);c.setLineDash(g)}var B=h.id;this._eventManager.objectMap[B]=
{objectType:"dataSeries",dataSeriesIndex:z};B=S(B);b.strokeStyle=B;b.lineWidth=0<h.lineThickness?Math.max(h.lineThickness,4):0;var B=h._colorSet,k=B=h.lineColor=h.options.lineColor?h.options.lineColor:B[0];c.strokeStyle=B;var m=!0,t=0,x,r;c.beginPath();if(0<p.length){for(var J=!1,t=0;t<p.length;t++)if(x=p[t].getTime?p[t].x.getTime():p[t].x,!(x<a.axisX.dataInfo.viewPortMin||x>a.axisX.dataInfo.viewPortMax&&(!h.connectNullData||!J)))if("number"!==typeof p[t].y)0<t&&!(h.connectNullData||J||m)&&(c.stroke(),
s&&b.stroke()),J=!0;else{var C=r;x=a.axisX.convertValueToPixel(x);r=a.axisY.convertValueToPixel(p[t].y);var y=h.dataPointIds[t];this._eventManager.objectMap[y]={id:y,objectType:"dataPoint",dataSeriesIndex:z,dataPointIndex:t,x1:x,y1:r};m||J?(!m&&h.connectNullData?(c.setLineDash&&(h.options.nullDataLineDashType||n===h.lineDashType&&h.lineDashType!==h.nullDataLineDashType)&&(c.stroke(),c.beginPath(),c.moveTo(l.x,l.y),n=h.nullDataLineDashType,c.setLineDash(q)),c.lineTo(x,C),c.lineTo(x,r),s&&(b.lineTo(x,
C),b.lineTo(x,r))):(c.beginPath(),c.moveTo(x,r),s&&(b.beginPath(),b.moveTo(x,r))),J=m=!1):(c.lineTo(x,C),s&&b.lineTo(x,C),c.lineTo(x,r),s&&b.lineTo(x,r),0==t%500&&(c.stroke(),c.beginPath(),c.moveTo(x,r),s&&(b.stroke(),b.beginPath(),b.moveTo(x,r))));l={x:x,y:r};t<p.length-1&&(k!==(p[t].lineColor||B)||n!==(p[t].lineDashType||h.lineDashType))&&(c.stroke(),c.beginPath(),c.moveTo(x,r),k=p[t].lineColor||B,c.strokeStyle=k,c.setLineDash&&(p[t].lineDashType?(n=p[t].lineDashType,c.setLineDash(Q(n,h.lineThickness))):
(n=h.lineDashType,c.setLineDash(g))));if(0<p[t].markerSize||0<h.markerSize)C=h.getMarkerProperties(t,x,r,c),f.push(C),y=S(y),s&&f.push({x:x,y:r,ctx:b,type:C.type,size:C.size,color:y,borderColor:y,borderThickness:C.borderThickness});(p[t].indexLabel||h.indexLabel||p[t].indexLabelFormatter||h.indexLabelFormatter)&&this._indexLabels.push({chartType:"stepLine",dataPoint:p[t],dataSeries:h,point:{x:x,y:r},direction:0>p[t].y===a.axisY.reversed?1:-1,color:B})}c.stroke();s&&b.stroke()}}Y.drawMarkers(f);s&&
(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),b.beginPath());c.restore();c.beginPath();return{source:d,dest:this.plotArea.ctx,animationCallback:L.xClipAnimation,
easingFunction:L.easing.linear,animationBase:0}}};m.prototype.renderSpline=function(a){function d(a){a=v(a,2);if(0<a.length){b.beginPath();s&&e.beginPath();b.moveTo(a[0].x,a[0].y);a[0].newStrokeStyle&&(b.strokeStyle=a[0].newStrokeStyle);a[0].newLineDashArray&&b.setLineDash(a[0].newLineDashArray);s&&e.moveTo(a[0].x,a[0].y);for(var c=0;c<a.length-3;c+=3)if(b.bezierCurveTo(a[c+1].x,a[c+1].y,a[c+2].x,a[c+2].y,a[c+3].x,a[c+3].y),s&&e.bezierCurveTo(a[c+1].x,a[c+1].y,a[c+2].x,a[c+2].y,a[c+3].x,a[c+3].y),
0<c&&0===c%3E3||a[c+3].newStrokeStyle||a[c+3].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(a[c+3].x,a[c+3].y),a[c+3].newStrokeStyle&&(b.strokeStyle=a[c+3].newStrokeStyle),a[c+3].newLineDashArray&&b.setLineDash(a[c+3].newLineDashArray),s&&(e.stroke(),e.beginPath(),e.moveTo(a[c+3].x,a[c+3].y));b.stroke();s&&e.stroke()}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=s?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx;b.save();var f=this.plotArea;b.beginPath();
b.rect(f.x1,f.y1,f.width,f.height);b.clip();for(var l=[],u=0;u<a.dataSeriesIndexes.length;u++){var z=a.dataSeriesIndexes[u],h=this.data[z];b.lineWidth=h.lineThickness;var p=h.dataPoints,n="solid";if(b.setLineDash){var q=Q(h.nullDataLineDashType,h.lineThickness),n=h.lineDashType,g=Q(n,h.lineThickness);b.setLineDash(g)}var B=h.id;this._eventManager.objectMap[B]={objectType:"dataSeries",dataSeriesIndex:z};B=S(B);e.strokeStyle=B;e.lineWidth=0<h.lineThickness?Math.max(h.lineThickness,4):0;var B=h._colorSet,
k=B=h.lineColor=h.options.lineColor?h.options.lineColor:B[0];b.strokeStyle=B;var m=0,t,x,r=[];b.beginPath();if(0<p.length)for(x=!1,m=0;m<p.length;m++)if(t=p[m].getTime?p[m].x.getTime():p[m].x,!(t<a.axisX.dataInfo.viewPortMin||t>a.axisX.dataInfo.viewPortMax&&(!h.connectNullData||!x)))if("number"!==typeof p[m].y)0<m&&!x&&(h.connectNullData?b.setLineDash&&(0<r.length&&(h.options.nullDataLineDashType||!p[m-1].lineDashType))&&(r[r.length-1].newLineDashArray=q,n=h.nullDataLineDashType):(d(r),r=[])),x=!0;
else{t=a.axisX.convertValueToPixel(t);x=a.axisY.convertValueToPixel(p[m].y);var J=h.dataPointIds[m];this._eventManager.objectMap[J]={id:J,objectType:"dataPoint",dataSeriesIndex:z,dataPointIndex:m,x1:t,y1:x};r[r.length]={x:t,y:x};m<p.length-1&&(k!==(p[m].lineColor||B)||n!==(p[m].lineDashType||h.lineDashType))&&(k=p[m].lineColor||B,r[r.length-1].newStrokeStyle=k,b.setLineDash&&(p[m].lineDashType?(n=p[m].lineDashType,r[r.length-1].newLineDashArray=Q(n,h.lineThickness)):(n=h.lineDashType,r[r.length-1].newLineDashArray=
g)));if(0<p[m].markerSize||0<h.markerSize){var C=h.getMarkerProperties(m,t,x,b);l.push(C);J=S(J);s&&l.push({x:t,y:x,ctx:e,type:C.type,size:C.size,color:J,borderColor:J,borderThickness:C.borderThickness})}(p[m].indexLabel||h.indexLabel||p[m].indexLabelFormatter||h.indexLabelFormatter)&&this._indexLabels.push({chartType:"spline",dataPoint:p[m],dataSeries:h,point:{x:t,y:x},direction:0>p[m].y===a.axisY.reversed?1:-1,color:B});x=!1}d(r)}Y.drawMarkers(l);s&&(c.drawImage(this._preRenderCanvas,0,0,this.width,
this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(f.x1,f.y1,f.width,f.height),e.beginPath());b.restore();b.beginPath();return{source:c,dest:this.plotArea.ctx,animationCallback:L.xClipAnimation,easingFunction:L.easing.linear,
animationBase:0}}};m.prototype.renderColumn=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=s?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,f=0,l,u,z,h=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),f=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,p=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.width,
0.9*(this.plotArea.width/a.plotType.totalDataSeries))<<0,n=a.axisX.dataInfo.minDiff;isFinite(n)||(n=0.3*Math.abs(a.axisX.range));n=this.dataPointWidth=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.width*(a.axisX.logarithmic?Math.log(n)/Math.log(a.axisX.range):Math.abs(n)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&f>p&&(f=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,p));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&p<f)&&(p=Math.max(this.options.dataPointWidth?
this.dataPointWidth:-Infinity,f));n<f&&(n=f);n>p&&(n=p);c.save();s&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();s&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(p=0;p<a.dataSeriesIndexes.length;p++){var q=a.dataSeriesIndexes[p],g=this.data[q],B=g.dataPoints;if(0<B.length)for(var k=5<n&&g.bevelEnabled?!0:!1,f=0;f<B.length;f++)if(B[f].getTime?z=B[f].x.getTime():
z=B[f].x,!(z<a.axisX.dataInfo.viewPortMin||z>a.axisX.dataInfo.viewPortMax)&&"number"===typeof B[f].y){l=a.axisX.convertValueToPixel(z);u=a.axisY.convertValueToPixel(B[f].y);l=a.axisX.reversed?l+a.plotType.totalDataSeries*n/2-(a.previousDataSeriesCount+p)*n<<0:l-a.plotType.totalDataSeries*n/2+(a.previousDataSeriesCount+p)*n<<0;var m=a.axisX.reversed?l-n<<0:l+n<<0,t;0<=B[f].y?t=h:(t=u,u=h);u>t&&(b=u,u=t,t=b);b=B[f].color?B[f].color:g._colorSet[f%g._colorSet.length];da(c,l,u,m,t,b,0,null,k&&0<=B[f].y,
0>B[f].y&&k,!1,!1,g.fillOpacity);b=g.dataPointIds[f];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:f,x1:l,y1:u,x2:m,y2:t};b=S(b);s&&da(this._eventManager.ghostCtx,l,u,m,t,b,0,null,!1,!1,!1,!1);(B[f].indexLabel||g.indexLabel||B[f].indexLabelFormatter||g.indexLabelFormatter)&&this._indexLabels.push({chartType:"column",dataPoint:B[f],dataSeries:g,point:{x:l+(m-l)/2,y:0>B[f].y===a.axisY.reversed?u:t},direction:0>B[f].y===a.axisY.reversed?1:-1,bounds:{x1:l,
y1:Math.min(u,t),x2:m,y2:Math.max(u,t)},color:b})}}s&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();
return{source:d,dest:this.plotArea.ctx,animationCallback:L.yScaleAnimation,easingFunction:L.easing.easeOutQuart,animationBase:h<a.axisY.bounds.y1?a.axisY.bounds.y1:h>a.axisY.bounds.y2?a.axisY.bounds.y2:h}}};m.prototype.renderStackedColumn=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=s?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,f=[],l=[],u=[],z=[],h=0,p,n,q=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),h=this.options.dataPointMinWidth?
this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;p=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.width<<0;var g=a.axisX.dataInfo.minDiff;isFinite(g)||(g=0.3*Math.abs(a.axisX.range));g=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.width*(a.axisX.logarithmic?Math.log(g)/Math.log(a.axisX.range):Math.abs(g)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&h>p&&(h=Math.min(this.options.dataPointWidth?
this.dataPointWidth:Infinity,p));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&p<h)&&(p=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,h));g<h&&(g=h);g>p&&(g=p);c.save();s&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();s&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(var B=0;B<a.dataSeriesIndexes.length;B++){var k=a.dataSeriesIndexes[B],
m=this.data[k],t=m.dataPoints;if(0<t.length){var r=5<g&&m.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(h=0;h<t.length;h++)if(b=t[h].x.getTime?t[h].x.getTime():t[h].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof t[h].y){p=a.axisX.convertValueToPixel(b);var A=p-a.plotType.plotUnits.length*g/2+a.index*g<<0,J=A+g<<0,C;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0<t[h].y)u[b]=t[h].y+(u[b]?u[b]:0),0<u[b]&&(n=a.axisY.convertValueToPixel(u[b]),
C="undefined"!==typeof f[b]?f[b]:q,f[b]=n);else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=t[h].y)z[b]=t[h].y+(z[b]?z[b]:0),C=a.axisY.convertValueToPixel(z[b]),n="undefined"!==typeof l[b]?l[b]:q,l[b]=C;else if(n=a.axisY.convertValueToPixel(t[h].y),0<=t[h].y){var y="undefined"!==typeof f[b]?f[b]:0;n-=y;C=q-y;f[b]=y+(C-n)}else y=l[b]?l[b]:0,C=n+y,n=q+y,l[b]=y+(C-n);b=t[h].color?t[h].color:m._colorSet[h%m._colorSet.length];da(c,A,n,J,C,b,0,null,r&&0<=t[h].y,0>t[h].y&&r,!1,
!1,m.fillOpacity);b=m.dataPointIds[h];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:k,dataPointIndex:h,x1:A,y1:n,x2:J,y2:C};b=S(b);s&&da(this._eventManager.ghostCtx,A,n,J,C,b,0,null,!1,!1,!1,!1);(t[h].indexLabel||m.indexLabel||t[h].indexLabelFormatter||m.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedColumn",dataPoint:t[h],dataSeries:m,point:{x:p,y:0<=t[h].y?n:C},direction:0>t[h].y===a.axisY.reversed?1:-1,bounds:{x1:A,y1:Math.min(n,C),x2:J,y2:Math.max(n,
C)},color:b})}}}s&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx,
animationCallback:L.yScaleAnimation,easingFunction:L.easing.easeOutQuart,animationBase:q<a.axisY.bounds.y1?a.axisY.bounds.y1:q>a.axisY.bounds.y2?a.axisY.bounds.y2:q}}};m.prototype.renderStackedColumn100=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=s?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,f=[],l=[],u=[],z=[],h=0,p,n,q=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),h=this.options.dataPointMinWidth?this.dataPointMinWidth:
this.options.dataPointWidth?this.dataPointWidth:1;p=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.width<<0;var g=a.axisX.dataInfo.minDiff;isFinite(g)||(g=0.3*Math.abs(a.axisX.range));g=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.width*(a.axisX.logarithmic?Math.log(g)/Math.log(a.axisX.range):Math.abs(g)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&h>p&&(h=Math.min(this.options.dataPointWidth?
this.dataPointWidth:Infinity,p));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&p<h)&&(p=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,h));g<h&&(g=h);g>p&&(g=p);c.save();s&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();s&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(var B=0;B<a.dataSeriesIndexes.length;B++){var k=a.dataSeriesIndexes[B],
m=this.data[k],t=m.dataPoints;if(0<t.length)for(var r=5<g&&m.bevelEnabled?!0:!1,h=0;h<t.length;h++)if(b=t[h].x.getTime?t[h].x.getTime():t[h].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof t[h].y){p=a.axisX.convertValueToPixel(b);n=0!==a.dataPointYSums[b]?100*(t[h].y/a.dataPointYSums[b]):0;var A=p-a.plotType.plotUnits.length*g/2+a.index*g<<0,J=A+g<<0,C;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0<t[h].y){u[b]=n+
("undefined"!==typeof u[b]?u[b]:0);if(0>=u[b])continue;n=a.axisY.convertValueToPixel(u[b]);C=f[b]?f[b]:q;f[b]=n}else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=t[h].y)z[b]=n+("undefined"!==typeof z[b]?z[b]:0),C=a.axisY.convertValueToPixel(z[b]),n=l[b]?l[b]:q,l[b]=C;else if(n=a.axisY.convertValueToPixel(n),0<=t[h].y){var y="undefined"!==typeof f[b]?f[b]:0;n-=y;C=q-y;a.dataSeriesIndexes.length-1===B&&1>=Math.abs(e.y1-n)&&(n=e.y1);f[b]=y+(C-n)}else y="undefined"!==typeof l[b]?
l[b]:0,C=n+y,n=q+y,a.dataSeriesIndexes.length-1===B&&1>=Math.abs(e.y2-C)&&(C=e.y2),l[b]=y+(C-n);b=t[h].color?t[h].color:m._colorSet[h%m._colorSet.length];da(c,A,n,J,C,b,0,null,r&&0<=t[h].y,0>t[h].y&&r,!1,!1,m.fillOpacity);b=m.dataPointIds[h];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:k,dataPointIndex:h,x1:A,y1:n,x2:J,y2:C};b=S(b);s&&da(this._eventManager.ghostCtx,A,n,J,C,b,0,null,!1,!1,!1,!1);(t[h].indexLabel||m.indexLabel||t[h].indexLabelFormatter||m.indexLabelFormatter)&&
this._indexLabels.push({chartType:"stackedColumn100",dataPoint:t[h],dataSeries:m,point:{x:p,y:0<=t[h].y?n:C},direction:0>t[h].y===a.axisY.reversed?1:-1,bounds:{x1:A,y1:Math.min(n,C),x2:J,y2:Math.max(n,C)},color:b})}}s&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&
this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:L.yScaleAnimation,easingFunction:L.easing.easeOutQuart,animationBase:q<a.axisY.bounds.y1?a.axisY.bounds.y1:q>a.axisY.bounds.y2?a.axisY.bounds.y2:q}}};m.prototype.renderBar=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=s?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=
null,e=this.plotArea,f=0,l,u,z,h=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),f=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,p=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.height,0.9*(this.plotArea.height/a.plotType.totalDataSeries))<<0,n=a.axisX.dataInfo.minDiff;isFinite(n)||(n=0.3*Math.abs(a.axisX.range));n=this.options.dataPointWidth?
this.dataPointWidth:0.9*(e.height*(a.axisX.logarithmic?Math.log(n)/Math.log(a.axisX.range):Math.abs(n)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&f>p&&(f=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,p));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&p<f)&&(p=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,f));n<f&&(n=f);n>p&&(n=p);c.save();s&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);
c.clip();s&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(p=0;p<a.dataSeriesIndexes.length;p++){var q=a.dataSeriesIndexes[p],g=this.data[q],B=g.dataPoints;if(0<B.length){var k=5<n&&g.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(f=0;f<B.length;f++)if(B[f].getTime?z=B[f].x.getTime():z=B[f].x,!(z<a.axisX.dataInfo.viewPortMin||z>a.axisX.dataInfo.viewPortMax)&&"number"===typeof B[f].y){u=a.axisX.convertValueToPixel(z);
l=a.axisY.convertValueToPixel(B[f].y);u=a.axisX.reversed?u+a.plotType.totalDataSeries*n/2-(a.previousDataSeriesCount+p)*n<<0:u-a.plotType.totalDataSeries*n/2+(a.previousDataSeriesCount+p)*n<<0;var m=a.axisX.reversed?u-n<<0:u+n<<0,t;0<=B[f].y?t=h:(t=l,l=h);b=B[f].color?B[f].color:g._colorSet[f%g._colorSet.length];da(c,t,u,l,m,b,0,null,k,!1,!1,!1,g.fillOpacity);b=g.dataPointIds[f];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:f,x1:t,y1:u,x2:l,y2:m};b=
S(b);s&&da(this._eventManager.ghostCtx,t,u,l,m,b,0,null,!1,!1,!1,!1);(B[f].indexLabel||g.indexLabel||B[f].indexLabelFormatter||g.indexLabelFormatter)&&this._indexLabels.push({chartType:"bar",dataPoint:B[f],dataSeries:g,point:{x:0<=B[f].y?l:t,y:u+(m-u)/2},direction:0>B[f].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(t,l),y1:u,x2:Math.max(t,l),y2:m},color:b})}}}s&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,
0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:L.xScaleAnimation,easingFunction:L.easing.easeOutQuart,animationBase:h<a.axisY.bounds.x1?a.axisY.bounds.x1:h>a.axisY.bounds.x2?a.axisY.bounds.x2:
h}}};m.prototype.renderStackedBar=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=s?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,f=[],l=[],u=[],z=[],h=0,p,n,q=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),h=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;n=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.height<<
0;var g=a.axisX.dataInfo.minDiff;isFinite(g)||(g=0.3*Math.abs(a.axisX.range));g=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.height*(a.axisX.logarithmic?Math.log(g)/Math.log(a.axisX.range):Math.abs(g)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&h>n&&(h=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,n));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&n<h)&&(n=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,h));g<
h&&(g=h);g>n&&(g=n);c.save();s&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();s&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(var B=0;B<a.dataSeriesIndexes.length;B++){var k=a.dataSeriesIndexes[B],m=this.data[k],t=m.dataPoints;if(0<t.length){var r=5<g&&m.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(h=0;h<t.length;h++)if(b=t[h].x.getTime?t[h].x.getTime():
t[h].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof t[h].y){n=a.axisX.convertValueToPixel(b);var A=n-a.plotType.plotUnits.length*g/2+a.index*g<<0,J=A+g<<0,C;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0<t[h].y)u[b]=t[h].y+(u[b]?u[b]:0),0<u[b]&&(C=f[b]?f[b]:q,f[b]=p=a.axisY.convertValueToPixel(u[b]));else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=t[h].y)z[b]=t[h].y+(z[b]?z[b]:0),p=l[b]?
l[b]:q,l[b]=C=a.axisY.convertValueToPixel(z[b]);else if(p=a.axisY.convertValueToPixel(t[h].y),0<=t[h].y){var y=f[b]?f[b]:0;C=q+y;p+=y;f[b]=y+(p-C)}else y=l[b]?l[b]:0,C=p-y,p=q-y,l[b]=y+(p-C);b=t[h].color?t[h].color:m._colorSet[h%m._colorSet.length];da(c,C,A,p,J,b,0,null,r,!1,!1,!1,m.fillOpacity);b=m.dataPointIds[h];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:k,dataPointIndex:h,x1:C,y1:A,x2:p,y2:J};b=S(b);s&&da(this._eventManager.ghostCtx,C,A,p,J,b,0,null,!1,!1,!1,
!1);(t[h].indexLabel||m.indexLabel||t[h].indexLabelFormatter||m.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedBar",dataPoint:t[h],dataSeries:m,point:{x:0<=t[h].y?p:C,y:n},direction:0>t[h].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(C,p),y1:A,x2:Math.max(C,p),y2:J},color:b})}}}s&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&
c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:L.xScaleAnimation,easingFunction:L.easing.easeOutQuart,animationBase:q<a.axisY.bounds.x1?a.axisY.bounds.x1:q>a.axisY.bounds.x2?a.axisY.bounds.x2:q}}};m.prototype.renderStackedBar100=function(a){var d=
a.targetCanvasCtx||this.plotArea.ctx,c=s?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,f=[],l=[],u=[],z=[],h=0,p,n,q=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),h=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;n=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.height<<0;var g=a.axisX.dataInfo.minDiff;isFinite(g)||
(g=0.3*Math.abs(a.axisX.range));g=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.height*(a.axisX.logarithmic?Math.log(g)/Math.log(a.axisX.range):Math.abs(g)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&h>n&&(h=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,n));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&n<h)&&(n=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,h));g<h&&(g=h);g>n&&(g=n);c.save();s&&this._eventManager.ghostCtx.save();
c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();s&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(var B=0;B<a.dataSeriesIndexes.length;B++){var k=a.dataSeriesIndexes[B],m=this.data[k],t=m.dataPoints;if(0<t.length){var r=5<g&&m.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(h=0;h<t.length;h++)if(b=t[h].x.getTime?t[h].x.getTime():t[h].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&
"number"===typeof t[h].y){n=a.axisX.convertValueToPixel(b);var A;A=0!==a.dataPointYSums[b]?100*(t[h].y/a.dataPointYSums[b]):0;var J=n-a.plotType.plotUnits.length*g/2+a.index*g<<0,C=J+g<<0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0<t[h].y){u[b]=A+(u[b]?u[b]:0);if(0>=u[b])continue;A=f[b]?f[b]:q;f[b]=p=a.axisY.convertValueToPixel(u[b])}else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=t[h].y)z[b]=A+(z[b]?z[b]:0),p=l[b]?l[b]:
q,l[b]=A=a.axisY.convertValueToPixel(z[b]);else if(p=a.axisY.convertValueToPixel(A),0<=t[h].y){var y=f[b]?f[b]:0;A=q+y;p+=y;a.dataSeriesIndexes.length-1===B&&1>=Math.abs(e.x2-p)&&(p=e.x2);f[b]=y+(p-A)}else y=l[b]?l[b]:0,A=p-y,p=q-y,a.dataSeriesIndexes.length-1===B&&1>=Math.abs(e.x1-A)&&(A=e.x1),l[b]=y+(p-A);b=t[h].color?t[h].color:m._colorSet[h%m._colorSet.length];da(c,A,J,p,C,b,0,null,r,!1,!1,!1,m.fillOpacity);b=m.dataPointIds[h];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:k,
dataPointIndex:h,x1:A,y1:J,x2:p,y2:C};b=S(b);s&&da(this._eventManager.ghostCtx,A,J,p,C,b,0,null,!1,!1,!1,!1);(t[h].indexLabel||m.indexLabel||t[h].indexLabelFormatter||m.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedBar100",dataPoint:t[h],dataSeries:m,point:{x:0<=t[h].y?p:A,y:n},direction:0>t[h].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(A,p),y1:J,x2:Math.max(A,p),y2:C},color:b})}}}s&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",
a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:L.xScaleAnimation,easingFunction:L.easing.easeOutQuart,animationBase:q<a.axisY.bounds.x1?a.axisY.bounds.x1:
q>a.axisY.bounds.x2?a.axisY.bounds.x2:q}}};m.prototype.renderArea=function(a){var d,c;function b(){C&&(0<g.lineThickness&&f.stroke(),a.axisY.logarithmic||0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?J=A:0>a.axisY.viewportMaximum?J=u.y1:0<a.axisY.viewportMinimum&&(J=A),f.lineTo(m,J),f.lineTo(C.x,J),f.closePath(),f.globalAlpha=g.fillOpacity,f.fill(),f.globalAlpha=1,s&&(l.lineTo(m,J),l.lineTo(C.x,J),l.closePath(),l.fill()),f.beginPath(),f.moveTo(m,t),l.beginPath(),l.moveTo(m,t),C={x:m,y:t})}
var e=a.targetCanvasCtx||this.plotArea.ctx,f=s?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var l=this._eventManager.ghostCtx,u=a.axisY.lineCoordinates,z=[],h=this.plotArea,p;f.save();s&&l.save();f.beginPath();f.rect(h.x1,h.y1,h.width,h.height);f.clip();s&&(l.beginPath(),l.rect(h.x1,h.y1,h.width,h.height),l.clip());for(var n=0;n<a.dataSeriesIndexes.length;n++){var q=a.dataSeriesIndexes[n],g=this.data[q],B=g.dataPoints,z=g.id;this._eventManager.objectMap[z]={objectType:"dataSeries",dataSeriesIndex:q};
z=S(z);l.fillStyle=z;z=[];d=!0;var k=0,m,t,r,A=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),J,C=null;if(0<B.length){var y=g._colorSet[k%g._colorSet.length],v=g.lineColor=g.options.lineColor||y,w=v;f.fillStyle=y;f.strokeStyle=v;f.lineWidth=g.lineThickness;c="solid";if(f.setLineDash){var K=Q(g.nullDataLineDashType,g.lineThickness);c=g.lineDashType;var P=Q(c,g.lineThickness);f.setLineDash(P)}for(var ha=!0;k<B.length;k++)if(r=B[k].x.getTime?B[k].x.getTime():B[k].x,!(r<a.axisX.dataInfo.viewPortMin||
r>a.axisX.dataInfo.viewPortMax&&(!g.connectNullData||!ha)))if("number"!==typeof B[k].y)g.connectNullData||(ha||d)||b(),ha=!0;else{m=a.axisX.convertValueToPixel(r);t=a.axisY.convertValueToPixel(B[k].y);d||ha?(!d&&g.connectNullData?(f.setLineDash&&(g.options.nullDataLineDashType||c===g.lineDashType&&g.lineDashType!==g.nullDataLineDashType)&&(d=m,c=t,m=p.x,t=p.y,b(),f.moveTo(p.x,p.y),m=d,t=c,C=p,c=g.nullDataLineDashType,f.setLineDash(K)),f.lineTo(m,t),s&&l.lineTo(m,t)):(f.beginPath(),f.moveTo(m,t),s&&
(l.beginPath(),l.moveTo(m,t)),C={x:m,y:t}),ha=d=!1):(f.lineTo(m,t),s&&l.lineTo(m,t),0==k%250&&b());p={x:m,y:t};k<B.length-1&&(w!==(B[k].lineColor||v)||c!==(B[k].lineDashType||g.lineDashType))&&(b(),w=B[k].lineColor||v,f.strokeStyle=w,f.setLineDash&&(B[k].lineDashType?(c=B[k].lineDashType,f.setLineDash(Q(c,g.lineThickness))):(c=g.lineDashType,f.setLineDash(P))));var $=g.dataPointIds[k];this._eventManager.objectMap[$]={id:$,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:k,x1:m,y1:t};0!==B[k].markerSize&&
(0<B[k].markerSize||0<g.markerSize)&&(r=g.getMarkerProperties(k,m,t,f),z.push(r),$=S($),s&&z.push({x:m,y:t,ctx:l,type:r.type,size:r.size,color:$,borderColor:$,borderThickness:r.borderThickness}));(B[k].indexLabel||g.indexLabel||B[k].indexLabelFormatter||g.indexLabelFormatter)&&this._indexLabels.push({chartType:"area",dataPoint:B[k],dataSeries:g,point:{x:m,y:t},direction:0>B[k].y===a.axisY.reversed?1:-1,color:y})}b();Y.drawMarkers(z)}}s&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),
f.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&f.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&f.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),f.clearRect(h.x1,h.y1,h.width,h.height),this._eventManager.ghostCtx.restore());f.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:L.xClipAnimation,easingFunction:L.easing.linear,animationBase:0}}};
m.prototype.renderSplineArea=function(a){function d(){var c=v(r,2);if(0<c.length){if(0<p.lineThickness){b.beginPath();b.moveTo(c[0].x,c[0].y);c[0].newStrokeStyle&&(b.strokeStyle=c[0].newStrokeStyle);c[0].newLineDashArray&&b.setLineDash(c[0].newLineDashArray);for(var d=0;d<c.length-3;d+=3)if(b.bezierCurveTo(c[d+1].x,c[d+1].y,c[d+2].x,c[d+2].y,c[d+3].x,c[d+3].y),s&&e.bezierCurveTo(c[d+1].x,c[d+1].y,c[d+2].x,c[d+2].y,c[d+3].x,c[d+3].y),c[d+3].newStrokeStyle||c[d+3].newLineDashArray)b.stroke(),b.beginPath(),
b.moveTo(c[d+3].x,c[d+3].y),c[d+3].newStrokeStyle&&(b.strokeStyle=c[d+3].newStrokeStyle),c[d+3].newLineDashArray&&b.setLineDash(c[d+3].newLineDashArray);b.stroke()}b.beginPath();b.moveTo(c[0].x,c[0].y);s&&(e.beginPath(),e.moveTo(c[0].x,c[0].y));for(d=0;d<c.length-3;d+=3)b.bezierCurveTo(c[d+1].x,c[d+1].y,c[d+2].x,c[d+2].y,c[d+3].x,c[d+3].y),s&&e.bezierCurveTo(c[d+1].x,c[d+1].y,c[d+2].x,c[d+2].y,c[d+3].x,c[d+3].y);a.axisY.logarithmic||0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?m=k:0>a.axisY.viewportMaximum?
m=f.y1:0<a.axisY.viewportMinimum&&(m=k);t={x:c[0].x,y:c[0].y};b.lineTo(c[c.length-1].x,m);b.lineTo(t.x,m);b.closePath();b.globalAlpha=p.fillOpacity;b.fill();b.globalAlpha=1;s&&(e.lineTo(c[c.length-1].x,m),e.lineTo(t.x,m),e.closePath(),e.fill())}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=s?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx,f=a.axisY.lineCoordinates,l=[],u=this.plotArea;b.save();s&&e.save();b.beginPath();b.rect(u.x1,u.y1,u.width,u.height);
b.clip();s&&(e.beginPath(),e.rect(u.x1,u.y1,u.width,u.height),e.clip());for(var z=0;z<a.dataSeriesIndexes.length;z++){var h=a.dataSeriesIndexes[z],p=this.data[h],n=p.dataPoints,l=p.id;this._eventManager.objectMap[l]={objectType:"dataSeries",dataSeriesIndex:h};l=S(l);e.fillStyle=l;var l=[],q=0,g,B,k=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),m,t=null,r=[];if(0<n.length){var A=p._colorSet[q%p._colorSet.length],J=p.lineColor=p.options.lineColor||A,C=J;b.fillStyle=A;b.strokeStyle=
J;b.lineWidth=p.lineThickness;var y="solid";if(b.setLineDash){var w=Q(p.nullDataLineDashType,p.lineThickness),y=p.lineDashType,D=Q(y,p.lineThickness);b.setLineDash(D)}for(B=!1;q<n.length;q++)if(g=n[q].x.getTime?n[q].x.getTime():n[q].x,!(g<a.axisX.dataInfo.viewPortMin||g>a.axisX.dataInfo.viewPortMax&&(!p.connectNullData||!B)))if("number"!==typeof n[q].y)0<q&&!B&&(p.connectNullData?b.setLineDash&&(0<r.length&&(p.options.nullDataLineDashType||!n[q-1].lineDashType))&&(r[r.length-1].newLineDashArray=w,
y=p.nullDataLineDashType):(d(),r=[])),B=!0;else{g=a.axisX.convertValueToPixel(g);B=a.axisY.convertValueToPixel(n[q].y);var K=p.dataPointIds[q];this._eventManager.objectMap[K]={id:K,objectType:"dataPoint",dataSeriesIndex:h,dataPointIndex:q,x1:g,y1:B};r[r.length]={x:g,y:B};q<n.length-1&&(C!==(n[q].lineColor||J)||y!==(n[q].lineDashType||p.lineDashType))&&(C=n[q].lineColor||J,r[r.length-1].newStrokeStyle=C,b.setLineDash&&(n[q].lineDashType?(y=n[q].lineDashType,r[r.length-1].newLineDashArray=Q(y,p.lineThickness)):
(y=p.lineDashType,r[r.length-1].newLineDashArray=D)));if(0!==n[q].markerSize&&(0<n[q].markerSize||0<p.markerSize)){var P=p.getMarkerProperties(q,g,B,b);l.push(P);K=S(K);s&&l.push({x:g,y:B,ctx:e,type:P.type,size:P.size,color:K,borderColor:K,borderThickness:P.borderThickness})}(n[q].indexLabel||p.indexLabel||n[q].indexLabelFormatter||p.indexLabelFormatter)&&this._indexLabels.push({chartType:"splineArea",dataPoint:n[q],dataSeries:p,point:{x:g,y:B},direction:0>n[q].y===a.axisY.reversed?1:-1,color:A});
B=!1}d();Y.drawMarkers(l)}}s&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(u.x1,u.y1,u.width,u.height),this._eventManager.ghostCtx.restore());b.restore();return{source:c,
dest:this.plotArea.ctx,animationCallback:L.xClipAnimation,easingFunction:L.easing.linear,animationBase:0}}};m.prototype.renderStepArea=function(a){var d,c;function b(){C&&(0<g.lineThickness&&f.stroke(),a.axisY.logarithmic||0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?J=A:0>a.axisY.viewportMaximum?J=u.y1:0<a.axisY.viewportMinimum&&(J=A),f.lineTo(m,J),f.lineTo(C.x,J),f.closePath(),f.globalAlpha=g.fillOpacity,f.fill(),f.globalAlpha=1,s&&(l.lineTo(m,J),l.lineTo(C.x,J),l.closePath(),l.fill()),
f.beginPath(),f.moveTo(m,t),l.beginPath(),l.moveTo(m,t),C={x:m,y:t})}var e=a.targetCanvasCtx||this.plotArea.ctx,f=s?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var l=this._eventManager.ghostCtx,u=a.axisY.lineCoordinates,z=[],h=this.plotArea,p;f.save();s&&l.save();f.beginPath();f.rect(h.x1,h.y1,h.width,h.height);f.clip();s&&(l.beginPath(),l.rect(h.x1,h.y1,h.width,h.height),l.clip());for(var n=0;n<a.dataSeriesIndexes.length;n++){var q=a.dataSeriesIndexes[n],g=this.data[q],B=g.dataPoints,
z=g.id;this._eventManager.objectMap[z]={objectType:"dataSeries",dataSeriesIndex:q};z=S(z);l.fillStyle=z;z=[];d=!0;var k=0,m,t,r,A=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),J,C=null;c=!1;if(0<B.length){var y=g._colorSet[k%g._colorSet.length],v=g.lineColor=g.options.lineColor||y,w=v;f.fillStyle=y;f.strokeStyle=v;f.lineWidth=g.lineThickness;var K="solid";if(f.setLineDash){var P=Q(g.nullDataLineDashType,g.lineThickness),K=g.lineDashType,D=Q(K,g.lineThickness);f.setLineDash(D)}for(;k<
B.length;k++)if(r=B[k].x.getTime?B[k].x.getTime():B[k].x,!(r<a.axisX.dataInfo.viewPortMin||r>a.axisX.dataInfo.viewPortMax&&(!g.connectNullData||!c))){var $=t;"number"!==typeof B[k].y?(g.connectNullData||(c||d)||b(),c=!0):(m=a.axisX.convertValueToPixel(r),t=a.axisY.convertValueToPixel(B[k].y),d||c?(!d&&g.connectNullData?(f.setLineDash&&(g.options.nullDataLineDashType||K===g.lineDashType&&g.lineDashType!==g.nullDataLineDashType)&&(d=m,c=t,m=p.x,t=p.y,b(),f.moveTo(p.x,p.y),m=d,t=c,C=p,K=g.nullDataLineDashType,
f.setLineDash(P)),f.lineTo(m,$),f.lineTo(m,t),s&&(l.lineTo(m,$),l.lineTo(m,t))):(f.beginPath(),f.moveTo(m,t),s&&(l.beginPath(),l.moveTo(m,t)),C={x:m,y:t}),c=d=!1):(f.lineTo(m,$),s&&l.lineTo(m,$),f.lineTo(m,t),s&&l.lineTo(m,t),0==k%250&&b()),p={x:m,y:t},k<B.length-1&&(w!==(B[k].lineColor||v)||K!==(B[k].lineDashType||g.lineDashType))&&(b(),w=B[k].lineColor||v,f.strokeStyle=w,f.setLineDash&&(B[k].lineDashType?(K=B[k].lineDashType,f.setLineDash(Q(K,g.lineThickness))):(K=g.lineDashType,f.setLineDash(D)))),
r=g.dataPointIds[k],this._eventManager.objectMap[r]={id:r,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:k,x1:m,y1:t},0!==B[k].markerSize&&(0<B[k].markerSize||0<g.markerSize)&&($=g.getMarkerProperties(k,m,t,f),z.push($),r=S(r),s&&z.push({x:m,y:t,ctx:l,type:$.type,size:$.size,color:r,borderColor:r,borderThickness:$.borderThickness})),(B[k].indexLabel||g.indexLabel||B[k].indexLabelFormatter||g.indexLabelFormatter)&&this._indexLabels.push({chartType:"stepArea",dataPoint:B[k],dataSeries:g,point:{x:m,
y:t},direction:0>B[k].y===a.axisY.reversed?1:-1,color:y}))}b();Y.drawMarkers(z)}}s&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),f.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&f.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&f.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),f.clearRect(h.x1,h.y1,h.width,h.height),this._eventManager.ghostCtx.restore());
f.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:L.xClipAnimation,easingFunction:L.easing.linear,animationBase:0}}};m.prototype.renderStackedArea=function(a){function d(){if(!(1>h.length)){for(0<y.lineThickness&&b.stroke();0<h.length;){var a=h.pop();b.lineTo(a.x,a.y);s&&r.lineTo(a.x,a.y)}b.closePath();b.globalAlpha=y.fillOpacity;b.fill();b.globalAlpha=1;b.beginPath();s&&(r.closePath(),r.fill(),r.beginPath());h=[]}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=s?this._preRenderCtx:
c;if(!(0>=a.dataSeriesIndexes.length)){var e=null,f=null,l=[],u=this.plotArea,z=[],h=[],p=[],n=[],q=0,g,k,m=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),r=this._eventManager.ghostCtx,t,x,A;s&&r.beginPath();b.save();s&&r.save();b.beginPath();b.rect(u.x1,u.y1,u.width,u.height);b.clip();s&&(r.beginPath(),r.rect(u.x1,u.y1,u.width,u.height),r.clip());for(var e=[],J=0;J<a.dataSeriesIndexes.length;J++){var C=a.dataSeriesIndexes[J],y=this.data[C],v=y.dataPoints;y.dataPointIndexes=
[];for(q=0;q<v.length;q++)C=v[q].x.getTime?v[q].x.getTime():v[q].x,y.dataPointIndexes[C]=q,e[C]||(p.push(C),e[C]=!0);p.sort(Pa)}for(J=0;J<a.dataSeriesIndexes.length;J++){C=a.dataSeriesIndexes[J];y=this.data[C];v=y.dataPoints;x=!0;h=[];q=y.id;this._eventManager.objectMap[q]={objectType:"dataSeries",dataSeriesIndex:C};q=S(q);r.fillStyle=q;if(0<p.length){var e=y._colorSet[0],w=y.lineColor=y.options.lineColor||e,K=w;b.fillStyle=e;b.strokeStyle=w;b.lineWidth=y.lineThickness;A="solid";if(b.setLineDash){var P=
Q(y.nullDataLineDashType,y.lineThickness);A=y.lineDashType;var D=Q(A,y.lineThickness);b.setLineDash(D)}for(var $=!0,q=0;q<p.length;q++){var f=p[q],ia=null,ia=0<=y.dataPointIndexes[f]?v[y.dataPointIndexes[f]]:{x:f,y:null};if(!(f<a.axisX.dataInfo.viewPortMin||f>a.axisX.dataInfo.viewPortMax&&(!y.connectNullData||!$)))if("number"!==typeof ia.y)y.connectNullData||($||x)||d(),$=!0;else{g=a.axisX.convertValueToPixel(f);var na=z[f]?z[f]:0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length){n[f]=
ia.y+(n[f]?n[f]:0);if(0>=n[f]&&a.axisY.logarithmic)continue;k=a.axisY.convertValueToPixel(n[f])}else k=a.axisY.convertValueToPixel(ia.y),k-=na;h.push({x:g,y:m-na});z[f]=m-k;x||$?(!x&&y.connectNullData?(b.setLineDash&&(y.options.nullDataLineDashType||A===y.lineDashType&&y.lineDashType!==y.nullDataLineDashType)&&(x=h.pop(),A=h[h.length-1],d(),b.moveTo(t.x,t.y),h.push(A),h.push(x),A=y.nullDataLineDashType,b.setLineDash(P)),b.lineTo(g,k),s&&r.lineTo(g,k)):(b.beginPath(),b.moveTo(g,k),s&&(r.beginPath(),
r.moveTo(g,k))),$=x=!1):(b.lineTo(g,k),s&&r.lineTo(g,k),0==q%250&&(d(),b.moveTo(g,k),s&&r.moveTo(g,k),h.push({x:g,y:m-na})));t={x:g,y:k};q<v.length-1&&(K!==(v[q].lineColor||w)||A!==(v[q].lineDashType||y.lineDashType))&&(d(),b.beginPath(),b.moveTo(g,k),h.push({x:g,y:m-na}),K=v[q].lineColor||w,b.strokeStyle=K,b.setLineDash&&(v[q].lineDashType?(A=v[q].lineDashType,b.setLineDash(Q(A,y.lineThickness))):(A=y.lineDashType,b.setLineDash(D))));if(0<=y.dataPointIndexes[f]){var E=y.dataPointIds[y.dataPointIndexes[f]];
this._eventManager.objectMap[E]={id:E,objectType:"dataPoint",dataSeriesIndex:C,dataPointIndex:y.dataPointIndexes[f],x1:g,y1:k}}0<=y.dataPointIndexes[f]&&0!==ia.markerSize&&(0<ia.markerSize||0<y.markerSize)&&(na=y.getMarkerProperties(y.dataPointIndexes[f],g,k,b),l.push(na),f=S(E),s&&l.push({x:g,y:k,ctx:r,type:na.type,size:na.size,color:f,borderColor:f,borderThickness:na.borderThickness}));(ia.indexLabel||y.indexLabel||ia.indexLabelFormatter||y.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedArea",
dataPoint:ia,dataSeries:y,point:{x:g,y:k},direction:0>v[q].y===a.axisY.reversed?1:-1,color:e})}}d();b.moveTo(g,k);s&&r.moveTo(g,k)}delete y.dataPointIndexes}Y.drawMarkers(l);s&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,
0,0,this.width,this.height),b.clearRect(u.x1,u.y1,u.width,u.height),r.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:L.xClipAnimation,easingFunction:L.easing.linear,animationBase:0}}};m.prototype.renderStackedArea100=function(a){function d(){for(0<y.lineThickness&&b.stroke();0<h.length;){var a=h.pop();b.lineTo(a.x,a.y);s&&A.lineTo(a.x,a.y)}b.closePath();b.globalAlpha=y.fillOpacity;b.fill();b.globalAlpha=1;b.beginPath();s&&(A.closePath(),A.fill(),A.beginPath());h=[]}
var c=a.targetCanvasCtx||this.plotArea.ctx,b=s?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=null,f=null,l=this.plotArea,u=[],k=[],h=[],p=[],n=[],q=0,g,m,r,O,t,x=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),A=this._eventManager.ghostCtx;b.save();s&&A.save();b.beginPath();b.rect(l.x1,l.y1,l.width,l.height);b.clip();s&&(A.beginPath(),A.rect(l.x1,l.y1,l.width,l.height),A.clip());for(var e=[],v=0;v<a.dataSeriesIndexes.length;v++){var C=a.dataSeriesIndexes[v],
y=this.data[C],w=y.dataPoints;y.dataPointIndexes=[];for(q=0;q<w.length;q++)C=w[q].x.getTime?w[q].x.getTime():w[q].x,y.dataPointIndexes[C]=q,e[C]||(p.push(C),e[C]=!0);p.sort(Pa)}for(v=0;v<a.dataSeriesIndexes.length;v++){C=a.dataSeriesIndexes[v];y=this.data[C];w=y.dataPoints;O=!0;e=y.id;this._eventManager.objectMap[e]={objectType:"dataSeries",dataSeriesIndex:C};e=S(e);A.fillStyle=e;h=[];if(0<p.length){var e=y._colorSet[q%y._colorSet.length],D=y.lineColor=y.options.lineColor||e,K=D;b.fillStyle=e;b.strokeStyle=
D;b.lineWidth=y.lineThickness;t="solid";if(b.setLineDash){var P=Q(y.nullDataLineDashType,y.lineThickness);t=y.lineDashType;var E=Q(t,y.lineThickness);b.setLineDash(E)}for(var $=!0,q=0;q<p.length;q++){var f=p[q],ia=null,ia=0<=y.dataPointIndexes[f]?w[y.dataPointIndexes[f]]:{x:f,y:null};if(!(f<a.axisX.dataInfo.viewPortMin||f>a.axisX.dataInfo.viewPortMax&&(!y.connectNullData||!$)))if("number"!==typeof ia.y)y.connectNullData||($||O)||d(),$=!0;else{var na;na=0!==a.dataPointYSums[f]?100*(ia.y/a.dataPointYSums[f]):
0;g=a.axisX.convertValueToPixel(f);var ca=k[f]?k[f]:0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length){n[f]=na+(n[f]?n[f]:0);if(0>=n[f]&&a.axisY.logarithmic)continue;m=a.axisY.convertValueToPixel(n[f])}else m=a.axisY.convertValueToPixel(na),m-=ca;h.push({x:g,y:x-ca});k[f]=x-m;O||$?(!O&&y.connectNullData?(b.setLineDash&&(y.options.nullDataLineDashType||t===y.lineDashType&&y.lineDashType!==y.nullDataLineDashType)&&(O=h.pop(),t=h[h.length-1],d(),b.moveTo(r.x,
r.y),h.push(t),h.push(O),t=y.nullDataLineDashType,b.setLineDash(P)),b.lineTo(g,m),s&&A.lineTo(g,m)):(b.beginPath(),b.moveTo(g,m),s&&(A.beginPath(),A.moveTo(g,m))),$=O=!1):(b.lineTo(g,m),s&&A.lineTo(g,m),0==q%250&&(d(),b.moveTo(g,m),s&&A.moveTo(g,m),h.push({x:g,y:x-ca})));r={x:g,y:m};q<w.length-1&&(K!==(w[q].lineColor||D)||t!==(w[q].lineDashType||y.lineDashType))&&(d(),b.beginPath(),b.moveTo(g,m),h.push({x:g,y:x-ca}),K=w[q].lineColor||D,b.strokeStyle=K,b.setLineDash&&(w[q].lineDashType?(t=w[q].lineDashType,
b.setLineDash(Q(t,y.lineThickness))):(t=y.lineDashType,b.setLineDash(E))));if(0<=y.dataPointIndexes[f]){var F=y.dataPointIds[y.dataPointIndexes[f]];this._eventManager.objectMap[F]={id:F,objectType:"dataPoint",dataSeriesIndex:C,dataPointIndex:y.dataPointIndexes[f],x1:g,y1:m}}0<=y.dataPointIndexes[f]&&0!==ia.markerSize&&(0<ia.markerSize||0<y.markerSize)&&(ca=y.getMarkerProperties(q,g,m,b),u.push(ca),f=S(F),s&&u.push({x:g,y:m,ctx:A,type:ca.type,size:ca.size,color:f,borderColor:f,borderThickness:ca.borderThickness}));
(ia.indexLabel||y.indexLabel||ia.indexLabelFormatter||y.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedArea100",dataPoint:ia,dataSeries:y,point:{x:g,y:m},direction:0>w[q].y===a.axisY.reversed?1:-1,color:e})}}d();b.moveTo(g,m);s&&A.moveTo(g,m)}delete y.dataPointIndexes}Y.drawMarkers(u);s&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&
b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(l.x1,l.y1,l.width,l.height),A.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:L.xClipAnimation,easingFunction:L.easing.linear,animationBase:0}}};m.prototype.renderBubble=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=s?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=
this.plotArea,e=0,f,l;c.save();s&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(b.x1,b.y1,b.width,b.height);c.clip();s&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.clip());for(var u=-Infinity,k=Infinity,h=0;h<a.dataSeriesIndexes.length;h++)for(var p=a.dataSeriesIndexes[h],n=this.data[p],q=n.dataPoints,g=0,e=0;e<q.length;e++)f=q[e].getTime?f=q[e].x.getTime():f=q[e].x,f<a.axisX.dataInfo.viewPortMin||f>a.axisX.dataInfo.viewPortMax||
"undefined"===typeof q[e].z||(g=q[e].z,g>u&&(u=g),g<k&&(k=g));for(var m=25*Math.PI,r=Math.max(Math.pow(0.25*Math.min(b.height,b.width)/2,2)*Math.PI,m),h=0;h<a.dataSeriesIndexes.length;h++)if(p=a.dataSeriesIndexes[h],n=this.data[p],q=n.dataPoints,0<q.length)for(c.strokeStyle="#4572A7 ",e=0;e<q.length;e++)if(f=q[e].getTime?f=q[e].x.getTime():f=q[e].x,!(f<a.axisX.dataInfo.viewPortMin||f>a.axisX.dataInfo.viewPortMax)&&"number"===typeof q[e].y){f=a.axisX.convertValueToPixel(f);l=a.axisY.convertValueToPixel(q[e].y);
var g=q[e].z,O=2*Math.max(Math.sqrt((u===k?r/2:m+(r-m)/(u-k)*(g-k))/Math.PI)<<0,1),g=n.getMarkerProperties(e,c);g.size=O;c.globalAlpha=n.fillOpacity;Y.drawMarker(f,l,c,g.type,g.size,g.color,g.borderColor,g.borderThickness);c.globalAlpha=1;var t=n.dataPointIds[e];this._eventManager.objectMap[t]={id:t,objectType:"dataPoint",dataSeriesIndex:p,dataPointIndex:e,x1:f,y1:l,size:O};O=S(t);s&&Y.drawMarker(f,l,this._eventManager.ghostCtx,g.type,g.size,O,O,g.borderThickness);(q[e].indexLabel||n.indexLabel||
q[e].indexLabelFormatter||n.indexLabelFormatter)&&this._indexLabels.push({chartType:"bubble",dataPoint:q[e],dataSeries:n,point:{x:f,y:l},direction:1,bounds:{x1:f-g.size/2,y1:l-g.size/2,x2:f+g.size/2,y2:l+g.size/2},color:null})}s&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&
this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:L.fadeInAnimation,easingFunction:L.easing.easeInQuad,animationBase:0}}};m.prototype.renderScatter=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=s?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=this.plotArea,e=0,f,l;c.save();s&&this._eventManager.ghostCtx.save();
c.beginPath();c.rect(b.x1,b.y1,b.width,b.height);c.clip();s&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.clip());for(var u=0;u<a.dataSeriesIndexes.length;u++){var k=a.dataSeriesIndexes[u],h=this.data[k],p=h.dataPoints;if(0<p.length){c.strokeStyle="#4572A7 ";Math.pow(0.3*Math.min(b.height,b.width)/2,2);for(var n=0,q=0,e=0;e<p.length;e++)if(f=p[e].getTime?f=p[e].x.getTime():f=p[e].x,!(f<a.axisX.dataInfo.viewPortMin||
f>a.axisX.dataInfo.viewPortMax)&&"number"===typeof p[e].y){f=a.axisX.convertValueToPixel(f);l=a.axisY.convertValueToPixel(p[e].y);var g=h.getMarkerProperties(e,f,l,c);c.globalAlpha=h.fillOpacity;Y.drawMarker(g.x,g.y,g.ctx,g.type,g.size,g.color,g.borderColor,g.borderThickness);c.globalAlpha=1;Math.sqrt((n-f)*(n-f)+(q-l)*(q-l))<Math.min(g.size,5)&&p.length>Math.min(this.plotArea.width,this.plotArea.height)||(n=h.dataPointIds[e],this._eventManager.objectMap[n]={id:n,objectType:"dataPoint",dataSeriesIndex:k,
dataPointIndex:e,x1:f,y1:l},n=S(n),s&&Y.drawMarker(g.x,g.y,this._eventManager.ghostCtx,g.type,g.size,n,n,g.borderThickness),(p[e].indexLabel||h.indexLabel||p[e].indexLabelFormatter||h.indexLabelFormatter)&&this._indexLabels.push({chartType:"scatter",dataPoint:p[e],dataSeries:h,point:{x:f,y:l},direction:1,bounds:{x1:f-g.size/2,y1:l-g.size/2,x2:f+g.size/2,y2:l+g.size/2},color:null}),n=f,q=l)}}}s&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",
a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:L.fadeInAnimation,easingFunction:L.easing.easeInQuad,animationBase:0}}};m.prototype.renderCandlestick=
function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=s?this._preRenderCtx:d,b=this._eventManager.ghostCtx;if(!(0>=a.dataSeriesIndexes.length)){var e=null,f=null,l=this.plotArea,u=0,k,h,p,n,q,g,e=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,f=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.015*this.width,m=a.axisX.dataInfo.minDiff;isFinite(m)||(m=0.3*Math.abs(a.axisX.range));m=this.options.dataPointWidth?
this.dataPointWidth:0.7*l.width*(a.axisX.logarithmic?Math.log(m)/Math.log(a.axisX.range):Math.abs(m)/Math.abs(a.axisX.range))<<0;this.dataPointMaxWidth&&e>f&&(e=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,f));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&f<e)&&(f=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,e));m<e&&(m=e);m>f&&(m=f);c.save();s&&b.save();c.beginPath();c.rect(l.x1,l.y1,l.width,l.height);c.clip();s&&(b.beginPath(),b.rect(l.x1,l.y1,l.width,
l.height),b.clip());for(var ga=0;ga<a.dataSeriesIndexes.length;ga++){var O=a.dataSeriesIndexes[ga],t=this.data[O],x=t.dataPoints;if(0<x.length)for(var A=5<m&&t.bevelEnabled?!0:!1,u=0;u<x.length;u++)if(x[u].getTime?g=x[u].x.getTime():g=x[u].x,!(g<a.axisX.dataInfo.viewPortMin||g>a.axisX.dataInfo.viewPortMax)&&!r(x[u].y)&&x[u].y.length&&"number"===typeof x[u].y[0]&&"number"===typeof x[u].y[1]&&"number"===typeof x[u].y[2]&&"number"===typeof x[u].y[3]){k=a.axisX.convertValueToPixel(g);h=a.axisY.convertValueToPixel(x[u].y[0]);
p=a.axisY.convertValueToPixel(x[u].y[1]);n=a.axisY.convertValueToPixel(x[u].y[2]);q=a.axisY.convertValueToPixel(x[u].y[3]);var v=k-m/2<<0,C=v+m<<0,f=t.options.fallingColor?t.fallingColor:t._colorSet[0],e=x[u].color?x[u].color:t._colorSet[0],y=Math.round(Math.max(1,0.15*m)),w=0===y%2?0:0.5,D=t.dataPointIds[u];this._eventManager.objectMap[D]={id:D,objectType:"dataPoint",dataSeriesIndex:O,dataPointIndex:u,x1:v,y1:h,x2:C,y2:p,x3:k,y3:n,x4:k,y4:q,borderThickness:y,color:e};c.strokeStyle=e;c.beginPath();
c.lineWidth=y;b.lineWidth=Math.max(y,4);"candlestick"===t.type?(c.moveTo(k-w,p),c.lineTo(k-w,Math.min(h,q)),c.stroke(),c.moveTo(k-w,Math.max(h,q)),c.lineTo(k-w,n),c.stroke(),da(c,v,Math.min(h,q),C,Math.max(h,q),x[u].y[0]<=x[u].y[3]?t.risingColor:f,y,e,A,A,!1,!1,t.fillOpacity),s&&(e=S(D),b.strokeStyle=e,b.moveTo(k-w,p),b.lineTo(k-w,Math.min(h,q)),b.stroke(),b.moveTo(k-w,Math.max(h,q)),b.lineTo(k-w,n),b.stroke(),da(b,v,Math.min(h,q),C,Math.max(h,q),e,0,null,!1,!1,!1,!1))):"ohlc"===t.type&&(c.moveTo(k-
w,p),c.lineTo(k-w,n),c.stroke(),c.beginPath(),c.moveTo(k,h),c.lineTo(v,h),c.stroke(),c.beginPath(),c.moveTo(k,q),c.lineTo(C,q),c.stroke(),s&&(e=S(D),b.strokeStyle=e,b.moveTo(k-w,p),b.lineTo(k-w,n),b.stroke(),b.beginPath(),b.moveTo(k,h),b.lineTo(v,h),b.stroke(),b.beginPath(),b.moveTo(k,q),b.lineTo(C,q),b.stroke()));(x[u].indexLabel||t.indexLabel||x[u].indexLabelFormatter||t.indexLabelFormatter)&&this._indexLabels.push({chartType:t.type,dataPoint:x[u],dataSeries:t,point:{x:v+(C-v)/2,y:a.axisY.reversed?
n:p},direction:1,bounds:{x1:v,y1:Math.min(p,n),x2:C,y2:Math.max(p,n)},color:e})}}s&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(l.x1,l.y1,l.width,l.height),b.restore());
c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:L.fadeInAnimation,easingFunction:L.easing.easeInQuad,animationBase:0}}};m.prototype.renderBoxAndWhisker=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=s?this._preRenderCtx:d,b=this._eventManager.ghostCtx;if(!(0>=a.dataSeriesIndexes.length)){var e=null,f=this.plotArea,l=0,u,k,h,p,n,q,g,e=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,l=this.options.dataPointMaxWidth?
this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.015*this.width,m=a.axisX.dataInfo.minDiff;isFinite(m)||(m=0.3*Math.abs(a.axisX.range));m=this.options.dataPointWidth?this.dataPointWidth:0.7*f.width*(a.axisX.logarithmic?Math.log(m)/Math.log(a.axisX.range):Math.abs(m)/Math.abs(a.axisX.range))<<0;this.dataPointMaxWidth&&e>l&&(e=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,l));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&l<e)&&(l=Math.max(this.options.dataPointWidth?
this.dataPointWidth:-Infinity,e));m<e&&(m=e);m>l&&(m=l);c.save();s&&b.save();c.beginPath();c.rect(f.x1,f.y1,f.width,f.height);c.clip();s&&(b.beginPath(),b.rect(f.x1,f.y1,f.width,f.height),b.clip());for(var ga=!1,ga=!!a.axisY.reversed,O=0;O<a.dataSeriesIndexes.length;O++){var t=a.dataSeriesIndexes[O],x=this.data[t],A=x.dataPoints;if(0<A.length)for(var v=5<m&&x.bevelEnabled?!0:!1,l=0;l<A.length;l++)if(A[l].getTime?g=A[l].x.getTime():g=A[l].x,!(g<a.axisX.dataInfo.viewPortMin||g>a.axisX.dataInfo.viewPortMax)&&
!r(A[l].y)&&A[l].y.length&&"number"===typeof A[l].y[0]&&"number"===typeof A[l].y[1]&&"number"===typeof A[l].y[2]&&"number"===typeof A[l].y[3]&&"number"===typeof A[l].y[4]&&5===A[l].y.length){u=a.axisX.convertValueToPixel(g);k=a.axisY.convertValueToPixel(A[l].y[0]);h=a.axisY.convertValueToPixel(A[l].y[1]);p=a.axisY.convertValueToPixel(A[l].y[2]);n=a.axisY.convertValueToPixel(A[l].y[3]);q=a.axisY.convertValueToPixel(A[l].y[4]);var C=u-m/2<<0,y=u+m/2<<0,e=A[l].color?A[l].color:x._colorSet[0],w=Math.round(Math.max(1,
0.15*m)),D=0===w%2?0:0.5,K=A[l].whiskerColor?A[l].whiskerColor:A[l].color?x.whiskerColor?x.whiskerColor:A[l].color:x.whiskerColor?x.whiskerColor:e,P="number"===typeof A[l].whiskerThickness?A[l].whiskerThickness:"number"===typeof x.options.whiskerThickness?x.whiskerThickness:w,E=A[l].whiskerDashType?A[l].whiskerDashType:x.whiskerDashType,$=r(A[l].whiskerLength)?r(x.options.whiskerLength)?m:x.whiskerLength:A[l].whiskerLength,$="number"===typeof $?0>=$?0:$>=m?m:$:"string"===typeof $?parseInt($)*m/100>
m?m:parseInt($)*m/100:m,ia=1===Math.round(P)%2?0.5:0,na=A[l].stemColor?A[l].stemColor:A[l].color?x.stemColor?x.stemColor:A[l].color:x.stemColor?x.stemColor:e,ca="number"===typeof A[l].stemThickness?A[l].stemThickness:"number"===typeof x.options.stemThickness?x.stemThickness:w,F=1===Math.round(ca)%2?0.5:0,I=A[l].stemDashType?A[l].stemDashType:x.stemDashType,G=A[l].lineColor?A[l].lineColor:A[l].color?x.lineColor?x.lineColor:A[l].color:x.lineColor?x.lineColor:e,N="number"===typeof A[l].lineThickness?
A[l].lineThickness:"number"===typeof x.options.lineThickness?x.lineThickness:w,T=A[l].lineDashType?A[l].lineDashType:x.lineDashType,M=1===Math.round(N)%2?0.5:0,W=x.upperBoxColor,xa=x.lowerBoxColor,sa=r(x.options.fillOpacity)?1:x.fillOpacity,R=x.dataPointIds[l];this._eventManager.objectMap[R]={id:R,objectType:"dataPoint",dataSeriesIndex:t,dataPointIndex:l,x1:C,y1:k,x2:y,y2:h,x3:u,y3:p,x4:u,y4:n,y5:q,borderThickness:w,color:e,stemThickness:ca,stemColor:na,whiskerThickness:P,whiskerLength:$,whiskerColor:K,
lineThickness:N,lineColor:G};c.save();0<ca&&(c.beginPath(),c.strokeStyle=na,c.lineWidth=ca,c.setLineDash&&c.setLineDash(Q(I,ca)),c.moveTo(u-F,h),c.lineTo(u-F,k),c.stroke(),c.moveTo(u-F,n),c.lineTo(u-F,p),c.stroke());c.restore();b.lineWidth=Math.max(w,4);c.beginPath();da(c,C,Math.min(q,h),y,Math.max(h,q),xa,0,e,ga?v:!1,ga?!1:v,!1,!1,sa);c.beginPath();da(c,C,Math.min(p,q),y,Math.max(q,p),W,0,e,ga?!1:v,ga?v:!1,!1,!1,sa);c.beginPath();c.lineWidth=w;c.strokeStyle=e;c.rect(C-D,Math.min(h,p)-D,y-C+2*D,Math.max(h,
p)-Math.min(h,p)+2*D);c.stroke();c.save();0<N&&(c.beginPath(),c.globalAlpha=1,c.setLineDash&&c.setLineDash(Q(T,N)),c.strokeStyle=G,c.lineWidth=N,c.moveTo(C,q-M),c.lineTo(y,q-M),c.stroke());c.restore();c.save();0<P&&(c.beginPath(),c.setLineDash&&c.setLineDash(Q(E,P)),c.strokeStyle=K,c.lineWidth=P,c.moveTo(u-$/2<<0,n-ia),c.lineTo(u+$/2<<0,n-ia),c.stroke(),c.moveTo(u-$/2<<0,k+ia),c.lineTo(u+$/2<<0,k+ia),c.stroke());c.restore();s&&(e=S(R),b.strokeStyle=e,b.lineWidth=ca,0<ca&&(b.moveTo(u-D-F,h),b.lineTo(u-
D-F,Math.max(k,n)),b.stroke(),b.moveTo(u-D-F,Math.min(k,n)),b.lineTo(u-D-F,p),b.stroke()),da(b,C,Math.max(h,p),y,Math.min(h,p),e,0,null,!1,!1,!1,!1),0<P&&(b.beginPath(),b.lineWidth=P,b.moveTo(u+$/2,n-ia),b.lineTo(u-$/2,n-ia),b.stroke(),b.moveTo(u+$/2,k+ia),b.lineTo(u-$/2,k+ia),b.stroke()));(A[l].indexLabel||x.indexLabel||A[l].indexLabelFormatter||x.indexLabelFormatter)&&this._indexLabels.push({chartType:x.type,dataPoint:A[l],dataSeries:x,point:{x:C+(y-C)/2,y:a.axisY.reversed?k:n},direction:1,bounds:{x1:C,
y1:Math.min(k,n),x2:y,y2:Math.max(k,n)},color:e})}}s&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(f.x1,f.y1,f.width,f.height),b.restore());c.restore();return{source:d,
dest:this.plotArea.ctx,animationCallback:L.fadeInAnimation,easingFunction:L.easing.easeInQuad,animationBase:0}}};m.prototype.renderRangeColumn=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=s?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,f=0,l,u,k,f=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;l=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:
0.03*this.width;var h=a.axisX.dataInfo.minDiff;isFinite(h)||(h=0.3*Math.abs(a.axisX.range));h=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.width*(a.axisX.logarithmic?Math.log(h)/Math.log(a.axisX.range):Math.abs(h)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&f>l&&(f=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,l));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&l<f)&&(l=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,
f));h<f&&(h=f);h>l&&(h=l);c.save();s&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();s&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(var p=0;p<a.dataSeriesIndexes.length;p++){var n=a.dataSeriesIndexes[p],q=this.data[n],g=q.dataPoints;if(0<g.length)for(var m=5<h&&q.bevelEnabled?!0:!1,f=0;f<g.length;f++)if(g[f].getTime?k=g[f].x.getTime():k=g[f].x,!(k<a.axisX.dataInfo.viewPortMin||
k>a.axisX.dataInfo.viewPortMax)&&!r(g[f].y)&&g[f].y.length&&"number"===typeof g[f].y[0]&&"number"===typeof g[f].y[1]){b=a.axisX.convertValueToPixel(k);l=a.axisY.convertValueToPixel(g[f].y[0]);u=a.axisY.convertValueToPixel(g[f].y[1]);var ga=a.axisX.reversed?b+a.plotType.totalDataSeries*h/2-(a.previousDataSeriesCount+p)*h<<0:b-a.plotType.totalDataSeries*h/2+(a.previousDataSeriesCount+p)*h<<0,O=a.axisX.reversed?ga-h<<0:ga+h<<0,b=g[f].color?g[f].color:q._colorSet[f%q._colorSet.length];if(l>u){var t=l;
l=u;u=t}t=q.dataPointIds[f];this._eventManager.objectMap[t]={id:t,objectType:"dataPoint",dataSeriesIndex:n,dataPointIndex:f,x1:ga,y1:l,x2:O,y2:u};da(c,ga,l,O,u,b,0,b,m,m,!1,!1,q.fillOpacity);b=S(t);s&&da(this._eventManager.ghostCtx,ga,l,O,u,b,0,null,!1,!1,!1,!1);if(g[f].indexLabel||q.indexLabel||g[f].indexLabelFormatter||q.indexLabelFormatter)this._indexLabels.push({chartType:"rangeColumn",dataPoint:g[f],dataSeries:q,indexKeyword:0,point:{x:ga+(O-ga)/2,y:g[f].y[1]>=g[f].y[0]?u:l},direction:g[f].y[1]>=
g[f].y[0]?-1:1,bounds:{x1:ga,y1:Math.min(l,u),x2:O,y2:Math.max(l,u)},color:b}),this._indexLabels.push({chartType:"rangeColumn",dataPoint:g[f],dataSeries:q,indexKeyword:1,point:{x:ga+(O-ga)/2,y:g[f].y[1]>=g[f].y[0]?l:u},direction:g[f].y[1]>=g[f].y[0]?1:-1,bounds:{x1:ga,y1:Math.min(l,u),x2:O,y2:Math.max(l,u)},color:b})}}s&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),
a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:L.fadeInAnimation,easingFunction:L.easing.easeInQuad,animationBase:0}}};m.prototype.renderError=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=s?this._preRenderCtx:
d,b=a.axisY._position?"left"===a.axisY._position||"right"===a.axisY._position?!1:!0:!1;if(!(0>=a.dataSeriesIndexes.length)){var e=null,f=!1,l=this.plotArea,u=0,k,h,p,n,q,g,m,ga=a.axisX.dataInfo.minDiff;isFinite(ga)||(ga=0.3*Math.abs(a.axisX.range));c.save();s&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(l.x1,l.y1,l.width,l.height);c.clip();s&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(l.x1,l.y1,l.width,l.height),this._eventManager.ghostCtx.clip());for(var O=
0,t=0;t<this.data.length;t++)!this.data[t].type.match(/(bar|column)/ig)||!this.data[t].visible||this.data[t].type.match(/(stacked)/ig)&&O||O++;for(var x=0;x<a.dataSeriesIndexes.length;x++){var A=a.dataSeriesIndexes[x],v=this.data[A],C=v.dataPoints,y=r(v._linkedSeries)?!1:v._linkedSeries.type.match(/(bar|column)/ig)&&v._linkedSeries.visible?!0:!1,D=0;if(y)for(e=v._linkedSeries.id,t=0;t<e;t++)!this.data[t].type.match(/(bar|column)/ig)||!this.data[t].visible||this.data[t].type.match(/(stacked)/ig)&&
D||(this.data[t].type.match(/(range)/ig)&&(f=!0),D++);e=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;u=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:b?Math.min(0.15*this.height,0.9*(this.plotArea.height/(y?O:1)))<<0:0.3*this.width;f&&(u=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:b?Math.min(0.15*this.height,0.9*(this.plotArea.height/
(y?O:1)))<<0:0.03*this.width);t=this.options.dataPointWidth?this.dataPointWidth:0.9*((b?l.height:l.width)*(a.axisX.logarithmic?Math.log(ga)/Math.log(a.axisX.range):Math.abs(ga)/Math.abs(a.axisX.range))/(y?O:1))<<0;this.dataPointMaxWidth&&e>u&&(e=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,u));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&u<e)&&(u=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,e));t<e&&(t=e);t>u&&(t=u);if(0<C.length)for(var E=v._colorSet,
u=0;u<C.length;u++){var e=v.lineColor=v.options.color?v.options.color:E[0],K={color:C[u].whiskerColor?C[u].whiskerColor:C[u].color?v.whiskerColor?v.whiskerColor:C[u].color:v.whiskerColor?v.whiskerColor:e,thickness:r(C[u].whiskerThickness)?v.whiskerThickness:C[u].whiskerThickness,dashType:C[u].whiskerDashType?C[u].whiskerDashType:v.whiskerDashType,length:r(C[u].whiskerLength)?r(v.options.whiskerLength)?t:v.options.whiskerLength:C[u].whiskerLength,trimLength:r(C[u].whiskerLength)?r(v.options.whiskerLength)?
50:0:0};K.length="number"===typeof K.length?0>=K.length?0:K.length>=t?t:K.length:"string"===typeof K.length?parseInt(K.length)*t/100>t?t:parseInt(K.length)*t/100>t:t;K.thickness="number"===typeof K.thickness?0>K.thickness?0:Math.round(K.thickness):2;var P={color:C[u].stemColor?C[u].stemColor:C[u].color?v.stemColor?v.stemColor:C[u].color:v.stemColor?v.stemColor:e,thickness:C[u].stemThickness?C[u].stemThickness:v.stemThickness,dashType:C[u].stemDashType?C[u].stemDashType:v.stemDashType};P.thickness=
"number"===typeof P.thickness?0>P.thickness?0:Math.round(P.thickness):2;C[u].getTime?m=C[u].x.getTime():m=C[u].x;if(!(m<a.axisX.dataInfo.viewPortMin||m>a.axisX.dataInfo.viewPortMax)&&!r(C[u].y)&&C[u].y.length&&"number"===typeof C[u].y[0]&&"number"===typeof C[u].y[1]){var ha=a.axisX.convertValueToPixel(m);b?h=ha:k=ha;ha=a.axisY.convertValueToPixel(C[u].y[0]);b?p=ha:q=ha;ha=a.axisY.convertValueToPixel(C[u].y[1]);b?n=ha:g=ha;b?(q=a.axisX.reversed?h+(y?O:1)*t/2-(y?D-1:0)*t<<0:h-(y?O:1)*t/2+(y?D-1:0)*
t<<0,g=a.axisX.reversed?q-t<<0:q+t<<0):(p=a.axisX.reversed?k+(y?O:1)*t/2-(y?D-1:0)*t<<0:k-(y?O:1)*t/2+(y?D-1:0)*t<<0,n=a.axisX.reversed?p-t<<0:p+t<<0);!b&&q>g&&(ha=q,q=g,g=ha);b&&p>n&&(ha=p,p=n,n=ha);ha=v.dataPointIds[u];this._eventManager.objectMap[ha]={id:ha,objectType:"dataPoint",dataSeriesIndex:A,dataPointIndex:u,x1:Math.min(p,n),y1:Math.min(q,g),x2:Math.max(n,p),y2:Math.max(g,q),isXYSwapped:b,stemProperties:P,whiskerProperties:K};w(c,Math.min(p,n),Math.min(q,g),Math.max(n,p),Math.max(g,q),e,
K,P,b);s&&w(this._eventManager.ghostCtx,p,q,n,g,e,K,P,b);if(C[u].indexLabel||v.indexLabel||C[u].indexLabelFormatter||v.indexLabelFormatter)this._indexLabels.push({chartType:"error",dataPoint:C[u],dataSeries:v,indexKeyword:0,point:{x:b?C[u].y[1]>=C[u].y[0]?p:n:p+(n-p)/2,y:b?q+(g-q)/2:C[u].y[1]>=C[u].y[0]?g:q},direction:C[u].y[1]>=C[u].y[0]?-1:1,bounds:{x1:b?Math.min(p,n):p,y1:b?q:Math.min(q,g),x2:b?Math.max(p,n):n,y2:b?g:Math.max(q,g)},color:e,axisSwapped:b}),this._indexLabels.push({chartType:"error",
dataPoint:C[u],dataSeries:v,indexKeyword:1,point:{x:b?C[u].y[1]>=C[u].y[0]?n:p:p+(n-p)/2,y:b?q+(g-q)/2:C[u].y[1]>=C[u].y[0]?q:g},direction:C[u].y[1]>=C[u].y[0]?1:-1,bounds:{x1:b?Math.min(p,n):p,y1:b?q:Math.min(q,g),x2:b?Math.max(p,n):n,y2:b?g:Math.max(q,g)},color:e,axisSwapped:b})}}}s&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,
0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(l.x1,l.y1,l.width,l.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:L.fadeInAnimation,easingFunction:L.easing.easeInQuad,animationBase:0}}};m.prototype.renderRangeBar=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=s?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=
null,e=this.plotArea,f=0,l,u,k,h,f=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;l=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.height,0.9*(this.plotArea.height/a.plotType.totalDataSeries))<<0;var p=a.axisX.dataInfo.minDiff;isFinite(p)||(p=0.3*Math.abs(a.axisX.range));p=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.height*(a.axisX.logarithmic?Math.log(p)/Math.log(a.axisX.range):
Math.abs(p)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&f>l&&(f=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,l));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&l<f)&&(l=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,f));p<f&&(p=f);p>l&&(p=l);c.save();s&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();s&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,
e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(var n=0;n<a.dataSeriesIndexes.length;n++){var q=a.dataSeriesIndexes[n],g=this.data[q],m=g.dataPoints;if(0<m.length){var ga=5<p&&g.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(f=0;f<m.length;f++)if(m[f].getTime?h=m[f].x.getTime():h=m[f].x,!(h<a.axisX.dataInfo.viewPortMin||h>a.axisX.dataInfo.viewPortMax)&&!r(m[f].y)&&m[f].y.length&&"number"===typeof m[f].y[0]&&"number"===typeof m[f].y[1]){l=a.axisY.convertValueToPixel(m[f].y[0]);u=a.axisY.convertValueToPixel(m[f].y[1]);
k=a.axisX.convertValueToPixel(h);k=a.axisX.reversed?k+a.plotType.totalDataSeries*p/2-(a.previousDataSeriesCount+n)*p<<0:k-a.plotType.totalDataSeries*p/2+(a.previousDataSeriesCount+n)*p<<0;var v=a.axisX.reversed?k-p<<0:k+p<<0;l>u&&(b=l,l=u,u=b);b=m[f].color?m[f].color:g._colorSet[f%g._colorSet.length];da(c,l,k,u,v,b,0,null,ga,!1,!1,!1,g.fillOpacity);b=g.dataPointIds[f];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:f,x1:l,y1:k,x2:u,y2:v};b=S(b);s&&da(this._eventManager.ghostCtx,
l,k,u,v,b,0,null,!1,!1,!1,!1);if(m[f].indexLabel||g.indexLabel||m[f].indexLabelFormatter||g.indexLabelFormatter)this._indexLabels.push({chartType:"rangeBar",dataPoint:m[f],dataSeries:g,indexKeyword:0,point:{x:m[f].y[1]>=m[f].y[0]?l:u,y:k+(v-k)/2},direction:m[f].y[1]>=m[f].y[0]?-1:1,bounds:{x1:Math.min(l,u),y1:k,x2:Math.max(l,u),y2:v},color:b}),this._indexLabels.push({chartType:"rangeBar",dataPoint:m[f],dataSeries:g,indexKeyword:1,point:{x:m[f].y[1]>=m[f].y[0]?u:l,y:k+(v-k)/2},direction:m[f].y[1]>=
m[f].y[0]?1:-1,bounds:{x1:Math.min(l,u),y1:k,x2:Math.max(l,u),y2:v},color:b})}}}s&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());
c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:L.fadeInAnimation,easingFunction:L.easing.easeInQuad,animationBase:0}}};m.prototype.renderRangeArea=function(a){function d(){if(x){for(var a=null,c=k.length-1;0<=c;c--)a=k[c],b.lineTo(a.x,a.y2),e.lineTo(a.x,a.y2);b.closePath();b.globalAlpha=p.fillOpacity;b.fill();b.globalAlpha=1;e.fill();if(0<p.lineThickness){b.beginPath();b.moveTo(a.x,a.y2);for(c=0;c<k.length;c++)a=k[c],b.lineTo(a.x,a.y2);b.moveTo(k[0].x,k[0].y1);for(c=0;c<k.length;c++)a=
k[c],b.lineTo(a.x,a.y1);b.stroke()}b.beginPath();b.moveTo(m,r);e.beginPath();e.moveTo(m,r);x={x:m,y:r};k=[];k.push({x:m,y1:r,y2:v})}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=s?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx,f=[],l=this.plotArea;b.save();s&&e.save();b.beginPath();b.rect(l.x1,l.y1,l.width,l.height);b.clip();s&&(e.beginPath(),e.rect(l.x1,l.y1,l.width,l.height),e.clip());for(var u=0;u<a.dataSeriesIndexes.length;u++){var k=[],h=a.dataSeriesIndexes[u],
p=this.data[h],n=p.dataPoints,f=p.id;this._eventManager.objectMap[f]={objectType:"dataSeries",dataSeriesIndex:h};f=S(f);e.fillStyle=f;var f=[],q=!0,g=0,m,r,v,t,x=null;if(0<n.length){var A=p._colorSet[g%p._colorSet.length],w=p.lineColor=p.options.lineColor||A,C=w;b.fillStyle=A;b.strokeStyle=w;b.lineWidth=p.lineThickness;var y="solid";if(b.setLineDash){var D=Q(p.nullDataLineDashType,p.lineThickness),y=p.lineDashType,E=Q(y,p.lineThickness);b.setLineDash(E)}for(var K=!0;g<n.length;g++)if(t=n[g].x.getTime?
n[g].x.getTime():n[g].x,!(t<a.axisX.dataInfo.viewPortMin||t>a.axisX.dataInfo.viewPortMax&&(!p.connectNullData||!K)))if(null!==n[g].y&&n[g].y.length&&"number"===typeof n[g].y[0]&&"number"===typeof n[g].y[1]){m=a.axisX.convertValueToPixel(t);r=a.axisY.convertValueToPixel(n[g].y[0]);v=a.axisY.convertValueToPixel(n[g].y[1]);q||K?(p.connectNullData&&!q?(b.setLineDash&&(p.options.nullDataLineDashType||y===p.lineDashType&&p.lineDashType!==p.nullDataLineDashType)&&(k[k.length-1].newLineDashArray=E,y=p.nullDataLineDashType,
b.setLineDash(D)),b.lineTo(m,r),s&&e.lineTo(m,r),k.push({x:m,y1:r,y2:v})):(b.beginPath(),b.moveTo(m,r),x={x:m,y:r},k=[],k.push({x:m,y1:r,y2:v}),s&&(e.beginPath(),e.moveTo(m,r))),K=q=!1):(b.lineTo(m,r),k.push({x:m,y1:r,y2:v}),s&&e.lineTo(m,r),0==g%250&&d());t=p.dataPointIds[g];this._eventManager.objectMap[t]={id:t,objectType:"dataPoint",dataSeriesIndex:h,dataPointIndex:g,x1:m,y1:r,y2:v};g<n.length-1&&(C!==(n[g].lineColor||w)||y!==(n[g].lineDashType||p.lineDashType))&&(d(),C=n[g].lineColor||w,k[k.length-
1].newStrokeStyle=C,b.strokeStyle=C,b.setLineDash&&(n[g].lineDashType?(y=n[g].lineDashType,k[k.length-1].newLineDashArray=Q(y,p.lineThickness),b.setLineDash(k[k.length-1].newLineDashArray)):(y=p.lineDashType,k[k.length-1].newLineDashArray=E,b.setLineDash(E))));if(0!==n[g].markerSize&&(0<n[g].markerSize||0<p.markerSize)){var P=p.getMarkerProperties(g,m,v,b);f.push(P);var ha=S(t);s&&f.push({x:m,y:v,ctx:e,type:P.type,size:P.size,color:ha,borderColor:ha,borderThickness:P.borderThickness});P=p.getMarkerProperties(g,
m,r,b);f.push(P);ha=S(t);s&&f.push({x:m,y:r,ctx:e,type:P.type,size:P.size,color:ha,borderColor:ha,borderThickness:P.borderThickness})}if(n[g].indexLabel||p.indexLabel||n[g].indexLabelFormatter||p.indexLabelFormatter)this._indexLabels.push({chartType:"rangeArea",dataPoint:n[g],dataSeries:p,indexKeyword:0,point:{x:m,y:r},direction:n[g].y[0]>n[g].y[1]===a.axisY.reversed?-1:1,color:A}),this._indexLabels.push({chartType:"rangeArea",dataPoint:n[g],dataSeries:p,indexKeyword:1,point:{x:m,y:v},direction:n[g].y[0]>
n[g].y[1]===a.axisY.reversed?1:-1,color:A})}else K||q||d(),K=!0;d();Y.drawMarkers(f)}}s&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(l.x1,l.y1,l.width,l.height),this._eventManager.ghostCtx.restore());
b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:L.xClipAnimation,easingFunction:L.easing.linear,animationBase:0}}};m.prototype.renderRangeSplineArea=function(a){function d(a,c){var d=v(r,2);if(0<d.length){if(0<h.lineThickness){b.strokeStyle=c;b.setLineDash&&b.setLineDash(a);b.beginPath();b.moveTo(d[0].x,d[0].y);for(var f=0;f<d.length-3;f+=3){if(d[f].newStrokeStyle||d[f].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(d[f].x,d[f].y),d[f].newStrokeStyle&&(b.strokeStyle=d[f].newStrokeStyle),
d[f].newLineDashArray&&b.setLineDash(d[f].newLineDashArray);b.bezierCurveTo(d[f+1].x,d[f+1].y,d[f+2].x,d[f+2].y,d[f+3].x,d[f+3].y)}}b.beginPath();b.moveTo(d[0].x,d[0].y);s&&(e.beginPath(),e.moveTo(d[0].x,d[0].y));for(f=0;f<d.length-3;f+=3)b.bezierCurveTo(d[f+1].x,d[f+1].y,d[f+2].x,d[f+2].y,d[f+3].x,d[f+3].y),s&&e.bezierCurveTo(d[f+1].x,d[f+1].y,d[f+2].x,d[f+2].y,d[f+3].x,d[f+3].y);d=v(O,2);b.lineTo(O[O.length-1].x,O[O.length-1].y);for(f=d.length-1;2<f;f-=3)b.bezierCurveTo(d[f-1].x,d[f-1].y,d[f-2].x,
d[f-2].y,d[f-3].x,d[f-3].y),s&&e.bezierCurveTo(d[f-1].x,d[f-1].y,d[f-2].x,d[f-2].y,d[f-3].x,d[f-3].y);b.closePath();b.globalAlpha=h.fillOpacity;b.fill();s&&(e.closePath(),e.fill());b.globalAlpha=1;if(0<h.lineThickness){b.strokeStyle=c;b.setLineDash&&b.setLineDash(a);b.beginPath();b.moveTo(d[0].x,d[0].y);for(var g=f=0;f<d.length-3;f+=3,g++){if(r[g].newStrokeStyle||r[g].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(d[f].x,d[f].y),r[g].newStrokeStyle&&(b.strokeStyle=r[g].newStrokeStyle),r[g].newLineDashArray&&
b.setLineDash(r[g].newLineDashArray);b.bezierCurveTo(d[f+1].x,d[f+1].y,d[f+2].x,d[f+2].y,d[f+3].x,d[f+3].y)}d=v(r,2);b.moveTo(d[0].x,d[0].y);for(g=f=0;f<d.length-3;f+=3,g++){if(r[g].newStrokeStyle||r[g].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(d[f].x,d[f].y),r[g].newStrokeStyle&&(b.strokeStyle=r[g].newStrokeStyle),r[g].newLineDashArray&&b.setLineDash(r[g].newLineDashArray);b.bezierCurveTo(d[f+1].x,d[f+1].y,d[f+2].x,d[f+2].y,d[f+3].x,d[f+3].y)}b.stroke()}b.beginPath()}}var c=a.targetCanvasCtx||
this.plotArea.ctx,b=s?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx,f=[],l=this.plotArea;b.save();s&&e.save();b.beginPath();b.rect(l.x1,l.y1,l.width,l.height);b.clip();s&&(e.beginPath(),e.rect(l.x1,l.y1,l.width,l.height),e.clip());for(var k=0;k<a.dataSeriesIndexes.length;k++){var m=a.dataSeriesIndexes[k],h=this.data[m],p=h.dataPoints,f=h.id;this._eventManager.objectMap[f]={objectType:"dataSeries",dataSeriesIndex:m};f=S(f);e.fillStyle=f;var f=[],n=0,q,
g,B,r=[],O=[];if(0<p.length){var t=h._colorSet[n%h._colorSet.length],x=h.lineColor=h.options.lineColor||t,A=x;b.fillStyle=t;b.lineWidth=h.lineThickness;var w="solid",C;if(b.setLineDash){var y=Q(h.nullDataLineDashType,h.lineThickness),w=h.lineDashType;C=Q(w,h.lineThickness)}for(g=!1;n<p.length;n++)if(q=p[n].x.getTime?p[n].x.getTime():p[n].x,!(q<a.axisX.dataInfo.viewPortMin||q>a.axisX.dataInfo.viewPortMax&&(!h.connectNullData||!g)))if(null!==p[n].y&&p[n].y.length&&"number"===typeof p[n].y[0]&&"number"===
typeof p[n].y[1]){q=a.axisX.convertValueToPixel(q);g=a.axisY.convertValueToPixel(p[n].y[0]);B=a.axisY.convertValueToPixel(p[n].y[1]);var D=h.dataPointIds[n];this._eventManager.objectMap[D]={id:D,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:n,x1:q,y1:g,y2:B};r[r.length]={x:q,y:g};O[O.length]={x:q,y:B};n<p.length-1&&(A!==(p[n].lineColor||x)||w!==(p[n].lineDashType||h.lineDashType))&&(A=p[n].lineColor||x,r[r.length-1].newStrokeStyle=A,b.setLineDash&&(p[n].lineDashType?(w=p[n].lineDashType,
r[r.length-1].newLineDashArray=Q(w,h.lineThickness)):(w=h.lineDashType,r[r.length-1].newLineDashArray=C)));if(0!==p[n].markerSize&&(0<p[n].markerSize||0<h.markerSize)){var E=h.getMarkerProperties(n,q,g,b);f.push(E);var K=S(D);s&&f.push({x:q,y:g,ctx:e,type:E.type,size:E.size,color:K,borderColor:K,borderThickness:E.borderThickness});E=h.getMarkerProperties(n,q,B,b);f.push(E);K=S(D);s&&f.push({x:q,y:B,ctx:e,type:E.type,size:E.size,color:K,borderColor:K,borderThickness:E.borderThickness})}if(p[n].indexLabel||
h.indexLabel||p[n].indexLabelFormatter||h.indexLabelFormatter)this._indexLabels.push({chartType:"rangeSplineArea",dataPoint:p[n],dataSeries:h,indexKeyword:0,point:{x:q,y:g},direction:p[n].y[0]<=p[n].y[1]?-1:1,color:t}),this._indexLabels.push({chartType:"rangeSplineArea",dataPoint:p[n],dataSeries:h,indexKeyword:1,point:{x:q,y:B},direction:p[n].y[0]<=p[n].y[1]?1:-1,color:t});g=!1}else 0<n&&!g&&(h.connectNullData?b.setLineDash&&(0<r.length&&(h.options.nullDataLineDashType||!p[n-1].lineDashType))&&(r[r.length-
1].newLineDashArray=y,w=h.nullDataLineDashType):(d(C,x),r=[],O=[])),g=!0;d(C,x);Y.drawMarkers(f)}}s&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(l.x1,l.y1,l.width,l.height),
this._eventManager.ghostCtx.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:L.xClipAnimation,easingFunction:L.easing.linear,animationBase:0}}};m.prototype.renderWaterfall=function(a){var d=a.targetCanvasCtx||this.plotArea.ctx,c=s?this._preRenderCtx:d;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx,e=null,f=this.plotArea,l=0,k,m,h,p,n=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),l=this.options.dataPointMinWidth?this.dataPointMinWidth:
this.options.dataPointWidth?this.dataPointWidth:1;m=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.width,0.9*(this.plotArea.width/a.plotType.totalDataSeries))<<0;var q=a.axisX.dataInfo.minDiff;isFinite(q)||(q=0.3*Math.abs(a.axisX.range));q=this.options.dataPointWidth?this.dataPointWidth:0.6*(f.width*(a.axisX.logarithmic?Math.log(q)/Math.log(a.axisX.range):Math.abs(q)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&
l>m&&(l=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,m));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&m<l)&&(m=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,l));q<l&&(q=l);q>m&&(q=m);c.save();s&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(f.x1,f.y1,f.width,f.height);c.clip();s&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(f.x1,f.y1,f.width,f.height),this._eventManager.ghostCtx.clip());for(var g=0;g<a.dataSeriesIndexes.length;g++){var r=
a.dataSeriesIndexes[g],v=this.data[r],O=v.dataPoints,e=v._colorSet[0];v.risingColor=v.options.risingColor?v.options.risingColor:e;v.fallingColor=v.options.fallingColor?v.options.fallingColor:"#e40a0a";var t="number"===typeof v.options.lineThickness?Math.round(v.lineThickness):1,x=1===Math.round(t)%2?-0.5:0;if(0<O.length)for(var A=5<q&&v.bevelEnabled?!0:!1,w=!1,C=null,y=null,l=0;l<O.length;l++)if(O[l].getTime?p=O[l].x.getTime():p=O[l].x,"number"!==typeof O[l].y){if(0<l&&!w&&v.connectNullData)var D=
v.options.nullDataLineDashType||!O[l-1].lineDashType?v.nullDataLineDashType:O[l-1].lineDashType;w=!0}else{k=a.axisX.convertValueToPixel(p);m=0===v.dataPointEOs[l].cumulativeSum?n:a.axisY.convertValueToPixel(v.dataPointEOs[l].cumulativeSum);h=0===v.dataPointEOs[l].cumulativeSumYStartValue?n:a.axisY.convertValueToPixel(v.dataPointEOs[l].cumulativeSumYStartValue);k=a.axisX.reversed?k+a.plotType.totalDataSeries*q/2-(a.previousDataSeriesCount+g)*q<<0:k-a.plotType.totalDataSeries*q/2+(a.previousDataSeriesCount+
g)*q<<0;var E=a.axisX.reversed?k-q<<0:k+q<<0;m>h&&(e=m,m=h,h=e);a.axisY.reversed&&(e=m,m=h,h=e);e=v.dataPointIds[l];this._eventManager.objectMap[e]={id:e,objectType:"dataPoint",dataSeriesIndex:r,dataPointIndex:l,x1:k,y1:m,x2:E,y2:h};var K=O[l].color?O[l].color:0<O[l].y?v.risingColor:v.fallingColor;da(c,k,m,E,h,K,0,K,A,A,!1,!1,v.fillOpacity);e=S(e);s&&da(this._eventManager.ghostCtx,k,m,E,h,e,0,null,!1,!1,!1,!1);var P,K=k;P="undefined"!==typeof O[l].isIntermediateSum&&!0===O[l].isIntermediateSum||"undefined"!==
typeof O[l].isCumulativeSum&&!0===O[l].isCumulativeSum?0<O[l].y?m:h:0<O[l].y?h:m;0<l&&C&&(!w||v.connectNullData)&&(w&&c.setLineDash&&c.setLineDash(Q(D,t)),c.beginPath(),c.moveTo(C,y-x),c.lineTo(K,P-x),0<t&&c.stroke(),s&&(b.beginPath(),b.moveTo(C,y-x),b.lineTo(K,P-x),0<t&&b.stroke()));w=!1;C=E;y=0<O[l].y?m:h;K=O[l].lineDashType?O[l].lineDashType:v.options.lineDashType?v.options.lineDashType:"shortDash";c.strokeStyle=O[l].lineColor?O[l].lineColor:v.options.lineColor?v.options.lineColor:"#9e9e9e";c.lineWidth=
t;c.setLineDash&&(K=Q(K,t),c.setLineDash(K));(O[l].indexLabel||v.indexLabel||O[l].indexLabelFormatter||v.indexLabelFormatter)&&this._indexLabels.push({chartType:"waterfall",dataPoint:O[l],dataSeries:v,point:{x:k+(E-k)/2,y:0<=O[l].y?m:h},direction:0>O[l].y===a.axisY.reversed?1:-1,bounds:{x1:k,y1:Math.min(m,h),x2:E,y2:Math.max(m,h)},color:e})}}s&&(d.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,
0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(f.x1,f.y1,f.width,f.height),this._eventManager.ghostCtx.restore());c.restore();return{source:d,dest:this.plotArea.ctx,animationCallback:L.fadeInAnimation,easingFunction:L.easing.easeInQuad,animationBase:0}}};var Z=function(a,d,c,b,e,f,l,k,m){if(!(0>c)){"undefined"===typeof k&&
(k=1);if(!s){var h=Number((l%(2*Math.PI)).toFixed(8));Number((f%(2*Math.PI)).toFixed(8))===h&&(l-=1E-4)}a.save();a.globalAlpha=k;"pie"===e?(a.beginPath(),a.moveTo(d.x,d.y),a.arc(d.x,d.y,c,f,l,!1),a.fillStyle=b,a.strokeStyle="white",a.lineWidth=2,a.closePath(),a.fill()):"doughnut"===e&&(a.beginPath(),a.arc(d.x,d.y,c,f,l,!1),0<=m&&a.arc(d.x,d.y,m*c,l,f,!0),a.closePath(),a.fillStyle=b,a.strokeStyle="white",a.lineWidth=2,a.fill());a.globalAlpha=1;a.restore()}};m.prototype.renderPie=function(a){function d(){if(h&&
p){for(var a=0,b=0,c=0,d=0,e=0;e<p.length;e++){var f=p[e],l=h.dataPointIds[e];g[e].id=l;g[e].objectType="dataPoint";g[e].dataPointIndex=e;g[e].dataSeriesIndex=0;var n=g[e],k={percent:null,total:null},u=null,k=m.getPercentAndTotal(h,f);if(h.indexLabelFormatter||f.indexLabelFormatter)u={chart:m.options,dataSeries:h,dataPoint:f,total:k.total,percent:k.percent};k=f.indexLabelFormatter?f.indexLabelFormatter(u):f.indexLabel?m.replaceKeywordsWithValue(f.indexLabel,f,h,e):h.indexLabelFormatter?h.indexLabelFormatter(u):
h.indexLabel?m.replaceKeywordsWithValue(h.indexLabel,f,h,e):f.label?f.label:"";m._eventManager.objectMap[l]=n;n.center={x:A.x,y:A.y};n.y=f.y;n.radius=y;n.percentInnerRadius=E;n.indexLabelText=k;n.indexLabelPlacement=h.indexLabelPlacement;n.indexLabelLineColor=f.indexLabelLineColor?f.indexLabelLineColor:h.options.indexLabelLineColor?h.options.indexLabelLineColor:f.color?f.color:h._colorSet[e%h._colorSet.length];n.indexLabelLineThickness=r(f.indexLabelLineThickness)?h.indexLabelLineThickness:f.indexLabelLineThickness;
n.indexLabelLineDashType=f.indexLabelLineDashType?f.indexLabelLineDashType:h.indexLabelLineDashType;n.indexLabelFontColor=f.indexLabelFontColor?f.indexLabelFontColor:h.indexLabelFontColor;n.indexLabelFontStyle=f.indexLabelFontStyle?f.indexLabelFontStyle:h.indexLabelFontStyle;n.indexLabelFontWeight=f.indexLabelFontWeight?f.indexLabelFontWeight:h.indexLabelFontWeight;n.indexLabelFontSize=r(f.indexLabelFontSize)?h.indexLabelFontSize:f.indexLabelFontSize;n.indexLabelFontFamily=f.indexLabelFontFamily?
f.indexLabelFontFamily:h.indexLabelFontFamily;n.indexLabelBackgroundColor=f.indexLabelBackgroundColor?f.indexLabelBackgroundColor:h.options.indexLabelBackgroundColor?h.options.indexLabelBackgroundColor:h.indexLabelBackgroundColor;n.indexLabelMaxWidth=f.indexLabelMaxWidth?f.indexLabelMaxWidth:h.indexLabelMaxWidth?h.indexLabelMaxWidth:0.33*q.width;n.indexLabelWrap="undefined"!==typeof f.indexLabelWrap?f.indexLabelWrap:h.indexLabelWrap;n.startAngle=0===e?h.startAngle?h.startAngle/180*Math.PI:0:g[e-1].endAngle;
n.startAngle=(n.startAngle+2*Math.PI)%(2*Math.PI);n.endAngle=n.startAngle+2*Math.PI/w*Math.abs(f.y);f=(n.endAngle+n.startAngle)/2;f=(f+2*Math.PI)%(2*Math.PI);n.midAngle=f;if(n.midAngle>Math.PI/2-t&&n.midAngle<Math.PI/2+t){if(0===a||g[c].midAngle>n.midAngle)c=e;a++}else if(n.midAngle>3*Math.PI/2-t&&n.midAngle<3*Math.PI/2+t){if(0===b||g[d].midAngle>n.midAngle)d=e;b++}n.hemisphere=f>Math.PI/2&&f<=3*Math.PI/2?"left":"right";n.indexLabelTextBlock=new la(m.plotArea.ctx,{fontSize:n.indexLabelFontSize,fontFamily:n.indexLabelFontFamily,
fontColor:n.indexLabelFontColor,fontStyle:n.indexLabelFontStyle,fontWeight:n.indexLabelFontWeight,horizontalAlign:"left",backgroundColor:n.indexLabelBackgroundColor,maxWidth:n.indexLabelMaxWidth,maxHeight:n.indexLabelWrap?5*n.indexLabelFontSize:1.5*n.indexLabelFontSize,text:n.indexLabelText,padding:0,textBaseline:"top"});n.indexLabelTextBlock.measureText()}l=f=0;k=!1;for(e=0;e<p.length;e++)n=g[(c+e)%p.length],1<a&&(n.midAngle>Math.PI/2-t&&n.midAngle<Math.PI/2+t)&&(f<=a/2&&!k?(n.hemisphere="right",
f++):(n.hemisphere="left",k=!0));k=!1;for(e=0;e<p.length;e++)n=g[(d+e)%p.length],1<b&&(n.midAngle>3*Math.PI/2-t&&n.midAngle<3*Math.PI/2+t)&&(l<=b/2&&!k?(n.hemisphere="left",l++):(n.hemisphere="right",k=!0))}}function c(a){var b=m.plotArea.ctx;b.clearRect(q.x1,q.y1,q.width,q.height);b.fillStyle=m.backgroundColor;b.fillRect(q.x1,q.y1,q.width,q.height);for(b=0;b<p.length;b++){var c=g[b].startAngle,d=g[b].endAngle;if(d>c){var e=0.07*y*Math.cos(g[b].midAngle),f=0.07*y*Math.sin(g[b].midAngle),l=!1;if(p[b].exploded){if(1E-9<
Math.abs(g[b].center.x-(A.x+e))||1E-9<Math.abs(g[b].center.y-(A.y+f)))g[b].center.x=A.x+e*a,g[b].center.y=A.y+f*a,l=!0}else if(0<Math.abs(g[b].center.x-A.x)||0<Math.abs(g[b].center.y-A.y))g[b].center.x=A.x+e*(1-a),g[b].center.y=A.y+f*(1-a),l=!0;l&&(e={},e.dataSeries=h,e.dataPoint=h.dataPoints[b],e.index=b,m.toolTip.highlightObjects([e]));Z(m.plotArea.ctx,g[b].center,g[b].radius,p[b].color?p[b].color:h._colorSet[b%h._colorSet.length],h.type,c,d,h.fillOpacity,g[b].percentInnerRadius)}}a=m.plotArea.ctx;
a.save();a.fillStyle="black";a.strokeStyle="grey";a.textBaseline="middle";a.lineJoin="round";for(b=b=0;b<p.length;b++)c=g[b],c.indexLabelText&&(c.indexLabelTextBlock.y-=c.indexLabelTextBlock.height/2,d=0,d="left"===c.hemisphere?"inside"!==h.indexLabelPlacement?-(c.indexLabelTextBlock.width+n):-c.indexLabelTextBlock.width/2:"inside"!==h.indexLabelPlacement?n:-c.indexLabelTextBlock.width/2,c.indexLabelTextBlock.x+=d,c.indexLabelTextBlock.render(!0),c.indexLabelTextBlock.x-=d,c.indexLabelTextBlock.y+=
c.indexLabelTextBlock.height/2,"inside"!==c.indexLabelPlacement&&0<c.indexLabelLineThickness&&(d=c.center.x+y*Math.cos(c.midAngle),e=c.center.y+y*Math.sin(c.midAngle),a.strokeStyle=c.indexLabelLineColor,a.lineWidth=c.indexLabelLineThickness,a.setLineDash&&a.setLineDash(Q(c.indexLabelLineDashType,c.indexLabelLineThickness)),a.beginPath(),a.moveTo(d,e),a.lineTo(c.indexLabelTextBlock.x,c.indexLabelTextBlock.y),a.lineTo(c.indexLabelTextBlock.x+("left"===c.hemisphere?-n:n),c.indexLabelTextBlock.y),a.stroke()),
a.lineJoin="miter");a.save()}function b(a,b){var c=0,c=a.indexLabelTextBlock.y-a.indexLabelTextBlock.height/2,d=a.indexLabelTextBlock.y+a.indexLabelTextBlock.height/2,e=b.indexLabelTextBlock.y-b.indexLabelTextBlock.height/2,f=b.indexLabelTextBlock.y+b.indexLabelTextBlock.height/2;return c=b.indexLabelTextBlock.y>a.indexLabelTextBlock.y?e-d:c-f}function e(a){for(var c=null,d=1;d<p.length;d++)if(c=(a+d+g.length)%g.length,g[c].hemisphere!==g[a].hemisphere){c=null;break}else if(g[c].indexLabelText&&c!==
a&&(0>b(g[c],g[a])||("right"===g[a].hemisphere?g[c].indexLabelTextBlock.y>=g[a].indexLabelTextBlock.y:g[c].indexLabelTextBlock.y<=g[a].indexLabelTextBlock.y)))break;else c=null;return c}function f(a,c,d){d=(d||0)+1;if(1E3<d)return 0;c=c||0;var h=0,l=A.y-1*s,n=A.y+1*s;if(0<=a&&a<p.length){var m=g[a];if(0>c&&m.indexLabelTextBlock.y<l||0<c&&m.indexLabelTextBlock.y>n)return 0;var k=0,q=0,q=k=k=0;0>c?m.indexLabelTextBlock.y-m.indexLabelTextBlock.height/2>l&&m.indexLabelTextBlock.y-m.indexLabelTextBlock.height/
2+c<l&&(c=-(l-(m.indexLabelTextBlock.y-m.indexLabelTextBlock.height/2+c))):m.indexLabelTextBlock.y+m.indexLabelTextBlock.height/2<l&&m.indexLabelTextBlock.y+m.indexLabelTextBlock.height/2+c>n&&(c=m.indexLabelTextBlock.y+m.indexLabelTextBlock.height/2+c-n);c=m.indexLabelTextBlock.y+c;l=0;l="right"===m.hemisphere?A.x+Math.sqrt(Math.pow(s,2)-Math.pow(c-A.y,2)):A.x-Math.sqrt(Math.pow(s,2)-Math.pow(c-A.y,2));q=A.x+y*Math.cos(m.midAngle);k=A.y+y*Math.sin(m.midAngle);k=Math.sqrt(Math.pow(l-q,2)+Math.pow(c-
k,2));q=Math.acos(y/s);k=Math.acos((s*s+y*y-k*k)/(2*y*s));c=k<q?c-m.indexLabelTextBlock.y:0;l=null;for(n=1;n<p.length;n++)if(l=(a-n+g.length)%g.length,g[l].hemisphere!==g[a].hemisphere){l=null;break}else if(g[l].indexLabelText&&g[l].hemisphere===g[a].hemisphere&&l!==a&&(0>b(g[l],g[a])||("right"===g[a].hemisphere?g[l].indexLabelTextBlock.y<=g[a].indexLabelTextBlock.y:g[l].indexLabelTextBlock.y>=g[a].indexLabelTextBlock.y)))break;else l=null;q=l;k=e(a);n=l=0;0>c?(n="right"===m.hemisphere?q:k,h=c,null!==
n&&(q=-c,c=m.indexLabelTextBlock.y-m.indexLabelTextBlock.height/2-(g[n].indexLabelTextBlock.y+g[n].indexLabelTextBlock.height/2),c-q<B&&(l=-q,n=f(n,l,d+1),+n.toFixed(x)>+l.toFixed(x)&&(h=c>B?-(c-B):-(q-(n-l)))))):0<c&&(n="right"===m.hemisphere?k:q,h=c,null!==n&&(q=c,c=g[n].indexLabelTextBlock.y-g[n].indexLabelTextBlock.height/2-(m.indexLabelTextBlock.y+m.indexLabelTextBlock.height/2),c-q<B&&(l=q,n=f(n,l,d+1),+n.toFixed(x)<+l.toFixed(x)&&(h=c>B?c-B:q-(l-n)))));h&&(d=m.indexLabelTextBlock.y+h,c=0,c=
"right"===m.hemisphere?A.x+Math.sqrt(Math.pow(s,2)-Math.pow(d-A.y,2)):A.x-Math.sqrt(Math.pow(s,2)-Math.pow(d-A.y,2)),m.midAngle>Math.PI/2-t&&m.midAngle<Math.PI/2+t?(l=(a-1+g.length)%g.length,l=g[l],a=g[(a+1+g.length)%g.length],"left"===m.hemisphere&&"right"===l.hemisphere&&c>l.indexLabelTextBlock.x?c=l.indexLabelTextBlock.x-15:"right"===m.hemisphere&&("left"===a.hemisphere&&c<a.indexLabelTextBlock.x)&&(c=a.indexLabelTextBlock.x+15)):m.midAngle>3*Math.PI/2-t&&m.midAngle<3*Math.PI/2+t&&(l=(a-1+g.length)%
g.length,l=g[l],a=g[(a+1+g.length)%g.length],"right"===m.hemisphere&&"left"===l.hemisphere&&c<l.indexLabelTextBlock.x?c=l.indexLabelTextBlock.x+15:"left"===m.hemisphere&&("right"===a.hemisphere&&c>a.indexLabelTextBlock.x)&&(c=a.indexLabelTextBlock.x-15)),m.indexLabelTextBlock.y=d,m.indexLabelTextBlock.x=c,m.indexLabelAngle=Math.atan2(m.indexLabelTextBlock.y-A.y,m.indexLabelTextBlock.x-A.x))}return h}function l(){var a=m.plotArea.ctx;a.fillStyle="grey";a.strokeStyle="grey";a.font="16px Arial";a.textBaseline=
"middle";for(var c=a=0,d=0,l=!0,c=0;10>c&&(1>c||0<d);c++){if(h.radius||!h.radius&&"undefined"!==typeof h.innerRadius&&null!==h.innerRadius&&y-d<=D)l=!1;l&&(y-=d);d=0;if("inside"!==h.indexLabelPlacement){s=y*v;for(a=0;a<p.length;a++){var k=g[a];k.indexLabelTextBlock.x=A.x+s*Math.cos(k.midAngle);k.indexLabelTextBlock.y=A.y+s*Math.sin(k.midAngle);k.indexLabelAngle=k.midAngle;k.radius=y;k.percentInnerRadius=E}for(var u,t,a=0;a<p.length;a++){var k=g[a],r=e(a);if(null!==r){u=g[a];t=g[r];var C=0,C=b(u,t)-
B;if(0>C){for(var w=t=0,J=0;J<p.length;J++)J!==a&&g[J].hemisphere===k.hemisphere&&(g[J].indexLabelTextBlock.y<k.indexLabelTextBlock.y?t++:w++);t=C/(t+w||1)*w;var w=-1*(C-t),I=J=0;"right"===k.hemisphere?(J=f(a,t),w=-1*(C-J),I=f(r,w),+I.toFixed(x)<+w.toFixed(x)&&+J.toFixed(x)<=+t.toFixed(x)&&f(a,-(w-I))):(J=f(r,t),w=-1*(C-J),I=f(a,w),+I.toFixed(x)<+w.toFixed(x)&&+J.toFixed(x)<=+t.toFixed(x)&&f(r,-(w-I)))}}}}else for(a=0;a<p.length;a++)k=g[a],s="pie"===h.type?0.7*y:0.8*y,r=A.x+s*Math.cos(k.midAngle),
t=A.y+s*Math.sin(k.midAngle),k.indexLabelTextBlock.x=r,k.indexLabelTextBlock.y=t;for(a=0;a<p.length;a++)if(k=g[a],r=k.indexLabelTextBlock.measureText(),0!==r.height&&0!==r.width)r=r=0,"right"===k.hemisphere?(r=q.x2-(k.indexLabelTextBlock.x+k.indexLabelTextBlock.width+n),r*=-1):r=q.x1-(k.indexLabelTextBlock.x-k.indexLabelTextBlock.width-n),0<r&&(!l&&k.indexLabelText&&(t="right"===k.hemisphere?q.x2-k.indexLabelTextBlock.x:k.indexLabelTextBlock.x-q.x1,0.3*k.indexLabelTextBlock.maxWidth>t?k.indexLabelText=
"":k.indexLabelTextBlock.maxWidth=0.85*t,0.3*k.indexLabelTextBlock.maxWidth<t&&(k.indexLabelTextBlock.x-="right"===k.hemisphere?2:-2)),Math.abs(k.indexLabelTextBlock.y-k.indexLabelTextBlock.height/2-A.y)<y||Math.abs(k.indexLabelTextBlock.y+k.indexLabelTextBlock.height/2-A.y)<y)&&(r/=Math.abs(Math.cos(k.indexLabelAngle)),9<r&&(r*=0.3),r>d&&(d=r)),r=r=0,0<k.indexLabelAngle&&k.indexLabelAngle<Math.PI?(r=q.y2-(k.indexLabelTextBlock.y+k.indexLabelTextBlock.height/2+5),r*=-1):r=q.y1-(k.indexLabelTextBlock.y-
k.indexLabelTextBlock.height/2-5),0<r&&(!l&&k.indexLabelText&&(t=0<k.indexLabelAngle&&k.indexLabelAngle<Math.PI?-1:1,0===f(a,r*t)&&f(a,2*t)),Math.abs(k.indexLabelTextBlock.x-A.x)<y&&(r/=Math.abs(Math.sin(k.indexLabelAngle)),9<r&&(r*=0.3),r>d&&(d=r)));var G=function(a,b,c){for(var d=[],e=0;d.push(g[b]),b!==c;b=(b+1+p.length)%p.length);d.sort(function(a,b){return a.y-b.y});for(b=0;b<d.length;b++)if(c=d[b],e<0.7*a)e+=c.indexLabelTextBlock.height,c.indexLabelTextBlock.text="",c.indexLabelText="",c.indexLabelTextBlock.measureText();
else break};(function(){for(var a=-1,c=-1,d=0,f=!1,h=0;h<p.length;h++)if(f=!1,u=g[h],u.indexLabelText){var l=e(h);if(null!==l){var k=g[l];C=0;C=b(u,k);var m;if(m=0>C){m=u.indexLabelTextBlock.x;var q=u.indexLabelTextBlock.y-u.indexLabelTextBlock.height/2,t=u.indexLabelTextBlock.y+u.indexLabelTextBlock.height/2,r=k.indexLabelTextBlock.y-k.indexLabelTextBlock.height/2,z=k.indexLabelTextBlock.x+k.indexLabelTextBlock.width,B=k.indexLabelTextBlock.y+k.indexLabelTextBlock.height/2;m=u.indexLabelTextBlock.x+
u.indexLabelTextBlock.width<k.indexLabelTextBlock.x-n||m>z+n||q>B+n||t<r-n?!1:!0}m?(0>a&&(a=h),l!==a&&(c=l,d+=-C),0===h%Math.max(p.length/10,3)&&(f=!0)):f=!0;f&&(0<d&&0<=a&&0<=c)&&(G(d,a,c),c=a=-1,d=0)}}0<d&&G(d,a,c)})()}}function k(){m.plotArea.layoutManager.reset();m.title&&(m.title.dockInsidePlotArea||"center"===m.title.horizontalAlign&&"center"===m.title.verticalAlign)&&m.title.render();if(m.subtitles)for(var a=0;a<m.subtitles.length;a++){var b=m.subtitles[a];(b.dockInsidePlotArea||"center"===
b.horizontalAlign&&"center"===b.verticalAlign)&&b.render()}m.legend&&(m.legend.dockInsidePlotArea||"center"===m.legend.horizontalAlign&&"center"===m.legend.verticalAlign)&&(m.legend.setLayout(),m.legend.render())}var m=this;if(!(0>=a.dataSeriesIndexes.length)){var h=this.data[a.dataSeriesIndexes[0]],p=h.dataPoints,n=10,q=this.plotArea,g=h.dataPointEOs,B=2,s,v=1.3,t=20/180*Math.PI,x=6,A={x:(q.x2+q.x1)/2,y:(q.y2+q.y1)/2},w=0;a=!1;for(var C=0;C<p.length;C++)w+=Math.abs(p[C].y),!a&&("undefined"!==typeof p[C].indexLabel&&
null!==p[C].indexLabel&&0<p[C].indexLabel.toString().length)&&(a=!0),!a&&("undefined"!==typeof p[C].label&&null!==p[C].label&&0<p[C].label.toString().length)&&(a=!0);if(0!==w){a=a||"undefined"!==typeof h.indexLabel&&null!==h.indexLabel&&0<h.indexLabel.toString().length;var y="inside"!==h.indexLabelPlacement&&a?0.75*Math.min(q.width,q.height)/2:0.92*Math.min(q.width,q.height)/2;h.radius&&(y=Ra(h.radius,y));var D="undefined"!==typeof h.innerRadius&&null!==h.innerRadius?Ra(h.innerRadius,y):0.7*y;h.radius=
y;"doughnut"===h.type&&(h.innerRadius=D);var E=Math.min(D/y,(y-1)/y);this.pieDoughnutClickHandler=function(a){m.isAnimating||!r(a.dataSeries.explodeOnClick)&&!a.dataSeries.explodeOnClick||(a=a.dataPoint,a.exploded=a.exploded?!1:!0,1<this.dataPoints.length&&m._animator.animate(0,500,function(a){c(a);k()}))};d();l();l();l();l();this.disableToolTip=!0;this._animator.animate(0,this.animatedRender?this.animationDuration:0,function(a){var b=m.plotArea.ctx;b.clearRect(q.x1,q.y1,q.width,q.height);b.fillStyle=
m.backgroundColor;b.fillRect(q.x1,q.y1,q.width,q.height);a=g[0].startAngle+2*Math.PI*a;for(b=0;b<p.length;b++){var c=0===b?g[b].startAngle:d,d=c+(g[b].endAngle-g[b].startAngle),e=!1;d>a&&(d=a,e=!0);var f=p[b].color?p[b].color:h._colorSet[b%h._colorSet.length];d>c&&Z(m.plotArea.ctx,g[b].center,g[b].radius,f,h.type,c,d,h.fillOpacity,g[b].percentInnerRadius);if(e)break}k()},function(){m.disableToolTip=!1;m._animator.animate(0,m.animatedRender?500:0,function(a){c(a);k()})})}}};var qa=function(a,d,c,b){"undefined"===
typeof c&&(c=1);0>=Math.round(d.y4-d.y1)||(a.save(),a.globalAlpha=c,a.beginPath(),a.moveTo(Math.round(d.x1),Math.round(d.y1)),a.lineTo(Math.round(d.x2),Math.round(d.y2)),a.lineTo(Math.round(d.x3),Math.round(d.y3)),a.lineTo(Math.round(d.x4),Math.round(d.y4)),"undefined"!==d.x5&&(a.lineTo(Math.round(d.x5),Math.round(d.y5)),a.lineTo(Math.round(d.x6),Math.round(d.y6))),a.closePath(),a.fillStyle=b?b:d.color,a.fill(),a.globalAplha=1,a.restore())};m.prototype.renderFunnel=function(a){function d(){for(var a=
0,b=[],c=0;c<x.length;c++){if("undefined"===typeof x[c].y)return-1;x[c].y="number"===typeof x[c].y?x[c].y:0;a+=Math.abs(x[c].y)}if(0===a)return-1;for(c=b[0]=0;c<x.length;c++)b.push(Math.abs(x[c].y)*E/a);return b}function c(){var a=X,b=aa,c=M,d=Y,e,f;e=$;f=T-ca;d=Math.abs((f-e)*(b-a+(d-c))/2);c=Y-M;e=f-e;f=c*(f-T);f=Math.abs(f);f=d+f;for(var d=[],g=0,h=0;h<x.length;h++){if("undefined"===typeof x[h].y)return-1;x[h].y="number"===typeof x[h].y?x[h].y:0;g+=Math.abs(x[h].y)}if(0===g)return-1;for(var l=
d[0]=0,k=0,n,m,b=b-a,l=!1,h=0;h<x.length;h++)a=Math.abs(x[h].y)*f/g,l?n=0==Number(c.toFixed(3))?0:a/c:(m=ba*ba*b*b-4*Math.abs(ba)*a,0>m?(m=c,l=(b+m)*(e-k)/2,a-=l,n=e-k,k+=e-k,n+=0==m?0:a/m,k+=a/m,l=!0):(n=(Math.abs(ba)*b-Math.sqrt(m))/2,m=b-2*n/Math.abs(ba),k+=n,k>e&&(k-=n,m=c,l=(b+m)*(e-k)/2,a-=l,n=e-k,k+=e-k,n+=a/m,k+=a/m,l=!0),b=m)),d.push(n);return d}function b(){if(t&&x){for(var a,b,c,d,e,f,h,l,k,n,m,p,q,u,B=[],z=[],v={percent:null,total:null},A=null,y=0;y<x.length;y++)u=R[y],u="undefined"!==
typeof u.x5?(u.y2+u.y4)/2:(u.y2+u.y3)/2,u=g(u).x2+1,B[y]=N-u-W;u=0.5*W;for(var y=0,C=x.length-1;y<x.length||0<=C;y++,C--){b=t.reversed?x[C]:x[y];a=b.color?b.color:t.reversed?t._colorSet[(x.length-1-y)%t._colorSet.length]:t._colorSet[y%t._colorSet.length];c=b.indexLabelPlacement||t.indexLabelPlacement||"outside";d=b.indexLabelBackgroundColor||t.indexLabelBackgroundColor||(s?"transparent":null);e=b.indexLabelFontColor||t.indexLabelFontColor||"#979797";f=r(b.indexLabelFontSize)?t.indexLabelFontSize:
b.indexLabelFontSize;h=b.indexLabelFontStyle||t.indexLabelFontStyle||"normal";l=b.indexLabelFontFamily||t.indexLabelFontFamily||"arial";k=b.indexLabelFontWeight||t.indexLabelFontWeight||"normal";a=b.indexLabelLineColor||t.options.indexLabelLineColor||a;n="number"===typeof b.indexLabelLineThickness?b.indexLabelLineThickness:"number"===typeof t.indexLabelLineThickness?t.indexLabelLineThickness:2;m=b.indexLabelLineDashType||t.indexLabelLineDashType||"solid";p="undefined"!==typeof b.indexLabelWrap?b.indexLabelWrap:
"undefined"!==typeof t.indexLabelWrap?t.indexLabelWrap:!0;q=t.dataPointIds[y];w._eventManager.objectMap[q]={id:q,objectType:"dataPoint",dataPointIndex:y,dataSeriesIndex:0,funnelSection:R[t.reversed?x.length-1-y:y]};"inside"===t.indexLabelPlacement&&(B[y]=y!==da?t.reversed?R[y].x2-R[y].x1:R[y].x3-R[y].x4:R[y].x3-R[y].x6,20>B[y]&&(B[y]=y!==da?t.reversed?R[y].x3-R[y].x4:R[y].x2-R[y].x1:R[y].x2-R[y].x1,B[y]/=2));q=b.indexLabelMaxWidth?b.indexLabelMaxWidth:t.options.indexLabelMaxWidth?t.indexLabelMaxWidth:
B[y];if(q>B[y]||0>q)q=B[y];z[y]="inside"===t.indexLabelPlacement?R[y].height:!1;v=w.getPercentAndTotal(t,b);if(t.indexLabelFormatter||b.indexLabelFormatter)A={chart:w.options,dataSeries:t,dataPoint:b,total:v.total,percent:v.percent};b=b.indexLabelFormatter?b.indexLabelFormatter(A):b.indexLabel?w.replaceKeywordsWithValue(b.indexLabel,b,t,y):t.indexLabelFormatter?t.indexLabelFormatter(A):t.indexLabel?w.replaceKeywordsWithValue(t.indexLabel,b,t,y):b.label?b.label:"";0>=n&&(n=0);1E3>q&&1E3-q<u&&(q+=1E3-
q);S.roundRect||Ba(S);c=new la(S,{fontSize:f,fontFamily:l,fontColor:e,fontStyle:h,fontWeight:k,horizontalAlign:c,backgroundColor:d,maxWidth:q,maxHeight:!1===z[y]?p?4.28571429*f:1.5*f:z[y],text:b,padding:ea});c.measureText();H.push({textBlock:c,id:t.reversed?C:y,isDirty:!1,lineColor:a,lineThickness:n,lineDashType:m,height:c.height<c.maxHeight?c.height:c.maxHeight,width:c.width<c.maxWidth?c.width:c.maxWidth})}}}function e(){var a,b,c,d,e,f=[];e=!1;c=0;for(var g,h=N-aa-W/2,h=t.options.indexLabelMaxWidth?
t.indexLabelMaxWidth>h?h:t.indexLabelMaxWidth:h,l=H.length-1;0<=l;l--){g=x[H[l].id];c=H[l];d=c.textBlock;b=(a=q(l)<R.length?H[q(l)]:null)?a.textBlock:null;c=c.height;a&&d.y+c+ea>b.y&&(e=!0);c=g.indexLabelMaxWidth||h;if(c>h||0>c)c=h;f.push(c)}if(e)for(l=H.length-1;0<=l;l--)a=R[l],H[l].textBlock.maxWidth=f[f.length-(l+1)],H[l].textBlock.measureText(),H[l].textBlock.x=N-h,c=H[l].textBlock.height<H[l].textBlock.maxHeight?H[l].textBlock.height:H[l].textBlock.maxHeight,e=H[l].textBlock.width<H[l].textBlock.maxWidth?
H[l].textBlock.width:H[l].textBlock.maxWidth,H[l].height=c,H[l].width=e,c="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,H[l].textBlock.y=c-H[l].height/2,t.reversed?(H[l].textBlock.y+H[l].height>U+D&&(H[l].textBlock.y=U+D-H[l].height),H[l].textBlock.y<sa-D&&(H[l].textBlock.y=sa-D)):(H[l].textBlock.y<U-D&&(H[l].textBlock.y=U-D),H[l].textBlock.y+H[l].height>sa+D&&(H[l].textBlock.y=sa+D-H[l].height))}function f(){var a,b,c,d;if("inside"!==t.indexLabelPlacement)for(var e=0;e<R.length;e++)0==H[e].textBlock.text.length?
H[e].isDirty=!0:(a=R[e],c="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,b=t.reversed?"undefined"!==typeof a.x5?c>xa?g(c).x2+1:(a.x2+a.x3)/2+1:(a.x2+a.x3)/2+1:"undefined"!==typeof a.x5?c<xa?g(c).x2+1:(a.x4+a.x3)/2+1:(a.x2+a.x3)/2+1,H[e].textBlock.x=b+W,H[e].textBlock.y=c-H[e].height/2,t.reversed?(H[e].textBlock.y+H[e].height>U+D&&(H[e].textBlock.y=U+D-H[e].height),H[e].textBlock.y<sa-D&&(H[e].textBlock.y=sa-D)):(H[e].textBlock.y<U-D&&(H[e].textBlock.y=U-D),H[e].textBlock.y+H[e].height>sa+D&&
(H[e].textBlock.y=sa+D-H[e].height)));else for(e=0;e<R.length;e++)0==H[e].textBlock.text.length?H[e].isDirty=!0:(a=R[e],b=a.height,c=H[e].height,d=H[e].width,b>=c?(b=e!=da?(a.x4+a.x3)/2-d/2:(a.x5+a.x4)/2-d/2,c=e!=da?(a.y1+a.y3)/2-c/2:(a.y1+a.y4)/2-c/2,H[e].textBlock.x=b,H[e].textBlock.y=c):H[e].isDirty=!0)}function l(){function a(b,c){var d;if(0>b||b>=H.length)return 0;var e,f=H[b].textBlock;if(0>c){c*=-1;e=n(b);d=k(e,b);if(d>=c)return f.y-=c,c;if(0==b)return 0<d&&(f.y-=d),d;d+=a(e,-(c-d));0<d&&(f.y-=
d);return d}e=q(b);d=k(b,e);if(d>=c)return f.y+=c,c;if(b==R.length-1)return 0<d&&(f.y+=d),d;d+=a(e,c-d);0<d&&(f.y+=d);return d}function b(){var a,d,e,f,g=0,h;f=(T-$+2*D)/m;h=m;for(var l,k=1;k<h;k++){e=k*f;for(var p=H.length-1;0<=p;p--)!H[p].isDirty&&(H[p].textBlock.y<e&&H[p].textBlock.y+H[p].height>e)&&(l=q(p),!(l>=H.length-1)&&H[p].textBlock.y+H[p].height+ea>H[l].textBlock.y&&(H[p].textBlock.y=H[p].textBlock.y+H[p].height-e>e-H[p].textBlock.y?e+1:e-H[p].height-1))}for(l=R.length-1;0<l;l--)if(!H[l].isDirty){e=
n(l);if(0>e&&(e=0,H[e].isDirty))break;if(H[l].textBlock.y<H[e].textBlock.y+H[e].height){d=d||l;f=l;for(h=0;H[f].textBlock.y<H[e].textBlock.y+H[e].height+ea;){a=a||H[f].textBlock.y+H[f].height;h+=H[f].height;h+=ea;f=e;if(0>=f){f=0;h+=H[f].height;break}e=n(f);if(0>e){f=0;h+=H[f].height;break}}if(f!=l){g=H[f].textBlock.y;a-=g;a=h-a;g=c(a,d,f);break}}}return g}function c(a,b,d){var e=[],f=0,g=0;for(a=Math.abs(a);d<=b;d++)e.push(R[d]);e.sort(function(a,b){return a.height-b.height});for(d=0;d<e.length;d++)if(b=
e[d],f<a)g++,f+=H[b.id].height+ea,H[b.id].textBlock.text="",H[b.id].indexLabelText="",H[b.id].isDirty=!0,H[b.id].textBlock.measureText();else break;return g}for(var d,e,f,g,h,l,m=1,p=0;p<2*m;p++){for(var t=H.length-1;0<=t&&!(0<=n(t)&&n(t),f=H[t],g=f.textBlock,l=(h=q(t)<R.length?H[q(t)]:null)?h.textBlock:null,d=+f.height.toFixed(6),e=+g.y.toFixed(6),!f.isDirty&&(h&&e+d+ea>+l.y.toFixed(6))&&(d=g.y+d+ea-l.y,e=a(t,-d),e<d&&(0<e&&(d-=e),e=a(q(t),d),e!=d)));t--);b()}}function k(a,b){return(b<R.length?H[b].textBlock.y:
t.reversed?U+D:sa+D)-(0>a?t.reversed?sa-D:U-D:H[a].textBlock.y+H[a].height+ea)}function m(a,b,c){var d,e,g,l=[],k=D,n=[];-1!==b&&(0<=Z.indexOf(b)?(e=Z.indexOf(b),Z.splice(e,1)):(Z.push(b),Z=Z.sort(function(a,b){return a-b})));if(0===Z.length)l=ja;else{e=D*(1!=Z.length||0!=Z[0]&&Z[0]!=R.length-1?2:1)/h();for(var q=0;q<R.length;q++){if(1==Z.length&&0==Z[0]){if(0===q){l.push(ja[q]);d=k;continue}}else 0===q&&(d=-1*k);l.push(ja[q]+d);if(0<=Z.indexOf(q)||q<R.length&&0<=Z.indexOf(q+1))d+=e}}g=function(){for(var a=
[],b=0;b<R.length;b++)a.push(l[b]-R[b].y1);return a}();var u={startTime:(new Date).getTime(),duration:c||500,easingFunction:function(a,b,c,d){return L.easing.easeOutQuart(a,b,c,d)},changeSection:function(a){for(var b,c,d=0;d<R.length;d++)b=g[d],c=R[d],b*=a,"undefined"===typeof n[d]&&(n[d]=0),0>n&&(n*=-1),c.y1+=b-n[d],c.y2+=b-n[d],c.y3+=b-n[d],c.y4+=b-n[d],c.y5&&(c.y5+=b-n[d],c.y6+=b-n[d]),n[d]=b}};a._animator.animate(0,c,function(c){var d=a.plotArea.ctx||a.ctx;ka=!0;d.clearRect(A.x1,A.y1,A.x2-A.x1,
A.y2-A.y1);d.fillStyle=a.backgroundColor;d.fillRect(A.x1,A.y1,A.width,A.height);u.changeSection(c,b);var e={};e.dataSeries=t;e.dataPoint=t.reversed?t.dataPoints[x.length-1-b]:t.dataPoints[b];e.index=t.reversed?x.length-1-b:b;a.toolTip.highlightObjects([e]);for(e=0;e<R.length;e++)qa(d,R[e],t.fillOpacity);v(d);K&&("inside"!==t.indexLabelPlacement?p(d):f(),B(d));1<=c&&(ka=!1)},null,L.easing.easeOutQuart)}function h(){for(var a=0,b=0;b<R.length-1;b++)(0<=Z.indexOf(b)||0<=Z.indexOf(b+1))&&a++;return a}
function p(a){for(var b,c,d,e,f=0;f<R.length;f++)e=1===H[f].lineThickness%2?0.5:0,c=((R[f].y2+R[f].y4)/2<<0)+e,b=g(c).x2-1,d=H[f].textBlock.x,e=(H[f].textBlock.y+H[f].height/2<<0)+e,H[f].isDirty||0==H[f].lineThickness||(a.strokeStyle=H[f].lineColor,a.lineWidth=H[f].lineThickness,a.setLineDash&&a.setLineDash(Q(H[f].lineDashType,H[f].lineThickness)),a.beginPath(),a.moveTo(b,c),a.lineTo(d,e),a.stroke())}function n(a){for(a-=1;-1<=a&&-1!=a&&H[a].isDirty;a--);return a}function q(a){for(a+=1;a<=R.length&&
a!=R.length&&H[a].isDirty;a++);return a}function g(a){for(var b,c=0;c<x.length;c++)if(R[c].y1<a&&R[c].y4>a){b=R[c];break}return b?(a=b.y6?a>b.y6?b.x3+(b.x4-b.x3)/(b.y4-b.y3)*(a-b.y3):b.x2+(b.x3-b.x2)/(b.y3-b.y2)*(a-b.y2):b.x2+(b.x3-b.x2)/(b.y3-b.y2)*(a-b.y2),{x1:a,x2:a}):-1}function B(a){for(var b=0;b<R.length;b++)H[b].isDirty||(a&&(H[b].textBlock.ctx=a),H[b].textBlock.render(!0))}function v(a){w.plotArea.layoutManager.reset();a.roundRect||Ba(a);w.title&&(w.title.dockInsidePlotArea||"center"===w.title.horizontalAlign&&
"center"===w.title.verticalAlign)&&(w.title.ctx=a,w.title.render());if(w.subtitles)for(var b=0;b<w.subtitles.length;b++){var c=w.subtitles[b];if(c.dockInsidePlotArea||"center"===c.horizontalAlign&&"center"===c.verticalAlign)w.subtitles.ctx=a,c.render()}w.legend&&(w.legend.dockInsidePlotArea||"center"===w.legend.horizontalAlign&&"center"===w.legend.verticalAlign)&&(w.legend.ctx=a,w.legend.setLayout(),w.legend.render());I.fNg&&I.fNg(w)}var w=this;if(!(0>=a.dataSeriesIndexes.length)){for(var t=this.data[a.dataSeriesIndexes[0]],
x=t.dataPoints,A=this.plotArea,D=0.025*A.width,C=0.01*A.width,y=0,E=A.height-2*D,G=Math.min(A.width-2*C,2.8*A.height),K=!1,P=0;P<x.length;P++)if(!K&&("undefined"!==typeof x[P].indexLabel&&null!==x[P].indexLabel&&0<x[P].indexLabel.toString().length)&&(K=!0),!K&&("undefined"!==typeof x[P].label&&null!==x[P].label&&0<x[P].label.toString().length)&&(K=!0),!K&&"function"===typeof t.indexLabelFormatter||"function"===typeof x[P].indexLabelFormatter)K=!0;K=K||"undefined"!==typeof t.indexLabel&&null!==t.indexLabel&&
0<t.indexLabel.toString().length;"inside"!==t.indexLabelPlacement&&K||(C=(A.width-0.75*G)/2);var P=A.x1+C,N=A.x2-C,$=A.y1+D,T=A.y2-D,S=a.targetCanvasCtx||this.plotArea.ctx||this.ctx;if(0!=t.length&&(t.dataPoints&&t.visible)&&0!==x.length){var ca,F;a=75*G/100;var W=30*(N-a)/100;"funnel"===t.type?(ca=r(t.options.neckHeight)?0.35*E:t.neckHeight,F=r(t.options.neckWidth)?0.25*a:t.neckWidth,"string"===typeof ca&&ca.match(/%$/)?(ca=parseInt(ca),ca=ca*E/100):ca=parseInt(ca),"string"===typeof F&&F.match(/%$/)?
(F=parseInt(F),F=F*a/100):F=parseInt(F),ca>E?ca=E:0>=ca&&(ca=0),F>a?F=a-0.5:0>=F&&(F=0)):"pyramid"===t.type&&(F=ca=0,t.reversed=t.reversed?!1:!0);var C=P+a/2,X=P,aa=P+a,U=t.reversed?T:$,M=C-F/2,Y=C+F/2,xa=t.reversed?$+ca:T-ca,sa=t.reversed?$:T;a=[];var C=[],R=[],G=[],V=$,da,ba=(xa-U)/(M-X),fa=-ba,P="area"===(t.valueRepresents?t.valueRepresents:"height")?c():d();if(-1!==P){if(t.reversed)for(G.push(V),F=P.length-1;0<F;F--)V+=P[F],G.push(V);else for(F=0;F<P.length;F++)V+=P[F],G.push(V);if(t.reversed)for(F=
0;F<P.length;F++)G[F]<xa?(a.push(M),C.push(Y),da=F):(a.push((G[F]-U+ba*X)/ba),C.push((G[F]-U+fa*aa)/fa));else for(F=0;F<P.length;F++)G[F]<xa?(a.push((G[F]-U+ba*X)/ba),C.push((G[F]-U+fa*aa)/fa),da=F):(a.push(M),C.push(Y));for(F=0;F<P.length-1;F++)V=t.reversed?x[x.length-1-F].color?x[x.length-1-F].color:t._colorSet[(x.length-1-F)%t._colorSet.length]:x[F].color?x[F].color:t._colorSet[F%t._colorSet.length],F===da?R.push({x1:a[F],y1:G[F],x2:C[F],y2:G[F],x3:Y,y3:xa,x4:C[F+1],y4:G[F+1],x5:a[F+1],y5:G[F+
1],x6:M,y6:xa,id:F,height:G[F+1]-G[F],color:V}):R.push({x1:a[F],y1:G[F],x2:C[F],y2:G[F],x3:C[F+1],y3:G[F+1],x4:a[F+1],y4:G[F+1],id:F,height:G[F+1]-G[F],color:V});var ea=2,H=[],ka=!1,Z=[],ja=[],P=!1;a=a=0;Ca(Z);for(F=0;F<x.length;F++)x[F].exploded&&(P=!0,t.reversed?Z.push(x.length-1-F):Z.push(F));S.clearRect(A.x1,A.y1,A.width,A.height);S.fillStyle=w.backgroundColor;S.fillRect(A.x1,A.y1,A.width,A.height);if(K&&t.visible&&(b(),f(),e(),"inside"!==t.indexLabelPlacement)){l();for(F=0;F<x.length;F++)H[F].isDirty||
(a=H[F].textBlock.x+H[F].width,a=(N-a)/2,0==F&&(y=a),y>a&&(y=a));for(F=0;F<R.length;F++)R[F].x1+=y,R[F].x2+=y,R[F].x3+=y,R[F].x4+=y,R[F].x5&&(R[F].x5+=y,R[F].x6+=y),H[F].textBlock.x+=y}for(F=0;F<R.length;F++)y=R[F],qa(S,y,t.fillOpacity),ja.push(y.y1);v(S);K&&t.visible&&("inside"===t.indexLabelPlacement||w.animationEnabled||p(S),w.animationEnabled||B());if(!K)for(F=0;F<x.length;F++)y=t.dataPointIds[F],a={id:y,objectType:"dataPoint",dataPointIndex:F,dataSeriesIndex:0,funnelSection:R[t.reversed?x.length-
1-F:F]},w._eventManager.objectMap[y]=a;!w.animationEnabled&&P?m(w,-1,0):w.animationEnabled&&!w.animatedRender&&m(w,-1,0);this.funnelPyramidClickHandler=function(a){var b=-1;if(!ka&&!w.isAnimating&&(r(a.dataSeries.explodeOnClick)||a.dataSeries.explodeOnClick)&&(b=t.reversed?x.length-1-a.dataPointIndex:a.dataPointIndex,0<=b)){a=b;if("funnel"===t.type||"pyramid"===t.type)t.reversed?x[x.length-1-a].exploded=x[x.length-1-a].exploded?!1:!0:x[a].exploded=x[a].exploded?!1:!0;m(w,b,500)}};return{source:S,
dest:this.plotArea.ctx,animationCallback:function(a,b){L.fadeInAnimation(a,b);1<=a&&(m(w,-1,500),v(w.plotArea.ctx||w.ctx))},easingFunction:L.easing.easeInQuad,animationBase:0}}}}};m.prototype.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)}}();m.prototype.cancelRequestAnimFrame=window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||
window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||clearTimeout;m.prototype.set=function(a,d,c){c="undefined"===typeof c?!0:c;"options"===a?(this.options=d,c&&this.render()):m.base.set.call(this,a,d,c)};m.prototype.exportChart=function(a){a="undefined"===typeof a?{}:a;var d=a.format?a.format:"png",c=a.fileName?a.fileName:this.exportFileName;if(a.toDataURL)return this.canvas.toDataURL("image/"+d);var b=this.canvas;if(b&&d&&c){c=c+"."+d;
a="image/"+d;var b=b.toDataURL(a),e=!1,f=document.createElement("a");f.download=c;f.href=b;if("undefined"!==typeof Blob&&new Blob){for(var l=b.replace(/^data:[a-z\/]*;base64,/,""),l=atob(l),k=new ArrayBuffer(l.length),k=new Uint8Array(k),m=0;m<l.length;m++)k[m]=l.charCodeAt(m);d=new Blob([k.buffer],{type:"image/"+d});try{window.navigator.msSaveBlob(d,c),e=!0}catch(h){f.dataset.downloadurl=[a,f.download,f.href].join(":"),f.href=window.URL.createObjectURL(d)}}if(!e)try{event=document.createEvent("MouseEvents"),
event.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),f.dispatchEvent?f.dispatchEvent(event):f.fireEvent&&f.fireEvent("onclick")}catch(p){d=window.open(),d.document.write("<img src='"+b+"'></img><div>Please right click on the image and save it to your device</div>"),d.document.close()}}};m.prototype.print=function(){var a=this.exportChart({toDataURL:!0}),d=document.createElement("iframe");d.setAttribute("class","canvasjs-chart-print-frame");d.setAttribute("style","position:absolute; width:100%; border: 0px; margin: 0px 0px 0px 0px; padding 0px 0px 0px 0px;");
d.style.height=this.height+"px";this._canvasJSContainer.appendChild(d);var c=this,b=d.contentWindow||d.contentDocument.document||d.contentDocument;b.document.open();b.document.write('<!DOCTYPE HTML>\n<html><body style="margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;"><img src="'+a+'"/><body/></html>');b.document.close();setTimeout(function(){b.focus();b.print();setTimeout(function(){c._canvasJSContainer.removeChild(d)},1E3)},500)};m.prototype.getPercentAndTotal=function(a,d){var c=null,b=null,
e=null;if(0<=a.type.indexOf("stacked"))b=0,c=d.x.getTime?d.x.getTime():d.x,c in a.plotUnit.yTotals&&(b=a.plotUnit.yTotals[c],e=isNaN(d.y)?0:100*(d.y/b));else if("pie"===a.type||"doughnut"===a.type||"funnel"===a.type||"pyramid"===a.type){for(c=b=0;c<a.dataPoints.length;c++)isNaN(a.dataPoints[c].y)||(b+=a.dataPoints[c].y);e=isNaN(d.y)?0:100*(d.y/b)}return{percent:e,total:b}};m.prototype.replaceKeywordsWithValue=function(a,d,c,b,e){var f=this;e="undefined"===typeof e?0:e;if((0<=c.type.indexOf("stacked")||
"pie"===c.type||"doughnut"===c.type||"funnel"===c.type||"pyramid"===c.type)&&(0<=a.indexOf("#percent")||0<=a.indexOf("#total"))){var l="#percent",k="#total",m=this.getPercentAndTotal(c,d),k=isNaN(m.total)?k:m.total,l=isNaN(m.percent)?l:m.percent;do{m="";if(c.percentFormatString)m=c.percentFormatString;else{var m="#,##0.",h=Math.max(Math.ceil(Math.log(1/Math.abs(l))/Math.LN10),2);if(isNaN(h)||!isFinite(h))h=2;for(var p=0;p<h;p++)m+="#";c.percentFormatString=m}a=a.replace("#percent",fa(l,m,f._cultureInfo));
a=a.replace("#total",fa(k,c.yValueFormatString?c.yValueFormatString:"#,##0.########",f._cultureInfo))}while(0<=a.indexOf("#percent")||0<=a.indexOf("#total"))}return a.replace(/\{.*?\}|"[^"]*"|'[^']*'/g,function(a){if('"'===a[0]&&'"'===a[a.length-1]||"'"===a[0]&&"'"===a[a.length-1])return a.slice(1,a.length-1);a=Fa(a.slice(1,a.length-1));a=a.replace("#index",e);var h=null;try{var g=a.match(/(.*?)\s*\[\s*(.*?)\s*\]/);g&&0<g.length&&(h=Fa(g[2]),a=Fa(g[1]))}catch(l){}g=null;if("color"===a)return"waterfall"===
c.type?d.color?d.color:0<d.y?c.risingColor:c.fallingColor:"error"===c.type?c.color?c.color:c._colorSet[h%c._colorSet.length]:d.color?d.color:c.color?c.color:c._colorSet[b%c._colorSet.length];if(d.hasOwnProperty(a))g=d;else if(c.hasOwnProperty(a))g=c;else return"";g=g[a];null!==h&&(g=g[h]);if("x"===a)if("dateTime"===c.axisX.valueType||"dateTime"===c.xValueType||d.x&&d.x.getTime){if(f.plotInfo.plotTypes[0].plotUnits[0].axisX&&!f.plotInfo.plotTypes[0].plotUnits[0].axisX.logarithmic)return Aa(g,d.xValueFormatString?
d.xValueFormatString:c.xValueFormatString?c.xValueFormatString:c.xValueFormatString=f.axisX&&f.axisX.autoValueFormatString?f.axisX.autoValueFormatString:"DD MMM YY",f._cultureInfo)}else return fa(g,d.xValueFormatString?d.xValueFormatString:c.xValueFormatString?c.xValueFormatString:c.xValueFormatString="#,##0.########",f._cultureInfo);else return"y"===a?fa(g,d.yValueFormatString?d.yValueFormatString:c.yValueFormatString?c.yValueFormatString:c.yValueFormatString="#,##0.########",f._cultureInfo):"z"===
a?fa(g,d.zValueFormatString?d.zValueFormatString:c.zValueFormatString?c.zValueFormatString:c.zValueFormatString="#,##0.########",f._cultureInfo):g})};oa(E,X);E.prototype.setLayout=function(){var a=this.dockInsidePlotArea?this.chart.plotArea:this.chart,d=a.layoutManager.getFreeSpace(),c=null,b=0,e=0,f=0,l=0,k=this.markerMargin=this.chart.options.legend&&!r(this.chart.options.legend.markerMargin)?this.chart.options.legend.markerMargin:0.3*this.fontSize;this.height=0;var m=[],h=[];"top"===this.verticalAlign||
"bottom"===this.verticalAlign?(this.orientation="horizontal",c=this.verticalAlign,f=this.maxWidth=null!==this.maxWidth?this.maxWidth:d.width,l=this.maxHeight=null!==this.maxHeight?this.maxHeight:0.5*d.height):"center"===this.verticalAlign&&(this.orientation="vertical",c=this.horizontalAlign,f=this.maxWidth=null!==this.maxWidth?this.maxWidth:0.5*d.width,l=this.maxHeight=null!==this.maxHeight?this.maxHeight:d.height);this.errorMarkerColor=[];for(var p=0;p<this.dataSeries.length;p++){var n=this.dataSeries[p];
if(n.dataPoints&&n.dataPoints.length)if("pie"!==n.type&&"doughnut"!==n.type&&"funnel"!==n.type&&"pyramid"!==n.type){var q=n.legendMarkerType=n.legendMarkerType?n.legendMarkerType:"line"!==n.type&&"stepLine"!==n.type&&"spline"!==n.type&&"scatter"!==n.type&&"bubble"!==n.type||!n.markerType?"error"===n.type&&n._linkedSeries?n._linkedSeries.legendMarkerType?n._linkedSeries.legendMarkerType:G.getDefaultLegendMarker(n._linkedSeries.type):G.getDefaultLegendMarker(n.type):n.markerType,g=n.legendText?n.legendText:
this.itemTextFormatter?this.itemTextFormatter({chart:this.chart,legend:this.options,dataSeries:n,dataPoint:null}):n.name,B=n.legendMarkerColor=n.legendMarkerColor?n.legendMarkerColor:n.markerColor?n.markerColor:"error"===n.type?r(n.whiskerColor)?n._colorSet[0]:n.whiskerColor:n._colorSet[0],s=n.markerSize||"line"!==n.type&&"stepLine"!==n.type&&"spline"!==n.type?0.75*this.lineHeight:0,v=n.legendMarkerBorderColor?n.legendMarkerBorderColor:n.markerBorderColor,t=n.legendMarkerBorderThickness?n.legendMarkerBorderThickness:
n.markerBorderThickness?Math.max(1,Math.round(0.2*s)):0;"error"===n.type&&this.errorMarkerColor.push(B);g=this.chart.replaceKeywordsWithValue(g,n.dataPoints[0],n,p);q={markerType:q,markerColor:B,text:g,textBlock:null,chartType:n.type,markerSize:s,lineColor:n._colorSet[0],dataSeriesIndex:n.index,dataPointIndex:null,markerBorderColor:v,markerBorderThickness:t};m.push(q)}else for(var x=0;x<n.dataPoints.length;x++){var A=n.dataPoints[x],q=A.legendMarkerType?A.legendMarkerType:n.legendMarkerType?n.legendMarkerType:
G.getDefaultLegendMarker(n.type),g=A.legendText?A.legendText:n.legendText?n.legendText:this.itemTextFormatter?this.itemTextFormatter({chart:this.chart,legend:this.options,dataSeries:n,dataPoint:A}):A.name?A.name:"DataPoint: "+(x+1),B=A.legendMarkerColor?A.legendMarkerColor:n.legendMarkerColor?n.legendMarkerColor:A.color?A.color:n.color?n.color:n._colorSet[x%n._colorSet.length],s=0.75*this.lineHeight,v=A.legendMarkerBorderColor?A.legendMarkerBorderColor:n.legendMarkerBorderColor?n.legendMarkerBorderColor:
A.markerBorderColor?A.markerBorderColor:n.markerBorderColor,t=A.legendMarkerBorderThickness?A.legendMarkerBorderThickness:n.legendMarkerBorderThickness?n.legendMarkerBorderThickness:A.markerBorderThickness||n.markerBorderThickness?Math.max(1,Math.round(0.2*s)):0,g=this.chart.replaceKeywordsWithValue(g,A,n,x),q={markerType:q,markerColor:B,text:g,textBlock:null,chartType:n.type,markerSize:s,dataSeriesIndex:p,dataPointIndex:x,markerBorderColor:v,markerBorderThickness:t};(A.showInLegend||n.showInLegend&&
!1!==A.showInLegend)&&m.push(q)}}!0===this.reversed&&m.reverse();if(0<m.length){n=null;B=g=A=x=0;A=null!==this.itemWidth?null!==this.itemMaxWidth?Math.min(this.itemWidth,this.itemMaxWidth,f):this.itemMaxWidth=Math.min(this.itemWidth,f):null!==this.itemMaxWidth?Math.min(this.itemMaxWidth,f):this.itemMaxWidth=f;s=0===s?0.75*this.lineHeight:s;A-=s+k;for(p=0;p<m.length;p++){q=m[p];v=A;if("line"===q.chartType||"spline"===q.chartType||"stepLine"===q.chartType)v-=2*0.1*this.lineHeight;if(!(0>=l||"undefined"===
typeof l||0>=v||"undefined"===typeof v)){if("horizontal"===this.orientation){q.textBlock=new la(this.ctx,{x:0,y:0,maxWidth:v,maxHeight:this.itemWrap?l:this.lineHeight,angle:0,text:q.text,horizontalAlign:"left",fontSize:this.fontSize,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontColor:this.fontColor,fontStyle:this.fontStyle,textBaseline:"middle"});q.textBlock.measureText();null!==this.itemWidth&&(q.textBlock.width=this.itemWidth-(s+k+("line"===q.chartType||"spline"===q.chartType||"stepLine"===
q.chartType?2*0.1*this.lineHeight:0)));if(!n||n.width+Math.round(q.textBlock.width+s+k+(0===n.width?0:this.horizontalSpacing)+("line"===q.chartType||"spline"===q.chartType||"stepLine"===q.chartType?2*0.1*this.lineHeight:0))>f)n={items:[],width:0},h.push(n),this.height+=g,g=0;g=Math.max(g,q.textBlock.height)}else q.textBlock=new la(this.ctx,{x:0,y:0,maxWidth:A,maxHeight:!0===this.itemWrap?l:1.5*this.fontSize,angle:0,text:q.text,horizontalAlign:"left",fontSize:this.fontSize,fontFamily:this.fontFamily,
fontWeight:this.fontWeight,fontColor:this.fontColor,fontStyle:this.fontStyle,textBaseline:"middle"}),q.textBlock.measureText(),null!==this.itemWidth&&(q.textBlock.width=this.itemWidth-(s+k+("line"===q.chartType||"spline"===q.chartType||"stepLine"===q.chartType?2*0.1*this.lineHeight:0))),this.height<l-this.lineHeight?(n={items:[],width:0},h.push(n)):(n=h[x],x=(x+1)%h.length),this.height+=q.textBlock.height;q.textBlock.x=n.width;q.textBlock.y=0;n.width+=Math.round(q.textBlock.width+s+k+(0===n.width?
0:this.horizontalSpacing)+("line"===q.chartType||"spline"===q.chartType||"stepLine"===q.chartType?2*0.1*this.lineHeight:0));n.items.push(q);this.width=Math.max(n.width,this.width);B=q.textBlock.width+(s+k+("line"===q.chartType||"spline"===q.chartType||"stepLine"===q.chartType?2*0.1*this.lineHeight:0))}}this.itemWidth=B;this.height=!1===this.itemWrap?h.length*this.lineHeight:this.height+g;this.height=Math.min(l,this.height);this.width=Math.min(f,this.width)}"top"===this.verticalAlign?(e="left"===this.horizontalAlign?
d.x1:"right"===this.horizontalAlign?d.x2-this.width:d.x1+d.width/2-this.width/2,b=d.y1):"center"===this.verticalAlign?(e="left"===this.horizontalAlign?d.x1:"right"===this.horizontalAlign?d.x2-this.width:d.x1+d.width/2-this.width/2,b=d.y1+d.height/2-this.height/2):"bottom"===this.verticalAlign&&(e="left"===this.horizontalAlign?d.x1:"right"===this.horizontalAlign?d.x2-this.width:d.x1+d.width/2-this.width/2,b=d.y2-this.height);this.items=m;for(p=0;p<this.items.length;p++)q=m[p],q.id=++this.chart._eventManager.lastObjectId,
this.chart._eventManager.objectMap[q.id]={id:q.id,objectType:"legendItem",legendItemIndex:p,dataSeriesIndex:q.dataSeriesIndex,dataPointIndex:q.dataPointIndex};this.markerSize=s;this.rows=h;0<m.length&&a.layoutManager.registerSpace(c,{width:this.width+2+2,height:this.height+5+5});this.bounds={x1:e,y1:b,x2:e+this.width,y2:b+this.height}};E.prototype.render=function(){var a=this.bounds.x1,d=this.bounds.y1,c=this.markerMargin,b=this.maxWidth,e=this.maxHeight,f=this.markerSize,l=this.rows;(0<this.borderThickness&&
this.borderColor||this.backgroundColor)&&this.ctx.roundRect(a,d,this.width,this.height,this.cornerRadius,this.borderThickness,this.backgroundColor,this.borderColor);for(var k=0,m=0;m<l.length;m++){for(var h=l[m],p=0,n=0;n<h.items.length;n++){var q=h.items[n],g=q.textBlock.x+a+(0===n?0.2*f:this.horizontalSpacing),r=d+k,s=g;this.chart.data[q.dataSeriesIndex].visible||(this.ctx.globalAlpha=0.5);this.ctx.save();this.ctx.beginPath();this.ctx.rect(a,d,b,Math.max(e-e%this.lineHeight,0));this.ctx.clip();
if("line"===q.chartType||"stepLine"===q.chartType||"spline"===q.chartType)this.ctx.strokeStyle=q.lineColor,this.ctx.lineWidth=Math.ceil(this.lineHeight/8),this.ctx.beginPath(),this.ctx.moveTo(g-0.1*this.lineHeight,r+this.lineHeight/2),this.ctx.lineTo(g+0.85*this.lineHeight,r+this.lineHeight/2),this.ctx.stroke(),s-=0.1*this.lineHeight;if("error"===q.chartType){this.ctx.strokeStyle=this.errorMarkerColor[0];this.ctx.lineWidth=f/8;this.ctx.beginPath();var v=g-0.08*this.lineHeight+0.1*this.lineHeight,
t=r+0.15*this.lineHeight,x=0.7*this.lineHeight,A=x+0.02*this.lineHeight;this.ctx.moveTo(v,t);this.ctx.lineTo(v+x,t);this.ctx.stroke();this.ctx.beginPath();this.ctx.moveTo(v+x/2,t);this.ctx.lineTo(v+x/2,t+A);this.ctx.stroke();this.ctx.beginPath();this.ctx.moveTo(v,t+A);this.ctx.lineTo(v+x,t+A);this.ctx.stroke();this.errorMarkerColor.shift()}Y.drawMarker(g+f/2,r+this.lineHeight/2,this.ctx,q.markerType,"error"===q.chartType||"line"===q.chartType||"spline"===q.chartType?q.markerSize/2:q.markerSize,q.markerColor,
q.markerBorderColor,q.markerBorderThickness);q.textBlock.x=g+c+f;if("line"===q.chartType||"stepLine"===q.chartType||"spline"===q.chartType)q.textBlock.x+=0.1*this.lineHeight;q.textBlock.y=Math.round(r+this.lineHeight/2);q.textBlock.render(!0);this.ctx.restore();p=0<n?Math.max(p,q.textBlock.height):q.textBlock.height;this.chart.data[q.dataSeriesIndex].visible||(this.ctx.globalAlpha=1);g=S(q.id);this.ghostCtx.fillStyle=g;this.ghostCtx.beginPath();this.ghostCtx.fillRect(s,q.textBlock.y-this.lineHeight/
2,q.textBlock.x+q.textBlock.width-s,q.textBlock.height);q.x1=this.chart._eventManager.objectMap[q.id].x1=s;q.y1=this.chart._eventManager.objectMap[q.id].y1=q.textBlock.y-this.lineHeight/2;q.x2=this.chart._eventManager.objectMap[q.id].x2=q.textBlock.x+q.textBlock.width;q.y2=this.chart._eventManager.objectMap[q.id].y2=q.textBlock.y+q.textBlock.height-this.lineHeight/2}k+=p}};oa(G,X);G.prototype.getDefaultAxisPlacement=function(){var a=this.type;if("column"===a||"line"===a||"stepLine"===a||"spline"===
a||"area"===a||"stepArea"===a||"splineArea"===a||"stackedColumn"===a||"stackedLine"===a||"bubble"===a||"scatter"===a||"stackedArea"===a||"stackedColumn100"===a||"stackedLine100"===a||"stackedArea100"===a||"candlestick"===a||"ohlc"===a||"rangeColumn"===a||"rangeArea"===a||"rangeSplineArea"===a||"boxAndWhisker"===a||"waterfall"===a)return"normal";if("bar"===a||"stackedBar"===a||"stackedBar100"===a||"rangeBar"===a)return"xySwapped";if("pie"===a||"doughnut"===a||"funnel"===a||"pyramid"===a)return"none";
"error"!==a&&window.console.log("Unknown Chart Type: "+a);return null};G.getDefaultLegendMarker=function(a){if("column"===a||"stackedColumn"===a||"stackedLine"===a||"bar"===a||"stackedBar"===a||"stackedBar100"===a||"bubble"===a||"scatter"===a||"stackedColumn100"===a||"stackedLine100"===a||"stepArea"===a||"candlestick"===a||"ohlc"===a||"rangeColumn"===a||"rangeBar"===a||"rangeArea"===a||"rangeSplineArea"===a||"boxAndWhisker"===a||"waterfall"===a)return"square";if("line"===a||"stepLine"===a||"spline"===
a||"pie"===a||"doughnut"===a)return"circle";if("area"===a||"splineArea"===a||"stackedArea"===a||"stackedArea100"===a||"funnel"===a||"pyramid"===a)return"triangle";if("error"===a)return"none";window.console.log("Unknown Chart Type: "+a);return null};G.prototype.getDataPointAtX=function(a,d){if(!this.dataPoints||0===this.dataPoints.length)return null;var c={dataPoint:null,distance:Infinity,index:NaN},b=null,e=0,f=0,l=1,k=Infinity,m=0,h=0,p=0;"none"!==this.chart.plotInfo.axisPlacement&&(this.axisX.logarithmic?
(p=Math.log(this.dataPoints[this.dataPoints.length-1].x/this.dataPoints[0].x),p=1<p?Math.min(Math.max((this.dataPoints.length-1)/p*Math.log(a/this.dataPoints[0].x)>>0,0),this.dataPoints.length):0):(p=this.dataPoints[this.dataPoints.length-1].x-this.dataPoints[0].x,p=0<p?Math.min(Math.max((this.dataPoints.length-1)/p*(a-this.dataPoints[0].x)>>0,0),this.dataPoints.length):0));for(;;){f=0<l?p+e:p-e;if(0<=f&&f<this.dataPoints.length){var b=this.dataPoints[f],n=this.axisX.logarithmic?b.x>a?b.x/a:a/b.x:
Math.abs(b.x-a);n<c.distance&&(c.dataPoint=b,c.distance=n,c.index=f);b=n;b<=k?k=b:0<l?m++:h++;if(1E3<m&&1E3<h)break}else if(0>p-e&&p+e>=this.dataPoints.length)break;-1===l?(e++,l=1):l=-1}return d||(c.dataPoint.x.getTime?c.dataPoint.x.getTime():c.dataPoint.x)!==(a.getTime?a.getTime():a)?d&&null!==c.dataPoint?c:null:c};G.prototype.getDataPointAtXY=function(a,d,c){if(!this.dataPoints||0===this.dataPoints.length||a<this.chart.plotArea.x1||a>this.chart.plotArea.x2||d<this.chart.plotArea.y1||d>this.chart.plotArea.y2)return null;
c=c||!1;var b=[],e=0,f=0,l=1,k=!1,m=Infinity,h=0,p=0,n=0;if("none"!==this.chart.plotInfo.axisPlacement)if(n=(this.chart.axisX[0]?this.chart.axisX[0]:this.chart.axisX2[0]).getXValueAt({x:a,y:d}),this.axisX.logarithmic)var q=Math.log(this.dataPoints[this.dataPoints.length-1].x/this.dataPoints[0].x),n=1<q?Math.min(Math.max((this.dataPoints.length-1)/q*Math.log(n/this.dataPoints[0].x)>>0,0),this.dataPoints.length):0;else q=this.dataPoints[this.dataPoints.length-1].x-this.dataPoints[0].x,n=0<q?Math.min(Math.max((this.dataPoints.length-
1)/q*(n-this.dataPoints[0].x)>>0,0),this.dataPoints.length):0;for(;;){f=0<l?n+e:n-e;if(0<=f&&f<this.dataPoints.length){var q=this.chart._eventManager.objectMap[this.dataPointIds[f]],g=this.dataPoints[f],r=null;if(q){switch(this.type){case "column":case "stackedColumn":case "stackedColumn100":case "bar":case "stackedBar":case "stackedBar100":case "rangeColumn":case "rangeBar":case "waterfall":case "error":a>=q.x1&&(a<=q.x2&&d>=q.y1&&d<=q.y2)&&(b.push({dataPoint:g,dataPointIndex:f,dataSeries:this,distance:Math.min(Math.abs(q.x1-
a),Math.abs(q.x2-a),Math.abs(q.y1-d),Math.abs(q.y2-d))}),k=!0);break;case "line":case "stepLine":case "spline":case "area":case "stepArea":case "stackedArea":case "stackedArea100":case "splineArea":case "scatter":var s=ma("markerSize",g,this)||4,v=c?20:s,r=Math.sqrt(Math.pow(q.x1-a,2)+Math.pow(q.y1-d,2));r<=v&&b.push({dataPoint:g,dataPointIndex:f,dataSeries:this,distance:r});q=Math.abs(q.x1-a);q<=m?m=q:0<l?h++:p++;r<=s/2&&(k=!0);break;case "rangeArea":case "rangeSplineArea":s=ma("markerSize",g,this)||
4;v=c?20:s;r=Math.min(Math.sqrt(Math.pow(q.x1-a,2)+Math.pow(q.y1-d,2)),Math.sqrt(Math.pow(q.x1-a,2)+Math.pow(q.y2-d,2)));r<=v&&b.push({dataPoint:g,dataPointIndex:f,dataSeries:this,distance:r});q=Math.abs(q.x1-a);q<=m?m=q:0<l?h++:p++;r<=s/2&&(k=!0);break;case "bubble":s=q.size;r=Math.sqrt(Math.pow(q.x1-a,2)+Math.pow(q.y1-d,2));r<=s/2&&(b.push({dataPoint:g,dataPointIndex:f,dataSeries:this,distance:r}),k=!0);break;case "pie":case "doughnut":s=q.center;v="doughnut"===this.type?q.percentInnerRadius*q.radius:
0;r=Math.sqrt(Math.pow(s.x-a,2)+Math.pow(s.y-d,2));r<q.radius&&r>v&&(r=Math.atan2(d-s.y,a-s.x),0>r&&(r+=2*Math.PI),r=Number(((180*(r/Math.PI)%360+360)%360).toFixed(12)),s=Number(((180*(q.startAngle/Math.PI)%360+360)%360).toFixed(12)),v=Number(((180*(q.endAngle/Math.PI)%360+360)%360).toFixed(12)),0===v&&1<q.endAngle&&(v=360),s>=v&&0!==g.y&&(v+=360,r<s&&(r+=360)),r>s&&r<v&&(b.push({dataPoint:g,dataPointIndex:f,dataSeries:this,distance:0}),k=!0));break;case "funnel":case "pyramid":r=q.funnelSection;
d>r.y1&&d<r.y4&&(r.y6?d>r.y6?(f=r.x6+(r.x5-r.x6)/(r.y5-r.y6)*(d-r.y6),r=r.x3+(r.x4-r.x3)/(r.y4-r.y3)*(d-r.y3)):(f=r.x1+(r.x6-r.x1)/(r.y6-r.y1)*(d-r.y1),r=r.x2+(r.x3-r.x2)/(r.y3-r.y2)*(d-r.y2)):(f=r.x1+(r.x4-r.x1)/(r.y4-r.y1)*(d-r.y1),r=r.x2+(r.x3-r.x2)/(r.y3-r.y2)*(d-r.y2)),a>f&&a<r&&(b.push({dataPoint:g,dataPointIndex:q.dataPointIndex,dataSeries:this,distance:0}),k=!0));break;case "boxAndWhisker":if(a>=q.x1-q.borderThickness/2&&a<=q.x2+q.borderThickness/2&&d>=q.y4-q.borderThickness/2&&d<=q.y1+q.borderThickness/
2||Math.abs(q.x2-a+q.x1-a)<q.borderThickness&&d>=q.y1&&d<=q.y4)b.push({dataPoint:g,dataPointIndex:f,dataSeries:this,distance:Math.min(Math.abs(q.x1-a),Math.abs(q.x2-a),Math.abs(q.y2-d),Math.abs(q.y3-d))}),k=!0;break;case "candlestick":if(a>=q.x1-q.borderThickness/2&&a<=q.x2+q.borderThickness/2&&d>=q.y2-q.borderThickness/2&&d<=q.y3+q.borderThickness/2||Math.abs(q.x2-a+q.x1-a)<q.borderThickness&&d>=q.y1&&d<=q.y4)b.push({dataPoint:g,dataPointIndex:f,dataSeries:this,distance:Math.min(Math.abs(q.x1-a),
Math.abs(q.x2-a),Math.abs(q.y2-d),Math.abs(q.y3-d))}),k=!0;break;case "ohlc":if(Math.abs(q.x2-a+q.x1-a)<q.borderThickness&&d>=q.y2&&d<=q.y3||a>=q.x1&&a<=(q.x2+q.x1)/2&&d>=q.y1-q.borderThickness/2&&d<=q.y1+q.borderThickness/2||a>=(q.x1+q.x2)/2&&a<=q.x2&&d>=q.y4-q.borderThickness/2&&d<=q.y4+q.borderThickness/2)b.push({dataPoint:g,dataPointIndex:f,dataSeries:this,distance:Math.min(Math.abs(q.x1-a),Math.abs(q.x2-a),Math.abs(q.y2-d),Math.abs(q.y3-d))}),k=!0}if(k||1E3<h&&1E3<p)break}}else if(0>n-e&&n+e>=
this.dataPoints.length)break;-1===l?(e++,l=1):l=-1}a=null;for(d=0;d<b.length;d++)a?b[d].distance<=a.distance&&(a=b[d]):a=b[d];return a};G.prototype.getMarkerProperties=function(a,d,c,b){var e=this.dataPoints;return{x:d,y:c,ctx:b,type:e[a].markerType?e[a].markerType:this.markerType,size:e[a].markerSize?e[a].markerSize:this.markerSize,color:e[a].markerColor?e[a].markerColor:this.markerColor?this.markerColor:e[a].color?e[a].color:this.color?this.color:this._colorSet[a%this._colorSet.length],borderColor:e[a].markerBorderColor?
e[a].markerBorderColor:this.markerBorderColor?this.markerBorderColor:null,borderThickness:e[a].markerBorderThickness?e[a].markerBorderThickness:this.markerBorderThickness?this.markerBorderThickness:null}};oa(D,X);D.prototype.createExtraLabelsForLog=function(a){a=(a||0)+1;if(!(5<a)){var d=this.logLabelValues[0]||this.intervalStartPosition;if(Math.log(this.range)/Math.log(d/this.viewportMinimum)<this.noTicks-1){for(var c=D.getNiceNumber((d-this.viewportMinimum)/Math.min(Math.max(2,this.noTicks-this.logLabelValues.length),
3),!0),b=Math.ceil(this.viewportMinimum/c)*c;b<d;b+=c)b<this.viewportMinimum||this.logLabelValues.push(b);this.logLabelValues.sort(Pa);this.createExtraLabelsForLog(a)}}};D.prototype.createLabels=function(){var a,d,c=0,b=0,e,f=0,l=0,b=0,b=this.interval,k=0,m,h=0.6*this.chart.height,p;a=!1;var n=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[],q=n.length?r(this.scaleBreaks.firstBreakIndex)?0:this.scaleBreaks.firstBreakIndex:0;if("axisX"!==this.type||"dateTime"!==this.valueType||this.logarithmic){e=
this.viewportMaximum;if(this.labels){a=Math.ceil(b);for(var b=Math.ceil(this.intervalStartPosition),g=!1,c=b;c<this.viewportMaximum;c+=a)if(this.labels[c])g=!0;else{g=!1;break}g&&(this.interval=a,this.intervalStartPosition=b)}if(this.logarithmic&&!this.equidistantInterval)for(this.logLabelValues||(this.logLabelValues=[],this.createExtraLabelsForLog()),b=0,g=q;b<this.logLabelValues.length;b++)if(c=this.logLabelValues[b],c<this.viewportMinimum)b++;else{for(;g<n.length&&c>n[g].endValue;g++);a=g<n.length&&
c>=n[g].startValue&&c<=n[g].endValue;p=c;a||(a=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.options,value:p,label:this.labels[p]?this.labels[p]:null}):"axisX"===this.type&&this.labels[p]?this.labels[p]:fa(p,this.valueFormatString,this.chart._cultureInfo),a=new la(this.ctx,{x:0,y:0,maxWidth:f,maxHeight:l,angle:this.labelAngle,text:this.prefix+a+this.suffix,backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,cornerRadius:this.labelCornerRadius,textAlign:this.labelTextAlign,
fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle",borderThickness:0}),this._labels.push({position:p,textBlock:a,effectiveHeight:null}))}g=q;for(c=this.intervalStartPosition;c<=e;c=parseFloat(1E-12>this.interval?this.logarithmic&&this.equidistantInterval?c*Math.pow(this.logarithmBase,this.interval):c+this.interval:(this.logarithmic&&this.equidistantInterval?c*Math.pow(this.logarithmBase,
this.interval):c+this.interval).toFixed(12))){for(;g<n.length&&c>n[g].endValue;g++);a=g<n.length&&c>=n[g].startValue&&c<=n[g].endValue;p=c;a||(a=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.options,value:p,label:this.labels[p]?this.labels[p]:null}):"axisX"===this.type&&this.labels[p]?this.labels[p]:fa(p,this.valueFormatString,this.chart._cultureInfo),a=new la(this.ctx,{x:0,y:0,maxWidth:f,maxHeight:l,angle:this.labelAngle,text:this.prefix+a+this.suffix,textAlign:this.labelTextAlign,
backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,borderThickness:this.labelBorderThickness,cornerRadius:this.labelCornerRadius,fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle"}),this._labels.push({position:p,textBlock:a,effectiveHeight:null}))}}else for(this.intervalStartPosition=this.getLabelStartPoint(new Date(this.viewportMinimum),this.intervalType,
this.interval),e=Va(new Date(this.viewportMaximum),this.interval,this.intervalType),g=q,c=this.intervalStartPosition;c<e;Va(c,b,this.intervalType)){for(a=c.getTime();g<n.length&&a>n[g].endValue;g++);p=a;a=g<n.length&&a>=n[g].startValue&&a<=n[g].endValue;a||(a=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.options,value:new Date(p),label:this.labels[p]?this.labels[p]:null}):"axisX"===this.type&&this.labels[p]?this.labels[p]:Aa(p,this.valueFormatString,this.chart._cultureInfo),
a=new la(this.ctx,{x:0,y:0,maxWidth:f,backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,borderThickness:this.labelBorderThickness,cornerRadius:this.labelCornerRadius,maxHeight:l,angle:this.labelAngle,text:this.prefix+a+this.suffix,textAlign:this.labelTextAlign,fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle"}),this._labels.push({position:p,textBlock:a,
effectiveHeight:null,breaksLabelType:void 0}))}if("bottom"===this._position||"top"===this._position)k=this.logarithmic&&!this.equidistantInterval&&2<=this._labels.length?this.lineCoordinates.width*Math.log(Math.min(this._labels[this._labels.length-1].position/this._labels[this._labels.length-2].position,this._labels[1].position/this._labels[0].position))/Math.log(this.range):this.lineCoordinates.width/(this.logarithmic&&this.equidistantInterval?Math.log(this.range)/Math.log(this.logarithmBase):Math.abs(this.range))*
T[this.intervalType+"Duration"]*this.interval,f="undefined"===typeof this.options.labelMaxWidth?0.5*this.chart.width>>0:this.options.labelMaxWidth,this.chart.panEnabled||(l="undefined"===typeof this.options.labelWrap||this.labelWrap?0.8*this.chart.height>>0:1.5*this.labelFontSize);else if("left"===this._position||"right"===this._position)k=this.logarithmic&&!this.equidistantInterval&&2<=this._labels.length?this.lineCoordinates.height*Math.log(Math.min(this._labels[this._labels.length-1].position/
this._labels[this._labels.length-2].position,this._labels[1].position/this._labels[0].position))/Math.log(this.range):this.lineCoordinates.height/(this.logarithmic&&this.equidistantInterval?Math.log(this.range)/Math.log(this.logarithmBase):Math.abs(this.range))*T[this.intervalType+"Duration"]*this.interval,this.chart.panEnabled||(f="undefined"===typeof this.options.labelMaxWidth?0.3*this.chart.width>>0:this.options.labelMaxWidth),l="undefined"===typeof this.options.labelWrap||this.labelWrap?0.3*this.chart.height>>
0:1.5*this.labelFontSize;for(b=0;b<this._labels.length;b++){a=this._labels[b].textBlock;a.maxWidth=f;a.maxHeight=l;var B=a.measureText();m=B.height}e=[];q=n=0;if(this.labelAutoFit||this.options.labelAutoFit)if(r(this.labelAngle)||(this.labelAngle=(this.labelAngle%360+360)%360,90<this.labelAngle&&270>this.labelAngle?this.labelAngle-=180:270<=this.labelAngle&&360>=this.labelAngle&&(this.labelAngle-=360)),"bottom"===this._position||"top"===this._position)if(f=0.9*k>>0,q=0,!this.chart.panEnabled&&1<=
this._labels.length){this.sessionVariables.labelFontSize=this.labelFontSize;this.sessionVariables.labelMaxWidth=f;this.sessionVariables.labelMaxHeight=l;this.sessionVariables.labelAngle=this.labelAngle;this.sessionVariables.labelWrap=this.labelWrap;for(c=0;c<this._labels.length;c++)if(!this._labels[c].breaksLabelType){a=this._labels[c].textBlock;for(var v,g=a.text.split(" "),b=0;b<g.length;b++)p=g[b],this.ctx.font=a.fontStyle+" "+a.fontWeight+" "+a.fontSize+"px "+a.fontFamily,p=this.ctx.measureText(p),
p.width>q&&(v=c,q=p.width)}c=0;for(c=this.intervalStartPosition<this.viewportMinimum?1:0;c<this._labels.length;c++)if(!this._labels[c].breaksLabelType){a=this._labels[c].textBlock;B=a.measureText();for(g=c+1;g<this._labels.length;g++)if(!this._labels[g].breaksLabelType){d=this._labels[g].textBlock;d=d.measureText();break}e.push(a.height);this.sessionVariables.labelMaxHeight=Math.max.apply(Math,e);Math.cos(Math.PI/180*Math.abs(this.labelAngle));Math.sin(Math.PI/180*Math.abs(this.labelAngle));b=f*Math.sin(Math.PI/
180*Math.abs(this.labelAngle))+(l-a.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle));if(r(this.options.labelAngle)&&isNaN(this.options.labelAngle)&&0!==this.options.labelAngle)if(this.sessionVariables.labelMaxHeight=0===this.labelAngle?l:Math.min((b-f*Math.cos(Math.PI/180*Math.abs(this.labelAngle)))/Math.sin(Math.PI/180*Math.abs(this.labelAngle)),b),p=(h-(m+a.fontSize/2)*Math.cos(Math.PI/180*Math.abs(-25)))/Math.sin(Math.PI/180*Math.abs(-25)),!r(this.options.labelWrap))this.labelWrap?r(this.options.labelMaxWidth)?
(this.sessionVariables.labelMaxWidth=Math.min(Math.max(f,q),p),this.sessionVariables.labelWrap=this.labelWrap,d&&B.width+d.width>>0>2*f&&(this.sessionVariables.labelAngle=-25)):(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelAngle=this.sessionVariables.labelMaxWidth>f?-25:this.sessionVariables.labelAngle):r(this.options.labelMaxWidth)?(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxHeight=
l,this.sessionVariables.labelMaxWidth=f,d&&B.width+d.width>>0>2*f&&(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=p)):(this.sessionVariables.labelAngle=this.sessionVariables.labelMaxWidth>f?-25:this.sessionVariables.labelAngle,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelMaxHeight=l,this.sessionVariables.labelWrap=this.labelWrap);else{if(r(this.options.labelWrap))if(!r(this.options.labelMaxWidth))this.options.labelMaxWidth<f?
(this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelMaxHeight=b):(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelMaxHeight=l);else if(!r(d))if(b=B.width+d.width>>0,g=this.labelFontSize,q<f)b-2*f>n&&(n=b-2*f,b>=2*f&&b<2.2*f?(this.sessionVariables.labelMaxWidth=f,r(this.options.labelFontSize)&&12<g&&(g=Math.floor(12/13*g),a.measureText()),this.sessionVariables.labelFontSize=r(this.options.labelFontSize)?
g:this.options.labelFontSize,this.sessionVariables.labelAngle=this.labelAngle):b>=2.2*f&&b<2.8*f?(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=p,this.sessionVariables.labelFontSize=g):b>=2.8*f&&b<3.2*f?(this.sessionVariables.labelMaxWidth=Math.max(f,q),this.sessionVariables.labelWrap=!0,r(this.options.labelFontSize)&&12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),a.measureText()),this.sessionVariables.labelFontSize=r(this.options.labelFontSize)?
g:this.options.labelFontSize,this.sessionVariables.labelAngle=this.labelAngle):b>=3.2*f&&b<3.6*f?(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelMaxWidth=p,this.sessionVariables.labelFontSize=this.labelFontSize):b>3.6*f&&b<5*f?(r(this.options.labelFontSize)&&12<g&&(g=Math.floor(12/13*g),a.measureText()),this.sessionVariables.labelFontSize=r(this.options.labelFontSize)?g:this.options.labelFontSize,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelAngle=
-25,this.sessionVariables.labelMaxWidth=p):b>5*f&&(this.sessionVariables.labelWrap=!0,this.sessionVariables.labelMaxWidth=f,this.sessionVariables.labelFontSize=g,this.sessionVariables.labelMaxHeight=l,this.sessionVariables.labelAngle=this.labelAngle));else if(v===c&&(0===v&&q+this._labels[v+1].textBlock.measureText().width-2*f>n||v===this._labels.length-1&&q+this._labels[v-1].textBlock.measureText().width-2*f>n||0<v&&v<this._labels.length-1&&q+this._labels[v+1].textBlock.measureText().width-2*f>n&&
q+this._labels[v-1].textBlock.measureText().width-2*f>n))n=0===v?q+this._labels[v+1].textBlock.measureText().width-2*f:q+this._labels[v-1].textBlock.measureText().width-2*f,this.sessionVariables.labelFontSize=r(this.options.labelFontSize)?g:this.options.labelFontSize,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=p;else if(0===n)for(this.sessionVariables.labelFontSize=r(this.options.labelFontSize)?g:this.options.labelFontSize,this.sessionVariables.labelWrap=
!0,b=0;b<this._labels.length;b++)a=this._labels[b].textBlock,a.maxWidth=this.sessionVariables.labelMaxWidth=Math.min(Math.max(f,q),p),B=a.measureText(),b<this._labels.length-1&&(g=b+1,d=this._labels[g].textBlock,d.maxWidth=this.sessionVariables.labelMaxWidth=Math.min(Math.max(f,q),p),d=d.measureText(),B.width+d.width>>0>2*f&&(this.sessionVariables.labelAngle=-25))}else(this.sessionVariables.labelAngle=this.labelAngle,this.sessionVariables.labelMaxHeight=0===this.labelAngle?l:Math.min((b-f*Math.cos(Math.PI/
180*Math.abs(this.labelAngle)))/Math.sin(Math.PI/180*Math.abs(this.labelAngle)),b),p=0!=this.labelAngle?(h-(m+a.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle)))/Math.sin(Math.PI/180*Math.abs(this.labelAngle)):f,this.sessionVariables.labelMaxHeight=l=this.labelWrap?(h-p*Math.sin(Math.PI/180*Math.abs(this.labelAngle)))/Math.cos(Math.PI/180*Math.abs(this.labelAngle)):1.5*this.labelFontSize,r(this.options.labelWrap))?r(this.options.labelWrap)&&(this.labelWrap&&!r(this.options.labelMaxWidth)?
(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:p,this.sessionVariables.labelMaxHeight=l):(this.sessionVariables.labelAngle=this.labelAngle,this.sessionVariables.labelMaxWidth=p,this.sessionVariables.labelMaxHeight=b<0.9*k?0.9*k:b,this.sessionVariables.labelWrap=this.labelWrap)):(this.options.labelWrap?(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?
this.options.labelMaxWidth:p):(r(this.options.labelMaxWidth),this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:p,this.sessionVariables.labelWrap=this.labelWrap),this.sessionVariables.labelMaxHeight=l)}for(b=0;b<this._labels.length;b++)a=this._labels[b].textBlock,a.maxWidth=this.labelMaxWidth=this.sessionVariables.labelMaxWidth,a.fontSize=this.sessionVariables.labelFontSize,a.angle=this.labelAngle=this.sessionVariables.labelAngle,a.wrap=this.labelWrap=this.sessionVariables.labelWrap,
a.maxHeight=this.sessionVariables.labelMaxHeight,a.measureText()}else for(c=0;c<this._labels.length;c++)a=this._labels[c].textBlock,a.maxWidth=this.labelMaxWidth=r(this.options.labelMaxWidth)?r(this.sessionVariables.labelMaxWidth)?this.sessionVariables.labelMaxWidth=f:this.sessionVariables.labelMaxWidth:this.options.labelMaxWidth,a.fontSize=this.labelFontSize=r(this.options.labelFontSize)?r(this.sessionVariables.labelFontSize)?this.sessionVariables.labelFontSize=this.labelFontSize:this.sessionVariables.labelFontSize:
this.options.labelFontSize,a.angle=this.labelAngle=r(this.options.labelAngle)?r(this.sessionVariables.labelAngle)?this.sessionVariables.labelAngle=this.labelAngle:this.sessionVariables.labelAngle:this.labelAngle,a.wrap=this.labelWrap=r(this.options.labelWrap)?r(this.sessionVariables.labelWrap)?this.sessionVariables.labelWrap=this.labelWrap:this.sessionVariables.labelWrap:this.options.labelWrap,a.maxHeight=r(this.sessionVariables.labelMaxHeight)?this.sessionVariables.labelMaxHeight=l:this.sessionVariables.labelMaxHeight,
a.measureText();else if("left"===this._position||"right"===this._position)if(f=r(this.options.labelMaxWidth)?0.3*this.chart.width>>0:this.options.labelMaxWidth,l="undefined"===typeof this.options.labelWrap||this.labelWrap?0.3*this.chart.height>>0:1.5*this.labelFontSize,!this.chart.panEnabled&&1<=this._labels.length){this.sessionVariables.labelFontSize=this.labelFontSize;this.sessionVariables.labelMaxWidth=f;this.sessionVariables.labelMaxHeight=l;this.sessionVariables.labelAngle=r(this.sessionVariables.labelAngle)?
0:this.sessionVariables.labelAngle;this.sessionVariables.labelWrap=this.labelWrap;for(c=0;c<this._labels.length;c++)if(!this._labels[c].breaksLabelType){a=this._labels[c].textBlock;B=a.measureText();for(g=c+1;g<this._labels.length;g++)if(!this._labels[g].breaksLabelType){d=this._labels[g].textBlock;d=d.measureText();break}e.push(a.height);this.sessionVariables.labelMaxHeight=Math.max.apply(Math,e);b=f*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+(l-a.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle));
Math.cos(Math.PI/180*Math.abs(this.labelAngle));Math.sin(Math.PI/180*Math.abs(this.labelAngle));r(this.options.labelAngle)&&isNaN(this.options.labelAngle)&&0!==this.options.labelAngle?r(this.options.labelWrap)?r(this.options.labelWrap)&&(r(this.options.labelMaxWidth)?r(d)||(k=B.height+d.height>>0,k-2*l>q&&(q=k-2*l,k>=2*l&&k<2.4*l?(r(this.options.labelFontSize)&&12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),a.measureText()),this.sessionVariables.labelMaxHeight=l,this.sessionVariables.labelFontSize=
r(this.options.labelFontSize)?this.labelFontSize:this.options.labelFontSize):k>=2.4*l&&k<2.8*l?(this.sessionVariables.labelMaxHeight=b,this.sessionVariables.labelFontSize=this.labelFontSize,this.sessionVariables.labelWrap=!0):k>=2.8*l&&k<3.2*l?(this.sessionVariables.labelMaxHeight=l,this.sessionVariables.labelWrap=!0,r(this.options.labelFontSize)&&12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),a.measureText()),this.sessionVariables.labelFontSize=r(this.options.labelFontSize)?
this.labelFontSize:this.options.labelFontSize,this.sessionVariables.labelAngle=r(this.sessionVariables.labelAngle)?0:this.sessionVariables.labelAngle):k>=3.2*l&&k<3.6*l?(this.sessionVariables.labelMaxHeight=b,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelFontSize=this.labelFontSize):k>3.6*l&&k<10*l?(r(this.options.labelFontSize)&&12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),a.measureText()),this.sessionVariables.labelFontSize=r(this.options.labelFontSize)?
this.labelFontSize:this.options.labelFontSize,this.sessionVariables.labelMaxWidth=f,this.sessionVariables.labelMaxHeight=l,this.sessionVariables.labelAngle=r(this.sessionVariables.labelAngle)?0:this.sessionVariables.labelAngle):k>10*l&&k<50*l&&(r(this.options.labelFontSize)&&12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),a.measureText()),this.sessionVariables.labelFontSize=r(this.options.labelFontSize)?this.labelFontSize:this.options.labelFontSize,this.sessionVariables.labelMaxHeight=
l,this.sessionVariables.labelMaxWidth=f,this.sessionVariables.labelAngle=r(this.sessionVariables.labelAngle)?0:this.sessionVariables.labelAngle))):(this.sessionVariables.labelMaxHeight=l,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth)):(this.sessionVariables.labelMaxWidth=this.labelWrap?this.options.labelMaxWidth?this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth:this.labelMaxWidth?this.options.labelMaxWidth?
this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth:f,this.sessionVariables.labelMaxHeight=l):(this.sessionVariables.labelAngle=this.labelAngle,this.sessionVariables.labelMaxWidth=0===this.labelAngle?f:Math.min((b-l*Math.sin(Math.PI/180*Math.abs(this.labelAngle)))/Math.cos(Math.PI/180*Math.abs(this.labelAngle)),l),r(this.options.labelWrap))?r(this.options.labelWrap)&&(this.labelWrap&&!r(this.options.labelMaxWidth)?(this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth>
this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth,this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxHeight=b):(this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:f,this.sessionVariables.labelMaxHeight=0===this.labelAngle?l:b,r(this.options.labelMaxWidth)&&(this.sessionVariables.labelAngle=this.labelAngle))):this.options.labelWrap?(this.sessionVariables.labelMaxHeight=0===this.labelAngle?l:b,this.sessionVariables.labelWrap=
this.labelWrap,this.sessionVariables.labelMaxWidth=f):(this.sessionVariables.labelMaxHeight=l,r(this.options.labelMaxWidth),this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth,this.sessionVariables.labelWrap=this.labelWrap)}for(b=0;b<this._labels.length;b++)a=this._labels[b].textBlock,a.maxWidth=this.labelMaxWidth=this.sessionVariables.labelMaxWidth,a.fontSize=this.labelFontSize=this.sessionVariables.labelFontSize,a.angle=this.labelAngle=
this.sessionVariables.labelAngle,a.wrap=this.labelWrap=this.sessionVariables.labelWrap,a.maxHeight=this.sessionVariables.labelMaxHeight,a.measureText()}else for(c=0;c<this._labels.length;c++)a=this._labels[c].textBlock,a.maxWidth=this.labelMaxWidth=r(this.options.labelMaxWidth)?r(this.sessionVariables.labelMaxWidth)?this.sessionVariables.labelMaxWidth=f:this.sessionVariables.labelMaxWidth:this.options.labelMaxWidth,a.fontSize=this.labelFontSize=r(this.options.labelFontSize)?r(this.sessionVariables.labelFontSize)?
this.sessionVariables.labelFontSize=this.labelFontSize:this.sessionVariables.labelFontSize:this.options.labelFontSize,a.angle=this.labelAngle=r(this.options.labelAngle)?r(this.sessionVariables.labelAngle)?this.sessionVariables.labelAngle=this.labelAngle:this.sessionVariables.labelAngle:this.labelAngle,a.wrap=this.labelWrap=r(this.options.labelWrap)?r(this.sessionVariables.labelWrap)?this.sessionVariables.labelWrap=this.labelWrap:this.sessionVariables.labelWrap:this.options.labelWrap,a.maxHeight=r(this.sessionVariables.labelMaxHeight)?
this.sessionVariables.labelMaxHeight=l:this.sessionVariables.labelMaxHeight,a.measureText();for(c=0;c<this.stripLines.length;c++){var f=this.stripLines[c],w;if("outside"===f.labelPlacement){l=this.sessionVariables.labelMaxWidth;if("bottom"===this._position||"top"===this._position)r(f.options.labelWrap)&&!r(this.sessionVariables.stripLineLabelMaxHeight)?w=this.sessionVariables.stripLineLabelMaxHeight:this.sessionVariables.stripLineLabelMaxHeight=w=f.labelWrap?0.8*this.chart.height>>0:1.5*this.labelFontSize;
if("left"===this._position||"right"===this._position)r(f.options.labelWrap)&&!r(this.sessionVariables.stripLineLabelMaxHeight)?w=this.sessionVariables.stripLineLabelMaxHeight:this.sessionVariables.stripLineLabelMaxHeight=w=f.labelWrap?0.8*this.chart.width>>0:1.5*this.labelFontSize;r(f.labelBackgroundColor)&&(f.labelBackgroundColor="#EEEEEE")}else l="bottom"===this._position||"top"===this._position?0.9*this.chart.width>>0:0.9*this.chart.height>>0,w=r(f.options.labelWrap)||f.labelWrap?"bottom"===this._position||
"top"===this._position?0.8*this.chart.width>>0:0.8*this.chart.height>>0:1.5*this.labelFontSize,r(f.labelBackgroundColor)&&(r(f.startValue)&&0!==f.startValue?f.labelBackgroundColor=s?"transparent":null:f.labelBackgroundColor="#EEEEEE");a=new la(this.ctx,{x:0,y:0,backgroundColor:f.labelBackgroundColor,borderColor:f.labelBorderColor,borderThickness:f.labelBorderThickness,cornerRadius:f.labelCornerRadius,maxWidth:f.options.labelMaxWidth?f.options.labelMaxWidth:l,maxHeight:w,angle:this.labelAngle,text:f.labelFormatter?
f.labelFormatter({chart:this.chart,axis:this,stripLine:f}):f.label,textAlign:this.labelTextAlign,fontSize:"outside"===f.labelPlacement?f.options.labelFontSize?f.labelFontSize:this.labelFontSize:f.labelFontSize,fontFamily:"outside"===f.labelPlacement?f.options.labelFontFamily?f.labelFontFamily:this.labelFontFamily:f.labelFontFamily,fontWeight:"outside"===f.labelPlacement?f.options.labelFontWeight?f.labelFontWeight:this.labelFontWeight:f.labelFontWeight,fontColor:f.labelFontColor||f.color,fontStyle:"outside"===
f.labelPlacement?f.options.labelFontStyle?f.labelFontStyle:this.fontWeight:f.labelFontStyle,textBaseline:"middle"});this._stripLineLabels.push({position:f.value,textBlock:a,effectiveHeight:null,stripLine:f})}};D.prototype.createLabelsAndCalculateWidth=function(){var a=0,d=0;this._labels=[];this._stripLineLabels=[];var c=this.chart.isNavigator?0:5;if("left"===this._position||"right"===this._position){this.createLabels();if("inside"!=this.labelPlacement||"inside"===this.labelPlacement&&0<this._index)for(d=
0;d<this._labels.length;d++){var b=this._labels[d].textBlock,e=b.measureText(),f=0,f=0===this.labelAngle?e.width:e.width*Math.cos(Math.PI/180*Math.abs(this.labelAngle))+(e.height-b.fontSize/2)*Math.sin(Math.PI/180*Math.abs(this.labelAngle));a<f&&(a=f);this._labels[d].effectiveWidth=f}for(d=0;d<this._stripLineLabels.length;d++)"outside"===this._stripLineLabels[d].stripLine.labelPlacement&&(this._stripLineLabels[d].stripLine.value>=this.viewportMinimum&&this._stripLineLabels[d].stripLine.value<=this.viewportMaximum)&&
(b=this._stripLineLabels[d].textBlock,e=b.measureText(),f=0===this.labelAngle?e.width:e.width*Math.cos(Math.PI/180*Math.abs(this.labelAngle))+(e.height-b.fontSize/2)*Math.sin(Math.PI/180*Math.abs(this.labelAngle)),a<f&&(a=f),this._stripLineLabels[d].effectiveWidth=f)}return(this.title?this._titleTextBlock.measureText().height+2:0)+a+("inside"===this.tickPlacement?0:this.tickLength)+c};D.prototype.createLabelsAndCalculateHeight=function(){var a=0;this._labels=[];this._stripLineLabels=[];var d,c=0,
b=this.chart.isNavigator?0:5;if("bottom"===this._position||"top"===this._position){this.createLabels();if("inside"!=this.labelPlacement||"inside"===this.labelPlacement&&0<this._index)for(c=0;c<this._labels.length;c++){d=this._labels[c].textBlock;var e=d.measureText(),f=0,f=0===this.labelAngle?e.height:e.width*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+(e.height-d.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle));a<f&&(a=f);this._labels[c].effectiveHeight=f}for(c=0;c<this._stripLineLabels.length;c++)"outside"===
this._stripLineLabels[c].stripLine.labelPlacement&&(this._stripLineLabels[c].stripLine.value>=this.viewportMinimum&&this._stripLineLabels[c].stripLine.value<=this.viewportMaximum)&&(d=this._stripLineLabels[c].textBlock,e=d.measureText(),f=0===this.labelAngle?e.height:e.width*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+(e.height-d.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle)),a<f&&(a=f),this._stripLineLabels[c].effectiveHeight=f)}return(this.title?this._titleTextBlock.measureText().height+
2:0)+a+("inside"===this.tickPlacement?0:this.tickLength)+b};D.setLayout=function(a,d,c,b,e,f){var l,k,m,h,p=a[0]?a[0].chart:d[0].chart,n=p.isNavigator?0:10,q=p._axes;if(a&&0<a.length)for(var g=0;g<a.length;g++)a[g]&&a[g].calculateAxisParameters();if(d&&0<d.length)for(g=0;g<d.length;g++)d[g].calculateAxisParameters();if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].calculateAxisParameters();if(b&&0<b.length)for(g=0;g<b.length;g++)b[g].calculateAxisParameters();for(g=0;g<q.length;g++)if(q[g]&&q[g].scaleBreaks&&
q[g].scaleBreaks._appliedBreaks.length)for(var B=q[g].scaleBreaks._appliedBreaks,s=0;s<B.length&&!(B[s].startValue>q[g].viewportMaximum);s++)B[s].endValue<q[g].viewportMinimum||(r(q[g].scaleBreaks.firstBreakIndex)&&(q[g].scaleBreaks.firstBreakIndex=s),B[s].startValue>=q[g].viewPortMinimum&&(q[g].scaleBreaks.lastBreakIndex=s));for(var v=s=0,t=0,x=0,w=0,D=0,C=0,y,E,G=k=0,I,P,L,B=I=P=L=!1,g=0;g<q.length;g++)q[g]&&q[g].title&&(q[g]._titleTextBlock=new la(q[g].ctx,{text:q[g].title,horizontalAlign:"center",
fontSize:q[g].titleFontSize,fontFamily:q[g].titleFontFamily,fontWeight:q[g].titleFontWeight,fontColor:q[g].titleFontColor,fontStyle:q[g].titleFontStyle,borderColor:q[g].titleBorderColor,borderThickness:q[g].titleBorderThickness,backgroundColor:q[g].titleBackgroundColor,cornerRadius:q[g].titleCornerRadius,textBaseline:"top"}));for(g=0;g<q.length;g++)if(q[g].title)switch(q[g]._position){case "left":q[g]._titleTextBlock.maxWidth=q[g].titleMaxWidth||f.height;q[g]._titleTextBlock.maxHeight=q[g].titleWrap?
0.8*f.width:1.5*q[g].titleFontSize;q[g]._titleTextBlock.angle=-90;break;case "right":q[g]._titleTextBlock.maxWidth=q[g].titleMaxWidth||f.height;q[g]._titleTextBlock.maxHeight=q[g].titleWrap?0.8*f.width:1.5*q[g].titleFontSize;q[g]._titleTextBlock.angle=90;break;default:q[g]._titleTextBlock.maxWidth=q[g].titleMaxWidth||f.width,q[g]._titleTextBlock.maxHeight=q[g].titleWrap?0.8*f.height:1.5*q[g].titleFontSize,q[g]._titleTextBlock.angle=0}if("normal"===e){for(var x=[],w=[],D=[],C=[],N=[],Q=[],S=[],T=[];4>
s;){var F=0,W=0,U=0,X=0,Z=e=0,M=0,aa=0,V=0,Y=0,R=0,ba=0;if(c&&0<c.length)for(D=[],g=R=0;g<c.length;g++)D.push(Math.ceil(c[g]?c[g].createLabelsAndCalculateWidth():0)),R+=D[g],M+=c[g]&&!p.isNavigator?c[g].margin:0;else D.push(Math.ceil(c[0]?c[0].createLabelsAndCalculateWidth():0));S.push(D);if(b&&0<b.length)for(C=[],g=ba=0;g<b.length;g++)C.push(Math.ceil(b[g]?b[g].createLabelsAndCalculateWidth():0)),ba+=C[g],aa+=b[g]?b[g].margin:0;else C.push(Math.ceil(b[0]?b[0].createLabelsAndCalculateWidth():0));
T.push(C);l=Math.round(f.x1+R+M);m=Math.round(f.x2-ba-aa>p.width-n?p.width-n:f.x2-ba-aa);if(a&&0<a.length)for(x=[],g=V=0;g<a.length;g++)a[g]&&(a[g].lineCoordinates={}),a[g].lineCoordinates.width=Math.abs(m-l),a[g].title&&(a[g]._titleTextBlock.maxWidth=0<a[g].titleMaxWidth&&a[g].titleMaxWidth<a[g].lineCoordinates.width?a[g].titleMaxWidth:a[g].lineCoordinates.width),x.push(Math.ceil(a[g]?a[g].createLabelsAndCalculateHeight():0)),V+=x[g],e+=a[g]&&!p.isNavigator?a[g].margin:0;else x.push(Math.ceil(a[0]?
a[0].createLabelsAndCalculateHeight():0));N.push(x);if(d&&0<d.length)for(w=[],g=Y=0;g<d.length;g++)d[g]&&(d[g].lineCoordinates={}),d[g].lineCoordinates.width=Math.abs(m-l),d[g].title&&(d[g]._titleTextBlock.maxWidth=0<d[g].titleMaxWidth&&d[g].titleMaxWidth<d[g].lineCoordinates.width?d[g].titleMaxWidth:d[g].lineCoordinates.width),w.push(Math.ceil(d[g]?d[g].createLabelsAndCalculateHeight():0)),Y+=w[g],Z+=d[g]&&!p.isNavigator?d[g].margin:0;else w.push(Math.ceil(d[0]?d[0].createLabelsAndCalculateHeight():
0));Q.push(w);if(a&&0<a.length)for(g=0;g<a.length;g++)a[g]&&(a[g].lineCoordinates.x1=l,m=Math.round(f.x2-ba-aa>p.width-n?p.width-n:f.x2-ba-aa),a[g]._labels&&1<a[g]._labels.length&&(k=h=0,h=a[g]._labels[1],k="dateTime"===a[g].valueType?a[g]._labels[a[g]._labels.length-2]:a[g]._labels[a[g]._labels.length-1],v=h.textBlock.width*Math.cos(Math.PI/180*Math.abs(h.textBlock.angle))+(h.textBlock.height-k.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(h.textBlock.angle)),t=k.textBlock.width*Math.cos(Math.PI/
180*Math.abs(k.textBlock.angle))+(k.textBlock.height-k.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle))),!a[g]||(!a[g].labelAutoFit||r(y)||r(E)||p.isNavigator||p.stockChart)||(k=0,0<a[g].labelAngle?E+t>m&&(k+=0<a[g].labelAngle?E+t-m-ba:0):0>a[g].labelAngle?y-v<l&&y-v<a[g].viewportMinimum&&(G=l-(M+a[g].tickLength+D+y-v+a[g].labelFontSize/2)):0===a[g].labelAngle&&(E+t>m&&(k=E+t/2-m-ba),y-v<l&&y-v<a[g].viewportMinimum&&(G=l-M-a[g].tickLength-D-y+v/2)),a[g].viewportMaximum===a[g].maximum&&
a[g].viewportMinimum===a[g].minimum&&0<a[g].labelAngle&&0<k?m-=k:a[g].viewportMaximum===a[g].maximum&&a[g].viewportMinimum===a[g].minimum&&0>a[g].labelAngle&&0<G?l+=G:a[g].viewportMaximum===a[g].maximum&&a[g].viewportMinimum===a[g].minimum&&0===a[g].labelAngle&&(0<G&&(l+=G),0<k&&(m-=k))),p.panEnabled?V=r(p.sessionVariables.axisX.height)?p.sessionVariables.axisX.height=V:p.sessionVariables.axisX.height:p.sessionVariables.axisX.height=V,k=Math.round(f.y2-V-e+F),h=Math.round(f.y2),a[g].lineCoordinates.x2=
m,a[g].lineCoordinates.width=m-l,a[g].lineCoordinates.y1=k,a[g].lineCoordinates.y2=k+a[g].lineThickness/2,"inside"===a[g].labelPlacement&&0<g&&(a[g].lineCoordinates.y1=a[g].lineCoordinates.y1+x[g]-(a[g]._titleTextBlock?a[g]._titleTextBlock.height:0)-("inside"===a[g].tickPlacement?a[g].tickLength:0),a[g].lineCoordinates.y2=a[g].lineCoordinates.y1+a[g].lineThickness/2),a[g].bounds={x1:l,y1:k,x2:m,y2:h-(V+e-x[g]-F),width:m-l,height:h-k}),F+=x[g]+a[g].margin;if(d&&0<d.length)for(g=0;g<d.length;g++)d[g].lineCoordinates.x1=
Math.round(f.x1+R+M),d[g].lineCoordinates.x2=Math.round(f.x2-ba-aa>p.width-n?p.width-n:f.x2-ba-aa),d[g].lineCoordinates.width=Math.abs(m-l),d[g]._labels&&1<d[g]._labels.length&&(h=d[g]._labels[1],k="dateTime"===d[g].valueType?d[g]._labels[d[g]._labels.length-2]:d[g]._labels[d[g]._labels.length-1],v=h.textBlock.width*Math.cos(Math.PI/180*Math.abs(h.textBlock.angle))+(h.textBlock.height-k.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(h.textBlock.angle)),t=k.textBlock.width*Math.cos(Math.PI/180*
Math.abs(k.textBlock.angle))+(k.textBlock.height-k.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle))),p.panEnabled?Y=r(p.sessionVariables.axisX2.height)?p.sessionVariables.axisX2.height=Y:p.sessionVariables.axisX2.height:p.sessionVariables.axisX2.height=Y,k=Math.round(f.y1),h=Math.round(f.y2+d[g].margin),d[g].lineCoordinates.y1=k+Y+Z-W,d[g].lineCoordinates.y2=k,"inside"===d[g].labelPlacement&&0<g&&(d[g].lineCoordinates.y1=d[g-1].bounds.y1-w[g]+(d[g]._titleTextBlock?d[g]._titleTextBlock.height:
0)),d[g].bounds={x1:l,y1:k+(Y+Z-w[g]-W),x2:m,y2:h,width:m-l,height:h-k},W+=w[g]+d[g].margin;if(c&&0<c.length)for(g=0;g<c.length;g++)M=p.isNavigator?0:10,c[g]&&(l=Math.round(a[0]?a[0].lineCoordinates.x1:d[0].lineCoordinates.x1),M=c[g]._labels&&0<c[g]._labels.length?c[g]._labels[c[g]._labels.length-1].textBlock.height/2:n,k=Math.round(f.y1+Y+Z<Math.max(M,n)?Math.max(M,n):f.y1+Y+Z),m=Math.round(a[0]?a[0].lineCoordinates.x1:d[0].lineCoordinates.x1),M=0<a.length?0:c[g]._labels&&0<c[g]._labels.length?c[g]._labels[0].textBlock.height/
2:n,h=Math.round(f.y2-V-e-M),c[g].lineCoordinates={x1:l-U,y1:k,x2:m-U,y2:h,height:Math.abs(h-k)},"inside"===c[g].labelPlacement&&0<g&&(c[g].lineCoordinates.x1=c[g].lineCoordinates.x1-(D[g]-c[g]._titleTextBlock?c[g]._titleTextBlock.height:0)+("outside"===c[g].tickPlacement?c[g].tickLength:0),c[g].lineCoordinates.x2=c[g].lineCoordinates.x1+c[g].lineThickness/2),c[g].bounds={x1:l-(D[g]+U),y1:k,x2:m,y2:h,width:m-l,height:h-k},c[g].title&&(c[g]._titleTextBlock.maxWidth=0<c[g].titleMaxWidth&&c[g].titleMaxWidth<
c[g].lineCoordinates.height?c[g].titleMaxWidth:c[g].lineCoordinates.height),U+=D[g]+c[g].margin);if(b&&0<b.length)for(g=0;g<b.length;g++)b[g]&&(l=Math.round(a[0]?a[0].lineCoordinates.x2:d[0].lineCoordinates.x2),m=Math.round(l),M=b[g]._labels&&0<b[g]._labels.length?b[g]._labels[b[g]._labels.length-1].textBlock.height/2:0,k=Math.round(f.y1+Y+Z<Math.max(M,n)?Math.max(M,n):f.y1+Y+Z),M=0<a.length?0:b[g]._labels&&0<b[g]._labels.length?b[g]._labels[0].textBlock.height/2:0,h=Math.round(f.y2-(V+e+M)),b[g].lineCoordinates=
{x1:l+X,y1:k,x2:l+X,y2:h,height:Math.abs(h-k)},"inside"===b[g].labelPlacement&&0<g&&(b[g].lineCoordinates.x1=b[g].lineCoordinates.x1+(C[g]-b[g]._titleTextBlock?b[g]._titleTextBlock.height:0)-("outside"===b[g].tickPlacement?b[g].tickLength:0)-2,b[g].lineCoordinates.x2=b[g].lineCoordinates.x1+b[g].lineThickness/2),b[g].bounds={x1:l,y1:k,x2:m+(C[g]+X),y2:h,width:m-l,height:h-k},b[g].title&&(b[g]._titleTextBlock.maxWidth=0<b[g].titleMaxWidth&&b[g].titleMaxWidth<b[g].lineCoordinates.height?b[g].titleMaxWidth:
b[g].lineCoordinates.height),X+=C[g]+b[g].margin);if(a&&0<a.length)for(g=0;g<a.length;g++)a[g]&&(a[g].calculateValueToPixelConversionParameters(),a[g].calculateBreaksSizeInValues(),a[g]._labels&&1<a[g]._labels.length&&(y=(a[g].logarithmic?Math.log(a[g]._labels[1].position/a[g].viewportMinimum)/a[g].conversionParameters.lnLogarithmBase:a[g]._labels[1].position-a[g].viewportMinimum)*Math.abs(a[g].conversionParameters.pixelPerUnit)+a[g].lineCoordinates.x1,l=a[g]._labels[a[g]._labels.length-("dateTime"===
a[g].valueType?2:1)].position,l=a[g].getApparentDifference(a[g].viewportMinimum,l),E=a[g].logarithmic?(1<l?Math.log(l)/a[g].conversionParameters.lnLogarithmBase*Math.abs(a[g].conversionParameters.pixelPerUnit):0)+a[g].lineCoordinates.x1:(0<l?l*Math.abs(a[g].conversionParameters.pixelPerUnit):0)+a[g].lineCoordinates.x1));if(d&&0<d.length)for(g=0;g<d.length;g++)d[g].calculateValueToPixelConversionParameters(),d[g].calculateBreaksSizeInValues(),d[g]._labels&&1<d[g]._labels.length&&(y=(d[g].logarithmic?
Math.log(d[g]._labels[1].position/d[g].viewportMinimum)/d[g].conversionParameters.lnLogarithmBase:d[g]._labels[1].position-d[g].viewportMinimum)*Math.abs(d[g].conversionParameters.pixelPerUnit)+d[g].lineCoordinates.x1,l=d[g]._labels[d[g]._labels.length-("dateTime"===d[g].valueType?2:1)].position,l=d[g].getApparentDifference(d[g].viewportMinimum,l),E=d[g].logarithmic?(1<l?Math.log(l)/d[g].conversionParameters.lnLogarithmBase*Math.abs(d[g].conversionParameters.pixelPerUnit):0)+d[g].lineCoordinates.x1:
(0<l?l*Math.abs(d[g].conversionParameters.pixelPerUnit):0)+d[g].lineCoordinates.x1);for(g=0;g<q.length;g++)"axisY"===q[g].type&&(q[g].calculateValueToPixelConversionParameters(),q[g].calculateBreaksSizeInValues());if(0<s){if(a&&0<a.length)for(g=0;g<a.length;g++)B=N[s-1][g]===N[s][g]?!0:!1;else B=!0;if(d&&0<d.length)for(g=0;g<d.length;g++)I=Q[s-1][g]===Q[s][g]?!0:!1;else I=!0;if(c&&0<c.length)for(g=0;g<c.length;g++)P=S[s-1][g]===S[s][g]?!0:!1;else P=!0;if(b&&0<b.length)for(g=0;g<b.length;g++)L=T[s-
1][g]===T[s][g]?!0:!1;else L=!0}if(B&&I&&P&&L)break;s++}if(a&&0<a.length)for(g=0;g<a.length;g++)a[g].calculateStripLinesThicknessInValues(),a[g].calculateBreaksInPixels();if(d&&0<d.length)for(g=0;g<d.length;g++)d[g].calculateStripLinesThicknessInValues(),d[g].calculateBreaksInPixels();if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].calculateStripLinesThicknessInValues(),c[g].calculateBreaksInPixels();if(b&&0<b.length)for(g=0;g<b.length;g++)b[g].calculateStripLinesThicknessInValues(),b[g].calculateBreaksInPixels()}else{n=
[];y=[];G=[];v=[];E=[];t=[];N=[];for(Q=[];4>s;){V=X=W=U=aa=M=Z=e=T=S=F=Y=0;if(a&&0<a.length)for(G=[],g=X=0;g<a.length;g++)G.push(Math.ceil(a[g]?a[g].createLabelsAndCalculateWidth():0)),X+=G[g],e+=a[g]&&!p.isNavigator?a[g].margin:0;else G.push(Math.ceil(a[0]?a[0].createLabelsAndCalculateWidth():0));N.push(G);if(d&&0<d.length)for(v=[],g=V=0;g<d.length;g++)v.push(Math.ceil(d[g]?d[g].createLabelsAndCalculateWidth():0)),V+=v[g],Z+=d[g]?d[g].margin:0;else v.push(Math.ceil(d[0]?d[0].createLabelsAndCalculateWidth():
0));Q.push(v);if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].lineCoordinates={},l=Math.round(f.x1+X+e),m=Math.round(f.x2-V-Z>p.width-10?p.width-10:f.x2-V-Z),c[g].labelAutoFit&&!r(x)&&(0<!a.length&&(l=0>c[g].labelAngle?Math.max(l,x):0===c[g].labelAngle?Math.max(l,x/2):l),0<!d.length&&(m=0<c[g].labelAngle?m-w/2:0===c[g].labelAngle?m-w/2:m)),c[g].lineCoordinates.x1=l,c[g].lineCoordinates.x2=m,c[g].lineCoordinates.width=Math.abs(m-l),c[g].title&&(c[g]._titleTextBlock.maxWidth=0<c[g].titleMaxWidth&&c[g].titleMaxWidth<
c[g].lineCoordinates.width?c[g].titleMaxWidth:c[g].lineCoordinates.width);if(b&&0<b.length)for(g=0;g<b.length;g++)b[g].lineCoordinates={},l=Math.round(f.x1+X+e),m=Math.round(f.x2-V-Z>b[g].chart.width-10?b[g].chart.width-10:f.x2-V-Z),b[g]&&b[g].labelAutoFit&&!r(D)&&(0<!a.length&&(l=0<b[g].labelAngle?Math.max(l,D):0===b[g].labelAngle?Math.max(l,D/2):l),0<!d.length&&(m-=C/2)),b[g].lineCoordinates.x1=l,b[g].lineCoordinates.x2=m,b[g].lineCoordinates.width=Math.abs(m-l),b[g].title&&(b[g]._titleTextBlock.maxWidth=
0<b[g].titleMaxWidth&&b[g].titleMaxWidth<b[g].lineCoordinates.width?b[g].titleMaxWidth:b[g].lineCoordinates.width);if(c&&0<c.length)for(n=[],g=U=0;g<c.length;g++)n.push(Math.ceil(c[g]?c[g].createLabelsAndCalculateHeight():0)),U+=n[g]+c[g].margin,M+=c[g].margin;else n.push(Math.ceil(c[0]?c[0].createLabelsAndCalculateHeight():0));E.push(n);if(b&&0<b.length)for(y=[],g=W=0;g<b.length;g++)y.push(Math.ceil(b[g]?b[g].createLabelsAndCalculateHeight():0)),W+=y[g],aa+=b[g].margin;else y.push(Math.ceil(b[0]?
b[0].createLabelsAndCalculateHeight():0));t.push(y);if(c&&0<c.length)for(g=0;g<c.length;g++)0<c[g]._labels.length&&(h=c[g]._labels[0],k=c[g]._labels[c[g]._labels.length-1],x=h.textBlock.width*Math.cos(Math.PI/180*Math.abs(h.textBlock.angle))+(h.textBlock.height-k.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(h.textBlock.angle)),w=k.textBlock.width*Math.cos(Math.PI/180*Math.abs(k.textBlock.angle))+(k.textBlock.height-k.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle)));
if(b&&0<b.length)for(g=0;g<b.length;g++)b[g]&&0<b[g]._labels.length&&(h=b[g]._labels[0],k=b[g]._labels[b[g]._labels.length-1],D=h.textBlock.width*Math.cos(Math.PI/180*Math.abs(h.textBlock.angle))+(h.textBlock.height-k.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(h.textBlock.angle)),C=k.textBlock.width*Math.cos(Math.PI/180*Math.abs(k.textBlock.angle))+(k.textBlock.height-k.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle)));if(p.panEnabled)for(g=0;g<c.length;g++)n[g]=r(p.sessionVariables.axisY.height)?
p.sessionVariables.axisY.height=n[g]:p.sessionVariables.axisY.height;else for(g=0;g<c.length;g++)p.sessionVariables.axisY.height=n[g];if(c&&0<c.length)for(g=c.length-1;0<=g;g--)k=Math.round(f.y2),h=Math.round(f.y2>c[g].chart.height?c[g].chart.height:f.y2),c[g].lineCoordinates.y1=k-(n[g]+c[g].margin+Y),c[g].lineCoordinates.y2=k-(n[g]+c[g].margin+Y),"inside"===c[g].labelPlacement&&0<g&&(c[g].lineCoordinates.y1=c[g].lineCoordinates.y1+n[g]-(c[g]._titleTextBlock?c[g]._titleTextBlock.height:0)-("inside"===
c[g].tickPlacement?c[g].tickLength:0),c[g].lineCoordinates.y2=c[g].lineCoordinates.y1+c[g].lineThickness/2),c[g].bounds={x1:l,y1:k-(n[g]+Y+c[g].margin),x2:m,y2:h-(Y+c[g].margin),width:m-l,height:n[g]},c[g].title&&(c[g]._titleTextBlock.maxWidth=0<c[g].titleMaxWidth&&c[g].titleMaxWidth<c[g].lineCoordinates.width?c[g].titleMaxWidth:c[g].lineCoordinates.width),Y+=n[g]+c[g].margin;if(b&&0<b.length)for(g=b.length-1;0<=g;g--)b[g]&&(k=Math.round(f.y1),h=Math.round(f.y1+(y[g]+b[g].margin+F)),b[g].lineCoordinates.y1=
h,b[g].lineCoordinates.y2=h,"inside"===b[g].labelPlacement&&0<g&&(b[g].lineCoordinates.y1=h-y[g]+(b[g]._titleTextBlock?b[g]._titleTextBlock.height:0)),b[g].bounds={x1:l,y1:k+(b[g].margin+F),x2:m,y2:h,width:m-l,height:W},b[g].title&&(b[g]._titleTextBlock.maxWidth=0<b[g].titleMaxWidth&&b[g].titleMaxWidth<b[g].lineCoordinates.width?b[g].titleMaxWidth:b[g].lineCoordinates.width),F+=y[g]+b[g].margin);if(a&&0<a.length)for(g=0;g<a.length;g++){M=a[g]._labels&&0<a[g]._labels.length?a[g]._labels[0].textBlock.fontSize/
2:0;l=Math.round(f.x1+e);k=b&&0<b.length?Math.round(b[0]?b[0].lineCoordinates.y2:f.y1<Math.max(M,10)?Math.max(M,10):f.y1):f.y1<Math.max(M,10)?Math.max(M,10):f.y1;m=Math.round(f.x1+X+e);h=c&&0<c.length?Math.round(c[0]?c[0].lineCoordinates.y1:f.y2-U>p.height-Math.max(M,10)?p.height-Math.max(M,10):f.y2-U):f.y2>p.height-Math.max(M,10)?p.height-Math.max(M,10):f.y2;if(c&&0<c.length)for(M=0;M<c.length;M++)c[M]&&c[M].labelAutoFit&&(m=0>c[M].labelAngle?Math.max(m,x):0===c[M].labelAngle?Math.max(m,x/2):m,l=
0>c[M].labelAngle||0===c[M].labelAngle?m-X:l);if(b&&0<b.length)for(M=0;M<b.length;M++)b[M]&&b[M].labelAutoFit&&(m=b[M].lineCoordinates.x1,l=m-X);a[g].lineCoordinates={x1:m-S,y1:k,x2:m-S,y2:h,height:Math.abs(h-k)};"inside"===a[g].labelPlacement&&0<g&&(a[g].lineCoordinates.x1=a[g].lineCoordinates.x1-(G[g]-(a[g]._titleTextBlock?a[g]._titleTextBlock.height:0))+("outside"===a[g].tickPlacement?a[g].tickLength:0),a[g].lineCoordinates.x2=a[g].lineCoordinates.x1+a[g].lineThickness/2);a[g].bounds={x1:m-(G[g]+
S),y1:k,x2:m,y2:h,width:m-l,height:h-k};a[g].title&&(a[g]._titleTextBlock.maxWidth=0<a[g].titleMaxWidth&&a[g].titleMaxWidth<a[g].lineCoordinates.height?a[g].titleMaxWidth:a[g].lineCoordinates.height);a[g].calculateValueToPixelConversionParameters();a[g].calculateBreaksSizeInValues();S+=G[g]+a[g].margin}if(d&&0<d.length)for(g=0;g<d.length;g++){M=d[g]._labels&&0<d[g]._labels.length?d[g]._labels[0].textBlock.fontSize/2:0;l=Math.round(f.x1-e);k=b&&0<b.length?Math.round(b[0]?b[0].lineCoordinates.y2:f.y1<
Math.max(M,10)?Math.max(M,10):f.y1):f.y1<Math.max(M,10)?Math.max(M,10):f.y1;m=Math.round(f.x2-V-Z);h=c&&0<c.length?Math.round(c[0]?c[0].lineCoordinates.y1:f.y2-U>p.height-Math.max(M,10)?p.height-Math.max(M,10):f.y2-U):f.y2>p.height-Math.max(M,10)?p.height-Math.max(M,10):f.y2;if(c&&0<c.length)for(M=0;M<c.length;M++)c[M]&&c[M].labelAutoFit&&(m=0>c[M].labelAngle?Math.max(m,x):0===c[M].labelAngle?Math.max(m,x/2):m,l=0>c[M].labelAngle||0===c[M].labelAngle?m-V:l);if(b&&0<b.length)for(M=0;M<b.length;M++)b[M]&&
b[M].labelAutoFit&&(m=b[M].lineCoordinates.x2,l=m-V);d[g].lineCoordinates={x1:m+T,y1:k,x2:m+T,y2:h,height:Math.abs(h-k)};"inside"===d[g].labelPlacement&&0<g&&(d[g].lineCoordinates.x1=d[g].lineCoordinates.x1+(v[g]-(d[g]._titleTextBlock?d[g]._titleTextBlock.height:0)-2)-("outside"===d[g].tickPlacement?d[g].tickLength:0),d[g].lineCoordinates.x2=d[g].lineCoordinates.x1+d[g].lineThickness/2);d[g].bounds={x1:d[g].lineCoordinates.x1,y1:k,x2:m+v[g]+T,y2:h,width:m-l,height:h-k};d[g].title&&(d[g]._titleTextBlock.maxWidth=
0<d[g].titleMaxWidth&&d[g].titleMaxWidth<d[g].lineCoordinates.height?d[g].titleMaxWidth:d[g].lineCoordinates.height);d[g].calculateValueToPixelConversionParameters();d[g].calculateBreaksSizeInValues();T+=v[g]+d[g].margin}for(g=0;g<q.length;g++)"axisY"===q[g].type&&(q[g].calculateValueToPixelConversionParameters(),q[g].calculateBreaksSizeInValues());if(0<s){if(a&&0<a.length)for(g=0;g<a.length;g++)B=N[s-1][g]===N[s][g]?!0:!1;else B=!0;if(d&&0<d.length)for(g=0;g<d.length;g++)I=Q[s-1][g]===Q[s][g]?!0:
!1;else I=!0;if(c&&0<c.length)for(g=0;g<c.length;g++)P=E[s-1][g]===E[s][g]?!0:!1;else P=!0;if(b&&0<b.length)for(g=0;g<b.length;g++)L=t[s-1][g]===t[s][g]?!0:!1;else L=!0}if(B&&I&&P&&L)break;s++}if(c&&0<c.length)for(g=0;g<c.length;g++)c[g].calculateStripLinesThicknessInValues(),c[g].calculateBreaksInPixels();if(b&&0<b.length)for(g=0;g<b.length;g++)b[g].calculateStripLinesThicknessInValues(),b[g].calculateBreaksInPixels();if(a&&0<a.length)for(g=0;g<a.length;g++)a[g].calculateStripLinesThicknessInValues(),
a[g].calculateBreaksInPixels();if(d&&0<d.length)for(g=0;g<d.length;g++)d[g].calculateStripLinesThicknessInValues(),d[g].calculateBreaksInPixels()}};D.render=function(a,d,c,b,e){var f=a[0]?a[0].chart:d[0].chart;e=f.ctx;f.alignVerticalAxes&&f.alignVerticalAxes();e.save();e.beginPath();a[0]&&e.rect(5,a[0].bounds.y1,a[0].chart.width-10,a[0].bounds.height);d[0]&&e.rect(5,d[d.length-1].bounds.y1,d[0].chart.width-10,d[0].bounds.height);e.clip();if(a&&0<a.length)for(var l=0;l<a.length;l++)a[l].renderLabelsTicksAndTitle();
if(d&&0<d.length)for(l=0;l<d.length;l++)d[l].renderLabelsTicksAndTitle();e.restore();if(c&&0<c.length)for(l=0;l<c.length;l++)c[l].renderLabelsTicksAndTitle();if(b&&0<b.length)for(l=0;l<b.length;l++)b[l].renderLabelsTicksAndTitle();f.preparePlotArea();f=f.plotArea;e.save();e.beginPath();e.rect(f.x1,f.y1,Math.abs(f.x2-f.x1),Math.abs(f.y2-f.y1));e.clip();if(a&&0<a.length)for(l=0;l<a.length;l++)a[l].renderStripLinesOfThicknessType("value");if(d&&0<d.length)for(l=0;l<d.length;l++)d[l].renderStripLinesOfThicknessType("value");
if(c&&0<c.length)for(l=0;l<c.length;l++)c[l].renderStripLinesOfThicknessType("value");if(b&&0<b.length)for(l=0;l<b.length;l++)b[l].renderStripLinesOfThicknessType("value");if(a&&0<a.length)for(l=0;l<a.length;l++)a[l].renderInterlacedColors();if(d&&0<d.length)for(l=0;l<d.length;l++)d[l].renderInterlacedColors();if(c&&0<c.length)for(l=0;l<c.length;l++)c[l].renderInterlacedColors();if(b&&0<b.length)for(l=0;l<b.length;l++)b[l].renderInterlacedColors();e.restore();if(a&&0<a.length)for(l=0;l<a.length;l++)a[l].renderGrid(),
s&&(a[l].createMask(),a[l].renderBreaksBackground());if(d&&0<d.length)for(l=0;l<d.length;l++)d[l].renderGrid(),s&&(d[l].createMask(),d[l].renderBreaksBackground());if(c&&0<c.length)for(l=0;l<c.length;l++)c[l].renderGrid(),s&&(c[l].createMask(),c[l].renderBreaksBackground());if(b&&0<b.length)for(l=0;l<b.length;l++)b[l].renderGrid(),s&&(b[l].createMask(),b[l].renderBreaksBackground());if(a&&0<a.length)for(l=0;l<a.length;l++)a[l].renderAxisLine();if(d&&0<d.length)for(l=0;l<d.length;l++)d[l].renderAxisLine();
if(c&&0<c.length)for(l=0;l<c.length;l++)c[l].renderAxisLine();if(b&&0<b.length)for(l=0;l<b.length;l++)b[l].renderAxisLine();if(a&&0<a.length)for(l=0;l<a.length;l++)a[l].renderStripLinesOfThicknessType("pixel");if(d&&0<d.length)for(l=0;l<d.length;l++)d[l].renderStripLinesOfThicknessType("pixel");if(c&&0<c.length)for(l=0;l<c.length;l++)c[l].renderStripLinesOfThicknessType("pixel");if(b&&0<b.length)for(l=0;l<b.length;l++)b[l].renderStripLinesOfThicknessType("pixel")};D.prototype.calculateStripLinesThicknessInValues=
function(){for(var a=0;a<this.stripLines.length;a++)if(null!==this.stripLines[a].startValue&&null!==this.stripLines[a].endValue){var d=Math.min(this.stripLines[a].startValue,this.stripLines[a].endValue),c=Math.max(this.stripLines[a].startValue,this.stripLines[a].endValue),d=this.getApparentDifference(d,c);this.stripLines[a].value=this.logarithmic?this.stripLines[a].value*Math.sqrt(Math.log(Math.max(this.stripLines[a].startValue,this.stripLines[a].endValue)/Math.min(this.stripLines[a].startValue,this.stripLines[a].endValue))/
Math.log(d)):this.stripLines[a].value+(Math.abs(this.stripLines[a].endValue-this.stripLines[a].startValue)-d)/2;this.stripLines[a].thickness=d;this.stripLines[a]._thicknessType="value"}};D.prototype.calculateBreaksSizeInValues=function(){for(var a="left"===this._position||"right"===this._position?this.lineCoordinates.height||this.chart.height:this.lineCoordinates.width||this.chart.width,d=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[],c=this.conversionParameters.pixelPerUnit||a/(this.logarithmic?
this.conversionParameters.maximum/this.conversionParameters.minimum:this.conversionParameters.maximum-this.conversionParameters.minimum),b=this.scaleBreaks&&!r(this.scaleBreaks.options.spacing),e,f=0;f<d.length;f++)e=b||!r(d[f].options.spacing),d[f].spacing=Ra(d[f].spacing,a,8,e?0.1*a:8,e?0:3)<<0,d[f].size=0>d[f].spacing?0:Math.abs(d[f].spacing/c),this.logarithmic&&(d[f].size=Math.pow(this.logarithmBase,d[f].size))};D.prototype.calculateBreaksInPixels=function(){if(!(this.scaleBreaks&&0>=this.scaleBreaks._appliedBreaks.length)){var a=
this.scaleBreaks?this.scaleBreaks._appliedBreaks:[];a.length&&(this.scaleBreaks.firstBreakIndex=this.scaleBreaks.lastBreakIndex=null);for(var d=0;d<a.length&&!(a[d].startValue>this.conversionParameters.maximum);d++)a[d].endValue<this.conversionParameters.minimum||(r(this.scaleBreaks.firstBreakIndex)&&(this.scaleBreaks.firstBreakIndex=d),a[d].startValue>=this.conversionParameters.minimum&&(a[d].startPixel=this.convertValueToPixel(a[d].startValue),this.scaleBreaks.lastBreakIndex=d),a[d].endValue<=this.conversionParameters.maximum&&
(a[d].endPixel=this.convertValueToPixel(a[d].endValue)))}};D.prototype.renderLabelsTicksAndTitle=function(){var a=this,d=!1,c=0,b=0,e=1,f=0;0!==this.labelAngle&&360!==this.labelAngle&&(e=1.2);if("undefined"===typeof this.options.interval){if("bottom"===this._position||"top"===this._position)if(this.logarithmic&&!this.equidistantInterval&&this.labelAutoFit){for(var c=[],e=0!==this.labelAngle&&360!==this.labelAngle?1:1.2,l,k=this.viewportMaximum,m=this.lineCoordinates.width/Math.log(this.range),h=this._labels.length-
1;0<=h;h--){n=this._labels[h];if(n.position<this.viewportMinimum)break;n.position>this.viewportMaximum||!(h===this._labels.length-1||l<Math.log(k/n.position)*m/e)||(c.push(n),k=n.position,l=n.textBlock.width*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+n.textBlock.height*Math.abs(Math.sin(Math.PI/180*this.labelAngle)))}this._labels=c}else{for(h=0;h<this._labels.length;h++)n=this._labels[h],n.position<this.viewportMinimum||(l=n.textBlock.width*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+n.textBlock.height*
Math.abs(Math.sin(Math.PI/180*this.labelAngle)),c+=l);c>this.lineCoordinates.width*e&&this.labelAutoFit&&(d=!0)}if("left"===this._position||"right"===this._position)if(this.logarithmic&&!this.equidistantInterval&&this.labelAutoFit){for(var c=[],p,k=this.viewportMaximum,m=this.lineCoordinates.height/Math.log(this.range),h=this._labels.length-1;0<=h;h--){n=this._labels[h];if(n.position<this.viewportMinimum)break;n.position>this.viewportMaximum||!(h===this._labels.length-1||p<Math.log(k/n.position)*
m)||(c.push(n),k=n.position,p=n.textBlock.height*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+n.textBlock.width*Math.abs(Math.sin(Math.PI/180*this.labelAngle)))}this._labels=c}else{for(h=0;h<this._labels.length;h++)n=this._labels[h],n.position<this.viewportMinimum||(p=n.textBlock.height*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+n.textBlock.width*Math.abs(Math.sin(Math.PI/180*this.labelAngle)),b+=p);b>this.lineCoordinates.height*e&&this.labelAutoFit&&(d=!0)}}this.logarithmic&&(!this.equidistantInterval&&
this.labelAutoFit)&&this._labels.sort(function(a,b){return a.position-b.position});var h=0,n,q;if("bottom"===this._position){for(h=0;h<this._labels.length;h++)n=this._labels[h],n.position<this.viewportMinimum||n.position>this.viewportMaximum||(q=this.getPixelCoordinatesOnAxis(n.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(q.x<<0)+0.5:q.x<<0,this.ctx.beginPath(),this.ctx.moveTo(b,q.y<<
0),this.ctx.lineTo(b,q.y+this.tickLength<<0),this.ctx.stroke()),d&&0!==f++%2&&this.labelAutoFit||(0===n.textBlock.angle?(q.x-=n.textBlock.width/2,q.y="inside"===this.labelPlacement?q.y-(("inside"===this.tickPlacement?this.tickLength:0)+n.textBlock.height-n.textBlock.fontSize/2):q.y+("inside"===this.tickPlacement?0:this.tickLength)+n.textBlock.fontSize/2+5):(q.x="inside"===this.labelPlacement?0>this.labelAngle?q.x:q.x-n.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):q.x-(0>this.labelAngle?n.textBlock.width*
Math.cos(Math.PI/180*this.labelAngle):0),q.y="inside"===this.labelPlacement?0>this.labelAngle?q.y-("inside"===this.tickPlacement?this.tickLength:0)-5:q.y-("inside"===this.tickPlacement?0:this.tickLength)-Math.abs(n.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)+5):q.y+("inside"===this.tickPlacement?0:this.tickLength)+Math.abs(0>this.labelAngle?n.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-5:5)),n.textBlock.x=q.x,n.textBlock.y=q.y));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationEnd",
function(){for(h=0;h<a._labels.length;h++)if(n=a._labels[h],!(n.position<a.viewportMinimum||n.position>a.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(n.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(q.x<<0)+0.5:q.x<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(b,q.y<<0);a.ctx.lineTo(b,q.y-a.tickLength<<0);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+
this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y2-this._titleTextBlock.height-3,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("top"===this._position){for(h=0;h<this._labels.length;h++)n=this._labels[h],n.position<this.viewportMinimum||n.position>this.viewportMaximum||(q=this.getPixelCoordinatesOnAxis(n.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=
this.tickColor,b=1===this.ctx.lineWidth%2?(q.x<<0)+0.5:q.x<<0,this.ctx.beginPath(),this.ctx.moveTo(b,q.y<<0),this.ctx.lineTo(b,q.y-this.tickLength<<0),this.ctx.stroke()),d&&0!==f++%2&&this.labelAutoFit||(0===n.textBlock.angle?(q.x-=n.textBlock.width/2,q.y="inside"===this.labelPlacement?q.y+this.labelFontSize/2+("inside"===this.tickPlacement?this.tickLength:0)+5:q.y-(("inside"===this.tickPlacement?0:this.tickLength)+n.textBlock.height-n.textBlock.fontSize/2)):(q.x="inside"===this.labelPlacement?0<
this.labelAngle?q.x:q.x-n.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):q.x+(n.textBlock.height-this.labelFontSize)*Math.sin(Math.PI/180*this.labelAngle)-(0<this.labelAngle?n.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0),q.y="inside"===this.labelPlacement?0<this.labelAngle?q.y+("inside"===this.tickPlacement?this.tickLength:0)+5:q.y-n.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?this.tickLength:0)+5:q.y-(("inside"===this.tickPlacement?0:this.tickLength)+
((n.textBlock.height-n.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle)+(0<this.labelAngle?n.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):0)))),n.textBlock.x=q.x,n.textBlock.y=q.y));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationEnd",function(){for(h=0;h<a._labels.length;h++)if(n=a._labels[h],!(n.position<a.viewportMinimum||n.position>a.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(n.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=
a.tickColor;var b=1===a.ctx.lineWidth%2?(q.x<<0)+0.5:q.x<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(b,q.y<<0);a.ctx.lineTo(b,q.y+a.tickLength<<0);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y1+1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("left"===this._position){for(h=
0;h<this._labels.length;h++)n=this._labels[h],n.position<this.viewportMinimum||n.position>this.viewportMaximum||(q=this.getPixelCoordinatesOnAxis(n.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(q.y<<0)+0.5:q.y<<0,this.ctx.beginPath(),this.ctx.moveTo(q.x<<0,b),this.ctx.lineTo(q.x-this.tickLength<<0,b),this.ctx.stroke()),d&&0!==f++%2&&this.labelAutoFit||(0===this.labelAngle?(n.textBlock.y=
q.y,n.textBlock.x="inside"===this.labelPlacement?q.x+("inside"===this.tickPlacement?this.tickLength:0)+5:q.x-n.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?0:this.tickLength)-5):(n.textBlock.y="inside"===this.labelPlacement?q.y:q.y-n.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),n.textBlock.x="inside"===this.labelPlacement?q.x+("inside"===this.tickPlacement?this.tickLength:0)+5:0<this.labelAngle?q.x-n.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-
("inside"===this.tickPlacement?0:this.tickLength)-5:q.x-n.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)+(n.textBlock.height-n.textBlock.fontSize/2-5)*Math.sin(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?0:this.tickLength))));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationEnd",function(){for(h=0;h<a._labels.length;h++)if(n=a._labels[h],!(n.position<a.viewportMinimum||n.position>a.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(n.position),a.tickThickness)){a.ctx.lineWidth=
a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(q.y<<0)+0.5:q.y<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(q.x<<0,b);a.ctx.lineTo(q.x+a.tickLength<<0,b);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x1+1,this._titleTextBlock.y=this.lineCoordinates.height/2+this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("right"===
this._position){for(h=0;h<this._labels.length;h++)n=this._labels[h],n.position<this.viewportMinimum||n.position>this.viewportMaximum||(q=this.getPixelCoordinatesOnAxis(n.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(q.y<<0)+0.5:q.y<<0,this.ctx.beginPath(),this.ctx.moveTo(q.x<<0,b),this.ctx.lineTo(q.x+this.tickLength<<0,b),this.ctx.stroke()),d&&0!==f++%2&&this.labelAutoFit||(0===this.labelAngle?
(n.textBlock.y=q.y,n.textBlock.x="inside"===this.labelPlacement?q.x-n.textBlock.width-("inside"===this.tickPlacement?this.tickLength:0)-5:q.x+("inside"===this.tickPlacement?0:this.tickLength)+5):(n.textBlock.y="inside"===this.labelPlacement?q.y-n.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):0>this.labelAngle?q.y:q.y-(n.textBlock.height-n.textBlock.fontSize/2-5)*Math.cos(Math.PI/180*this.labelAngle),n.textBlock.x="inside"===this.labelPlacement?q.x-n.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-
("inside"===this.tickPlacement?this.tickLength:0)-5:0<this.labelAngle?q.x+(n.textBlock.height-n.textBlock.fontSize/2-5)*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?0:this.tickLength):q.x+("inside"===this.tickPlacement?0:this.tickLength)+5)));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationEnd",function(){for(h=0;h<a._labels.length;h++)if(n=a._labels[h],!(n.position<a.viewportMinimum||n.position>a.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(n.position),
a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(q.y<<0)+0.5:q.y<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(q.x<<0,b);a.ctx.lineTo(q.x-a.tickLength<<0,b);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x2-1,this._titleTextBlock.y=this.lineCoordinates.height/2-this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}f=
0;if("inside"===this.labelPlacement)this.chart.addEventListener("dataAnimationEnd",function(){for(h=0;h<a._labels.length;h++)n=a._labels[h],n.position<a.viewportMinimum||(n.position>a.viewportMaximum||d&&0!==f++%2&&a.labelAutoFit)||(a.ctx.save(),a.ctx.beginPath(),n.textBlock.render(!0),a.ctx.restore())},this);else for(h=0;h<this._labels.length;h++)n=this._labels[h],n.position<this.viewportMinimum||(n.position>this.viewportMaximum||d&&0!==f++%2&&this.labelAutoFit)||n.textBlock.render(!0)};D.prototype.renderInterlacedColors=
function(){var a=this.chart.plotArea.ctx,d,c,b=this.chart.plotArea,e=0;d=!0;if(("bottom"===this._position||"top"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,e=0;e<this._labels.length;e++)d?(d=this.getPixelCoordinatesOnAxis(this._labels[e].position),c=e+1>this._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[e+1].position),a.fillRect(Math.min(c.x,d.x),b.y1,Math.abs(c.x-d.x),Math.abs(b.y1-b.y2)),d=!1):
d=!0;else if(("left"===this._position||"right"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,e=0;e<this._labels.length;e++)d?(c=this.getPixelCoordinatesOnAxis(this._labels[e].position),d=e+1>this._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[e+1].position),a.fillRect(b.x1,Math.min(c.y,d.y),Math.abs(b.x1-b.x2),Math.abs(d.y-c.y)),d=!1):d=!0;a.beginPath()};D.prototype.renderStripLinesOfThicknessType=function(a){if(this.stripLines&&
0<this.stripLines.length&&a){for(var d=this,c,b=0,e=0,f=!1,l=!1,k=[],m=[],l=!1,b=0;b<this.stripLines.length;b++){var h=this.stripLines[b];h._thicknessType===a&&("pixel"===a&&(h.value<this.viewportMinimum||h.value>this.viewportMaximum||r(h.value)||isNaN(this.range))||"value"===a&&(h.startValue<=this.viewportMinimum&&h.endValue<=this.viewportMinimum||h.startValue>=this.viewportMaximum&&h.endValue>=this.viewportMaximum||r(h.startValue)||r(h.endValue)||isNaN(this.range))||k.push(h))}for(b=0;b<this._stripLineLabels.length;b++)if(h=
this.stripLines[b],c=this._stripLineLabels[b],!(c.position<this.viewportMinimum||c.position>this.viewportMaximum||isNaN(this.range))){a=this.getPixelCoordinatesOnAxis(c.position);if("outside"===c.stripLine.labelPlacement)if(h&&(this.ctx.strokeStyle=h.color,"pixel"===h._thicknessType&&(this.ctx.lineWidth=h.thickness)),"bottom"===this._position){var p=1===this.ctx.lineWidth%2?(a.x<<0)+0.5:a.x<<0;this.ctx.beginPath();this.ctx.moveTo(p,a.y<<0);this.ctx.lineTo(p,a.y+this.tickLength<<0);this.ctx.stroke();
0===this.labelAngle?(a.x-=c.textBlock.width/2,a.y+=this.tickLength+c.textBlock.fontSize/2):(a.x-=0>this.labelAngle?c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,a.y+=this.tickLength+Math.abs(0>this.labelAngle?c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-5:5))}else"top"===this._position?(p=1===this.ctx.lineWidth%2?(a.x<<0)+0.5:a.x<<0,this.ctx.beginPath(),this.ctx.moveTo(p,a.y<<0),this.ctx.lineTo(p,a.y-this.tickLength<<0),this.ctx.stroke(),0===this.labelAngle?(a.x-=c.textBlock.width/
2,a.y-=this.tickLength+c.textBlock.height):(a.x+=(c.textBlock.height-this.tickLength-this.labelFontSize/2)*Math.sin(Math.PI/180*this.labelAngle)-(0<this.labelAngle?c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0),a.y-=this.tickLength+(c.textBlock.height*Math.cos(Math.PI/180*this.labelAngle)+(0<this.labelAngle?c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):0)))):"left"===this._position?(p=1===this.ctx.lineWidth%2?(a.y<<0)+0.5:a.y<<0,this.ctx.beginPath(),this.ctx.moveTo(a.x<<0,p),
this.ctx.lineTo(a.x-this.tickLength<<0,p),this.ctx.stroke(),0===this.labelAngle?a.x=a.x-c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-this.tickLength-5:(a.y-=c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),a.x=0<this.labelAngle?a.x-c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-this.tickLength-5:a.x-c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)+(c.textBlock.height-c.textBlock.fontSize/2-5)*Math.sin(Math.PI/180*this.labelAngle)-this.tickLength)):"right"===this._position&&
(p=1===this.ctx.lineWidth%2?(a.y<<0)+0.5:a.y<<0,this.ctx.beginPath(),this.ctx.moveTo(a.x<<0,p),this.ctx.lineTo(a.x+this.tickLength<<0,p),this.ctx.stroke(),0===this.labelAngle?a.x=a.x+this.tickLength+5:(a.y=0>this.labelAngle?a.y:a.y-(c.textBlock.height-c.textBlock.fontSize/2-5)*Math.cos(Math.PI/180*this.labelAngle),a.x=0<this.labelAngle?a.x+(c.textBlock.height-c.textBlock.fontSize/2-5)*Math.sin(Math.PI/180*this.labelAngle)+this.tickLength:a.x+this.tickLength+5));else c.textBlock.angle=-90,"bottom"===
this._position?(c.textBlock.maxWidth=this.options.stripLines[b].labelMaxWidth?this.options.stripLines[b].labelMaxWidth:this.chart.plotArea.height-3,c.textBlock.measureText(),a.x-c.textBlock.height>this.chart.plotArea.x1?r(h.startValue)?a.x-=c.textBlock.height-c.textBlock.fontSize/2:a.x-=c.textBlock.height/2-c.textBlock.fontSize/2+3:(c.textBlock.angle=90,r(h.startValue)?a.x+=c.textBlock.height-c.textBlock.fontSize/2:a.x+=c.textBlock.height/2-c.textBlock.fontSize/2+3),a.y=-90===c.textBlock.angle?"near"===
c.stripLine.labelAlign?this.chart.plotArea.y2-3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1+c.textBlock.width)/2:this.chart.plotArea.y1+c.textBlock.width+3:"near"===c.stripLine.labelAlign?this.chart.plotArea.y2-c.textBlock.width-3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1-c.textBlock.width)/2:this.chart.plotArea.y1+3):"top"===this._position?(c.textBlock.maxWidth=this.options.stripLines[b].labelMaxWidth?this.options.stripLines[b].labelMaxWidth:
this.chart.plotArea.height-3,c.textBlock.measureText(),a.x-c.textBlock.height>this.chart.plotArea.x1?r(h.startValue)?a.x-=c.textBlock.height-c.textBlock.fontSize/2:a.x-=c.textBlock.height/2-c.textBlock.fontSize/2+3:(c.textBlock.angle=90,r(h.startValue)?a.x+=c.textBlock.height-c.textBlock.fontSize/2:a.x+=c.textBlock.height/2-c.textBlock.fontSize/2+3),a.y=-90===c.textBlock.angle?"near"===c.stripLine.labelAlign?this.chart.plotArea.y1+c.textBlock.width+3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.y2+
this.chart.plotArea.y1+c.textBlock.width)/2:this.chart.plotArea.y2-3:"near"===c.stripLine.labelAlign?this.chart.plotArea.y1+3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1-c.textBlock.width)/2:this.chart.plotArea.y2-c.textBlock.width-3):"left"===this._position?(c.textBlock.maxWidth=this.options.stripLines[b].labelMaxWidth?this.options.stripLines[b].labelMaxWidth:this.chart.plotArea.width-3,c.textBlock.angle=0,c.textBlock.measureText(),a.y-c.textBlock.height>this.chart.plotArea.y1?
r(h.startValue)?a.y-=c.textBlock.height-c.textBlock.fontSize/2:a.y-=c.textBlock.height/2-c.textBlock.fontSize+3:a.y-c.textBlock.height<this.chart.plotArea.y2?a.y+=c.textBlock.fontSize/2+3:r(h.startValue)?a.y-=c.textBlock.height-c.textBlock.fontSize/2:a.y-=c.textBlock.height/2-c.textBlock.fontSize+3,a.x="near"===c.stripLine.labelAlign?this.chart.plotArea.x1+3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.x2+this.chart.plotArea.x1)/2-c.textBlock.width/2:this.chart.plotArea.x2-c.textBlock.width-
3):"right"===this._position&&(c.textBlock.maxWidth=this.options.stripLines[b].labelMaxWidth?this.options.stripLines[b].labelMaxWidth:this.chart.plotArea.width-3,c.textBlock.angle=0,c.textBlock.measureText(),a.y-+c.textBlock.height>this.chart.plotArea.y1?r(h.startValue)?a.y-=c.textBlock.height-c.textBlock.fontSize/2:a.y-=c.textBlock.height/2-c.textBlock.fontSize/2-3:a.y-c.textBlock.height<this.chart.plotArea.y2?a.y+=c.textBlock.fontSize/2+3:r(h.startValue)?a.y-=c.textBlock.height-c.textBlock.fontSize/
2:a.y-=c.textBlock.height/2-c.textBlock.fontSize/2+3,a.x="near"===c.stripLine.labelAlign?this.chart.plotArea.x2-c.textBlock.width-3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.x2+this.chart.plotArea.x1)/2-c.textBlock.width/2:this.chart.plotArea.x1+3);c.textBlock.x=a.x;c.textBlock.y=a.y;m.push(c)}if(!l){l=!1;this.ctx.save();this.ctx.beginPath();this.ctx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height);this.ctx.clip();for(b=0;b<k.length;b++)h=
k[b],h.showOnTop?f||(f=!0,this.chart.addEventListener("dataAnimationIterationEnd",function(){this.ctx.save();this.ctx.beginPath();this.ctx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height);this.ctx.clip();for(e=0;e<k.length;e++)h=k[e],h.showOnTop&&h.render();this.ctx.restore()},h)):h.render();for(b=0;b<m.length;b++)c=m[b],c.stripLine.showOnTop?l||(l=!0,this.chart.addEventListener("dataAnimationIterationEnd",function(){for(e=0;e<m.length;e++)c=
m[e],"inside"===c.stripLine.labelPlacement&&c.stripLine.showOnTop&&(d.ctx.save(),d.ctx.beginPath(),d.ctx.rect(d.chart.plotArea.x1,d.chart.plotArea.y1,d.chart.plotArea.width,d.chart.plotArea.height),d.ctx.clip(),c.textBlock.render(!0),d.ctx.restore())},c.textBlock)):"inside"===c.stripLine.labelPlacement&&c.textBlock.render(!0);this.ctx.restore();l=!0}if(l)for(l=!1,b=0;b<m.length;b++)c=m[b],"outside"===c.stripLine.labelPlacement&&c.textBlock.render(!0)}};D.prototype.renderBreaksBackground=function(){this.chart._breaksCanvas&&
(this.scaleBreaks&&0<this.scaleBreaks._appliedBreaks.length&&this.maskCanvas)&&(this.chart._breaksCanvasCtx.save(),this.chart._breaksCanvasCtx.beginPath(),this.chart._breaksCanvasCtx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height),this.chart._breaksCanvasCtx.clip(),this.chart._breaksCanvasCtx.drawImage(this.maskCanvas,0,0,this.chart.width,this.chart.height),this.chart._breaksCanvasCtx.restore())};D.prototype.createMask=function(){if(this.scaleBreaks&&
0<this.scaleBreaks._appliedBreaks.length){var a=this.scaleBreaks._appliedBreaks;s?(this.maskCanvas=ta(this.chart.width,this.chart.height),this.maskCtx=this.maskCanvas.getContext("2d")):(this.maskCanvas=this.chart.plotArea.canvas,this.maskCtx=this.chart.plotArea.ctx);this.maskCtx.save();this.maskCtx.beginPath();this.maskCtx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height);this.maskCtx.clip();for(var d=0;d<a.length;d++)a[d].endValue<this.viewportMinimum||
(a[d].startValue>this.viewportMaximum||isNaN(this.range))||a[d].render(this.maskCtx);this.maskCtx.restore()}};D.prototype.renderCrosshair=function(a,d){isFinite(this.minimum)&&isFinite(this.maximum)&&(this.crosshair.render(a,d),this.crosshair.dispatchEvent("updated",{chart:this.chart,crosshair:this.options,axis:this,value:this.crosshair.value},this))};D.prototype.showCrosshair=function(a){r(a)||(a<this.viewportMinimum||a>this.viewportMaximum)||("top"===this._position||"bottom"===this._position?this.crosshair.render(this.convertValueToPixel(a),
null,a):this.crosshair.render(null,this.convertValueToPixel(a),a))};D.prototype.renderGrid=function(){if(this.gridThickness&&0<this.gridThickness){var a=this.chart.ctx;a.save();var d,c=this.chart.plotArea;a.lineWidth=this.gridThickness;a.strokeStyle=this.gridColor;a.setLineDash&&a.setLineDash(Q(this.gridDashType,this.gridThickness));if("bottom"===this._position||"top"===this._position)for(b=0;b<this._labels.length;b++)this._labels[b].position<this.viewportMinimum||(this._labels[b].position>this.viewportMaximum||
this._labels[b].breaksLabelType)||(a.beginPath(),d=this.getPixelCoordinatesOnAxis(this._labels[b].position),d=1===a.lineWidth%2?(d.x<<0)+0.5:d.x<<0,a.moveTo(d,c.y1<<0),a.lineTo(d,c.y2<<0),a.stroke());else if("left"===this._position||"right"===this._position)for(var b=0;b<this._labels.length;b++)this._labels[b].position<this.viewportMinimum||(this._labels[b].position>this.viewportMaximum||this._labels[b].breaksLabelType)||(a.beginPath(),d=this.getPixelCoordinatesOnAxis(this._labels[b].position),d=
1===a.lineWidth%2?(d.y<<0)+0.5:d.y<<0,a.moveTo(c.x1<<0,d),a.lineTo(c.x2<<0,d),a.stroke());a.restore()}};D.prototype.renderAxisLine=function(){var a=this.chart.ctx,d=s?this.chart._preRenderCtx:a,c=Math.ceil(this.tickThickness/(this.reversed?-2:2)),b=Math.ceil(this.tickThickness/(this.reversed?2:-2)),e,f;d.save();if("bottom"===this._position||"top"===this._position){if(this.lineThickness){this.reversed?(e=this.lineCoordinates.x2,f=this.lineCoordinates.x1):(e=this.lineCoordinates.x1,f=this.lineCoordinates.x2);
d.lineWidth=this.lineThickness;d.strokeStyle=this.lineColor?this.lineColor:"black";d.setLineDash&&d.setLineDash(Q(this.lineDashType,this.lineThickness));var l=1===this.lineThickness%2?(this.lineCoordinates.y1<<0)+0.5:this.lineCoordinates.y1<<0;d.beginPath();if(this.scaleBreaks&&!r(this.scaleBreaks.firstBreakIndex))if(r(this.scaleBreaks.lastBreakIndex))e=this.scaleBreaks._appliedBreaks[this.scaleBreaks.firstBreakIndex].endPixel+b;else for(var k=this.scaleBreaks.firstBreakIndex;k<=this.scaleBreaks.lastBreakIndex;k++)d.moveTo(e,
l),d.lineTo(this.scaleBreaks._appliedBreaks[k].startPixel+c,l),e=this.scaleBreaks._appliedBreaks[k].endPixel+b;e&&(d.moveTo(e,l),d.lineTo(f,l));d.stroke()}}else if(("left"===this._position||"right"===this._position)&&this.lineThickness){this.reversed?(e=this.lineCoordinates.y1,f=this.lineCoordinates.y2):(e=this.lineCoordinates.y2,f=this.lineCoordinates.y1);d.lineWidth=this.lineThickness;d.strokeStyle=this.lineColor;d.setLineDash&&d.setLineDash(Q(this.lineDashType,this.lineThickness));l=1===this.lineThickness%
2?(this.lineCoordinates.x1<<0)+0.5:this.lineCoordinates.x1<<0;d.beginPath();if(this.scaleBreaks&&!r(this.scaleBreaks.firstBreakIndex))if(r(this.scaleBreaks.lastBreakIndex))e=this.scaleBreaks._appliedBreaks[this.scaleBreaks.firstBreakIndex].endPixel+c;else for(k=this.scaleBreaks.firstBreakIndex;k<=this.scaleBreaks.lastBreakIndex;k++)d.moveTo(l,e),d.lineTo(l,this.scaleBreaks._appliedBreaks[k].startPixel+b),e=this.scaleBreaks._appliedBreaks[k].endPixel+c;e&&(d.moveTo(l,e),d.lineTo(l,f));d.stroke()}s&&
(a.drawImage(this.chart._preRenderCanvas,0,0,this.chart.width,this.chart.height),this.chart._breaksCanvasCtx&&this.chart._breaksCanvasCtx.drawImage(this.chart._preRenderCanvas,0,0,this.chart.width,this.chart.height),d.clearRect(0,0,this.chart.width,this.chart.height));d.restore()};D.prototype.getPixelCoordinatesOnAxis=function(a){var d={};if("bottom"===this._position||"top"===this._position)d.x=this.convertValueToPixel(a),d.y=this.lineCoordinates.y1;if("left"===this._position||"right"===this._position)d.y=
this.convertValueToPixel(a),d.x=this.lineCoordinates.x2;return d};D.prototype.convertPixelToValue=function(a){if("undefined"===typeof a)return null;var d=0,c=0,b,d=!0,e=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[],c="number"===typeof a?a:"left"===this._position||"right"===this._position?a.y:a.x;if(this.logarithmic){a=b=Math.pow(this.logarithmBase,(c-this.conversionParameters.reference)/this.conversionParameters.pixelPerUnit);if(c<=this.conversionParameters.reference===("left"===this._position||
"right"===this._position)!==this.reversed)for(c=0;c<e.length;c++){if(!(e[c].endValue<this.conversionParameters.minimum))if(d)if(e[c].startValue<this.conversionParameters.minimum){if(1<e[c].size&&this.conversionParameters.minimum*Math.pow(e[c].endValue/e[c].startValue,Math.log(b)/Math.log(e[c].size))<e[c].endValue){a=Math.pow(e[c].endValue/e[c].startValue,Math.log(b)/Math.log(e[c].size));break}else a*=e[c].endValue/this.conversionParameters.minimum/Math.pow(e[c].size,Math.log(e[c].endValue/this.conversionParameters.minimum)/
Math.log(e[c].endValue/e[c].startValue)),b/=Math.pow(e[c].size,Math.log(e[c].endValue/this.conversionParameters.minimum)/Math.log(e[c].endValue/e[c].startValue));d=!1}else if(b>e[c].startValue/this.conversionParameters.minimum){b/=e[c].startValue/this.conversionParameters.minimum;if(b<e[c].size){a*=Math.pow(e[c].endValue/e[c].startValue,1===e[c].size?1:Math.log(b)/Math.log(e[c].size))/b;break}else a*=e[c].endValue/e[c].startValue/e[c].size;b/=e[c].size;d=!1}else break;else if(b>e[c].startValue/e[c-
1].endValue){b/=e[c].startValue/e[c-1].endValue;if(b<e[c].size){a*=Math.pow(e[c].endValue/e[c].startValue,1===e[c].size?1:Math.log(b)/Math.log(e[c].size))/b;break}else a*=e[c].endValue/e[c].startValue/e[c].size;b/=e[c].size}else break}else for(c=e.length-1;0<=c;c--)if(!(e[c].startValue>this.conversionParameters.minimum))if(d)if(e[c].endValue>this.conversionParameters.minimum){if(1<e[c].size&&this.conversionParameters.minimum*Math.pow(e[c].endValue/e[c].startValue,Math.log(b)/Math.log(e[c].size))>
e[c].startValue){a=Math.pow(e[c].endValue/e[c].startValue,Math.log(b)/Math.log(e[c].size));break}else a*=e[c].startValue/this.conversionParameters.minimum*Math.pow(e[c].size,Math.log(e[c].startValue/this.conversionParameters.minimum)/Math.log(e[c].endValue/e[c].startValue))*b,b*=Math.pow(e[c].size,Math.log(this.conversionParameters.minimum/e[c].startValue)/Math.log(e[c].endValue/e[c].startValue));d=!1}else if(b<e[c].endValue/this.conversionParameters.minimum){b/=e[c].endValue/this.conversionParameters.minimum;
if(b>1/e[c].size){a*=Math.pow(e[c].endValue/e[c].startValue,1>=e[c].size?1:Math.log(b)/Math.log(e[c].size))*b;break}else a/=e[c].endValue/e[c].startValue/e[c].size;b*=e[c].size;d=!1}else break;else if(b<e[c].endValue/e[c+1].startValue){b/=e[c].endValue/e[c+1].startValue;if(b>1/e[c].size){a*=Math.pow(e[c].endValue/e[c].startValue,1>=e[c].size?1:Math.log(b)/Math.log(e[c].size))*b;break}else a/=e[c].endValue/e[c].startValue/e[c].size;b*=e[c].size}else break;d=a*this.viewportMinimum}else{a=b=(c-this.conversionParameters.reference)/
this.conversionParameters.pixelPerUnit;if(c<=this.conversionParameters.reference===("left"===this._position||"right"===this._position)!==this.reversed)for(c=0;c<e.length;c++){if(!(e[c].endValue<this.conversionParameters.minimum))if(d)if(e[c].startValue<this.conversionParameters.minimum){if(e[c].size&&this.conversionParameters.minimum+b*(e[c].endValue-e[c].startValue)/e[c].size<e[c].endValue){a=0>=e[c].size?0:b*(e[c].endValue-e[c].startValue)/e[c].size;break}else a+=e[c].endValue-this.conversionParameters.minimum-
e[c].size*(e[c].endValue-this.conversionParameters.minimum)/(e[c].endValue-e[c].startValue),b-=e[c].size*(e[c].endValue-this.conversionParameters.minimum)/(e[c].endValue-e[c].startValue);d=!1}else if(b>e[c].startValue-this.conversionParameters.minimum){b-=e[c].startValue-this.conversionParameters.minimum;if(b<e[c].size){a+=(e[c].endValue-e[c].startValue)*(0===e[c].size?1:b/e[c].size)-b;break}else a+=e[c].endValue-e[c].startValue-e[c].size;b-=e[c].size;d=!1}else break;else if(b>e[c].startValue-e[c-
1].endValue){b-=e[c].startValue-e[c-1].endValue;if(b<e[c].size){a+=(e[c].endValue-e[c].startValue)*(0===e[c].size?1:b/e[c].size)-b;break}else a+=e[c].endValue-e[c].startValue-e[c].size;b-=e[c].size}else break}else for(c=e.length-1;0<=c;c--)if(!(e[c].startValue>this.conversionParameters.minimum))if(d)if(e[c].endValue>this.conversionParameters.minimum)if(e[c].size&&this.conversionParameters.minimum+b*(e[c].endValue-e[c].startValue)/e[c].size>e[c].startValue){a=0>=e[c].size?0:b*(e[c].endValue-e[c].startValue)/
e[c].size;break}else a+=e[c].startValue-this.conversionParameters.minimum+e[c].size*(this.conversionParameters.minimum-e[c].startValue)/(e[c].endValue-e[c].startValue),b+=e[c].size*(this.conversionParameters.minimum-e[c].startValue)/(e[c].endValue-e[c].startValue),d=!1;else if(b<e[c].endValue-this.conversionParameters.minimum){b-=e[c].endValue-this.conversionParameters.minimum;if(b>-1*e[c].size){a+=(e[c].endValue-e[c].startValue)*(0===e[c].size?1:b/e[c].size)+b;break}else a-=e[c].endValue-e[c].startValue-
e[c].size;b+=e[c].size;d=!1}else break;else if(b<e[c].endValue-e[c+1].startValue){b-=e[c].endValue-e[c+1].startValue;if(b>-1*e[c].size){a+=(e[c].endValue-e[c].startValue)*(0===e[c].size?1:b/e[c].size)+b;break}else a-=e[c].endValue-e[c].startValue-e[c].size;b+=e[c].size}else break;d=this.conversionParameters.minimum+a}return d};D.prototype.convertValueToPixel=function(a){a=this.getApparentDifference(this.conversionParameters.minimum,a,a);return this.logarithmic?this.conversionParameters.reference+
this.conversionParameters.pixelPerUnit*Math.log(a/this.conversionParameters.minimum)/this.conversionParameters.lnLogarithmBase+0.5<<0:"axisX"===this.type?this.conversionParameters.reference+this.conversionParameters.pixelPerUnit*(a-this.conversionParameters.minimum)+0.5<<0:this.conversionParameters.reference+this.conversionParameters.pixelPerUnit*(a-this.conversionParameters.minimum)+0.5};D.prototype.getApparentDifference=function(a,d,c,b){var e=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[];
if(this.logarithmic){c=r(c)?d/a:c;for(var f=0;f<e.length&&!(d<e[f].startValue);f++)a>e[f].endValue||(a<=e[f].startValue&&d>=e[f].endValue?c=c/e[f].endValue*e[f].startValue*e[f].size:a>=e[f].startValue&&d>=e[f].endValue?c=c/e[f].endValue*a*Math.pow(e[f].size,Math.log(e[f].endValue/a)/Math.log(e[f].endValue/e[f].startValue)):a<=e[f].startValue&&d<=e[f].endValue?c=c/d*e[f].startValue*Math.pow(e[f].size,Math.log(d/e[f].startValue)/Math.log(e[f].endValue/e[f].startValue)):!b&&(a>e[f].startValue&&d<e[f].endValue)&&
(c=a*Math.pow(e[f].size,Math.log(d/a)/Math.log(e[f].endValue/e[f].startValue))))}else for(c=r(c)?Math.abs(d-a):c,f=0;f<e.length&&!(d<e[f].startValue);f++)a>e[f].endValue||(a<=e[f].startValue&&d>=e[f].endValue?c=c-e[f].endValue+e[f].startValue+e[f].size:a>e[f].startValue&&d>=e[f].endValue?c=c-e[f].endValue+a+e[f].size*(e[f].endValue-a)/(e[f].endValue-e[f].startValue):a<=e[f].startValue&&d<e[f].endValue?c=c-d+e[f].startValue+e[f].size*(d-e[f].startValue)/(e[f].endValue-e[f].startValue):!b&&(a>e[f].startValue&&
d<e[f].endValue)&&(c=a+e[f].size*(d-a)/(e[f].endValue-e[f].startValue)));return c};D.prototype.setViewPortRange=function(a,d){this.sessionVariables.newViewportMinimum=this.viewportMinimum=Math.min(a,d);this.sessionVariables.newViewportMaximum=this.viewportMaximum=Math.max(a,d)};D.prototype.getXValueAt=function(a){if(!a)return null;var d=null;"left"===this._position?d=this.convertPixelToValue(a.y):"bottom"===this._position&&(d=this.convertPixelToValue(a.x));return d};D.prototype.calculateValueToPixelConversionParameters=
function(a){a=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[];var d={pixelPerUnit:null,minimum:null,reference:null},c=this.lineCoordinates.width,b=this.lineCoordinates.height,c="bottom"===this._position||"top"===this._position?c:b,b=Math.abs(this.range);if(this.logarithmic)for(var e=0;e<a.length&&!(this.viewportMaximum<a[e].startValue);e++)this.viewportMinimum>a[e].endValue||(this.viewportMinimum>=a[e].startValue&&this.viewportMaximum<=a[e].endValue?c=0:this.viewportMinimum<=a[e].startValue&&
this.viewportMaximum>=a[e].endValue?(b=b/a[e].endValue*a[e].startValue,c=0<a[e].spacing.toString().indexOf("%")?c*(1-parseFloat(a[e].spacing)/100):c-Math.min(a[e].spacing,0.1*c)):this.viewportMinimum>a[e].startValue&&this.viewportMaximum>=a[e].endValue?(b=b/a[e].endValue*this.viewportMinimum,c=0<a[e].spacing.toString().indexOf("%")?c*(1-parseFloat(a[e].spacing)/100*Math.log(a[e].endValue/this.viewportMinimum)/Math.log(a[e].endValue/a[e].startValue)):c-Math.min(a[e].spacing,0.1*c)*Math.log(a[e].endValue/
this.viewportMinimum)/Math.log(a[e].endValue/a[e].startValue)):this.viewportMinimum<=a[e].startValue&&this.viewportMaximum<a[e].endValue&&(b=b/this.viewportMaximum*a[e].startValue,c=0<a[e].spacing.toString().indexOf("%")?c*(1-parseFloat(a[e].spacing)/100*Math.log(this.viewportMaximum/a[e].startValue)/Math.log(a[e].endValue/a[e].startValue)):c-Math.min(a[e].spacing,0.1*c)*Math.log(this.viewportMaximum/a[e].startValue)/Math.log(a[e].endValue/a[e].startValue)));else for(e=0;e<a.length&&!(this.viewportMaximum<
a[e].startValue);e++)this.viewportMinimum>a[e].endValue||(this.viewportMinimum>=a[e].startValue&&this.viewportMaximum<=a[e].endValue?c=0:this.viewportMinimum<=a[e].startValue&&this.viewportMaximum>=a[e].endValue?(b=b-a[e].endValue+a[e].startValue,c=0<a[e].spacing.toString().indexOf("%")?c*(1-parseFloat(a[e].spacing)/100):c-Math.min(a[e].spacing,0.1*c)):this.viewportMinimum>a[e].startValue&&this.viewportMaximum>=a[e].endValue?(b=b-a[e].endValue+this.viewportMinimum,c=0<a[e].spacing.toString().indexOf("%")?
c*(1-parseFloat(a[e].spacing)/100*(a[e].endValue-this.viewportMinimum)/(a[e].endValue-a[e].startValue)):c-Math.min(a[e].spacing,0.1*c)*(a[e].endValue-this.viewportMinimum)/(a[e].endValue-a[e].startValue)):this.viewportMinimum<=a[e].startValue&&this.viewportMaximum<a[e].endValue&&(b=b-this.viewportMaximum+a[e].startValue,c=0<a[e].spacing.toString().indexOf("%")?c*(1-parseFloat(a[e].spacing)/100*(this.viewportMaximum-a[e].startValue)/(a[e].endValue-a[e].startValue)):c-Math.min(a[e].spacing,0.1*c)*(this.viewportMaximum-
a[e].startValue)/(a[e].endValue-a[e].startValue)));d.minimum=this.viewportMinimum;d.maximum=this.viewportMaximum;d.range=b;if("bottom"===this._position||"top"===this._position)this.logarithmic?(d.lnLogarithmBase=Math.log(this.logarithmBase),d.pixelPerUnit=(this.reversed?-1:1)*c*d.lnLogarithmBase/Math.log(Math.abs(b))):d.pixelPerUnit=(this.reversed?-1:1)*c/Math.abs(b),d.reference=this.reversed?this.lineCoordinates.x2:this.lineCoordinates.x1;if("left"===this._position||"right"===this._position)this.logarithmic?
(d.lnLogarithmBase=Math.log(this.logarithmBase),d.pixelPerUnit=(this.reversed?1:-1)*c*d.lnLogarithmBase/Math.log(Math.abs(b))):d.pixelPerUnit=(this.reversed?1:-1)*c/Math.abs(b),d.reference=this.reversed?this.lineCoordinates.y1:this.lineCoordinates.y2;this.conversionParameters=d};D.prototype.calculateAxisParameters=function(){if(this.logarithmic)this.calculateLogarithmicAxisParameters();else{var a=this.chart.layoutManager.getFreeSpace(),d=!1,c=!1;"bottom"===this._position||"top"===this._position?(this.maxWidth=
a.width,this.maxHeight=a.height):(this.maxWidth=a.height,this.maxHeight=a.width);var a="axisX"===this.type?"xySwapped"===this.chart.plotInfo.axisPlacement?62:70:"xySwapped"===this.chart.plotInfo.axisPlacement?50:40,b=4;"axisX"===this.type&&(b=600>this.maxWidth?8:6);var a=Math.max(b,Math.floor(this.maxWidth/a)),e,f,l,b=0;!r(this.options.viewportMinimum)&&(!r(this.options.viewportMaximum)&&this.options.viewportMinimum>=this.options.viewportMaximum)&&(this.viewportMinimum=this.viewportMaximum=null);
if(r(this.options.viewportMinimum)&&!r(this.sessionVariables.newViewportMinimum)&&!isNaN(this.sessionVariables.newViewportMinimum))this.viewportMinimum=this.sessionVariables.newViewportMinimum;else if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum=this.minimum;if(r(this.options.viewportMaximum)&&!r(this.sessionVariables.newViewportMaximum)&&!isNaN(this.sessionVariables.newViewportMaximum))this.viewportMaximum=this.sessionVariables.newViewportMaximum;else if(null===this.viewportMaximum||
isNaN(this.viewportMaximum))this.viewportMaximum=this.maximum;if(this.scaleBreaks)for(b=0;b<this.scaleBreaks._appliedBreaks.length;b++)if((!r(this.sessionVariables.newViewportMinimum)&&this.sessionVariables.newViewportMinimum>=this.scaleBreaks._appliedBreaks[b].startValue||!r(this.options.minimum)&&this.options.minimum>=this.scaleBreaks._appliedBreaks[b].startValue||!r(this.options.viewportMinimum)&&this.viewportMinimum>=this.scaleBreaks._appliedBreaks[b].startValue)&&(!r(this.sessionVariables.newViewportMaximum)&&
this.sessionVariables.newViewportMaximum<=this.scaleBreaks._appliedBreaks[b].endValue||!r(this.options.maximum)&&this.options.maximum<=this.scaleBreaks._appliedBreaks[b].endValue||!r(this.options.viewportMaximum)&&this.viewportMaximum<=this.scaleBreaks._appliedBreaks[b].endValue)){this.scaleBreaks._appliedBreaks.splice(b,1);break}if("axisX"===this.type){if(this.dataSeries&&0<this.dataSeries.length)for(e=0;e<this.dataSeries.length;e++)"dateTime"===this.dataSeries[e].xValueType&&(c=!0);e=null!==this.viewportMinimum?
this.viewportMinimum:this.dataInfo.viewPortMin;f=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax;0===f-e&&(b="undefined"===typeof this.options.interval?0.4:this.options.interval,f+=b,e-=b);Infinity!==this.dataInfo.minDiff?l=this.dataInfo.minDiff:1<f-e?l=0.5*Math.abs(f-e):(l=1,c&&(d=!0))}else"axisY"===this.type&&(e=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin,f=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax,isFinite(e)||
isFinite(f)?isFinite(e)?isFinite(f)||(f=e):e=f:(f="undefined"===typeof this.options.interval?-Infinity:this.options.interval,e="undefined"!==typeof this.options.interval||isFinite(this.dataInfo.minDiff)?0:Infinity),0===e&&0===f?(f+=9,e=0):0===f-e?(b=Math.min(Math.abs(0.01*Math.abs(f)),5),f+=b,e-=b):e>f?(b=Math.min(0.01*Math.abs(this.getApparentDifference(f,e,null,!0)),5),0<=f?e=f-b:f=isFinite(e)?e+b:0):(b=Math.min(0.01*Math.abs(this.getApparentDifference(e,f,null,!0)),0.05),0!==f&&(f+=b),0!==e&&(e-=
b)),l=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:1<f-e?0.5*Math.abs(f-e):1,this.includeZero&&(null===this.viewportMinimum||isNaN(this.viewportMinimum))&&0<e&&(e=0),this.includeZero&&(null===this.viewportMaximum||isNaN(this.viewportMaximum))&&0>f&&(f=0));b=this.getApparentDifference(isNaN(this.viewportMinimum)||null===this.viewportMinimum?e:this.viewportMinimum,isNaN(this.viewportMaximum)||null===this.viewportMaximum?f:this.viewportMaximum,null,!0);if("axisX"===this.type&&c){this.intervalType||
(b/1<=a?(this.interval=1,this.intervalType="millisecond"):b/2<=a?(this.interval=2,this.intervalType="millisecond"):b/5<=a?(this.interval=5,this.intervalType="millisecond"):b/10<=a?(this.interval=10,this.intervalType="millisecond"):b/20<=a?(this.interval=20,this.intervalType="millisecond"):b/50<=a?(this.interval=50,this.intervalType="millisecond"):b/100<=a?(this.interval=100,this.intervalType="millisecond"):b/200<=a?(this.interval=200,this.intervalType="millisecond"):b/250<=a?(this.interval=250,this.intervalType=
"millisecond"):b/300<=a?(this.interval=300,this.intervalType="millisecond"):b/400<=a?(this.interval=400,this.intervalType="millisecond"):b/500<=a?(this.interval=500,this.intervalType="millisecond"):b/(1*T.secondDuration)<=a?(this.interval=1,this.intervalType="second"):b/(2*T.secondDuration)<=a?(this.interval=2,this.intervalType="second"):b/(5*T.secondDuration)<=a?(this.interval=5,this.intervalType="second"):b/(10*T.secondDuration)<=a?(this.interval=10,this.intervalType="second"):b/(15*T.secondDuration)<=
a?(this.interval=15,this.intervalType="second"):b/(20*T.secondDuration)<=a?(this.interval=20,this.intervalType="second"):b/(30*T.secondDuration)<=a?(this.interval=30,this.intervalType="second"):b/(1*T.minuteDuration)<=a?(this.interval=1,this.intervalType="minute"):b/(2*T.minuteDuration)<=a?(this.interval=2,this.intervalType="minute"):b/(5*T.minuteDuration)<=a?(this.interval=5,this.intervalType="minute"):b/(10*T.minuteDuration)<=a?(this.interval=10,this.intervalType="minute"):b/(15*T.minuteDuration)<=
a?(this.interval=15,this.intervalType="minute"):b/(20*T.minuteDuration)<=a?(this.interval=20,this.intervalType="minute"):b/(30*T.minuteDuration)<=a?(this.interval=30,this.intervalType="minute"):b/(1*T.hourDuration)<=a?(this.interval=1,this.intervalType="hour"):b/(2*T.hourDuration)<=a?(this.interval=2,this.intervalType="hour"):b/(3*T.hourDuration)<=a?(this.interval=3,this.intervalType="hour"):b/(6*T.hourDuration)<=a?(this.interval=6,this.intervalType="hour"):b/(1*T.dayDuration)<=a?(this.interval=1,
this.intervalType="day"):b/(2*T.dayDuration)<=a?(this.interval=2,this.intervalType="day"):b/(4*T.dayDuration)<=a?(this.interval=4,this.intervalType="day"):b/(1*T.weekDuration)<=a?(this.interval=1,this.intervalType="week"):b/(2*T.weekDuration)<=a?(this.interval=2,this.intervalType="week"):b/(3*T.weekDuration)<=a?(this.interval=3,this.intervalType="week"):b/(1*T.monthDuration)<=a?(this.interval=1,this.intervalType="month"):b/(2*T.monthDuration)<=a?(this.interval=2,this.intervalType="month"):b/(3*T.monthDuration)<=
a?(this.interval=3,this.intervalType="month"):b/(6*T.monthDuration)<=a?(this.interval=6,this.intervalType="month"):(this.interval=b/(1*T.yearDuration)<=a?1:b/(2*T.yearDuration)<=a?2:b/(4*T.yearDuration)<=a?4:Math.floor(D.getNiceNumber(b/(a-1),!0)/T.yearDuration),this.intervalType="year"));if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum=e-l/2;if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum=f+l/2;d?this.autoValueFormatString="MMM DD YYYY HH:mm":
"year"===this.intervalType?this.autoValueFormatString="YYYY":"month"===this.intervalType?this.autoValueFormatString="MMM YYYY":"week"===this.intervalType?this.autoValueFormatString="MMM DD YYYY":"day"===this.intervalType?this.autoValueFormatString="MMM DD YYYY":"hour"===this.intervalType?this.autoValueFormatString="hh:mm TT":"minute"===this.intervalType?this.autoValueFormatString="hh:mm TT":"second"===this.intervalType?this.autoValueFormatString="hh:mm:ss TT":"millisecond"===this.intervalType&&(this.autoValueFormatString=
"fff'ms'");this.valueFormatString||(this.valueFormatString=this.autoValueFormatString)}else{this.intervalType="number";b=D.getNiceNumber(b,!1);this.interval=this.options&&0<this.options.interval?this.options.interval:D.getNiceNumber(b/(a-1),!0);if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum="axisX"===this.type?e-l/2:Math.floor(e/this.interval)*this.interval;if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum="axisX"===this.type?f+l/2:
Math.ceil(f/this.interval)*this.interval;0===this.viewportMaximum&&0===this.viewportMinimum&&(0===this.options.viewportMinimum?this.viewportMaximum+=10:0===this.options.viewportMaximum&&(this.viewportMinimum-=10),this.options&&"undefined"===typeof this.options.interval&&(this.interval=D.getNiceNumber((this.viewportMaximum-this.viewportMinimum)/(a-1),!0)))}if(null===this.minimum||null===this.maximum)if("axisX"===this.type?(e=null!==this.minimum?this.minimum:this.dataInfo.min,f=null!==this.maximum?
this.maximum:this.dataInfo.max,0===f-e&&(b="undefined"===typeof this.options.interval?0.4:this.options.interval,f+=b,e-=b),l=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:1<f-e?0.5*Math.abs(f-e):1):"axisY"===this.type&&(e=null!==this.minimum?this.minimum:this.dataInfo.min,f=null!==this.maximum?this.maximum:this.dataInfo.max,isFinite(e)||isFinite(f)?0===e&&0===f?(f+=9,e=0):0===f-e?(b=Math.min(Math.abs(0.01*Math.abs(f)),5),f+=b,e-=b):e>f?(b=Math.min(0.01*Math.abs(this.getApparentDifference(f,
e,null,!0)),5),0<=f?e=f-b:f=isFinite(e)?e+b:0):(b=Math.min(0.01*Math.abs(this.getApparentDifference(e,f,null,!0)),0.05),0!==f&&(f+=b),0!==e&&(e-=b)):(f="undefined"===typeof this.options.interval?-Infinity:this.options.interval,e="undefined"!==typeof this.options.interval||isFinite(this.dataInfo.minDiff)?0:Infinity),l=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:1<f-e?0.5*Math.abs(f-e):1,this.includeZero&&(null===this.minimum||isNaN(this.minimum))&&0<e&&(e=0),this.includeZero&&(null===this.maximum||
isNaN(this.maximum))&&0>f&&(f=0)),Math.abs(this.getApparentDifference(e,f,null,!0)),"axisX"===this.type&&c){this.valueType="dateTime";if(null===this.minimum||isNaN(this.minimum))this.minimum=e-l/2;if(null===this.maximum||isNaN(this.maximum))this.maximum=f+l/2}else this.intervalType=this.valueType="number",null===this.minimum&&(this.minimum="axisX"===this.type?e-l/2:Math.floor(e/this.interval)*this.interval,this.minimum=Math.min(this.minimum,null===this.sessionVariables.viewportMinimum||isNaN(this.sessionVariables.viewportMinimum)?
Infinity:this.sessionVariables.viewportMinimum)),null===this.maximum&&(this.maximum="axisX"===this.type?f+l/2:Math.ceil(f/this.interval)*this.interval,this.maximum=Math.max(this.maximum,null===this.sessionVariables.viewportMaximum||isNaN(this.sessionVariables.viewportMaximum)?-Infinity:this.sessionVariables.viewportMaximum)),0===this.maximum&&0===this.minimum&&(0===this.options.minimum?this.maximum+=10:0===this.options.maximum&&(this.minimum-=10));r(this.sessionVariables.newViewportMinimum)&&(this.viewportMinimum=
Math.max(this.viewportMinimum,this.minimum));r(this.sessionVariables.newViewportMaximum)&&(this.viewportMaximum=Math.min(this.viewportMaximum,this.maximum));this.range=this.viewportMaximum-this.viewportMinimum;this.intervalStartPosition="axisX"===this.type&&c?this.getLabelStartPoint(new Date(this.viewportMinimum),this.intervalType,this.interval):Math.floor((this.viewportMinimum+0.2*this.interval)/this.interval)*this.interval;this.valueFormatString||(this.valueFormatString=D.generateValueFormatString(this.range,
2))}};D.prototype.calculateLogarithmicAxisParameters=function(){var a=this.chart.layoutManager.getFreeSpace(),d=Math.log(this.logarithmBase),c;"bottom"===this._position||"top"===this._position?(this.maxWidth=a.width,this.maxHeight=a.height):(this.maxWidth=a.height,this.maxHeight=a.width);var a="axisX"===this.type?500>this.maxWidth?7:Math.max(7,Math.floor(this.maxWidth/100)):Math.max(Math.floor(this.maxWidth/50),3),b,e,f,l;l=1;if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum=
this.minimum;if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum=this.maximum;if(this.scaleBreaks)for(l=0;l<this.scaleBreaks._appliedBreaks.length;l++)if((!r(this.sessionVariables.newViewportMinimum)&&this.sessionVariables.newViewportMinimum>=this.scaleBreaks._appliedBreaks[l].startValue||!r(this.options.minimum)&&this.options.minimum>=this.scaleBreaks._appliedBreaks[l].startValue||!r(this.options.viewportMinimum)&&this.viewportMinimum>=this.scaleBreaks._appliedBreaks[l].startValue)&&
(!r(this.sessionVariables.newViewportMaximum)&&this.sessionVariables.newViewportMaximum<=this.scaleBreaks._appliedBreaks[l].endValue||!r(this.options.maximum)&&this.options.maximum<=this.scaleBreaks._appliedBreaks[l].endValue||!r(this.options.viewportMaximum)&&this.viewportMaximum<=this.scaleBreaks._appliedBreaks[l].endValue)){this.scaleBreaks._appliedBreaks.splice(l,1);break}"axisX"===this.type?(b=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin,e=null!==this.viewportMaximum?
this.viewportMaximum:this.dataInfo.viewPortMax,1===e/b&&(l=Math.pow(this.logarithmBase,"undefined"===typeof this.options.interval?0.4:this.options.interval),e*=l,b/=l),f=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:e/b>this.logarithmBase?e/b*Math.pow(this.logarithmBase,0.5):this.logarithmBase):"axisY"===this.type&&(b=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin,e=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax,0>=b&&!isFinite(e)?(e=
"undefined"===typeof this.options.interval?0:this.options.interval,b=1):0>=b?b=e:isFinite(e)||(e=b),1===b&&1===e?(e*=this.logarithmBase-1/this.logarithmBase,b=1):1===e/b?(l=Math.min(e*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,5)),e*=l,b/=l):b>e?(l=Math.min(b/e*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,5)),1<=e?b=e/l:e=b*l):(l=Math.min(e/b*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,0.04)),1!==e&&(e*=l),1!==b&&(b/=l)),f=Infinity!==this.dataInfo.minDiff?
this.dataInfo.minDiff:e/b>this.logarithmBase?e/b*Math.pow(this.logarithmBase,0.5):this.logarithmBase,this.includeZero&&(null===this.viewportMinimum||isNaN(this.viewportMinimum))&&1<b&&(b=1),this.includeZero&&(null===this.viewportMaximum||isNaN(this.viewportMaximum))&&1>e&&(e=1));l=(isNaN(this.viewportMaximum)||null===this.viewportMaximum?e:this.viewportMaximum)/(isNaN(this.viewportMinimum)||null===this.viewportMinimum?b:this.viewportMinimum);var k=(isNaN(this.viewportMaximum)||null===this.viewportMaximum?
e:this.viewportMaximum)-(isNaN(this.viewportMinimum)||null===this.viewportMinimum?b:this.viewportMinimum);this.intervalType="number";l=Math.pow(this.logarithmBase,D.getNiceNumber(Math.abs(Math.log(l)/d),!1));this.options&&0<this.options.interval?this.interval=this.options.interval:(this.interval=D.getNiceExponent(Math.log(l)/d/(a-1),!0),c=D.getNiceNumber(k/(a-1),!0));if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum="axisX"===this.type?b/Math.sqrt(f):Math.pow(this.logarithmBase,
this.interval*Math.floor(Math.log(b)/d/this.interval));if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum="axisX"===this.type?e*Math.sqrt(f):Math.pow(this.logarithmBase,this.interval*Math.ceil(Math.log(e)/d/this.interval));1===this.viewportMaximum&&1===this.viewportMinimum&&(1===this.options.viewportMinimum?this.viewportMaximum*=this.logarithmBase-1/this.logarithmBase:1===this.options.viewportMaximum&&(this.viewportMinimum/=this.logarithmBase-1/this.logarithmBase),this.options&&
"undefined"===typeof this.options.interval&&(this.interval=D.getNiceExponent(Math.ceil(Math.log(l)/d)/(a-1)),c=D.getNiceNumber((this.viewportMaximum-this.viewportMinimum)/(a-1),!0)));if(null===this.minimum||null===this.maximum)"axisX"===this.type?(b=null!==this.minimum?this.minimum:this.dataInfo.min,e=null!==this.maximum?this.maximum:this.dataInfo.max,1===e/b&&(l=Math.pow(this.logarithmBase,"undefined"===typeof this.options.interval?0.4:this.options.interval),e*=l,b/=l),f=Infinity!==this.dataInfo.minDiff?
this.dataInfo.minDiff:e/b>this.logarithmBase?e/b*Math.pow(this.logarithmBase,0.5):this.logarithmBase):"axisY"===this.type&&(b=null!==this.minimum?this.minimum:this.dataInfo.min,e=null!==this.maximum?this.maximum:this.dataInfo.max,isFinite(b)||isFinite(e)?1===b&&1===e?(e*=this.logarithmBase,b/=this.logarithmBase):1===e/b?(l=Math.pow(this.logarithmBase,this.interval),e*=l,b/=l):b>e?(l=Math.min(0.01*(b/e),5),1<=e?b=e/l:e=b*l):(l=Math.min(e/b*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,
0.04)),1!==e&&(e*=l),1!==b&&(b/=l)):(e="undefined"===typeof this.options.interval?0:this.options.interval,b=1),f=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:e/b>this.logarithmBase?e/b*Math.pow(this.logarithmBase,0.5):this.logarithmBase,this.includeZero&&(null===this.minimum||isNaN(this.minimum))&&1<b&&(b=1),this.includeZero&&(null===this.maximum||isNaN(this.maximum))&&1>e&&(e=1)),this.intervalType="number",null===this.minimum&&(this.minimum="axisX"===this.type?b/Math.sqrt(f):Math.pow(this.logarithmBase,
this.interval*Math.floor(Math.log(b)/d/this.interval)),r(null===this.sessionVariables.viewportMinimum||isNaN(this.sessionVariables.viewportMinimum)?"undefined"===typeof this.sessionVariables.newViewportMinimum?Infinity:this.sessionVariables.newViewportMinimum:this.sessionVariables.viewportMinimum)||(this.minimum=Math.min(this.minimum,null===this.sessionVariables.viewportMinimum||isNaN(this.sessionVariables.viewportMinimum)?"undefined"===typeof this.sessionVariables.newViewportMinimum?Infinity:this.sessionVariables.newViewportMinimum:
this.sessionVariables.viewportMinimum))),null===this.maximum&&(this.maximum="axisX"===this.type?e*Math.sqrt(f):Math.pow(this.logarithmBase,this.interval*Math.ceil(Math.log(e)/d/this.interval)),r(null===this.sessionVariables.viewportMaximum||isNaN(this.sessionVariables.viewportMaximum)?"undefined"===typeof this.sessionVariables.newViewportMaximum?0:this.sessionVariables.newViewportMaximum:this.sessionVariables.viewportMaximum)||(this.maximum=Math.max(this.maximum,null===this.sessionVariables.viewportMaximum||
isNaN(this.sessionVariables.viewportMaximum)?"undefined"===typeof this.sessionVariables.newViewportMaximum?0:this.sessionVariables.newViewportMaximum:this.sessionVariables.viewportMaximum))),1===this.maximum&&1===this.minimum&&(1===this.options.minimum?this.maximum*=this.logarithmBase-1/this.logarithmBase:1===this.options.maximum&&(this.minimum/=this.logarithmBase-1/this.logarithmBase));this.viewportMinimum=Math.max(this.viewportMinimum,this.minimum);this.viewportMaximum=Math.min(this.viewportMaximum,
this.maximum);this.viewportMinimum>this.viewportMaximum&&(!this.options.viewportMinimum&&!this.options.minimum||this.options.viewportMaximum||this.options.maximum?this.options.viewportMinimum||this.options.minimum||!this.options.viewportMaximum&&!this.options.maximum||(this.viewportMinimum=this.minimum=(this.options.viewportMaximum||this.options.maximum)/Math.pow(this.logarithmBase,2*Math.ceil(this.interval))):this.viewportMaximum=this.maximum=this.options.viewportMinimum||this.options.minimum);b=
Math.pow(this.logarithmBase,Math.floor(Math.log(this.viewportMinimum)/(d*this.interval)+0.2)*this.interval);this.range=this.viewportMaximum/this.viewportMinimum;this.noTicks=a;if(!this.options.interval&&this.range<Math.pow(this.logarithmBase,8>this.viewportMaximum||3>a?2:3)){for(d=Math.floor(this.viewportMinimum/c+0.5)*c;d<this.viewportMinimum;)d+=c;this.equidistantInterval=!1;this.intervalStartPosition=d;this.interval=c}else this.options.interval||(c=Math.ceil(this.interval),this.range>this.interval&&
(this.interval=c,b=Math.pow(this.logarithmBase,Math.floor(Math.log(this.viewportMinimum)/(d*this.interval)+0.2)*this.interval))),this.equidistantInterval=!0,this.intervalStartPosition=b;if(!this.valueFormatString&&(this.valueFormatString="#,##0.##",1>this.viewportMinimum)){d=Math.floor(Math.abs(Math.log(this.viewportMinimum)/Math.LN10))+2;if(isNaN(d)||!isFinite(d))d=2;if(2<d)for(l=0;l<d-2;l++)this.valueFormatString+="#"}};D.generateValueFormatString=function(a,d){var c="#,##0.",b=d;1>a&&(b+=Math.floor(Math.abs(Math.log(a)/
Math.LN10)),isNaN(b)||!isFinite(b))&&(b=d);for(var e=0;e<b;e++)c+="#";return c};D.getNiceExponent=function(a,d){var c=Math.floor(Math.log(a)/Math.LN10),b=a/Math.pow(10,c),b=0>c?1>=b?1:5>=b?5:10:Math.max(Math.floor(b),1);return-20>c?Number(b*Math.pow(10,c)):Number((b*Math.pow(10,c)).toFixed(20))};D.getNiceNumber=function(a,d){var c=Math.floor(Math.log(a)/Math.LN10),b=a/Math.pow(10,c),b=d?1.5>b?1:3>b?2:7>b?5:10:1>=b?1:2>=b?2:5>=b?5:10;return-20>c?Number(b*Math.pow(10,c)):Number((b*Math.pow(10,c)).toFixed(20))};
D.prototype.getLabelStartPoint=function(){var a=T[this.intervalType+"Duration"]*this.interval,a=new Date(Math.floor(this.viewportMinimum/a)*a);if("millisecond"!==this.intervalType)if("second"===this.intervalType)0<a.getMilliseconds()&&(a.setSeconds(a.getSeconds()+1),a.setMilliseconds(0));else if("minute"===this.intervalType){if(0<a.getSeconds()||0<a.getMilliseconds())a.setMinutes(a.getMinutes()+1),a.setSeconds(0),a.setMilliseconds(0)}else if("hour"===this.intervalType){if(0<a.getMinutes()||0<a.getSeconds()||
0<a.getMilliseconds())a.setHours(a.getHours()+1),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)}else if("day"===this.intervalType){if(0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())a.setDate(a.getDate()+1),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)}else if("week"===this.intervalType){if(0<a.getDay()||0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())a.setDate(a.getDate()+(7-a.getDay())),a.setHours(0),a.setMinutes(0),
a.setSeconds(0),a.setMilliseconds(0)}else if("month"===this.intervalType){if(1<a.getDate()||0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())a.setMonth(a.getMonth()+1),a.setDate(1),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)}else"year"===this.intervalType&&(0<a.getMonth()||1<a.getDate()||0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())&&(a.setFullYear(a.getFullYear()+1),a.setMonth(0),a.setDate(1),a.setHours(0),a.setMinutes(0),
a.setSeconds(0),a.setMilliseconds(0));return a};oa(U,X);oa(V,X);V.prototype.createUserOptions=function(a){if("undefined"!==typeof a||this.options._isPlaceholder){var d=0;this.parent.options._isPlaceholder&&this.parent.createUserOptions();this.options._isPlaceholder||(Ca(this.parent[this.optionsName]),d=this.parent.options[this.optionsName].indexOf(this.options));this.options="undefined"===typeof a?{}:a;this.parent.options[this.optionsName][d]=this.options}};V.prototype.render=function(a){if(0!==this.spacing||
0!==this.options.lineThickness&&("undefined"!==typeof this.options.lineThickness||0!==this.parent.lineThickness)){var d=this.ctx,c=this.ctx.globalAlpha;this.ctx=a||this.ctx;this.ctx.save();this.ctx.beginPath();this.ctx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height);this.ctx.clip();var b=this.scaleBreaks.parent.getPixelCoordinatesOnAxis(this.startValue),e=this.scaleBreaks.parent.getPixelCoordinatesOnAxis(this.endValue);this.ctx.strokeStyle=
this.lineColor;this.ctx.fillStyle=this.color;this.ctx.beginPath();this.ctx.globalAlpha=1;S(this.id);var f,l,k,m,h,p;a=Math.max(this.spacing,3);var n=Math.max(0,this.lineThickness);this.ctx.lineWidth=n;this.ctx.setLineDash&&this.ctx.setLineDash(Q(this.lineDashType,n));if("bottom"===this.scaleBreaks.parent._position||"top"===this.scaleBreaks.parent._position)if(b=1===n%2?(b.x<<0)+0.5:b.x<<0,l=1===n%2?(e.x<<0)+0.5:e.x<<0,"top"===this.scaleBreaks.parent._position?(e=this.chart.plotArea.y1,k=this.chart.plotArea.y2+
n/2+0.5<<0):(e=this.chart.plotArea.y2,k=this.chart.plotArea.y1-n/2+0.5<<0,a*=-1),this.bounds={x1:b-n/2,y1:e,x2:l+n/2,y2:k},this.ctx.moveTo(b,e),"straight"===this.type||"top"===this.scaleBreaks.parent._position&&0>=a||"bottom"===this.scaleBreaks.parent._position&&0<=a)this.ctx.lineTo(b,k),this.ctx.lineTo(l,k),this.ctx.lineTo(l,e);else if("wavy"===this.type){m=b;h=e;f=0.5;p=(k-h)/a/3;for(var q=0;q<p;q++)this.ctx.bezierCurveTo(m+f*a,h+a,m+f*a,h+2*a,m,h+3*a),h+=3*a,f*=-1;this.ctx.bezierCurveTo(m+f*a,
h+a,m+f*a,h+2*a,m,h+3*a);m=l;f*=-1;this.ctx.lineTo(m,h);for(q=0;q<p;q++)this.ctx.bezierCurveTo(m+f*a,h-a,m+f*a,h-2*a,m,h-3*a),h-=3*a,f*=-1}else{if("zigzag"===this.type){f=-1;h=e+a;m=b+a;p=(k-h)/a/2;for(q=0;q<p;q++)this.ctx.lineTo(m,h),m+=2*f*a,h+=2*a,f*=-1;this.ctx.lineTo(m,h);m+=l-b;for(q=0;q<p+1;q++)this.ctx.lineTo(m,h),m+=2*f*a,h-=2*a,f*=-1;this.ctx.lineTo(m+f*a,h+a)}}else if("left"===this.scaleBreaks.parent._position||"right"===this.scaleBreaks.parent._position)if(e=1===n%2?(e.y<<0)+0.5:e.y<<
0,k=1===n%2?(b.y<<0)+0.5:b.y<<0,"left"===this.scaleBreaks.parent._position?(b=this.chart.plotArea.x1,l=this.chart.plotArea.x2+n/2+0.5<<0):(b=this.chart.plotArea.x2,l=this.chart.plotArea.x1-n/2+0.5<<0,a*=-1),this.bounds={x1:b,y1:e-n/2,x2:l,y2:k+n/2},this.ctx.moveTo(b,e),"straight"===this.type||"left"===this.scaleBreaks.parent._position&&0>=a||"right"===this.scaleBreaks.parent._position&&0<=a)this.ctx.lineTo(l,e),this.ctx.lineTo(l,k),this.ctx.lineTo(b,k);else if("wavy"===this.type){m=b;h=e;f=0.5;p=
(l-m)/a/3;for(q=0;q<p;q++)this.ctx.bezierCurveTo(m+a,h+f*a,m+2*a,h+f*a,m+3*a,h),m+=3*a,f*=-1;this.ctx.bezierCurveTo(m+a,h+f*a,m+2*a,h+f*a,m+3*a,h);h=k;f*=-1;this.ctx.lineTo(m,h);for(q=0;q<p;q++)this.ctx.bezierCurveTo(m-a,h+f*a,m-2*a,h+f*a,m-3*a,h),m-=3*a,f*=-1}else if("zigzag"===this.type){f=1;h=e-a;m=b+a;p=(l-m)/a/2;for(q=0;q<p;q++)this.ctx.lineTo(m,h),h+=2*f*a,m+=2*a,f*=-1;this.ctx.lineTo(m,h);h+=k-e;for(q=0;q<p+1;q++)this.ctx.lineTo(m,h),h+=2*f*a,m-=2*a,f*=-1;this.ctx.lineTo(m+a,h+f*a)}0<n&&this.ctx.stroke();
this.ctx.closePath();this.ctx.globalAlpha=this.fillOpacity;this.ctx.globalCompositeOperation="destination-over";this.ctx.fill();this.ctx.restore();this.ctx.globalAlpha=c;this.ctx=d}};oa(N,X);N.prototype.createUserOptions=function(a){if("undefined"!==typeof a||this.options._isPlaceholder){var d=0;this.parent.options._isPlaceholder&&this.parent.createUserOptions();this.options._isPlaceholder||(Ca(this.parent.stripLines),d=this.parent.options.stripLines.indexOf(this.options));this.options="undefined"===
typeof a?{}:a;this.parent.options.stripLines[d]=this.options}};N.prototype.render=function(){this.ctx.save();var a=this.parent.getPixelCoordinatesOnAxis(this.value),d=Math.abs("pixel"===this._thicknessType?this.thickness:Math.abs(this.parent.convertValueToPixel(this.endValue)-this.parent.convertValueToPixel(this.startValue)));if(0<d){var c=null===this.opacity?1:this.opacity;this.ctx.strokeStyle=this.color;this.ctx.beginPath();var b=this.ctx.globalAlpha;this.ctx.globalAlpha=c;S(this.id);var e,f,l,
k;this.ctx.lineWidth=d;this.ctx.setLineDash&&this.ctx.setLineDash(Q(this.lineDashType,d));if("bottom"===this.parent._position||"top"===this.parent._position)e=f=1===this.ctx.lineWidth%2?(a.x<<0)+0.5:a.x<<0,l=this.chart.plotArea.y1,k=this.chart.plotArea.y2,this.bounds={x1:e-d/2,y1:l,x2:f+d/2,y2:k};else if("left"===this.parent._position||"right"===this.parent._position)l=k=1===this.ctx.lineWidth%2?(a.y<<0)+0.5:a.y<<0,e=this.chart.plotArea.x1,f=this.chart.plotArea.x2,this.bounds={x1:e,y1:l-d/2,x2:f,
y2:k+d/2};this.ctx.moveTo(e,l);this.ctx.lineTo(f,k);this.ctx.stroke();this.ctx.globalAlpha=b}this.ctx.restore()};oa(ba,X);ba.prototype.showAt=function(a){if(!this.enabled)return!1;var d=this.chart,c=!1;d.resetOverlayedCanvas();d.clearedOverlayedCanvas=this.parent.type;if("xySwapped"===d.plotInfo.axisPlacement)if("bottom"===this.parent._position)for(var b=0;b<d.axisY.length;b++)this.parent===d.axisY[b]&&(d.axisY[b]._crosshairValue=a>=d.axisY[b].viewportMinimum&&a<=d.axisY[b].viewportMaximum?a:null);
else if("top"===this.parent._position)for(b=0;b<d.axisY2.length;b++)this.parent===d.axisY2[b]&&(d.axisY2[b]._crosshairValue=a>=d.axisY2[b].viewportMinimum&&a<=d.axisY2[b].viewportMaximum?a:null);else if("left"===this.parent._position)for(b=0;b<d.axisX.length;b++)this.parent===d.axisX[b]&&(d.axisX[b]._crosshairValue=a>=d.axisX[b].viewportMinimum&&a<=d.axisX[b].viewportMaximum?a:null);else{if("right"===this.parent._position)for(b=0;b<d.axisX2.length;b++)this.parent===d.axisX2[b]&&(d.axisX2[b]._crosshairValue=
a>=d.axisX2[b].viewportMinimum&&a<=d.axisX2[b].viewportMaximum?a:null)}else if("bottom"===this.parent._position)for(b=0;b<d.axisX.length;b++)this.parent===d.axisX[b]&&(d.axisX[b]._crosshairValue=a>=d.axisX[b].viewportMinimum&&a<=d.axisX[b].viewportMaximum?a:null);else if("top"===this.parent._position)for(b=0;b<d.axisX2.length;b++)this.parent===d.axisX2[b]&&(d.axisX2[b]._crosshairValue=a>=d.axisX2[b].viewportMinimum&&a<=d.axisX2[b].viewportMaximum?a:null);else if("left"===this.parent._position)for(b=
0;b<d.axisY.length;b++)this.parent===d.axisY[b]&&(d.axisY[b]._crosshairValue=a>=d.axisY[b].viewportMinimum&&a<=d.axisY[b].viewportMaximum?a:null);else if("right"===this.parent._position)for(b=0;b<d.axisY2.length;b++)this.parent===d.axisY2[b]&&(d.axisY2[b]._crosshairValue=a>=d.axisY2[b].viewportMinimum&&a<=d.axisY2[b].viewportMaximum?a:null);for(b=0;b<d.axisX.length;b++)a=d.axisX[b]._crosshairValue,d.axisX[b].crosshair&&(d.axisX[b].crosshair.enabled&&!r(a)&&a>=d.axisX[b].viewportMinimum&&a<=d.axisX[b].viewportMaximum)&&
(d.axisX[b].showCrosshair(a),d.axisX[b].crosshair._updatedValue=a,this===d.axisX[b].crosshair&&(c=!0));for(b=0;b<d.axisX2.length;b++)a=d.axisX2[b]._crosshairValue,d.axisX2[b].crosshair&&(d.axisX2[b].crosshair.enabled&&!r(a)&&a>=d.axisX2[b].viewportMinimum&&a<=d.axisX2[b].viewportMaximum)&&(d.axisX2[b].showCrosshair(a),d.axisX2[b].crosshair._updatedValue=a,this===d.axisX2[b].crosshair&&(c=!0));for(b=0;b<d.axisY.length;b++)a=d.axisY[b]._crosshairValue,d.axisY[b].crosshair&&(d.axisY[b].crosshair.enabled&&
!r(a)&&a>=d.axisY[b].viewportMinimum&&a<=d.axisY[b].viewportMaximum)&&(d.axisY[b].showCrosshair(a),d.axisY[b].crosshair._updatedValue=a,this===d.axisY[b].crosshair&&(c=!0));for(b=0;b<d.axisY2.length;b++)a=d.axisY2[b]._crosshairValue,d.axisY2[b].crosshair&&(d.axisY2[b].crosshair.enabled&&!r(a)&&d._crosshairY2Value>=d.axisY2[b].viewportMinimum&&d._crosshairY2Value<=d.axisY2[b].viewportMaximum)&&(d.axisY2[b].showCrosshair(a),d.axisY2[b].crosshair._updatedValue=a,this===d.axisY2[b].crosshair&&(c=!0));
this.chart.toolTip&&this.chart.toolTip._entries&&this.chart.toolTip.highlightObjects(this.chart.toolTip._entries);return c};ba.prototype.hide=function(){this.chart.resetOverlayedCanvas();this.chart.renderCrosshairs(this.parent);this._hidden=!0};ba.prototype.render=function(a,d,c){var b,e,f,l,k=null,m=null,h=null,p="";if(!this.valueFormatString)if("dateTime"===this.parent.valueType)this.valueFormatString=this.parent.valueFormatString;else{var n=0,n="xySwapped"===this.chart.plotInfo.axisPlacement?50<
this.parent.range?0:500<this.chart.width&&25>this.parent.range?2:Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>this.parent.range?2:10>this.parent.range?1:0):50<this.parent.range?0:Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>this.parent.range?2:10>this.parent.range?1:0);this.valueFormatString=D.generateValueFormatString(this.parent.range,n)}var h=null===this.opacity?1:this.opacity,n=Math.abs("pixel"===this._thicknessType?this.thickness:this.parent.conversionParameters.pixelPerUnit*
this.thickness),q=this.chart.overlaidCanvasCtx,g=q.globalAlpha;q.globalAlpha=h;q.beginPath();q.strokeStyle=this.color;q.lineWidth=n;q.save();this.labelFontSize=r(this.options.labelFontSize)?this.parent.labelFontSize:this.labelFontSize;this.labelMaxWidth=r(this.options.labelMaxWidth)?0.3*this.chart.width:this.labelMaxWidth;this.labelMaxHeight=r(this.options.labelWrap)||this.labelWrap?0.3*this.chart.height:2*this.labelFontSize;0<n&&q.setLineDash&&q.setLineDash(Q(this.lineDashType,n));h=new la(q,{x:0,
y:0,padding:{top:2,right:3,bottom:2,left:4},backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,borderThickness:this.labelBorderThickness,cornerRadius:this.labelCornerRadius,maxWidth:this.labelMaxWidth,maxHeight:this.labelMaxHeight,angle:this.labelAngle,text:p,horizontalAlign:"left",fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle"});if(this.snapToDataPoint){var s=
0,p=[];if("xySwapped"===this.chart.plotInfo.axisPlacement){var v=null;if("bottom"===this.parent._position||"top"===this.parent._position)s=this.parent.dataSeries[0].axisX.convertPixelToValue({y:d});else if("left"===this.parent._position||"right"===this.parent._position)s=this.parent.convertPixelToValue({y:d});for(var w=0;w<this.parent.dataSeries.length;w++)(v=this.parent.dataSeries[w].getDataPointAtX(s,!0))&&0<=v.index&&(v.dataSeries=this.parent.dataSeries[w],null!==v.dataPoint.y&&v.dataSeries.visible&&
p.push(v));v=null;if(0===p.length)return;p.sort(function(a,b){return a.distance-b.distance});v=Math.abs(a-this.parent.convertValueToPixel(p[0].dataPoint.y));w=0;if("rangeBar"===p[0].dataSeries.type||"error"===p[0].dataSeries.type)for(var v=Math.abs(a-this.parent.convertValueToPixel(p[w].dataPoint.y[0])),t=0,s=0;s<p.length;s++)if(p[s].dataPoint.y&&p[s].dataPoint.y.length)for(var x=0;x<p[s].dataPoint.y.length;x++)t=Math.abs(a-this.parent.convertValueToPixel(p[s].dataPoint.y[x])),t<v&&(v=t,w=s);else t=
Math.abs(a-this.parent.convertValueToPixel(p[s].dataPoint.y)),t<v&&(v=t,w=s);else if("stackedBar"===p[0].dataSeries.type)for(var v=Math.abs(a-this.parent.convertValueToPixel(p[0].dataPoint.y)),A=t=0,s=w=0;s<p.length;s++)if(p[s].dataPoint.y&&p[s].dataPoint.y.length)for(x=0;x<p[s].dataPoint.y.length;x++)t=Math.abs(a-this.parent.convertValueToPixel(p[s].dataPoint.y[x])),t<v&&(v=t,w=s);else A+=p[s].dataPoint.y,t=Math.abs(a-this.parent.convertValueToPixel(A)),t<v&&(v=t,w=s);else if("stackedBar100"===p[0].dataSeries.type)for(var v=
Math.abs(a-this.parent.convertValueToPixel(p[0].dataPoint.y)),E=A=t=0,s=0;s<p.length;s++)if(p[s].dataPoint.y&&p[s].dataPoint.y.length)for(x=0;x<p[s].dataPoint.y.length;x++)t=Math.abs(a-this.parent.convertValueToPixel(p[s].dataPoint.y[x])),t<v&&(v=t,w=s);else A+=p[s].dataPoint.y,E=p[s].dataPoint.x.getTime?p[s].dataPoint.x.getTime():p[s].dataPoint.x,E=100*(A/p[s].dataSeries.plotUnit.dataPointYSums[E]),t=Math.abs(a-this.parent.convertValueToPixel(E)),t<v&&(v=t,w=s);else for(v=Math.abs(a-this.parent.convertValueToPixel(p[0].dataPoint.y)),
s=w=t=0;s<p.length;s++)if(p[s].dataPoint.y&&p[s].dataPoint.y.length)for(x=0;x<p[s].dataPoint.y.length;x++)t=Math.abs(a-this.parent.convertValueToPixel(p[s].dataPoint.y[x])),t<v&&(v=t,w=s);else t=Math.abs(a-this.parent.convertValueToPixel(p[s].dataPoint.y)),t<v&&(v=t,w=s);x=p[w];if("bottom"===this.parent._position||"top"===this.parent._position){b=0;if("rangeBar"===this.parent.dataSeries[w].type||"error"===this.parent.dataSeries[w].type){v=Math.abs(a-this.parent.convertValueToPixel(x.dataPoint.y[0]));
for(s=t=0;s<x.dataPoint.y.length;s++)t=Math.abs(a-this.parent.convertValueToPixel(x.dataPoint.y[s])),t<v&&(v=t,b=s);k=1===q.lineWidth%2?(this.parent.convertValueToPixel(x.dataPoint.y[b])<<0)+0.5:this.parent.convertValueToPixel(x.dataPoint.y[b])<<0;h.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:c?c:x.dataPoint.y[b]}):r(this.options.label)?fa(c?c:x.dataPoint.y[b],this.valueFormatString,this.chart._cultureInfo):this.label}else if("stackedBar"===
this.parent.dataSeries[w].type){v=Math.abs(a-this.parent.convertValueToPixel(p[0].dataPoint.y));A=t=0;for(s=w;0<=s;s--)A+=p[s].dataPoint.y,t=Math.abs(a-this.parent.convertValueToPixel(A)),t<v&&(v=t,b=s);k=1===q.lineWidth%2?(this.parent.convertValueToPixel(A)<<0)+0.5:this.parent.convertValueToPixel(A)<<0;h.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:c?c:x.dataPoint.y}):r(this.options.label)?fa(c?c:x.dataPoint.y,this.valueFormatString,
this.chart._cultureInfo):this.label}else if("stackedBar100"===this.parent.dataSeries[w].type){v=Math.abs(a-this.parent.convertValueToPixel(p[0].dataPoint.y));E=A=t=0;for(s=w;0<=s;s--)A+=p[s].dataPoint.y,E=p[s].dataPoint.x.getTime?p[s].dataPoint.x.getTime():p[s].dataPoint.x,E=100*(A/p[s].dataSeries.plotUnit.dataPointYSums[E]),t=Math.abs(a-this.parent.convertValueToPixel(E)),t<v&&(v=t,b=s);k=1===q.lineWidth%2?(this.parent.convertValueToPixel(E)<<0)+0.5:this.parent.convertValueToPixel(E)<<0;h.text=this.labelFormatter?
this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:c?c:E}):r(this.options.label)?fa(c?c:E,this.valueFormatString,this.chart._cultureInfo):this.label}else k=1===q.lineWidth%2?(this.parent.convertValueToPixel(x.dataPoint.y)<<0)+0.5:this.parent.convertValueToPixel(x.dataPoint.y)<<0,h.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:c?c:x.dataPoint.y}):r(this.options.label)?fa(c?c:x.dataPoint.y,
this.valueFormatString,this.chart._cultureInfo):this.label;b=e=k;f=this.chart.plotArea.y1;l=this.chart.plotArea.y2;this.bounds={x1:b-n/2,y1:f,x2:e+n/2,y2:l};h.x=b-h.measureText().width/2;h.x+h.width>this.chart.bounds.x2?h.x=this.chart.bounds.x2-h.width:h.x<this.chart.bounds.x1&&(h.x=this.chart.bounds.x1);h.y=this.parent.lineCoordinates.y2+h.fontSize/2+2;h.y+h.height>this.chart.bounds.y2?h.y=this.chart.bounds.y2-h.height:h.y<this.chart.bounds.y1&&(h.y=this.chart.bounds.y1)}else if("left"===this.parent._position||
"right"===this.parent._position){f=l=m=1===q.lineWidth%2?(this.parent.convertValueToPixel(x.dataPoint.x)<<0)+0.5:this.parent.convertValueToPixel(x.dataPoint.x)<<0;b=this.chart.plotArea.x1;e=this.chart.plotArea.x2;this.bounds={x1:b,y1:f-n/2,x2:e,y2:l+n/2};E=!1;if(this.parent.labels)for(p=Math.ceil(this.parent.interval),s=0;s<this.parent.viewportMaximum;s+=p)if(this.parent.labels[s])E=!0;else{E=!1;break}if(E){if("axisX"===this.parent.type)for(s=this.parent.convertPixelToValue({y:d}),v=null,w=0;w<this.parent.dataSeries.length;w++)(v=
this.parent.dataSeries[w].getDataPointAtX(s,!0))&&0<=v.index&&(h.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:x.dataPoint.x}):r(this.options.label)?v.dataPoint.label:this.label)}else"dateTime"===this.parent.valueType?h.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:c?c:x.dataPoint.x}):r(this.options.label)?Aa(c?c:x.dataPoint.x,this.valueFormatString,this.chart._cultureInfo):
this.label:"number"===this.parent.valueType&&(h.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:c?c:x.dataPoint.x}):r(this.options.label)?fa(c?c:x.dataPoint.x,this.valueFormatString,this.chart._cultureInfo):this.label);h.y=l+h.fontSize/2-h.measureText().height/2+2;h.y-h.fontSize/2<this.chart.bounds.y1?h.y=this.chart.bounds.y1+h.fontSize/2+2:h.y+h.measureText().height-h.fontSize/2>this.chart.bounds.y2&&(h.y=this.chart.bounds.y2-h.measureText().height+
h.fontSize/2);"left"===this.parent._position?h.x=this.parent.lineCoordinates.x2-h.measureText().width:"right"===this.parent._position&&(h.x=this.parent.lineCoordinates.x2)}}else if("bottom"===this.parent._position||"top"===this.parent._position){s=this.parent.convertPixelToValue({x:a});for(w=0;w<this.parent.dataSeries.length;w++)(v=this.parent.dataSeries[w].getDataPointAtX(s,!0))&&0<=v.index&&(v.dataSeries=this.parent.dataSeries[w],null!==v.dataPoint.y&&v.dataSeries.visible&&p.push(v));if(0===p.length)return;
p.sort(function(a,b){return a.distance-b.distance});x=p[0];b=e=k=1===q.lineWidth%2?(this.parent.convertValueToPixel(x.dataPoint.x)<<0)+0.5:this.parent.convertValueToPixel(x.dataPoint.x)<<0;f=this.chart.plotArea.y1;l=this.chart.plotArea.y2;this.bounds={x1:b-n/2,y1:f,x2:e+n/2,y2:l};E=!1;if(this.parent.labels)for(p=Math.ceil(this.parent.interval),s=0;s<this.parent.viewportMaximum;s+=p)if(this.parent.labels[s])E=!0;else{E=!1;break}if(E){if("axisX"===this.parent.type)for(s=this.parent.convertPixelToValue({x:a}),
v=null,w=0;w<this.parent.dataSeries.length;w++)(v=this.parent.dataSeries[w].getDataPointAtX(s,!0))&&0<=v.index&&(h.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:x.dataPoint.x}):r(this.options.label)?v.dataPoint.label:this.label)}else"dateTime"===this.parent.valueType?h.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:x.dataPoint.x}):r(this.options.label)?Aa(c?
c:x.dataPoint.x,this.valueFormatString,this.chart._cultureInfo):this.label:"number"===this.parent.valueType&&(h.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:x.dataPoint.x}):r(this.options.label)?fa(c?c:x.dataPoint.x,this.valueFormatString,this.chart._cultureInfo):this.label);this.value=x.dataPoint.x;h.x=b-h.measureText().width/2;h.x+h.width>this.chart.bounds.x2&&(h.x=this.chart.bounds.x2-h.width);h.x<this.chart.bounds.x1&&(h.x=
this.chart.bounds.x1);"bottom"===this.parent._position?h.y=this.parent.lineCoordinates.y2+h.fontSize/2+2:"top"===this.parent._position&&(h.y=this.parent.lineCoordinates.y1-h.height+h.fontSize/2+2)}else if("left"===this.parent._position||"right"===this.parent._position){!r(this.parent.dataSeries)&&0<this.parent.dataSeries.length&&(s=this.parent.dataSeries[0].axisX.convertPixelToValue({x:a}));for(w=0;w<this.parent.dataSeries.length;w++)(v=this.parent.dataSeries[w].getDataPointAtX(s,!0))&&0<=v.index&&
(v.dataSeries=this.parent.dataSeries[w],null!==v.dataPoint.y&&v.dataSeries.visible&&p.push(v));if(0===p.length)return;p.sort(function(a,b){return a.distance-b.distance});w=0;if("rangeColumn"===p[0].dataSeries.type||"rangeArea"===p[0].dataSeries.type||"error"===p[0].dataSeries.type||"rangeSplineArea"===p[0].dataSeries.type||"candlestick"===p[0].dataSeries.type||"ohlc"===p[0].dataSeries.type||"boxAndWhisker"===p[0].dataSeries.type)for(v=Math.abs(d-this.parent.convertValueToPixel(p[0].dataPoint.y[0])),
s=t=0;s<p.length;s++)if(p[s].dataPoint.y&&p[s].dataPoint.y.length)for(x=0;x<p[s].dataPoint.y.length;x++)t=Math.abs(d-this.parent.convertValueToPixel(p[s].dataPoint.y[x])),t<v&&(v=t,w=s);else t=Math.abs(d-this.parent.convertValueToPixel(p[s].dataPoint.y)),t<v&&(v=t,w=s);else if("stackedColumn"===p[0].dataSeries.type||"stackedArea"===p[0].dataSeries.type)for(v=Math.abs(d-this.parent.convertValueToPixel(p[0].dataPoint.y)),s=A=t=0;s<p.length;s++)if(p[s].dataPoint.y&&p[s].dataPoint.y.length)for(x=0;x<
p[s].dataPoint.y.length;x++)t=Math.abs(d-this.parent.convertValueToPixel(p[s].dataPoint.y[x])),t<v&&(v=t,w=s);else A+=p[s].dataPoint.y,t=Math.abs(d-this.parent.convertValueToPixel(A)),t<v&&(v=t,w=s);else if("stackedColumn100"===p[0].dataSeries.type||"stackedArea100"===p[0].dataSeries.type)for(v=Math.abs(d-this.parent.convertValueToPixel(p[0].dataPoint.y)),s=E=A=t=0;s<p.length;s++)if(p[s].dataPoint.y&&p[s].dataPoint.y.length)for(x=0;x<p[s].dataPoint.y.length;x++)t=Math.abs(d-this.parent.convertValueToPixel(p[s].dataPoint.y[x])),
t<v&&(v=t,w=s);else A+=p[s].dataPoint.y,E=p[s].dataPoint.x.getTime?p[s].dataPoint.x.getTime():p[s].dataPoint.x,E=100*(A/p[s].dataSeries.plotUnit.dataPointYSums[E]),t=Math.abs(d-this.parent.convertValueToPixel(E)),t<v&&(v=t,w=s);else for(v=Math.abs(d-this.parent.convertValueToPixel(p[0].dataPoint.y)),s=t=0;s<p.length;s++)if(p[s].dataPoint.y&&p[s].dataPoint.y.length)for(x=0;x<p[s].dataPoint.y.length;x++)t=Math.abs(d-this.parent.convertValueToPixel(p[s].dataPoint.y[x])),t<v&&(v=t,w=s);else t=Math.abs(d-
this.parent.convertValueToPixel(p[s].dataPoint.y)),t<v&&(v=t,w=s);x=p[w];b=0;if("rangeColumn"===this.parent.dataSeries[w].type||"rangeArea"===this.parent.dataSeries[w].type||"error"===this.parent.dataSeries[w].type||"rangeSplineArea"===this.parent.dataSeries[w].type||"candlestick"===this.parent.dataSeries[w].type||"ohlc"===this.parent.dataSeries[w].type||"boxAndWhisker"===this.parent.dataSeries[w].type){v=Math.abs(d-this.parent.convertValueToPixel(x.dataPoint.y[0]));for(s=t=0;s<x.dataPoint.y.length;s++)t=
Math.abs(d-this.parent.convertValueToPixel(x.dataPoint.y[s])),t<v&&(v=t,b=s);m=1===q.lineWidth%2?(this.parent.convertValueToPixel(x.dataPoint.y[b])<<0)+0.5:this.parent.convertValueToPixel(x.dataPoint.y[b])<<0;h.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:c?c:x.dataPoint.y[b]}):r(this.options.label)?fa(c?c:x.dataPoint.y[b],this.valueFormatString,this.chart._cultureInfo):this.label;this.value=x.dataPoint.y[b]}else if("stackedColumn"===
this.parent.dataSeries[w].type||"stackedArea"===this.parent.dataSeries[w].type){v=Math.abs(d-this.parent.convertValueToPixel(p[0].dataPoint.y));A=t=0;for(s=w;0<=s;s--)A+=p[s].dataPoint.y,t=Math.abs(d-this.parent.convertValueToPixel(A)),t<v&&(v=t,b=s);m=1===q.lineWidth%2?(this.parent.convertValueToPixel(A)<<0)+0.5:this.parent.convertValueToPixel(A)<<0;h.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:c?c:x.dataPoint.y}):r(this.options.label)?
fa(c?c:x.dataPoint.y,this.valueFormatString,this.chart._cultureInfo):this.label;this.value=A}else if("stackedColumn100"===this.parent.dataSeries[w].type||"stackedArea100"===this.parent.dataSeries[w].type){v=Math.abs(d-this.parent.convertValueToPixel(p[0].dataPoint.y));A=t=0;for(s=w;0<=s;s--)A+=p[s].dataPoint.y,E=p[s].dataPoint.x.getTime?p[s].dataPoint.x.getTime():p[s].dataPoint.x,E=100*(A/p[s].dataSeries.plotUnit.dataPointYSums[E]),t=Math.abs(d-this.parent.convertValueToPixel(E)),t<v&&(v=t,b=s);m=
1===q.lineWidth%2?(this.parent.convertValueToPixel(E)<<0)+0.5:this.parent.convertValueToPixel(E)<<0;h.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:c?c:E}):r(this.options.label)?fa(c?c:E,this.valueFormatString,this.chart._cultureInfo):this.label;this.value=E}else"waterfall"===this.parent.dataSeries[w].type?(m=1===q.lineWidth%2?(this.parent.convertValueToPixel(x.dataSeries.dataPointEOs[x.index].cumulativeSum)<<0)+0.5:this.parent.convertValueToPixel(x.dataSeries.dataPointEOs[x.index].cumulativeSum)<<
0,h.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:c?c:x.dataSeries.dataPointEOs[x.index].cumulativeSum}):r(this.options.label)?fa(c?c:x.dataSeries.dataPointEOs[x.index].cumulativeSum,this.valueFormatString,this.chart._cultureInfo):this.label,this.value=x.dataSeries.dataPointEOs[x.index].cumulativeSum):(m=1===q.lineWidth%2?(r(a)?d:this.parent.convertValueToPixel(x.dataPoint.y)<<0)+0.5:r(a)?d:this.parent.convertValueToPixel(x.dataPoint.y)<<
0,h.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:x.dataPoint.y}):r(this.options.label)?fa(c?c:x.dataPoint.y,this.valueFormatString,this.chart._cultureInfo):this.label,this.value=x.dataPoint.y);f=l=m;b=this.chart.plotArea.x1;e=this.chart.plotArea.x2;this.bounds={x1:b,y1:f-n/2,x2:e,y2:l+n/2};h.y=l+h.fontSize/2-h.measureText().height/2+2;h.y-h.fontSize/2<this.chart.bounds.y1?h.y=this.chart.bounds.y1+h.fontSize/2+2:h.y+h.measureText().height-
h.fontSize/2>this.chart.bounds.y2&&(h.y=this.chart.bounds.y2-h.measureText().height+h.fontSize/2);"left"===this.parent._position?h.x=this.parent.lineCoordinates.x2-h.measureText().width:"right"===this.parent._position&&(h.x=this.parent.lineCoordinates.x2)}p=null;if("bottom"===this.parent._position||"top"===this.parent._position)"top"===this.parent._position&&h.y-h.fontSize/2<this.chart.bounds.y1&&(h.y=this.chart.bounds.y1+h.fontSize/2),"bottom"===this.parent._position&&this.parent.lineCoordinates.y2-
h.fontSize/2+h.measureText().height>this.chart.bounds.y2&&(h.y=this.chart.bounds.y2-h.height+h.fontSize/2+2),b>=this.parent.convertValueToPixel(this.parent.reversed?this.parent.viewportMaximum:this.parent.viewportMinimum)&&e<=this.parent.convertValueToPixel(this.parent.reversed?this.parent.viewportMinimum:this.parent.viewportMaximum)&&(0<n&&(q.moveTo(b,f),q.lineTo(e,l),q.stroke(),this._hidden=!1),q.restore(),!r(h.text)&&("number"===typeof h.text.valueOf()||0<h.text.length)&&h.render(!0));if("left"===
this.parent._position||"right"===this.parent._position)"left"===this.parent._position&&h.x<this.chart.bounds.x1&&(h.x=this.chart.bounds.x1),"right"===this.parent._position&&h.x+h.measureText().width>this.chart.bounds.x2&&(h.x=this.chart.bounds.x2-h.measureText().width),l>=this.parent.convertValueToPixel(this.parent.reversed?this.parent.viewportMinimum:this.parent.viewportMaximum)&&f<=this.parent.convertValueToPixel(this.parent.reversed?this.parent.viewportMaximum:this.parent.viewportMinimum)&&(0<
n&&(q.moveTo(b,f),q.lineTo(e,l),q.stroke(),this._hidden=!1),q.restore(),!r(h.text)&&("number"===typeof h.text.valueOf()||0<h.text.length)&&h.render(!0))}else{if("bottom"===this.parent._position||"top"===this.parent._position)b=e=k=1===q.lineWidth%2?(a<<0)+0.5:a<<0,f=this.chart.plotArea.y1,l=this.chart.plotArea.y2,this.bounds={x1:b-n/2,y1:f,x2:e+n/2,y2:l};else if("left"===this.parent._position||"right"===this.parent._position)f=l=m=1===q.lineWidth%2?(d<<0)+0.5:d<<0,b=this.chart.plotArea.x1,e=this.chart.plotArea.x2,
this.bounds={x1:b,y1:f-n/2,x2:e,y2:l+n/2};if("xySwapped"===this.chart.plotInfo.axisPlacement)if("left"===this.parent._position||"right"===this.parent._position){E=!1;if(this.parent.labels)for(p=Math.ceil(this.parent.interval),s=0;s<this.parent.viewportMaximum;s+=p)if(this.parent.labels[s])E=!0;else{E=!1;break}if(E){if("axisX"===this.parent.type)for(s=this.parent.convertPixelToValue({y:d}),v=null,w=0;w<this.parent.dataSeries.length;w++)(v=this.parent.dataSeries[w].getDataPointAtX(s,!0))&&0<=v.index&&
(h.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:c?c:this.parent.convertPixelToValue(a)}):r(this.options.label)?v.dataPoint.label:this.label)}else"dateTime"===this.parent.valueType?h.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:c?c:this.parent.convertPixelToValue(d)}):r(this.options.label)?Aa(c?c:this.parent.convertPixelToValue(d),this.valueFormatString,this.chart._cultureInfo):
this.label:"number"===this.parent.valueType&&(h.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:c?c:this.parent.convertPixelToValue(d)}):r(this.options.label)?fa(c?c:this.parent.convertPixelToValue(d),this.valueFormatString,this.chart._cultureInfo):this.label);h.y=d+h.fontSize/2-h.measureText().height/2+2;h.y-h.fontSize/2<this.chart.bounds.y1?h.y=this.chart.bounds.y1+h.fontSize/2+2:h.y+h.measureText().height-h.fontSize/2>this.chart.bounds.y2&&
(h.y=this.chart.bounds.y2-h.measureText().height+h.fontSize/2);"left"===this.parent._position?h.x=this.parent.lineCoordinates.x1-h.measureText().width:"right"===this.parent._position&&(h.x=this.parent.lineCoordinates.x2)}else{if("bottom"===this.parent._position||"top"===this.parent._position)h.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:c?c:this.parent.convertPixelToValue(a)}):r(this.options.label)?fa(c?c:this.parent.convertPixelToValue(a),
this.valueFormatString,this.chart._cultureInfo):this.label,h.x=b-h.measureText().width/2,h.x+h.width>this.chart.bounds.x2&&(h.x=this.chart.bounds.x2-h.width),h.x<this.chart.bounds.x1&&(h.x=this.chart.bounds.x1),"bottom"===this.parent._position?h.y=this.parent.lineCoordinates.y2+h.fontSize/2+2:"top"===this.parent._position&&(h.y=this.parent.lineCoordinates.y1-h.height+h.fontSize/2+2)}else if("bottom"===this.parent._position||"top"===this.parent._position){E=!1;p="";if(this.parent.labels)for(p=Math.ceil(this.parent.interval),
s=0;s<this.parent.viewportMaximum;s+=p)if(this.parent.labels[s])E=!0;else{E=!1;break}if(E){if("axisX"===this.parent.type)for(s=this.parent.convertPixelToValue({x:a}),v=null,w=0;w<this.parent.dataSeries.length;w++)(v=this.parent.dataSeries[w].getDataPointAtX(s,!0))&&0<=v.index&&(h.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:c?c:this.parent.convertPixelToValue(a)}):r(this.options.label)?c?c:v.dataPoint.label:this.label)}else"dateTime"===
this.parent.valueType?h.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:c?c:this.parent.convertPixelToValue(a)}):r(this.options.label)?Aa(c?c:this.parent.convertPixelToValue(a),this.valueFormatString,this.chart._cultureInfo):this.label:"number"===this.parent.valueType&&(h.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:c?c:0<this.parent.dataSeries.length?this.parent.convertPixelToValue(a):
""}):r(this.options.label)?fa(c?c:this.parent.convertPixelToValue(a),this.valueFormatString,this.chart._cultureInfo):this.label);h.x=b-h.measureText().width/2;h.x+h.width>this.chart.bounds.x2&&(h.x=this.chart.bounds.x2-h.width);h.x<this.chart.bounds.x1&&(h.x=this.chart.bounds.x1);"bottom"===this.parent._position?h.y=this.parent.lineCoordinates.y2+h.fontSize/2+2:"top"===this.parent._position&&(h.y=this.parent.lineCoordinates.y1-h.height+h.fontSize/2+2)}else if("left"===this.parent._position||"right"===
this.parent._position)h.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:c?c:this.parent.convertPixelToValue(d)}):r(this.options.label)?fa(c?c:this.parent.convertPixelToValue(d),this.valueFormatString,this.chart._cultureInfo):this.label,h.y=d+h.fontSize/2-h.measureText().height/2+2,h.y-h.fontSize/2<this.chart.bounds.y1?h.y=this.chart.bounds.y1+h.fontSize/2+2:h.y+h.measureText().height-h.fontSize/2>this.chart.bounds.y2&&(h.y=this.chart.bounds.y2-
h.measureText().height+h.fontSize/2),"left"===this.parent._position?h.x=this.parent.lineCoordinates.x2-h.measureText().width:"right"===this.parent._position&&(h.x=this.parent.lineCoordinates.x2);"left"===this.parent._position&&h.x<this.chart.bounds.x1?h.x=this.chart.bounds.x1:"right"===this.parent._position&&h.x+h.measureText().width>this.chart.bounds.x2?h.x=this.chart.bounds.x2-h.measureText().width:"top"===this.parent._position&&h.y-h.fontSize/2<this.chart.bounds.y1?h.y=this.chart.bounds.y1+h.fontSize/
2:"bottom"===this.parent._position&&this.parent.lineCoordinates.y2-h.fontSize/2+h.measureText().height>this.chart.bounds.y2&&(h.y=this.chart.bounds.y2-h.height+h.fontSize/2+2);0<n&&(q.moveTo(b,f),q.lineTo(e,l),q.stroke(),this._hidden=!1);q.restore();!r(h.text)&&("number"===typeof h.text.valueOf()||0<h.text.length)&&h.render(!0);this.value="bottom"===this.parent._position||"top"===this.parent._position?this.parent.convertPixelToValue(a):this.parent.convertPixelToValue(d)}if("bottom"===this.parent._position||
"top"===this.parent._position)this._updatedValue=this.parent.convertPixelToValue(k);if("left"===this.parent._position||"right"===this.parent._position)this._updatedValue=this.parent.convertPixelToValue(m);q.globalAlpha=g};oa(aa,X);aa.prototype._initialize=function(){this.updateOption("updated");this.updateOption("hidden");if(this.enabled){this.container=document.createElement("div");this.container.setAttribute("class","canvasjs-chart-tooltip");this.container.style.position="absolute";this.container.style.height=
"auto";this.container.style.boxShadow="1px 1px 2px 2px rgba(0,0,0,0.1)";this.container.style.zIndex="1000";this.container.style.pointerEvents="none";this.container.style.display="none";var a;a='<div style=" width: auto;height: auto;min-width: 50px;';a+="line-height: auto;";a+="margin: 0px 0px 0px 0px;";a+="padding: 5px;";a+="font-family: Calibri, Arial, Georgia, serif;";a+="font-weight: normal;";a+="font-style: "+(s?"italic;":"normal;");a+="font-size: 14px;";a+="color: #000000;";a+="text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);";
a+="text-align: left;";a+="border: 2px solid gray;";a+=s?"background: rgba(255,255,255,.9);":"background: rgb(255,255,255);";a+="text-indent: 0px;";a+="white-space: nowrap;";a+="border-radius: 5px;";a+="-moz-user-select:none;";a+="-khtml-user-select: none;";a+="-webkit-user-select: none;";a+="-ms-user-select: none;";a+="user-select: none;";s||(a+="filter: alpha(opacity = 90);",a+="filter: progid:DXImageTransform.Microsoft.Shadow(Strength=3, Direction=135, Color='#666666');");a+='} "> Sample Tooltip</div>';
this.container.innerHTML=a;this.contentDiv=this.container.firstChild;this.container.style.borderRadius=this.contentDiv.style.borderRadius;this.chart._canvasJSContainer.appendChild(this.container)}};aa.prototype.mouseMoveHandler=function(a,d){this._lastUpdated&&4>(new Date).getTime()-this._lastUpdated||(this._lastUpdated=(new Date).getTime(),this.chart.resetOverlayedCanvas(),this._updateToolTip(a,d))};aa.prototype._updateToolTip=function(a,d,c){c="undefined"===typeof c?!0:c;this.container||this._initialize();
this.enabled||(this.hide(),this.dispatchEvent("hidden",{chart:this.chart,toolTip:this},this));if(!this.chart.disableToolTip){if("undefined"===typeof a||"undefined"===typeof d){if(isNaN(this._prevX)||isNaN(this._prevY))return;a=this._prevX;d=this._prevY}else this._prevX=a,this._prevY=d;var b=null,e=null,f=[],l=0;if(this.shared&&this.enabled&&"none"!==this.chart.plotInfo.axisPlacement){if("xySwapped"===this.chart.plotInfo.axisPlacement){var k=[];if(this.chart.axisX)for(var m=0;m<this.chart.axisX.length;m++){for(var l=
this.chart.axisX[m].convertPixelToValue({y:d}),h=null,b=0;b<this.chart.axisX[m].dataSeries.length;b++)(h=this.chart.axisX[m].dataSeries[b].getDataPointAtX(l,c))&&0<=h.index&&(h.dataSeries=this.chart.axisX[m].dataSeries[b],null!==h.dataPoint.y&&k.push(h));h=null}if(this.chart.axisX2)for(m=0;m<this.chart.axisX2.length;m++){l=this.chart.axisX2[m].convertPixelToValue({y:d});h=null;for(b=0;b<this.chart.axisX2[m].dataSeries.length;b++)(h=this.chart.axisX2[m].dataSeries[b].getDataPointAtX(l,c))&&0<=h.index&&
(h.dataSeries=this.chart.axisX2[m].dataSeries[b],null!==h.dataPoint.y&&k.push(h));h=null}}else{k=[];if(this.chart.axisX)for(m=0;m<this.chart.axisX.length;m++)for(l=this.chart.axisX[m].convertPixelToValue({x:a}),h=null,b=0;b<this.chart.axisX[m].dataSeries.length;b++)(h=this.chart.axisX[m].dataSeries[b].getDataPointAtX(l,c))&&0<=h.index&&(h.dataSeries=this.chart.axisX[m].dataSeries[b],null!==h.dataPoint.y&&k.push(h));if(this.chart.axisX2)for(m=0;m<this.chart.axisX2.length;m++)for(l=this.chart.axisX2[m].convertPixelToValue({x:a}),
h=null,b=0;b<this.chart.axisX2[m].dataSeries.length;b++)(h=this.chart.axisX2[m].dataSeries[b].getDataPointAtX(l,c))&&0<=h.index&&(h.dataSeries=this.chart.axisX2[m].dataSeries[b],null!==h.dataPoint.y&&k.push(h))}if(0===k.length)return;k.sort(function(a,b){return a.distance-b.distance});c=k[0];for(b=0;b<k.length;b++)k[b].dataPoint.x.valueOf()===c.dataPoint.x.valueOf()&&f.push(k[b]);k=null}else{if(h=this.chart.getDataPointAtXY(a,d,c))this.currentDataPointIndex=h.dataPointIndex,this.currentSeriesIndex=
h.dataSeries.index;else if(s)if(h=Ya(a,d,this.chart._eventManager.ghostCtx),0<h&&"undefined"!==typeof this.chart._eventManager.objectMap[h]){h=this.chart._eventManager.objectMap[h];if("legendItem"===h.objectType)return;this.currentSeriesIndex=h.dataSeriesIndex;this.currentDataPointIndex=0<=h.dataPointIndex?h.dataPointIndex:-1}else this.currentDataPointIndex=-1;else this.currentDataPointIndex=-1;if(0<=this.currentSeriesIndex){e=this.chart.data[this.currentSeriesIndex];h={};if(0<=this.currentDataPointIndex)b=
e.dataPoints[this.currentDataPointIndex],h.dataSeries=e,h.dataPoint=b,h.index=this.currentDataPointIndex,h.distance=Math.abs(b.x-l),"waterfall"===e.type&&(h.cumulativeSumYStartValue=e.dataPointEOs[this.currentDataPointIndex].cumulativeSumYStartValue,h.cumulativeSum=e.dataPointEOs[this.currentDataPointIndex].cumulativeSum);else{if(!this.enabled||"line"!==e.type&&"stepLine"!==e.type&&"spline"!==e.type&&"area"!==e.type&&"stepArea"!==e.type&&"splineArea"!==e.type&&"stackedArea"!==e.type&&"stackedArea100"!==
e.type&&"rangeArea"!==e.type&&"rangeSplineArea"!==e.type&&"candlestick"!==e.type&&"ohlc"!==e.type&&"boxAndWhisker"!==e.type)return;l=e.axisX.convertPixelToValue({x:a});h=e.getDataPointAtX(l,c);r(h)||(h.dataSeries=e,this.currentDataPointIndex=h.index,b=h.dataPoint)}if(!r(h)&&!r(h.dataPoint)&&!r(h.dataPoint.y))if(h.dataSeries.axisY)if(0<h.dataPoint.y.length){for(b=c=0;b<h.dataPoint.y.length;b++)h.dataPoint.y[b]<h.dataSeries.axisY.viewportMinimum?c--:h.dataPoint.y[b]>h.dataSeries.axisY.viewportMaximum&&
c++;c<h.dataPoint.y.length&&c>-h.dataPoint.y.length&&f.push(h)}else"column"===e.type||"bar"===e.type?0>h.dataPoint.y?0>h.dataSeries.axisY.viewportMinimum&&h.dataSeries.axisY.viewportMaximum>=h.dataPoint.y&&f.push(h):h.dataSeries.axisY.viewportMinimum<=h.dataPoint.y&&0<=h.dataSeries.axisY.viewportMaximum&&f.push(h):"bubble"===e.type?(c=this.chart._eventManager.objectMap[e.dataPointIds[h.index]].size/2,h.dataPoint.y>=h.dataSeries.axisY.viewportMinimum-c&&h.dataPoint.y<=h.dataSeries.axisY.viewportMaximum+
c&&f.push(h)):"waterfall"===e.type?(c=0,h.cumulativeSumYStartValue<h.dataSeries.axisY.viewportMinimum?c--:h.cumulativeSumYStartValue>h.dataSeries.axisY.viewportMaximum&&c++,h.cumulativeSum<h.dataSeries.axisY.viewportMinimum?c--:h.cumulativeSum>h.dataSeries.axisY.viewportMaximum&&c++,2>c&&-2<c&&f.push(h)):(0<=h.dataSeries.type.indexOf("100")||"stackedColumn"===e.type||"stackedBar"===e.type||h.dataPoint.y>=h.dataSeries.axisY.viewportMinimum&&h.dataPoint.y<=h.dataSeries.axisY.viewportMaximum)&&f.push(h);
else f.push(h)}}if(0<f.length){this.highlightObjects(f);if(this.enabled){var p="",p=this.getToolTipInnerHTML({entries:f});if(null!==p){this.contentDiv.innerHTML=p;c=!1;"none"===this.container.style.display&&(c=!0,this.container.style.display="block");try{this.contentDiv.style.background=this.backgroundColor?this.backgroundColor:s?"rgba(255,255,255,.9)":"rgb(255,255,255)",this.borderColor="waterfall"===f[0].dataSeries.type?this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=
this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:f[0].dataPoint.color?f[0].dataPoint.color:0<f[0].dataPoint.y?f[0].dataSeries.risingColor:f[0].dataSeries.fallingColor:"error"===f[0].dataSeries.type?this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:f[0].dataSeries.color?f[0].dataSeries.color:f[0].dataSeries._colorSet[e.index%f[0].dataSeries._colorSet.length]:
this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:f[0].dataPoint.color?f[0].dataPoint.color:f[0].dataSeries.color?f[0].dataSeries.color:f[0].dataSeries._colorSet[f[0].index%f[0].dataSeries._colorSet.length],this.contentDiv.style.borderWidth=this.borderThickness||0===this.borderThickness?this.borderThickness+"px":"2px",this.contentDiv.style.borderRadius=this.cornerRadius||0===this.cornerRadius?
this.cornerRadius+"px":"5px",this.container.style.borderRadius=this.contentDiv.style.borderRadius,this.contentDiv.style.fontSize=this.fontSize||0===this.fontSize?this.fontSize+"px":"14px",this.contentDiv.style.color=this.fontColor?this.fontColor:"#000000",this.contentDiv.style.fontFamily=this.fontFamily?this.fontFamily:"Calibri, Arial, Georgia, serif;",this.contentDiv.style.fontWeight=this.fontWeight?this.fontWeight:"normal",this.contentDiv.style.fontStyle=this.fontStyle?this.fontStyle:s?"italic":
"normal"}catch(n){}"pie"===f[0].dataSeries.type||"doughnut"===f[0].dataSeries.type||"funnel"===f[0].dataSeries.type||"pyramid"===f[0].dataSeries.type||"bar"===f[0].dataSeries.type||"rangeBar"===f[0].dataSeries.type||"stackedBar"===f[0].dataSeries.type||"stackedBar100"===f[0].dataSeries.type?a=a-10-this.container.clientWidth:(a=f[0].dataSeries.axisX.convertValueToPixel(f[0].dataPoint.x)-this.container.clientWidth<<0,a-=10);0>a&&(a+=this.container.clientWidth+20);a+this.container.clientWidth>Math.max(this.chart.container.clientWidth,
this.chart.width)&&(a=Math.max(0,Math.max(this.chart.container.clientWidth,this.chart.width)-this.container.clientWidth));d=1!==f.length||this.shared||"line"!==f[0].dataSeries.type&&"stepLine"!==f[0].dataSeries.type&&"spline"!==f[0].dataSeries.type&&"area"!==f[0].dataSeries.type&&"stepArea"!==f[0].dataSeries.type&&"splineArea"!==f[0].dataSeries.type?"bar"===f[0].dataSeries.type||"rangeBar"===f[0].dataSeries.type||"stackedBar"===f[0].dataSeries.type||"stackedBar100"===f[0].dataSeries.type?f[0].dataSeries.axisX.convertValueToPixel(f[0].dataPoint.x):
d:f[0].dataSeries.axisY.convertValueToPixel(f[0].dataPoint.y);d=-d+10;0<d+this.container.clientHeight+5&&(d-=d+this.container.clientHeight+5-0);this.fixMozTransitionDelay(a,d);!this.animationEnabled||c?this.disableAnimation():(this.enableAnimation(),this.container.style.MozTransition=this.mozContainerTransition);this.positionLeft=a;this.positionBottom=d;this.container.style.left=a+"px";this.container.style.bottom=d+"px"}else this.hide(!1),this.dispatchEvent("hidden",{chart:this.chart,toolTip:this},
this)}d=[];for(b=0;b<f.length;b++)d.push({xValue:f[b].dataPoint.x,dataPoint:f[b].dataPoint,dataSeries:f[b].dataSeries,dataPointIndex:f[b].index,dataSeriesIndex:f[b].dataSeries._index});p={chart:this.chart,toolTip:this.options,content:p,entries:d};this._entries=f;this.dispatchEvent("updated",p,this)}else this.hide()}};aa.prototype.highlightObjects=function(a){var d=this.chart.overlaidCanvasCtx;if(r(this.chart.clearedOverlayedCanvas)||"toolTip"===this.chart.clearedOverlayedCanvas)this.chart.resetOverlayedCanvas(),
d.clearRect(0,0,this.chart.width,this.chart.height),this.chart.clearedOverlayedCanvas="toolTip";d.save();var c=this.chart.plotArea,b=0;d.beginPath();d.rect(c.x1,c.y1,c.x2-c.x1,c.y2-c.y1);d.clip();for(c=0;c<a.length;c++){var e=a[c];if((e=this.chart._eventManager.objectMap[e.dataSeries.dataPointIds[e.index]])&&e.objectType&&"dataPoint"===e.objectType){var b=this.chart.data[e.dataSeriesIndex],f=b.dataPoints[e.dataPointIndex],l=e.dataPointIndex;!1===f.highlightEnabled||!0!==b.highlightEnabled&&!0!==f.highlightEnabled||
("line"===b.type||"stepLine"===b.type||"spline"===b.type||"scatter"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"stackedArea"===b.type||"stackedArea100"===b.type||"rangeArea"===b.type||"rangeSplineArea"===b.type?(f=b.getMarkerProperties(l,e.x1,e.y1,this.chart.overlaidCanvasCtx),f.size=Math.max(1.5*f.size<<0,10),f.borderColor=f.borderColor||"#FFFFFF",f.borderThickness=f.borderThickness||Math.ceil(0.1*f.size),Y.drawMarkers([f]),"undefined"!==typeof e.y2&&(f=b.getMarkerProperties(l,
e.x1,e.y2,this.chart.overlaidCanvasCtx),f.size=Math.max(1.5*f.size<<0,10),f.borderColor=f.borderColor||"#FFFFFF",f.borderThickness=f.borderThickness||Math.ceil(0.1*f.size),Y.drawMarkers([f]))):"bubble"===b.type?(f=b.getMarkerProperties(l,e.x1,e.y1,this.chart.overlaidCanvasCtx),f.size=e.size,f.color="white",f.borderColor="white",d.globalAlpha=0.3,Y.drawMarkers([f]),d.globalAlpha=1):"column"===b.type||"stackedColumn"===b.type||"stackedColumn100"===b.type||"bar"===b.type||"rangeBar"===b.type||"stackedBar"===
b.type||"stackedBar100"===b.type||"rangeColumn"===b.type||"waterfall"===b.type?da(d,e.x1,e.y1,e.x2,e.y2,"white",0,null,!1,!1,!1,!1,0.3):"pie"===b.type||"doughnut"===b.type?Z(d,e.center,e.radius,"white",b.type,e.startAngle,e.endAngle,0.3,e.percentInnerRadius):"funnel"===b.type||"pyramid"===b.type?qa(d,e.funnelSection,0.3,"white"):"candlestick"===b.type?(d.globalAlpha=1,d.strokeStyle=e.color,d.lineWidth=2*e.borderThickness,b=0===d.lineWidth%2?0:0.5,d.beginPath(),d.moveTo(e.x3-b,Math.min(e.y2,e.y3)),
d.lineTo(e.x3-b,Math.min(e.y1,e.y4)),d.stroke(),d.beginPath(),d.moveTo(e.x3-b,Math.max(e.y1,e.y4)),d.lineTo(e.x3-b,Math.max(e.y2,e.y3)),d.stroke(),da(d,e.x1,Math.min(e.y1,e.y4),e.x2,Math.max(e.y1,e.y4),"transparent",2*e.borderThickness,e.color,!1,!1,!1,!1),d.globalAlpha=1):"ohlc"===b.type?(d.globalAlpha=1,d.strokeStyle=e.color,d.lineWidth=2*e.borderThickness,b=0===d.lineWidth%2?0:0.5,d.beginPath(),d.moveTo(e.x3-b,e.y2),d.lineTo(e.x3-b,e.y3),d.stroke(),d.beginPath(),d.moveTo(e.x3,e.y1),d.lineTo(e.x1,
e.y1),d.stroke(),d.beginPath(),d.moveTo(e.x3,e.y4),d.lineTo(e.x2,e.y4),d.stroke(),d.globalAlpha=1):"boxAndWhisker"===b.type?(d.save(),d.globalAlpha=1,d.strokeStyle=e.stemColor,d.lineWidth=2*e.stemThickness,0<e.stemThickness&&(d.beginPath(),d.moveTo(e.x3,e.y2+e.borderThickness/2),d.lineTo(e.x3,e.y1+e.whiskerThickness/2),d.stroke(),d.beginPath(),d.moveTo(e.x3,e.y4-e.whiskerThickness/2),d.lineTo(e.x3,e.y3-e.borderThickness/2),d.stroke()),d.beginPath(),da(d,e.x1-e.borderThickness/2,Math.max(e.y2+e.borderThickness/
2,e.y3+e.borderThickness/2),e.x2+e.borderThickness/2,Math.min(e.y2-e.borderThickness/2,e.y3-e.borderThickness/2),"transparent",e.borderThickness,e.color,!1,!1,!1,!1),d.globalAlpha=1,d.strokeStyle=e.whiskerColor,d.lineWidth=2*e.whiskerThickness,0<e.whiskerThickness&&(d.beginPath(),d.moveTo(Math.floor(e.x3-e.whiskerLength/2),e.y4),d.lineTo(Math.ceil(e.x3+e.whiskerLength/2),e.y4),d.stroke(),d.beginPath(),d.moveTo(Math.floor(e.x3-e.whiskerLength/2),e.y1),d.lineTo(Math.ceil(e.x3+e.whiskerLength/2),e.y1),
d.stroke()),d.globalAlpha=1,d.strokeStyle=e.lineColor,d.lineWidth=2*e.lineThickness,0<e.lineThickness&&(d.beginPath(),d.moveTo(e.x1,e.y5),d.lineTo(e.x2,e.y5),d.stroke()),d.restore(),d.globalAlpha=1):"error"===b.type&&w(d,e.x1,e.y1,e.x2,e.y2,"white",e.whiskerProperties,e.stemProperties,e.isXYSwapped,0.3))}}d.restore();d.globalAlpha=1;d.beginPath()};aa.prototype.getToolTipInnerHTML=function(a){a=a.entries;for(var d=null,c=null,b=null,e=0,f="",l=!0,k=0;k<a.length;k++)if(a[k].dataSeries.toolTipContent||
a[k].dataPoint.toolTipContent){l=!1;break}if(l&&(this.content&&"function"===typeof this.content||this.contentFormatter))a={chart:this.chart,toolTip:this.options,entries:a},d=this.contentFormatter?this.contentFormatter(a):this.content(a);else if(this.shared&&"none"!==this.chart.plotInfo.axisPlacement){for(var m=null,h="",k=0;k<a.length;k++)c=a[k].dataSeries,b=a[k].dataPoint,e=a[k].index,f="",0===k&&(l&&!this.content)&&(this.chart.axisX&&0<this.chart.axisX.length?h+="undefined"!==typeof this.chart.axisX[0].labels[b.x]?
this.chart.axisX[0].labels[b.x]:"{x}":this.chart.axisX2&&0<this.chart.axisX2.length&&(h+="undefined"!==typeof this.chart.axisX2[0].labels[b.x]?this.chart.axisX2[0].labels[b.x]:"{x}"),h+="</br>",h=this.chart.replaceKeywordsWithValue(h,b,c,e)),null===b.toolTipContent||"undefined"===typeof b.toolTipContent&&null===c.options.toolTipContent||("line"===c.type||"stepLine"===c.type||"spline"===c.type||"area"===c.type||"stepArea"===c.type||"splineArea"===c.type||"column"===c.type||"bar"===c.type||"scatter"===
c.type||"stackedColumn"===c.type||"stackedColumn100"===c.type||"stackedBar"===c.type||"stackedBar100"===c.type||"stackedArea"===c.type||"stackedArea100"===c.type||"waterfall"===c.type?(this.chart.axisX&&1<this.chart.axisX.length&&(f+=m!=c.axisXIndex?c.axisX.title?c.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),f+=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+
"\"'>{name}:</span>&nbsp;&nbsp;{y}",m=c.axisXIndex):"bubble"===c.type?(this.chart.axisX&&1<this.chart.axisX.length&&(f+=m!=c.axisXIndex?c.axisX.title?c.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),f+=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>{name}:</span>&nbsp;&nbsp;{y}, &nbsp;&nbsp;{z}"):"rangeColumn"===c.type||"rangeBar"===c.type||"rangeArea"===
c.type||"rangeSplineArea"===c.type||"error"===c.type?(this.chart.axisX&&1<this.chart.axisX.length&&(f+=m!=c.axisXIndex?c.axisX.title?c.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),f+=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>{name}:</span>&nbsp;&nbsp;{y[0]},&nbsp;{y[1]}"):"candlestick"===c.type||"ohlc"===c.type?(this.chart.axisX&&1<this.chart.axisX.length&&
(f+=m!=c.axisXIndex?c.axisX.title?c.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),f+=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>{name}:</span><br/>Open: &nbsp;&nbsp;{y[0]}<br/>High: &nbsp;&nbsp;&nbsp;{y[1]}<br/>Low:&nbsp;&nbsp;&nbsp;{y[2]}<br/>Close: &nbsp;&nbsp;{y[3]}"):"boxAndWhisker"===c.type&&(this.chart.axisX&&1<this.chart.axisX.length&&(f+=
m!=c.axisXIndex?c.axisX.title?c.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),f+=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>{name}:</span><br/>Minimum: &nbsp;&nbsp;{y[0]}<br/>Q1: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{y[1]}<br/>Q2: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{y[4]}<br/>Q3: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{y[2]}<br/>Maximum: &nbsp;{y[3]}"),
null===d&&(d=""),!0===this.reversed?(d=this.chart.replaceKeywordsWithValue(f,b,c,e)+d,k<a.length-1&&(d="</br>"+d)):(d+=this.chart.replaceKeywordsWithValue(f,b,c,e),k<a.length-1&&(d+="</br>")));null!==d&&(d=h+d)}else{c=a[0].dataSeries;b=a[0].dataPoint;e=a[0].index;if(null===b.toolTipContent||"undefined"===typeof b.toolTipContent&&null===c.options.toolTipContent)return null;"line"===c.type||"stepLine"===c.type||"spline"===c.type||"area"===c.type||"stepArea"===c.type||"splineArea"===c.type||"column"===
c.type||"bar"===c.type||"scatter"===c.type||"stackedColumn"===c.type||"stackedColumn100"===c.type||"stackedBar"===c.type||"stackedBar100"===c.type||"stackedArea"===c.type||"stackedArea100"===c.type||"waterfall"===c.type?f=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>"+(b.label?"{label}":"{x}")+":</span>&nbsp;&nbsp;{y}":"bubble"===c.type?f=b.toolTipContent?
b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>"+(b.label?"{label}":"{x}")+":</span>&nbsp;&nbsp;{y}, &nbsp;&nbsp;{z}":"pie"===c.type||"doughnut"===c.type||"funnel"===c.type||"pyramid"===c.type?f=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":
"'color:{color};'")+"\"'>"+(b.name?"{name}:</span>&nbsp;&nbsp;":b.label?"{label}:</span>&nbsp;&nbsp;":"</span>")+"{y}":"rangeColumn"===c.type||"rangeBar"===c.type||"rangeArea"===c.type||"rangeSplineArea"===c.type||"error"===c.type?f=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>"+(b.label?"{label}":"{x}")+" :</span>&nbsp;&nbsp;{y[0]}, &nbsp;{y[1]}":
"candlestick"===c.type||"ohlc"===c.type?f=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>"+(b.label?"{label}":"{x}")+"</span><br/>Open: &nbsp;&nbsp;{y[0]}<br/>High: &nbsp;&nbsp;&nbsp;{y[1]}<br/>Low: &nbsp;&nbsp;&nbsp;&nbsp;{y[2]}<br/>Close: &nbsp;&nbsp;{y[3]}":"boxAndWhisker"===c.type&&(f=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:
this.content&&"function"!==typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>"+(b.label?"{label}":"{x}")+"</span><br/>Minimum: &nbsp;&nbsp;{y[0]}<br/>Q1: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{y[1]}<br/>Q2: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{y[4]}<br/>Q3: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{y[2]}<br/>Maximum: &nbsp;{y[3]}");
null===d&&(d="");d+=this.chart.replaceKeywordsWithValue(f,b,c,e)}return d};aa.prototype.enableAnimation=function(){if(!this.container.style.WebkitTransition){var a=this.getContainerTransition(this.containerTransitionDuration);this.container.style.WebkitTransition=a;this.container.style.MsTransition=a;this.container.style.transition=a;this.container.style.MozTransition=this.mozContainerTransition}};aa.prototype.disableAnimation=function(){this.container.style.WebkitTransition&&(this.container.style.WebkitTransition=
"",this.container.style.MozTransition="",this.container.style.MsTransition="",this.container.style.transition="")};aa.prototype.hide=function(a){this.container&&(this.container.style.display="none",this.currentSeriesIndex=-1,this._prevY=this._prevX=NaN,("undefined"===typeof a||a)&&this.chart.resetOverlayedCanvas())};aa.prototype.show=function(a,d,c){this._updateToolTip(a,d,"undefined"===typeof c?!1:c)};aa.prototype.showAtIndex=function(a,d){};aa.prototype.showAtX=function(a,d){if(!this.enabled)return!1;
this.chart.clearedOverlayedCanvas=null;var c,b,e,f=[];e=!1;d=!r(d)&&0<=d&&d<this.chart.data.length?d:0;if(this.shared)for(var l=0;l<this.chart.data.length;l++)c=this.chart.data[l],(b=c.getDataPointAtX(a,!1))&&(b.dataPoint&&!r(b.dataPoint.y)&&c.visible)&&(b.dataSeries=c,f.push(b));else c=this.chart.data[d],(b=c.getDataPointAtX(a,!1))&&(b.dataPoint&&!r(b.dataPoint.y)&&c.visible)&&(b.dataSeries=c,f.push(b));if(0<f.length){for(l=0;l<f.length;l++)if(b=f[l],b.dataPoint.x<b.dataSeries.axisX.viewportMinimum||
b.dataPoint.x>b.dataSeries.axisX.viewportMaximum||b.dataPoint.y<b.dataSeries.axisY.viewportMinimum||b.dataPoint.y>b.dataSeries.axisY.viewportMaximum)e=!0;else{e=!1;break}if(e)return this.hide(),!1;this.highlightObjects(f);this._entries=f;b="";b=this.getToolTipInnerHTML({entries:f});if(null!==b){this.contentDiv.innerHTML=b;b=!1;"none"===this.container.style.display&&(b=!0,this.container.style.display="block");try{this.contentDiv.style.background=this.backgroundColor?this.backgroundColor:s?"rgba(255,255,255,.9)":
"rgb(255,255,255)",this.borderColor="waterfall"===f[0].dataSeries.type?this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:f[0].dataPoint.color?f[0].dataPoint.color:0<f[0].dataPoint.y?f[0].dataSeries.risingColor:f[0].dataSeries.fallingColor:"error"===f[0].dataSeries.type?this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?
this.options.borderColor:f[0].dataSeries.color?f[0].dataSeries.color:f[0].dataSeries._colorSet[c.index%f[0].dataSeries._colorSet.length]:this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:f[0].dataPoint.color?f[0].dataPoint.color:f[0].dataSeries.color?f[0].dataSeries.color:f[0].dataSeries._colorSet[f[0].index%f[0].dataSeries._colorSet.length],this.contentDiv.style.borderWidth=this.borderThickness||
0===this.borderThickness?this.borderThickness+"px":"2px",this.contentDiv.style.borderRadius=this.cornerRadius||0===this.cornerRadius?this.cornerRadius+"px":"5px",this.container.style.borderRadius=this.contentDiv.style.borderRadius,this.contentDiv.style.fontSize=this.fontSize||0===this.fontSize?this.fontSize+"px":"14px",this.contentDiv.style.color=this.fontColor?this.fontColor:"#000000",this.contentDiv.style.fontFamily=this.fontFamily?this.fontFamily:"Calibri, Arial, Georgia, serif;",this.contentDiv.style.fontWeight=
this.fontWeight?this.fontWeight:"normal",this.contentDiv.style.fontStyle=this.fontStyle?this.fontStyle:s?"italic":"normal"}catch(k){}"pie"===f[0].dataSeries.type||"doughnut"===f[0].dataSeries.type||"funnel"===f[0].dataSeries.type||"pyramid"===f[0].dataSeries.type?c=mouseX-10-this.container.clientWidth:(c="bar"===f[0].dataSeries.type||"rangeBar"===f[0].dataSeries.type||"stackedBar"===f[0].dataSeries.type||"stackedBar100"===f[0].dataSeries.type?f[0].dataSeries.axisY.convertValueToPixel(f[0].dataPoint.y)-
this.container.clientWidth<<0:f[0].dataSeries.axisX.convertValueToPixel(f[0].dataPoint.x)-this.container.clientWidth<<0,c-=10);0>c&&(c+=this.container.clientWidth+20);c+this.container.clientWidth>Math.max(this.chart.container.clientWidth,this.chart.width)&&(c=Math.max(0,Math.max(this.chart.container.clientWidth,this.chart.width)-this.container.clientWidth));f=1!==f.length||this.shared||"line"!==f[0].dataSeries.type&&"stepLine"!==f[0].dataSeries.type&&"spline"!==f[0].dataSeries.type&&"area"!==f[0].dataSeries.type&&
"stepArea"!==f[0].dataSeries.type&&"splineArea"!==f[0].dataSeries.type?"bar"===f[0].dataSeries.type||"rangeBar"===f[0].dataSeries.type||"stackedBar"===f[0].dataSeries.type||"stackedBar100"===f[0].dataSeries.type?f[0].dataSeries.axisX.convertValueToPixel(f[0].dataPoint.x):f[0].dataSeries.axisY.convertValueToPixel(f[0].dataPoint.y):f[0].dataSeries.axisY.convertValueToPixel(f[0].dataPoint.y);f=-f+10;0<f+this.container.clientHeight+5&&(f-=f+this.container.clientHeight+5-0);this.fixMozTransitionDelay(c,
f);!this.animationEnabled||b?this.disableAnimation():(this.enableAnimation(),this.container.style.MozTransition=this.mozContainerTransition);this.container.style.left=c+"px";this.container.style.bottom=f+"px"}else return this.hide(!1),!1}else return this.hide(),!1;return!0};aa.prototype.fixMozTransitionDelay=function(a,d){if(20<this.chart._eventManager.lastObjectId)this.mozContainerTransition=this.getContainerTransition(0);else{var c=parseFloat(this.container.style.left),c=isNaN(c)?0:c,b=parseFloat(this.container.style.bottom),
b=isNaN(b)?0:b;10<Math.sqrt(Math.pow(c-a,2)+Math.pow(b-d,2))?this.mozContainerTransition=this.getContainerTransition(0.1):this.mozContainerTransition=this.getContainerTransition(0)}};aa.prototype.getContainerTransition=function(a){return"left "+a+"s ease-out 0s, bottom "+a+"s ease-out 0s"};ea.prototype.reset=function(){this.lastObjectId=0;this.objectMap=[];this.rectangularRegionEventSubscriptions=[];this.previousDataPointEventObject=null;this.eventObjects=[];s&&(this.ghostCtx.clearRect(0,0,this.chart.width,
this.chart.height),this.ghostCtx.beginPath())};ea.prototype.getNewObjectTrackingId=function(){return++this.lastObjectId};ea.prototype.mouseEventHandler=function(a){if("mousemove"===a.type||"click"===a.type){var d=[],c=Na(a),b=null;if((b=this.chart.getObjectAtXY(c.x,c.y,!1))&&"undefined"!==typeof this.objectMap[b])if(b=this.objectMap[b],"dataPoint"===b.objectType){var e=this.chart.data[b.dataSeriesIndex],f=e.dataPoints[b.dataPointIndex],l=b.dataPointIndex;b.eventParameter={x:c.x,y:c.y,dataPoint:f,
dataSeries:e.options,dataPointIndex:l,dataSeriesIndex:e.index,chart:this.chart};b.eventContext={context:f,userContext:f,mouseover:"mouseover",mousemove:"mousemove",mouseout:"mouseout",click:"click"};d.push(b);b=this.objectMap[e.id];b.eventParameter={x:c.x,y:c.y,dataPoint:f,dataSeries:e.options,dataPointIndex:l,dataSeriesIndex:e.index,chart:this.chart};b.eventContext={context:e,userContext:e.options,mouseover:"mouseover",mousemove:"mousemove",mouseout:"mouseout",click:"click"};d.push(this.objectMap[e.id])}else"legendItem"===
b.objectType&&(e=this.chart.data[b.dataSeriesIndex],f=null!==b.dataPointIndex?e.dataPoints[b.dataPointIndex]:null,b.eventParameter={x:c.x,y:c.y,dataSeries:e.options,dataPoint:f,dataPointIndex:b.dataPointIndex,dataSeriesIndex:b.dataSeriesIndex,chart:this.chart},b.eventContext={context:this.chart.legend,userContext:this.chart.legend.options,mouseover:"itemmouseover",mousemove:"itemmousemove",mouseout:"itemmouseout",click:"itemclick"},d.push(b));e=[];for(c=0;c<this.mouseoveredObjectMaps.length;c++){f=
!0;for(b=0;b<d.length;b++)if(d[b].id===this.mouseoveredObjectMaps[c].id){f=!1;break}f?this.fireEvent(this.mouseoveredObjectMaps[c],"mouseout",a):e.push(this.mouseoveredObjectMaps[c])}this.mouseoveredObjectMaps=e;for(c=0;c<d.length;c++){e=!1;for(b=0;b<this.mouseoveredObjectMaps.length;b++)if(d[c].id===this.mouseoveredObjectMaps[b].id){e=!0;break}e||(this.fireEvent(d[c],"mouseover",a),this.mouseoveredObjectMaps.push(d[c]));"click"===a.type?this.fireEvent(d[c],"click",a):"mousemove"===a.type&&this.fireEvent(d[c],
"mousemove",a)}}};ea.prototype.fireEvent=function(a,d,c){if(a&&d){var b=a.eventParameter,e=a.eventContext,f=a.eventContext.userContext;f&&(e&&f[e[d]])&&f[e[d]].call(f,b);"mouseout"!==d?f.cursor&&f.cursor!==c.target.style.cursor&&(c.target.style.cursor=f.cursor):(c.target.style.cursor=this.chart._defaultCursor,delete a.eventParameter,delete a.eventContext);"click"===d&&("dataPoint"===a.objectType&&this.chart.pieDoughnutClickHandler)&&this.chart.pieDoughnutClickHandler.call(this.chart.data[a.dataSeriesIndex],
b);"click"===d&&("dataPoint"===a.objectType&&this.chart.funnelPyramidClickHandler)&&this.chart.funnelPyramidClickHandler.call(this.chart.data[a.dataSeriesIndex],b)}};ka.prototype.animate=function(a,d,c,b,e){var f=this;this.chart.isAnimating=!0;e=e||L.easing.linear;c&&this.animations.push({startTime:(new Date).getTime()+(a?a:0),duration:d,animationCallback:c,onComplete:b});for(a=[];0<this.animations.length;)if(d=this.animations.shift(),c=(new Date).getTime(),b=0,d.startTime<=c&&(b=e(Math.min(c-d.startTime,
d.duration),0,1,d.duration),b=Math.min(b,1),isNaN(b)||!isFinite(b))&&(b=1),1>b&&a.push(d),d.animationCallback(b),1<=b&&d.onComplete)d.onComplete();this.animations=a;0<this.animations.length?this.animationRequestId=this.chart.requestAnimFrame.call(window,function(){f.animate.call(f)}):this.chart.isAnimating=!1};ka.prototype.cancelAllAnimations=function(){this.animations=[];this.animationRequestId&&this.chart.cancelRequestAnimFrame.call(window,this.animationRequestId);this.animationRequestId=null;this.chart.isAnimating=
!1};var L={yScaleAnimation:function(a,d){if(0!==a){var c=d.dest,b=d.source.canvas,e=d.animationBase;c.drawImage(b,0,0,b.width,b.height,0,e-e*a,c.canvas.width/ja,a*c.canvas.height/ja)}},xScaleAnimation:function(a,d){if(0!==a){var c=d.dest,b=d.source.canvas,e=d.animationBase;c.drawImage(b,0,0,b.width,b.height,e-e*a,0,a*c.canvas.width/ja,c.canvas.height/ja)}},xClipAnimation:function(a,d){if(0!==a){var c=d.dest,b=d.source.canvas;c.save();0<a&&c.drawImage(b,0,0,b.width*a,b.height,0,0,b.width*a/ja,b.height/
ja);c.restore()}},fadeInAnimation:function(a,d){if(0!==a){var c=d.dest,b=d.source.canvas;c.save();c.globalAlpha=a;c.drawImage(b,0,0,b.width,b.height,0,0,c.canvas.width/ja,c.canvas.height/ja);c.restore()}},easing:{linear:function(a,d,c,b){return c*a/b+d},easeOutQuad:function(a,d,c,b){return-c*(a/=b)*(a-2)+d},easeOutQuart:function(a,d,c,b){return-c*((a=a/b-1)*a*a*a-1)+d},easeInQuad:function(a,d,c,b){return c*(a/=b)*a+d},easeInQuart:function(a,d,c,b){return c*(a/=b)*a*a*a+d}}},Y={drawMarker:function(a,
d,c,b,e,f,l,k){if(c){var m=1;c.fillStyle=f?f:"#000000";c.strokeStyle=l?l:"#000000";c.lineWidth=k?k:0;c.setLineDash&&c.setLineDash(Q("solid",k));"circle"===b?(c.moveTo(a,d),c.beginPath(),c.arc(a,d,e/2,0,2*Math.PI,!1),f&&c.fill(),k&&(l?c.stroke():(m=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=m))):"square"===b?(c.beginPath(),c.rect(a-e/2,d-e/2,e,e),f&&c.fill(),k&&(l?c.stroke():(m=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=m))):
"triangle"===b?(c.beginPath(),c.moveTo(a-e/2,d+e/2),c.lineTo(a+e/2,d+e/2),c.lineTo(a,d-e/2),c.closePath(),f&&c.fill(),k&&(l?c.stroke():(m=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=m)),c.beginPath()):"cross"===b&&(c.strokeStyle=f,c.lineWidth=e/4,c.beginPath(),c.moveTo(a-e/2,d-e/2),c.lineTo(a+e/2,d+e/2),c.stroke(),c.moveTo(a+e/2,d-e/2),c.lineTo(a-e/2,d+e/2),c.stroke())}},drawMarkers:function(a){for(var d=0;d<a.length;d++){var c=a[d];Y.drawMarker(c.x,c.y,c.ctx,c.type,
c.size,c.color,c.borderColor,c.borderThickness)}}};return m}();w.version="v3.2.4 GA";window.CanvasJS&&(w&&!window.CanvasJS.Chart)&&(window.CanvasJS.Chart=w)})();
/*
excanvas is used to support IE678 which do not implement HTML5 Canvas Element. You can safely remove the following excanvas code if you don't need to support older browsers.
Copyright 2006 Google Inc. https://code.google.com/p/explorercanvas/
Licensed under the Apache License, Version 2.0
*/
document.createElement("canvas").getContext||function(){function V(){return this.context_||(this.context_=new C(this))}function W(a,b,c){var g=M.call(arguments,2);return function(){return a.apply(b,g.concat(M.call(arguments)))}}function N(a){return String(a).replace(/&/g,"&amp;").replace(/"/g,"&quot;")}function O(a){a.namespaces.g_vml_||a.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML");a.namespaces.g_o_||a.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML");
a.styleSheets.ex_canvas_||(a=a.createStyleSheet(),a.owningElement.id="ex_canvas_",a.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}")}function X(a){var b=a.srcElement;switch(a.propertyName){case "width":b.getContext().clearRect();b.style.width=b.attributes.width.nodeValue+"px";b.firstChild.style.width=b.clientWidth+"px";break;case "height":b.getContext().clearRect(),b.style.height=b.attributes.height.nodeValue+"px",b.firstChild.style.height=b.clientHeight+
"px"}}function Y(a){a=a.srcElement;a.firstChild&&(a.firstChild.style.width=a.clientWidth+"px",a.firstChild.style.height=a.clientHeight+"px")}function D(){return[[1,0,0],[0,1,0],[0,0,1]]}function t(a,b){for(var c=D(),g=0;3>g;g++)for(var e=0;3>e;e++){for(var f=0,d=0;3>d;d++)f+=a[g][d]*b[d][e];c[g][e]=f}return c}function P(a,b){b.fillStyle=a.fillStyle;b.lineCap=a.lineCap;b.lineJoin=a.lineJoin;b.lineWidth=a.lineWidth;b.miterLimit=a.miterLimit;b.shadowBlur=a.shadowBlur;b.shadowColor=a.shadowColor;b.shadowOffsetX=
a.shadowOffsetX;b.shadowOffsetY=a.shadowOffsetY;b.strokeStyle=a.strokeStyle;b.globalAlpha=a.globalAlpha;b.font=a.font;b.textAlign=a.textAlign;b.textBaseline=a.textBaseline;b.arcScaleX_=a.arcScaleX_;b.arcScaleY_=a.arcScaleY_;b.lineScale_=a.lineScale_}function Q(a){var b=a.indexOf("(",3),c=a.indexOf(")",b+1),b=a.substring(b+1,c).split(",");if(4!=b.length||"a"!=a.charAt(3))b[3]=1;return b}function E(a,b,c){return Math.min(c,Math.max(b,a))}function F(a,b,c){0>c&&c++;1<c&&c--;return 1>6*c?a+6*(b-a)*c:
1>2*c?b:2>3*c?a+6*(b-a)*(2/3-c):a}function G(a){if(a in H)return H[a];var b,c=1;a=String(a);if("#"==a.charAt(0))b=a;else if(/^rgb/.test(a)){c=Q(a);b="#";for(var g,e=0;3>e;e++)g=-1!=c[e].indexOf("%")?Math.floor(255*(parseFloat(c[e])/100)):+c[e],b+=v[E(g,0,255)];c=+c[3]}else if(/^hsl/.test(a)){e=c=Q(a);b=parseFloat(e[0])/360%360;0>b&&b++;g=E(parseFloat(e[1])/100,0,1);e=E(parseFloat(e[2])/100,0,1);if(0==g)g=e=b=e;else{var f=0.5>e?e*(1+g):e+g-e*g,d=2*e-f;g=F(d,f,b+1/3);e=F(d,f,b);b=F(d,f,b-1/3)}b="#"+
v[Math.floor(255*g)]+v[Math.floor(255*e)]+v[Math.floor(255*b)];c=c[3]}else b=Z[a]||a;return H[a]={color:b,alpha:c}}function C(a){this.m_=D();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.fillStyle=this.strokeStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=1*q;this.globalAlpha=1;this.font="10px sans-serif";this.textAlign="left";this.textBaseline="alphabetic";this.canvas=a;var b="width:"+a.clientWidth+"px;height:"+a.clientHeight+"px;overflow:hidden;position:absolute",
c=a.ownerDocument.createElement("div");c.style.cssText=b;a.appendChild(c);b=c.cloneNode(!1);b.style.backgroundColor="red";b.style.filter="alpha(opacity=0)";a.appendChild(b);this.element_=c;this.lineScale_=this.arcScaleY_=this.arcScaleX_=1}function R(a,b,c,g){a.currentPath_.push({type:"bezierCurveTo",cp1x:b.x,cp1y:b.y,cp2x:c.x,cp2y:c.y,x:g.x,y:g.y});a.currentX_=g.x;a.currentY_=g.y}function S(a,b){var c=G(a.strokeStyle),g=c.color,c=c.alpha*a.globalAlpha,e=a.lineScale_*a.lineWidth;1>e&&(c*=e);b.push("<g_vml_:stroke",
' opacity="',c,'"',' joinstyle="',a.lineJoin,'"',' miterlimit="',a.miterLimit,'"',' endcap="',$[a.lineCap]||"square",'"',' weight="',e,'px"',' color="',g,'" />')}function T(a,b,c,g){var e=a.fillStyle,f=a.arcScaleX_,d=a.arcScaleY_,k=g.x-c.x,n=g.y-c.y;if(e instanceof w){var h=0,l=g=0,u=0,m=1;if("gradient"==e.type_){h=e.x1_/f;c=e.y1_/d;var p=s(a,e.x0_/f,e.y0_/d),h=s(a,h,c),h=180*Math.atan2(h.x-p.x,h.y-p.y)/Math.PI;0>h&&(h+=360);1E-6>h&&(h=0)}else p=s(a,e.x0_,e.y0_),g=(p.x-c.x)/k,l=(p.y-c.y)/n,k/=f*q,
n/=d*q,m=x.max(k,n),u=2*e.r0_/m,m=2*e.r1_/m-u;f=e.colors_;f.sort(function(a,b){return a.offset-b.offset});d=f.length;p=f[0].color;c=f[d-1].color;k=f[0].alpha*a.globalAlpha;a=f[d-1].alpha*a.globalAlpha;for(var n=[],r=0;r<d;r++){var t=f[r];n.push(t.offset*m+u+" "+t.color)}b.push('<g_vml_:fill type="',e.type_,'"',' method="none" focus="100%"',' color="',p,'"',' color2="',c,'"',' colors="',n.join(","),'"',' opacity="',a,'"',' g_o_:opacity2="',k,'"',' angle="',h,'"',' focusposition="',g,",",l,'" />')}else e instanceof
I?k&&n&&b.push("<g_vml_:fill",' position="',-c.x/k*f*f,",",-c.y/n*d*d,'"',' type="tile"',' src="',e.src_,'" />'):(e=G(a.fillStyle),b.push('<g_vml_:fill color="',e.color,'" opacity="',e.alpha*a.globalAlpha,'" />'))}function s(a,b,c){a=a.m_;return{x:q*(b*a[0][0]+c*a[1][0]+a[2][0])-r,y:q*(b*a[0][1]+c*a[1][1]+a[2][1])-r}}function z(a,b,c){isFinite(b[0][0])&&(isFinite(b[0][1])&&isFinite(b[1][0])&&isFinite(b[1][1])&&isFinite(b[2][0])&&isFinite(b[2][1]))&&(a.m_=b,c&&(a.lineScale_=aa(ba(b[0][0]*b[1][1]-b[0][1]*
b[1][0]))))}function w(a){this.type_=a;this.r1_=this.y1_=this.x1_=this.r0_=this.y0_=this.x0_=0;this.colors_=[]}function I(a,b){if(!a||1!=a.nodeType||"IMG"!=a.tagName)throw new A("TYPE_MISMATCH_ERR");if("complete"!=a.readyState)throw new A("INVALID_STATE_ERR");switch(b){case "repeat":case null:case "":this.repetition_="repeat";break;case "repeat-x":case "repeat-y":case "no-repeat":this.repetition_=b;break;default:throw new A("SYNTAX_ERR");}this.src_=a.src;this.width_=a.width;this.height_=a.height}
function A(a){this.code=this[a];this.message=a+": DOM Exception "+this.code}var x=Math,k=x.round,J=x.sin,K=x.cos,ba=x.abs,aa=x.sqrt,q=10,r=q/2;navigator.userAgent.match(/MSIE ([\d.]+)?/);var M=Array.prototype.slice;O(document);var U={init:function(a){a=a||document;a.createElement("canvas");a.attachEvent("onreadystatechange",W(this.init_,this,a))},init_:function(a){a=a.getElementsByTagName("canvas");for(var b=0;b<a.length;b++)this.initElement(a[b])},initElement:function(a){if(!a.getContext){a.getContext=
V;O(a.ownerDocument);a.innerHTML="";a.attachEvent("onpropertychange",X);a.attachEvent("onresize",Y);var b=a.attributes;b.width&&b.width.specified?a.style.width=b.width.nodeValue+"px":a.width=a.clientWidth;b.height&&b.height.specified?a.style.height=b.height.nodeValue+"px":a.height=a.clientHeight}return a}};U.init();for(var v=[],d=0;16>d;d++)for(var B=0;16>B;B++)v[16*d+B]=d.toString(16)+B.toString(16);var Z={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",
bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",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",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",
darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",grey:"#808080",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",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",mediumaquamarine:"#66CDAA",
mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",oldlace:"#FDF5E6",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",
peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",whitesmoke:"#F5F5F5",yellowgreen:"#9ACD32"},
H={},L={},$={butt:"flat",round:"round"},d=C.prototype;d.clearRect=function(){this.textMeasureEl_&&(this.textMeasureEl_.removeNode(!0),this.textMeasureEl_=null);this.element_.innerHTML=""};d.beginPath=function(){this.currentPath_=[]};d.moveTo=function(a,b){var c=s(this,a,b);this.currentPath_.push({type:"moveTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};d.lineTo=function(a,b){var c=s(this,a,b);this.currentPath_.push({type:"lineTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};d.bezierCurveTo=
function(a,b,c,g,e,f){e=s(this,e,f);a=s(this,a,b);c=s(this,c,g);R(this,a,c,e)};d.quadraticCurveTo=function(a,b,c,g){a=s(this,a,b);c=s(this,c,g);g={x:this.currentX_+2/3*(a.x-this.currentX_),y:this.currentY_+2/3*(a.y-this.currentY_)};R(this,g,{x:g.x+(c.x-this.currentX_)/3,y:g.y+(c.y-this.currentY_)/3},c)};d.arc=function(a,b,c,g,e,f){c*=q;var d=f?"at":"wa",k=a+K(g)*c-r,n=b+J(g)*c-r;g=a+K(e)*c-r;e=b+J(e)*c-r;k!=g||f||(k+=0.125);a=s(this,a,b);k=s(this,k,n);g=s(this,g,e);this.currentPath_.push({type:d,
x:a.x,y:a.y,radius:c,xStart:k.x,yStart:k.y,xEnd:g.x,yEnd:g.y})};d.rect=function(a,b,c,g){this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+g);this.lineTo(a,b+g);this.closePath()};d.strokeRect=function(a,b,c,g){var e=this.currentPath_;this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+g);this.lineTo(a,b+g);this.closePath();this.stroke();this.currentPath_=e};d.fillRect=function(a,b,c,g){var e=this.currentPath_;this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+
c,b+g);this.lineTo(a,b+g);this.closePath();this.fill();this.currentPath_=e};d.createLinearGradient=function(a,b,c,g){var e=new w("gradient");e.x0_=a;e.y0_=b;e.x1_=c;e.y1_=g;return e};d.createRadialGradient=function(a,b,c,g,e,f){var d=new w("gradientradial");d.x0_=a;d.y0_=b;d.r0_=c;d.x1_=g;d.y1_=e;d.r1_=f;return d};d.drawImage=function(a,b){var c,g,e,d,r,y,n,h;e=a.runtimeStyle.width;d=a.runtimeStyle.height;a.runtimeStyle.width="auto";a.runtimeStyle.height="auto";var l=a.width,u=a.height;a.runtimeStyle.width=
e;a.runtimeStyle.height=d;if(3==arguments.length)c=arguments[1],g=arguments[2],r=y=0,n=e=l,h=d=u;else if(5==arguments.length)c=arguments[1],g=arguments[2],e=arguments[3],d=arguments[4],r=y=0,n=l,h=u;else if(9==arguments.length)r=arguments[1],y=arguments[2],n=arguments[3],h=arguments[4],c=arguments[5],g=arguments[6],e=arguments[7],d=arguments[8];else throw Error("Invalid number of arguments");var m=s(this,c,g),p=[];p.push(" <g_vml_:group",' coordsize="',10*q,",",10*q,'"',' coordorigin="0,0"',' style="width:',
10,"px;height:",10,"px;position:absolute;");if(1!=this.m_[0][0]||this.m_[0][1]||1!=this.m_[1][1]||this.m_[1][0]){var t=[];t.push("M11=",this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",k(m.x/q),",","Dy=",k(m.y/q),"");var v=s(this,c+e,g),w=s(this,c,g+d);c=s(this,c+e,g+d);m.x=x.max(m.x,v.x,w.x,c.x);m.y=x.max(m.y,v.y,w.y,c.y);p.push("padding:0 ",k(m.x/q),"px ",k(m.y/q),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",t.join(""),", sizingmethod='clip');")}else p.push("top:",
k(m.y/q),"px;left:",k(m.x/q),"px;");p.push(' ">','<g_vml_:image src="',a.src,'"',' style="width:',q*e,"px;"," height:",q*d,'px"',' cropleft="',r/l,'"',' croptop="',y/u,'"',' cropright="',(l-r-n)/l,'"',' cropbottom="',(u-y-h)/u,'"'," />","</g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",p.join(""))};d.stroke=function(a){var b=[];b.push("<g_vml_:shape",' filled="',!!a,'"',' style="position:absolute;width:',10,"px;height:",10,'px;"',' coordorigin="0,0"',' coordsize="',10*q,",",10*q,'"',
' stroked="',!a,'"',' path="');for(var c={x:null,y:null},d={x:null,y:null},e=0;e<this.currentPath_.length;e++){var f=this.currentPath_[e];switch(f.type){case "moveTo":b.push(" m ",k(f.x),",",k(f.y));break;case "lineTo":b.push(" l ",k(f.x),",",k(f.y));break;case "close":b.push(" x ");f=null;break;case "bezierCurveTo":b.push(" c ",k(f.cp1x),",",k(f.cp1y),",",k(f.cp2x),",",k(f.cp2y),",",k(f.x),",",k(f.y));break;case "at":case "wa":b.push(" ",f.type," ",k(f.x-this.arcScaleX_*f.radius),",",k(f.y-this.arcScaleY_*
f.radius)," ",k(f.x+this.arcScaleX_*f.radius),",",k(f.y+this.arcScaleY_*f.radius)," ",k(f.xStart),",",k(f.yStart)," ",k(f.xEnd),",",k(f.yEnd))}if(f){if(null==c.x||f.x<c.x)c.x=f.x;if(null==d.x||f.x>d.x)d.x=f.x;if(null==c.y||f.y<c.y)c.y=f.y;if(null==d.y||f.y>d.y)d.y=f.y}}b.push(' ">');a?T(this,b,c,d):S(this,b);b.push("</g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",b.join(""))};d.fill=function(){this.stroke(!0)};d.closePath=function(){this.currentPath_.push({type:"close"})};d.save=function(){var a=
{};P(this,a);this.aStack_.push(a);this.mStack_.push(this.m_);this.m_=t(D(),this.m_)};d.restore=function(){this.aStack_.length&&(P(this.aStack_.pop(),this),this.m_=this.mStack_.pop())};d.translate=function(a,b){z(this,t([[1,0,0],[0,1,0],[a,b,1]],this.m_),!1)};d.rotate=function(a){var b=K(a);a=J(a);z(this,t([[b,a,0],[-a,b,0],[0,0,1]],this.m_),!1)};d.scale=function(a,b){this.arcScaleX_*=a;this.arcScaleY_*=b;z(this,t([[a,0,0],[0,b,0],[0,0,1]],this.m_),!0)};d.transform=function(a,b,c,d,e,f){z(this,t([[a,
b,0],[c,d,0],[e,f,1]],this.m_),!0)};d.setTransform=function(a,b,c,d,e,f){z(this,[[a,b,0],[c,d,0],[e,f,1]],!0)};d.drawText_=function(a,b,c,d,e){var f=this.m_;d=0;var r=1E3,t=0,n=[],h;h=this.font;if(L[h])h=L[h];else{var l=document.createElement("div").style;try{l.font=h}catch(u){}h=L[h]={style:l.fontStyle||"normal",variant:l.fontVariant||"normal",weight:l.fontWeight||"normal",size:l.fontSize||10,family:l.fontFamily||"sans-serif"}}var l=h,m=this.element_;h={};for(var p in l)h[p]=l[p];p=parseFloat(m.currentStyle.fontSize);
m=parseFloat(l.size);"number"==typeof l.size?h.size=l.size:-1!=l.size.indexOf("px")?h.size=m:-1!=l.size.indexOf("em")?h.size=p*m:-1!=l.size.indexOf("%")?h.size=p/100*m:-1!=l.size.indexOf("pt")?h.size=m/0.75:h.size=p;h.size*=0.981;p=h.style+" "+h.variant+" "+h.weight+" "+h.size+"px "+h.family;m=this.element_.currentStyle;l=this.textAlign.toLowerCase();switch(l){case "left":case "center":case "right":break;case "end":l="ltr"==m.direction?"right":"left";break;case "start":l="rtl"==m.direction?"right":
"left";break;default:l="left"}switch(this.textBaseline){case "hanging":case "top":t=h.size/1.75;break;case "middle":break;default:case null:case "alphabetic":case "ideographic":case "bottom":t=-h.size/2.25}switch(l){case "right":d=1E3;r=0.05;break;case "center":d=r=500}b=s(this,b+0,c+t);n.push('<g_vml_:line from="',-d,' 0" to="',r,' 0.05" ',' coordsize="100 100" coordorigin="0 0"',' filled="',!e,'" stroked="',!!e,'" style="position:absolute;width:1px;height:1px;">');e?S(this,n):T(this,n,{x:-d,y:0},
{x:r,y:h.size});e=f[0][0].toFixed(3)+","+f[1][0].toFixed(3)+","+f[0][1].toFixed(3)+","+f[1][1].toFixed(3)+",0,0";b=k(b.x/q)+","+k(b.y/q);n.push('<g_vml_:skew on="t" matrix="',e,'" ',' offset="',b,'" origin="',d,' 0" />','<g_vml_:path textpathok="true" />','<g_vml_:textpath on="true" string="',N(a),'" style="v-text-align:',l,";font:",N(p),'" /></g_vml_:line>');this.element_.insertAdjacentHTML("beforeEnd",n.join(""))};d.fillText=function(a,b,c,d){this.drawText_(a,b,c,d,!1)};d.strokeText=function(a,
b,c,d){this.drawText_(a,b,c,d,!0)};d.measureText=function(a){this.textMeasureEl_||(this.element_.insertAdjacentHTML("beforeEnd",'<span style="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;"></span>'),this.textMeasureEl_=this.element_.lastChild);var b=this.element_.ownerDocument;this.textMeasureEl_.innerHTML="";this.textMeasureEl_.style.font=this.font;this.textMeasureEl_.appendChild(b.createTextNode(a));return{width:this.textMeasureEl_.offsetWidth}};d.clip=function(){};
d.arcTo=function(){};d.createPattern=function(a,b){return new I(a,b)};w.prototype.addColorStop=function(a,b){b=G(b);this.colors_.push({offset:a,color:b.color,alpha:b.alpha})};d=A.prototype=Error();d.INDEX_SIZE_ERR=1;d.DOMSTRING_SIZE_ERR=2;d.HIERARCHY_REQUEST_ERR=3;d.WRONG_DOCUMENT_ERR=4;d.INVALID_CHARACTER_ERR=5;d.NO_DATA_ALLOWED_ERR=6;d.NO_MODIFICATION_ALLOWED_ERR=7;d.NOT_FOUND_ERR=8;d.NOT_SUPPORTED_ERR=9;d.INUSE_ATTRIBUTE_ERR=10;d.INVALID_STATE_ERR=11;d.SYNTAX_ERR=12;d.INVALID_MODIFICATION_ERR=
13;d.NAMESPACE_ERR=14;d.INVALID_ACCESS_ERR=15;d.VALIDATION_ERR=16;d.TYPE_MISMATCH_ERR=17;G_vmlCanvasManager=U;CanvasRenderingContext2D=C;CanvasGradient=w;CanvasPattern=I;DOMException=A}();
/*eslint-enable*/
/*jshint ignore:end*/
+16
View File
@@ -0,0 +1,16 @@
*
* @preserve CanvasJS HTML5 & JavaScript Charts - v3.2.4 GA - https://canvasjs.com/
* Copyright 2020 fenopix
*
* --------------------- License Information --------------------
* CanvasJS is a commercial product which requires purchase of license. Without a commercial license you can use it for evaluation purposes for upto 30 days. Please refer to the following link for further details.
* https://canvasjs.com/license/
*
*
*---------------------Free for Non-Commercial Use--------------------
*
*For non-commercial purposes you can use the software for free under Creative Commons Attribution-NonCommercial 3.0 License.
*A credit Link is added to the bottom right of the chart which should be preserved. Refer to the following link for further details on the same.
* https://creativecommons.org/licenses/by-nc/3.0/deed.en_US
*
*
-21
View File
@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="_x30_" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 165 190.5" style="enable-background:new 0 0 165 190.5;" xml:space="preserve">
<style type="text/css">
.st0{fill:#E41313;}
.st1{fill:#FFFFFF;}
</style>
<g id="LWPOLYLINE">
<polygon class="st0" points="82.5,0 0,47.6 0,142.9 82.5,190.5 165,142.9 165,47.6 "/>
</g>
<g id="LWPOLYLINE_1_">
<polygon class="st1" points="58.2,43.5 83.1,43.5 49.1,95.3 24.2,95.3 "/>
</g>
<g id="LWPOLYLINE_2_">
<polygon class="st1" points="36,147 104.1,43.5 129,43.5 60.9,147 "/>
</g>
<g id="LWPOLYLINE_3_">
<polygon class="st1" points="106.8,147 81.9,147 115.9,95.3 140.8,95.3 "/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 851 B

+48
View File
@@ -0,0 +1,48 @@
/* latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 100;
src: local('Roboto Thin'), local('Roboto-Thin'), url(/fonts/roboto-thin.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
src: local('Roboto Light'), local('Roboto-Light'), url(/fonts/roboto-light.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(/fonts/roboto-regular.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
src: local('Roboto Medium'), local('Roboto-Medium'), url(/fonts/roboto-medium.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
src: local('Roboto Bold'), local('Roboto-Bold'), url(/fonts/roboto-bold.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 900;
src: local('Roboto Black'), local('Roboto-Black'), url(/fonts/roboto-black.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
+15
View File
@@ -0,0 +1,15 @@
.v-toast__item--error {
background-color: #F56565 !important;
}
.v-toast__item--success {
background-color: #38A169 !important;
}
.v-toast__item--warning {
background-color: #ED8936 !important;
}
.v-toast__text {
font-family: "Roboto", sans-serif;
}
-113
View File
@@ -1,113 +0,0 @@
import { Line, mixins } from 'vue-chartjs'
const { reactiveProp } = mixins;
//const sampleInterval = 1000; // ms
const defaultMaxTemperature = 300; // degC
const maxSampleTime = 600000; // 10min (in ms)
export default {
extends: Line,
mixins: [reactiveProp],
props: ['chartData'],
data() {
return {
options: {
animation: {
duration: 0 // general animation time
},
elements: {
line: {
tension: 0 // disable bezier curves
}
},
legend: {
labels: {
fontColor: 'rgb(203, 203, 203)',
fontFamily: 'Roboto,sans-serif'
}
},
tooltips: {
enabled: true,
callbacks: {
title: function (tooltipItem, data) {
return data['labels'][tooltipItem[0]['index']];
},
label: function (tooltipItem, data) {
return data['datasets'][0]['data'][tooltipItem['index']];
},
}
},
maintainAspectRatio: false,
responsive: true,
responsiveAnimationDuration: 0, // animation duration after a resize
scales: {
xAxes: [
{
gridLines: {
color: 'rgba(0,0,0,0.2)',
display: true
},
ticks: {
minor: {
fontColor: 'rgb(203, 203, 203)',
fontFamily: 'Roboto,sans-serif'
},
major: {
fontColor: 'rgb(203, 203, 203)',
fontFamily: 'Roboto,sans-serif'
},
min: new Date() - maxSampleTime,
max: new Date()
},
time: {
unit: 'minute',
displayFormats: {
minute: 'HH:mm'
}
},
type: 'time',
}
],
yAxes: [
{
gridLines: {
color: 'rgb(203, 203, 203)',
zeroLineColor: 'rgb(203, 203, 203)',
display: true
},
ticks: {
minor: {
fontColor: 'rgb(203, 203, 203)',
fontFamily: 'Roboto,sans-serif'
},
major: {
fontColor: 'rgb(203, 203, 203)',
fontFamily: 'Roboto,sans-serif'
},
min: 0,
max: defaultMaxTemperature,
stepSize: 50
}
}
]
}
}
}
},
mounted () {
this.renderChart(this.chartData, this.options)
},
methods: {
update() {
this.$data._chart.config.options.scales.yAxes[0].ticks.max = defaultMaxTemperature;
this.$data._chart.config.options.scales.xAxes[0].ticks.min = new Date() - maxSampleTime;
this.$data._chart.config.options.scales.xAxes[0].ticks.max = new Date();
this.$data._chart.update();
}
},
watch: {
chartData () {
this.update();
}
}
}
+86
View File
@@ -0,0 +1,86 @@
<style scoped>
</style>
<template>
<v-dialog v-model="showDialog" persistent :width="400">
<v-card dark>
<v-toolbar flat dense color="primary">
<v-toolbar-title>
<span class="subheading">
<v-icon class="mdi mdi-connection" left></v-icon>Connecting<span v-if="connectingFailed"> failed</span><span v-if="isConnecting"> to {{ parseInt(port) !== 80 ? hostname+":"+port : hostname }}</span>
</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="pt-5" v-if="isConnecting">
<v-progress-linear color="white" indeterminate></v-progress-linear>
</v-card-text>
<v-card-text class="pt-5" v-if="!isConnecting && connectingFailed">
<p>Cannot not connect to {{ parseInt(port) !== 80 ? hostname+":"+port : hostname }}.</p>
<div class="text-center">
<v-btn @click="reconnect" color="primary">try again</v-btn>
</div>
</v-card-text>
</v-card>
</v-dialog>
</template>
<script>
import { mapState } from "vuex";
import Vue from "vue";
export default {
data: function() {
return {
showDialog: true,
}
},
computed: {
...mapState({
isConnected: state => state.socket.isConnected,
isConnecting: state => state.socket.isConnecting,
connectingFailed: state => state.socket.connectingFailed,
}),
protocol: {
get() {
return this.$store.state.socket.protocol
}
},
hostname: {
get() {
return this.$store.state.socket.hostname
},
set(newName) {
return this.$store.dispatch('socket/setData', { hostname: newName });
}
},
port: {
get() {
return this.$store.state.socket.port
},
set(newName) {
return this.$store.dispatch('socket/setData', { port: newName });
}
}
},
methods: {
connect() {
window.console.log("save connection")
Vue.prototype.$socket.setUrl(this.protocol+"://"+this.hostname+":"+this.port+"/websocket")
Vue.prototype.$socket.connect()
},
reconnect() {
this.$store.dispatch('socket/setData', { connectingFailed: false })
Vue.prototype.$socket.connect()
}
},
mounted() {
this.tmpHostname = this.hostname+":"+this.port
},
watch: {
isConnected(newVal) {
this.showDialog = !newVal
}
}
}
</script>
+84
View File
@@ -0,0 +1,84 @@
<style scoped>
</style>
<template>
<div v-if="(remoteMode && countPrinters > 1) || (!remoteMode && countPrinters)">
<li :class="currentPage === '/allPrinters' ? 'nav-item active' : 'nav-item '">
<div
class="nav-link "
@click.prevent
@click="switchToPrinters"
role="button"
>
<v-icon>mdi-view-dashboard-outline</v-icon>
<span class="nav-title">Printers</span>
<v-menu bottom :offset-x="true">
<template v-slot:activator="{ on, attrs }">
<v-icon class="nav-arrow right" v-bind="attrs" v-on="on" >mdi-chevron-down</v-icon>
</template>
<v-list dense>
<v-list-item two-line v-for="printer in printers" v-bind:key="printer._namespace" @click="changePrinter(printer)" :disabled="!printer.socket.isConnected" link>
<v-list-item-content>
<v-list-item-title>{{ getPrinterName(printer._namespace) }}</v-list-item-title>
<v-list-item-subtitle>{{ getPrinterDescription(printer)}}</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>
</v-list>
</v-menu>
</div>
<v-item-group class="v-btn-toggle mx-4 d-block row" name="printers" v-if="false">
<v-btn class="col" color="primary" @click="switchToPrinters">Printers</v-btn>
</v-item-group>
</li>
<v-divider class="my-4"></v-divider>
</div>
</template>
<script>
import { mapState } from 'vuex'
import router from "@/plugins/router";
export default {
name: "PrinterSelecter.vue",
computed: {
...mapState({
remoteMode: state => state.socket.remoteMode
}),
countPrinters: {
get() {
return this.$store.getters["farm/countPrinters"]
}
},
printers: {
get() {
return this.$store.getters["farm/getPrinters"]
}
},
currentPage: function() {
return this.$route.fullPath;
},
},
methods: {
switchToPrinters() {
router.push("/allPrinters");
},
getPrinterName(namespace) {
return this.$store.getters["farm/"+namespace+"/getPrinterName"]
},
getPrinterDescription(printer) {
return this.$store.getters["farm/"+printer._namespace+"/getStatus"]
},
changePrinter(printer) {
if (printer.socket.isConnected) {
if (this.remoteMode) this.$store.dispatch('changePrinter', { printer: printer._namespace })
else window.location.href = "//"+printer.socket.hostname+(parseInt(printer.socket.webPort) !== 80 ? ':'+printer.socket.webPort : '')
}
},
}
}
</script>
+283
View File
@@ -0,0 +1,283 @@
<style scoped>
</style>
<template>
<v-dialog v-model="showDialog" persistent :width="400">
<v-card dark>
<v-toolbar flat dense color="primary">
<v-toolbar-title>
<span class="subheading">
<v-icon class="mdi mdi-connection" left></v-icon>
<span v-if="isConnecting">Connection to {{ parseInt(port) !== 80 ? hostname+':'+port : hostname }}</span>
<span v-if="connectingFailed">Connection failed</span>
<span v-if="!isConnecting && !connectingFailed && !dialogAddPrinter.bool && !dialogEditPrinter.bool">Select Printer</span>
<span v-if="dialogAddPrinter.bool">Add Printer</span>
<span v-if="dialogEditPrinter.bool">Edit Printer</span>
</span>
</v-toolbar-title>
<v-spacer></v-spacer>
<v-btn v-if="!isConnecting && !connectingFailed && !dialogAddPrinter.bool && !dialogEditPrinter.bool && this['farm/countPrinters'] > 0" small class="minwidth-0" @click="checkPrinters"><v-icon small>mdi-sync</v-icon></v-btn>
<v-btn small class="minwidth-0" v-if="!isConnecting && !connectingFailed && dialogAddPrinter.bool" @click="dialogAddPrinter.bool = false"><v-icon small>mdi-close-thick</v-icon></v-btn>
<v-btn small class="minwidth-0" v-if="!isConnecting && !connectingFailed && dialogEditPrinter.bool" @click="dialogEditPrinter.bool = false"><v-icon small>mdi-close-thick</v-icon></v-btn>
</v-toolbar>
<v-card-text class="pt-5" v-if="isConnecting">
<v-progress-linear color="white" indeterminate></v-progress-linear>
</v-card-text>
<v-card-text class="pt-5" v-if="!isConnecting && connectingFailed">
<p>Cannot not connect to {{ parseInt(port) !== 80 ? hostname+":"+port : hostname }}.</p>
<div class="text-center">
<v-btn @click="switchToChangePrinter" color="white" outlined class="mr-3">change printer</v-btn>
<v-btn @click="reconnect" color="primary">try again</v-btn>
</div>
</v-card-text>
<v-card-text class="pt-3" v-if="!isConnecting && dialogAddPrinter.bool">
<v-container class="px-0 py-0">
<v-row>
<v-col class="col-8">
<v-text-field
v-model="dialogAddPrinter.hostname"
:rules="[
v => !!v || 'Hostname is required',
v => !v.startsWith('http:') || 'invalid hostname/IP',
v => !v.startsWith('https:') || 'invalid hostname/IP',
]"
label="Hostname/IP"
required
></v-text-field>
</v-col>
<v-col class="col-4">
<v-text-field
v-model="dialogAddPrinter.port"
:rules="[v => !!v || 'Port is required']"
label="Port"
required
></v-text-field>
</v-col>
</v-row>
<v-row>
<v-col class="text-right">
<v-btn
color="white"
outlined
class="middle"
@click="addPrinter"
>
add printer
</v-btn>
</v-col>
</v-row>
</v-container>
</v-card-text>
<v-card-text class="pt-3" v-if="!isConnecting && dialogEditPrinter.bool">
<v-container class="px-0 py-0">
<v-row>
<v-col class="col-8">
<v-text-field
v-model="dialogEditPrinter.hostname"
:rules="[
v => !!v || 'Hostname is required',
v => !v.startsWith('http:') || 'invalid hostname/IP',
v => !v.startsWith('https:') || 'invalid hostname/IP',
]"
label="Hostname/IP"
required
></v-text-field>
</v-col>
<v-col class="col-4">
<v-text-field
v-model="dialogEditPrinter.port"
:rules="[v => !!v || 'Port is required']"
label="Port"
required
></v-text-field>
</v-col>
</v-row>
<v-row>
<v-col class="">
<v-btn
color="red"
outlined
class="middle minwidth-0"
@click="delPrinter"
>
<v-icon small>mdi-delete</v-icon>
</v-btn>
</v-col>
<v-col class="text-right">
<v-btn
color="white"
outlined
class="middle"
@click="updatePrinter"
>
update printer
</v-btn>
</v-col>
</v-row>
</v-container>
</v-card-text>
<v-card-text class="pt-3" v-if="!isConnecting && !connectingFailed && !dialogAddPrinter.bool && !dialogEditPrinter.bool">
<v-container class="px-0 pb-0">
<v-row v-for="(printer, index) in this['farm/getPrinters']" v-bind:key="index">
<v-col class="rounded transition-swing secondary py-2 px-2 mb-6" style="cursor: pointer;" @click="connect(printer)">
<v-row align="center">
<v-col class="col-auto pr-0">
<v-progress-circular
indeterminate
color="primary"
v-if="printer.socket.isConnecting"
></v-progress-circular>
<v-icon
:color="printer.socket.isConnected ? 'green' : 'red'"
v-if="!printer.socket.isConnecting"
>mdi-{{ printer.socket.isConnected ? 'checkbox-marked-circle' : 'cancel' }}</v-icon>
</v-col>
<v-col>{{ printer.socket.hostname }}{{ parseInt(printer.socket.port) !== 80 ? ":"+printer.socket.port : "" }}</v-col>
<v-col class="col-auto"><v-btn small class="minwidth-0" v-on:click.stop.prevent="editPrinter(index)"><v-icon small>mdi-pencil</v-icon></v-btn></v-col>
</v-row>
</v-col>
</v-row>
<v-row v-if="showCorsInfo">
<v-col>
<p class="text-center" v-if="this['farm/countPrinters'] === 0">Hello and welcome to the remote mode of Mainsail!</p>
<p class="text-center">Please remember to add <code>{{ currentUrl }}</code> in moonraker.conf within "cors_domains".</p>
<p class="text-center">You can find more details at <a href="https://docs.mainsail.xyz/remotemode" target="_blank">docs.mainsail.xyz/remotemode</a>.</p>
</v-col>
</v-row>
<v-row>
<v-col class="text-center mt-0">
<v-btn @click="dialogAddPrinter.bool = true">add printer</v-btn>
</v-col>
</v-row>
</v-container>
</v-card-text>
</v-card>
</v-dialog>
</template>
<script>
import { mapState, mapGetters, mapActions } from "vuex";
import Vue from "vue";
export default {
data: function() {
return {
showDialog: true,
dialogAddPrinter: {
bool: false,
hostname: "",
port: 7125
},
dialogEditPrinter: {
bool: false,
index: 0,
hostname: "",
port: 0
}
}
},
computed: {
...mapState({
isConnected: state => state.socket.isConnected,
isConnecting: state => state.socket.isConnecting,
connectingFailed: state => state.socket.connectingFailed,
remoteMode: state => state.socket.remoteMode,
protocol: state => state.socket.protocol,
hostname: state => state.socket.hostname,
port: state => state.socket.port,
}),
...mapGetters([
"farm/countPrinters",
"farm/getPrinters"
]),
...mapActions({
readPrinters: "farm/readStoredPrinters"
}),
currentUrl: {
get() {
return "http://"+window.location.hostname+(window.location.port !== 80 && window.location.port !== '' ? ':'+window.location.port : '')
}
},
showCorsInfo: {
get() {
if (this["farm/countPrinters"]) {
for (const [ ,printer] of Object.entries(this["farm/getPrinters"])) {
if (!printer.socket.isConnected) return true
}
return false
}
return true
}
}
},
methods: {
addPrinter() {
this.$store.commit('farm/addPrinter',{
hostname: this.dialogAddPrinter.hostname,
port: this.dialogAddPrinter.port,
protocol: this.protocol
})
this.dialogAddPrinter.hostname = ""
this.dialogAddPrinter.bool = false
this.$store.dispatch("farm/savePrinters")
},
editPrinter(index) {
this.dialogEditPrinter.hostname = this["farm/getPrinters"][index].socket.hostname
this.dialogEditPrinter.port = this["farm/getPrinters"][index].socket.port
this.dialogEditPrinter.index = index
this.dialogEditPrinter.bool = true
},
updatePrinter() {
this.$store.commit("farm/"+this.dialogEditPrinter.index+"/setSocketData", {
hostname: this.dialogEditPrinter.hostname,
port: this.dialogEditPrinter.port,
isConnecting: true,
})
this.$store.dispatch("farm/"+this.dialogEditPrinter.index+"/reconnect")
this.dialogEditPrinter.bool = false
this.checkPrinters()
},
delPrinter() {
this.$store.commit("farm/removePrinter", { name: this.dialogEditPrinter.index })
this.$store.dispatch("farm/savePrinters")
this.dialogEditPrinter.bool = false
},
connect(printer) {
this.$store.dispatch('socket/setData', {
hostname: printer.socket.hostname,
port: printer.socket.port
})
Vue.prototype.$socket.setUrl(this.protocol+"://"+printer.socket.hostname+":"+printer.socket.port+"/websocket")
Vue.prototype.$socket.connect()
},
reconnect() {
this.$store.dispatch('socket/setData', { connectingFailed: false })
Vue.prototype.$socket.connect()
},
switchToChangePrinter() {
this.$store.dispatch('socket/setData', { connectingFailed: false })
},
checkPrinters() {
Object.entries(this['farm/getPrinters']).forEach(([key, printer]) => {
if (!printer.socket.isConnected && !printer.socket.isConnecting) {
this.$store.dispatch('farm/'+key+'/connect')
}
})
}
},
mounted() {
this.$store.dispatch("farm/readStoredPrinters")
},
watch: {
isConnected(newVal) {
this.showDialog = !newVal
},
}
}
</script>
+109
View File
@@ -0,0 +1,109 @@
<style scoped>
.minheight30 {
min-height: 30px;
}
</style>
<template>
<v-menu bottom left :offset-y="true" :close-on-content-click="false" v-model="showMenu">
<template v-slot:activator="{ on, attrs }">
<v-btn dark icon v-bind="attrs" v-on="on">
<v-icon>mdi-dots-vertical</v-icon>
</v-btn>
</template>
<v-list dense>
<v-subheader class="" style="height: auto;">Klipper Control</v-subheader>
<v-list-item class="minheight30" link @click="doRestart()">
<v-list-item-title><v-icon class="mr-2" small>mdi-restart</v-icon>Restart</v-list-item-title>
</v-list-item>
<v-list-item class="minheight30" link @click="doFirmwareRestart()">
<v-list-item-title><v-icon class="mr-2" small>mdi-restart</v-icon>Firmware Restart</v-list-item-title>
</v-list-item>
<v-divider class="mt-0"></v-divider>
<v-subheader class="pt-2" style="height: auto;">Restart Services</v-subheader>
<v-list-item class="minheight30" link @click="doServiceRestartKlipper()">
<v-list-item-title><v-icon class="mr-2" small>mdi-restart</v-icon>Klipper</v-list-item-title>
</v-list-item>
<v-list-item class="minheight30" link @click="doServiceRestartMoonraker()">
<v-list-item-title><v-icon class="mr-2" small>mdi-restart</v-icon>Moonraker</v-list-item-title>
</v-list-item>
<div v-if="countPowerDevices">
<v-divider class="mt-0"></v-divider>
<v-subheader class="pt-2" style="height: auto;">Power Devices</v-subheader>
<v-list-item v-for="(device, index) in devices" v-bind:key="index" class="minheight30" @click="changeSwitch(device, device.status)" :disabled="(device.status === 'error')">
<v-list-item-title>
<v-icon class="mr-2" :color="device.status === 'on' ? '' : 'grey darken-2'">mdi-{{ device.status === 'on' ? 'toggle-switch' : 'toggle-switch-off' }}</v-icon>{{ device.device }}
</v-list-item-title>
</v-list-item>
</div>
<v-divider class="mt-0"></v-divider>
<v-subheader class="pt-2" style="height: auto;">Host Control</v-subheader>
<v-list-item class="minheight30" link @click="doHostReboot()">
<v-list-item-title><v-icon class="mr-2" small>mdi-power</v-icon>Reboot</v-list-item-title>
</v-list-item>
<v-list-item class="minheight30" link @click="doHostShutdown()">
<v-list-item-title><v-icon class="mr-2" small>mdi-power</v-icon>Shutdown</v-list-item-title>
</v-list-item>
</v-list>
</v-menu>
</template>
<script>
import {mapState} from "vuex";
import Vue from "vue";
export default {
name: "TopCornerMenu.vue",
data: function () {
return {
showMenu: false,
}
},
computed: {
...mapState({
devices: (state) => state.server.power.devices,
}),
countPowerDevices: {
get() {
return this.$store.getters["server/power/count"]
}
},
},
methods: {
changeSwitch(device, value) {
this.setPower(device, (value === 'off') ? 1 : 0)
},
setPower(device, value) {
let rpc = value === 1 ? "machine.device_power.on" : "machine.device_power.off"
Vue.prototype.$socket.sendObj(rpc,{ [device.device]: null },"server/power/responseToggle")
},
doRestart: function() {
this.showMenu = false
this.$store.commit('server/addEvent', { message: "RESTART", type: 'command' })
this.$socket.sendObj('printer.gcode.script', { script: "RESTART" })
},
doFirmwareRestart: function() {
this.showMenu = false
this.$store.commit('server/addEvent', { message: "FIRMWARE_RESTART", type: 'command' })
this.$socket.sendObj('printer.gcode.script', { script: "FIRMWARE_RESTART" })
},
doServiceRestartKlipper: function() {
this.showMenu = false
this.$socket.sendObj('machine.services.restart', { service: "klipper" })
},
doServiceRestartMoonraker: function() {
this.showMenu = false
this.$socket.sendObj('machine.services.restart', { service: "moonraker" })
},
doHostReboot: function() {
this.showMenu = false
this.$socket.sendObj('machine.reboot', { })
},
doHostShutdown: function() {
this.showMenu = false
this.$socket.sendObj('machine.shutdown', { })
},
}
}
</script>
+142
View File
@@ -0,0 +1,142 @@
<style scoped>
.updaterLog {
height: 350px;
max-height: 350px;
overflow-y: auto;
}
.updaterLog .title-cell {
white-space: nowrap;
}
.updaterLog.v-data-table > .v-data-table__wrapper > table > tbody > tr > td {
height: auto;
}
</style>
<template>
<v-dialog :value="application !== ''" persistent width="60%" max-width="800">
<v-card
dark
:loading="!complete"
>
<template slot="progress">
<v-progress-linear color="primary" indeterminate></v-progress-linear>
</template>
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-update</v-icon>Updating {{ application }}{{ complete ? " done!" : "..." }}</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="py-6">
<v-data-table
:headers="headers"
:options="options"
:items="messages"
item-key="date"
hide-default-footer
hide-default-header
disable-pagination
class="updaterLog"
ref="updaterLog"
:custom-sort="customSort"
sort-by="date"
:sort-desc="true"
color="primary"
>
<template #no-data>
<div class="py-2">empty</div>
</template>
<template #item="{ item }">
<tr>
<td class="log-cell title-cell py-2">
{{ formatTime(item.date)}}
</td>
<td class="log-cell content-cell pl-0 py-2" colspan="2" style="width:100%;">
<span v-if="item.message" class="message" v-html="item.message"></span>
</td>
</tr>
</template>
</v-data-table>
<v-row>
<v-col class="text-center pt-5">
<v-btn @click="close" :disabled="!complete" color="primary">close</v-btn>
</v-col>
</v-row>
</v-card-text>
</v-card>
</v-dialog>
</template>
<script>
import {mapState} from "vuex";
export default {
name: "UpdateDialog.vue",
data: function() {
return {
headers: [
{
text: 'Date',
value: 'date',
width: '1%',
dateType: 'Date',
}, {
text: 'Message',
sortable: false,
value: 'message',
width: '99%'
},
],
options: {
},
}
},
computed: {
...mapState({
application: state => state.server.updateManager.updateResponse.application,
complete: state => state.server.updateManager.updateResponse.complete,
messages: state => state.server.updateManager.updateResponse.messages,
})
},
methods: {
formatTime(date) {
let hours = date.getHours();
if (hours < 10) hours = "0"+hours.toString();
let minutes = date.getMinutes();
if (minutes < 10) minutes = "0"+minutes.toString();
let seconds = date.getSeconds();
if (seconds < 10) seconds = "0"+seconds.toString();
return hours+":"+minutes+":"+seconds;
},
customSort: function(items, index, isDesc) {
items.sort((a, b) => {
if (index[0] === 'date') {
if (!isDesc[0]) return new Date(b[index]) - new Date(a[index]);
else return new Date(a[index]) - new Date(b[index]);
} else {
if(typeof a[index] !== 'undefined'){
if (!isDesc[0]) return a[index].toLowerCase().localeCompare(b[index].toLowerCase());
else return b[index].toLowerCase().localeCompare(a[index].toLowerCase());
}
}
});
return items;
},
close() {
if (this.application !== null && this.complete && ["client", "mainsail"].includes(this.application.toLowerCase())) window.location.reload(true)
else {
this.$store.commit('server/updateManager/resetUpdateResponse')
this.$socket.sendObj('machine.update.status', { refresh: false }, 'server/updateManager/getStatus')
}
}
},
updated(){
if (this.$refs.updaterLog) this.$refs.updaterLog.$el.scrollTop = this.$refs.updaterLog.$el.scrollHeight
}
}
</script>
+100
View File
@@ -0,0 +1,100 @@
<template>
<div id="tempchart" style="height: 270px; width: 100%;"></div>
</template>
<script>
import CanvasJS from '@/assets/canvasjs-3.2.3/canvasjs.min'
export default {
components: {
},
data: function() {
return {
tempchartDisplayMinutes: 10,
timer: '',
chartOptions: {
theme: "dark1",
backgroundColor: 'transparent',
animationEnabled: true,
legend: {
horizontalAlign: "center",
verticalAlign: "top",
},
toolTip:{
content: "{name}: {y}",
yValueFormatString: "#,###.00",
},
axisX:{
valueFormatString: "HH:mm" ,
//labelAngle: -50
gridThickness: 1,
gridColor: '#ffffff30',
minimum: new Date() - 60*10,
maximum: new Date(),
margin: 15,
},
axisY: {
gridThickness: 1,
gridColor: '#ffffff30',
minimum: 0,
maximum: 300,
interval: 50,
},
data: [ ]
},
chart : null
}
},
computed: {
datasets: {
get () {
const datasets = this.$store.state.printer.tempHistory.datasets
return datasets.sort((a,b) => {
if ('name' in a && 'name' in b) {
if (a.name.endsWith("_target") > b.name.endsWith("_target")) return -1
if (a.name.endsWith("_target") < b.name.endsWith("_target")) return 1
}
return 0
})
}
},
maxTemp: {
get() {
return this.$store.getters["printer/getMaxTemp"]
}
}
},
methods: {
createChart() {
if (document.getElementById("tempchart")) {
this.chart = new CanvasJS.Chart("tempchart", this.chartOptions)
} else setTimeout(() => {
this.createChart()
}, 500)
}
},
created() {
this.timer = setInterval(() => {
if (
document.getElementById("tempchart") &&
this.chart &&
this.chart._toolBar
) {
this.chartOptions.data = this.datasets
this.chartOptions.axisX.minimum = new Date() - 60* this.tempchartDisplayMinutes *1000
this.chartOptions.axisX.maximum = new Date()
this.chartOptions.axisY.maximum = this.maxTemp
this.chart.render()
}
}, 1000);
},
mounted: function() {
this.createChart()
}
}
</script>
+11 -1
View File
@@ -1,6 +1,16 @@
import panels from './panels'
import topCornerMenu from './TopCornerMenu'
import updateDialog from './UpdateDialog'
import connectingDialog from './ConnectingDialog'
import selectPrinterDialog from './SelectPrinterDialog'
import printerSelecter from './PrinterSelecter'
export default {
panels
panels,
topCornerMenu,
updateDialog,
connectingDialog,
selectPrinterDialog,
printerSelecter,
}
+93 -74
View File
@@ -1,56 +1,75 @@
<style>
.btnHomeAxis {
width: 36px;
min-width: 36px !important;
}
.btnMinWidthAuto {
min-width: auto !important;
}
</style>
<template>
<v-card>
<v-col xs12 md12>
<v-row class="pl-3 pr-3 text-center">
<v-btn-toggle borderless no-gutters style="flex-wrap: nowrap; width: 100%;" >
<v-btn @click="doSend('X-100')" cols="1" class="flex-grow-1 flex-shrink-0"><v-icon left>mdi-chevron-left</v-icon><span>X-100</span></v-btn>
<v-btn @click="doSend('X-10')" cols="1" class="flex-grow-1 flex-shrink-0"><v-icon left>mdi-chevron-left</v-icon><span>X-10</span></v-btn>
<v-btn @click="doSend('X-1')" cols="1" class="flex-grow-1 flex-shrink-0"><v-icon left>mdi-chevron-left</v-icon><span>X-1</span></v-btn>
<v-btn @click="doHomeX" :color="homedAxes.includes('x') ? 'primary' : 'warning'" :loading="loadingHomeX"><v-icon class="mdi mdi-home"></v-icon></v-btn>
<v-btn @click="doSend('X+1')" cols="1" class="flex-grow-1 flex-shrink-0"><span>X+1</span><v-icon right>mdi-chevron-right</v-icon></v-btn>
<v-btn @click="doSend('X+10')" cols="1" class="flex-grow-1 flex-shrink-0"><span>X+10</span><v-icon right>mdi-chevron-right</v-icon></v-btn>
<v-btn @click="doSend('X+100')" cols="1" class="flex-grow-1 flex-shrink-0"><span>X+100</span><v-icon right>mdi-chevron-right</v-icon></v-btn>
</v-btn-toggle>
<v-container class="pt-0">
<v-row no-gutters class="" v-if="['standby', 'paused', 'complete', 'error'].includes(printer_state)">
<v-col class="col-12 mt-3 pb-0 text-center">
<v-btn small @click="doHome" :loading="loadings.includes('homeAll')" :color="homedAxes.includes('xyz') ? 'primary' : 'warning'"><v-icon class="mr-1">mdi-home</v-icon><span class="d-none d-sm-inline">Home </span>all</v-btn>
<v-btn small @click="doQGL" :loading="loadings.includes('qgl')" color="primary" class="ml-2" v-if="'quad_gantry_level' in config">QGL</v-btn>
<v-btn small @click="doZtilt" :loading="loadings.includes('zTilt')" color="primary" class="ml-2" v-if="'z_tilt' in config">Z Tilt</v-btn>
</v-col>
</v-row>
<v-row class="pl-3 pr-3 mt-3 text-center">
<v-btn-toggle borderless no-gutters style="flex-wrap: nowrap; width: 100%;" >
<v-btn @click="doSend('Y-100')" cols="1" class="flex-grow-1 flex-shrink-0"><v-icon left>mdi-chevron-left</v-icon><span>Y-100</span></v-btn>
<v-btn @click="doSend('Y-10')" cols="1" class="flex-grow-1 flex-shrink-0"><v-icon left>mdi-chevron-left</v-icon><span>Y-10</span></v-btn>
<v-btn @click="doSend('Y-1')" cols="1" class="flex-grow-1 flex-shrink-0"><v-icon left>mdi-chevron-left</v-icon><span>Y-1</span></v-btn>
<v-btn @click="doHomeY" :color="homedAxes.includes('y') ? 'primary' : 'warning'" :loading="loadingHomeY"><v-icon class="mdi mdi-home"></v-icon></v-btn>
<v-btn @click="doSend('Y+1')" cols="1" class="flex-grow-1 flex-shrink-0"><span>Y+1</span><v-icon right>mdi-chevron-right</v-icon></v-btn>
<v-btn @click="doSend('Y+10')" cols="1" class="flex-grow-1 flex-shrink-0"><span>Y+10</span><v-icon right>mdi-chevron-right</v-icon></v-btn>
<v-btn @click="doSend('Y+100')" cols="1" class="flex-grow-1 flex-shrink-0"><span>Y+100</span><v-icon right>mdi-chevron-right</v-icon></v-btn>
</v-btn-toggle>
<v-row no-gutters class="mt-3" v-if="['standby', 'paused', 'complete', 'error'].includes(printer_state)">
<v-col class="text-center">
<v-btn-toggle dense no-gutters class="row no-gutters mx-auto" style="flex-wrap: nowrap;" >
<v-btn @click="doSendMove('X-100')" class="btnMinWidthAuto col"><span class="body-2">-100</span></v-btn>
<v-btn @click="doSendMove('X-10')" class="btnMinWidthAuto col"><span class="body-2">-10</span></v-btn>
<v-btn @click="doSendMove('X-1')" class="btnMinWidthAuto col"><span class="body-2">-1</span></v-btn>
<v-btn @click="doHomeX" :color="homedAxes.includes('x') ? 'primary' : 'warning'" :loading="loadings.includes('homeX')" class="font-weight-bold btnHomeAxis">X</v-btn>
<v-btn @click="doSendMove('X+1')" class="btnMinWidthAuto col"><span class="body-2">+1</span></v-btn>
<v-btn @click="doSendMove('X+10')" class="btnMinWidthAuto col"><span class="body-2">+10</span></v-btn>
<v-btn @click="doSendMove('X+100')" class="btnMinWidthAuto col"><span class="body-2">+100</span></v-btn>
</v-btn-toggle>
</v-col>
</v-row>
<v-row class="pl-3 pr-3 mt-3 text-center">
<v-btn-toggle borderless no-gutters style="flex-wrap: nowrap; width: 100%;" >
<v-btn @click="doSend('Z-25')" cols="1" class="flex-grow-1 flex-shrink-0"><v-icon left>mdi-chevron-left</v-icon><span>Z-25</span></v-btn>
<v-btn @click="doSend('Z-1')" cols="1" class="flex-grow-1 flex-shrink-0"><v-icon left>mdi-chevron-left</v-icon><span>Z-1</span></v-btn>
<v-btn @click="doSend('Z-0.1')" cols="1" class="flex-grow-1 flex-shrink-0"><v-icon left>mdi-chevron-left</v-icon><span>Z-0.1</span></v-btn>
<v-btn @click="doHomeZ" :color="homedAxes.includes('z') ? 'primary' : 'warning'" :loading="loadingHomeZ"><v-icon class="mdi mdi-home"></v-icon></v-btn>
<v-btn @click="doSend('Z+0.1')" cols="1" class="flex-grow-1 flex-shrink-0"><span>Z+0.1</span><v-icon right>mdi-chevron-right</v-icon></v-btn>
<v-btn @click="doSend('Z+1')" cols="1" class="flex-grow-1 flex-shrink-0"><span>Z+1</span><v-icon right>mdi-chevron-right</v-icon></v-btn>
<v-btn @click="doSend('Z+25')" cols="1" class="flex-grow-1 flex-shrink-0"><span>Z+25</span><v-icon right>mdi-chevron-right</v-icon></v-btn>
</v-btn-toggle>
<v-row no-gutters class="mt-3" v-if="['standby', 'paused', 'complete', 'error'].includes(printer_state)">
<v-col class="text-center">
<v-btn-toggle dense no-gutters class="row no-gutters mx-auto" style="flex-wrap: nowrap;" >
<v-btn @click="doSendMove('Y-100')" class="btnMinWidthAuto col"><span class="body-2">-100</span></v-btn>
<v-btn @click="doSendMove('Y-10')" class="btnMinWidthAuto col"><span class="body-2">-10</span></v-btn>
<v-btn @click="doSendMove('Y-1')" class="btnMinWidthAuto col"><span class="body-2">-1</span></v-btn>
<v-btn @click="doHomeY" :color="homedAxes.includes('y') ? 'primary' : 'warning'" :loading="loadings.includes('homeY')" class="font-weight-bold btnHomeAxis">Y</v-btn>
<v-btn @click="doSendMove('Y+1')" class="btnMinWidthAuto col"><span class="body-2">+1</span></v-btn>
<v-btn @click="doSendMove('Y+10')" class="btnMinWidthAuto col"><span class="body-2">+10</span></v-btn>
<v-btn @click="doSendMove('Y+100')" class="btnMinWidthAuto col"><span class="body-2">+100</span></v-btn>
</v-btn-toggle>
</v-col>
</v-row>
<v-row class="px-3 mt-3">
<v-spacer></v-spacer>
<v-btn @click="doHome" :loading="loadingHome" :color="homedAxes.includes('xyz') ? 'primary' : 'warning'"><v-icon left>mdi-home</v-icon>Home all</v-btn>
<v-btn v-if="config.hasOwnProperty('quad_gantry_level')" @click="doQGL" :loading="loadingQGL" color="primary" class="ml-3">QGL</v-btn>
<v-btn @click="doRestart" :loading="loadingRestart" color="error" class="ml-3"><v-icon left>mdi-cached</v-icon>Restart</v-btn>
<v-btn @click="doRestartFirmware" :loading="loadingRestartFirmware" color="error" class="ml-3"><v-icon left>mdi-cached</v-icon>Firmware Restart</v-btn>
<v-row no-gutters class="mt-3" v-if="['standby', 'paused', 'complete', 'error'].includes(printer_state)">
<v-col class="text-center">
<v-btn-toggle dense no-gutters class="row no-gutters mx-auto" style="flex-wrap: nowrap;" >
<v-btn @click="doSendMove('Z-25')" dense class="btnMinWidthAuto col"><span class="body-2">-25</span></v-btn>
<v-btn @click="doSendMove('Z-1')" dense class="btnMinWidthAuto col"><span class="body-2">-1</span></v-btn>
<v-btn @click="doSendMove('Z-0.1')" dense class="btnMinWidthAuto col"><span class="body-2">-0.1</span></v-btn>
<v-btn @click="doHomeZ" :color="homedAxes.includes('z') ? 'primary' : 'warning'" :loading="loadings.includes('homeZ')" class="font-weight-bold btnHomeAxis">Z</v-btn>
<v-btn @click="doSendMove('Z+0.1')" dense class="btnMinWidthAuto col"><span class="body-2">+0.1</span></v-btn>
<v-btn @click="doSendMove('Z+1')" dense class="btnMinWidthAuto col"><span class="body-2">+1</span></v-btn>
<v-btn @click="doSendMove('Z+25')" dense class="btnMinWidthAuto col"><span class="body-2">+25</span></v-btn>
</v-btn-toggle>
</v-col>
</v-row>
</v-col>
<v-row no-gutters v-if="this['printer/getMacros'].length > 0">
<v-col class="text-center">
<v-btn v-for="(macro, index) in this['printer/getMacros']" v-bind:key="index+99" small color="primary" class="mx-1 mt-3" :loading="loadings.includes('macro_'+macro.name)" @click="doSendMacro(macro.name)">{{ macro.name.replace(/_/g, " ") }}</v-btn>
</v-col>
</v-row>
</v-container>
</v-card>
</template>
<script>
import { mapState, mapMutations } from 'vuex'
import { mapState, mapGetters } from 'vuex'
import Vue from "vue";
export default {
components: {
@@ -63,61 +82,61 @@
},
computed: {
...mapState({
loadingHome: state => state.socket.loadingHome,
loadingHomeX: state => state.socket.loadingHomeX,
loadingHomeY: state => state.socket.loadingHomeY,
loadingHomeZ: state => state.socket.loadingHomeZ,
loadingQGL: state => state.socket.loadingQGL,
loadingRestart: state => state.socket.loadingRestart,
loadingRestartFirmware: state => state.socket.loadingRestartFirmware,
homedAxes: state => state.printer.toolhead.homed_axes,
config: state => state.config,
config: state => state.printer.configfile.config,
loadings: state => state.socket.loadings,
printer_state: state => state.printer.print_stats.state
}),
...mapMutations([
'setLoadingHome',
'setLoadingHomeX',
'setLoadingHomeY',
'setLoadingHomeZ',
'setLoadingQGL',
'setLoadingRestart',
'setLoadingRestartFirmware',
]),
...mapGetters([
'printer/getMacros',
])
},
methods: {
doHome() {
this.$store.commit('setLoadingHome', true);
this.$socket.sendObj('post_printer_gcode', { script: "G28" }, "responseHome");
this.$store.commit('server/addEvent', { message: "G28", type: 'command' });
this.$store.commit('socket/addLoading', { name: 'homeAll' });
this.$socket.sendObj('printer.gcode.script', { script: "G28" }, "socket/removeLoading", { name: 'homeAll' });
},
doHomeX() {
this.$store.commit('setLoadingHomeX', true);
this.$socket.sendObj('post_printer_gcode', { script: "G28 X" }, "responseHomeX");
this.$store.commit('server/addEvent', { message: "G28 X", type: 'command' });
this.$store.commit('socket/addLoading', { name: 'homeX' });
this.$socket.sendObj('printer.gcode.script', { script: "G28 X" }, "socket/removeLoading", { name: 'homeX' });
},
doHomeY() {
this.$store.commit('setLoadingHomeY', true);
this.$socket.sendObj('post_printer_gcode', { script: "G28 Y" }, "responseHomeY");
this.$store.commit('server/addEvent', { message: "G28 Y", type: 'command' });
this.$store.commit('socket/addLoading', { name: 'homeY' });
this.$socket.sendObj('printer.gcode.script', { script: "G28 Y" }, "socket/removeLoading", { name: 'homeY' });
},
doHomeZ() {
this.$store.commit('setLoadingHomeZ', true);
this.$socket.sendObj('post_printer_gcode', { script: "G28 Z" }, "responseHomeZ");
this.$store.commit('server/addEvent', { message: "G28 Z", type: 'command' });
this.$store.commit('socket/addLoading', { name: 'homeZ' });
this.$socket.sendObj('printer.gcode.script', { script: "G28 Z" }, "socket/removeLoading", { name: 'homeZ' });
},
doQGL() {
this.$store.commit('setLoadingQGL', true);
this.$socket.sendObj('post_printer_gcode', { script: "quad_gantry_level" }, "responseQGL");
this.$store.commit('server/addEvent', { message: "QUAD_GANTRY_LEVEL", type: 'command' });
this.$store.commit('socket/addLoading', { name: 'qgl' });
this.$socket.sendObj('printer.gcode.script', { script: "QUAD_GANTRY_LEVEL" }, "socket/removeLoading", { name: 'qgl' });
},
doSend(gcode) {
doZtilt() {
this.$store.commit('server/addEvent', { message: "Z_TILT_ADJUST", type: 'command' });
this.$store.commit('socket/addLoading', { name: 'zTilt' });
this.$socket.sendObj('printer.gcode.script', { script: "Z_TILT_ADJUST" }, "socket/removeLoading", { name: 'zTilt' });
},
doSendMove(gcode) {
gcode = "G91" + "\n" +
"G1 " + gcode + " F6000" + "\n" +
"G90";
this.$socket.sendObj('post_printer_gcode', { script: gcode }, "sendGcode");
this.doSend(gcode);
},
doRestart() {
this.$store.commit('setLoadingRestart', true);
this.$socket.sendObj('post_printer_restart', { }, "responseRestart");
doSend(gcode) {
this.$store.commit('server/addEvent', { message: gcode, type: 'command' });
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "server/getGcodeRespond");
},
doRestartFirmware() {
this.$store.commit('setLoadingRestartFirmware', true);
this.$socket.sendObj('post_printer_firmware_restart', { }, "responseRestartFirmware");
doSendMacro(gcode) {
this.$store.commit('server/addEvent', { message: gcode, type: 'command' });
this.$store.commit('socket/addLoading', { name: 'macro_'+gcode });
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'macro_'+gcode });
},
}
}
+80
View File
@@ -0,0 +1,80 @@
<style>
</style>
<template>
<v-card v-if="(['standby', 'paused', 'complete'].includes(printer_state))">
<v-container>
<v-row class="">
<v-col class="col col-md-6">
<v-label>Feed amount in mm:</v-label>
<v-btn-toggle class="mt-2" dense no-gutters style="flex-wrap: nowrap; width: 100%;" >
<v-btn v-for="amount in feedAmounts" v-bind:key="amount" @click="setFeedAmount(amount)" dense :class="(amount === feedAmount ? 'v-btn--active' : '') + ' btnMinWidthAuto flex-grow-1 px-0 _btnFeedrate'">{{ amount }}</v-btn>
</v-btn-toggle>
</v-col>
<v-col class="col col-md-6">
<v-label>Feedrate in mm/s:</v-label>
<v-btn-toggle class="mt-2" dense no-gutters style="flex-wrap: nowrap; width: 100%;" >
<v-btn v-for="rate in feedrates" v-bind:key="rate" @click="setFeedrate(rate)" dense :class="(feedrate === rate ? 'v-btn--active' : '') + ' btnMinWidthAuto flex-grow-1 px-0 _btnFeedrate'">{{ rate }}</v-btn>
</v-btn-toggle>
</v-col>
</v-row>
<v-row class="">
<v-col class="col text-center">
<v-btn small @click="sendRetract()" class="mx-2" :loading="loadings.includes('btnRetract')" :disabled="!this['printer/getExtrudePossible']"><v-icon small class="mr-1">mdi-arrow-up-bold</v-icon> Retract</v-btn>
<v-btn small @click="sendDetract()" class="mx-2" :loading="loadings.includes('btnDetract')" :disabled="!this['printer/getExtrudePossible']"><v-icon small class="mr-1">mdi-arrow-down-bold</v-icon> Extrude</v-btn>
</v-col>
</v-row>
</v-container>
</v-card>
</template>
<script>
import { mapState, mapGetters } from 'vuex'
import Vue from "vue";
export default {
components: {
},
data: function() {
return {
feedAmount: 25,
feedrate: 5,
feedAmounts: [ 100, 25, 10, 5, 1 ],
feedrates: [ 60, 30, 15, 5, 1 ],
}
},
computed: {
...mapState({
loadings: state => state.socket.loadings,
printer_state: state => state.printer.print_stats.state,
extruder: state => state.printer.extruder,
config: state => state.printer.configfile.config
}),
...mapGetters([
'printer/getExtrudePossible',
]),
},
methods: {
setFeedAmount(value) {
this.feedAmount = value;
},
setFeedrate(value) {
this.feedrate = value;
},
sendRetract() {
let gcode = "M83\nG1 E-"+this.feedAmount+" F"+(this.feedrate * 60);
this.$store.commit('server/addEvent', { message: gcode, type: 'command' });
this.$store.commit('socket/addLoading', { name: 'btnRetract' });
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'btnRetract' });
},
sendDetract() {
let gcode = "M83\nG1 E"+this.feedAmount+" F"+(this.feedrate * 60);
this.$store.commit('server/addEvent', { message: gcode, type: 'command' });
this.$store.commit('socket/addLoading', { name: 'btnDetract' });
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'btnDetract' });
},
}
}
</script>
+121
View File
@@ -0,0 +1,121 @@
<style>
.v-card.disabledPrinter {
opacity: 0.6;
filter: grayscale(70%);
}
</style>
<template>
<v-card
:class="(!printer.socket.isConnected && !printer.socket.isConnecting ? 'disabledPrinter' : '')"
:loading="printer.socket.isConnecting"
@click="clickPrinter"
>
<v-toolbar flat dense :color="isCurrentPrinter ? 'primary' : ''">
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-printer-3d</v-icon>{{ printer_name }}</span>
</v-toolbar-title>
</v-toolbar>
<v-img
height="200px"
:src="printer_image"
class="d-flex align-end"
>
<v-card-title class="white--text py-2" style="background-color: rgba(0,0,0,0.3); backdrop-filter: blur(3px);">
<v-row>
<v-col class="col-auto pr-0 d-flex align-center" style="width: 58px">
<img class="my-auto" :src="printer_logo" style="width: 100%;" />
</v-col>
<v-col class="col" style="width: 100px">
<h3 class="font-weight-regular">{{ printer_status }}</h3>
<span class="subtitle-2 text-truncate px-0 text--disabled d-block" v-if="printer_current_filename !== ''"><v-icon small class="mr-1">mdi-file-outline</v-icon>{{ printer_current_filename }}</span>
</v-col>
</v-row>
</v-card-title>
</v-img>
<v-card-text class="px-0 py-2" v-if="printer_preview.length">
<v-container class="py-0">
<v-row>
<v-col :class="object.name === 'ETA' ? 'col-auto' : 'col' + ' px-2'" v-for="object in printer_preview" v-bind:key="object.name">
<strong class="d-block text-center">{{ object.name }}</strong>
<span class="d-block text-center">{{ object.value }}</span>
</v-col>
</v-row>
</v-container>
</v-card-text>
</v-card>
</template>
<script>
import { mapState } from 'vuex'
export default {
components: {
},
props: {
printer: {
type: Object,
required: true,
},
},
computed: {
...mapState({
remoteMode: state => state.socket.remoteMode
}),
isCurrentPrinter: {
get() {
return this.$store.getters["farm/"+this.printer._namespace+"/isCurrentPrinter"]
}
},
printer_name: {
get() {
return this.$store.getters["farm/"+this.printer._namespace+"/getPrinterName"]
}
},
printer_status: {
get() {
return this.$store.getters["farm/"+this.printer._namespace+"/getStatus"]
}
},
printer_current_filename: {
get() {
return this.$store.getters["farm/"+this.printer._namespace+"/getCurrentFilename"]
}
},
printer_image: {
get() {
return this.$store.getters["farm/"+this.printer._namespace+"/getImage"]
}
},
printer_logo: {
get() {
return this.$store.getters["farm/"+this.printer._namespace+"/getLogo"]
}
},
printer_position: {
get() {
return this.$store.getters["farm/"+this.printer._namespace+"/getPosition"]
}
},
printer_preview: {
get() {
return this.$store.getters["farm/"+this.printer._namespace+"/getPrinterPreview"]
}
}
},
methods: {
clickPrinter() {
if (this.printer.socket.isConnected) this.changePrinter()
else this.reconnectPrinter()
},
changePrinter() {
if (this.remoteMode) this.$store.dispatch('changePrinter', { printer: this.printer._namespace })
else window.location.href = "//"+this.printer.socket.hostname+(parseInt(this.printer.socket.webPort) !== 80 ? ':'+this.printer.socket.webPort : '')
},
reconnectPrinter() {
this.$store.dispatch("farm/"+this.printer._namespace+"/reconnect")
}
}
}
</script>
@@ -0,0 +1,46 @@
<template>
<v-card>
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-alert-circle</v-icon>Klippy-State: {{ klippy_state}}</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="py-0">
<v-layout wrap class=" text-center">
<v-flex col class="text-left" v-if="klippy_connected"><pre style="white-space: pre-wrap;">{{ klippy_message }}</pre></v-flex>
<v-flex col class="text-left" v-if="!klippy_connected">
<p>Moonraker can't connect to Klippy!<br />Please check if the Klipper service is running and an UDS (Unix Domain Socket) is configured.</p>
</v-flex>
</v-layout>
</v-card-text>
<v-divider class="my-2" v-if="klippy_connected" ></v-divider>
<v-card-text class="px-4 pt-2 pb-4 content text-center text-lg-left" v-if="klippy_connected">
<v-btn small @click="doRestart" color="error" class=""><v-icon class="mr-sm-2">mdi-restart</v-icon>Restart</v-btn>
<v-btn small @click="doRestartFirmware" class="ml-4" color="error"><v-icon class="mr-sm-2">mdi-restart</v-icon>FIRMWARE Restart</v-btn>
</v-card-text>
</v-card>
</template>
<script>
import { mapState } from 'vuex';
export default {
computed: {
...mapState({
klippy_connected: state => state.server.klippy_connected,
klippy_state: state => state.server.klippy_state,
klippy_message: state => state.server.klippy_message,
}),
},
methods: {
doRestart() {
this.$store.commit('socket/addLoading', { name: 'restart' });
this.$socket.sendObj('printer.restart', { }, 'socket/removeLoading', { name: 'restart' });
},
doRestartFirmware() {
this.$store.commit('socket/addLoading', { name: 'firmwareRestart' });
this.$socket.sendObj('printer.firmware_restart', { }, 'socket/removeLoading', { name: 'firmwareRestart' });
},
},
}
</script>
-45
View File
@@ -1,45 +0,0 @@
<template>
<v-card>
<v-list-item>
<v-list-item-avatar color="grey"><v-icon dark>fa-thermometer-three-quarters</v-icon></v-list-item-avatar>
<v-list-item-content>
<v-list-item-title class="headline">Macros</v-list-item-title>
<v-list-item-subtitle>
{{ getMacros.length }} Macros
</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>
<v-divider class="my-2"></v-divider>
<v-card-text class="px-0 pt-0 pb-2 content text-center">
<div v-for="(macro, index) in getMacros" v-bind:key="index+99" style="display: inline-block;" class="mx-1 my-1">
<v-btn color="primary" class="ml-3" @click="doSend(macro.name)">{{ macro.name }}</v-btn>
</div>
</v-card-text>
</v-card>
</template>
<script>
import {mapGetters} from 'vuex'
export default {
components: {
},
data: function() {
return {
}
},
computed: {
...mapGetters([
'getMacros',
]),
},
methods: {
doSend(gcode) {
this.$socket.sendObj('post_printer_gcode', { script: gcode }, "sendGcode");
},
},
}
</script>
@@ -0,0 +1,96 @@
<template>
<v-card
class="mb-6"
v-if="
!boolVirtualSdcard ||
!boolPauseResume ||
!boolDisplayStatus ||
!boolMacroPause ||
!boolMacroResume ||
!boolMacroCancelPrint
">
<v-toolbar flat dense color="orange darken-2">
<v-toolbar-title>
<span class="subheading">
<v-icon class="mdi mdi-alert-circle" left></v-icon>Missing configuration
</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="px-0 pt-0 pb-2 content">
<v-layout wrap class=" text-center">
<v-flex col class="text-left">
<p v-if="!boolVirtualSdcard" class="orange--text"><code>virtual_sdcard</code> is not defined in config.</p>
<p v-if="!boolPauseResume" class="orange--text"><code>pause_resume</code> is not defined in config.</p>
<p v-if="!boolDisplayStatus" class="orange--text"><code>display_status</code> is not defined in config.</p>
<p v-if="!boolMacroPause" class="orange--text"><code>gcode_macro PAUSE</code> is not defined in config.</p>
<p v-if="!boolMacroResume" class="orange--text"><code>gcode_macro RESUME</code> is not defined in config.</p>
<p v-if="!boolMacroCancelPrint" class="orange--text"><code>gcode_macro CANCEL_PRINT</code> is not defined in config.</p>
<div class="text-center">
<v-btn href="https://docs.mainsail.xyz/necessary-configuration" target="_blank" color="white" outlined small><v-icon small class="mr-1">mdi-information</v-icon>more information</v-btn>
</div>
</v-flex>
</v-layout>
</v-card-text>
</v-card>
</template>
<script>
import { mapMutations, mapState, mapGetters } from 'vuex';
export default {
data: () => ({
boolVirtualSdcard: false,
boolPauseResume: false,
boolDisplayStatus: false,
boolMacroPause: false,
boolMacroResume: false,
boolMacroCancelPrint: false,
}),
computed: {
...mapState({
config: state => state.printer.configfile.config,
}),
...mapMutations([
]),
...mapGetters([
'printer/checkConfigVirtualSdcard',
'printer/checkConfigPauseResume',
'printer/checkConfigDisplayStatus',
'printer/checkConfigMacroPause',
'printer/checkConfigMacroResume',
'printer/checkConfigMacroCancel',
]),
},
created() {
this.refreshConfig();
},
methods: {
refreshConfig() {
this.boolVirtualSdcard = this['printer/checkConfigVirtualSdcard'];
this.boolPauseResume = this['printer/checkConfigPauseResume'];
this.boolDisplayStatus = this['printer/checkConfigDisplayStatus'];
this.boolMacroPause = this['printer/checkConfigMacroPause'];
this.boolMacroResume = this['printer/checkConfigMacroResume'];
this.boolMacroCancelPrint = this['printer/checkConfigMacroCancel'];
}
},
watch: {
config: {
deep: true,
handler() {
this.refreshConfig();
}
}
}
}
</script>
<style scoped>
.content span,
.content strong {
padding-left: 8px;
padding-right: 8px;
white-space: pre-wrap;
}
</style>
+239
View File
@@ -0,0 +1,239 @@
<style>
.minievent-table {
max-height: 350px;
overflow-y: auto;
}
.miniConsole .title-cell {
white-space: nowrap;
width: 1% !important;
}
.miniConsole.v-data-table > .v-data-table__wrapper > table > tbody > tr > td {
height: auto;
}
.miniConsole .content-cell {
width: 100%;
}
</style>
<template>
<v-card>
<v-toolbar flat dense>
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-console-line</v-icon>Console</span>
</v-toolbar-title>
<v-spacer></v-spacer>
<v-menu :offset-y="true" :close-on-content-click="false" title="Setup Console">
<template v-slot:activator="{ on, attrs }">
<v-btn small class="px-2 minwidth-0" color="lightgray" v-bind="attrs" v-on="on"><v-icon small>mdi-cog</v-icon></v-btn>
</template>
<v-list>
<v-list-item class="minHeight36">
<v-checkbox class="mt-0" v-model="hideWaitTemperatures" hide-details label="Hide temperatures"></v-checkbox>
</v-list-item>
<v-list-item class="minHeight36">
<v-checkbox class="mt-0" v-model="boolCustomFilters" hide-details label="Custom filters"></v-checkbox>
</v-list-item>
</v-list>
</v-menu>
</v-toolbar>
<v-card-text>
<v-container class="py-0 px-0">
<v-row>
<v-col>
<v-text-field
label="Send code..."
ref="gcodeCommandField"
solo
hide-details
autocomplete="off"
v-model="gcode"
v-on:keyup.enter="doSend"
v-on:keyup.up="onKeyUp"
v-on:keyup.down="onKeyDown"
:items="items"
v-on:keydown.tab="getAutocomplete"
></v-text-field>
</v-col>
<v-col class="col-auto align-content-center">
<v-btn color="info" class="gcode-command-btn" @click="doSend" :loading="loadings.includes('sendGcode')" :disabled="loadings.includes('sendGcode')" >
<v-icon class="mr-2">mdi-send</v-icon> send
</v-btn>
</v-col>
</v-row>
</v-container>
</v-card-text>
<v-card-text class="px-0 py-0 content">
<v-divider></v-divider>
<v-data-table
:headers="headers"
:options="options"
:items="events"
item-key="date"
hide-default-footer
hide-default-header
disable-pagination
class="minievent-table miniConsole"
:custom-sort="customSort"
sort-by="date"
>
<template #no-data>
<div class="py-2">empty</div>
</template>
<template #item="{ item }">
<tr>
<td class="log-cell title-cell py-2">
{{ formatTime(item.date)}}
</td>
<td class="log-cell content-cell pl-0 py-2" colspan="2" style="width:100%;">
<span v-if="item.message" :class="'message '+colorConsoleMessage(item)" v-html="formatConsoleMessage(item.message)"></span>
</td>
</tr>
</template>
</v-data-table>
</v-card-text>
</v-card>
</template>
<script>
import {mapState} from 'vuex'
import Vue from "vue";
import { colorConsoleMessage, formatConsoleMessage } from "@/plugins/helpers";
export default {
components: {
},
data: function() {
return {
headers: [
{
text: 'Date',
value: 'date',
width: '15%',
dateType: 'Date',
},
{
text: 'Event',
sortable: false,
value: 'message',
width: '85%'
},
],
options: {
},
gcode: "",
lastCommands: [
],
lastCommandNumber: null,
items: [],
}
},
computed: {
...mapState({
helplist: state => state.printer.helplist,
loadings: state => state.socket.loadings,
}),
events: {
get() {
return this.$store.getters["server/getFilterdEvents"]
}
},
hideWaitTemperatures: {
get() {
return this.$store.state.gui.console.hideWaitTemperatures
},
set: function(newVal) {
return this.$store.dispatch("gui/setSettings", { console: { hideWaitTemperatures: newVal } })
}
},
boolCustomFilters: {
get() {
return this.$store.state.gui.console.boolCustomFilters
},
set: function(newVal) {
return this.$store.dispatch("gui/setSettings", { console: { boolCustomFilters: newVal } })
}
}
},
methods: {
doSend() {
this.$store.commit('socket/addLoading', { name: 'sendGcode' });
this.$store.commit('server/addEvent', { message: this.gcode, type: 'command' });
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: this.gcode }, "socket/removeLoading", { name: 'sendGcode' });
this.lastCommands.push(this.gcode);
this.gcode = "";
this.lastCommandNumber = null;
},
onKeyUp() {
if (this.lastCommandNumber === null && this.lastCommands.length) {
this.lastCommandNumber = this.lastCommands.length - 1;
this.gcode = this.lastCommands[this.lastCommandNumber];
} else if (this.lastCommandNumber > 0) {
this.lastCommandNumber--;
this.gcode = this.lastCommands[this.lastCommandNumber];
}
},
onKeyDown() {
if (this.lastCommandNumber !== null && this.lastCommandNumber < (this.lastCommands.length - 1)) {
this.lastCommandNumber++;
this.gcode = this.lastCommands[this.lastCommandNumber];
} else if (this.lastCommandNumber !== null && this.lastCommandNumber === (this.lastCommands.length - 1)) {
this.lastCommandNumber = null;
this.gcode = "";
}
},
getAutocomplete(e) {
e.preventDefault();
if (this.gcode.length) {
let commands = this.helplist.filter((element) => element.commandLow.indexOf(this.gcode.toLowerCase()) === 0);
if (commands && commands.length === 1) this.gcode = commands[0].command;
else {
let commands = this.helplist.filter((element) => element.commandLow.includes(this.gcode.toLowerCase()));
if (commands && commands.length) {
let output = "";
commands.forEach(command => output += "<b>"+command.command+":</b> "+command.description+"<br />");
this.$store.commit('server/addEvent', { message: output, type: 'command' });
}
}
}
this.$refs.gcodeCommandField.focus();
},
formatTime(date) {
let hours = date.getHours();
if (hours < 10) hours = "0"+hours.toString();
let minutes = date.getMinutes();
if (minutes < 10) minutes = "0"+minutes.toString();
let seconds = date.getSeconds();
if (seconds < 10) seconds = "0"+seconds.toString();
return hours+":"+minutes+":"+seconds;
},
colorConsoleMessage: colorConsoleMessage,
formatConsoleMessage: formatConsoleMessage,
customSort: function(items, index, isDesc) {
items.sort((a, b) => {
if (index[0] === 'date') {
if (!isDesc[0]) return new Date(b[index]) - new Date(a[index]);
else return new Date(a[index]) - new Date(b[index]);
} else {
if(typeof a[index] !== 'undefined'){
if (!isDesc[0]) return a[index].toLowerCase().localeCompare(b[index].toLowerCase());
else return b[index].toLowerCase().localeCompare(a[index].toLowerCase());
}
}
});
return items;
}
}
}
</script>
@@ -0,0 +1,70 @@
<style>
.icon-rotate {
animation-name: spin;
animation-duration: 1000ms;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
@keyframes spin {
from {
transform: rotate(0deg);
} to {
transform: rotate(-360deg);
}
}
</style>
<template>
<div>
<v-card class="mt-6" v-if="['printing', 'paused'].includes(printer_state)">
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon class="mdi mdi-printer-3d" left></v-icon>Print Settings</span>
</v-toolbar-title>
</v-toolbar>
<tool-slider label="Speed factor" :target="speed_factor" :max="200" :multi="100" :step="5" command="M220" attribute-name="S" ></tool-slider>
<v-divider></v-divider>
<tool-slider label="Extrusion factor" :target="extrude_factor" :max="200" :multi="100" :step="1" command="M221" attribute-name="S" ></tool-slider>
</v-card>
<v-card class="mt-6" v-if="this['printer/getMiscellaneous'].length">
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-dip-switch</v-icon>Miscellaneous</span>
</v-toolbar-title>
</v-toolbar>
<div v-for="(object, index) of this['printer/getMiscellaneous']" v-bind:key="index">
<v-divider v-if="index"></v-divider>
<miscellaneous-slider :name="object.name" :type="object.type" :target="object.power" :controllable="object.controllable" :pwm="object.pwm" :multi="parseInt(object.scale)" ></miscellaneous-slider>
</div>
</v-card>
</div>
</template>
<script>
import { mapState, mapGetters } from 'vuex'
import ToolSlider from '../../inputs/ToolSlider'
import MiscellaneousSlider from "@/inputs/MiscellaneousSlider";
export default {
components: {
MiscellaneousSlider,
ToolSlider
},
data () {
return {
}
},
computed: {
...mapState({
extrude_factor: state => state.printer.gcode_move.extrude_factor,
speed_factor: state => state.printer.gcode_move.speed_factor,
printer_state: state => state.printer.print_stats.state,
}),
...mapGetters([
'printer/getMiscellaneous',
]),
},
}
</script>
@@ -0,0 +1,44 @@
<template>
<v-card
class="mb-6">
<v-toolbar flat dense color="orange darken-2">
<v-toolbar-title>
<span class="subheading">
<v-icon class="mdi mdi-alert-circle" left></v-icon>Moonraker Failed Plugins
</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="px-0 pt-0 pb-2 content">
<v-layout wrap class=" text-center">
<v-flex col class="text-left">
<p class="orange--text">An error was detected while loading the moonraker plugins. Please check the logfile and fix the issue.</p>
<p class="mb-2 orange--text">Following plugin has an error:</p>
<ul class="mt-0 pt-0">
<li v-for="plugin in failedPlugins" v-bind:key="plugin" class="orange--text"><code>{{ plugin }}</code></li>
</ul>
</v-flex>
</v-layout>
</v-card-text>
<v-divider class="my-2"></v-divider>
<v-card-text class="px-4 pt-2 pb-4 content text-center text-lg-left">
<v-btn small :href="'//'+hostname+':'+port+'/server/files/moonraker.log'" color="primary" class=""><v-icon class="mr-2">mdi-download</v-icon>Download Log</v-btn>
</v-card-text>
</v-card>
</template>
<script>
import { mapState } from 'vuex';
export default {
data: () => ({
}),
computed: {
...mapState({
failedPlugins: state => state.server.failed_plugins,
hostname: state => state.socket.hostname,
port: state => state.socket.port,
}),
},
}
</script>
-90
View File
@@ -1,90 +0,0 @@
<style>
.icon-rotate {
animation-name: spin;
animation-duration: 1000ms;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
@keyframes spin {
from {
transform: rotate(0deg);
} to {
transform: rotate(360deg);
}
}
</style>
<template>
<div>
<v-card class="mt-4" v-if="bool_fan">
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon :class="fan_speed > 0 ? 'mdi mdi-fan icon-rotate' : 'mdi mdi-fan'" left></v-icon>Tool Fan</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="pb-0">
<tool-slider :target="fan_speed" :multi="100" command="M106" attribute-name="S" :attribute-scale="2.55" ></tool-slider>
</v-card-text>
</v-card>
<v-card class="mt-4" v-if="is_printing">
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon class="mdi mdi-timer" left></v-icon>Speed Factor</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="pb-0">
<tool-slider :target="speed_factor" :max="200" :multi="100" command="M220" attribute-name="S" ></tool-slider>
</v-card-text>
</v-card>
<v-card class="mt-4" v-if="is_printing">
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon class="mdi mdi-texture" left></v-icon>Extrusion Factor</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="pb-0">
<tool-slider :target="extrude_factor" :max="200" :multi="100" command="M221" attribute-name="S" ></tool-slider>
</v-card-text>
</v-card>
</div>
</template>
<script>
import {mapGetters, mapState} from 'vuex'
import ToolSlider from '../../inputs/ToolSlider'
export default {
components: {
ToolSlider
},
data () {
return {
}
},
computed: {
...mapState({
fan_speed: state => state.printer.fan.speed,
extrude_factor: state => state.printer.gcode.extrude_factor,
speed_factor: state => state.printer.gcode.speed_factor,
}),
...mapGetters([
'bool_fan',
'is_printing'
])
},
methods: {
},
mounted () {
},
watch: {
}
}
</script>
@@ -0,0 +1,53 @@
<style>
</style>
<template>
<div>
<v-card>
<v-toolbar flat dense>
<v-toolbar-title>
<span class="subheading">
<v-icon class="mdi mdi-power" left></v-icon>Power Control
</span>
</v-toolbar-title>
</v-toolbar>
<div v-for="(device, index) in devices" v-bind:key="index">
<v-divider class="mt-0" v-if="index > 0"></v-divider>
<v-card-text class="py-2">
<v-row>
<v-col class="py-0 pt-1">{{ device.device }}</v-col>
<v-col class="py-0 text-right">
<v-btn-toggle v-model="device.status">
<v-btn small v-if="device.status === 'error'" disabled>Error</v-btn>
<v-btn small v-if="device.status !== 'error'" :disabled="device.status === 'on'" @click="setPower(device,1)">On</v-btn>
<v-btn small v-if="device.status !== 'error'" :disabled="device.status === 'off'" @click="setPower(device,0)">Off</v-btn>
</v-btn-toggle>
</v-col>
</v-row>
</v-card-text>
</div>
</v-card>
</div>
</template>
<script>
import { mapState } from "vuex";
import Vue from "vue";
export default {
components: {},
computed: {
...mapState({
devices: (state) => state.server.power.devices,
}),
},
methods: {
setPower(device, value) {
let rpc = value === 1 ? "machine.device_power.on" : "machine.device_power.off";
Vue.prototype.$socket.sendObj(rpc,{ [device.device]: null },"server/power/responseToggle");
},
},
};
</script>
@@ -0,0 +1,616 @@
<style>
.my-editor {
background: #2d2d2d;
color: #ccc;
font-family: Fira code, Fira Mono, Consolas, Menlo, Courier, monospace;
font-size: 14px;
line-height: 1.5;
padding: 5px;
}
.prism-editor__textarea:focus {
outline: none;
}
.config-editor-overlay div.v-card {
position: relative;
}
.config-editor-overlay div.v-card header {
position: sticky;
top: 0;
width: 100%;
z-index: 1;
}
</style>
<template>
<v-row>
<v-col>
<v-card>
<v-card-title>
Config Files
<v-spacer class="d-none d-sm-block"></v-spacer>
<input type="file" ref="fileUpload" style="display: none" multiple @change="uploadFile" />
<v-item-group class="v-btn-toggle my-5 my-sm-0 col-12 col-sm-auto px-0 py-0">
<v-btn v-if="currentPath !== '' && currentPath !== '/config_examples'" class="flex-grow-1" @click="uploadFileButton" :loading="loadings.includes['configFileUpload']"><v-icon>mdi-file-upload</v-icon></v-btn>
<v-btn v-if="currentPath !== '' && currentPath !== '/config_examples'" class="flex-grow-1" @click="createFile"><v-icon>mdi-file-plus</v-icon></v-btn>
<v-btn v-if="currentPath !== '' && currentPath !== '/config_examples'" class="flex-grow-1" @click="createFolder"><v-icon>mdi-folder-plus</v-icon></v-btn>
<v-btn class="flex-grow-1" @click="refreshFileList"><v-icon>mdi-refresh</v-icon></v-btn>
<v-menu :offset-y="true" title="Setup current list">
<template v-slot:activator="{ on, attrs }">
<v-btn class="flex-grow-1" v-bind="attrs" v-on="on"><v-icon class="">mdi-cog</v-icon></v-btn>
</template>
<v-list>
<v-list-item class="minHeight36">
<v-checkbox class="mt-0" hide-details v-model="showHiddenFiles" label="Hidden files"></v-checkbox>
</v-list-item>
</v-list>
</v-menu>
</v-item-group>
</v-card-title>
<v-card-subtitle>Current path: {{ this.currentPath === "" ? "/" : this.currentPath }}</v-card-subtitle>
<v-data-table
:items="files"
class="files-table"
:headers="headers"
:options="options"
:page.sync="currentPage"
:custom-sort="sortFiles"
:sort-by.sync="sortBy"
:sort-desc.sync="sortDesc"
:items-per-page.sync="countPerPage"
:footer-props="{
itemsPerPageText: 'Files'
}"
mobile-breakpoint="0"
item-key="name">
<template #no-data>
<div class="text-center">empty</div>
</template>
<template slot="body.prepend" v-if="(currentPath !== '')">
<tr
class="file-list-cursor"
@click="clickRowGoBack">
<td class="pr-0 text-center" style="width: 32px;"><v-icon>mdi-folder-upload</v-icon></td>
<td class=" " colspan="8">..</td>
</tr>
</template>
<template #item="{ item }">
<tr
@contextmenu="showContextMenu($event, item)"
@click="clickRow(item)"
class="file-list-cursor"
:data-name="item.filename">
<td class="pr-0 text-center" style="width: 32px;">
<v-icon v-if="item.isDirectory">mdi-folder</v-icon>
<v-icon v-if="!item.isDirectory">mdi-file</v-icon>
</td>
<td class=" ">{{ item.filename }}</td>
<td class="text-no-wrap text-right">{{ item.isDirectory ? '--' : formatFilesize(item.size) }}</td>
<td class="text-right">{{ formatDate(item.modified) }}</td>
</tr>
</template>
</v-data-table>
</v-card>
<v-menu v-model="contextMenu.shown" :position-x="contextMenu.x" :position-y="contextMenu.y" absolute offset-y>
<v-list>
<v-list-item @click="clickRow(contextMenu.item)" v-if="!contextMenu.item.isDirectory">
<v-icon class="mr-1">mdi-file-document-edit-outline</v-icon> Edit file
</v-list-item>
<v-list-item @click="downloadFile" v-if="!contextMenu.item.isDirectory">
<v-icon class="mr-1">mdi-cloud-download</v-icon> Download
</v-list-item>
<v-list-item @click="renameFile(contextMenu.item)" v-if="!contextMenu.item.isDirectory && currentPath !== '/config_examples'">
<v-icon class="mr-1">mdi-rename-box</v-icon> Rename
</v-list-item>
<v-list-item @click="removeFile" v-if="!contextMenu.item.isDirectory && currentPath !== '/config_examples'">
<v-icon class="mr-1">mdi-delete</v-icon> Delete
</v-list-item>
<v-list-item @click="deleteDirectoryAction" v-if="contextMenu.item.isDirectory && currentPath !== '' && currentPath !== '/config_examples'">
<v-icon class="mr-1">mdi-delete</v-icon> Delete
</v-list-item>
</v-list>
</v-menu>
<v-dialog v-model="editor.showLoader" hide-overlay persistent width="300" >
<v-card color="primary" dark >
<v-card-text>
Please stand by
<v-progress-linear indeterminate color="white" class="mb-0" ></v-progress-linear>
</v-card-text>
</v-card>
</v-dialog>
<v-dialog v-model="editor.show" fullscreen hide-overlay transition="dialog-bottom-transition" content-class="config-editor-overlay">
<v-card d-flex>
<v-toolbar dark color="primary">
<v-btn icon dark @click="editor.show = false">
<v-icon>mdi-close</v-icon>
</v-btn>
<v-toolbar-title>{{ editor.item.filename }}</v-toolbar-title>
<v-spacer></v-spacer>
<v-toolbar-items>
<v-btn dark text href="https://www.klipper3d.org/Config_Reference.html" target="_blank" class="d-none d-md-flex"><v-icon small class="mr-1">mdi-help</v-icon>Config Reference</v-btn>
<v-btn dark text @click="saveFile(false)" v-if="currentPath !== '/config_examples'"><v-icon small class="mr-1">mdi-content-save</v-icon><span class="d-none d-sm-inline">Save</span></v-btn>
<v-btn dark text @click="saveFile(true)" v-if="currentPath !== '/config_examples' && !['printing', 'paused'].includes(printer_state)" class="d-none d-sm-flex"><v-icon small class="mr-1">mdi-restart</v-icon>Save & restart</v-btn>
</v-toolbar-items>
</v-toolbar>
<prism-editor class="my-editor" v-model="editor.sourcecode" :readonly="editor.readonly" :highlight="highlighter" line-numbers></prism-editor>
</v-card>
</v-dialog>
<v-dialog v-model="dialogRenameFile.show" max-width="400">
<v-card>
<v-card-title class="headline">Rename File</v-card-title>
<v-card-text>
<v-text-field label="Name" required v-model="dialogRenameFile.newName"></v-text-field>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="" text @click="dialogRenameFile.show = false">Cancel</v-btn>
<v-btn color="primary" text @click="renameFileAction">rename</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-dialog v-model="dialogCreateFile.show" max-width="400">
<v-card>
<v-card-title class="headline">Create File</v-card-title>
<v-card-text>
<v-text-field label="Name" required v-model="dialogCreateFile.name"></v-text-field>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="" text @click="dialogCreateFile.show = false">Cancel</v-btn>
<v-btn color="primary" text @click="createFileAction">create</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-dialog v-model="dialogCreateFolder.show" max-width="400">
<v-card>
<v-card-title class="headline">Create Folder</v-card-title>
<v-card-text>
<v-text-field label="Name" required v-model="dialogCreateFolder.name"></v-text-field>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="" text @click="dialogCreateFolder.show = false">Cancel</v-btn>
<v-btn color="primary" text @click="createFolderAction">create</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-snackbar
:timeout="-1"
:value="true"
fixed
right
bottom
dark
v-model="uploadSnackbar.status"
>
<span v-if="uploadSnackbar.max > 1" class="mr-1">({{ uploadSnackbar.number }}/{{ uploadSnackbar.max }})</span><strong>Uploading {{ uploadSnackbar.filename }}</strong><br />
{{ Math.round(uploadSnackbar.percent) }} % @ {{ formatFilesize(Math.round(uploadSnackbar.speed)) }}/s<br />
<v-progress-linear class="mt-2" :value="uploadSnackbar.percent"></v-progress-linear>
<template v-slot:action="{ attrs }">
<v-btn
color="red"
text
v-bind="attrs"
@click="cancelUpload"
style="min-width: auto;"
>
<v-icon class="0">mdi-close</v-icon>
</v-btn>
</template>
</v-snackbar>
</v-col>
</v-row>
</template>
<script>
import { mapState } from 'vuex'
import {findDirectory} from "@/plugins/helpers";
import { PrismEditor } from 'vue-prism-editor';
import 'vue-prism-editor/dist/prismeditor.min.css'; // import the styles somewhere
// import highlighting library (you can use any library you want just return html string)
import { highlight, languages } from 'prismjs/components/prism-core';
import 'prismjs/components/prism-editorconfig';
import 'prismjs/components/prism-ini';
import 'prismjs/themes/prism-okaidia.css';
import axios from "axios"; // import syntax highlighting styles
export default {
components: {
PrismEditor,
},
data: function() {
return {
sortBy: 'filename',
sortDesc: false,
selected: [],
headers: [
{ text: '', value: '', },
{ text: 'Name', value: 'filename', },
{ text: 'Filesize', value: 'size', align: 'right', },
{ text: 'Last modified', value: 'modified', align: 'right', },
],
options: {
},
currentPage: 1,
files: [],
currentPath: '/config',
editor: {
show: false,
showLoader: false,
readonly: false,
item: {
filename: "",
},
sourcecode: ''
},
contextMenu: {
shown: false,
isDirectory: false,
touchTimer: undefined,
x: 0,
y: 0,
item: {}
},
dialogRenameFile: {
show: false,
newName: "",
item: {}
},
dialogCreateFile: {
show: false,
name: "",
},
dialogCreateFolder: {
show: false,
name: "",
},
uploadSnackbar: {
status: false,
filename: "",
percent: 0,
speed: 0,
total: 0,
number: 0,
max: 0,
cancelTokenSource: "",
lastProgress: {
time: 0,
loaded: 0
}
}
}
},
computed: {
...mapState({
filetree: state => state.files.filetree,
hostname: state => state.socket.hostname,
port: state => state.socket.port,
loadings: state => state.socket.loadings,
printer_state: state => state.printer.print_stats.state,
}),
countPerPage: {
get: function() {
return this.$store.state.gui.settings.configfiles.countPerPage
},
set: function(newVal) {
return this.$store.dispatch("gui/setSettings", { settings: { configfiles: { countPerPage: newVal } } });
}
},
showHiddenFiles: {
get: function() {
return this.$store.state.gui.settings.configfiles.showHiddenFiles
},
set: function(newVal) {
return this.$store.dispatch("gui/setSettings", { settings: { configfiles: { showHiddenFiles: newVal } } })
}
},
},
created() {
this.loadPath();
},
methods: {
highlighter(code) {
return highlight(code, languages.ini); //returns html
},
refreshFileList: function() {
if (this.currentPath === "") {
this.$socket.sendObj('server.files.get_directory', { path: 'config' }, 'files/getDirectory');
this.$socket.sendObj('server.files.get_directory', { path: 'config_examples' }, 'files/getDirectory');
} else this.$socket.sendObj('server.files.get_directory', { path: this.currentPath.substring(1) }, 'files/getDirectory');
},
formatDate(date) {
let tmp2 = new Date(date);
return tmp2.toLocaleString().replace(',', '');
},
formatFilesize(fileSizeInBytes) {
let i = -1;
let byteUnits = [' kB', ' MB', ' GB', ' TB', 'PB', 'EB', 'ZB', 'YB'];
do {
fileSizeInBytes = fileSizeInBytes / 1024;
i++;
} while (fileSizeInBytes > 1024);
return Math.max(fileSizeInBytes, 0.1).toFixed(1) + byteUnits[i];
},
sortFiles(items, sortBy, sortDesc) {
sortBy = sortBy.length ? sortBy[0] : 'filename';
sortDesc = sortDesc[0];
if (items !== undefined) {
// Sort by index
items.sort(function(a, b) {
if (a[sortBy] === b[sortBy]) {
return 0;
}
if (a[sortBy] === null || a[sortBy] === undefined) {
return -1;
}
if (b[sortBy] === null || b[sortBy] === undefined) {
return 1;
}
if (a[sortBy].constructor === String && b[sortBy].constructor === String) {
return a[sortBy].localeCompare(b[sortBy], undefined, { sensivity: 'base' });
}
if (a[sortBy] instanceof Array && b[sortBy] instanceof Array) {
const reducedA = a[sortBy].length ? a.filament.reduce((a, b) => a + b) : 0;
const reducedB = b[sortBy].length ? b.filament.reduce((a, b) => a + b) : 0;
return reducedA - reducedB;
}
return a[sortBy] - b[sortBy];
});
// Deal with descending order
if (sortDesc) items.reverse();
// Then make sure directories come first
items.sort((a, b) => (a.isDirectory === b.isDirectory) ? 0 : (a.isDirectory ? -1 : 1));
}
return items;
},
loadPath: function() {
let dirArray = this.currentPath.substring(1).split("/");
this.files = findDirectory(this.filetree, dirArray);
if (dirArray.length === 1 && this.currentPath === "") {
this.files = this.files.filter(element => !["gcodes", "docs"].includes(element.filename))
}
if (!this.showHiddenFiles) {
this.files = this.files.filter(file => file.filename.substr(0, 1) !== ".");
}
},
clickRow: function(item) {
if (!item.isDirectory) {
this.editor.showLoader = true;
this.editor.sourcecode = "";
this.editor.item = item;
let url = '//'+this.hostname+':'+this.port+'/server/files'+this.currentPath+'/'+item.filename+'?time='+Date.now();
fetch(url, { cache: "no-cache" }).then(res => res.text()).then(file => {
this.editor.sourcecode = file;
this.editor.show = true;
this.editor.showLoader = false;
this.editor.readonly = false;
if (this.currentPath === '/config_examples') this.editor.readonly = true;
});
} else {
this.currentPath += "/"+item.filename;
this.currentPage = 1;
}
},
clickRowGoBack: function() {
this.currentPath = this.currentPath.substr(0, this.currentPath.lastIndexOf("/"));
},
saveFile: function(boolRestart = false) {
let file = new File([this.editor.sourcecode], this.editor.item.filename);
let formData = new FormData();
formData.append('file', file);
formData.append('root', 'config');
if(this.currentPath.length > 7) formData.append('path', this.currentPath.substring(8));
axios.post('//' + this.hostname + ':' + this.port + '/server/files/upload',
formData, {
headers: { 'Content-Type': 'multipart/form-data' }
}
).then(() => {
this.$toast.success("File '"+this.editor.item.filename+"' successfully saved.");
this.editor.show = false;
this.editor.sourcecode = "";
if (boolRestart && this.editor.item.filename === "moonraker.conf") {
this.$socket.sendObj('machine.services.restart', { service: "moonraker" })
} else if (boolRestart) {
this.$store.commit('server/addEvent', { message: "FIRMWARE_RESTART", type: 'command' })
this.$socket.sendObj('printer.gcode.script', { script: "FIRMWARE_RESTART" })
}
}).catch(() => {
this.$toast.error("Error save "+this.editor.item.filename);
});
},
showContextMenu (e, item) {
e.preventDefault();
this.contextMenu.shown = true;
this.contextMenu.x = e.clientX;
this.contextMenu.y = e.clientY;
this.contextMenu.item = item;
this.$nextTick(() => {
this.contextMenu.shown = true
});
},
downloadFile() {
let filename = (this.currentPath+"/"+this.contextMenu.item.filename);
let link = document.createElement("a");
link.download = name;
link.href = '//' + this.hostname + ':' + this.port + '/server/files' + filename;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
},
createFolder() {
this.dialogCreateFolder.name = "";
this.dialogCreateFolder.show = true;
},
createFolderAction() {
this.dialogCreateFolder.show = false;
this.$socket.sendObj('server.files.post_directory', {
path: this.currentPath.substring(1)+"/"+this.dialogCreateFolder.name
}, 'files/getCreateDir');
},
createFile() {
this.dialogCreateFile.name = "";
this.dialogCreateFile.show = true;
},
createFileAction() {
let file = new File([""], this.dialogCreateFile.name);
let formData = new FormData();
formData.append('file', file);
formData.append('root', 'config');
if(this.currentPath.length > 7) formData.append('path', this.currentPath.substring(8));
axios.post('//' + this.hostname + ':' + this.port + '/server/files/upload',
formData, {
headers: { 'Content-Type': 'multipart/form-data' }
}
).then(() => {
this.dialogCreateFile.show = false;
this.dialogCreateFile.name = "";
}).catch(() => {
window.console.error("Error save "+this.editor.item.filename);
});
},
renameFile(item) {
this.dialogRenameFile.item = item;
this.dialogRenameFile.newName = item.filename;
this.dialogRenameFile.show = true;
},
renameFileAction() {
this.dialogRenameFile.show = false;
this.$socket.sendObj('server.files.move', {
source: this.currentPath+"/"+this.dialogRenameFile.item.filename,
dest: this.currentPath+"/"+this.dialogRenameFile.newName
}, 'files/getMove');
},
removeFile() {
this.$socket.sendObj('server.files.delete_file', { path: this.currentPath+"/"+this.contextMenu.item.filename }, 'files/getDeleteFile');
},
deleteDirectoryAction: function() {
this.$socket.sendObj('server.files.delete_directory', { path: this.currentPath+"/"+this.contextMenu.item.filename }, 'files/getDeleteDir');
},
uploadFileButton: function() {
this.$refs.fileUpload.click()
},
async uploadFile() {
if (this.$refs.fileUpload.files.length) {
this.$store.commit('socket/addLoading', { name: 'configFileUpload' })
let successFiles = []
this.uploadSnackbar.number = 0
this.uploadSnackbar.max = this.$refs.fileUpload.files.length
for (const file of this.$refs.fileUpload.files) {
this.uploadSnackbar.number++
const result = await this.doUploadFile(file)
successFiles.push(result)
}
this.$store.commit('socket/removeLoading', { name: 'configFileUpload' })
for(const file of successFiles) {
this.$toast.success("Upload of "+file+" successful!")
}
this.$refs.fileUpload.value = ''
}
},
doUploadFile: function(file) {
let toast = this.$toast;
let formData = new FormData();
let filename = file.name.replace(" ", "_");
this.uploadSnackbar.filename = filename
this.uploadSnackbar.status = true
this.uploadSnackbar.percent = 0
this.uploadSnackbar.speed = 0
this.uploadSnackbar.lastProgress.loaded = 0
this.uploadSnackbar.lastProgress.time = 0
formData.append('root', 'config');
formData.append('file', file, (this.currentPath+"/"+filename).substring(7));
this.$store.commit('socket/addLoading', { name: 'configFileUpload' });
return new Promise(resolve => {
this.uploadSnackbar.cancelTokenSource = axios.CancelToken.source();
axios.post('//' + this.hostname + ':' + this.port + '/server/files/upload',
formData, {
headers: { 'Content-Type': 'multipart/form-data' },
cancelToken: this.uploadSnackbar.cancelTokenSource.token,
onUploadProgress: (progressEvent) => {
this.uploadSnackbar.percent = (progressEvent.loaded * 100) / progressEvent.total
if (this.uploadSnackbar.lastProgress.time) {
const time = progressEvent.timeStamp - this.uploadSnackbar.lastProgress.time
const data = progressEvent.loaded - this.uploadSnackbar.lastProgress.loaded
if (time) this.uploadSnackbar.speed = data / (time / 1000)
}
this.uploadSnackbar.lastProgress.time = progressEvent.timeStamp
this.uploadSnackbar.lastProgress.loaded = progressEvent.loaded
this.uploadSnackbar.total = progressEvent.total
}
}
).then((result) => {
this.uploadSnackbar.status = false
resolve(result.data.result)
}).catch(() => {
this.uploadSnackbar.status = false
this.$store.commit('socket/removeLoading', { name: 'configFileUpload' });
toast.error("Cannot upload the file!");
})
})
},
cancelUpload: function() {
this.uploadSnackbar.cancelTokenSource.cancel()
this.uploadSnackbar.status = false
},
},
watch: {
config: {
deep: true,
handler() {
this.loadPath();
}
},
config_examples: {
deep: true,
handler() {
this.loadPath();
}
},
filetree: {
deep: true,
handler() {
this.loadPath();
}
},
currentPath: {
handler() {
this.loadPath();
}
},
showHiddenFiles: {
handler() {
this.loadPath();
}
}
}
}
</script>
@@ -0,0 +1,80 @@
<style>
</style>
<template>
<v-card>
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-console-line</v-icon>Console</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="py-3">
<v-container px-0 py-0>
<v-row>
<v-col class="py-2">
<v-switch v-model="hideWaitTemperatures" label="Hide temperatures" hide-details class="mt-0"></v-switch>
</v-col>
</v-row>
<v-row>
<v-col class="py-2">
<v-switch v-model="boolCustomFilters" label="Custom filter" hide-details class="mt-0"></v-switch>
</v-col>
</v-row>
<v-row v-if="boolCustomFilters">
<v-col class="py-2">
<v-textarea
outlined
label="Rules"
v-model="customFilters"
hide-details
class="mb-2"
></v-textarea>
</v-col>
</v-row>
</v-container>
</v-card-text>
</v-card>
</template>
<script>
export default {
components: {
},
data: function() {
return {
}
},
computed: {
hideWaitTemperatures: {
get() {
return this.$store.state.gui.console.hideWaitTemperatures;
},
set(status) {
return this.$store.dispatch('gui/setSettings', { console: { hideWaitTemperatures: status } });
}
},
boolCustomFilters: {
get() {
return this.$store.state.gui.console.boolCustomFilters;
},
set(status) {
return this.$store.dispatch('gui/setSettings', { console: { boolCustomFilters: status } });
}
},
customFilters: {
get() {
return this.$store.state.gui.console.customFilters;
},
set(status) {
return this.$store.dispatch('gui/setSettings', { console: { customFilters: status } });
}
},
},
methods: {
}
}
</script>
@@ -0,0 +1,74 @@
<style>
</style>
<template>
<v-card>
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-view-dashboard</v-icon>Dashboard</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text>
<v-container px-0 py-0>
<v-row>
<v-col class="py-2">
<v-switch v-model="boolShowWebcamOnDashboard" label="Webcam" hide-details class="mt-0"></v-switch>
</v-col>
</v-row>
<v-row>
<v-col class="py-2">
<v-switch v-model="boolShowTempchartOnDashboard" label="Tempchart" hide-details class="mt-0"></v-switch>
</v-col>
</v-row>
<v-row>
<v-col class="py-2">
<v-switch v-model="boolShowConsoleOnDashboard" label="Console" hide-details class="mt-0"></v-switch>
</v-col>
</v-row>
</v-container>
</v-card-text>
</v-card>
</template>
<script>
export default {
components: {
},
data: function() {
return {
}
},
computed: {
boolShowWebcamOnDashboard: {
get() {
return this.$store.state.gui.dashboard.boolWebcam;
},
set(status) {
return this.$store.dispatch('gui/setSettings', { dashboard: { boolWebcam: status } });
}
},
boolShowTempchartOnDashboard: {
get() {
return this.$store.state.gui.dashboard.boolTempchart;
},
set(status) {
return this.$store.dispatch('gui/setSettings', { dashboard: { boolTempchart: status } });
}
},
boolShowConsoleOnDashboard: {
get() {
return this.$store.state.gui.dashboard.boolConsole;
},
set(status) {
return this.$store.dispatch('gui/setSettings', { dashboard: { boolConsole: status } });
}
},
},
methods: {
}
}
</script>
Loaded 100 of 182 files, more files were not shown because too many files have changed in this diff. Show more